Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
597 B

import { Collection } from '../../common';
import EditorModel from '../../editor/model/Editor';
import { DataSourceProps } from '../types';
import DataSource from './DataSource';
export default class DataSources extends Collection<DataSource> {
em: EditorModel;
constructor(models: DataSource[] | DataSourceProps[], em: EditorModel) {
super(models, em);
this.em = em;
// @ts-ignore We need to inject `em` for pages created on reset from the Storage load
this.model = (props: DataSourceProps, opts = {}) => {
return new DataSource(props, { ...opts, em });
};
}
}