diff --git a/.eslintignore b/.eslintignore index aa6b3cbda..30b0d924d 100644 --- a/.eslintignore +++ b/.eslintignore @@ -9,4 +9,5 @@ *.md *.zip *.spec.ts +**/__tests__/*.* **/dist/*.* diff --git a/.eslintrc b/.eslintrc index 1aa57e72e..373434be1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -21,6 +21,9 @@ "plugins": [ "@typescript-eslint" ], + "ignorePatterns": [ + "**/__tests__/*.ts" + ], "rules": { "@typescript-eslint/adjacent-overload-signatures": "error", "@typescript-eslint/ban-ts-comment": "off", diff --git a/examples/webpack-demo-vanilla-bundle/src/examples/icons.ts b/examples/webpack-demo-vanilla-bundle/src/examples/icons.ts index a3657ec79..3ff836e43 100644 --- a/examples/webpack-demo-vanilla-bundle/src/examples/icons.ts +++ b/examples/webpack-demo-vanilla-bundle/src/examples/icons.ts @@ -113,6 +113,7 @@ export class Icons { '.mdi.mdi-filter-outline', '.mdi.mdi-filter-plus-outline', '.mdi.mdi-filter-remove-outline', + '.mdi.mdi-fire', '.mdi.mdi-flip-vertical', '.mdi.mdi-folder', '.mdi.mdi-folder-open', @@ -123,6 +124,12 @@ export class Icons { '.mdi.mdi-history', '.mdi.mdi-information', '.mdi.mdi-information-outline', + '.mdi.mdi-lightbulb', + '.mdi.mdi-lightbulb-off', + '.mdi.mdi-lightbulb-off-outline', + '.mdi.mdi-lightbulb-on', + '.mdi.mdi-lightbulb-on-outline', + '.mdi.mdi-lightbulb-outline', '.mdi.mdi-link', '.mdi.mdi-link-variant', '.mdi.mdi-load', @@ -146,6 +153,7 @@ export class Icons { '.mdi.mdi-redo', '.mdi.mdi-refresh', '.mdi.mdi-shape-square-plus', + '.mdi.mdi-snowflake', '.mdi.mdi-sort-ascending', '.mdi.mdi-sort-descending', '.mdi.mdi-sort-variant-remove', diff --git a/packages/common/src/extensions/__tests__/cellExternalCopyManagerExtension.spec.ts b/packages/common/src/extensions/__tests__/cellExternalCopyManagerExtension.spec.ts index e003c4e2a..02208bcbb 100644 --- a/packages/common/src/extensions/__tests__/cellExternalCopyManagerExtension.spec.ts +++ b/packages/common/src/extensions/__tests__/cellExternalCopyManagerExtension.spec.ts @@ -287,7 +287,7 @@ describe('cellExternalCopyManagerExtension', () => { extension.register() as SlickCellExternalCopyManager; const spy = jest.spyOn(extension.undoRedoBuffer, 'queueAndExecuteCommand'); - extension.addonOptions.clipboardCommandHandler(queueCallback); + extension.addonOptions!.clipboardCommandHandler!(queueCallback); expect(spy).toHaveBeenCalled(); }); @@ -298,7 +298,7 @@ describe('cellExternalCopyManagerExtension', () => { const getDataSpy = jest.spyOn(gridStub, 'getData').mockReturnValue(mockGetData); const addItemSpy = jest.spyOn(mockGetData, 'addItem'); - extension.addonOptions.newRowCreator(2); + extension.addonOptions!.newRowCreator!(2); expect(getDataSpy).toHaveBeenCalled(); expect(addItemSpy).toHaveBeenCalledWith(expect.objectContaining({ id: 'newRow_0' })); @@ -307,7 +307,7 @@ describe('cellExternalCopyManagerExtension', () => { it('should expect a formatted output after calling "dataItemColumnValueExtractor" callback', () => { extension.register(); - const output = extension.addonOptions.dataItemColumnValueExtractor({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName', exportWithFormatter: true, formatter: Formatters.bold }); + const output = extension.addonOptions!.dataItemColumnValueExtractor!({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName', exportWithFormatter: true, formatter: Formatters.bold }); expect(output).toBe('John'); }); @@ -318,7 +318,7 @@ describe('cellExternalCopyManagerExtension', () => { jest.spyOn(SharedService.prototype, 'gridOptions', 'get').mockReturnValue(gridOptionsMock); extension.register(); - const output = extension.addonOptions.dataItemColumnValueExtractor({ firstName: 'John', lastName: null }, { id: 'lastName', field: 'lastName', exportWithFormatter: true, formatter: myBoldFormatter }); + const output = extension.addonOptions!.dataItemColumnValueExtractor!({ firstName: 'John', lastName: null }, { id: 'lastName', field: 'lastName', exportWithFormatter: true, formatter: myBoldFormatter }); expect(output).toBe(''); }); @@ -328,7 +328,7 @@ describe('cellExternalCopyManagerExtension', () => { jest.spyOn(SharedService.prototype, 'gridOptions', 'get').mockReturnValue(gridOptionsMock); extension.register(); - const output = extension.addonOptions.dataItemColumnValueExtractor({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName', exportWithFormatter: true, formatter: Formatters.bold }); + const output = extension.addonOptions!.dataItemColumnValueExtractor!({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName', exportWithFormatter: true, formatter: Formatters.bold }); expect(output).toBe('John'); }); @@ -339,7 +339,7 @@ describe('cellExternalCopyManagerExtension', () => { jest.spyOn(SharedService.prototype, 'gridOptions', 'get').mockReturnValue(gridOptionsMock); extension.register(); - const output = extension.addonOptions.dataItemColumnValueExtractor({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName', exportWithFormatter: true, formatter: myBoldFormatter }); + const output = extension.addonOptions!.dataItemColumnValueExtractor!({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName', exportWithFormatter: true, formatter: myBoldFormatter }); expect(output).toBe('John'); }); @@ -349,7 +349,7 @@ describe('cellExternalCopyManagerExtension', () => { jest.spyOn(SharedService.prototype, 'gridOptions', 'get').mockReturnValue(gridOptionsMock); extension.register(); - const output = extension.addonOptions.dataItemColumnValueExtractor({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName' }); + const output = extension.addonOptions!.dataItemColumnValueExtractor!({ firstName: 'John', lastName: 'Doe' }, { id: 'firstName', field: 'firstName' }); expect(output).toBeNull(); }); diff --git a/packages/common/src/extensions/headerMenuExtension.ts b/packages/common/src/extensions/headerMenuExtension.ts index 1c21aebbd..0a17a973e 100644 --- a/packages/common/src/extensions/headerMenuExtension.ts +++ b/packages/common/src/extensions/headerMenuExtension.ts @@ -236,7 +236,7 @@ export class HeaderMenuExtension implements Extension { const visibleColumns = arrayRemoveItemByIndex(currentColumns, columnIndex); this.sharedService.visibleColumns = visibleColumns; this.sharedService.slickGrid.setColumns(visibleColumns); - this.pubSubService.publish('onHeaderMenuColumnsChanged', { columns: visibleColumns }); + this.pubSubService.publish('onHeaderMenuHideColumns', { columns: visibleColumns, hiddenColumn: column }); } } diff --git a/packages/common/src/interfaces/hideColumnOption.interface.ts b/packages/common/src/interfaces/hideColumnOption.interface.ts index cced9eaac..e83c28bef 100644 --- a/packages/common/src/interfaces/hideColumnOption.interface.ts +++ b/packages/common/src/interfaces/hideColumnOption.interface.ts @@ -8,6 +8,6 @@ export interface HideColumnOption { /** Defaults to false, do we want to hide the column name from the grid menu after hidding the column from the grid? */ hideFromGridMenu?: boolean; - /** Defaults to true, do we want to trigger an even "onHeaderMenuColumnsChanged" after hidding the column(s)? */ + /** Defaults to true, do we want to trigger an event "onHeaderMenuHideColumns" after hidding the column(s)? */ triggerEvent?: boolean; } diff --git a/packages/common/src/services/__tests__/grid.service.spec.ts b/packages/common/src/services/__tests__/grid.service.spec.ts index f3c052069..140427bbf 100644 --- a/packages/common/src/services/__tests__/grid.service.spec.ts +++ b/packages/common/src/services/__tests__/grid.service.spec.ts @@ -1293,7 +1293,7 @@ describe('Grid Service', () => { expect(setVisibleSpy).toHaveBeenCalledWith(mockWithoutColumns); expect(setColsSpy).toHaveBeenCalledWith(mockWithoutColumns); - expect(pubSubSpy).toHaveBeenCalledWith('onHeaderMenuColumnsChanged', { columns: mockWithoutColumns }); + expect(pubSubSpy).toHaveBeenCalledWith('onHeaderMenuHideColumns', { columns: mockWithoutColumns }); }); it('should set new columns minus the column to hide but without triggering an event when set to False', () => { @@ -1337,7 +1337,7 @@ describe('Grid Service', () => { expect(autoSizeSpy).toHaveBeenCalled(); expect(setVisibleSpy).toHaveBeenCalledWith(mockWithoutColumns); expect(setColsSpy).toHaveBeenCalledWith(mockWithoutColumns); - expect(pubSubSpy).toHaveBeenCalledWith('onHeaderMenuColumnsChanged', { columns: mockWithoutColumns }); + expect(pubSubSpy).toHaveBeenCalledWith('onHeaderMenuHideColumns', { columns: mockWithoutColumns }); }); it('should set new columns minus the column to hide but without triggering an event when set to False', () => { @@ -1423,7 +1423,7 @@ describe('Grid Service', () => { expect(hideByIdSpy).toHaveBeenNthCalledWith(1, 'field2', { autoResizeColumns: false, hideFromColumnPicker: false, hideFromGridMenu: false, triggerEvent: false }); expect(hideByIdSpy).toHaveBeenNthCalledWith(2, 'field3', { autoResizeColumns: false, hideFromColumnPicker: false, hideFromGridMenu: false, triggerEvent: false }); expect(autoSizeSpy).toHaveBeenCalled(); - expect(pubSubSpy).toHaveBeenCalledWith('onHeaderMenuColumnsChanged', { columns: expect.toBeArray() }); + expect(pubSubSpy).toHaveBeenCalledWith('onHeaderMenuHideColumns', { columns: expect.toBeArray() }); }); it('should loop through the Ids provided and call hideColumnById on each of them with same options BUT not auto size columns neither trigger when both are disabled', () => { diff --git a/packages/common/src/services/__tests__/gridState.service.spec.ts b/packages/common/src/services/__tests__/gridState.service.spec.ts index 99d0cade8..41ce3b23d 100644 --- a/packages/common/src/services/__tests__/gridState.service.spec.ts +++ b/packages/common/src/services/__tests__/gridState.service.spec.ts @@ -708,6 +708,7 @@ describe('GridStateService', () => { }); it('should return null when no BackendService is used and FilterService is missing the "getCurrentLocalFilters" method', () => { + // @ts-ignore gridStub.getOptions = undefined; const output = service.getCurrentFilters(); expect(output).toBeNull(); @@ -760,7 +761,7 @@ describe('GridStateService', () => { describe('needToPreserveRowSelection method', () => { it('should return false when there are no "dataView" property defined in the grid options', () => { - const gridOptionsMock = { dataView: null } as GridOption; + const gridOptionsMock = { dataView: null } as unknown as GridOption; jest.spyOn(gridStub, 'getOptions').mockReturnValue(gridOptionsMock); const output = service.needToPreserveRowSelection(); @@ -769,7 +770,7 @@ describe('GridStateService', () => { }); it('should return false when "dataView" property is defined in the grid options with "syncGridSelection" property', () => { - const gridOptionsMock = { dataView: null } as GridOption; + const gridOptionsMock = { dataView: null } as unknown as GridOption; jest.spyOn(gridStub, 'getOptions').mockReturnValue(gridOptionsMock); const output = service.needToPreserveRowSelection(); @@ -945,7 +946,7 @@ describe('GridStateService', () => { expect(pubSubSpy).toHaveBeenCalledWith(`onGridStateChanged`, stateChangeMock); }); - it('should trigger a "onGridStateChanged" event when "onHeaderMenuColumnsChanged" is triggered', () => { + it('should trigger a "onGridStateChanged" event when "onHeaderMenuHideColumns" is triggered', () => { const columnsMock1 = [{ id: 'field1', field: 'field1', width: 100, cssClass: 'red' }] as Column[]; const currentColumnsMock1 = [{ columnId: 'field1', cssClass: 'red', headerCssClass: '', width: 100 }] as CurrentColumn[]; const gridStateMock = { columns: currentColumnsMock1, filters: [], sorters: [] } as GridState; @@ -954,7 +955,7 @@ describe('GridStateService', () => { const getCurGridStateSpy = jest.spyOn(service, 'getCurrentGridState').mockReturnValue(gridStateMock); const getAssocCurColSpy = jest.spyOn(service, 'getAssociatedCurrentColumns').mockReturnValue(currentColumnsMock1); - fnCallbacks['onHeaderMenuColumnsChanged'](columnsMock1); + fnCallbacks['onHeaderMenuHideColumns'](columnsMock1); expect(getCurGridStateSpy).toHaveBeenCalled(); expect(getAssocCurColSpy).toHaveBeenCalled(); diff --git a/packages/common/src/services/__tests__/groupingAndColspan.service.spec.ts b/packages/common/src/services/__tests__/groupingAndColspan.service.spec.ts index f9037eea7..efa3524b2 100644 --- a/packages/common/src/services/__tests__/groupingAndColspan.service.spec.ts +++ b/packages/common/src/services/__tests__/groupingAndColspan.service.spec.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import { GroupingAndColspanService } from '../groupingAndColspan.service'; import { Column, SlickDataView, GridOption, SlickEventHandler, SlickGrid, SlickNamespace, SlickColumnPicker, SlickGridMenu } from '../../interfaces/index'; import { ExtensionUtility } from '../../extensions/extensionUtility'; @@ -9,6 +10,17 @@ const gridId = 'grid1'; const gridUid = 'slickgrid_124343'; const containerId = 'demo-container'; +const fnCallbacks = {}; +const mockPubSub = { + publish: jest.fn(), + subscribe: (eventName, fn) => fnCallbacks[eventName] = fn, + unsubscribe: jest.fn(), + unsubscribeAll: jest.fn(), +}; +jest.mock('../pubSub.service', () => ({ + PubSubService: () => mockPubSub +})); + const gridOptionMock = { createPreHeaderPanel: true, enablePagination: true, @@ -85,7 +97,7 @@ describe('GroupingAndColspanService', () => { div.innerHTML = template; document.body.appendChild(div); - service = new GroupingAndColspanService(mockExtensionUtility, extensionServiceStub); + service = new GroupingAndColspanService(mockExtensionUtility, extensionServiceStub, mockPubSub); slickgridEventHandler = service.eventHandler; }); @@ -325,5 +337,19 @@ describe('GroupingAndColspanService', () => { expect(divHeaderColumns.length).toBeGreaterThan(2); expect(divHeaderColumns[0].outerHTML).toEqual(`
All your colums div here
`); }); + + it('should call the "renderPreHeaderRowGroupingTitles" when "onHeaderMenuHideColumns" is triggered', () => { + const columnsMock = [{ id: 'field1', field: 'field1', width: 100, cssClass: 'red' }] as Column[]; + const divHeaderColumns = document.getElementsByClassName('slick-header-columns'); + jest.spyOn(gridStub, 'getColumns').mockReturnValue(mockColumns); + const spy = jest.spyOn(service, 'renderPreHeaderRowGroupingTitles'); + + service.init(gridStub); + fnCallbacks['onHeaderMenuHideColumns'](columnsMock); + jest.runAllTimers(); // fast-forward timer + + expect(spy).toHaveBeenCalledTimes(2); // 1x for init, 1x for event + expect(divHeaderColumns.length).toBeGreaterThan(2); + }); }); }); diff --git a/packages/common/src/services/grid.service.ts b/packages/common/src/services/grid.service.ts index 67047b7f0..b8b0f2791 100644 --- a/packages/common/src/services/grid.service.ts +++ b/packages/common/src/services/grid.service.ts @@ -205,7 +205,7 @@ export class GridService { * @deprecated Hide a Column from the Grid by its column definition index (the column will just become hidden and will still show up in columnPicker/gridMenu) * @see hideColumnById Please use "hideColumnById(id)" or "hideColumnByIds([ids])" instead since it has a lot more options * @param columnIndex - column definition index - * @param triggerEvent - do we want to trigger an event (onHeaderMenuColumnsChanged) when column becomes hidden? Defaults to true. + * @param triggerEvent - do we want to trigger an event (onHeaderMenuHideColumns) when column becomes hidden? Defaults to true. */ hideColumnByIndex(columnIndex: number, triggerEvent = true) { if (this._grid && this._grid.getColumns && this._grid.setColumns) { @@ -214,7 +214,7 @@ export class GridService { this.sharedService.visibleColumns = visibleColumns; this._grid.setColumns(visibleColumns); if (triggerEvent) { - this.pubSubService.publish('onHeaderMenuColumnsChanged', { columns: visibleColumns }); + this.pubSubService.publish('onHeaderMenuHideColumns', { columns: visibleColumns }); } } } @@ -222,7 +222,7 @@ export class GridService { /** * Hide a Column from the Grid by its column definition id, the column will just become hidden and will still show up in columnPicker/gridMenu * @param {string | number} columnId - column definition id - * @param {boolean} triggerEvent - do we want to trigger an event (onHeaderMenuColumnsChanged) when column becomes hidden? Defaults to true. + * @param {boolean} triggerEvent - do we want to trigger an event (onHeaderMenuHideColumns) when column becomes hidden? Defaults to true. * @return {number} columnIndex - column index position when found or -1 */ hideColumnById(columnId: string | number, options?: HideColumnOption): number { @@ -253,7 +253,7 @@ export class GridService { // do we want to trigger an event after hidding if (options?.triggerEvent) { - this.pubSubService.publish('onHeaderMenuColumnsChanged', { columns: visibleColumns }); + this.pubSubService.publish('onHeaderMenuHideColumns', { columns: visibleColumns }); } return colIndexFound; } @@ -264,7 +264,7 @@ export class GridService { /** * Hide a Column from the Grid by its column definition id(s), the column will just become hidden and will still show up in columnPicker/gridMenu * @param {Array} columnIds - column definition ids, can be a single string and an array of strings - * @param {boolean} triggerEvent - do we want to trigger an event (onHeaderMenuColumnsChanged) when column becomes hidden? Defaults to true. + * @param {boolean} triggerEvent - do we want to trigger an event (onHeaderMenuHideColumns) when column becomes hidden? Defaults to true. */ hideColumnByIds(columnIds: Array, options?: HideColumnOption) { options = { ...HideColumnOptionDefaults, ...options }; @@ -279,7 +279,7 @@ export class GridService { } // do we want to trigger an event after hidding if (options?.triggerEvent) { - this.pubSubService.publish('onHeaderMenuColumnsChanged', { columns: this.sharedService.visibleColumns }); + this.pubSubService.publish('onHeaderMenuHideColumns', { columns: this.sharedService.visibleColumns }); } } } diff --git a/packages/common/src/services/gridState.service.ts b/packages/common/src/services/gridState.service.ts index 1bdc13698..fbd018be0 100644 --- a/packages/common/src/services/gridState.service.ts +++ b/packages/common/src/services/gridState.service.ts @@ -361,7 +361,7 @@ export class GridStateService { // subscribe to HeaderMenu (hide column) this._subscriptions.push( - this.pubSubService.subscribe('onHeaderMenuColumnsChanged', (visibleColumns: Column[]) => { + this.pubSubService.subscribe('onHeaderMenuHideColumns', (visibleColumns: Column[]) => { const currentColumns: CurrentColumn[] = this.getAssociatedCurrentColumns(visibleColumns); this.pubSubService.publish('onGridStateChanged', { change: { newValues: currentColumns, type: GridStateType.columns }, gridState: this.getCurrentGridState() }); }) diff --git a/packages/common/src/services/groupingAndColspan.service.ts b/packages/common/src/services/groupingAndColspan.service.ts index 5bd2abfbc..d32fba87d 100644 --- a/packages/common/src/services/groupingAndColspan.service.ts +++ b/packages/common/src/services/groupingAndColspan.service.ts @@ -12,6 +12,7 @@ import { import { ExtensionName } from '../enums/index'; import { ExtensionUtility } from '../extensions/extensionUtility'; import { ExtensionService } from '../services/extension.service'; +import { PubSubService } from './pubSub.service'; // using external non-typed js libraries declare const Slick: SlickNamespace; @@ -20,7 +21,7 @@ export class GroupingAndColspanService { private _eventHandler: SlickEventHandler; private _grid: SlickGrid; - constructor(private extensionUtility: ExtensionUtility, private extensionService: ExtensionService) { + constructor(private extensionUtility: ExtensionUtility, private extensionService: ExtensionService, private pubSubService: PubSubService,) { this._eventHandler = new Slick.EventHandler(); } @@ -71,6 +72,9 @@ export class GroupingAndColspanService { if (columnPickerExtension?.instance?.onColumnsChanged) { this._eventHandler.subscribe(columnPickerExtension.instance.onColumnsChanged, () => this.renderPreHeaderRowGroupingTitles()); } + this.pubSubService.subscribe('onHeaderMenuHideColumns', () => { + this.delayRenderPreHeaderRowGroupingTitles(0); + }); const gridMenuExtension = this.extensionService.getExtensionByName(ExtensionName.gridMenu); if (gridMenuExtension && gridMenuExtension.instance && gridMenuExtension.instance.onColumnsChanged && gridMenuExtension.instance.onMenuClose) { @@ -89,13 +93,13 @@ export class GroupingAndColspanService { (this._eventHandler as SlickEventHandler>).subscribe(onSetOptionsHandler, (_e, args) => { // when user changes frozen columns dynamically (e.g. from header menu), we need to re-render the pre-header of the grouping titles if (args?.optionsBefore?.frozenColumn !== args?.optionsAfter?.frozenColumn) { - setTimeout(() => this.renderPreHeaderRowGroupingTitles(), 0); + this.delayRenderPreHeaderRowGroupingTitles(0); } }); // also not sure why at this point, but it seems that I need to call the 1st create in a delayed execution // probably some kind of timing issues and delaying it until the grid is fully ready fixes this problem - setTimeout(() => this.renderPreHeaderRowGroupingTitles(), 75); + this.delayRenderPreHeaderRowGroupingTitles(75); } } } @@ -105,6 +109,11 @@ export class GroupingAndColspanService { this._eventHandler.unsubscribeAll(); } + /** call "renderPreHeaderRowGroupingTitles()" with a setTimeout delay */ + delayRenderPreHeaderRowGroupingTitles(delay = 0) { + setTimeout(() => this.renderPreHeaderRowGroupingTitles(), delay); + } + /** Create or Render the Pre-Header Row Grouping Titles */ renderPreHeaderRowGroupingTitles() { if (this._gridOptions && this._gridOptions.frozenColumn !== undefined && this._gridOptions.frozenColumn >= 0) { diff --git a/packages/common/src/styles/material-svg-icons.scss b/packages/common/src/styles/material-svg-icons.scss index 08d239f22..5c623103b 100644 --- a/packages/common/src/styles/material-svg-icons.scss +++ b/packages/common/src/styles/material-svg-icons.scss @@ -435,6 +435,11 @@ $icon-height: $icon-width; "M14.73,20.83L17.58,18L14.73,15.17L16.15,13.76L19,16.57L21.8,13.76L23.22,15.17L20.41,18L23.22,20.83L21.8,22.24L19,19.4L16.15,22.24L14.73,20.83M13,19.88C13.04,20.18 12.94,20.5 12.71,20.71C12.32,21.1 11.69,21.1 11.3,20.71L7.29,16.7C7.06,16.47 6.96,16.16 7,15.87V10.75L2.21,4.62C1.87,4.19 1.95,3.56 2.38,3.22C2.57,3.08 2.78,3 3,3V3H17V3C17.22,3 17.43,3.08 17.62,3.22C18.05,3.56 18.13,4.19 17.79,4.62L13,10.75V19.88M5.04,5L9,10.06V15.58L11,17.58V10.05L14.96,5H5.04Z", encodecolor($icon-color), $icon-height, $icon-width, inline-block); +@include loadsvg( + ".mdi.mdi-fire", + "M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + @include loadsvg( ".mdi.mdi-flip-vertical", "M3 15V17H5V15M15 19V21H17V19M19 3H5C3.9 3 3 3.9 3 5V9H5V5H19V9H21V5C21 3.9 20.1 3 19 3M21 19H19V21C20.1 21 21 20.1 21 19M1 11V13H23V11M7 19V21H9V19M19 15V17H21V15M11 19V21H13V19M3 19C3 20.1 3.9 21 5 21V19Z", @@ -485,6 +490,36 @@ $icon-height: $icon-width; "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z", encodecolor($icon-color), $icon-height, $icon-width, inline-block); +@include loadsvg( + ".mdi.mdi-lightbulb", + "M12,2A7,7 0 0,0 5,9C5,11.38 6.19,13.47 8,14.74V17A1,1 0 0,0 9,18H15A1,1 0 0,0 16,17V14.74C17.81,13.47 19,11.38 19,9A7,7 0 0,0 12,2M9,21A1,1 0 0,0 10,22H14A1,1 0 0,0 15,21V20H9V21Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + +@include loadsvg( + ".mdi.mdi-lightbulb-off", + "M12,2C9.76,2 7.78,3.05 6.5,4.68L16.31,14.5C17.94,13.21 19,11.24 19,9A7,7 0 0,0 12,2M3.28,4L2,5.27L5.04,8.3C5,8.53 5,8.76 5,9C5,11.38 6.19,13.47 8,14.74V17A1,1 0 0,0 9,18H14.73L18.73,22L20,20.72L3.28,4M9,20V21A1,1 0 0,0 10,22H14A1,1 0 0,0 15,21V20H9Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + +@include loadsvg( + ".mdi.mdi-lightbulb-off-outline", + "M12,2C9.76,2 7.78,3.05 6.5,4.68L7.93,6.11C8.84,4.84 10.32,4 12,4A5,5 0 0,1 17,9C17,10.68 16.16,12.16 14.89,13.06L16.31,14.5C17.94,13.21 19,11.24 19,9A7,7 0 0,0 12,2M3.28,4L2,5.27L5.04,8.3C5,8.53 5,8.76 5,9C5,11.38 6.19,13.47 8,14.74V17A1,1 0 0,0 9,18H14.73L18.73,22L20,20.72L3.28,4M7.23,10.5L12.73,16H10V13.58C8.68,13 7.66,11.88 7.23,10.5M9,20V21A1,1 0 0,0 10,22H14A1,1 0 0,0 15,21V20H9Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + +@include loadsvg( + ".mdi.mdi-lightbulb-on", + "M12,6A6,6 0 0,1 18,12C18,14.22 16.79,16.16 15,17.2V19A1,1 0 0,1 14,20H10A1,1 0 0,1 9,19V17.2C7.21,16.16 6,14.22 6,12A6,6 0 0,1 12,6M14,21V22A1,1 0 0,1 13,23H11A1,1 0 0,1 10,22V21H14M20,11H23V13H20V11M1,11H4V13H1V11M13,1V4H11V1H13M4.92,3.5L7.05,5.64L5.63,7.05L3.5,4.93L4.92,3.5M16.95,5.63L19.07,3.5L20.5,4.93L18.37,7.05L16.95,5.63Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + +@include loadsvg( + ".mdi.mdi-lightbulb-on-outline", + "M20,11H23V13H20V11M1,11H4V13H1V11M13,1V4H11V1H13M4.92,3.5L7.05,5.64L5.63,7.05L3.5,4.93L4.92,3.5M16.95,5.63L19.07,3.5L20.5,4.93L18.37,7.05L16.95,5.63M12,6A6,6 0 0,1 18,12C18,14.22 16.79,16.16 15,17.2V19A1,1 0 0,1 14,20H10A1,1 0 0,1 9,19V17.2C7.21,16.16 6,14.22 6,12A6,6 0 0,1 12,6M14,21V22A1,1 0 0,1 13,23H11A1,1 0 0,1 10,22V21H14M11,18H13V15.87C14.73,15.43 16,13.86 16,12A4,4 0 0,0 12,8A4,4 0 0,0 8,12C8,13.86 9.27,15.43 11,15.87V18Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + +@include loadsvg( + ".mdi.mdi-lightbulb-outline", + "M12,2A7,7 0 0,1 19,9C19,11.38 17.81,13.47 16,14.74V17A1,1 0 0,1 15,18H9A1,1 0 0,1 8,17V14.74C6.19,13.47 5,11.38 5,9A7,7 0 0,1 12,2M9,21V20H15V21A1,1 0 0,1 14,22H10A1,1 0 0,1 9,21M12,4A5,5 0 0,0 7,9C7,11.05 8.23,12.81 10,13.58V16H14V13.58C15.77,12.81 17,11.05 17,9A5,5 0 0,0 12,4Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + @include loadsvg( ".mdi.mdi-link", "M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z", @@ -600,6 +635,11 @@ $icon-height: $icon-width; "M19,5H22V7H19V10H17V7H14V5H17V2H19V5M17,19V13H19V21H3V5H11V7H5V19H17Z", encodecolor($icon-color), $icon-height, $icon-width, inline-block); +@include loadsvg( + ".mdi.mdi-snowflake", + "M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z", + encodecolor($icon-color), $icon-height, $icon-width, inline-block); + @include loadsvg( ".mdi.mdi-sort-ascending", "M19 17H22L18 21L14 17H17V3H19M2 17H12V19H2M6 5V7H2V5M2 11H9V13H2V11Z", diff --git a/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip b/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip index 176510eeb..f19d2cef5 100644 Binary files a/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip and b/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip differ diff --git a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts index 842e9f59d..ab1a791b7 100644 --- a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts +++ b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts @@ -347,7 +347,7 @@ export class SlickVanillaGridBundle { this.gridService = services?.gridService ?? new GridService(this.extensionService, this.filterService, this._eventPubSubService, this.paginationService, this.sharedService, this.sortService); this.gridStateService = services?.gridStateService ?? new GridStateService(this.extensionService, this.filterService, this._eventPubSubService, this.sharedService, this.sortService); - this.groupingService = services?.groupingAndColspanService ?? new GroupingAndColspanService(this.extensionUtility, this.extensionService); + this.groupingService = services?.groupingAndColspanService ?? new GroupingAndColspanService(this.extensionUtility, this.extensionService, this._eventPubSubService); if (hierarchicalDataset) { this.sharedService.hierarchicalDataset = (isDeepCopyDataOnPageLoadEnabled ? $.extend(true, [], hierarchicalDataset) : hierarchicalDataset) || [];