Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

fix: registered external resouces should keep singleton ref #1320

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Discussions
- name: Questions
url: https://stackoverflow.com/search?q=slickgrid
about: Use Stack Overflow to find or ask for any related SlickGrid questions
- name: Discussions
url: https://github.com/ghiscoding/Angular-Slickgrid/discussions
about: Use GitHub discussions for message-board style questions and discussions.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@
},
"dependencies": {
"@ngx-translate/core": "^15.0.0",
"@slickgrid-universal/common": "~3.6.0",
"@slickgrid-universal/custom-footer-component": "~3.6.0",
"@slickgrid-universal/empty-warning-component": "~3.6.0",
"@slickgrid-universal/event-pub-sub": "~3.6.0",
"@slickgrid-universal/pagination-component": "~3.6.0",
"@slickgrid-universal/row-detail-view-plugin": "~3.6.0",
"@slickgrid-universal/rxjs-observable": "~3.6.0",
"@slickgrid-universal/common": "~3.7.0",
"@slickgrid-universal/custom-footer-component": "~3.7.0",
"@slickgrid-universal/empty-warning-component": "~3.7.0",
"@slickgrid-universal/event-pub-sub": "~3.7.0",
"@slickgrid-universal/pagination-component": "~3.7.0",
"@slickgrid-universal/row-detail-view-plugin": "~3.7.0",
"@slickgrid-universal/rxjs-observable": "~3.7.0",
"dequal": "^2.0.3",
"dompurify": "^3.0.6",
"rxjs": "^7.8.1",
"sortablejs": "^1.15.0"
"sortablejs": "^1.15.1"
},
"devDependencies": {
"@4tw/cypress-drag-drop": "^2.2.5",
Expand All @@ -87,25 +87,25 @@
"@ngx-translate/http-loader": "^8.0.0",
"@popperjs/core": "^2.11.8",
"@release-it/conventional-changelog": "^8.0.1",
"@slickgrid-universal/composite-editor-component": "~3.6.0",
"@slickgrid-universal/custom-tooltip-plugin": "~3.6.0",
"@slickgrid-universal/excel-export": "~3.6.0",
"@slickgrid-universal/graphql": "~3.6.0",
"@slickgrid-universal/odata": "~3.6.0",
"@slickgrid-universal/text-export": "~3.6.0",
"@slickgrid-universal/composite-editor-component": "~3.7.0",
"@slickgrid-universal/custom-tooltip-plugin": "~3.7.0",
"@slickgrid-universal/excel-export": "~3.7.0",
"@slickgrid-universal/graphql": "~3.7.0",
"@slickgrid-universal/odata": "~3.7.0",
"@slickgrid-universal/text-export": "~3.7.0",
"@types/dompurify": "^3.0.5",
"@types/flatpickr": "^3.1.2",
"@types/fnando__sparkline": "^0.3.7",
"@types/jest": "^29.5.10",
"@types/node": "^20.10.0",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.4",
"@types/sortablejs": "^1.15.7",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"bootstrap": "^5.3.2",
"copyfiles": "^2.4.1",
"custom-event-polyfill": "^1.0.7",
"cypress": "^13.6.0",
"eslint": "^8.54.0",
"cypress": "^13.6.1",
"eslint": "^8.55.0",
"fetch-jsonp": "^1.3.0",
"font-awesome": "^4.7.0",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-clientside.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class GridClientSideComponent implements OnInit {
{ columnId: 'complete', direction: 'ASC' }
],
},
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],
};

// mock a dataset
Expand Down
4 changes: 2 additions & 2 deletions src/app/examples/grid-colspan.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class GridColspanComponent implements OnInit {
excelExportOptions: {
exportWithFormatter: false
},
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],
};

this.dataset1 = this.getData(500);
Expand Down Expand Up @@ -100,7 +100,7 @@ export class GridColspanComponent implements OnInit {
excelExportOptions: {
exportWithFormatter: false
},
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],
};

