From 2f8d0b764a957ad8c11cd1088fad5e0670aa1731 Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Thu, 30 May 2024 23:35:05 +0200 Subject: [PATCH] feat: updated handsontable to v14 --- .gitignore | 2 +- client/package-lock.json | 52 +++++++++++++------ client/package.json | 5 +- client/src/app/editor/editor.component.ts | 4 +- .../shared/viewboxes/viewboxes.component.ts | 4 +- 5 files changed, 43 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 459723a..ae6a92f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ client/cypress/screenshots client/cypress/results client/cypress/videos client/documentation -client/sheet-crypto* +client/**/sheet-crypto.tgz client/.nx cypress.env.json sasjsbuild diff --git a/client/package-lock.json b/client/package-lock.json index a410c50..1407f1e 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -20,9 +20,10 @@ "@clr/angular": "^17.0.1", "@clr/icons": "^13.0.2", "@clr/ui": "^17.0.1", - "@handsontable/angular": "^13.1.0", + "@handsontable/angular": "^14.3.0", "@sasjs/adapter": "4.10.2", "@sasjs/utils": "^3.4.0", + "@sheet/crypto": "file:libraries/sheet-crypto.tgz", "@types/d3-graphviz": "^2.6.7", "@types/text-encoding": "0.0.35", "base64-arraybuffer": "^0.2.0", @@ -31,7 +32,7 @@ "crypto-js": "^4.2.0", "d3-graphviz": "^5.0.2", "fs-extra": "^7.0.1", - "handsontable": "^13.1.0", + "handsontable": "^14.3.0", "https-browserify": "1.0.0", "hyperformula": "^2.5.0", "iconv-lite": "^0.5.0", @@ -4390,11 +4391,11 @@ "dev": true }, "node_modules/@handsontable/angular": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@handsontable/angular/-/angular-13.1.0.tgz", - "integrity": "sha512-FPU0pPFSG2R8uCk6DjdY8hcCNi+i1cfhe7qkbZfXfJz8EOtF30WN+8QBYO3rza+EOfWJ/7VKExj4Eui+ezXmOQ==", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/@handsontable/angular/-/angular-14.3.0.tgz", + "integrity": "sha512-Tdea1fKgQY1DG1upr2I8AlzbYg+kvI4sw4FU/dwWCgKKUkArAT8bW2aOhZMh55CYLJksLFTgCtPSQQMuSeR39g==", "optionalDependencies": { - "tslib": "^2.2.0" + "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": ">=12.0.0", @@ -4405,9 +4406,14 @@ "@angular/platform-browser": ">=12.0.0", "@angular/platform-browser-dynamic": ">=12.0.0", "@angular/router": ">=12.0.0", - "handsontable": "^13.0.0" + "handsontable": "^14.0.0" } }, + "node_modules/@handsontable/pikaday": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@handsontable/pikaday/-/pikaday-1.0.0.tgz", + "integrity": "sha512-1VN6N38t5/DcjJ7y7XUYrDx1LuzvvzlrFdBdMG90Qo1xc8+LXHqbWbsTEm5Ec5gXTEbDEO53vUT35R+2COmOyg==" + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -5656,6 +5662,17 @@ "yarn": ">= 1.13.0" } }, + "node_modules/@sheet/crypto": { + "version": "1.20211122.1", + "resolved": "file:libraries/sheet-crypto.tgz", + "integrity": "sha512-G3/HWyzFUYbbVQoQIa+KSeMOhFnK492Ep595FXbzWN9IGZSwuvFl4saEyMl8R8pE2Al5YgSZuR9MpDpx3f7Izg==", + "bin": { + "xlsx": "bin/xlsx.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/@sideway/address": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", @@ -9916,9 +9933,9 @@ } }, "node_modules/dompurify": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.2.tgz", - "integrity": "sha512-5vSyvxRAb45EoWwAktUT3AYqAwXK4FL7si22Cgj46U6ICsj/YJczCN+Bk7WNABIQmpWRymGfslMhrRUZkQNnqA==" + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.5.4.tgz", + "integrity": "sha512-l5NNozANzaLPPe0XaAwvg3uZcHtDBnziX/HjsY1UcDj1MxTK8Dd0Kv096jyPK5HRzs/XM5IMj20dW8Fk+HnbUA==" }, "node_modules/domutils": { "version": "3.1.0", @@ -11898,10 +11915,11 @@ } }, "node_modules/handsontable": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/handsontable/-/handsontable-13.1.0.tgz", - "integrity": "sha512-KqJtS3rJeOWsFWCffnDlM8fcLMTqmW+Vbc7OCVM4X7dYDpfefgFerjNLIxLfT9xohcQoUOS1jcvXwV8dwSppVQ==", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/handsontable/-/handsontable-14.3.0.tgz", + "integrity": "sha512-XRKivPK+DkxWTYr+H6ywwLhSn/B5WMj3F3whF7O+Mo6Edm35rF8ydOm6oxVuVWnkvvy4FLqch7wgQk2w6hC8VA==", "dependencies": { + "@handsontable/pikaday": "^1.0.0", "@types/pikaday": "1.7.4", "core-js": "^3.31.1", "dompurify": "^2.1.1", @@ -11910,13 +11928,13 @@ "pikaday": "1.8.2" }, "optionalDependencies": { - "hyperformula": "^2.4.0" + "hyperformula": "^2.6.2" } }, "node_modules/handsontable/node_modules/core-js": { - "version": "3.37.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz", - "integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==", + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.1.tgz", + "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==", "hasInstallScript": true, "funding": { "type": "opencollective", diff --git a/client/package.json b/client/package.json index 51b7f60..3eca9b5 100644 --- a/client/package.json +++ b/client/package.json @@ -48,9 +48,10 @@ "@clr/angular": "^17.0.1", "@clr/icons": "^13.0.2", "@clr/ui": "^17.0.1", - "@handsontable/angular": "^13.1.0", + "@handsontable/angular": "^14.3.0", "@sasjs/adapter": "4.10.2", "@sasjs/utils": "^3.4.0", + "@sheet/crypto": "file:libraries/sheet-crypto.tgz", "@types/d3-graphviz": "^2.6.7", "@types/text-encoding": "0.0.35", "base64-arraybuffer": "^0.2.0", @@ -59,7 +60,7 @@ "crypto-js": "^4.2.0", "d3-graphviz": "^5.0.2", "fs-extra": "^7.0.1", - "handsontable": "^13.1.0", + "handsontable": "^14.3.0", "https-browserify": "1.0.0", "hyperformula": "^2.5.0", "iconv-lite": "^0.5.0", diff --git a/client/src/app/editor/editor.component.ts b/client/src/app/editor/editor.component.ts index e9d1d99..c004a92 100644 --- a/client/src/app/editor/editor.component.ts +++ b/client/src/app/editor/editor.component.ts @@ -2044,7 +2044,7 @@ export class EditorComponent implements OnInit, AfterViewInit { (el: DynamicExtendedCellValidation) => el.DISPLAY_TYPE === 'C' ? el.RAW_VALUE_CHAR : el.RAW_VALUE_NUM ) - const cellCol = hot.propToCol(cell) + const cellCol = hot.propToCol(cell) as number const dynamicValidationEl = this.disabledBasicDynamicCellValidationMap.find( (x) => x.row === row && x.col === cellCol @@ -3363,7 +3363,7 @@ export class EditorComponent implements OnInit, AfterViewInit { const row = source[0][0] const colProp = source[0][1] - const col = hot.propToCol(colProp) + const col = hot.propToCol(colProp) as number // On edit we enabled filter for this cell, now when editing is finished // We want filter to be disabled again, to be ready for next dropdown opening. diff --git a/client/src/app/shared/viewboxes/viewboxes.component.ts b/client/src/app/shared/viewboxes/viewboxes.component.ts index 9566441..94b1a1e 100644 --- a/client/src/app/shared/viewboxes/viewboxes.component.ts +++ b/client/src/app/shared/viewboxes/viewboxes.component.ts @@ -1076,7 +1076,7 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy { const hotInstance = this.getViewboxHotInstance(viewboxId) if (hotInstance) { - const column = hotInstance.propToCol(colProp) + const column = hotInstance.propToCol(colProp) as number const plugin = hotInstance.getPlugin('manualColumnMove') plugin.moveColumn(column, finalIndex) @@ -1141,7 +1141,7 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy { if (hotInstance) { const columns = colProps.map((prop: string) => { - return hotInstance.propToCol(prop) + return hotInstance.propToCol(prop) as number }) hotInstance.updateSettings({