@slickgrid-universal/vanilla-bundle 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/slick-vanilla-grid-bundle.js +3 -2
- package/dist/cjs/components/slick-vanilla-grid-bundle.js.map +1 -1
- package/dist/esm/components/slick-vanilla-grid-bundle.js +4 -3
- package/dist/esm/components/slick-vanilla-grid-bundle.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/slick-vanilla-grid-bundle.d.ts.map +1 -1
- package/dist/types/index.d.ts +20 -19
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/components/slick-vanilla-grid-bundle.ts +1483 -0
- package/src/index.ts +31 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/slickerGridInstance.interface.ts +73 -0
- package/src/services/index.ts +1 -0
- package/src/services/universalContainer.service.ts +24 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Aggregators, Editors, Enums, Filters, Formatters, GroupTotalFormatters, SortComparers, Utilities } from '@slickgrid-universal/common';
|
|
2
|
+
import { BindingService } from '@slickgrid-universal/binding';
|
|
3
|
+
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
4
|
+
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
5
|
+
import { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';
|
|
6
|
+
import { SlickVanillaGridBundle } from './components/slick-vanilla-grid-bundle';
|
|
7
|
+
|
|
8
|
+
const Slicker = {
|
|
9
|
+
GridBundle: SlickVanillaGridBundle,
|
|
10
|
+
Aggregators,
|
|
11
|
+
BindingService,
|
|
12
|
+
Editors,
|
|
13
|
+
Enums,
|
|
14
|
+
Filters,
|
|
15
|
+
Formatters,
|
|
16
|
+
GroupTotalFormatters,
|
|
17
|
+
SortComparers,
|
|
18
|
+
Utilities,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// expose the bundle on the global "window" object as Slicker
|
|
22
|
+
if (typeof window !== 'undefined') {
|
|
23
|
+
(window as any).Slicker = Slicker;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { BindingService };
|
|
27
|
+
export { Aggregators, Editors, Enums, EventPubSubService, Filters, Formatters, GroupTotalFormatters, SortComparers, Utilities };
|
|
28
|
+
export { SlickEmptyWarningComponent, SlickPaginationComponent, SlickVanillaGridBundle }; // export the custom components & interfaces
|
|
29
|
+
export { Slicker };
|
|
30
|
+
export * from './interfaces/index';
|
|
31
|
+
export * from './services/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './slickerGridInstance.interface';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
BackendService,
|
|
3
|
+
ExtensionService,
|
|
4
|
+
ExtensionUtility,
|
|
5
|
+
FilterService,
|
|
6
|
+
GridEventService,
|
|
7
|
+
GridService,
|
|
8
|
+
GridStateService,
|
|
9
|
+
GroupingAndColspanService,
|
|
10
|
+
PaginationService,
|
|
11
|
+
ResizerService,
|
|
12
|
+
SlickDataView,
|
|
13
|
+
SlickGrid,
|
|
14
|
+
SortService,
|
|
15
|
+
TreeDataService,
|
|
16
|
+
} from '@slickgrid-universal/common';
|
|
17
|
+
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
18
|
+
|
|
19
|
+
export interface SlickerGridInstance<TData = any> {
|
|
20
|
+
/** Slick DataView object */
|
|
21
|
+
dataView: SlickDataView<TData>;
|
|
22
|
+
|
|
23
|
+
/** Slick Grid object */
|
|
24
|
+
slickGrid: SlickGrid;
|
|
25
|
+
|
|
26
|
+
// --
|
|
27
|
+
// Methods
|
|
28
|
+
|
|
29
|
+
/** Dispose of the grid and optionally empty the DOM element grid container as well */
|
|
30
|
+
dispose: (emptyDomElementContainer?: boolean) => void;
|
|
31
|
+
|
|
32
|
+
// --
|
|
33
|
+
// Services
|
|
34
|
+
|
|
35
|
+
/** Backend Service, when available */
|
|
36
|
+
backendService?: BackendService;
|
|
37
|
+
|
|
38
|
+
/** EventPubSub Service instance that is used internal by the lib and could be used externally to subscribe to Slickgrid-Universal events */
|
|
39
|
+
eventPubSubService?: EventPubSubService;
|
|
40
|
+
|
|
41
|
+
/** Extension (Controls & Plugins) Service */
|
|
42
|
+
extensionService: ExtensionService;
|
|
43
|
+
|
|
44
|
+
/** Extension Utilities */
|
|
45
|
+
extensionUtility: ExtensionUtility;
|
|
46
|
+
|
|
47
|
+
/** Filter Service */
|
|
48
|
+
filterService: FilterService;
|
|
49
|
+
|
|
50
|
+
/** Grid Service (grid extra functionalities) */
|
|
51
|
+
gridService: GridService;
|
|
52
|
+
|
|
53
|
+
/** Grid Events Service */
|
|
54
|
+
gridEventService: GridEventService;
|
|
55
|
+
|
|
56
|
+
/** Grid State Service */
|
|
57
|
+
gridStateService: GridStateService;
|
|
58
|
+
|
|
59
|
+
/** Grouping (and colspan) Service */
|
|
60
|
+
groupingService: GroupingAndColspanService;
|
|
61
|
+
|
|
62
|
+
/** Pagination Service (allows you to programmatically go to first/last page, etc...) */
|
|
63
|
+
paginationService: PaginationService;
|
|
64
|
+
|
|
65
|
+
/** Resizer Service (including auto-resize) */
|
|
66
|
+
resizerService: ResizerService;
|
|
67
|
+
|
|
68
|
+
/** Sort Service */
|
|
69
|
+
sortService: SortService;
|
|
70
|
+
|
|
71
|
+
/** Tree Data View Service */
|
|
72
|
+
treeDataService: TreeDataService;
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './universalContainer.service';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ContainerInstance, ContainerService } from '@slickgrid-universal/common';
|
|
2
|
+
|
|
3
|
+
export class UniversalContainerService implements ContainerService {
|
|
4
|
+
dependencies: ContainerInstance[] = [];
|
|
5
|
+
|
|
6
|
+
get<T = any>(key: string): T | null {
|
|
7
|
+
const dependency = this.dependencies.find(dep => dep.key === key);
|
|
8
|
+
if (dependency?.instance) {
|
|
9
|
+
return dependency.instance;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
dispose() {
|
|
15
|
+
this.dependencies = [];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
registerInstance(key: string, instance: any) {
|
|
19
|
+
const dependency = this.dependencies.some(dep => dep.key === key);
|
|
20
|
+
if (!dependency) {
|
|
21
|
+
this.dependencies.push({ key, instance });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|