this.dataset2 = this.getData(500);
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-composite-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export class GridCompositeEditorComponent implements OnInit {
excelExportOptions: {
exportWithFormatter: false
},
registerExternalResources: [new ExcelExportService(), this.compositeEditorInstance],
externalResources: [new ExcelExportService(), this.compositeEditorInstance],
enableFiltering: true,
rowSelectionOptions: {
// True (Single Selection), False (Multiple Selections)
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-contextmenu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export class GridContextMenuComponent implements OnInit, OnDestroy {
columnHeaderStyle: { font: { bold: true, italic: true } }
},
i18n: this.translate,
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],

enableContextMenu: true,
enableCellMenu: true,
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-custom-tooltip.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export class GridCustomTooltipComponent implements OnInit {
exportWithFormatter: true
},
// Custom Tooltip options can be defined in a Column or Grid Options or a mixed of both (first options found wins)
registerExternalResources: [new SlickCustomTooltip(), new ExcelExportService()],
externalResources: [new SlickCustomTooltip(), new ExcelExportService()],
customTooltip: {
formatter: this.tooltipFormatter.bind(this) as Formatter,
headerFormatter: this.headerFormatter,
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-draggrouping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export class GridDraggableGroupingComponent implements OnInit {
enableTextExport: true,
enableExcelExport: true,
excelExportOptions: { sanitizeDataExport: true },
registerExternalResources: [this.excelExportService, this.textExportService],
externalResources: [this.excelExportService, this.textExportService],
};

this.loadData(500);
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-graphql.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export class GridGraphqlComponent implements OnInit, OnDestroy {
setTimeout(() => {
this.graphqlQuery = this.angularGrid.backendService!.buildQuery();
if (this.isWithCursor) {
// When using cursor pagination, the pagination service needs to updated with the PageInfo data from the latest request
// When using cursor pagination, the pagination service needs to be updated with the PageInfo data from the latest request
// This might be done automatically if using a framework specific slickgrid library
// Note because of this timeout, this may cause race conditions with rapid clicks!
this.angularGrid?.paginationService?.setCursorPageInfo((mockedResult.data[GRAPHQL_QUERY_DATASET_NAME].pageInfo));
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-grouping.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class GridGroupingComponent implements OnInit {
},
excelExportOptions: { sanitizeDataExport: true },
textExportOptions: { sanitizeDataExport: true },
registerExternalResources: [this.excelExportService, this.textExportService],
externalResources: [this.excelExportService, this.textExportService],
};

this.loadData(500);
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-localization.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class GridLocalizationComponent implements OnInit, OnDestroy {
exportWithFormatter: true,
sanitizeDataExport: true
},
registerExternalResources: [this.excelExportService, this.textExportService],
externalResources: [this.excelExportService, this.textExportService],
};

this.loadData(NB_ITEMS);
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-range.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class GridRangeComponent implements OnInit, OnDestroy {
{ columnId: 'duration', direction: 'ASC' },
],
},
registerExternalResources: [new SlickCustomTooltip(), new ExcelExportService()],
externalResources: [new SlickCustomTooltip(), new ExcelExportService()],
};

// mock a dataset
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-resize-by-content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export class GridResizeByContentComponent implements OnInit {
excelExportOptions: {
exportWithFormatter: false
},
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],
enableFiltering: true,
enableRowSelection: true,
enableCheckboxSelector: true,
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-tree-data-hierarchical.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class GridTreeDataHierarchicalComponent implements OnInit {
exportWithFormatter: true,
sanitizeDataExport: true
},
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],
enableFiltering: true,
enableTreeData: true, // you must enable this flag for the filtering & sorting to work as expected
multiColumnSort: false, // multi-column sorting is not supported with Tree Data, so you need to disable it
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-tree-data-parent-child.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class GridTreeDataParentChildComponent implements OnInit {
enableAutoResize: true,
enableExcelExport: true,
excelExportOptions: { exportWithFormatter: true, sanitizeDataExport: true },
registerExternalResources: [new ExcelExportService()],
externalResources: [new ExcelExportService()],
enableFiltering: true,
showCustomFooter: true, // display some metrics in the bottom custom footer
enableTreeData: true, // you must enable this flag for the filtering & sorting to work as expected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,8 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
const sortServiceSpy = jest.spyOn(sortServiceStub, 'addRxJsResource');
const paginationServiceSpy = jest.spyOn(paginationServiceStub, 'addRxJsResource');

component.gridOptions = { registerExternalResources: [rxjsMock] } as unknown as GridOption;
component.gridOptions = { externalResources: [rxjsMock] } as unknown as GridOption;
component.registerExternalResources([rxjsMock], true);
component.initialization(slickEventHandler);

expect(backendUtilitySpy).toHaveBeenCalled();
Expand Down Expand Up @@ -1253,7 +1254,8 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
jest.spyOn((component.gridOptions as any).backendServiceApi.service, 'buildQuery').mockReturnValue(query);
const backendExecuteSpy = jest.spyOn(backendUtilityServiceStub, 'executeBackendProcessesCallback');

component.gridOptions.registerExternalResources = [rxjsMock];
component.gridOptions.externalResources = [rxjsMock];
component.registerExternalResources([rxjsMock], true);
component.gridOptions.backendServiceApi!.service.options = { executeProcessCommandOnInit: true };
component.initialization(slickEventHandler);

Expand Down Expand Up @@ -1328,7 +1330,9 @@ describe('Angular-Slickgrid Custom Component instantiated via Constructor', () =
jest.spyOn(component.gridOptions.backendServiceApi!.service, 'buildQuery').mockReturnValue(query);
const backendErrorSpy = jest.spyOn(backendUtilityServiceStub, 'onBackendError');

component.gridOptions.registerExternalResources = [rxjsMock];
component.gridOptions.externalResources = [rxjsMock];
component.resetExternalResources();
component.registerExternalResources([rxjsMock], true);
component.gridOptions.backendServiceApi!.service.options = { executeProcessCommandOnInit: true };
component.initialization(slickEventHandler);

Expand Down
Loading