Skip to content

Commit

Permalink
fix: RowSpan should work with Excel Export and merge cells (#1309)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding authored Jan 25, 2025
1 parent 154240f commit b7ef2a8
Show file tree
Hide file tree
Showing 7 changed files with 351 additions and 209 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"@jest/types": "^29.6.3",
"@lerna-lite/cli": "^3.11.0",
"@lerna-lite/publish": "^3.11.0",
"@slickgrid-universal/common": "^5.12.0",
"@slickgrid-universal/common": "^5.12.1",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.10",
"conventional-changelog-conventionalcommits": "^7.0.2",
"cross-env": "^7.0.3",
"cypress": "^14.0.0",
"cypress-real-events": "^1.14.0",
"eslint": "^9.18.0",
"eslint": "^9.19.0",
"eslint-plugin-cypress": "^4.1.0",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-prefer-arrow": "^1.2.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/aurelia-slickgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
"@aurelia/runtime": "^2.0.0-beta.22",
"@aurelia/runtime-html": "^2.0.0-beta.22",
"@formkit/tempo": "^0.1.2",
"@slickgrid-universal/common": "~5.12.0",
"@slickgrid-universal/custom-footer-component": "~5.12.0",
"@slickgrid-universal/empty-warning-component": "~5.12.0",
"@slickgrid-universal/common": "~5.12.1",
"@slickgrid-universal/custom-footer-component": "~5.12.1",
"@slickgrid-universal/empty-warning-component": "~5.12.1",
"@slickgrid-universal/event-pub-sub": "~5.12.0",
"@slickgrid-universal/pagination-component": "~5.12.0",
"@slickgrid-universal/row-detail-view-plugin": "~5.12.0",
"@slickgrid-universal/pagination-component": "~5.12.1",
"@slickgrid-universal/row-detail-view-plugin": "~5.12.1",
"@slickgrid-universal/utils": "~5.12.0",
"dequal": "^2.0.3",
"sortablejs": "^1.15.6"
Expand Down
18 changes: 9 additions & 9 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"@fnando/sparkline": "^0.3.10",
"@formkit/tempo": "^0.1.2",
"@popperjs/core": "^2.11.8",
"@slickgrid-universal/common": "^5.12.0",
"@slickgrid-universal/composite-editor-component": "^5.12.0",
"@slickgrid-universal/custom-tooltip-plugin": "^5.12.0",
"@slickgrid-universal/excel-export": "^5.12.0",
"@slickgrid-universal/graphql": "^5.12.0",
"@slickgrid-universal/odata": "^5.12.0",
"@slickgrid-universal/row-detail-view-plugin": "^5.12.0",
"@slickgrid-universal/rxjs-observable": "^5.12.0",
"@slickgrid-universal/text-export": "^5.12.0",
"@slickgrid-universal/common": "^5.12.1",
"@slickgrid-universal/composite-editor-component": "^5.12.1",
"@slickgrid-universal/custom-tooltip-plugin": "^5.12.1",
"@slickgrid-universal/excel-export": "^5.12.1",
"@slickgrid-universal/graphql": "^5.12.1",
"@slickgrid-universal/odata": "^5.12.1",
"@slickgrid-universal/row-detail-view-plugin": "^5.12.1",
"@slickgrid-universal/rxjs-observable": "^5.12.1",
"@slickgrid-universal/text-export": "^5.12.1",
"aurelia": "^2.0.0-beta.22",
"aurelia-slickgrid": "workspace:*",
"bootstrap": "^5.3.3",
Expand Down
83 changes: 43 additions & 40 deletions packages/demo/src/examples/slickgrid/example43.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,50 @@ <h2>
</div>

<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-up"
click.trigger="navigateUp()"
title="from an active cell, navigate to cell above"
>
<span class="mdi mdi-chevron-down mdi-rotate-180"></span>
Navigate Up Cell
</button>
<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-down"
click.trigger="navigateDown()"
title="from an active cell, navigate to cell below"
>
<span class="mdi mdi-chevron-down"></span>
Navigate Down Cell
</button>
<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-prev"
click.trigger="navigatePrev()"
title="from an active cell, navigate to previous left cell"
>
<span class="mdi mdi-chevron-down mdi-rotate-90"></span>
Navigate to Left Cell
</button>
<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-next"
click.trigger="navigateNext()"
title="from an active cell, navigate to next right cell"
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-up"
click.trigger="navigateUp()"
title="from an active cell, navigate to cell above"
>
<span class="mdi mdi-chevron-down mdi-rotate-180"></span>
Navigate Up Cell
</button>
<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-down"
click.trigger="navigateDown()"
title="from an active cell, navigate to cell below"
>
<span class="mdi mdi-chevron-down"></span>
Navigate Down Cell
</button>
<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-prev"
click.trigger="navigatePrev()"
title="from an active cell, navigate to previous left cell"
>
<span class="mdi mdi-chevron-down mdi-rotate-90"></span>
Navigate to Left Cell
</button>
<button
class="ms-1 btn btn-outline-secondary btn-sm btn-icon"
data-test="goto-next"
click.trigger="navigateNext()"
title="from an active cell, navigate to next right cell"
>
<span class="mdi mdi-chevron-down mdi-rotate-270"></span>
Navigate to Right Cell
</button>
<button class="ms-1 btn btn-outline-secondary btn-sm btn-icon mx-1" click.trigger="toggleEditing()" data-test="toggle-editing">
<span class="mdi mdi-pencil-outline"></span>
<span
>Toggle Editing: <span id="isEditable" class="text-italic">${ isEditable }</span></span
>
<span class="mdi mdi-chevron-down mdi-rotate-270"></span>
Navigate to Right Cell
</button>
<button class="ms-1 btn btn-outline-secondary btn-sm btn-icon mx-1" click.trigger="toggleEditing()" data-test="toggle-editing">
<span class="mdi mdi-pencil-outline"></span>
<span
>Toggle Editing: <span id="isEditable" class="text-italic">${ isEditable }</span></span
>
</button>
</button>
<button class="btn btn-outline-secondary btn-sm btn-icon mx-1" data-test="export-excel-btn" click.trigger="exportToExcel()">
<i class="mdi mdi-file-excel-outline text-success"></i> Export to Excel
</button>

<aurelia-slickgrid
grid-id="grid43"
Expand Down
7 changes: 6 additions & 1 deletion packages/demo/src/examples/slickgrid/example43.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export class Example43 {
dataset: any[] = [];
isEditable = false;
showSubTitle = true;
excelExportService = new ExcelExportService();
metadata: ItemMetadata | Record<number, ItemMetadata> = {
// 10001: Davolio
0: {
Expand Down Expand Up @@ -154,7 +155,7 @@ export class Example43 {
enableColumnReorder: true,
enableCellRowSpan: true,
enableExcelExport: true,
externalResources: [new ExcelExportService()],
externalResources: [this.excelExportService],
enableExcelCopyBuffer: true,
autoEdit: true,
editable: false,
Expand All @@ -173,6 +174,10 @@ export class Example43 {
};
}

exportToExcel() {
this.excelExportService.exportToExcel({ filename: 'export', format: 'xlsx' });
}

navigateDown() {
this.aureliaGrid?.slickGrid?.navigateDown();
}
Expand Down
Loading

0 comments on commit b7ef2a8

Please sign in to comment.