angular-slickgrid 9.10.0 → 9.11.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/README.md +1 -9
- package/fesm2022/angular-slickgrid.mjs +133 -5
- package/fesm2022/angular-slickgrid.mjs.map +1 -1
- package/library/components/angular-slickgrid-outputs.interface.d.ts +206 -0
- package/library/components/angular-slickgrid.component.d.ts +175 -3
- package/library/index.d.ts +1 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [](https://angular.io/) Angular-Slickgrid
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](http://www.typescriptlang.org/)
|
|
@@ -67,10 +67,6 @@ export class GridComponent implements OnInit {
|
|
|
67
67
|
[dataset]="dataset">
|
|
68
68
|
</angular-slickgrid>
|
|
69
69
|
```
|
|
70
|
-
### Troubleshooting
|
|
71
|
-
|
|
72
|
-
> [!WARNING]
|
|
73
|
-
> Because of its use of native Custom Event, this project **does not** work well with `strictTemplates`, so please make sure to either disable `strictTemplates` or cast your event as `any` (see this [discussion](https://github.com/ghiscoding/Angular-Slickgrid/discussions/815) for more info)
|
|
74
70
|
|
|
75
71
|
### Styling Themes
|
|
76
72
|
|
|
@@ -143,7 +139,3 @@ Angular-Slickgrid uses [`ngx-translate`](https://github.com/ngx-translate/core)
|
|
|
143
139
|
|
|
144
140
|
### Tested with [Vitest](https://vitest.dev/) (Unit Tests) - [Cypress](https://www.cypress.io/) (E2E Tests)
|
|
145
141
|
Slickgrid-Universal & Angular-Slickgrid both have **100%** Unit Test Coverage and also every Angular-Slickgrid Examples are fully tested with [Cypress](https://www.cypress.io/) as E2E tests.
|
|
146
|
-
|
|
147
|
-
## Troubleshooting Section
|
|
148
|
-
|
|
149
|
-
- [`strictTemplates` error](https://ghiscoding.gitbook.io/angular-slickgrid/getting-started/troubleshooting#stricttemplates-error)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unsubscribeAll, createDomElement, SlickHybridSelectionModel, SlickRowSelectionModel, SlickEventData, castObservableToPromise, addToArrayWhenNotExists, DelimiterType, EventNamingStyle, Filters, 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, ExtensionName, isColumnDateType } from '@slickgrid-universal/common';
|
|
2
2
|
export * from '@slickgrid-universal/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Optional, EventEmitter, ContentChild, Input, Output, Inject, Component, NgModule } from '@angular/core';
|
|
4
|
+
import { Injectable, Optional, EventEmitter, output, ContentChild, Input, Output, Inject, Component, NgModule } from '@angular/core';
|
|
5
5
|
import * as i1 from '@ngx-translate/core';
|
|
6
6
|
import { TranslateModule } from '@ngx-translate/core';
|
|
7
7
|
import { SlickRowDetailView as SlickRowDetailView$1 } from '@slickgrid-universal/row-detail-view-plugin';
|
|
@@ -950,6 +950,134 @@ class AngularSlickgridComponent {
|
|
|
950
950
|
// make the columnDefinitions a 2-way binding so that plugin adding cols
|
|
951
951
|
// are synched on user's side as well (RowMove, RowDetail, RowSelections)
|
|
952
952
|
columnsChange = new EventEmitter(true);
|
|
953
|
+
// SlickGrid events
|
|
954
|
+
onActiveCellChanged = output();
|
|
955
|
+
onActiveCellPositionChanged = output();
|
|
956
|
+
onAddNewRow = output();
|
|
957
|
+
onAutosizeColumns = output();
|
|
958
|
+
onBeforeAppendCell = output();
|
|
959
|
+
onBeforeSearchChange = output();
|
|
960
|
+
onBeforeCellEditorDestroy = output();
|
|
961
|
+
onBeforeColumnsResize = output();
|
|
962
|
+
onBeforeDestroy = output();
|
|
963
|
+
onBeforeEditCell = output();
|
|
964
|
+
onBeforeHeaderCellDestroy = output();
|
|
965
|
+
onBeforeHeaderRowCellDestroy = output();
|
|
966
|
+
onBeforeFooterRowCellDestroy = output();
|
|
967
|
+
onBeforeSetColumns = output();
|
|
968
|
+
onBeforeSort = output();
|
|
969
|
+
onCellChange = output();
|
|
970
|
+
onCellCssStylesChanged = output();
|
|
971
|
+
onClick = output();
|
|
972
|
+
onColumnsDrag = output();
|
|
973
|
+
onColumnsReordered = output();
|
|
974
|
+
onColumnsResized = output();
|
|
975
|
+
onColumnsResizeDblClick = output();
|
|
976
|
+
onCompositeEditorChange = output();
|
|
977
|
+
onContextMenu = output();
|
|
978
|
+
onDrag = output();
|
|
979
|
+
onDragEnd = output();
|
|
980
|
+
onDragInit = output();
|
|
981
|
+
onDragStart = output();
|
|
982
|
+
onDragReplaceCells = output();
|
|
983
|
+
onDblClick = output();
|
|
984
|
+
onFooterContextMenu = output();
|
|
985
|
+
onFooterRowCellRendered = output();
|
|
986
|
+
onHeaderCellRendered = output();
|
|
987
|
+
onFooterClick = output();
|
|
988
|
+
onHeaderClick = output();
|
|
989
|
+
onHeaderContextMenu = output();
|
|
990
|
+
onHeaderMouseEnter = output();
|
|
991
|
+
onHeaderMouseLeave = output();
|
|
992
|
+
onHeaderRowCellRendered = output();
|
|
993
|
+
onHeaderRowMouseEnter = output();
|
|
994
|
+
onHeaderRowMouseLeave = output();
|
|
995
|
+
onKeyDown = output();
|
|
996
|
+
onMouseEnter = output();
|
|
997
|
+
onMouseLeave = output();
|
|
998
|
+
onValidationError = output();
|
|
999
|
+
onViewportChanged = output();
|
|
1000
|
+
onRendered = output();
|
|
1001
|
+
onSelectedRowsChanged = output();
|
|
1002
|
+
onSetOptions = output();
|
|
1003
|
+
onScroll = output();
|
|
1004
|
+
onSort = output();
|
|
1005
|
+
// DataView events
|
|
1006
|
+
onBeforePagingInfoChanged = output();
|
|
1007
|
+
onGroupExpanded = output();
|
|
1008
|
+
onGroupCollapsed = output();
|
|
1009
|
+
onPagingInfoChanged = output();
|
|
1010
|
+
onRowCountChanged = output();
|
|
1011
|
+
onRowsChanged = output();
|
|
1012
|
+
onRowsOrCountChanged = output();
|
|
1013
|
+
onSelectedRowIdsChanged = output();
|
|
1014
|
+
onSetItemsCalled = output();
|
|
1015
|
+
// other Slick Events
|
|
1016
|
+
onAfterMenuShow = output();
|
|
1017
|
+
onBeforeMenuClose = output();
|
|
1018
|
+
onBeforeMenuShow = output();
|
|
1019
|
+
onColumnsChanged = output();
|
|
1020
|
+
onCommand = output();
|
|
1021
|
+
onGridMenuColumnsChanged = output();
|
|
1022
|
+
onMenuClose = output();
|
|
1023
|
+
onCopyCells = output();
|
|
1024
|
+
onCopyCancelled = output();
|
|
1025
|
+
onPasteCells = output();
|
|
1026
|
+
onBeforePasteCell = output();
|
|
1027
|
+
// Slickgrid-Universal events
|
|
1028
|
+
onAfterExportToExcel = output();
|
|
1029
|
+
onBeforeExportToExcel = output();
|
|
1030
|
+
onBeforeFilterChange = output();
|
|
1031
|
+
onBeforeFilterClear = output();
|
|
1032
|
+
onBeforeSortChange = output();
|
|
1033
|
+
onContextMenuClearGrouping = output();
|
|
1034
|
+
onContextMenuCollapseAllGroups = output();
|
|
1035
|
+
onContextMenuExpandAllGroups = output();
|
|
1036
|
+
onOptionSelected = output();
|
|
1037
|
+
onColumnPickerColumnsChanged = output();
|
|
1038
|
+
onGridMenuMenuClose = output();
|
|
1039
|
+
onGridMenuBeforeMenuShow = output();
|
|
1040
|
+
onGridMenuAfterMenuShow = output();
|
|
1041
|
+
onGridMenuClearAllPinning = output();
|
|
1042
|
+
onGridMenuClearAllFilters = output();
|
|
1043
|
+
onGridMenuClearAllSorting = output();
|
|
1044
|
+
onGridMenuCommand = output();
|
|
1045
|
+
onHeaderButtonCommand = output();
|
|
1046
|
+
onHeaderMenuCommand = output();
|
|
1047
|
+
onHeaderMenuColumnResizeByContent = output();
|
|
1048
|
+
onHeaderMenuBeforeMenuShow = output();
|
|
1049
|
+
onHeaderMenuAfterMenuShow = output();
|
|
1050
|
+
onHideColumns = output();
|
|
1051
|
+
onItemsAdded = output();
|
|
1052
|
+
onItemsDeleted = output();
|
|
1053
|
+
onItemsUpdated = output();
|
|
1054
|
+
onItemsUpserted = output();
|
|
1055
|
+
onFullResizeByContentRequested = output();
|
|
1056
|
+
onGridStateChanged = output();
|
|
1057
|
+
onBeforePaginationChange = output();
|
|
1058
|
+
onPaginationChanged = output();
|
|
1059
|
+
onPaginationRefreshed = output();
|
|
1060
|
+
onPaginationVisibilityChanged = output();
|
|
1061
|
+
onPaginationSetCursorBased = output();
|
|
1062
|
+
onGridBeforeResize = output();
|
|
1063
|
+
onGridAfterResize = output();
|
|
1064
|
+
onBeforeResizeByContent = output();
|
|
1065
|
+
onAfterResizeByContent = output();
|
|
1066
|
+
onSortCleared = output();
|
|
1067
|
+
onFilterChanged = output();
|
|
1068
|
+
onFilterCleared = output();
|
|
1069
|
+
onSortChanged = output();
|
|
1070
|
+
onTreeItemToggled = output();
|
|
1071
|
+
onTreeFullToggleEnd = output();
|
|
1072
|
+
onTreeFullToggleStart = output();
|
|
1073
|
+
// Angular-Slickgrid specific events
|
|
1074
|
+
onBeforeGridCreate = output();
|
|
1075
|
+
onGridCreated = output();
|
|
1076
|
+
onDataviewCreated = output();
|
|
1077
|
+
onAngularGridCreated = output();
|
|
1078
|
+
onBeforeGridDestroy = output();
|
|
1079
|
+
onAfterGridDestroyed = output();
|
|
1080
|
+
onLanguageChange = output();
|
|
953
1081
|
get dataset() {
|
|
954
1082
|
return (this.customDataView ? this.slickGrid?.getData?.() : this.dataView?.getItems()) || [];
|
|
955
1083
|
}
|
|
@@ -1027,8 +1155,8 @@ class AngularSlickgridComponent {
|
|
|
1027
1155
|
get registeredResources() {
|
|
1028
1156
|
return this._registeredResources;
|
|
1029
1157
|
}
|
|
1030
|
-
slickgridHeader;
|
|
1031
|
-
slickgridFooter;
|
|
1158
|
+
slickgridHeader = null;
|
|
1159
|
+
slickgridFooter = null;
|
|
1032
1160
|
constructor(angularUtilService, appRef, cd, containerService, elm, translate, translaterService, forRootConfig, externalServices) {
|
|
1033
1161
|
this.angularUtilService = angularUtilService;
|
|
1034
1162
|
this.appRef = appRef;
|
|
@@ -1553,7 +1681,7 @@ class AngularSlickgridComponent {
|
|
|
1553
1681
|
}
|
|
1554
1682
|
this.subscriptions.push(this.translate.onLangChange.subscribe(({ lang }) => {
|
|
1555
1683
|
// publish event of the same name that Slickgrid-Universal uses on a language change event
|
|
1556
|
-
this._eventPubSubService.publish('onLanguageChange');
|
|
1684
|
+
this._eventPubSubService.publish('onLanguageChange', lang);
|
|
1557
1685
|
if (gridOptions.enableTranslate) {
|
|
1558
1686
|
this.extensionService.translateAllExtensions(lang);
|
|
1559
1687
|
if ((gridOptions.createPreHeaderPanel && gridOptions.createTopHeaderPanel) ||
|
|
@@ -2156,7 +2284,7 @@ class AngularSlickgridComponent {
|
|
|
2156
2284
|
}
|
|
2157
2285
|
}
|
|
2158
2286
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", 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 });
|
|
2159
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: AngularSlickgridComponent, isStandalone: false, selector: "angular-slickgrid", inputs: { customDataView: "customDataView", gridId: "gridId", options: "options", paginationOptions: "paginationOptions", columns: "columns", dataset: "dataset", datasetHierarchical: "datasetHierarchical" }, outputs: { columnsChange: "columnsChange" }, providers: [AngularUtilService, TranslaterService], 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\"></div>\n <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], preserveWhitespaces: true });
|
|
2287
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: AngularSlickgridComponent, isStandalone: false, selector: "angular-slickgrid", inputs: { customDataView: "customDataView", gridId: "gridId", options: "options", paginationOptions: "paginationOptions", columns: "columns", dataset: "dataset", datasetHierarchical: "datasetHierarchical" }, outputs: { columnsChange: "columnsChange", onActiveCellChanged: "onActiveCellChanged", onActiveCellPositionChanged: "onActiveCellPositionChanged", onAddNewRow: "onAddNewRow", onAutosizeColumns: "onAutosizeColumns", onBeforeAppendCell: "onBeforeAppendCell", onBeforeSearchChange: "onBeforeSearchChange", onBeforeCellEditorDestroy: "onBeforeCellEditorDestroy", onBeforeColumnsResize: "onBeforeColumnsResize", onBeforeDestroy: "onBeforeDestroy", onBeforeEditCell: "onBeforeEditCell", onBeforeHeaderCellDestroy: "onBeforeHeaderCellDestroy", onBeforeHeaderRowCellDestroy: "onBeforeHeaderRowCellDestroy", onBeforeFooterRowCellDestroy: "onBeforeFooterRowCellDestroy", onBeforeSetColumns: "onBeforeSetColumns", onBeforeSort: "onBeforeSort", onCellChange: "onCellChange", onCellCssStylesChanged: "onCellCssStylesChanged", onClick: "onClick", onColumnsDrag: "onColumnsDrag", onColumnsReordered: "onColumnsReordered", onColumnsResized: "onColumnsResized", onColumnsResizeDblClick: "onColumnsResizeDblClick", onCompositeEditorChange: "onCompositeEditorChange", onContextMenu: "onContextMenu", onDrag: "onDrag", onDragEnd: "onDragEnd", onDragInit: "onDragInit", onDragStart: "onDragStart", onDragReplaceCells: "onDragReplaceCells", onDblClick: "onDblClick", onFooterContextMenu: "onFooterContextMenu", onFooterRowCellRendered: "onFooterRowCellRendered", onHeaderCellRendered: "onHeaderCellRendered", onFooterClick: "onFooterClick", onHeaderClick: "onHeaderClick", onHeaderContextMenu: "onHeaderContextMenu", onHeaderMouseEnter: "onHeaderMouseEnter", onHeaderMouseLeave: "onHeaderMouseLeave", onHeaderRowCellRendered: "onHeaderRowCellRendered", onHeaderRowMouseEnter: "onHeaderRowMouseEnter", onHeaderRowMouseLeave: "onHeaderRowMouseLeave", onKeyDown: "onKeyDown", onMouseEnter: "onMouseEnter", onMouseLeave: "onMouseLeave", onValidationError: "onValidationError", onViewportChanged: "onViewportChanged", onRendered: "onRendered", onSelectedRowsChanged: "onSelectedRowsChanged", onSetOptions: "onSetOptions", onScroll: "onScroll", onSort: "onSort", onBeforePagingInfoChanged: "onBeforePagingInfoChanged", onGroupExpanded: "onGroupExpanded", onGroupCollapsed: "onGroupCollapsed", onPagingInfoChanged: "onPagingInfoChanged", onRowCountChanged: "onRowCountChanged", onRowsChanged: "onRowsChanged", onRowsOrCountChanged: "onRowsOrCountChanged", onSelectedRowIdsChanged: "onSelectedRowIdsChanged", onSetItemsCalled: "onSetItemsCalled", onAfterMenuShow: "onAfterMenuShow", onBeforeMenuClose: "onBeforeMenuClose", onBeforeMenuShow: "onBeforeMenuShow", onColumnsChanged: "onColumnsChanged", onCommand: "onCommand", onGridMenuColumnsChanged: "onGridMenuColumnsChanged", onMenuClose: "onMenuClose", onCopyCells: "onCopyCells", onCopyCancelled: "onCopyCancelled", onPasteCells: "onPasteCells", onBeforePasteCell: "onBeforePasteCell", onAfterExportToExcel: "onAfterExportToExcel", onBeforeExportToExcel: "onBeforeExportToExcel", onBeforeFilterChange: "onBeforeFilterChange", onBeforeFilterClear: "onBeforeFilterClear", onBeforeSortChange: "onBeforeSortChange", onContextMenuClearGrouping: "onContextMenuClearGrouping", onContextMenuCollapseAllGroups: "onContextMenuCollapseAllGroups", onContextMenuExpandAllGroups: "onContextMenuExpandAllGroups", onOptionSelected: "onOptionSelected", onColumnPickerColumnsChanged: "onColumnPickerColumnsChanged", onGridMenuMenuClose: "onGridMenuMenuClose", onGridMenuBeforeMenuShow: "onGridMenuBeforeMenuShow", onGridMenuAfterMenuShow: "onGridMenuAfterMenuShow", onGridMenuClearAllPinning: "onGridMenuClearAllPinning", onGridMenuClearAllFilters: "onGridMenuClearAllFilters", onGridMenuClearAllSorting: "onGridMenuClearAllSorting", onGridMenuCommand: "onGridMenuCommand", onHeaderButtonCommand: "onHeaderButtonCommand", onHeaderMenuCommand: "onHeaderMenuCommand", onHeaderMenuColumnResizeByContent: "onHeaderMenuColumnResizeByContent", onHeaderMenuBeforeMenuShow: "onHeaderMenuBeforeMenuShow", onHeaderMenuAfterMenuShow: "onHeaderMenuAfterMenuShow", onHideColumns: "onHideColumns", onItemsAdded: "onItemsAdded", onItemsDeleted: "onItemsDeleted", onItemsUpdated: "onItemsUpdated", onItemsUpserted: "onItemsUpserted", onFullResizeByContentRequested: "onFullResizeByContentRequested", onGridStateChanged: "onGridStateChanged", onBeforePaginationChange: "onBeforePaginationChange", onPaginationChanged: "onPaginationChanged", onPaginationRefreshed: "onPaginationRefreshed", onPaginationVisibilityChanged: "onPaginationVisibilityChanged", onPaginationSetCursorBased: "onPaginationSetCursorBased", onGridBeforeResize: "onGridBeforeResize", onGridAfterResize: "onGridAfterResize", onBeforeResizeByContent: "onBeforeResizeByContent", onAfterResizeByContent: "onAfterResizeByContent", onSortCleared: "onSortCleared", onFilterChanged: "onFilterChanged", onFilterCleared: "onFilterCleared", onSortChanged: "onSortChanged", onTreeItemToggled: "onTreeItemToggled", onTreeFullToggleEnd: "onTreeFullToggleEnd", onTreeFullToggleStart: "onTreeFullToggleStart", onBeforeGridCreate: "onBeforeGridCreate", onGridCreated: "onGridCreated", onDataviewCreated: "onDataviewCreated", onAngularGridCreated: "onAngularGridCreated", onBeforeGridDestroy: "onBeforeGridDestroy", onAfterGridDestroyed: "onAfterGridDestroyed", onLanguageChange: "onLanguageChange" }, providers: [AngularUtilService, TranslaterService], 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\"></div>\n <ng-container *ngTemplateOutlet=\"slickgridFooter\"></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], preserveWhitespaces: true });
|
|
2160
2288
|
}
|
|
2161
2289
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AngularSlickgridComponent, decorators: [{
|
|
2162
2290
|
type: Component,
|