angular-slickgrid 8.8.1 → 8.10.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/LICENSE +2 -1
- package/README.md +11 -2
- package/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +7 -7
- package/app/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +6 -2
- package/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +2 -2
- package/esm2022/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +100 -42
- package/esm2022/app/modules/angular-slickgrid/constants.mjs +24 -24
- package/esm2022/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +16 -7
- package/esm2022/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +1 -1
- package/esm2022/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +1 -1
- package/esm2022/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +7 -7
- package/esm2022/app/modules/angular-slickgrid/services/angularUtil.service.mjs +5 -4
- package/esm2022/app/modules/angular-slickgrid/services/container.service.mjs +5 -7
- package/esm2022/app/modules/angular-slickgrid/services/translater.service.mjs +5 -4
- package/esm2022/app/modules/angular-slickgrid/slickgrid-config.mjs +2 -1
- package/fesm2022/angular-slickgrid.mjs +154 -86
- package/fesm2022/angular-slickgrid.mjs.map +1 -1
- package/package.json +10 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unsubscribeAll, SlickRowSelectionModel, castObservableToPromise, addToArrayWhenNotExists, Filters, OperatorType, EventNamingStyle, FileType, DelimiterType, SlickEventHandler, SlickgridConfig as SlickgridConfig$1, BackendUtilityService, GridEventService, SharedService, CollectionService, ExtensionUtility, FilterFactory, FilterService, ResizerService, SortService, TreeDataService, PaginationService, ExtensionService, GridStateService, GridService,
|
|
1
|
+
import { unsubscribeAll, SlickRowSelectionModel, castObservableToPromise, addToArrayWhenNotExists, Filters, OperatorType, EventNamingStyle, FileType, DelimiterType, SlickEventHandler, SlickgridConfig as SlickgridConfig$1, BackendUtilityService, GridEventService, SharedService, CollectionService, ExtensionUtility, FilterFactory, FilterService, ResizerService, SortService, TreeDataService, PaginationService, ExtensionService, GridStateService, GridService, HeaderGroupingService, emptyElement, SlickGroupItemMetadataProvider, SlickDataView, autoAddEditorFormatterToColumnsWithEditor, SlickGrid, GridStateType, ExtensionName, isColumnDateType } from '@slickgrid-universal/common';
|
|
2
2
|
export * from '@slickgrid-universal/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Injectable, Optional, EventEmitter, Component, Inject, Input, Output, ContentChild, NgModule } from '@angular/core';
|
|
@@ -17,6 +17,7 @@ import * as i5 from '@angular/common';
|
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
18
18
|
|
|
19
19
|
class AngularUtilService {
|
|
20
|
+
vcr;
|
|
20
21
|
constructor(vcr) {
|
|
21
22
|
this.vcr = vcr;
|
|
22
23
|
}
|
|
@@ -91,17 +92,15 @@ class AngularUtilService {
|
|
|
91
92
|
}
|
|
92
93
|
return componentOutput;
|
|
93
94
|
}
|
|
94
|
-
static
|
|
95
|
-
static
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularUtilService, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
96
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularUtilService });
|
|
96
97
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularUtilService, decorators: [{
|
|
98
99
|
type: Injectable
|
|
99
100
|
}], ctorParameters: () => [{ type: i0.ViewContainerRef }] });
|
|
100
101
|
|
|
101
102
|
class ContainerService {
|
|
102
|
-
|
|
103
|
-
this.dependencies = [];
|
|
104
|
-
}
|
|
103
|
+
dependencies = [];
|
|
105
104
|
get(key) {
|
|
106
105
|
const dependency = this.dependencies.find(dep => dep.key === key);
|
|
107
106
|
if (dependency?.instance) {
|
|
@@ -118,10 +117,10 @@ class ContainerService {
|
|
|
118
117
|
this.dependencies.push({ key, instance });
|
|
119
118
|
}
|
|
120
119
|
}
|
|
121
|
-
static
|
|
122
|
-
static
|
|
120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: ContainerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
121
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: ContainerService });
|
|
123
122
|
}
|
|
124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: ContainerService, decorators: [{
|
|
125
124
|
type: Injectable
|
|
126
125
|
}] });
|
|
127
126
|
|
|
@@ -130,6 +129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
130
129
|
* it must implement Slickgrid-Universal TranslaterService interface to work properly
|
|
131
130
|
*/
|
|
132
131
|
class TranslaterService {
|
|
132
|
+
translateService;
|
|
133
133
|
constructor(translateService) {
|
|
134
134
|
this.translateService = translateService;
|
|
135
135
|
}
|
|
@@ -156,10 +156,10 @@ class TranslaterService {
|
|
|
156
156
|
translate(translationKey) {
|
|
157
157
|
return this.translateService?.instant?.(translationKey || ' ');
|
|
158
158
|
}
|
|
159
|
-
static
|
|
160
|
-
static
|
|
159
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: TranslaterService, deps: [{ token: i1.TranslateService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
160
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: TranslaterService });
|
|
161
161
|
}
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: TranslaterService, decorators: [{
|
|
163
163
|
type: Injectable
|
|
164
164
|
}], ctorParameters: () => [{ type: i1.TranslateService, decorators: [{
|
|
165
165
|
type: Optional
|
|
@@ -187,6 +187,17 @@ function unsubscribeAllObservables(subscriptions) {
|
|
|
187
187
|
const ROW_DETAIL_CONTAINER_PREFIX = 'container_';
|
|
188
188
|
const PRELOAD_CONTAINER_PREFIX = 'container_loading';
|
|
189
189
|
class SlickRowDetailView extends SlickRowDetailView$1 {
|
|
190
|
+
angularUtilService;
|
|
191
|
+
appRef;
|
|
192
|
+
eventPubSubService;
|
|
193
|
+
gridContainerElement;
|
|
194
|
+
rxjs;
|
|
195
|
+
rowDetailContainer;
|
|
196
|
+
_preloadComponent;
|
|
197
|
+
_views = [];
|
|
198
|
+
_viewComponent;
|
|
199
|
+
_subscriptions = [];
|
|
200
|
+
_userProcessFn;
|
|
190
201
|
constructor(angularUtilService, appRef, eventPubSubService, gridContainerElement, rxjs) {
|
|
191
202
|
super(eventPubSubService);
|
|
192
203
|
this.angularUtilService = angularUtilService;
|
|
@@ -194,8 +205,6 @@ class SlickRowDetailView extends SlickRowDetailView$1 {
|
|
|
194
205
|
this.eventPubSubService = eventPubSubService;
|
|
195
206
|
this.gridContainerElement = gridContainerElement;
|
|
196
207
|
this.rxjs = rxjs;
|
|
197
|
-
this._views = [];
|
|
198
|
-
this._subscriptions = [];
|
|
199
208
|
}
|
|
200
209
|
get addonOptions() {
|
|
201
210
|
return this.getOptions();
|
|
@@ -329,16 +338,16 @@ class SlickRowDetailView extends SlickRowDetailView$1 {
|
|
|
329
338
|
}
|
|
330
339
|
// --
|
|
331
340
|
// hook some events needed by the Plugin itself
|
|
332
|
-
// redraw
|
|
333
|
-
this.eventHandler.subscribe(this._grid.
|
|
341
|
+
// we need to redraw the open detail views if we change column position (column reorder)
|
|
342
|
+
this.eventHandler.subscribe(this._grid.onColumnsReordered, this.redrawAllViewComponents.bind(this));
|
|
334
343
|
// on row selection changed, we also need to redraw
|
|
335
344
|
if (this.gridOptions.enableRowSelection || this.gridOptions.enableCheckboxSelector) {
|
|
336
345
|
this.eventHandler.subscribe(this._grid.onSelectedRowsChanged, this.redrawAllViewComponents.bind(this));
|
|
337
346
|
}
|
|
338
347
|
// on sort, all row detail are collapsed so we can dispose of all the Views as well
|
|
339
348
|
this.eventHandler.subscribe(this._grid.onSort, this.disposeAllViewComponents.bind(this));
|
|
340
|
-
//
|
|
341
|
-
this._subscriptions.push(this.eventPubSubService?.subscribe('onFilterChanged', this.redrawAllViewComponents.bind(this)), this.eventPubSubService?.subscribe(['onGridMenuClearAllFilters', 'onGridMenuClearAllSorting'], () => window.setTimeout(() => this.redrawAllViewComponents())));
|
|
349
|
+
// redraw all Views whenever certain events are triggered
|
|
350
|
+
this._subscriptions.push(this.eventPubSubService?.subscribe(['onFilterChanged', 'onGridMenuColumnsChanged', 'onColumnPickerColumnsChanged'], this.redrawAllViewComponents.bind(this)), this.eventPubSubService?.subscribe(['onGridMenuClearAllFilters', 'onGridMenuClearAllSorting'], () => window.setTimeout(() => this.redrawAllViewComponents())));
|
|
342
351
|
}
|
|
343
352
|
}
|
|
344
353
|
return this;
|
|
@@ -739,6 +748,7 @@ function pickerHeaderColumnValueExtractor(column, gridOptions) {
|
|
|
739
748
|
}
|
|
740
749
|
|
|
741
750
|
class SlickgridConfig {
|
|
751
|
+
options;
|
|
742
752
|
constructor() {
|
|
743
753
|
this.options = GlobalGridOptions;
|
|
744
754
|
}
|
|
@@ -746,7 +756,7 @@ class SlickgridConfig {
|
|
|
746
756
|
|
|
747
757
|
class Constants {
|
|
748
758
|
// English Locale texts when using only 1 Locale instead of I18N
|
|
749
|
-
static
|
|
759
|
+
static locales = {
|
|
750
760
|
TEXT_ALL_SELECTED: 'All Selected',
|
|
751
761
|
TEXT_ALL_X_RECORDS_SELECTED: 'All {{x}} records selected',
|
|
752
762
|
TEXT_APPLY_MASS_UPDATE: 'Apply Mass Update',
|
|
@@ -810,38 +820,101 @@ class Constants {
|
|
|
810
820
|
TEXT_TOGGLE_PRE_HEADER_ROW: 'Toggle Pre-Header Row',
|
|
811
821
|
TEXT_X_OF_Y_SELECTED: '# of % selected',
|
|
812
822
|
TEXT_X_OF_Y_MASS_SELECTED: '{{x}} of {{y}} selected',
|
|
813
|
-
};
|
|
814
|
-
static
|
|
823
|
+
};
|
|
824
|
+
static treeDataProperties = {
|
|
815
825
|
CHILDREN_PROP: 'children',
|
|
816
826
|
COLLAPSED_PROP: '__collapsed',
|
|
817
827
|
HAS_CHILDREN_PROP: '__hasChildren',
|
|
818
828
|
TREE_LEVEL_PROP: '__treeLevel',
|
|
819
829
|
PARENT_PROP: '__parentId',
|
|
820
|
-
};
|
|
830
|
+
};
|
|
821
831
|
// some Validation default texts
|
|
822
|
-
static
|
|
823
|
-
static
|
|
824
|
-
static
|
|
825
|
-
static
|
|
826
|
-
static
|
|
827
|
-
static
|
|
828
|
-
static
|
|
829
|
-
static
|
|
830
|
-
static
|
|
831
|
-
static
|
|
832
|
-
static
|
|
833
|
-
static
|
|
834
|
-
static
|
|
835
|
-
static
|
|
836
|
-
static
|
|
837
|
-
static
|
|
838
|
-
static
|
|
839
|
-
static
|
|
840
|
-
static
|
|
832
|
+
static VALIDATION_REQUIRED_FIELD = 'Field is required';
|
|
833
|
+
static VALIDATION_EDITOR_VALID_NUMBER = 'Please enter a valid number';
|
|
834
|
+
static VALIDATION_EDITOR_VALID_INTEGER = 'Please enter a valid integer number';
|
|
835
|
+
static VALIDATION_EDITOR_INTEGER_BETWEEN = 'Please enter a valid integer number between {{minValue}} and {{maxValue}}';
|
|
836
|
+
static VALIDATION_EDITOR_INTEGER_MAX = 'Please enter a valid integer number that is lower than {{maxValue}}';
|
|
837
|
+
static VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE = 'Please enter a valid integer number that is lower than or equal to {{maxValue}}';
|
|
838
|
+
static VALIDATION_EDITOR_INTEGER_MIN = 'Please enter a valid integer number that is greater than {{minValue}}';
|
|
839
|
+
static VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE = 'Please enter a valid integer number that is greater than or equal to {{minValue}}';
|
|
840
|
+
static VALIDATION_EDITOR_NUMBER_BETWEEN = 'Please enter a valid number between {{minValue}} and {{maxValue}}';
|
|
841
|
+
static VALIDATION_EDITOR_NUMBER_MAX = 'Please enter a valid number that is lower than {{maxValue}}';
|
|
842
|
+
static VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE = 'Please enter a valid number that is lower than or equal to {{maxValue}}';
|
|
843
|
+
static VALIDATION_EDITOR_NUMBER_MIN = 'Please enter a valid number that is greater than {{minValue}}';
|
|
844
|
+
static VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE = 'Please enter a valid number that is greater than or equal to {{minValue}}';
|
|
845
|
+
static VALIDATION_EDITOR_DECIMAL_BETWEEN = 'Please enter a valid number with a maximum of {{maxDecimal}} decimals';
|
|
846
|
+
static VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN = 'Please make sure your text length is between {{minLength}} and {{maxLength}} characters';
|
|
847
|
+
static VALIDATION_EDITOR_TEXT_MAX_LENGTH = 'Please make sure your text is less than {{maxLength}} characters';
|
|
848
|
+
static VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE = 'Please make sure your text is less than or equal to {{maxLength}} characters';
|
|
849
|
+
static VALIDATION_EDITOR_TEXT_MIN_LENGTH = 'Please make sure your text is more than {{minLength}} character(s)';
|
|
850
|
+
static VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE = 'Please make sure your text is at least {{minLength}} character(s)';
|
|
841
851
|
}
|
|
842
852
|
|
|
843
|
-
const WARN_NO_PREPARSE_DATE_SIZE =
|
|
853
|
+
const WARN_NO_PREPARSE_DATE_SIZE = 10000; // data size to warn user when pre-parse isn't enabled
|
|
844
854
|
class AngularSlickgridComponent {
|
|
855
|
+
angularUtilService;
|
|
856
|
+
appRef;
|
|
857
|
+
cd;
|
|
858
|
+
containerService;
|
|
859
|
+
elm;
|
|
860
|
+
translate;
|
|
861
|
+
translaterService;
|
|
862
|
+
forRootConfig;
|
|
863
|
+
_dataset;
|
|
864
|
+
_columnDefinitions;
|
|
865
|
+
_currentDatasetLength = 0;
|
|
866
|
+
_darkMode = false;
|
|
867
|
+
_eventHandler = new SlickEventHandler();
|
|
868
|
+
_eventPubSubService;
|
|
869
|
+
_angularGridInstances;
|
|
870
|
+
_hideHeaderRowAfterPageLoad = false;
|
|
871
|
+
_isAutosizeColsCalled = false;
|
|
872
|
+
_isGridInitialized = false;
|
|
873
|
+
_isDatasetInitialized = false;
|
|
874
|
+
_isDatasetHierarchicalInitialized = false;
|
|
875
|
+
_isPaginationInitialized = false;
|
|
876
|
+
_isLocalGrid = true;
|
|
877
|
+
_paginationOptions;
|
|
878
|
+
_registeredResources = [];
|
|
879
|
+
_scrollEndCalled = false;
|
|
880
|
+
dataView;
|
|
881
|
+
slickGrid;
|
|
882
|
+
groupingDefinition = {};
|
|
883
|
+
groupItemMetadataProvider;
|
|
884
|
+
backendServiceApi;
|
|
885
|
+
locales;
|
|
886
|
+
metrics;
|
|
887
|
+
showPagination = false;
|
|
888
|
+
serviceList = [];
|
|
889
|
+
totalItems = 0;
|
|
890
|
+
paginationData;
|
|
891
|
+
subscriptions = [];
|
|
892
|
+
// components / plugins
|
|
893
|
+
slickEmptyWarning;
|
|
894
|
+
slickFooter;
|
|
895
|
+
slickPagination;
|
|
896
|
+
paginationComponent;
|
|
897
|
+
slickRowDetailView;
|
|
898
|
+
// services
|
|
899
|
+
backendUtilityService;
|
|
900
|
+
collectionService;
|
|
901
|
+
extensionService;
|
|
902
|
+
extensionUtility;
|
|
903
|
+
filterFactory;
|
|
904
|
+
filterService;
|
|
905
|
+
gridEventService;
|
|
906
|
+
gridService;
|
|
907
|
+
gridStateService;
|
|
908
|
+
headerGroupingService;
|
|
909
|
+
paginationService;
|
|
910
|
+
resizerService;
|
|
911
|
+
rxjs;
|
|
912
|
+
sharedService;
|
|
913
|
+
sortService;
|
|
914
|
+
treeDataService;
|
|
915
|
+
customDataView;
|
|
916
|
+
gridId = '';
|
|
917
|
+
gridOptions;
|
|
845
918
|
get paginationOptions() {
|
|
846
919
|
return this._paginationOptions;
|
|
847
920
|
}
|
|
@@ -867,6 +940,9 @@ class AngularSlickgridComponent {
|
|
|
867
940
|
get columnDefinitions() {
|
|
868
941
|
return this._columnDefinitions;
|
|
869
942
|
}
|
|
943
|
+
// make the columnDefinitions a 2-way binding so that plugin adding cols
|
|
944
|
+
// are synched on user's side as well (RowMove, RowDetail, RowSelections)
|
|
945
|
+
columnDefinitionsChange = new EventEmitter(true);
|
|
870
946
|
get dataset() {
|
|
871
947
|
return (this.customDataView ? this.slickGrid?.getData?.() : this.dataView?.getItems()) || [];
|
|
872
948
|
}
|
|
@@ -940,6 +1016,8 @@ class AngularSlickgridComponent {
|
|
|
940
1016
|
get registeredResources() {
|
|
941
1017
|
return this._registeredResources;
|
|
942
1018
|
}
|
|
1019
|
+
slickgridHeader;
|
|
1020
|
+
slickgridFooter;
|
|
943
1021
|
constructor(angularUtilService, appRef, cd, containerService, elm, translate, translaterService, forRootConfig, externalServices) {
|
|
944
1022
|
this.angularUtilService = angularUtilService;
|
|
945
1023
|
this.appRef = appRef;
|
|
@@ -949,27 +1027,6 @@ class AngularSlickgridComponent {
|
|
|
949
1027
|
this.translate = translate;
|
|
950
1028
|
this.translaterService = translaterService;
|
|
951
1029
|
this.forRootConfig = forRootConfig;
|
|
952
|
-
this._currentDatasetLength = 0;
|
|
953
|
-
this._darkMode = false;
|
|
954
|
-
this._eventHandler = new SlickEventHandler();
|
|
955
|
-
this._hideHeaderRowAfterPageLoad = false;
|
|
956
|
-
this._isAutosizeColsCalled = false;
|
|
957
|
-
this._isGridInitialized = false;
|
|
958
|
-
this._isDatasetInitialized = false;
|
|
959
|
-
this._isDatasetHierarchicalInitialized = false;
|
|
960
|
-
this._isPaginationInitialized = false;
|
|
961
|
-
this._isLocalGrid = true;
|
|
962
|
-
this._registeredResources = [];
|
|
963
|
-
this._scrollEndCalled = false;
|
|
964
|
-
this.groupingDefinition = {};
|
|
965
|
-
this.showPagination = false;
|
|
966
|
-
this.serviceList = [];
|
|
967
|
-
this.totalItems = 0;
|
|
968
|
-
this.subscriptions = [];
|
|
969
|
-
this.gridId = '';
|
|
970
|
-
// make the columnDefinitions a 2-way binding so that plugin adding cols
|
|
971
|
-
// are synched on user's side as well (RowMove, RowDetail, RowSelections)
|
|
972
|
-
this.columnDefinitionsChange = new EventEmitter(true);
|
|
973
1030
|
const slickgridConfig = new SlickgridConfig$1();
|
|
974
1031
|
// initialize and assign all Service Dependencies
|
|
975
1032
|
this._eventPubSubService = externalServices?.eventPubSubService ?? new EventPubSubService(this.elm.nativeElement);
|
|
@@ -988,7 +1045,7 @@ class AngularSlickgridComponent {
|
|
|
988
1045
|
this.extensionService = externalServices?.extensionService ?? new ExtensionService(this.extensionUtility, this.filterService, this._eventPubSubService, this.sharedService, this.sortService, this.treeDataService, this.translaterService, () => this.gridService);
|
|
989
1046
|
this.gridStateService = externalServices?.gridStateService ?? new GridStateService(this.extensionService, this.filterService, this._eventPubSubService, this.sharedService, this.sortService, this.treeDataService);
|
|
990
1047
|
this.gridService = externalServices?.gridService ?? new GridService(this.gridStateService, this.filterService, this._eventPubSubService, this.paginationService, this.sharedService, this.sortService, this.treeDataService);
|
|
991
|
-
this.
|
|
1048
|
+
this.headerGroupingService = externalServices?.headerGroupingService ?? new HeaderGroupingService(this.extensionUtility);
|
|
992
1049
|
this.serviceList = [
|
|
993
1050
|
this.containerService,
|
|
994
1051
|
this.extensionService,
|
|
@@ -996,7 +1053,7 @@ class AngularSlickgridComponent {
|
|
|
996
1053
|
this.gridEventService,
|
|
997
1054
|
this.gridService,
|
|
998
1055
|
this.gridStateService,
|
|
999
|
-
this.
|
|
1056
|
+
this.headerGroupingService,
|
|
1000
1057
|
this.paginationService,
|
|
1001
1058
|
this.resizerService,
|
|
1002
1059
|
this.sortService,
|
|
@@ -1010,7 +1067,7 @@ class AngularSlickgridComponent {
|
|
|
1010
1067
|
this.containerService.registerInstance('GridEventService', this.gridEventService);
|
|
1011
1068
|
this.containerService.registerInstance('GridService', this.gridService);
|
|
1012
1069
|
this.containerService.registerInstance('GridStateService', this.gridStateService);
|
|
1013
|
-
this.containerService.registerInstance('
|
|
1070
|
+
this.containerService.registerInstance('HeaderGroupingService', this.headerGroupingService);
|
|
1014
1071
|
this.containerService.registerInstance('PaginationService', this.paginationService);
|
|
1015
1072
|
this.containerService.registerInstance('ResizerService', this.resizerService);
|
|
1016
1073
|
this.containerService.registerInstance('SharedService', this.sharedService);
|
|
@@ -1294,8 +1351,10 @@ class AngularSlickgridComponent {
|
|
|
1294
1351
|
gridEventService: this.gridEventService,
|
|
1295
1352
|
gridStateService: this.gridStateService,
|
|
1296
1353
|
gridService: this.gridService,
|
|
1297
|
-
groupingService: this.
|
|
1354
|
+
groupingService: this.headerGroupingService,
|
|
1355
|
+
headerGroupingService: this.headerGroupingService,
|
|
1298
1356
|
extensionService: this.extensionService,
|
|
1357
|
+
paginationComponent: this.slickPagination,
|
|
1299
1358
|
paginationService: this.paginationService,
|
|
1300
1359
|
resizerService: this.resizerService,
|
|
1301
1360
|
sortService: this.sortService,
|
|
@@ -1466,7 +1525,7 @@ class AngularSlickgridComponent {
|
|
|
1466
1525
|
if (gridOptions.enableTranslate) {
|
|
1467
1526
|
this.extensionService.translateAllExtensions(lang);
|
|
1468
1527
|
if ((gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) || (gridOptions.createPreHeaderPanel && !gridOptions.enableDraggableGrouping)) {
|
|
1469
|
-
this.
|
|
1528
|
+
this.headerGroupingService.translateHeaderGrouping();
|
|
1470
1529
|
}
|
|
1471
1530
|
}
|
|
1472
1531
|
}));
|
|
@@ -1918,7 +1977,7 @@ class AngularSlickgridComponent {
|
|
|
1918
1977
|
this._registeredResources.push(this.gridService, this.gridStateService);
|
|
1919
1978
|
// when using Grouping/DraggableGrouping/Colspan register its Service
|
|
1920
1979
|
if ((this.gridOptions.createPreHeaderPanel && this.gridOptions.createTopHeaderPanel) || (this.gridOptions.createPreHeaderPanel && !this.gridOptions.enableDraggableGrouping)) {
|
|
1921
|
-
this._registeredResources.push(this.
|
|
1980
|
+
this._registeredResources.push(this.headerGroupingService);
|
|
1922
1981
|
}
|
|
1923
1982
|
// when using Tree Data View, register its Service
|
|
1924
1983
|
if (this.gridOptions.enableTreeData) {
|
|
@@ -1957,10 +2016,19 @@ class AngularSlickgridComponent {
|
|
|
1957
2016
|
* @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True)
|
|
1958
2017
|
*/
|
|
1959
2018
|
renderPagination(showPagination = true) {
|
|
1960
|
-
if (this.gridOptions?.enablePagination && !this._isPaginationInitialized && showPagination) {
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
2019
|
+
if (this.slickGrid && this.gridOptions?.enablePagination && !this._isPaginationInitialized && showPagination) {
|
|
2020
|
+
if (this.gridOptions.customPaginationComponent) {
|
|
2021
|
+
const paginationComp = this.angularUtilService.createAngularComponent(this.gridOptions.customPaginationComponent);
|
|
2022
|
+
this.slickPagination = paginationComp.componentRef.instance;
|
|
2023
|
+
}
|
|
2024
|
+
else {
|
|
2025
|
+
this.slickPagination = new SlickPaginationComponent();
|
|
2026
|
+
}
|
|
2027
|
+
if (this.slickPagination) {
|
|
2028
|
+
this.slickPagination.init(this.slickGrid, this.paginationService, this._eventPubSubService, this.translaterService);
|
|
2029
|
+
this.slickPagination.renderPagination(this.gridContainerElement);
|
|
2030
|
+
this._isPaginationInitialized = true;
|
|
2031
|
+
}
|
|
1964
2032
|
}
|
|
1965
2033
|
else if (!showPagination) {
|
|
1966
2034
|
this.slickPagination?.dispose();
|
|
@@ -2009,9 +2077,9 @@ class AngularSlickgridComponent {
|
|
|
2009
2077
|
});
|
|
2010
2078
|
}
|
|
2011
2079
|
suggestDateParsingWhenHelpful() {
|
|
2012
|
-
if (this.dataView?.getItemCount() > WARN_NO_PREPARSE_DATE_SIZE && !this.gridOptions.preParseDateColumns && this.slickGrid.getColumns().some(c => isColumnDateType(c.type))) {
|
|
2080
|
+
if (this.dataView?.getItemCount() > WARN_NO_PREPARSE_DATE_SIZE && !this.gridOptions.silenceWarnings && !this.gridOptions.preParseDateColumns && this.slickGrid.getColumns().some(c => isColumnDateType(c.type))) {
|
|
2013
2081
|
console.warn('[Slickgrid-Universal] For getting better perf, we suggest you enable the `preParseDateColumns` grid option, ' +
|
|
2014
|
-
'for more info visit
|
|
2082
|
+
'for more info visit => https://ghiscoding.gitbook.io/angular-slickgrid/column-functionalities/sorting#pre-parse-date-columns-for-better-perf');
|
|
2015
2083
|
}
|
|
2016
2084
|
}
|
|
2017
2085
|
/**
|
|
@@ -2031,14 +2099,14 @@ class AngularSlickgridComponent {
|
|
|
2031
2099
|
}
|
|
2032
2100
|
}
|
|
2033
2101
|
}
|
|
2034
|
-
static
|
|
2035
|
-
static
|
|
2102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularSlickgridComponent, deps: [{ token: AngularUtilService }, { token: i0.ApplicationRef }, { token: i0.ChangeDetectorRef }, { token: ContainerService }, { token: i0.ElementRef }, { token: i1.TranslateService, optional: true }, { token: TranslaterService, optional: true }, { token: 'config' }, { token: 'externalService' }], target: i0.ɵɵFactoryTarget.Component });
|
|
2103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.10", type: AngularSlickgridComponent, selector: "angular-slickgrid", inputs: { customDataView: "customDataView", gridId: "gridId", gridOptions: "gridOptions", paginationOptions: "paginationOptions", columnDefinitions: "columnDefinitions", dataset: "dataset", datasetHierarchical: "datasetHierarchical" }, outputs: { columnDefinitionsChange: "columnDefinitionsChange" }, providers: [
|
|
2036
2104
|
// make everything transient (non-singleton)
|
|
2037
2105
|
AngularUtilService,
|
|
2038
2106
|
TranslaterService,
|
|
2039
|
-
], queries: [{ propertyName: "slickgridHeader", first: true, predicate: ["slickgridHeader"], descendants: true, static: true }, { propertyName: "slickgridFooter", first: true, predicate: ["slickgridFooter"], descendants: true, static: true }], ngImport: i0, template: "<div id=\"slickGridContainer-{{gridId}}\" class=\"gridPane\">\n <ng-container *ngTemplateOutlet=\"slickgridHeader\"></ng-container>\n <div attr.id='{{gridId}}' class=\"slickgrid-container\">\n </div>\n <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n</div>", dependencies: [{ kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], preserveWhitespaces: true });
|
|
2107
|
+
], queries: [{ propertyName: "slickgridHeader", first: true, predicate: ["slickgridHeader"], descendants: true, static: true }, { propertyName: "slickgridFooter", first: true, predicate: ["slickgridFooter"], descendants: true, static: true }], ngImport: i0, template: "<div id=\"slickGridContainer-{{gridId}}\" class=\"gridPane\">\n <ng-container *ngTemplateOutlet=\"slickgridHeader\"></ng-container>\n <div attr.id='{{gridId}}' class=\"slickgrid-container\">\n </div>\n <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n</div>", dependencies: [{ kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], preserveWhitespaces: true });
|
|
2040
2108
|
}
|
|
2041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularSlickgridComponent, decorators: [{
|
|
2042
2110
|
type: Component,
|
|
2043
2111
|
args: [{ selector: 'angular-slickgrid', providers: [
|
|
2044
2112
|
// make everything transient (non-singleton)
|
|
@@ -2091,13 +2159,13 @@ class AngularSlickgridModule {
|
|
|
2091
2159
|
]
|
|
2092
2160
|
};
|
|
2093
2161
|
}
|
|
2094
|
-
static
|
|
2095
|
-
static
|
|
2096
|
-
TranslateModule], exports: [AngularSlickgridComponent] });
|
|
2097
|
-
static
|
|
2098
|
-
TranslateModule] });
|
|
2162
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularSlickgridModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2163
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.10", ngImport: i0, type: AngularSlickgridModule, declarations: [AngularSlickgridComponent], imports: [CommonModule,
|
|
2164
|
+
TranslateModule], exports: [AngularSlickgridComponent] });
|
|
2165
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularSlickgridModule, imports: [CommonModule,
|
|
2166
|
+
TranslateModule] });
|
|
2099
2167
|
}
|
|
2100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.
|
|
2168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: AngularSlickgridModule, decorators: [{
|
|
2101
2169
|
type: NgModule,
|
|
2102
2170
|
args: [{
|
|
2103
2171
|
imports: [
|