angular-slickgrid 6.6.1 → 6.6.3
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/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +52 -46
- package/esm2022/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +42 -19
- package/fesm2022/angular-slickgrid.mjs +41 -18
- package/fesm2022/angular-slickgrid.mjs.map +1 -1
- package/package.json +11 -11
|
@@ -6,38 +6,39 @@ import { AfterViewInit, ApplicationRef, ChangeDetectorRef, ElementRef, EventEmit
|
|
|
6
6
|
import { TranslateService } from '@ngx-translate/core';
|
|
7
7
|
import type { BackendServiceApi, Column, EventSubscription, ExternalResource, Locale, Metrics, Pagination, RxJsFacade, ServicePagination, SlickDataView, SlickEventHandler, SlickGrid } from '@slickgrid-universal/common';
|
|
8
8
|
import { ExtensionUtility, SlickGroupItemMetadataProvider, BackendUtilityService, CollectionService, ExtensionService, FilterFactory, FilterService, GridEventService, GridService, GridStateService, GroupingAndColspanService, PaginationService, ResizerService, SharedService, SortService, TreeDataService } from '@slickgrid-universal/common';
|
|
9
|
+
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
9
10
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
10
11
|
import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
|
|
11
12
|
import { SlickPaginationComponent } from '@slickgrid-universal/pagination-component';
|
|
12
|
-
import type { ExternalTestingDependencies, GridOption } from './../models/index';
|
|
13
|
+
import type { AngularGridInstance, ExternalTestingDependencies, GridOption } from './../models/index';
|
|
13
14
|
import { TranslaterService } from '../services/translater.service';
|
|
14
15
|
import { AngularUtilService } from '../services/angularUtil.service';
|
|
15
16
|
import { SlickRowDetailView } from '../extensions/slickRowDetailView';
|
|
16
17
|
import { ContainerService } from '../services/container.service';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
export declare class AngularSlickgridComponent implements AfterViewInit, OnDestroy {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
protected readonly angularUtilService: AngularUtilService;
|
|
21
|
+
protected readonly appRef: ApplicationRef;
|
|
22
|
+
protected readonly cd: ChangeDetectorRef;
|
|
23
|
+
protected readonly containerService: ContainerService;
|
|
24
|
+
protected readonly elm: ElementRef;
|
|
25
|
+
protected readonly translate: TranslateService;
|
|
26
|
+
protected readonly translaterService: TranslaterService;
|
|
27
|
+
protected forRootConfig: GridOption;
|
|
28
|
+
protected _dataset?: any[] | null;
|
|
29
|
+
protected _columnDefinitions: Column[];
|
|
30
|
+
protected _currentDatasetLength: number;
|
|
31
|
+
protected _eventHandler: SlickEventHandler;
|
|
32
|
+
protected _eventPubSubService: EventPubSubService;
|
|
33
|
+
protected _angularGridInstances: AngularGridInstance | undefined;
|
|
34
|
+
protected _hideHeaderRowAfterPageLoad: boolean;
|
|
35
|
+
protected _isGridInitialized: boolean;
|
|
36
|
+
protected _isDatasetInitialized: boolean;
|
|
37
|
+
protected _isDatasetHierarchicalInitialized: boolean;
|
|
38
|
+
protected _isPaginationInitialized: boolean;
|
|
39
|
+
protected _isLocalGrid: boolean;
|
|
40
|
+
protected _paginationOptions: Pagination | undefined;
|
|
41
|
+
protected _registeredResources: ExternalResource[];
|
|
41
42
|
dataView: SlickDataView;
|
|
42
43
|
slickGrid: SlickGrid;
|
|
43
44
|
groupingDefinition: any;
|
|
@@ -98,6 +99,7 @@ export declare class AngularSlickgridComponent implements AfterViewInit, OnDestr
|
|
|
98
99
|
ngAfterViewInit(): void;
|
|
99
100
|
ngOnDestroy(): void;
|
|
100
101
|
destroy(shouldEmptyDomElementContainer?: boolean): void;
|
|
102
|
+
disposeExternalResources(): void;
|
|
101
103
|
emptyGridContainerElm(): void;
|
|
102
104
|
/**
|
|
103
105
|
* Define our internal Post Process callback, it will execute internally after we get back result from the Process backend call
|
|
@@ -135,65 +137,69 @@ export declare class AngularSlickgridComponent implements AfterViewInit, OnDestr
|
|
|
135
137
|
* Loop through all column definitions and copy the original optional `width` properties optionally provided by the user.
|
|
136
138
|
* We will use this when doing a resize by cell content, if user provided a `width` it won't override it.
|
|
137
139
|
*/
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
protected copyColumnWidthsReference(columnDefinitions: Column[]): void;
|
|
141
|
+
protected displayEmptyDataWarning(showWarning?: boolean): void;
|
|
142
|
+
protected bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView): void;
|
|
143
|
+
protected bindBackendCallbackFunctions(gridOptions: GridOption): void;
|
|
144
|
+
protected bindResizeHook(grid: SlickGrid, options: GridOption): void;
|
|
145
|
+
protected executeAfterDataviewCreated(_grid: SlickGrid, gridOptions: GridOption): void;
|
|
144
146
|
/** When data changes in the DataView, we'll refresh the metrics and/or display a warning if the dataset is empty */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
protected handleOnItemCountChanged(currentPageRowItemCount: number, totalItemCount: number): void;
|
|
148
|
+
protected initializePaginationService(paginationOptions: Pagination): void;
|
|
147
149
|
/** Load the Editor Collection asynchronously and replace the "collection" property when Observable resolves */
|
|
148
|
-
|
|
150
|
+
protected loadEditorCollectionAsync(column: Column): void;
|
|
149
151
|
protected insertDynamicPresetColumns(columnId: string, gridPresetColumns: Column[]): void;
|
|
150
152
|
/** Load any possible Columns Grid Presets */
|
|
151
|
-
|
|
153
|
+
protected loadColumnPresetsWhenDatasetInitialized(): void;
|
|
152
154
|
/** Load any possible Filters Grid Presets */
|
|
153
|
-
|
|
155
|
+
protected loadFilterPresetsWhenDatasetInitialized(): void;
|
|
154
156
|
/**
|
|
155
157
|
* local grid, check if we need to show the Pagination
|
|
156
158
|
* if so then also check if there's any presets and finally initialize the PaginationService
|
|
157
159
|
* a local grid with Pagination presets will potentially have a different total of items, we'll need to get it from the DataView and update our total
|
|
158
160
|
*/
|
|
159
|
-
|
|
161
|
+
protected loadLocalGridPagination(dataset?: any[]): void;
|
|
160
162
|
/** Load any Row Selections into the DataView that were presets by the user */
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
protected loadRowSelectionPresetWhenExists(): void;
|
|
164
|
+
protected mergeGridOptions(gridOptions: GridOption): GridOption;
|
|
165
|
+
/** Add a register a new external resource, user could also optional dispose all previous resources before pushing any new resources to the resources array list. */
|
|
166
|
+
registerExternalResources(resources: ExternalResource[], disposePreviousResources?: boolean): void;
|
|
167
|
+
resetExternalResources(): void;
|
|
163
168
|
/** Pre-Register any Resource that don't require SlickGrid to be instantiated (for example RxJS Resource & RowDetail) */
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
protected preRegisterResources(): void;
|
|
170
|
+
protected initializeExternalResources(resources: ExternalResource[]): void;
|
|
171
|
+
protected registerResources(): void;
|
|
166
172
|
/** Register the RxJS Resource in all necessary services which uses */
|
|
167
|
-
|
|
173
|
+
protected registerRxJsResource(resource: RxJsFacade): void;
|
|
168
174
|
/**
|
|
169
175
|
* Render (or dispose) the Pagination Component, user can optionally provide False (to not show it) which will in term dispose of the Pagination,
|
|
170
176
|
* also while disposing we can choose to omit the disposable of the Pagination Service (if we are simply toggling the Pagination, we want to keep the Service alive)
|
|
171
177
|
* @param {Boolean} showPagination - show (new render) or not (dispose) the Pagination
|
|
172
178
|
* @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True)
|
|
173
179
|
*/
|
|
174
|
-
|
|
180
|
+
protected renderPagination(showPagination?: boolean): void;
|
|
175
181
|
/**
|
|
176
182
|
* Takes a flat dataset with parent/child relationship, sort it (via its tree structure) and return the sorted flat array
|
|
177
183
|
* @param {Array<Object>} flatDatasetInput - flat dataset input
|
|
178
184
|
* @param {Boolean} forceGridRefresh - optionally force a full grid refresh
|
|
179
185
|
* @returns {Array<Object>} sort flat parent/child dataset
|
|
180
186
|
*/
|
|
181
|
-
|
|
187
|
+
protected sortTreeDataset<T>(flatDatasetInput: T[], forceGridRefresh?: boolean): T[];
|
|
182
188
|
/**
|
|
183
189
|
* For convenience to the user, we provide the property "editor" as an Angular-Slickgrid editor complex object
|
|
184
190
|
* however "editor" is used internally by SlickGrid for it's own Editor Factory
|
|
185
191
|
* so in our lib we will swap "editor" and copy it into a new property called "internalColumnEditor"
|
|
186
192
|
* then take back "editor.model" and make it the new "editor" so that SlickGrid Editor Factory still works
|
|
187
193
|
*/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
194
|
+
protected swapInternalEditorToSlickGridFactoryEditor(columnDefinitions: Column[]): any[];
|
|
195
|
+
protected translateColumnHeaderTitleKeys(): void;
|
|
196
|
+
protected translateColumnGroupKeys(): void;
|
|
191
197
|
/**
|
|
192
198
|
* Update the "internalColumnEditor.collection" property.
|
|
193
199
|
* Since this is called after the async call resolves, the pointer will not be the same as the "column" argument passed.
|
|
194
200
|
* Once we found the new pointer, we will reassign the "editor" and "collection" to the "internalColumnEditor" so it has newest collection
|
|
195
201
|
*/
|
|
196
|
-
|
|
202
|
+
protected updateEditorCollection<T = any>(column: Column<T>, newCollection: T[]): void;
|
|
197
203
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularSlickgridComponent, [null, null, null, null, null, { optional: true; }, { optional: true; }, null, null]>;
|
|
198
204
|
static ɵcmp: i0.ɵɵComponentDeclaration<AngularSlickgridComponent, "angular-slickgrid", never, { "customDataView": { "alias": "customDataView"; "required": false; }; "gridId": { "alias": "gridId"; "required": false; }; "gridOptions": { "alias": "gridOptions"; "required": false; }; "paginationOptions": { "alias": "paginationOptions"; "required": false; }; "columnDefinitions": { "alias": "columnDefinitions"; "required": false; }; "dataset": { "alias": "dataset"; "required": false; }; "datasetHierarchical": { "alias": "datasetHierarchical"; "required": false; }; }, { "columnDefinitionsChange": "columnDefinitionsChange"; }, never, never, false, never>;
|
|
199
205
|
}
|