Sha256: 7902b58683a906f009e25f04d0c3009adf4f6bdf769feddb00893169a2334516
Contents?: true
Size: 753 Bytes
Versions: 2
Compression:
Stored size: 753 Bytes
Contents
import Resolver from './resolver'; export default class extends Resolver { constructor(options, callback) { super(callback); this._options = { collections: () => pageflow.files, ...options }; Object.values(this._options.collections()).forEach((collection) => collection.on('remove', this._handleChange, this) ); } get() { var files = this._options.collections(); return Object.keys(files).reduce((result, collectionName) => { result[collectionName] = files[collectionName].map((file) => file.id); return result; }, {}); } dispose() { Object.values(this._options.collections()).forEach((collection) => collection.off('remove', this._handleChange, this) ); } };
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pageflow-react-0.1.1 | js/src/resolvers/editor_file_ids_resolver.js |
pageflow-react-0.1.0 | js/src/resolvers/editor_file_ids_resolver.js |