-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.ts
50 lines (42 loc) · 1.91 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { FrameworkConfiguration } from 'aurelia-framework';
import { PLATFORM } from 'aurelia-pal';
import { AureliaSlickgridCustomElement } from './aurelia-slickgrid';
import { SlickPaginationCustomElement } from './slick-pagination';
import { SlickgridConfig } from './slickgrid-config';
import { Filters } from './filters/index';
// expose all public classes
// aggregators, editors, formatters, services...
export * from './models/index';
export * from './formatters/index';
export * from './grouping-formatters/index';
export * from './sorters/index';
export * from './aggregators/index';
export * from './editors/index';
export * from './filter-conditions/index';
export * from './filters/index';
export * from './services/index';
export function configure(aurelia: FrameworkConfiguration, callback: (instance: SlickgridConfig) => void) {
aurelia.globalResources(PLATFORM.moduleName('./aurelia-slickgrid'));
aurelia.globalResources(PLATFORM.moduleName('./slick-pagination'));
aurelia.globalResources(PLATFORM.moduleName('./value-converters/asgNumber'));
// must register a transient so the container will get a new instance everytime
aurelia.container.registerTransient(Filters.autoComplete);
aurelia.container.registerTransient(Filters.compoundDate);
aurelia.container.registerTransient(Filters.compoundInput);
aurelia.container.registerTransient(Filters.compoundSlider);
aurelia.container.registerTransient(Filters.input);
aurelia.container.registerTransient(Filters.multipleSelect);
aurelia.container.registerTransient(Filters.singleSelect);
aurelia.container.registerTransient(Filters.select);
aurelia.container.registerTransient(Filters.slider);
const config = new SlickgridConfig();
aurelia.container.registerInstance(SlickgridConfig, config);
if (typeof callback === 'function') {
callback(config);
}
}
export {
AureliaSlickgridCustomElement,
SlickPaginationCustomElement,
SlickgridConfig
};