From 3fc71cdc22ca06810d1b070642a13f18d65a4867 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Sat, 30 Nov 2024 16:20:16 -0500 Subject: [PATCH] fix: update Slickgrid-Universal to fix a few UI issues --- package.json | 2 +- packages/aurelia-slickgrid/package.json | 14 +++++------ .../src/models/gridOption.interface.ts | 5 +++- packages/demo/package.json | 20 ++++++++-------- test/cypress/e2e/example10.cy.ts | 24 ++++++++++++++++--- test/cypress/e2e/example30.cy.ts | 2 +- 6 files changed, 44 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 9d74620a2..5ba4caad3 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@jest/types": "^29.6.3", "@lerna-lite/cli": "^3.10.1", "@lerna-lite/publish": "^3.10.1", - "@slickgrid-universal/common": "^5.10.1", + "@slickgrid-universal/common": "^5.10.2", "@types/jest": "^29.5.14", "@types/node": "^22.10.1", "conventional-changelog-conventionalcommits": "^7.0.2", diff --git a/packages/aurelia-slickgrid/package.json b/packages/aurelia-slickgrid/package.json index 7aadc6b6d..08b127849 100644 --- a/packages/aurelia-slickgrid/package.json +++ b/packages/aurelia-slickgrid/package.json @@ -53,13 +53,13 @@ "@aurelia/runtime": "^2.0.0-beta.22", "@aurelia/runtime-html": "^2.0.0-beta.22", "@formkit/tempo": "^0.1.2", - "@slickgrid-universal/common": "~5.10.1", - "@slickgrid-universal/custom-footer-component": "~5.10.1", - "@slickgrid-universal/empty-warning-component": "~5.10.1", - "@slickgrid-universal/event-pub-sub": "~5.9.0", - "@slickgrid-universal/pagination-component": "~5.10.1", - "@slickgrid-universal/row-detail-view-plugin": "~5.10.1", - "@slickgrid-universal/utils": "~5.9.0", + "@slickgrid-universal/common": "~5.10.2", + "@slickgrid-universal/custom-footer-component": "~5.10.2", + "@slickgrid-universal/empty-warning-component": "~5.10.2", + "@slickgrid-universal/event-pub-sub": "~5.10.2", + "@slickgrid-universal/pagination-component": "~5.10.2", + "@slickgrid-universal/row-detail-view-plugin": "~5.10.2", + "@slickgrid-universal/utils": "~5.10.2", "dequal": "^2.0.3", "sortablejs": "^1.15.6" }, diff --git a/packages/aurelia-slickgrid/src/models/gridOption.interface.ts b/packages/aurelia-slickgrid/src/models/gridOption.interface.ts index 0a9c6b27d..d68113167 100644 --- a/packages/aurelia-slickgrid/src/models/gridOption.interface.ts +++ b/packages/aurelia-slickgrid/src/models/gridOption.interface.ts @@ -1,9 +1,12 @@ import type { I18N } from '@aurelia/i18n'; -import type { Column, GridOption as UniversalGridOption } from '@slickgrid-universal/common'; +import type { BasePaginationComponent, Column, GridOption as UniversalGridOption } from '@slickgrid-universal/common'; import type { RowDetailView } from './rowDetailView.interface'; export interface GridOption extends UniversalGridOption { + /** External Custom Pagination Component that can be provided by the user */ + customPaginationComponent?: typeof BasePaginationComponent; + /** I18N translation service instance */ i18n?: I18N; diff --git a/packages/demo/package.json b/packages/demo/package.json index 2ea721532..4b60f7486 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -43,19 +43,19 @@ "@fnando/sparkline": "^0.3.10", "@formkit/tempo": "^0.1.2", "@popperjs/core": "^2.11.8", - "@slickgrid-universal/common": "^5.10.1", - "@slickgrid-universal/composite-editor-component": "^5.10.1", - "@slickgrid-universal/custom-tooltip-plugin": "^5.10.1", - "@slickgrid-universal/excel-export": "^5.10.1", - "@slickgrid-universal/graphql": "^5.10.1", - "@slickgrid-universal/odata": "^5.10.1", - "@slickgrid-universal/row-detail-view-plugin": "^5.10.1", - "@slickgrid-universal/rxjs-observable": "^5.10.1", - "@slickgrid-universal/text-export": "^5.10.1", + "@slickgrid-universal/common": "^5.10.2", + "@slickgrid-universal/composite-editor-component": "^5.10.2", + "@slickgrid-universal/custom-tooltip-plugin": "^5.10.2", + "@slickgrid-universal/excel-export": "^5.10.2", + "@slickgrid-universal/graphql": "^5.10.2", + "@slickgrid-universal/odata": "^5.10.2", + "@slickgrid-universal/row-detail-view-plugin": "^5.10.2", + "@slickgrid-universal/rxjs-observable": "^5.10.2", + "@slickgrid-universal/text-export": "^5.10.2", "aurelia": "^2.0.0-beta.22", "aurelia-slickgrid": "workspace:*", "bootstrap": "^5.3.3", - "i18next": "^23.16.5", + "i18next": "^23.16.8", "i18next-fetch-backend": "^6.0.0", "rxjs": "^7.8.1" }, diff --git a/test/cypress/e2e/example10.cy.ts b/test/cypress/e2e/example10.cy.ts index a0ea1844d..ac4f6110b 100644 --- a/test/cypress/e2e/example10.cy.ts +++ b/test/cypress/e2e/example10.cy.ts @@ -596,7 +596,13 @@ describe('Example 10 - Multiple Grids with Row Selection', () => { cy.window().then((win) => { expect(win.console.log).to.be.calledWith('Grid State changed:: ', { newValues: { gridRowIndexes: [1, 0], dataContextIds: [1, 12, 13, 3, 522], filteredDataContextIds: [3, 13] }, type: 'rowSelection' }); - expect(win.console.log).to.be.calledWith('Grid State changed:: ', { newValues: [{ columnId: 'title', operator: 'Contains', searchTerms: ['3'], targetSelector: 'input.form-control.filter-title.search-filter.filled' }], type: 'filter' }); + expect(win.console.log).to.be.calledWith('Grid State changed:: ', { + newValues: [{ + columnId: 'title', operator: 'Contains', searchTerms: ['3'], + targetSelector: 'input.form-control.filter-title.search-filter.slick-filter.filled' + }], + type: 'filter' + }); }); }); @@ -681,7 +687,13 @@ describe('Example 10 - Multiple Grids with Row Selection', () => { cy.window().then((win) => { expect(win.console.log).to.have.callCount(4); expect(win.console.log).to.be.calledWith('Grid State changed:: ', { newValues: { gridRowIndexes: [1, 0], dataContextIds: [1, 12, 13, 3, 522], filteredDataContextIds: [3, 13] }, type: 'rowSelection' }); - expect(win.console.log).to.be.calledWith('Grid State changed:: ', { newValues: [{ columnId: 'title', operator: 'Contains', searchTerms: ['3'], targetSelector: 'input.form-control.filter-title.search-filter.filled' }], type: 'filter' }); + expect(win.console.log).to.be.calledWith('Grid State changed:: ', { + newValues: [{ + columnId: 'title', operator: 'Contains', searchTerms: ['3'], + targetSelector: 'input.form-control.filter-title.search-filter.slick-filter.filled' + }], + type: 'filter' + }); }); }); @@ -758,7 +770,13 @@ describe('Example 10 - Multiple Grids with Row Selection', () => { cy.window().then((win) => { expect(win.console.log).to.have.callCount(4); expect(win.console.log).to.be.calledWith('Grid State changed:: ', { newValues: { gridRowIndexes: [1, 0], dataContextIds: [1, 12, 13, 3, 522], filteredDataContextIds: [3, 13] }, type: 'rowSelection' }); - expect(win.console.log).to.be.calledWith('Grid State changed:: ', { newValues: [{ columnId: 'title', operator: 'Contains', searchTerms: ['3'], targetSelector: 'input.form-control.filter-title.search-filter.filled' }], type: 'filter' }); + expect(win.console.log).to.be.calledWith('Grid State changed:: ', { + newValues: [{ + columnId: 'title', operator: 'Contains', searchTerms: ['3'], + targetSelector: 'input.form-control.filter-title.search-filter.slick-filter.filled' + }], + type: 'filter' + }); }); cy.get('@grid2') diff --git a/test/cypress/e2e/example30.cy.ts b/test/cypress/e2e/example30.cy.ts index 053531f7f..2ad7ef285 100644 --- a/test/cypress/e2e/example30.cy.ts +++ b/test/cypress/e2e/example30.cy.ts @@ -174,7 +174,7 @@ describe('Example 30 Composite Editor Modal', () => { cy.get('[data-test=undo-last-edit-btn]').click(); cy.get('.vanilla-calendar') - .should('not.exist'); + .should('not.be.visible'); cy.get('.unsaved-editable-field') .should('have.length', 11);