From 65c1dc084242fbb307754120fc7e85c32115eebb Mon Sep 17 00:00:00 2001 From: "docs-examples-cross-repo-dispatch[bot]" <318227308+docs-examples-cross-repo-dispatch[bot]@users.noreply.github.com> Date: Fri, 9 Oct 2026 11:22:11 +0000 Subject: [PATCH] chore(docs): update versioned docs examples --- ...nus__sheets-bar__angular__example2.ts.json | 2 +- ...__sheets-bar__javascript__example2.js.json | 2 +- ...__sheets-bar__javascript__example2.ts.json | 2 +- ...enus__sheets-bar__react__example2.tsx.json | 2 +- ...-menus__sheets-bar__vue__example2.vue.json | 2 +- ...-icons-in-cells__angular__example2.ts.json | 2 +- ...ons-in-cells__javascript__example2.js.json | 2 +- ...ons-in-cells__javascript__example2.ts.json | 2 +- ...e-icons-in-cells__react__example2.tsx.json | 2 +- ...use-icons-in-cells__vue__example2.vue.json | 2 +- ..._date-cell-type__angular__example1.ts.json | 2 +- ...te-cell-type__javascript__example1.js.json | 2 +- ...te-cell-type__javascript__example1.ts.json | 2 +- ...__date-cell-type__react__example1.tsx.json | 2 +- ...es__date-cell-type__vue__example1.vue.json | 2 +- ...meric-cell-type__angular__example1.ts.json | 2 +- ...ic-cell-type__javascript__example1.js.json | 2 +- ...ic-cell-type__javascript__example1.ts.json | 2 +- ...umeric-cell-type__react__example1.tsx.json | 2 +- ..._numeric-cell-type__vue__example1.vue.json | 2 +- ..._time-cell-type__angular__example1.ts.json | 2 +- ...me-cell-type__javascript__example1.js.json | 2 +- ...me-cell-type__javascript__example1.ts.json | 2 +- ...__time-cell-type__react__example1.tsx.json | 2 +- ...es__time-cell-type__vue__example1.vue.json | 2 +- ...__column-filter__angular__example7.ts.json | 2 +- ...ascript__exampleCustomFilterButton.js.json | 2 +- ...ascript__exampleCustomFilterButton.ts.json | 2 +- ..._react__exampleCustomFilterButton.tsx.json | 2 +- ...r__vue__exampleCustomFilterButton.vue.json | 2 +- ...column-freezing__angular__example5.ts.json | 1 + ...umn-freezing__javascript__example5.js.json | 1 + ...umn-freezing__javascript__example5.ts.json | 1 + ..._column-freezing__react__example5.tsx.json | 1 + ...s__column-freezing__vue__example5.vue.json | 1 + ..._angular__example-custom-functions.ts.json | 2 +- ...ula-calculation__angular__example1.ts.json | 2 +- ...ula-calculation__angular__example2.ts.json | 2 +- ...ula-calculation__angular__example3.ts.json | 2 +- ...ula-calculation__angular__example4.ts.json | 2 +- ...vascript__example-custom-functions.js.json | 2 +- ...vascript__example-custom-functions.ts.json | 2 +- ...ion__javascript__example-data-grid.js.json | 2 +- ...ion__javascript__example-data-grid.ts.json | 2 +- ...script__example-named-expressions1.js.json | 2 +- ...script__example-named-expressions1.ts.json | 2 +- ...script__example-named-expressions2.js.json | 2 +- ...script__example-named-expressions2.ts.json | 2 +- ...-calculation__javascript__example1.js.json | 2 +- ...-calculation__javascript__example1.ts.json | 2 +- ...__react__example-custom-functions.tsx.json | 2 +- ...ulation__react__example-data-grid.tsx.json | 2 +- ...react__example-named-expressions1.tsx.json | 2 +- ...react__example-named-expressions2.tsx.json | 2 +- ...mula-calculation__react__example1.tsx.json | 2 +- ...on__vue__example-custom-functions.vue.json | 2 +- ...lculation__vue__example-data-grid.vue.json | 2 +- ...__vue__example-named-expressions1.vue.json | 2 +- ...__vue__example-named-expressions2.vue.json | 2 +- ...ormula-calculation__vue__example1.vue.json | 2 +- ...s__rows-sorting__angular__example6.ts.json | 2 +- ...s__rows-sorting__angular__example7.ts.json | 2 +- ...javascript__exampleCustomSortIcons.js.json | 2 +- ...javascript__exampleCustomSortIcons.ts.json | 2 +- ...avascript__exampleCustomSortIcons3.js.json | 2 +- ...avascript__exampleCustomSortIcons3.ts.json | 2 +- ...ng__react__exampleCustomSortIcons.tsx.json | 2 +- ...g__react__exampleCustomSortIcons3.tsx.json | 2 +- ...ting__vue__exampleCustomSortIcons.vue.json | 2 +- ...ing__vue__exampleCustomSortIcons3.vue.json | 2 +- .../public/docs-examples/next/manifest.json | 201 +++++++++++++++++- ...ll-types__radio__angular__example1.ts.json | 2 +- ...types__radio__javascript__example1.js.json | 2 +- ...types__radio__javascript__example1.ts.json | 2 +- ...ell-types__radio__react__example1.tsx.json | 2 +- ..._cell-types__radio__vue__example1.vue.json | 2 +- ...mport-csv-excel__angular__example1.ts.json | 2 +- ...rt-csv-excel__javascript__example1.ts.json | 2 +- ...__import-csv-excel__vue__example1.vue.json | 2 +- ...-columns-jev__javascript__example1.js.json | 1 + ...-columns-jev__javascript__example1.ts.json | 1 + ...s__tabler-icons__angular__example1.ts.json | 1 + ...tabler-icons__javascript__example1.js.json | 1 + ...tabler-icons__javascript__example1.ts.json | 1 + ...es__tabler-icons__react__example1.tsx.json | 1 + ...emes__tabler-icons__vue__example1.vue.json | 1 + .../api/src/docs-taxonomy.generated.ts | 22 +- 87 files changed, 306 insertions(+), 75 deletions(-) create mode 100644 runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__angular__example5.ts.json create mode 100644 runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.js.json create mode 100644 runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.ts.json create mode 100644 runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__react__example5.tsx.json create mode 100644 runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__vue__example5.vue.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.js.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.ts.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__angular__example1.ts.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.js.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.ts.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__react__example1.tsx.json create mode 100644 runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__vue__example1.vue.json diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__angular__example2.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__angular__example2.ts.json index 5296fe734..5389c3939 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__angular__example2.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__angular__example2.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.4.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { HyperFormula } from 'hyperformula';\n\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\n\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\n\n@Component({\n selector: 'app-example2',\n standalone: true,\n imports: [HotTableModule],\n template: `\n \n \n `,\n})\nexport class AppComponent {\n\n readonly hotSettings: GridSettings = {\n sheetsBar: {\n sheets: [\n {\n name: 'Budget',\n data: [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n ],\n settings: {\n colHeaders: ['Item • A', 'Net • B', 'VAT • C', 'Fee • D', 'Gross • E'],\n formulas: { engine, sheetName: 'Budget' },\n },\n },\n {\n name: 'Rates',\n data: ratesData,\n settings: {\n colHeaders: ['Rate • A', 'Value • B'],\n formulas: { engine, sheetName: 'Rates' },\n },\n },\n ],\n activeSheet: 0,\n },\n rowHeaders: true,\n colHeaders: true,\n stretchH: 'all',\n height: 240,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/accessories-and-menus/sheets-bar/angular/example2.ts","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"Angular"} +{"framework":"angular","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.5.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { HyperFormula } from 'hyperformula';\n\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\n\n@Component({\n selector: 'app-example2',\n standalone: true,\n imports: [HotTableModule],\n template: `\n \n \n `,\n})\nexport class AppComponent {\n\n readonly hotSettings: GridSettings = {\n sheetsBar: {\n sheets: [\n {\n name: 'Budget',\n data: [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n ],\n settings: {\n colHeaders: ['Item • A', 'Net • B', 'VAT • C', 'Fee • D', 'Gross • E'],\n formulas: { engine, sheetName: 'Budget' },\n },\n },\n {\n name: 'Rates',\n data: ratesData,\n settings: {\n colHeaders: ['Rate • A', 'Value • B'],\n formulas: { engine, sheetName: 'Rates' },\n },\n },\n ],\n activeSheet: 0,\n },\n rowHeaders: true,\n colHeaders: true,\n stretchH: 'all',\n height: 240,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/accessories-and-menus/sheets-bar/angular/example2.ts","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.js.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.js.json index e824df916..afbe0ba96 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n// Register all Handsontable's modules.\nregisterAllModules();\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\nconst container = document.querySelector('#example2');\nnew Handsontable(container, {\n sheetsBar: {\n sheets: [\n {\n name: 'Budget',\n data: [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n ],\n settings: {\n colHeaders: ['Item • A', 'Net • B', 'VAT • C', 'Fee • D', 'Gross • E'],\n formulas: { engine, sheetName: 'Budget' },\n },\n },\n {\n name: 'Rates',\n data: ratesData,\n settings: {\n colHeaders: ['Rate • A', 'Value • B'],\n formulas: { engine, sheetName: 'Rates' },\n },\n },\n ],\n activeSheet: 0,\n },\n rowHeaders: true,\n colHeaders: true,\n stretchH: 'all',\n height: 240,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/accessories-and-menus/sheets-bar/javascript/example2.js","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"JavaScript"} +{"framework":"javascript","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n// Register all Handsontable's modules.\nregisterAllModules();\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\nconst container = document.querySelector('#example2');\nnew Handsontable(container, {\n sheetsBar: {\n sheets: [\n {\n name: 'Budget',\n data: [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n ],\n settings: {\n colHeaders: ['Item • A', 'Net • B', 'VAT • C', 'Fee • D', 'Gross • E'],\n formulas: { engine, sheetName: 'Budget' },\n },\n },\n {\n name: 'Rates',\n data: ratesData,\n settings: {\n colHeaders: ['Rate • A', 'Value • B'],\n formulas: { engine, sheetName: 'Rates' },\n },\n },\n ],\n activeSheet: 0,\n },\n rowHeaders: true,\n colHeaders: true,\n stretchH: 'all',\n height: 240,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/accessories-and-menus/sheets-bar/javascript/example2.js","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.ts.json index e03342018..5a4294318 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__javascript__example2.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\n\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\n\nconst container = document.querySelector('#example2')!;\n\nnew Handsontable(container, {\n sheetsBar: {\n sheets: [\n {\n name: 'Budget',\n data: [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n ],\n settings: {\n colHeaders: ['Item • A', 'Net • B', 'VAT • C', 'Fee • D', 'Gross • E'],\n formulas: { engine, sheetName: 'Budget' },\n },\n },\n {\n name: 'Rates',\n data: ratesData,\n settings: {\n colHeaders: ['Rate • A', 'Value • B'],\n formulas: { engine, sheetName: 'Rates' },\n },\n },\n ],\n activeSheet: 0,\n },\n rowHeaders: true,\n colHeaders: true,\n stretchH: 'all',\n height: 240,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/accessories-and-menus/sheets-bar/javascript/example2.ts","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"TypeScript"} +{"framework":"typescript","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\n\nconst container = document.querySelector('#example2')!;\n\nnew Handsontable(container, {\n sheetsBar: {\n sheets: [\n {\n name: 'Budget',\n data: [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n ],\n settings: {\n colHeaders: ['Item • A', 'Net • B', 'VAT • C', 'Fee • D', 'Gross • E'],\n formulas: { engine, sheetName: 'Budget' },\n },\n },\n {\n name: 'Rates',\n data: ratesData,\n settings: {\n colHeaders: ['Rate • A', 'Value • B'],\n formulas: { engine, sheetName: 'Rates' },\n },\n },\n ],\n activeSheet: 0,\n },\n rowHeaders: true,\n colHeaders: true,\n stretchH: 'all',\n height: 240,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/accessories-and-menus/sheets-bar/javascript/example2.ts","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__react__example2.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__react__example2.tsx.json index c69347314..b5cef92b3 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__react__example2.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__react__example2.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example2\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// register Handsontable's modules\nregisterAllModules();\n\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\n\nconst budgetData = [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n];\n\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/accessories-and-menus/sheets-bar/react/example2.tsx","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"React (TS)"} +{"framework":"react","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example2\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// register Handsontable's modules\nregisterAllModules();\n\n// One engine, shared by every sheet of the workbook.\nconst engine = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nconst budgetData = [\n ['Laptops', 4200, '=B1*Rates!B1', '=B1*Rates!B2', '=B1+C1+D1'],\n ['Desks', 1200, '=B2*Rates!B1', '=B2*Rates!B2', '=B2+C2+D2'],\n ['Monitors', 2600, '=B3*Rates!B1', '=B3*Rates!B2', '=B3+C3+D3'],\n ['Chairs', 950, '=B4*Rates!B1', '=B4*Rates!B2', '=B4+C4+D4'],\n ['Docking stations', 780, '=B5*Rates!B1', '=B5*Rates!B2', '=B5+C5+D5'],\n ['Total', '=SUM(B1:B5)', '=SUM(C1:C5)', '=SUM(D1:D5)', '=SUM(E1:E5)'],\n];\n\nconst ratesData = [\n ['VAT rate', 0.23],\n ['Service fee', 0.05],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/accessories-and-menus/sheets-bar/react/example2.tsx","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__vue__example2.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__vue__example2.vue.json index 0e945f8be..1e9d3ad21 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__vue__example2.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__sheets-bar__vue__example2.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example2\");","/src/App.vue":"\n\n"},"docsPath":"guides/accessories-and-menus/sheets-bar/vue/example2.vue","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"Vue 3"} +{"framework":"vue","displayName":"Accessories And Menus ▸ Sheets bar · Use formulas across sheets · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example2\");","/src/App.vue":"\n\n"},"docsPath":"guides/accessories-and-menus/sheets-bar/vue/example2.vue","breadcrumb":["Accessories And Menus","Sheets bar"],"guide":"guides/accessories-and-menus/sheets-bar/sheets-bar.md","guideTitle":"Sheets bar","exampleId":"example2","exampleTitle":"Use formulas across sheets","docPermalink":"/sheets-bar","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__angular__example2.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__angular__example2.ts.json index 060d391f2..0904e5ca2 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__angular__example2.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__angular__example2.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"@lucide/angular\": \"1.52.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { GridSettings, HotCellRendererComponent, HotTableModule } from '@handsontable/angular-wrapper';\nimport { LucideFlag, LucideFlagOff } from '@lucide/angular';\n\ninterface Task {\n task: string;\n assignee: string;\n dueDate: string;\n flagged: boolean;\n}\n\n// A renderer component receives the cell's value and coordinates, so the\n// Lucide icon goes in the template. No `data-lucide` placeholder and no\n// `createIcons()` scan - Angular renders the `` itself.\n@Component({\n selector: 'app-flag-renderer',\n standalone: true,\n imports: [LucideFlag, LucideFlagOff],\n // Each icon is its own standalone component, applied as an attribute on an\n // `` element. The icon has no accessible name, so the button carries an\n // `aria-label` that describes what clicking it does. `currentColor` is\n // Lucide's default stroke, so the icon stays visible in both themes.\n template: `\n \n @if (value) {\n \n } @else {\n \n }\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlagRendererComponent extends HotCellRendererComponent {\n get label(): string {\n const taskName = String(this.instance.getDataAtCell(this.row, 0));\n\n return this.value\n ? `Remove the follow-up flag from ${taskName}`\n : `Flag ${taskName} for follow-up`;\n }\n\n toggle(): void {\n this.instance.setDataAtCell(this.row, 3, !this.value);\n }\n}\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example2',\n template: `\n \n `,\n})\nexport class AppComponent {\n readonly data: Task[] = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Task', 'Assignee', 'Due date', 'Flagged'],\n columns: [\n { data: 'task' },\n { data: 'assignee' },\n { data: 'dueDate', type: 'date', dateFormat: { year: 'numeric', month: '2-digit', day: '2-digit' } },\n { data: 'flagged', renderer: FlagRendererComponent, className: 'htCenter' },\n ],\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/angular/example2.ts","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"Angular"} +{"framework":"angular","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"@lucide/angular\": \"1.54.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { GridSettings, HotCellRendererComponent, HotTableModule } from '@handsontable/angular-wrapper';\nimport { LucideFlag, LucideFlagOff } from '@lucide/angular';\n\ninterface Task {\n task: string;\n assignee: string;\n dueDate: string;\n flagged: boolean;\n}\n\n// A renderer component receives the cell's value and coordinates, so the\n// Lucide icon goes in the template. No `data-lucide` placeholder and no\n// `createIcons()` scan - Angular renders the `` itself.\n@Component({\n selector: 'app-flag-renderer',\n standalone: true,\n imports: [LucideFlag, LucideFlagOff],\n // Each icon is its own standalone component, applied as an attribute on an\n // `` element. The icon has no accessible name, so the button carries an\n // `aria-label` that describes what clicking it does. `currentColor` is\n // Lucide's default stroke, so the icon stays visible in both themes.\n template: `\n \n @if (value) {\n \n } @else {\n \n }\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FlagRendererComponent extends HotCellRendererComponent {\n get label(): string {\n const taskName = String(this.instance.getDataAtCell(this.row, 0));\n\n return this.value\n ? `Remove the follow-up flag from ${taskName}`\n : `Flag ${taskName} for follow-up`;\n }\n\n toggle(): void {\n this.instance.setDataAtCell(this.row, 3, !this.value);\n }\n}\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example2',\n template: `\n \n `,\n})\nexport class AppComponent {\n readonly data: Task[] = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Task', 'Assignee', 'Due date', 'Flagged'],\n columns: [\n { data: 'task' },\n { data: 'assignee' },\n { data: 'dueDate', type: 'date', dateFormat: { year: 'numeric', month: '2-digit', day: '2-digit' } },\n { data: 'flagged', renderer: FlagRendererComponent, className: 'htCenter' },\n ],\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/angular/example2.ts","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.js.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.js.json index 619d47f9a..8188cf049 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"lucide\": \"1.52.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { createIcons, Flag, FlagOff } from 'lucide';\n// Register all Handsontable's modules.\nregisterAllModules();\nconst data = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n];\n// Lucide reads a `data-lucide` placeholder and replaces it with an inline\n// ``. The renderer writes the placeholder, then triggers the swap.\nconst flagRenderer = (instance, td, row, _col, _prop, value) => {\n const taskName = String(instance.getDataAtCell(row, 0));\n const button = document.createElement('button');\n button.type = 'button';\n button.style.cssText = 'background: none; border: none; cursor: pointer; padding: 0.25rem;';\n button.innerHTML = ``;\n // The icon has no accessible name, so the button carries an `aria-label`\n // that describes what clicking it does.\n button.setAttribute('aria-label', value ? `Remove the follow-up flag from ${taskName}` : `Flag ${taskName} for follow-up`);\n button.addEventListener('click', () => {\n instance.setDataAtCell(row, 3, !value);\n });\n td.innerText = '';\n td.appendChild(button);\n // `root` scopes the scan to this cell. Without it, Lucide walks the whole\n // document on every cell render, which a grid does once per visible cell.\n // `currentColor` keeps the icon visible in both light and dark themes.\n createIcons({\n icons: { Flag, FlagOff },\n attrs: { width: '18', height: '18', stroke: 'currentColor' },\n root: td,\n });\n return td;\n};\nconst container = document.querySelector('#example2');\nnew Handsontable(container, {\n data,\n colHeaders: ['Task', 'Assignee', 'Due date', 'Flagged'],\n columns: [\n { data: 'task' },\n { data: 'assignee' },\n { data: 'dueDate', type: 'date', dateFormat: { year: 'numeric', month: '2-digit', day: '2-digit' } },\n { data: 'flagged', renderer: flagRenderer, className: 'htCenter' },\n ],\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/javascript/example2.js","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"JavaScript"} +{"framework":"javascript","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"lucide\": \"1.54.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { createIcons, Flag, FlagOff } from 'lucide';\n// Register all Handsontable's modules.\nregisterAllModules();\nconst data = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n];\n// Lucide reads a `data-lucide` placeholder and replaces it with an inline\n// ``. The renderer writes the placeholder, then triggers the swap.\nconst flagRenderer = (instance, td, row, _col, _prop, value) => {\n const taskName = String(instance.getDataAtCell(row, 0));\n const button = document.createElement('button');\n button.type = 'button';\n button.style.cssText = 'background: none; border: none; cursor: pointer; padding: 0.25rem;';\n button.innerHTML = ``;\n // The icon has no accessible name, so the button carries an `aria-label`\n // that describes what clicking it does.\n button.setAttribute('aria-label', value ? `Remove the follow-up flag from ${taskName}` : `Flag ${taskName} for follow-up`);\n button.addEventListener('click', () => {\n instance.setDataAtCell(row, 3, !value);\n });\n td.innerText = '';\n td.appendChild(button);\n // `root` scopes the scan to this cell. Without it, Lucide walks the whole\n // document on every cell render, which a grid does once per visible cell.\n // `currentColor` keeps the icon visible in both light and dark themes.\n createIcons({\n icons: { Flag, FlagOff },\n attrs: { width: '18', height: '18', stroke: 'currentColor' },\n root: td,\n });\n return td;\n};\nconst container = document.querySelector('#example2');\nnew Handsontable(container, {\n data,\n colHeaders: ['Task', 'Assignee', 'Due date', 'Flagged'],\n columns: [\n { data: 'task' },\n { data: 'assignee' },\n { data: 'dueDate', type: 'date', dateFormat: { year: 'numeric', month: '2-digit', day: '2-digit' } },\n { data: 'flagged', renderer: flagRenderer, className: 'htCenter' },\n ],\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/javascript/example2.js","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.ts.json index 1225d10be..64c68d39d 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__javascript__example2.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"lucide\": \"1.52.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport type { BaseRenderer } from 'handsontable/renderers';\nimport { createIcons, Flag, FlagOff } from 'lucide';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\ninterface Task {\n task: string;\n assignee: string;\n dueDate: string;\n flagged: boolean;\n}\n\nconst data: Task[] = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n];\n\n// Lucide reads a `data-lucide` placeholder and replaces it with an inline\n// ``. The renderer writes the placeholder, then triggers the swap.\nconst flagRenderer: BaseRenderer = (instance, td, row, _col, _prop, value) => {\n const taskName = String(instance.getDataAtCell(row, 0));\n const button = document.createElement('button');\n\n button.type = 'button';\n button.style.cssText = 'background: none; border: none; cursor: pointer; padding: 0.25rem;';\n button.innerHTML = ``;\n // The icon has no accessible name, so the button carries an `aria-label`\n // that describes what clicking it does.\n button.setAttribute(\n 'aria-label',\n value ? `Remove the follow-up flag from ${taskName}` : `Flag ${taskName} for follow-up`\n );\n button.addEventListener('click', () => {\n instance.setDataAtCell(row, 3, !value);\n });\n\n td.innerText = '';\n td.appendChild(button);\n\n // `root` scopes the scan to this cell. Without it, Lucide walks the whole\n // document on every cell render, which a grid does once per visible cell.\n // `currentColor` keeps the icon visible in both light and dark themes.\n createIcons({\n icons: { Flag, FlagOff },\n attrs: { width: '18', height: '18', stroke: 'currentColor' },\n root: td,\n });\n\n return td;\n};\n\nconst container = document.querySelector('#example2')!;\n\nnew Handsontable(container, {\n data,\n colHeaders: ['Task', 'Assignee', 'Due date', 'Flagged'],\n columns: [\n { data: 'task' },\n { data: 'assignee' },\n { data: 'dueDate', type: 'date', dateFormat: { year: 'numeric', month: '2-digit', day: '2-digit' } },\n { data: 'flagged', renderer: flagRenderer, className: 'htCenter' },\n ],\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/javascript/example2.ts","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"TypeScript"} +{"framework":"typescript","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"lucide\": \"1.54.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport type { BaseRenderer } from 'handsontable/renderers';\nimport { createIcons, Flag, FlagOff } from 'lucide';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\ninterface Task {\n task: string;\n assignee: string;\n dueDate: string;\n flagged: boolean;\n}\n\nconst data: Task[] = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n];\n\n// Lucide reads a `data-lucide` placeholder and replaces it with an inline\n// ``. The renderer writes the placeholder, then triggers the swap.\nconst flagRenderer: BaseRenderer = (instance, td, row, _col, _prop, value) => {\n const taskName = String(instance.getDataAtCell(row, 0));\n const button = document.createElement('button');\n\n button.type = 'button';\n button.style.cssText = 'background: none; border: none; cursor: pointer; padding: 0.25rem;';\n button.innerHTML = ``;\n // The icon has no accessible name, so the button carries an `aria-label`\n // that describes what clicking it does.\n button.setAttribute(\n 'aria-label',\n value ? `Remove the follow-up flag from ${taskName}` : `Flag ${taskName} for follow-up`\n );\n button.addEventListener('click', () => {\n instance.setDataAtCell(row, 3, !value);\n });\n\n td.innerText = '';\n td.appendChild(button);\n\n // `root` scopes the scan to this cell. Without it, Lucide walks the whole\n // document on every cell render, which a grid does once per visible cell.\n // `currentColor` keeps the icon visible in both light and dark themes.\n createIcons({\n icons: { Flag, FlagOff },\n attrs: { width: '18', height: '18', stroke: 'currentColor' },\n root: td,\n });\n\n return td;\n};\n\nconst container = document.querySelector('#example2')!;\n\nnew Handsontable(container, {\n data,\n colHeaders: ['Task', 'Assignee', 'Due date', 'Flagged'],\n columns: [\n { data: 'task' },\n { data: 'assignee' },\n { data: 'dueDate', type: 'date', dateFormat: { year: 'numeric', month: '2-digit', day: '2-digit' } },\n { data: 'flagged', renderer: flagRenderer, className: 'htCenter' },\n ],\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/javascript/example2.ts","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__react__example2.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__react__example2.tsx.json index 973c2e107..feaf0fcab 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__react__example2.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__react__example2.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"lucide-react\": \"1.52.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example2\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable, HotColumn, HotRendererProps } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { Flag, FlagOff } from 'lucide-react';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\ninterface Task {\n task: string;\n assignee: string;\n dueDate: string;\n flagged: boolean;\n}\n\nconst data: Task[] = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n];\n\n// A renderer component receives the cell's value and coordinates, so the\n// Lucide icon goes in as JSX. No `data-lucide` placeholder and no\n// `createIcons()` scan - React renders the `` itself.\n//\n// Pass a renderer component through ``, not through\n// a `renderer` key in the `columns` array. Only the prop is wrapped for React;\n// a component in `columns` reaches the grid as a plain renderer function and\n// is called with `(instance, TD, row, ...)` instead of a props object.\nconst FlagCell = ({ instance, row, value }: HotRendererProps) => {\n const taskName = String(instance.getDataAtCell(row, 0));\n const flagged = Boolean(value);\n // The icon has no accessible name, so the button carries an `aria-label`\n // that describes what clicking it does.\n const label = flagged\n ? `Remove the follow-up flag from ${taskName}`\n : `Flag ${taskName} for follow-up`;\n\n return (\n instance.setDataAtCell(row, 3, !flagged)}\n >\n {/* `currentColor` is Lucide's default stroke, so the icon stays visible\n in both light and dark themes. */}\n {flagged ? : }\n \n );\n};\n\nconst ExampleComponent = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/react/example2.tsx","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"React (TS)"} +{"framework":"react","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"lucide-react\": \"1.54.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example2\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable, HotColumn, HotRendererProps } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { Flag, FlagOff } from 'lucide-react';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\ninterface Task {\n task: string;\n assignee: string;\n dueDate: string;\n flagged: boolean;\n}\n\nconst data: Task[] = [\n { task: 'Update API docs', assignee: 'Ana García', dueDate: '2025-06-30', flagged: true },\n { task: 'Deploy hotfix', assignee: 'James Okafor', dueDate: '2025-06-18', flagged: false },\n { task: 'Review pull request', assignee: 'Li Wei', dueDate: '2025-06-20', flagged: false },\n { task: 'Write release notes', assignee: 'Sara Nowak', dueDate: '2025-06-25', flagged: true },\n { task: 'Fix flaky test', assignee: 'Marco Rossi', dueDate: '2025-06-22', flagged: false },\n];\n\n// A renderer component receives the cell's value and coordinates, so the\n// Lucide icon goes in as JSX. No `data-lucide` placeholder and no\n// `createIcons()` scan - React renders the `` itself.\n//\n// Pass a renderer component through ``, not through\n// a `renderer` key in the `columns` array. Only the prop is wrapped for React;\n// a component in `columns` reaches the grid as a plain renderer function and\n// is called with `(instance, TD, row, ...)` instead of a props object.\nconst FlagCell = ({ instance, row, value }: HotRendererProps) => {\n const taskName = String(instance.getDataAtCell(row, 0));\n const flagged = Boolean(value);\n // The icon has no accessible name, so the button carries an `aria-label`\n // that describes what clicking it does.\n const label = flagged\n ? `Remove the follow-up flag from ${taskName}`\n : `Flag ${taskName} for follow-up`;\n\n return (\n instance.setDataAtCell(row, 3, !flagged)}\n >\n {/* `currentColor` is Lucide's default stroke, so the icon stays visible\n in both light and dark themes. */}\n {flagged ? : }\n \n );\n};\n\nconst ExampleComponent = () => {\n return (\n \n \n \n \n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/react/example2.tsx","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__vue__example2.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__vue__example2.vue.json index e37e27c4e..2558686c5 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__vue__example2.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__accessories-and-menus__use-icons-in-cells__vue__example2.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"lucide\": \"1.52.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example2\");","/src/App.vue":"\n\n"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/vue/example2.vue","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"Vue 3"} +{"framework":"vue","displayName":"Accessories And Menus ▸ How to use icons in cells · Use a third-party icon set · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"lucide\": \"1.54.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example2\");","/src/App.vue":"\n\n"},"docsPath":"guides/accessories-and-menus/use-icons-in-cells/vue/example2.vue","breadcrumb":["Accessories And Menus","How to use icons in cells"],"guide":"guides/accessories-and-menus/use-icons-in-cells/use-icons-in-cells.md","guideTitle":"How to use icons in cells","exampleId":"example2","exampleTitle":"Use a third-party icon set","docPermalink":"/use-icons-in-cells","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__angular__example1.ts.json index b86d52558..8419df2e5 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__angular__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__angular__example1.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Cell Types ▸ Date cell type · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation, HostListener, ElementRef, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\n\ninterface CarData {\n car: string;\n product_date: string;\n payment_date: string;\n registration_date: string;\n}\n\n@Component({\n selector: 'example1-date-cell-type',\n standalone: true,\n imports: [HotTableModule],\n template: `\n
\n
\n
\n \n {{ selectedLabel }}\n \n \n @if (isOpen) {\n
    \n @for (opt of localeOptions; track opt.value) {\n {{ opt.label }}\n }\n
\n }\n
\n
\n
\n
\n \n
\n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n isOpen = false;\n locale = 'en-US';\n\n readonly localeOptions = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-SP', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n ];\n\n readonly data: CarData[] = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Car', 'Product date', 'Payment date', 'Registration date'],\n locale: this.locale,\n columns: [\n {\n type: 'text',\n data: 'car',\n },\n {\n type: 'intl-date',\n data: 'product_date',\n dateFormat: { dateStyle: 'short' },\n },\n {\n type: 'intl-date',\n data: 'payment_date',\n dateFormat: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n {\n type: 'intl-date',\n data: 'registration_date',\n dateFormat: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n get selectedLabel(): string {\n return this.localeOptions.find((o) => o.value === this.locale)?.label || '';\n }\n\n private elementRef = inject(ElementRef);\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n selectLocale(value: string): void {\n this.locale = value;\n this.isOpen = false;\n this.hotTable?.hotInstance?.updateSettings({ locale: this.locale });\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.querySelector('.theme-dropdown')?.contains(event.target)) {\n this.isOpen = false;\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/cell-types/date-cell-type/angular/example1.ts","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"Angular"} +{"framework":"angular","displayName":"Cell Types ▸ Date cell type · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation, HostListener, ElementRef, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\n\ninterface CarData {\n car: string;\n product_date: string;\n payment_date: string;\n registration_date: string;\n}\n\n@Component({\n selector: 'example1-date-cell-type',\n standalone: true,\n imports: [HotTableModule],\n template: `\n
\n
\n
\n \n {{ selectedLabel }}\n \n \n @if (isOpen) {\n
    \n @for (opt of localeOptions; track opt.value) {\n {{ opt.label }}\n }\n
\n }\n
\n
\n
\n
\n \n
\n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n isOpen = false;\n locale = 'en-US';\n\n readonly localeOptions = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-Latn-RS', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n ];\n\n readonly data: CarData[] = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Car', 'Product date', 'Payment date', 'Registration date'],\n locale: this.locale,\n columns: [\n {\n type: 'text',\n data: 'car',\n },\n {\n type: 'intl-date',\n data: 'product_date',\n dateFormat: { dateStyle: 'short' },\n },\n {\n type: 'intl-date',\n data: 'payment_date',\n dateFormat: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n {\n type: 'intl-date',\n data: 'registration_date',\n dateFormat: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n get selectedLabel(): string {\n return this.localeOptions.find((o) => o.value === this.locale)?.label || '';\n }\n\n private elementRef = inject(ElementRef);\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n selectLocale(value: string): void {\n this.locale = value;\n this.isOpen = false;\n this.hotTable?.hotInstance?.updateSettings({ locale: this.locale });\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.querySelector('.theme-dropdown')?.contains(event.target)) {\n this.isOpen = false;\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/cell-types/date-cell-type/angular/example1.ts","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.js.json index 9b59b04ed..17aad9ffe 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Cell Types ▸ Date cell type · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1');\nconst dropdown = document.querySelector('#localeDropdown');\nconst trigger = document.querySelector('#localeTrigger');\nconst menu = document.querySelector('#localeMenu');\nconst label = document.querySelector('#localeLabel');\nconst data = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Product date', 'Payment date', 'Registration date'],\n columns: [\n {\n type: 'text',\n data: 'car',\n },\n {\n type: 'intl-date',\n data: 'product_date',\n dateFormat: {\n dateStyle: 'short',\n },\n },\n {\n type: 'intl-date',\n data: 'payment_date',\n dateFormat: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n {\n type: 'intl-date',\n data: 'registration_date',\n dateFormat: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = e.target.closest('li[data-value]');\n\n if (item) {\n label.textContent = item.textContent.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/cell-types/date-cell-type/javascript/example1.js","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"JavaScript"} +{"framework":"javascript","displayName":"Cell Types ▸ Date cell type · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1');\nconst dropdown = document.querySelector('#localeDropdown');\nconst trigger = document.querySelector('#localeTrigger');\nconst menu = document.querySelector('#localeMenu');\nconst label = document.querySelector('#localeLabel');\nconst data = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Product date', 'Payment date', 'Registration date'],\n columns: [\n {\n type: 'text',\n data: 'car',\n },\n {\n type: 'intl-date',\n data: 'product_date',\n dateFormat: {\n dateStyle: 'short',\n },\n },\n {\n type: 'intl-date',\n data: 'payment_date',\n dateFormat: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n {\n type: 'intl-date',\n data: 'registration_date',\n dateFormat: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = e.target.closest('li[data-value]');\n\n if (item) {\n label.textContent = item.textContent.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/cell-types/date-cell-type/javascript/example1.js","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.ts.json index f4c77c265..61c90a572 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__javascript__example1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Cell Types ▸ Date cell type · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1')!;\nconst dropdown = document.querySelector('#localeDropdown')!;\nconst trigger = document.querySelector('#localeTrigger')!;\nconst menu = document.querySelector('#localeMenu')!;\nconst label = document.querySelector('#localeLabel')!;\nconst data = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Product date', 'Payment date', 'Registration date'],\n columns: [\n {\n type: 'text',\n data: 'car',\n },\n {\n type: 'intl-date',\n data: 'product_date',\n dateFormat: {\n dateStyle: 'short',\n },\n },\n {\n type: 'intl-date',\n data: 'payment_date',\n dateFormat: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n {\n type: 'intl-date',\n data: 'registration_date',\n dateFormat: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = (e.target as HTMLElement).closest('li[data-value]') as HTMLLIElement | null;\n\n if (item) {\n label.textContent = item.textContent!.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target as Node)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/cell-types/date-cell-type/javascript/example1.ts","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"TypeScript"} +{"framework":"typescript","displayName":"Cell Types ▸ Date cell type · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1')!;\nconst dropdown = document.querySelector('#localeDropdown')!;\nconst trigger = document.querySelector('#localeTrigger')!;\nconst menu = document.querySelector('#localeMenu')!;\nconst label = document.querySelector('#localeLabel')!;\nconst data = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Product date', 'Payment date', 'Registration date'],\n columns: [\n {\n type: 'text',\n data: 'car',\n },\n {\n type: 'intl-date',\n data: 'product_date',\n dateFormat: {\n dateStyle: 'short',\n },\n },\n {\n type: 'intl-date',\n data: 'payment_date',\n dateFormat: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n {\n type: 'intl-date',\n data: 'registration_date',\n dateFormat: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = (e.target as HTMLElement).closest('li[data-value]') as HTMLLIElement | null;\n\n if (item) {\n label.textContent = item.textContent!.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target as Node)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/cell-types/date-cell-type/javascript/example1.ts","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__react__example1.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__react__example1.tsx.json index fe489786b..59a82bab6 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__react__example1.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__react__example1.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Cell Types ▸ Date cell type · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef, useState, useEffect } from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst localeOptions: { value: string; label: string }[] = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-SP', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef(null);\n const dropdownRef = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [locale, setLocale] = useState('en-US');\n\n useEffect(() => {\n const handleOutsideClick = (e: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('click', handleOutsideClick);\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('click', handleOutsideClick);\n document.removeEventListener('keydown', handleEscape);\n };\n }, []);\n\n const handleSelect = (value: string) => {\n setLocale(value);\n setIsOpen(false);\n hotRef.current?.hotInstance?.updateSettings({ locale: value } as Handsontable.GridSettings);\n };\n\n const selectedLabel = localeOptions.find((o) => o.value === locale)?.label;\n\n const data = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n ];\n\n return (\n <>\n
\n
\n
\n setIsOpen(!isOpen)}\n >\n {selectedLabel}\n \n \n {isOpen && (\n
    \n {localeOptions.map((opt) => (\n handleSelect(opt.value)}\n >\n {opt.label}\n \n ))}\n
\n )}\n
\n
\n
\n\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/cell-types/date-cell-type/react/example1.tsx","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"React (TS)"} +{"framework":"react","displayName":"Cell Types ▸ Date cell type · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef, useState, useEffect } from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst localeOptions: { value: string; label: string }[] = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-Latn-RS', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef(null);\n const dropdownRef = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [locale, setLocale] = useState('en-US');\n\n useEffect(() => {\n const handleOutsideClick = (e: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('click', handleOutsideClick);\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('click', handleOutsideClick);\n document.removeEventListener('keydown', handleEscape);\n };\n }, []);\n\n const handleSelect = (value: string) => {\n setLocale(value);\n setIsOpen(false);\n hotRef.current?.hotInstance?.updateSettings({ locale: value } as Handsontable.GridSettings);\n };\n\n const selectedLabel = localeOptions.find((o) => o.value === locale)?.label;\n\n const data = [\n {\n car: 'Mercedes A 160',\n product_date: '2002-06-15',\n payment_date: '2002-05-20',\n registration_date: '2002-07-01',\n },\n {\n car: 'Citroën C4 Coupe',\n product_date: '2007-03-22',\n payment_date: '2007-02-28',\n registration_date: '2007-04-10',\n },\n {\n car: 'Audi A4 Avant',\n product_date: '2011-09-08',\n payment_date: '2011-08-15',\n registration_date: '2011-09-20',\n },\n {\n car: 'Opel Astra',\n product_date: '2012-01-30',\n payment_date: '2012-01-10',\n registration_date: '2012-02-14',\n },\n {\n car: 'BMW 320i Coupe',\n product_date: '2004-11-12',\n payment_date: '2004-10-20',\n registration_date: '2004-12-01',\n },\n ];\n\n return (\n <>\n
\n
\n
\n setIsOpen(!isOpen)}\n >\n {selectedLabel}\n \n \n {isOpen && (\n
    \n {localeOptions.map((opt) => (\n handleSelect(opt.value)}\n >\n {opt.label}\n \n ))}\n
\n )}\n
\n
\n
\n\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/cell-types/date-cell-type/react/example1.tsx","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__vue__example1.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__vue__example1.vue.json index 7f2170a11..33f709498 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__vue__example1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__date-cell-type__vue__example1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Cell Types ▸ Date cell type · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n"},"docsPath":"guides/cell-types/date-cell-type/vue/example1.vue","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"Vue 3"} +{"framework":"vue","displayName":"Cell Types ▸ Date cell type · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n"},"docsPath":"guides/cell-types/date-cell-type/vue/example1.vue","breadcrumb":["Cell Types","Date cell type"],"guide":"guides/cell-types/date-cell-type/date-cell-type.md","guideTitle":"Date cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/date-cell-type","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__angular__example1.ts.json index 003646e01..3c4d180a4 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__angular__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__angular__example1.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Cell Types ▸ Numeric cell type · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation, HostListener, ElementRef, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\n\ninterface CarData {\n car: string;\n year: number;\n price_usd: number;\n price_eur: number;\n distance_km: number;\n fuel_liters: number;\n discount_percent: number;\n quantity: number;\n}\n\n@Component({\n selector: 'example1-numeric-cell-type',\n standalone: true,\n imports: [HotTableModule],\n template: `\n
\n
\n
\n \n {{ selectedLabel }}\n \n \n @if (isOpen) {\n
    \n @for (opt of localeOptions; track opt.value) {\n {{ opt.label }}\n }\n
\n }\n
\n
\n
\n
\n \n
\n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n isOpen = false;\n locale = 'en-US';\n\n readonly localeOptions = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-SP', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n ];\n\n readonly data: CarData[] = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500\n },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Car', 'Year', 'Price (USD)', 'Price (EUR)', 'Distance', 'Fuel', 'Discount', 'Quantity'],\n locale: this.locale,\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n columns: [\n {\n data: 'car',\n type: 'text',\n },\n {\n data: 'year',\n type: 'numeric',\n },\n {\n data: 'price_usd',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'price_eur',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'distance_km',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'kilometer',\n useGrouping: true,\n },\n },\n {\n data: 'fuel_liters',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'liter',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n {\n data: 'discount_percent',\n type: 'numeric',\n numericFormat: {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n },\n },\n {\n data: 'quantity',\n type: 'numeric',\n numericFormat: {\n style: 'decimal',\n useGrouping: true,\n minimumFractionDigits: 0,\n },\n },\n ]\n };\n\n get selectedLabel(): string {\n return this.localeOptions.find((o) => o.value === this.locale)?.label || '';\n }\n\n private elementRef = inject(ElementRef);\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n selectLocale(value: string): void {\n this.locale = value;\n this.isOpen = false;\n this.hotTable?.hotInstance?.updateSettings({ locale: this.locale });\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.querySelector('.theme-dropdown')?.contains(event.target)) {\n this.isOpen = false;\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/cell-types/numeric-cell-type/angular/example1.ts","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"Angular"} +{"framework":"angular","displayName":"Cell Types ▸ Numeric cell type · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation, HostListener, ElementRef, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\n\ninterface CarData {\n car: string;\n year: number;\n price_usd: number;\n price_eur: number;\n distance_km: number;\n fuel_liters: number;\n discount_percent: number;\n quantity: number;\n}\n\n@Component({\n selector: 'example1-numeric-cell-type',\n standalone: true,\n imports: [HotTableModule],\n template: `\n
\n
\n
\n \n {{ selectedLabel }}\n \n \n @if (isOpen) {\n
    \n @for (opt of localeOptions; track opt.value) {\n {{ opt.label }}\n }\n
\n }\n
\n
\n
\n
\n \n
\n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n isOpen = false;\n locale = 'en-US';\n\n readonly localeOptions = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-Latn-RS', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n ];\n\n readonly data: CarData[] = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500\n },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Car', 'Year', 'Price (USD)', 'Price (EUR)', 'Distance', 'Fuel', 'Discount', 'Quantity'],\n locale: this.locale,\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n columns: [\n {\n data: 'car',\n type: 'text',\n },\n {\n data: 'year',\n type: 'numeric',\n },\n {\n data: 'price_usd',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'price_eur',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'distance_km',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'kilometer',\n useGrouping: true,\n },\n },\n {\n data: 'fuel_liters',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'liter',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n {\n data: 'discount_percent',\n type: 'numeric',\n numericFormat: {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n },\n },\n {\n data: 'quantity',\n type: 'numeric',\n numericFormat: {\n style: 'decimal',\n useGrouping: true,\n minimumFractionDigits: 0,\n },\n },\n ]\n };\n\n get selectedLabel(): string {\n return this.localeOptions.find((o) => o.value === this.locale)?.label || '';\n }\n\n private elementRef = inject(ElementRef);\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n selectLocale(value: string): void {\n this.locale = value;\n this.isOpen = false;\n this.hotTable?.hotInstance?.updateSettings({ locale: this.locale });\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.querySelector('.theme-dropdown')?.contains(event.target)) {\n this.isOpen = false;\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/cell-types/numeric-cell-type/angular/example1.ts","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.js.json index 698fc5247..6f5c2b953 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Cell Types ▸ Numeric cell type · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1');\nconst dropdown = document.querySelector('#localeDropdown');\nconst trigger = document.querySelector('#localeTrigger');\nconst menu = document.querySelector('#localeMenu');\nconst label = document.querySelector('#localeLabel');\n// Sample data with various numeric types\nconst data = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250,\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100,\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850,\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200,\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500,\n },\n];\n\n// Initialize Handsontable\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Year', 'Price (USD)', 'Price (EUR)', 'Distance', 'Fuel', 'Discount', 'Quantity'],\n columns: [\n {\n data: 'car',\n type: 'text',\n },\n {\n data: 'year',\n type: 'numeric',\n },\n {\n data: 'price_usd',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'price_eur',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'distance_km',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'kilometer',\n useGrouping: true,\n },\n },\n {\n data: 'fuel_liters',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'liter',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n {\n data: 'discount_percent',\n type: 'numeric',\n numericFormat: {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n },\n },\n {\n data: 'quantity',\n type: 'numeric',\n numericFormat: {\n style: 'decimal',\n useGrouping: true,\n minimumFractionDigits: 0,\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = e.target.closest('li[data-value]');\n\n if (item) {\n label.textContent = item.textContent.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/cell-types/numeric-cell-type/javascript/example1.js","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"JavaScript"} +{"framework":"javascript","displayName":"Cell Types ▸ Numeric cell type · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1');\nconst dropdown = document.querySelector('#localeDropdown');\nconst trigger = document.querySelector('#localeTrigger');\nconst menu = document.querySelector('#localeMenu');\nconst label = document.querySelector('#localeLabel');\n// Sample data with various numeric types\nconst data = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250,\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100,\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850,\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200,\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500,\n },\n];\n\n// Initialize Handsontable\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Year', 'Price (USD)', 'Price (EUR)', 'Distance', 'Fuel', 'Discount', 'Quantity'],\n columns: [\n {\n data: 'car',\n type: 'text',\n },\n {\n data: 'year',\n type: 'numeric',\n },\n {\n data: 'price_usd',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'price_eur',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'distance_km',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'kilometer',\n useGrouping: true,\n },\n },\n {\n data: 'fuel_liters',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'liter',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n {\n data: 'discount_percent',\n type: 'numeric',\n numericFormat: {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n },\n },\n {\n data: 'quantity',\n type: 'numeric',\n numericFormat: {\n style: 'decimal',\n useGrouping: true,\n minimumFractionDigits: 0,\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = e.target.closest('li[data-value]');\n\n if (item) {\n label.textContent = item.textContent.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/cell-types/numeric-cell-type/javascript/example1.js","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.ts.json index 3bfb68864..8d69c2525 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__javascript__example1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Cell Types ▸ Numeric cell type · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1')!;\nconst dropdown = document.querySelector('#localeDropdown')!;\nconst trigger = document.querySelector('#localeTrigger')!;\nconst menu = document.querySelector('#localeMenu')!;\nconst label = document.querySelector('#localeLabel')!;\n\n// Sample data with various numeric types\nconst data = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250,\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100,\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850,\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200,\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500,\n },\n];\n\n// Initialize Handsontable\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Year', 'Price (USD)', 'Price (EUR)', 'Distance', 'Fuel', 'Discount', 'Quantity'],\n columns: [\n {\n data: 'car',\n type: 'text',\n },\n {\n data: 'year',\n type: 'numeric',\n },\n {\n data: 'price_usd',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'price_eur',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'distance_km',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'kilometer',\n useGrouping: true,\n },\n },\n {\n data: 'fuel_liters',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'liter',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n {\n data: 'discount_percent',\n type: 'numeric',\n numericFormat: {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n },\n },\n {\n data: 'quantity',\n type: 'numeric',\n numericFormat: {\n style: 'decimal',\n useGrouping: true,\n minimumFractionDigits: 0,\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = (e.target as HTMLElement).closest('li[data-value]') as HTMLLIElement | null;\n\n if (item) {\n label.textContent = item.textContent!.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target as Node)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/cell-types/numeric-cell-type/javascript/example1.ts","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"TypeScript"} +{"framework":"typescript","displayName":"Cell Types ▸ Numeric cell type · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1')!;\nconst dropdown = document.querySelector('#localeDropdown')!;\nconst trigger = document.querySelector('#localeTrigger')!;\nconst menu = document.querySelector('#localeMenu')!;\nconst label = document.querySelector('#localeLabel')!;\n\n// Sample data with various numeric types\nconst data = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250,\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100,\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850,\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200,\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500,\n },\n];\n\n// Initialize Handsontable\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Car', 'Year', 'Price (USD)', 'Price (EUR)', 'Distance', 'Fuel', 'Discount', 'Quantity'],\n columns: [\n {\n data: 'car',\n type: 'text',\n },\n {\n data: 'year',\n type: 'numeric',\n },\n {\n data: 'price_usd',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'price_eur',\n type: 'numeric',\n numericFormat: {\n style: 'currency',\n currency: 'EUR',\n minimumFractionDigits: 2,\n },\n },\n {\n data: 'distance_km',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'kilometer',\n useGrouping: true,\n },\n },\n {\n data: 'fuel_liters',\n type: 'numeric',\n numericFormat: {\n style: 'unit',\n unit: 'liter',\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n {\n data: 'discount_percent',\n type: 'numeric',\n numericFormat: {\n style: 'percent',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n },\n },\n {\n data: 'quantity',\n type: 'numeric',\n numericFormat: {\n style: 'decimal',\n useGrouping: true,\n minimumFractionDigits: 0,\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = (e.target as HTMLElement).closest('li[data-value]') as HTMLLIElement | null;\n\n if (item) {\n label.textContent = item.textContent!.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target as Node)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/cell-types/numeric-cell-type/javascript/example1.ts","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__react__example1.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__react__example1.tsx.json index 3872bfec4..feade3326 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__react__example1.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__react__example1.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Cell Types ▸ Numeric cell type · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef, useState, useEffect } from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\ninterface CarData {\n car: string;\n year: number;\n price_usd: number;\n price_eur: number;\n distance_km: number;\n fuel_liters: number;\n discount_percent: number;\n quantity: number;\n}\n\nconst localeOptions: { value: string; label: string }[] = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-SP', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef(null);\n const dropdownRef = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [locale, setLocale] = useState('en-US');\n\n useEffect(() => {\n const handleOutsideClick = (e: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('click', handleOutsideClick);\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('click', handleOutsideClick);\n document.removeEventListener('keydown', handleEscape);\n };\n }, []);\n\n const handleSelect = (value: string) => {\n setLocale(value);\n setIsOpen(false);\n hotRef.current?.hotInstance?.updateSettings({ locale: value } as Handsontable.GridSettings);\n };\n\n const selectedLabel = localeOptions.find((o) => o.value === locale)?.label;\n\n // Sample data with various numeric types\n const data: CarData[] = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250,\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100,\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850,\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200,\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500,\n },\n ];\n\n return (\n <>\n
\n
\n
\n setIsOpen(!isOpen)}\n >\n {selectedLabel}\n \n \n {isOpen && (\n
    \n {localeOptions.map((opt) => (\n handleSelect(opt.value)}\n >\n {opt.label}\n \n ))}\n
\n )}\n
\n
\n
\n\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/cell-types/numeric-cell-type/react/example1.tsx","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"React (TS)"} +{"framework":"react","displayName":"Cell Types ▸ Numeric cell type · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef, useState, useEffect } from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\ninterface CarData {\n car: string;\n year: number;\n price_usd: number;\n price_eur: number;\n distance_km: number;\n fuel_liters: number;\n discount_percent: number;\n quantity: number;\n}\n\nconst localeOptions: { value: string; label: string }[] = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-Latn-RS', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef(null);\n const dropdownRef = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [locale, setLocale] = useState('en-US');\n\n useEffect(() => {\n const handleOutsideClick = (e: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('click', handleOutsideClick);\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('click', handleOutsideClick);\n document.removeEventListener('keydown', handleEscape);\n };\n }, []);\n\n const handleSelect = (value: string) => {\n setLocale(value);\n setIsOpen(false);\n hotRef.current?.hotInstance?.updateSettings({ locale: value } as Handsontable.GridSettings);\n };\n\n const selectedLabel = localeOptions.find((o) => o.value === locale)?.label;\n\n // Sample data with various numeric types\n const data: CarData[] = [\n {\n car: 'Mercedes A 160',\n year: 2017,\n price_usd: 7000,\n price_eur: 7000,\n distance_km: 125000,\n fuel_liters: 45.5,\n discount_percent: 0.15,\n quantity: 1250,\n },\n {\n car: 'Citroen C4 Coupe',\n year: 2018,\n price_usd: 8330,\n price_eur: 8330,\n distance_km: 98000,\n fuel_liters: 52.3,\n discount_percent: 0.08,\n quantity: 2100,\n },\n {\n car: 'Audi A4 Avant',\n year: 2019,\n price_usd: 33900,\n price_eur: 33900,\n distance_km: 45000,\n fuel_liters: 60.0,\n discount_percent: 0.05,\n quantity: 850,\n },\n {\n car: 'Opel Astra',\n year: 2020,\n price_usd: 5000,\n price_eur: 5000,\n distance_km: 156000,\n fuel_liters: 48.7,\n discount_percent: 0.12,\n quantity: 3200,\n },\n {\n car: 'BMW 320i Coupe',\n year: 2021,\n price_usd: 30500,\n price_eur: 30500,\n distance_km: 32000,\n fuel_liters: 55.2,\n discount_percent: 0.03,\n quantity: 1500,\n },\n ];\n\n return (\n <>\n
\n
\n
\n setIsOpen(!isOpen)}\n >\n {selectedLabel}\n \n \n {isOpen && (\n
    \n {localeOptions.map((opt) => (\n handleSelect(opt.value)}\n >\n {opt.label}\n \n ))}\n
\n )}\n
\n
\n
\n\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/cell-types/numeric-cell-type/react/example1.tsx","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__vue__example1.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__vue__example1.vue.json index b10d1c787..3de078b63 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__vue__example1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__numeric-cell-type__vue__example1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Cell Types ▸ Numeric cell type · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n"},"docsPath":"guides/cell-types/numeric-cell-type/vue/example1.vue","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"Vue 3"} +{"framework":"vue","displayName":"Cell Types ▸ Numeric cell type · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n"},"docsPath":"guides/cell-types/numeric-cell-type/vue/example1.vue","breadcrumb":["Cell Types","Numeric cell type"],"guide":"guides/cell-types/numeric-cell-type/numeric-cell-type.md","guideTitle":"Numeric cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/numeric-cell-type","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__angular__example1.ts.json index 19c9569c4..00b1dd11e 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__angular__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__angular__example1.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Cell Types ▸ Time cell type · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation, HostListener, ElementRef, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\n\ninterface ShiftData {\n shift: string;\n start: string;\n breakStart: string;\n end: string;\n}\n\n@Component({\n selector: 'example1-time-cell-type',\n standalone: true,\n imports: [HotTableModule],\n template: `\n
\n
\n
\n \n {{ selectedLabel }}\n \n \n @if (isOpen) {\n
    \n @for (opt of localeOptions; track opt.value) {\n {{ opt.label }}\n }\n
\n }\n
\n
\n
\n
\n \n
\n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n isOpen = false;\n locale = 'en-US';\n\n readonly localeOptions = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-SP', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n ];\n\n readonly data: ShiftData[] = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Shift', 'Start', 'Break start', 'End'],\n locale: this.locale,\n columns: [\n {\n type: 'text',\n data: 'shift',\n },\n {\n type: 'intl-time',\n data: 'start',\n timeFormat: {\n timeStyle: 'short',\n },\n },\n {\n type: 'intl-time',\n data: 'breakStart',\n timeFormat: {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n },\n },\n {\n type: 'intl-time',\n data: 'end',\n timeFormat: {\n hour: 'numeric',\n hourCycle: 'h12',\n dayPeriod: 'short',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n get selectedLabel(): string {\n return this.localeOptions.find((o) => o.value === this.locale)?.label || '';\n }\n\n private elementRef = inject(ElementRef);\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n selectLocale(value: string): void {\n this.locale = value;\n this.isOpen = false;\n this.hotTable?.hotInstance?.updateSettings({ locale: this.locale });\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.querySelector('.theme-dropdown')?.contains(event.target)) {\n this.isOpen = false;\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/cell-types/time-cell-type/angular/example1.ts","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"Angular"} +{"framework":"angular","displayName":"Cell Types ▸ Time cell type · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation, HostListener, ElementRef, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\n\ninterface ShiftData {\n shift: string;\n start: string;\n breakStart: string;\n end: string;\n}\n\n@Component({\n selector: 'example1-time-cell-type',\n standalone: true,\n imports: [HotTableModule],\n template: `\n
\n
\n
\n \n {{ selectedLabel }}\n \n \n @if (isOpen) {\n
    \n @for (opt of localeOptions; track opt.value) {\n {{ opt.label }}\n }\n
\n }\n
\n
\n
\n
\n \n
\n `,\n encapsulation: ViewEncapsulation.None\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n isOpen = false;\n locale = 'en-US';\n\n readonly localeOptions = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-Latn-RS', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n ];\n\n readonly data: ShiftData[] = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Shift', 'Start', 'Break start', 'End'],\n locale: this.locale,\n columns: [\n {\n type: 'text',\n data: 'shift',\n },\n {\n type: 'intl-time',\n data: 'start',\n timeFormat: {\n timeStyle: 'short',\n },\n },\n {\n type: 'intl-time',\n data: 'breakStart',\n timeFormat: {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n },\n },\n {\n type: 'intl-time',\n data: 'end',\n timeFormat: {\n hour: 'numeric',\n hourCycle: 'h12',\n dayPeriod: 'short',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n get selectedLabel(): string {\n return this.localeOptions.find((o) => o.value === this.locale)?.label || '';\n }\n\n private elementRef = inject(ElementRef);\n\n toggleDropdown(): void {\n this.isOpen = !this.isOpen;\n }\n\n selectLocale(value: string): void {\n this.locale = value;\n this.isOpen = false;\n this.hotTable?.hotInstance?.updateSettings({ locale: this.locale });\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.querySelector('.theme-dropdown')?.contains(event.target)) {\n this.isOpen = false;\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.isOpen = false;\n }\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/cell-types/time-cell-type/angular/example1.ts","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.js.json index 5a80e0c5b..c093c6a85 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Cell Types ▸ Time cell type · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n English (United States)\n \n \n \n
\n
\n
\n \n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1');\nconst dropdown = document.querySelector('#localeDropdown');\nconst trigger = document.querySelector('#localeTrigger');\nconst menu = document.querySelector('#localeMenu');\nconst label = document.querySelector('#localeLabel');\nconst data = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Shift', 'Start', 'Break start', 'End'],\n columns: [\n {\n type: 'text',\n data: 'shift',\n },\n {\n type: 'intl-time',\n data: 'start',\n timeFormat: {\n timeStyle: 'short',\n },\n },\n {\n type: 'intl-time',\n data: 'breakStart',\n timeFormat: {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n },\n },\n {\n type: 'intl-time',\n data: 'end',\n timeFormat: {\n hour: 'numeric',\n hourCycle: 'h12',\n dayPeriod: 'short',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = e.target.closest('li[data-value]');\n\n if (item) {\n label.textContent = item.textContent.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/cell-types/time-cell-type/javascript/example1.js","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"JavaScript"} +{"framework":"javascript","displayName":"Cell Types ▸ Time cell type · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n English (United States)\n \n \n \n
\n
\n
\n \n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1');\nconst dropdown = document.querySelector('#localeDropdown');\nconst trigger = document.querySelector('#localeTrigger');\nconst menu = document.querySelector('#localeMenu');\nconst label = document.querySelector('#localeLabel');\nconst data = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Shift', 'Start', 'Break start', 'End'],\n columns: [\n {\n type: 'text',\n data: 'shift',\n },\n {\n type: 'intl-time',\n data: 'start',\n timeFormat: {\n timeStyle: 'short',\n },\n },\n {\n type: 'intl-time',\n data: 'breakStart',\n timeFormat: {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n },\n },\n {\n type: 'intl-time',\n data: 'end',\n timeFormat: {\n hour: 'numeric',\n hourCycle: 'h12',\n dayPeriod: 'short',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = e.target.closest('li[data-value]');\n\n if (item) {\n label.textContent = item.textContent.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/cell-types/time-cell-type/javascript/example1.js","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.ts.json index fa83ba6b1..a3217a382 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__javascript__example1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Cell Types ▸ Time cell type · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n English (United States)\n \n \n \n
\n
\n
\n \n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1')!;\nconst dropdown = document.querySelector('#localeDropdown')!;\nconst trigger = document.querySelector('#localeTrigger')!;\nconst menu = document.querySelector('#localeMenu')!;\nconst label = document.querySelector('#localeLabel')!;\nconst data = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Shift', 'Start', 'Break start', 'End'],\n columns: [\n {\n type: 'text',\n data: 'shift',\n },\n {\n type: 'intl-time',\n data: 'start',\n timeFormat: {\n timeStyle: 'short',\n },\n },\n {\n type: 'intl-time',\n data: 'breakStart',\n timeFormat: {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n },\n },\n {\n type: 'intl-time',\n data: 'end',\n timeFormat: {\n hour: 'numeric',\n hourCycle: 'h12',\n dayPeriod: 'short',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = (e.target as HTMLElement).closest('li[data-value]') as HTMLLIElement | null;\n\n if (item) {\n label.textContent = item.textContent!.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target as Node)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/cell-types/time-cell-type/javascript/example1.ts","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"TypeScript"} +{"framework":"typescript","displayName":"Cell Types ▸ Time cell type · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n
\n \n English (United States)\n \n \n \n
\n
\n
\n \n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#example1')!;\nconst dropdown = document.querySelector('#localeDropdown')!;\nconst trigger = document.querySelector('#localeTrigger')!;\nconst menu = document.querySelector('#localeMenu')!;\nconst label = document.querySelector('#localeLabel')!;\nconst data = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n];\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: ['Shift', 'Start', 'Break start', 'End'],\n columns: [\n {\n type: 'text',\n data: 'shift',\n },\n {\n type: 'intl-time',\n data: 'start',\n timeFormat: {\n timeStyle: 'short',\n },\n },\n {\n type: 'intl-time',\n data: 'breakStart',\n timeFormat: {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n },\n },\n {\n type: 'intl-time',\n data: 'end',\n timeFormat: {\n hour: 'numeric',\n hourCycle: 'h12',\n dayPeriod: 'short',\n },\n },\n ],\n columnSorting: true,\n filters: true,\n dropdownMenu: true,\n height: 'auto',\n licenseKey: 'non-commercial-and-evaluation',\n autoWrapRow: true,\n autoWrapCol: true,\n});\n\n// Handle dropdown toggle\ntrigger.addEventListener('click', () => {\n const isOpen = !menu.hidden;\n\n menu.hidden = isOpen;\n trigger.setAttribute('aria-expanded', String(!isOpen));\n});\n\n// Handle locale selection\nmenu.addEventListener('click', (e) => {\n const item = (e.target as HTMLElement).closest('li[data-value]') as HTMLLIElement | null;\n\n if (item) {\n label.textContent = item.textContent!.trim();\n menu.querySelectorAll('li').forEach((li) => li.setAttribute('aria-selected', 'false'));\n item.setAttribute('aria-selected', 'true');\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n hot.updateSettings({ locale: item.dataset.value });\n }\n});\n\n// Close dropdown when clicking outside\ndocument.addEventListener('click', (e) => {\n if (!dropdown.contains(e.target as Node)) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n }\n});\n\n// Close dropdown on Escape key\ndocument.addEventListener('keydown', (e) => {\n if (e.key === 'Escape' && !menu.hidden) {\n menu.hidden = true;\n trigger.setAttribute('aria-expanded', 'false');\n trigger.focus();\n }\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/cell-types/time-cell-type/javascript/example1.ts","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__react__example1.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__react__example1.tsx.json index eccca912a..2c182b49d 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__react__example1.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__react__example1.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Cell Types ▸ Time cell type · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef, useState, useEffect } from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst localeOptions: { value: string; label: string }[] = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-SP', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef(null);\n const dropdownRef = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [locale, setLocale] = useState('en-US');\n\n useEffect(() => {\n const handleOutsideClick = (e: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('click', handleOutsideClick);\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('click', handleOutsideClick);\n document.removeEventListener('keydown', handleEscape);\n };\n }, []);\n\n const handleSelect = (value: string) => {\n setLocale(value);\n setIsOpen(false);\n hotRef.current?.hotInstance?.updateSettings({ locale: value } as Handsontable.GridSettings);\n };\n\n const selectedLabel = localeOptions.find((o) => o.value === locale)?.label;\n\n const data = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n ];\n\n return (\n <>\n
\n
\n
\n setIsOpen(!isOpen)}\n >\n {selectedLabel}\n \n \n {isOpen && (\n
    \n {localeOptions.map((opt) => (\n handleSelect(opt.value)}\n >\n {opt.label}\n \n ))}\n
\n )}\n
\n
\n
\n\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/cell-types/time-cell-type/react/example1.tsx","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"React (TS)"} +{"framework":"react","displayName":"Cell Types ▸ Time cell type · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef, useState, useEffect } from 'react';\nimport Handsontable from 'handsontable/base';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst localeOptions: { value: string; label: string }[] = [\n { value: 'ar-AR', label: 'Arabic (Global)' },\n { value: 'cs-CZ', label: 'Czech (Czechia)' },\n { value: 'de-CH', label: 'German (Switzerland)' },\n { value: 'de-DE', label: 'German (Germany)' },\n { value: 'en-US', label: 'English (United States)' },\n { value: 'es-MX', label: 'Spanish (Mexico)' },\n { value: 'fa-IR', label: 'Persian (Iran)' },\n { value: 'fr-FR', label: 'French (France)' },\n { value: 'hr-HR', label: 'Croatian (Croatia)' },\n { value: 'it-IT', label: 'Italian (Italy)' },\n { value: 'ja-JP', label: 'Japanese (Japan)' },\n { value: 'ko-KR', label: 'Korean (Korea)' },\n { value: 'lv-LV', label: 'Latvian (Latvia)' },\n { value: 'nb-NO', label: 'Norwegian Bokmal (Norway)' },\n { value: 'nl-NL', label: 'Dutch (Netherlands)' },\n { value: 'pl-PL', label: 'Polish (Poland)' },\n { value: 'pt-BR', label: 'Portuguese (Brazil)' },\n { value: 'ru-RU', label: 'Russian (Russia)' },\n { value: 'sr-Latn-RS', label: 'Serbian Latin (Serbia)' },\n { value: 'zh-CN', label: 'Chinese (Simplified, China)' },\n { value: 'zh-TW', label: 'Chinese (Traditional, Taiwan)' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef(null);\n const dropdownRef = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [locale, setLocale] = useState('en-US');\n\n useEffect(() => {\n const handleOutsideClick = (e: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(e.target as Node)) {\n setIsOpen(false);\n }\n };\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('click', handleOutsideClick);\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('click', handleOutsideClick);\n document.removeEventListener('keydown', handleEscape);\n };\n }, []);\n\n const handleSelect = (value: string) => {\n setLocale(value);\n setIsOpen(false);\n hotRef.current?.hotInstance?.updateSettings({ locale: value } as Handsontable.GridSettings);\n };\n\n const selectedLabel = localeOptions.find((o) => o.value === locale)?.label;\n\n const data = [\n { shift: 'Morning', start: '09:00', breakStart: '12:00', end: '17:00' },\n { shift: 'Afternoon', start: '13:30', breakStart: '16:00', end: '21:00' },\n { shift: 'Night', start: '22:00', breakStart: '01:00', end: '06:00' },\n { shift: 'Split', start: '08:00', breakStart: '12:30', end: '20:00' },\n { shift: 'Short day', start: '10:00', breakStart: '13:00', end: '15:00' },\n ];\n\n return (\n <>\n
\n
\n
\n setIsOpen(!isOpen)}\n >\n {selectedLabel}\n \n \n {isOpen && (\n
    \n {localeOptions.map((opt) => (\n handleSelect(opt.value)}\n >\n {opt.label}\n \n ))}\n
\n )}\n
\n
\n
\n\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/cell-types/time-cell-type/react/example1.tsx","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__vue__example1.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__vue__example1.vue.json index 4de2cd260..17bc43303 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__vue__example1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__cell-types__time-cell-type__vue__example1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Cell Types ▸ Time cell type · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n"},"docsPath":"guides/cell-types/time-cell-type/vue/example1.vue","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"Vue 3"} +{"framework":"vue","displayName":"Cell Types ▸ Time cell type · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n"},"docsPath":"guides/cell-types/time-cell-type/vue/example1.vue","breadcrumb":["Cell Types","Time cell type"],"guide":"guides/cell-types/time-cell-type/time-cell-type.md","guideTitle":"Time cell type","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/time-cell-type","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__angular__example7.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__angular__example7.ts.json index 4c20e3ac4..7fb2b1596 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__angular__example7.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__angular__example7.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Columns ▸ Column filter · Customize the filter button (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example7',\n template: `\n \n \n `,\n styles: `\n :host ::ng-deep {\n .handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n }\n\n .handsontable.customFilterButtonExample1 .changeType::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n }\n }\n `,\n})\nexport class AppComponent {\n\n readonly hotData = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n ];\n\n readonly hotSettings: GridSettings = {\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n // enable filtering\n filters: true,\n // enable the column menu\n dropdownMenu: true,\n // to differentiate this example's CSS from other examples on this page\n className: 'customFilterButtonExample1',\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/columns/column-filter/angular/example7.ts","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"example7","exampleTitle":"Customize the filter button (2)","docPermalink":"/column-filter","lang":"Angular"} +{"framework":"angular","displayName":"Columns ▸ Column filter · Customize the filter button (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example7',\n template: `\n \n \n `,\n styles: `\n :host ::ng-deep {\n .handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n --ht-icon-menu: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n }\n }\n `,\n})\nexport class AppComponent {\n\n readonly hotData = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n ];\n\n readonly hotSettings: GridSettings = {\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n // enable filtering\n filters: true,\n // enable the column menu\n dropdownMenu: true,\n // to differentiate this example's CSS from other examples on this page\n className: 'customFilterButtonExample1',\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/columns/column-filter/angular/example7.ts","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"example7","exampleTitle":"Customize the filter button (2)","docPermalink":"/column-filter","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.js.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.js.json index 3be224c00..eee4fea48 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Columns ▸ Column filter · Customize the filter button · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomFilterButton');\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n // enable filtering\n filters: true,\n // enable the column menu\n dropdownMenu: true,\n // to differentiate this example's CSS from other examples on this page\n className: 'customFilterButtonExample1',\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":".handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n}\n\n.handsontable.customFilterButtonExample1 .changeType::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/columns/column-filter/javascript/exampleCustomFilterButton.js","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"JavaScript"} +{"framework":"javascript","displayName":"Columns ▸ Column filter · Customize the filter button · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomFilterButton');\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n // enable filtering\n filters: true,\n // enable the column menu\n dropdownMenu: true,\n // to differentiate this example's CSS from other examples on this page\n className: 'customFilterButtonExample1',\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":".handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n --ht-icon-menu: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/columns/column-filter/javascript/exampleCustomFilterButton.js","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.ts.json index 3fcf5a7c7..65c5e27a9 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__javascript__exampleCustomFilterButton.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Columns ▸ Column filter · Customize the filter button · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomFilterButton')!;\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n // enable filtering\n filters: true,\n // enable the column menu\n dropdownMenu: true,\n // to differentiate this example's CSS from other examples on this page\n className: 'customFilterButtonExample1',\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":".handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n}\n\n.handsontable.customFilterButtonExample1 .changeType::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/columns/column-filter/javascript/exampleCustomFilterButton.ts","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"TypeScript"} +{"framework":"typescript","displayName":"Columns ▸ Column filter · Customize the filter button · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomFilterButton')!;\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n // enable filtering\n filters: true,\n // enable the column menu\n dropdownMenu: true,\n // to differentiate this example's CSS from other examples on this page\n className: 'customFilterButtonExample1',\n height: 'auto',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":".handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n --ht-icon-menu: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/columns/column-filter/javascript/exampleCustomFilterButton.ts","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__react__exampleCustomFilterButton.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__react__exampleCustomFilterButton.tsx.json index 683c0d130..d9655a53a 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__react__exampleCustomFilterButton.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__react__exampleCustomFilterButton.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Columns ▸ Column filter · Customize the filter button · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"exampleCustomFilterButton\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst data = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":".handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n}\n\n.handsontable.customFilterButtonExample1 .changeType::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/columns/column-filter/react/exampleCustomFilterButton.tsx","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"React (TS)"} +{"framework":"react","displayName":"Columns ▸ Column filter · Customize the filter button · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"exampleCustomFilterButton\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst data = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '01:23',\n inStock: true,\n },\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":".handsontable.customFilterButtonExample1 .changeType {\n --ht-icon-button-background-color: #e2e2e263;\n --ht-icon-button-border-radius: 100%;\n --ht-icon-menu: url(\"data:image/svg+xml,%3Csvg width=%2716%27 height=%2716%27 viewBox=%270 0 16 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M6.83337 7.99984C6.83337 8.30926 6.95629 8.606 7.17508 8.8248C7.39388 9.04359 7.69062 9.1665 8.00004 9.1665C8.30946 9.1665 8.60621 9.04359 8.825 8.8248C9.04379 8.606 9.16671 8.30926 9.16671 7.99984C9.16671 7.69042 9.04379 7.39367 8.825 7.17488C8.60621 6.95609 8.30946 6.83317 8.00004 6.83317C7.69062 6.83317 7.39388 6.95609 7.17508 7.17488C6.95629 7.39367 6.83337 7.69042 6.83337 7.99984Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 12.4165C6.83337 12.7259 6.95629 13.0227 7.17508 13.2415C7.39388 13.4603 7.69062 13.5832 8.00004 13.5832C8.30946 13.5832 8.60621 13.4603 8.825 13.2415C9.04379 13.0227 9.16671 12.7259 9.16671 12.4165C9.16671 12.1071 9.04379 11.8103 8.825 11.5915C8.60621 11.3728 8.30946 11.2498 8.00004 11.2498C7.69062 11.2498 7.39388 11.3728 7.17508 11.5915C6.95629 11.8103 6.83337 12.1071 6.83337 12.4165Z%27 fill=%27%23222222%27/%3E%3Cpath d=%27M6.83337 3.58317C6.83337 3.89259 6.95629 4.18934 7.17508 4.40813C7.39388 4.62692 7.69062 4.74984 8.00004 4.74984C8.30946 4.74984 8.60621 4.62692 8.825 4.40813C9.04379 4.18934 9.16671 3.89259 9.16671 3.58317C9.16671 3.27375 9.04379 2.97701 8.825 2.75821C8.60621 2.53942 8.30946 2.4165 8.00004 2.4165C7.69062 2.4165 7.39388 2.53942 7.17508 2.75821C6.95629 2.97701 6.83337 3.27375 6.83337 3.58317Z%27 fill=%27currentColor%27/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/columns/column-filter/react/exampleCustomFilterButton.tsx","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__vue__exampleCustomFilterButton.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__vue__exampleCustomFilterButton.vue.json index 177a18de9..bdcef2c83 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__vue__exampleCustomFilterButton.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-filter__vue__exampleCustomFilterButton.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Columns ▸ Column filter · Customize the filter button · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#exampleCustomFilterButton\");","/src/App.vue":"\n\n\n\n"},"docsPath":"guides/columns/column-filter/vue/exampleCustomFilterButton.vue","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"Vue 3"} +{"framework":"vue","displayName":"Columns ▸ Column filter · Customize the filter button · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#exampleCustomFilterButton\");","/src/App.vue":"\n\n\n\n"},"docsPath":"guides/columns/column-filter/vue/exampleCustomFilterButton.vue","breadcrumb":["Columns","Column filter"],"guide":"guides/columns/column-filter/column-filter.md","guideTitle":"Column filter","exampleId":"exampleCustomFilterButton","exampleTitle":"Customize the filter button","docPermalink":"/column-filter","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__angular__example5.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__angular__example5.ts.json new file mode 100644 index 000000000..8e23d5974 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__angular__example5.ts.json @@ -0,0 +1 @@ +{"framework":"angular","displayName":"Columns ▸ Column freezing · Restore the column position on unfreeze · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\n\n@Component({\n selector: 'app-example5',\n template: `\n \n \n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n readonly colHeaders = ['SKU', 'Product', 'Category', 'Supplier', 'Warehouse', 'In stock', 'Unit price', 'Rating', 'Last restock', 'Status'];\n\n readonly hotData = [\n ['KB-1042', 'Mechanical Keyboard', 'Electronics', 'Alpine Supply Co.', 'Seattle', 142, 89.99, 4.6, '2025-03-14', 'Active'],\n ['WB-0093', 'Stainless Steel Water Bottle', 'Drinkware', 'Harbor Goods', 'Denver', 67, 24.5, 4.8, '2025-04-02', 'Active'],\n ['MS-2210', 'Wireless Mouse', 'Electronics', 'Alpine Supply Co.', 'Austin', 0, 34.99, 4.3, '2025-01-27', 'Discontinued'],\n ['BP-4821', 'Waterproof Backpack', 'Apparel', 'Northwind Traders', 'Portland', 38, 79, 4.5, '2025-05-19', 'Active'],\n ['DL-3307', 'LED Desk Lamp', 'Home Office', 'Harbor Goods', 'Denver', 215, 42.75, 4.1, '2025-02-08', 'Active'],\n ];\n\n readonly hotSettings: GridSettings = {\n colHeaders: this.colHeaders,\n colWidths: 110,\n width: '100%',\n height: 'auto',\n rowHeaders: true,\n contextMenu: true,\n manualColumnMove: true,\n manualColumnFreeze: {\n restoreColumnPosition: true,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/columns/column-freezing/angular/example5.ts","breadcrumb":["Columns","Column freezing"],"guide":"guides/columns/column-freezing/column-freezing.md","guideTitle":"Column freezing","exampleId":"example5","exampleTitle":"Restore the column position on unfreeze","docPermalink":"/column-freezing","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.js.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.js.json new file mode 100644 index 000000000..048a1b9df --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.js.json @@ -0,0 +1 @@ +{"framework":"javascript","displayName":"Columns ▸ Column freezing · Restore the column position on unfreeze · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst colHeaders = [\n 'SKU',\n 'Product',\n 'Category',\n 'Supplier',\n 'Warehouse',\n 'In stock',\n 'Unit price',\n 'Rating',\n 'Last restock',\n 'Status',\n];\n\n// inventory data\nconst data = [\n [\n 'KB-1042',\n 'Mechanical Keyboard',\n 'Electronics',\n 'Alpine Supply Co.',\n 'Seattle',\n 142,\n 89.99,\n 4.6,\n '2025-03-14',\n 'Active',\n ],\n [\n 'WB-0093',\n 'Stainless Steel Water Bottle',\n 'Drinkware',\n 'Harbor Goods',\n 'Denver',\n 67,\n 24.5,\n 4.8,\n '2025-04-02',\n 'Active',\n ],\n [\n 'MS-2210',\n 'Wireless Mouse',\n 'Electronics',\n 'Alpine Supply Co.',\n 'Austin',\n 0,\n 34.99,\n 4.3,\n '2025-01-27',\n 'Discontinued',\n ],\n ['BP-4821', 'Waterproof Backpack', 'Apparel', 'Northwind Traders', 'Portland', 38, 79, 4.5, '2025-05-19', 'Active'],\n ['DL-3307', 'LED Desk Lamp', 'Home Office', 'Harbor Goods', 'Denver', 215, 42.75, 4.1, '2025-02-08', 'Active'],\n];\n\nconst container = document.querySelector('#example5');\n\nnew Handsontable(container, {\n data,\n colHeaders,\n colWidths: 110,\n width: '100%',\n height: 'auto',\n rowHeaders: true,\n contextMenu: true,\n manualColumnMove: true,\n manualColumnFreeze: {\n restoreColumnPosition: true,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/columns/column-freezing/javascript/example5.js","breadcrumb":["Columns","Column freezing"],"guide":"guides/columns/column-freezing/column-freezing.md","guideTitle":"Column freezing","exampleId":"example5","exampleTitle":"Restore the column position on unfreeze","docPermalink":"/column-freezing","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.ts.json new file mode 100644 index 000000000..a303e7438 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__javascript__example5.ts.json @@ -0,0 +1 @@ +{"framework":"typescript","displayName":"Columns ▸ Column freezing · Restore the column position on unfreeze · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst colHeaders = ['SKU', 'Product', 'Category', 'Supplier', 'Warehouse', 'In stock', 'Unit price', 'Rating', 'Last restock', 'Status'];\n\n// inventory data\nconst data: (string | number)[][] = [\n ['KB-1042', 'Mechanical Keyboard', 'Electronics', 'Alpine Supply Co.', 'Seattle', 142, 89.99, 4.6, '2025-03-14', 'Active'],\n ['WB-0093', 'Stainless Steel Water Bottle', 'Drinkware', 'Harbor Goods', 'Denver', 67, 24.5, 4.8, '2025-04-02', 'Active'],\n ['MS-2210', 'Wireless Mouse', 'Electronics', 'Alpine Supply Co.', 'Austin', 0, 34.99, 4.3, '2025-01-27', 'Discontinued'],\n ['BP-4821', 'Waterproof Backpack', 'Apparel', 'Northwind Traders', 'Portland', 38, 79, 4.5, '2025-05-19', 'Active'],\n ['DL-3307', 'LED Desk Lamp', 'Home Office', 'Harbor Goods', 'Denver', 215, 42.75, 4.1, '2025-02-08', 'Active'],\n];\n\nconst container = document.querySelector('#example5')!;\n\nnew Handsontable(container, {\n data,\n colHeaders,\n colWidths: 110,\n width: '100%',\n height: 'auto',\n rowHeaders: true,\n contextMenu: true,\n manualColumnMove: true,\n manualColumnFreeze: {\n restoreColumnPosition: true,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/columns/column-freezing/javascript/example5.ts","breadcrumb":["Columns","Column freezing"],"guide":"guides/columns/column-freezing/column-freezing.md","guideTitle":"Column freezing","exampleId":"example5","exampleTitle":"Restore the column position on unfreeze","docPermalink":"/column-freezing","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__react__example5.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__react__example5.tsx.json new file mode 100644 index 000000000..db775e655 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__react__example5.tsx.json @@ -0,0 +1 @@ +{"framework":"react","displayName":"Columns ▸ Column freezing · Restore the column position on unfreeze · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example5\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst colHeaders = ['SKU', 'Product', 'Category', 'Supplier', 'Warehouse', 'In stock', 'Unit price', 'Rating', 'Last restock', 'Status'];\n\n// inventory data\nconst data = [\n ['KB-1042', 'Mechanical Keyboard', 'Electronics', 'Alpine Supply Co.', 'Seattle', 142, 89.99, 4.6, '2025-03-14', 'Active'],\n ['WB-0093', 'Stainless Steel Water Bottle', 'Drinkware', 'Harbor Goods', 'Denver', 67, 24.5, 4.8, '2025-04-02', 'Active'],\n ['MS-2210', 'Wireless Mouse', 'Electronics', 'Alpine Supply Co.', 'Austin', 0, 34.99, 4.3, '2025-01-27', 'Discontinued'],\n ['BP-4821', 'Waterproof Backpack', 'Apparel', 'Northwind Traders', 'Portland', 38, 79, 4.5, '2025-05-19', 'Active'],\n ['DL-3307', 'LED Desk Lamp', 'Home Office', 'Harbor Goods', 'Denver', 215, 42.75, 4.1, '2025-02-08', 'Active'],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/columns/column-freezing/react/example5.tsx","breadcrumb":["Columns","Column freezing"],"guide":"guides/columns/column-freezing/column-freezing.md","guideTitle":"Column freezing","exampleId":"example5","exampleTitle":"Restore the column position on unfreeze","docPermalink":"/column-freezing","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__vue__example5.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__vue__example5.vue.json new file mode 100644 index 000000000..2b94eb208 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/guides__columns__column-freezing__vue__example5.vue.json @@ -0,0 +1 @@ +{"framework":"vue","displayName":"Columns ▸ Column freezing · Restore the column position on unfreeze · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example5\");","/src/App.vue":"\n\n"},"docsPath":"guides/columns/column-freezing/vue/example5.vue","breadcrumb":["Columns","Column freezing"],"guide":"guides/columns/column-freezing/column-freezing.md","guideTitle":"Column freezing","exampleId":"example5","exampleTitle":"Restore the column position on unfreeze","docPermalink":"/column-freezing","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example-custom-functions.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example-custom-functions.ts.json index a52e11de1..b4e38ec30 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example-custom-functions.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example-custom-functions.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.4.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\n\n// HyperFormula does not export its parser and interpreter types from the package\n// entry point, so derive them from the inherited `runFunction` signature.\ntype RunFunction = FunctionPlugin['runFunction'];\ntype Ast = Parameters[0][number];\ntype ProcedureAst = Extract;\ntype InterpreterState = Parameters[1];\ntype InterpreterValue = ReturnType[3]>;\n\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast: ProcedureAst, state: InterpreterState): InterpreterValue {\n return this.runFunction(\n ast.args,\n state,\n this.metadata('COMMISSION'),\n (revenue: number, rate: number): number => revenue * (rate / 100),\n );\n }\n}\n\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\n\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example-custom-functions',\n template: `\n \n `,\n})\nexport class AppComponent {\n readonly data: (string | number)[][] = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: { engine: HyperFormula },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example-custom-functions.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"Angular"} +{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.5.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\n\n// HyperFormula does not export its parser and interpreter types from the package\n// entry point, so derive them from the inherited `runFunction` signature.\ntype RunFunction = FunctionPlugin['runFunction'];\ntype Ast = Parameters[0][number];\ntype ProcedureAst = Extract;\ntype InterpreterState = Parameters[1];\ntype InterpreterValue = ReturnType[3]>;\n\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast: ProcedureAst, state: InterpreterState): InterpreterValue {\n return this.runFunction(\n ast.args,\n state,\n this.metadata('COMMISSION'),\n (revenue: number, rate: number): number => revenue * (rate / 100),\n );\n }\n}\n\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\n\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example-custom-functions',\n template: `\n \n `,\n})\nexport class AppComponent {\n readonly data: (string | number)[][] = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n ];\n\n readonly gridSettings: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: { engine: HyperFormula },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example-custom-functions.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example1.ts.json index 9064da413..f1476a628 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example1.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.4.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\nimport {HyperFormula} from 'hyperformula';\n\n@Component({\n selector: 'app-example1',\n template: `\n

Sheet 1

\n \n \n\n

Sheet 2

\n \n \n `,\n styles: `\n h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n }\n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n // create an external HyperFormula instance\n readonly hyperformulaInstance = HyperFormula.buildEmpty({\n // to use an external HyperFormula instance,\n // initialize it with the `'internal-use-in-handsontable'` license key\n licenseKey: 'internal-use-in-handsontable',\n });\n\n readonly hotData1 = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n ];\n\n readonly hotSettings1: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: this.hyperformulaInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n\n readonly hotData2 = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n ];\n\n readonly hotSettings2: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: this.hyperformulaInstance,\n sheetName: 'Sheet2',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example1.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"Angular"} +{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.5.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\nimport {HyperFormula} from 'hyperformula';\n\n@Component({\n selector: 'app-example1',\n template: `\n

Sheet 1

\n \n \n\n

Sheet 2

\n \n \n `,\n styles: `\n h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n }\n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n // create an external HyperFormula instance\n readonly hyperformulaInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n });\n\n readonly hotData1 = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n ];\n\n readonly hotSettings1: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: this.hyperformulaInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n\n readonly hotData2 = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n ];\n\n readonly hotSettings2: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: this.hyperformulaInstance,\n sheetName: 'Sheet2',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example1.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example2.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example2.ts.json index 48fb08209..5f4c332bd 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example2.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example2.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Data grid example (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.4.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\nimport {HyperFormula} from 'hyperformula';\n\n@Component({\n selector: 'app-example2',\n template: `\n \n \n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n readonly hotData = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n [\n '=SUM(A1:A100)',\n '=AVERAGE(B1:B100)',\n '=AVERAGE(C1:C100)',\n '=SUM(D1:D100)',\n '=SUM(E1:E100)',\n ],\n ];\n\n readonly hotSettings: GridSettings = {\n formulas: {\n engine: HyperFormula,\n },\n colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],\n fixedRowsBottom: 2,\n stretchH: 'all',\n height: 500,\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example2.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example2","exampleTitle":"Data grid example (2)","docPermalink":"/formula-calculation","lang":"Angular"} +{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Data grid example (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.5.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\nimport {HyperFormula} from 'hyperformula';\n\n@Component({\n selector: 'app-example2',\n template: `\n \n \n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n readonly hotData = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n [\n '=SUM(A1:A100)',\n '=AVERAGE(B1:B100)',\n '=AVERAGE(C1:C100)',\n '=SUM(D1:D100)',\n '=SUM(E1:E100)',\n ],\n ];\n\n readonly hotSettings: GridSettings = {\n formulas: {\n engine: HyperFormula,\n },\n colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],\n fixedRowsBottom: 2,\n stretchH: 'all',\n height: 500,\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example2.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example2","exampleTitle":"Data grid example (2)","docPermalink":"/formula-calculation","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example3.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example3.ts.json index a2e1011f7..fab55d9e7 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example3.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example3.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.4.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation } from '@angular/core';\nimport {GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\nimport {FormControl, ReactiveFormsModule} from '@angular/forms';\nimport {HyperFormula} from 'hyperformula';\n\n@Component({\n standalone: true,\n imports: [HotTableModule, ReactiveFormsModule],\n selector: 'app-example3',\n template: `\n
\n
\n  \n \n
\n {{ errorMessage }}\n
\n\n \n \n `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, {static: false}) hotTable!: HotTableComponent;\n\n namedExpressionsControl = new FormControl('=10 * Sheet1!$A$2');\n\n errorMessage = '';\n\n readonly hotData = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n ];\n\n readonly hotSettings: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n namedExpressions: [\n {\n name: 'ADDITIONAL_COST',\n expression: 100,\n },\n ],\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n applyNamedExpression() {\n const formulasPlugin = this.hotTable.hotInstance!.getPlugin('formulas');\n\n try {\n (formulasPlugin.engine as any)?.changeNamedExpression('ADDITIONAL_COST', this.namedExpressionsControl.value);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n this.errorMessage = error instanceof Error ? error.message : String(error);\n\n return;\n }\n\n this.errorMessage = '';\n this.hotTable.hotInstance!.render();\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example3.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example3","exampleTitle":"Demo: plain-value named expression (2)","docPermalink":"/formula-calculation","lang":"Angular"} +{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.5.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, ViewChild, ViewEncapsulation } from '@angular/core';\nimport {GridSettings, HotTableComponent, HotTableModule} from '@handsontable/angular-wrapper';\nimport {FormControl, ReactiveFormsModule} from '@angular/forms';\nimport {HyperFormula} from 'hyperformula';\n\n@Component({\n standalone: true,\n imports: [HotTableModule, ReactiveFormsModule],\n selector: 'app-example3',\n template: `\n
\n
\n  \n \n
\n {{ errorMessage }}\n
\n\n \n \n `,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, {static: false}) hotTable!: HotTableComponent;\n\n namedExpressionsControl = new FormControl('=10 * Sheet1!$A$2');\n\n errorMessage = '';\n\n readonly hotData = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n ];\n\n readonly hotSettings: GridSettings = {\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n namedExpressions: [\n {\n name: 'ADDITIONAL_COST',\n expression: 100,\n },\n ],\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n\n applyNamedExpression() {\n const formulasPlugin = this.hotTable.hotInstance!.getPlugin('formulas');\n\n try {\n (formulasPlugin.engine as any)?.changeNamedExpression('ADDITIONAL_COST', this.namedExpressionsControl.value);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n this.errorMessage = error instanceof Error ? error.message : String(error);\n\n return;\n }\n\n this.errorMessage = '';\n this.hotTable.hotInstance!.render();\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example3.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example3","exampleTitle":"Demo: plain-value named expression (2)","docPermalink":"/formula-calculation","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example4.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example4.ts.json index 6dbe419ef..3caadccb7 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example4.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__angular__example4.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.4.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\nimport { HyperFormula } from 'hyperformula';\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine in the constructor so the sheet is created first.\n@Component({\n selector: 'app-example4',\n template: `\n \n \n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n readonly hotData = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n ];\n\n readonly hotSettings: GridSettings;\n\n constructor() {\n const hfInstance = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n });\n\n hfInstance.addSheet('Sheet1');\n hfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\n hfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\n this.hotSettings = {\n colHeaders: ['Product', 'Q1 Sales', 'Q2 Sales'],\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hfInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example4.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example4","exampleTitle":"Demo: formula-based named expressions (2)","docPermalink":"/formula-calculation","lang":"Angular"} +{"framework":"angular","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"hyperformula\": \"3.5.0\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\nimport { HyperFormula } from 'hyperformula';\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine in the constructor so the sheet is created first.\n@Component({\n selector: 'app-example4',\n template: `\n \n \n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n readonly hotData = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n ];\n\n readonly hotSettings: GridSettings;\n\n constructor() {\n const hfInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n });\n\n hfInstance.addSheet('Sheet1');\n hfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\n hfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\n this.hotSettings = {\n colHeaders: ['Product', 'Q1 Sales', 'Q2 Sales'],\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hfInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n };\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/formulas/formula-calculation/angular/example4.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example4","exampleTitle":"Demo: formula-based named expressions (2)","docPermalink":"/formula-calculation","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.js.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.js.json index 44b2afe78..d0268a5d8 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\n// Register all Handsontable's modules.\nregisterAllModules();\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast, state) {\n return this.runFunction(ast.args, state, this.metadata('COMMISSION'), (revenue, rate) => revenue * (rate / 100));\n }\n}\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\nconst data = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n];\nconst container = document.querySelector('#example-custom-functions');\nnew Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-custom-functions.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"JavaScript"} +{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\n// Register all Handsontable's modules.\nregisterAllModules();\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast, state) {\n return this.runFunction(ast.args, state, this.metadata('COMMISSION'), (revenue, rate) => revenue * (rate / 100));\n }\n}\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\nconst data = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n];\nconst container = document.querySelector('#example-custom-functions');\nnew Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-custom-functions.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.ts.json index a440b0795..1b9de1c6a 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-custom-functions.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\n\n// HyperFormula does not export its parser and interpreter types from the package\n// entry point, so derive them from the inherited `runFunction` signature.\ntype RunFunction = FunctionPlugin['runFunction'];\ntype Ast = Parameters[0][number];\ntype ProcedureAst = Extract;\ntype InterpreterState = Parameters[1];\ntype InterpreterValue = ReturnType[3]>;\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast: ProcedureAst, state: InterpreterState): InterpreterValue {\n return this.runFunction(\n ast.args,\n state,\n this.metadata('COMMISSION'),\n (revenue: number, rate: number): number => revenue * (rate / 100),\n );\n }\n}\n\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\n\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\n\nconst data: (string | number)[][] = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n];\n\nconst container = document.querySelector('#example-custom-functions')!;\n\nnew Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-custom-functions.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"TypeScript"} +{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\n\n// HyperFormula does not export its parser and interpreter types from the package\n// entry point, so derive them from the inherited `runFunction` signature.\ntype RunFunction = FunctionPlugin['runFunction'];\ntype Ast = Parameters[0][number];\ntype ProcedureAst = Extract;\ntype InterpreterState = Parameters[1];\ntype InterpreterValue = ReturnType[3]>;\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast: ProcedureAst, state: InterpreterState): InterpreterValue {\n return this.runFunction(\n ast.args,\n state,\n this.metadata('COMMISSION'),\n (revenue: number, rate: number): number => revenue * (rate / 100),\n );\n }\n}\n\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\n\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\n\nconst data: (string | number)[][] = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n];\n\nconst container = document.querySelector('#example-custom-functions')!;\n\nnew Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-custom-functions.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.js.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.js.json index c905bbcd8..0f6ba2220 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Data grid example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n ['=SUM(A1:A100)', '=AVERAGE(B1:B100)', '=AVERAGE(C1:C100)', '=SUM(D1:D100)', '=SUM(E1:E100)'],\n];\n\nconst container = document.querySelector('#example-data-grid');\n\nnew Handsontable(container, {\n data,\n formulas: {\n engine: HyperFormula,\n },\n colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],\n fixedRowsBottom: 2,\n stretchH: 'all',\n height: 500,\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-data-grid.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"JavaScript"} +{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Data grid example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n ['=SUM(A1:A100)', '=AVERAGE(B1:B100)', '=AVERAGE(C1:C100)', '=SUM(D1:D100)', '=SUM(E1:E100)'],\n];\n\nconst container = document.querySelector('#example-data-grid');\n\nnew Handsontable(container, {\n data,\n formulas: {\n engine: HyperFormula,\n },\n colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],\n fixedRowsBottom: 2,\n stretchH: 'all',\n height: 500,\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-data-grid.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.ts.json index 884fa373b..4d5ce94ed 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-data-grid.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Data grid example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data: (string | number)[][] = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n ['=SUM(A1:A100)', '=AVERAGE(B1:B100)', '=AVERAGE(C1:C100)', '=SUM(D1:D100)', '=SUM(E1:E100)'],\n];\n\nconst container = document.querySelector('#example-data-grid')!;\n\nnew Handsontable(container, {\n data,\n formulas: {\n engine: HyperFormula,\n },\n colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],\n fixedRowsBottom: 2,\n stretchH: 'all',\n height: 500,\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-data-grid.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"TypeScript"} +{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Data grid example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data: (string | number)[][] = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n ['=SUM(A1:A100)', '=AVERAGE(B1:B100)', '=AVERAGE(C1:C100)', '=SUM(D1:D100)', '=SUM(E1:E100)'],\n];\n\nconst container = document.querySelector('#example-data-grid')!;\n\nnew Handsontable(container, {\n data,\n formulas: {\n engine: HyperFormula,\n },\n colHeaders: ['Qty', 'Unit price', 'Discount', 'Freight', 'Total due (fx)'],\n fixedRowsBottom: 2,\n stretchH: 'all',\n height: 500,\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-data-grid.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.js.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.js.json index c28cc8574..d45819af1 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n \n \n
\n \n
\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n];\n\nconst container = document.querySelector('#example-named-expressions1');\nconst hot = new Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n namedExpressions: [\n {\n name: 'ADDITIONAL_COST',\n expression: 100,\n },\n ],\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst input = document.getElementById('named-expressions-input');\nconst formulasPlugin = hot.getPlugin('formulas');\nconst button = document.getElementById('named-expressions-button');\nconst statusOutput = document.getElementById('named-expressions-status');\n\nbutton.addEventListener('click', () => {\n try {\n formulasPlugin.engine?.changeNamedExpression('ADDITIONAL_COST', input.value);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n statusOutput.textContent = error instanceof Error ? error.message : String(error);\n statusOutput.classList.add('is-error');\n\n return;\n }\n\n statusOutput.textContent = '';\n statusOutput.classList.remove('is-error');\n hot.render();\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions1.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"JavaScript"} +{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n \n \n
\n \n
\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n];\n\nconst container = document.querySelector('#example-named-expressions1');\nconst hot = new Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n namedExpressions: [\n {\n name: 'ADDITIONAL_COST',\n expression: 100,\n },\n ],\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst input = document.getElementById('named-expressions-input');\nconst formulasPlugin = hot.getPlugin('formulas');\nconst button = document.getElementById('named-expressions-button');\nconst statusOutput = document.getElementById('named-expressions-status');\n\nbutton.addEventListener('click', () => {\n try {\n formulasPlugin.engine?.changeNamedExpression('ADDITIONAL_COST', input.value);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n statusOutput.textContent = error instanceof Error ? error.message : String(error);\n statusOutput.classList.add('is-error');\n\n return;\n }\n\n statusOutput.textContent = '';\n statusOutput.classList.remove('is-error');\n hot.render();\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions1.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.ts.json index aeb4febf3..24277b812 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n \n \n
\n \n
\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\nimport { Formulas } from 'handsontable/plugins';\nimport { DetailedSettings } from 'handsontable/plugins/formulas';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data: (string | number)[][] = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n];\n\nconst container = document.querySelector('#example-named-expressions1')!;\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n namedExpressions: [\n {\n name: 'ADDITIONAL_COST',\n expression: 100,\n },\n ],\n } as DetailedSettings,\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst input = document.getElementById('named-expressions-input')!;\nconst formulasPlugin: Formulas = hot.getPlugin('formulas');\nconst button = document.getElementById('named-expressions-button')!;\nconst statusOutput = document.getElementById('named-expressions-status')!;\n\nbutton!.addEventListener('click', () => {\n try {\n formulasPlugin.engine?.changeNamedExpression('ADDITIONAL_COST', (input as HTMLInputElement).value);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n statusOutput.textContent = error instanceof Error ? error.message : String(error);\n statusOutput.classList.add('is-error');\n\n return;\n }\n\n statusOutput.textContent = '';\n statusOutput.classList.remove('is-error');\n hot.render();\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions1.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"TypeScript"} +{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n
\n \n \n
\n \n
\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\nimport { Formulas } from 'handsontable/plugins';\nimport { DetailedSettings } from 'handsontable/plugins/formulas';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data: (string | number)[][] = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n];\n\nconst container = document.querySelector('#example-named-expressions1')!;\n\nconst hot = new Handsontable(container, {\n data,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: HyperFormula,\n namedExpressions: [\n {\n name: 'ADDITIONAL_COST',\n expression: 100,\n },\n ],\n } as DetailedSettings,\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst input = document.getElementById('named-expressions-input')!;\nconst formulasPlugin: Formulas = hot.getPlugin('formulas');\nconst button = document.getElementById('named-expressions-button')!;\nconst statusOutput = document.getElementById('named-expressions-status')!;\n\nbutton!.addEventListener('click', () => {\n try {\n formulasPlugin.engine?.changeNamedExpression('ADDITIONAL_COST', (input as HTMLInputElement).value);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n statusOutput.textContent = error instanceof Error ? error.message : String(error);\n statusOutput.classList.add('is-error');\n\n return;\n }\n\n statusOutput.textContent = '';\n statusOutput.classList.remove('is-error');\n hot.render();\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions1.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.js.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.js.json index 587f4bca4..c78da2a54 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine, add the sheet, then add the named expressions.\nconst hfInstance = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\n\nhfInstance.addSheet('Sheet1');\nhfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\nhfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\nconst data = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n];\n\nconst container = document.querySelector('#example-named-expressions2');\n\nnew Handsontable(container, {\n data,\n colHeaders: ['Product', 'Q1 Sales', 'Q2 Sales'],\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hfInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions2.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"JavaScript"} +{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine, add the sheet, then add the named expressions.\nconst hfInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nhfInstance.addSheet('Sheet1');\nhfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\nhfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\nconst data = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n];\n\nconst container = document.querySelector('#example-named-expressions2');\n\nnew Handsontable(container, {\n data,\n colHeaders: ['Product', 'Q1 Sales', 'Q2 Sales'],\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hfInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions2.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.ts.json index 5ad08f9e5..bd3045650 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example-named-expressions2.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine, add the sheet, then add the named expressions.\nconst hfInstance = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\n\nhfInstance.addSheet('Sheet1');\nhfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\nhfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\nconst data: (string | number)[][] = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n];\n\nconst container = document.querySelector('#example-named-expressions2')!;\n\nnew Handsontable(container, {\n data,\n colHeaders: ['Product', 'Q1 Sales', 'Q2 Sales'],\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hfInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions2.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"TypeScript"} +{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine, add the sheet, then add the named expressions.\nconst hfInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nhfInstance.addSheet('Sheet1');\nhfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\nhfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\nconst data: (string | number)[][] = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n];\n\nconst container = document.querySelector('#example-named-expressions2')!;\n\nnew Handsontable(container, {\n data,\n colHeaders: ['Product', 'Q1 Sales', 'Q2 Sales'],\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hfInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"guides/formulas/formula-calculation/javascript/example-named-expressions2.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.js.json index 7abbb9430..3fa22f6e6 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n

Sheet 1

\n
\n

Sheet 2

\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data1 = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n];\n\nconst data2 = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n];\n\n// create an external HyperFormula instance\nconst hyperformulaInstance = HyperFormula.buildEmpty({\n // to use an external HyperFormula instance,\n // initialize it with the `'internal-use-in-handsontable'` license key\n licenseKey: 'internal-use-in-handsontable',\n});\n\nconst container1 = document.querySelector('#example-basic-multi-sheet-1');\n\nnew Handsontable(container1, {\n data: data1,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst container2 = document.querySelector('#example-basic-multi-sheet-2');\n\nnew Handsontable(container2, {\n data: data2,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet2',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/javascript/example1.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"JavaScript"} +{"framework":"javascript","displayName":"Formulas ▸ Formula calculation · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n

Sheet 1

\n
\n

Sheet 2

\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data1 = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n];\n\nconst data2 = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n];\n\n// create an external HyperFormula instance\nconst hyperformulaInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nconst container1 = document.querySelector('#example-basic-multi-sheet-1');\n\nnew Handsontable(container1, {\n data: data1,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst container2 = document.querySelector('#example-basic-multi-sheet-2');\n\nnew Handsontable(container2, {\n data: data2,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet2',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/javascript/example1.js","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.ts.json index e26baa69a..6f96b8e8f 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__javascript__example1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n

Sheet 1

\n
\n

Sheet 2

\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data1: [string, null, string, string][] = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n];\n\nconst data2: [string, string][] = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n];\n\n// create an external HyperFormula instance\nconst hyperformulaInstance = HyperFormula.buildEmpty({\n // to use an external HyperFormula instance,\n // initialize it with the `'internal-use-in-handsontable'` license key\n licenseKey: 'internal-use-in-handsontable',\n});\n\nconst container1 = document.querySelector('#example-basic-multi-sheet-1')!;\n\nnew Handsontable(container1, {\n data: data1,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst container2 = document.querySelector('#example-basic-multi-sheet-2')!;\n\nnew Handsontable(container2, {\n data: data2,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet2',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/javascript/example1.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"TypeScript"} +{"framework":"typescript","displayName":"Formulas ▸ Formula calculation · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n

Sheet 1

\n
\n

Sheet 2

\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HyperFormula } from 'hyperformula';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst data1: [string, null, string, string][] = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n];\n\nconst data2: [string, string][] = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n];\n\n// create an external HyperFormula instance\nconst hyperformulaInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nconst container1 = document.querySelector('#example-basic-multi-sheet-1')!;\n\nnew Handsontable(container1, {\n data: data1,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet1',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\nconst container2 = document.querySelector('#example-basic-multi-sheet-2')!;\n\nnew Handsontable(container2, {\n data: data2,\n colHeaders: true,\n rowHeaders: true,\n height: 'auto',\n formulas: {\n engine: hyperformulaInstance,\n sheetName: 'Sheet2',\n },\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/javascript/example1.ts","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-custom-functions.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-custom-functions.tsx.json index 45a60afc5..3c5e65d37 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-custom-functions.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-custom-functions.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-custom-functions\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport type { DetailedSettings } from 'handsontable/plugins/formulas';\n\n// HyperFormula does not export its parser and interpreter types from the package\n// entry point, so derive them from the inherited `runFunction` signature.\ntype RunFunction = FunctionPlugin['runFunction'];\ntype Ast = Parameters[0][number];\ntype ProcedureAst = Extract;\ntype InterpreterState = Parameters[1];\ntype InterpreterValue = ReturnType[3]>;\n\n// register Handsontable's modules\nregisterAllModules();\n\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast: ProcedureAst, state: InterpreterState): InterpreterValue {\n return this.runFunction(\n ast.args,\n state,\n this.metadata('COMMISSION'),\n (revenue: number, rate: number): number => revenue * (rate / 100),\n );\n }\n}\n\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\n\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\n\nconst data: (string | number)[][] = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-custom-functions.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"React (TS)"} +{"framework":"react","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-custom-functions\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { FunctionArgumentType, FunctionPlugin, HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport type { DetailedSettings } from 'handsontable/plugins/formulas';\n\n// HyperFormula does not export its parser and interpreter types from the package\n// entry point, so derive them from the inherited `runFunction` signature.\ntype RunFunction = FunctionPlugin['runFunction'];\ntype Ast = Parameters[0][number];\ntype ProcedureAst = Extract;\ntype InterpreterState = Parameters[1];\ntype InterpreterValue = ReturnType[3]>;\n\n// register Handsontable's modules\nregisterAllModules();\n\nclass CommissionPlugin extends FunctionPlugin {\n commission(ast: ProcedureAst, state: InterpreterState): InterpreterValue {\n return this.runFunction(\n ast.args,\n state,\n this.metadata('COMMISSION'),\n (revenue: number, rate: number): number => revenue * (rate / 100),\n );\n }\n}\n\nCommissionPlugin.implementedFunctions = {\n COMMISSION: {\n method: 'commission',\n parameters: [\n { argumentType: FunctionArgumentType.NUMBER },\n { argumentType: FunctionArgumentType.NUMBER },\n ],\n },\n};\n\nHyperFormula.registerFunctionPlugin(CommissionPlugin, {\n enGB: { COMMISSION: 'COMMISSION' },\n});\n\nconst data: (string | number)[][] = [\n ['Sales rep', 'Revenue (USD)', 'Commission rate (%)', 'Commission amount (USD)'],\n ['Ana García', 45000, 8, '=COMMISSION(B2,C2)'],\n ['James Okafor', 62000, 10, '=COMMISSION(B3,C3)'],\n ['Li Wei', 38000, 8, '=COMMISSION(B4,C4)'],\n ['Maria Santos', 71000, 12, '=COMMISSION(B5,C5)'],\n ['David Kim', 29000, 7, '=COMMISSION(B6,C6)'],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-custom-functions.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-data-grid.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-data-grid.tsx.json index 74fb5f39c..85a5ef2a3 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-data-grid.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-data-grid.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Formulas ▸ Formula calculation · Data grid example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-data-grid\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst ExampleComponent = () => {\n const data = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n ['=SUM(A1:A100)', '=AVERAGE(B1:B100)', '=AVERAGE(C1:C100)', '=SUM(D1:D100)', '=SUM(E1:E100)'],\n ];\n\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-data-grid.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"React (TS)"} +{"framework":"react","displayName":"Formulas ▸ Formula calculation · Data grid example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-data-grid\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst ExampleComponent = () => {\n const data = [\n ['150', '643', '0.32', '11', '=A1*(B1*C1)+D1'],\n ['172', '474', '0.51', '11', '=A2*(B2*C2)+D2'],\n ['188', '371', '0.59', '11', '=A3*(B3*C3)+D3'],\n ['162', '731', '0.21', '10', '=A4*(B4*C4)+D4'],\n ['133', '682', '0.81', '9', '=A5*(B5*C5)+D5'],\n ['87', '553', '0.66', '10', '=A6*(B6*C6)+D6'],\n ['26', '592', '0.62', '11', '=A7*(B7*C7)+D7'],\n ['110', '461', '0.73', '9', '=A8*(B8*C8)+D8'],\n ['50', '346', '0.52', '15', '=A9*(B9*C9)+D9'],\n ['160', '423', '0.82', '11', '=A10*(B10*C10)+D10'],\n ['30', '216', '0.26', '9', '=A11*(B11*C11)+D11'],\n ['39', '473', '0.44', '5', '=A12*(B12*C12)+D12'],\n ['96', '490', '0.43', '5', '=A13*(B13*C13)+D13'],\n ['108', '176', '0.71', '7', '=A14*(B14*C14)+D14'],\n ['46', '586', '0.01', '14', '=A15*(B15*C15)+D15'],\n ['97', '514', '0.7', '14', '=A16*(B16*C16)+D16'],\n ['161', '717', '0.01', '13', '=A17*(B17*C17)+D17'],\n ['58', '123', '0.4', '8', '=A18*(B18*C18)+D18'],\n ['92', '739', '0.76', '14', '=A19*(B19*C19)+D19'],\n ['5', '320', '0.52', '13', '=A20*(B20*C20)+D20'],\n ['158', '480', '0.65', '5', '=A21*(B21*C21)+D21'],\n ['121', '373', '0.66', '8', '=A22*(B22*C22)+D22'],\n ['61', '704', '0.95', '7', '=A23*(B23*C23)+D23'],\n ['155', '452', '0.71', '10', '=A24*(B24*C24)+D24'],\n ['162', '693', '0.73', '11', '=A25*(B25*C25)+D25'],\n ['46', '75', '0.14', '15', '=A26*(B26*C26)+D26'],\n ['47', '691', '0.58', '15', '=A27*(B27*C27)+D27'],\n ['104', '346', '0.04', '7', '=A28*(B28*C28)+D28'],\n ['101', '717', '0.87', '5', '=A29*(B29*C29)+D29'],\n ['150', '487', '0.26', '15', '=A30*(B30*C30)+D30'],\n ['42', '465', '0.09', '14', '=A31*(B31*C31)+D31'],\n ['144', '337', '0.72', '7', '=A32*(B32*C32)+D32'],\n ['195', '138', '0.3', '6', '=A33*(B33*C33)+D33'],\n ['199', '717', '0.16', '6', '=A34*(B34*C34)+D34'],\n ['110', '236', '0.91', '9', '=A35*(B35*C35)+D35'],\n ['51', '351', '0.81', '13', '=A36*(B36*C36)+D36'],\n ['69', '221', '0.64', '9', '=A37*(B37*C37)+D37'],\n ['53', '125', '0.28', '12', '=A38*(B38*C38)+D38'],\n ['168', '428', '0.68', '9', '=A39*(B39*C39)+D39'],\n ['58', '361', '0.36', '5', '=A40*(B40*C40)+D40'],\n ['152', '213', '0.13', '13', '=A41*(B41*C41)+D41'],\n ['66', '431', '0.93', '10', '=A42*(B42*C42)+D42'],\n ['112', '108', '0.5', '14', '=A43*(B43*C43)+D43'],\n ['50', '127', '0.7', '7', '=A44*(B44*C44)+D44'],\n ['31', '200', '0.15', '14', '=A45*(B45*C45)+D45'],\n ['132', '654', '0.81', '8', '=A46*(B46*C46)+D46'],\n ['45', '438', '0.79', '6', '=A47*(B47*C47)+D47'],\n ['197', '615', '0.63', '7', '=A48*(B48*C48)+D48'],\n ['190', '592', '0.37', '8', '=A49*(B49*C49)+D49'],\n ['184', '419', '0.78', '8', '=A50*(B50*C50)+D50'],\n ['169', '58', '0.13', '7', '=A51*(B51*C51)+D51'],\n ['152', '324', '0.58', '5', '=A52*(B52*C52)+D52'],\n ['182', '713', '0.53', '5', '=A53*(B53*C53)+D53'],\n ['141', '576', '0.63', '12', '=A54*(B54*C54)+D54'],\n ['169', '429', '0.14', '13', '=A55*(B55*C55)+D55'],\n ['39', '694', '0.98', '13', '=A56*(B56*C56)+D56'],\n ['71', '361', '0.3', '13', '=A57*(B57*C57)+D57'],\n ['148', '540', '0.89', '6', '=A58*(B58*C58)+D58'],\n ['116', '52', '0.3', '7', '=A59*(B59*C59)+D59'],\n ['96', '395', '0.28', '7', '=A60*(B60*C60)+D60'],\n ['35', '222', '0.86', '13', '=A61*(B61*C61)+D61'],\n ['16', '430', '0.8', '8', '=A62*(B62*C62)+D62'],\n ['194', '357', '0.72', '9', '=A63*(B63*C63)+D63'],\n ['24', '498', '0.7', '7', '=A64*(B64*C64)+D64'],\n ['170', '142', '0.52', '5', '=A65*(B65*C65)+D65'],\n ['184', '614', '0.68', '9', '=A66*(B66*C66)+D66'],\n ['153', '524', '0.15', '9', '=A67*(B67*C67)+D67'],\n ['88', '620', '0.39', '15', '=A68*(B68*C68)+D68'],\n ['57', '452', '0.11', '6', '=A69*(B69*C69)+D69'],\n ['62', '493', '0.03', '11', '=A70*(B70*C70)+D70'],\n ['123', '431', '0.75', '15', '=A71*(B71*C71)+D71'],\n ['77', '113', '0.63', '12', '=A72*(B72*C72)+D72'],\n ['199', '208', '0.07', '6', '=A73*(B73*C73)+D73'],\n ['149', '514', '0.42', '12', '=A74*(B74*C74)+D74'],\n ['191', '334', '0.78', '13', '=A75*(B75*C75)+D75'],\n ['150', '643', '0.32', '11', '=A76*(B76*C76)+D76'],\n ['130', '721', '0.62', '5', '=A77*(B77*C77)+D77'],\n ['179', '517', '0.1', '8', '=A78*(B78*C78)+D78'],\n ['98', '31', '0.01', '10', '=A79*(B79*C79)+D79'],\n ['175', '509', '0.7', '11', '=A80*(B80*C80)+D80'],\n ['11', '569', '0.37', '7', '=A81*(B81*C81)+D81'],\n ['184', '630', '0.19', '6', '=A82*(B82*C82)+D82'],\n ['27', '165', '0.51', '13', '=A83*(B83*C83)+D83'],\n ['186', '417', '0.85', '15', '=A84*(B84*C84)+D84'],\n ['20', '741', '0.76', '11', '=A85*(B85*C85)+D85'],\n ['153', '640', '0.28', '6', '=A86*(B86*C86)+D86'],\n ['161', '542', '0.43', '14', '=A87*(B87*C87)+D87'],\n ['98', '344', '0.77', '6', '=A88*(B88*C88)+D88'],\n ['30', '400', '0.71', '13', '=A89*(B89*C89)+D89'],\n ['73', '91', '0.78', '8', '=A90*(B90*C90)+D90'],\n ['158', '72', '0.66', '12', '=A91*(B91*C91)+D91'],\n ['122', '35', '0.32', '15', '=A92*(B92*C92)+D92'],\n ['33', '99', '0.92', '9', '=A93*(B93*C93)+D93'],\n ['107', '538', '0.75', '10', '=A94*(B94*C94)+D94'],\n ['15', '563', '0.32', '6', '=A95*(B95*C95)+D95'],\n ['168', '572', '0.71', '6', '=A96*(B96*C96)+D96'],\n ['135', '217', '0.49', '12', '=A97*(B97*C97)+D97'],\n ['11', '595', '0.03', '13', '=A98*(B98*C98)+D98'],\n ['41', '739', '0.88', '11', '=A99*(B99*C99)+D99'],\n ['144', '289', '0.87', '13', '=A100*(B100*C100)+D100'],\n ['Sum', 'Average', 'Average', 'Sum', 'Sum'],\n ['=SUM(A1:A100)', '=AVERAGE(B1:B100)', '=AVERAGE(C1:C100)', '=SUM(D1:D100)', '=SUM(E1:E100)'],\n ];\n\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-data-grid.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions1.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions1.tsx.json index ede404387..acfa4c8ed 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions1.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions1.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-named-expressions1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { ChangeEvent, useRef, useState } from 'react';\nimport { HyperFormula } from 'hyperformula';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { DetailedSettings } from 'handsontable/plugins/formulas';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst ExampleComponent = () => {\n const hotNamedExpressionsRef = useRef(null);\n const [namedExpressionValue, setNamedExpressionValue] = useState('=10 * Sheet1!$A$2');\n const [errorMessage, setErrorMessage] = useState('');\n\n const data = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n ];\n\n const inputChangeCallback = (event: ChangeEvent) => {\n setNamedExpressionValue(event.target.value);\n };\n\n const buttonClickCallback = () => {\n const hotNamedExpressions = hotNamedExpressionsRef.current?.hotInstance;\n const formulasPlugin = hotNamedExpressions?.getPlugin('formulas');\n\n try {\n formulasPlugin?.engine?.changeNamedExpression('ADDITIONAL_COST', namedExpressionValue);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n setErrorMessage(error instanceof Error ? error.message : String(error));\n\n return;\n }\n\n setErrorMessage('');\n hotNamedExpressions?.render();\n };\n\n return (\n <>\n
\n
\n inputChangeCallback(...args)}\n />\n \n
\n {errorMessage}\n
\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-named-expressions1.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"React (TS)"} +{"framework":"react","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-named-expressions1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { ChangeEvent, useRef, useState } from 'react';\nimport { HyperFormula } from 'hyperformula';\nimport { HotTable, HotTableRef } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { DetailedSettings } from 'handsontable/plugins/formulas';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst ExampleComponent = () => {\n const hotNamedExpressionsRef = useRef(null);\n const [namedExpressionValue, setNamedExpressionValue] = useState('=10 * Sheet1!$A$2');\n const [errorMessage, setErrorMessage] = useState('');\n\n const data = [\n ['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],\n ['154', 'Rome', 400, '=ROUND(ADDITIONAL_COST+C2,0)'],\n ['155', 'Athens', 300, '=ROUND(ADDITIONAL_COST+C3,0)'],\n ['156', 'Warsaw', 150, '=ROUND(ADDITIONAL_COST+C4,0)'],\n ];\n\n const inputChangeCallback = (event: ChangeEvent) => {\n setNamedExpressionValue(event.target.value);\n };\n\n const buttonClickCallback = () => {\n const hotNamedExpressions = hotNamedExpressionsRef.current?.hotInstance;\n const formulasPlugin = hotNamedExpressions?.getPlugin('formulas');\n\n try {\n formulasPlugin?.engine?.changeNamedExpression('ADDITIONAL_COST', namedExpressionValue);\n } catch (error) {\n // HyperFormula rejects some expressions, for example relative references such as `Sheet1!A2`.\n setErrorMessage(error instanceof Error ? error.message : String(error));\n\n return;\n }\n\n setErrorMessage('');\n hotNamedExpressions?.render();\n };\n\n return (\n <>\n
\n
\n inputChangeCallback(...args)}\n />\n \n
\n {errorMessage}\n
\n \n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-named-expressions1.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions2.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions2.tsx.json index cafbcc08e..483f9ff16 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions2.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example-named-expressions2.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-named-expressions2\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine at module level so it is created only once.\nconst hfInstance = HyperFormula.buildEmpty({\n licenseKey: 'internal-use-in-handsontable',\n});\n\nhfInstance.addSheet('Sheet1');\nhfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\nhfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\nconst data = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-named-expressions2.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"React (TS)"} +{"framework":"react","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example-named-expressions2\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\n// Named expressions that reference cell ranges must be registered after the sheet\n// exists. Pre-build the engine at module level so it is created only once.\nconst hfInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n});\n\nhfInstance.addSheet('Sheet1');\nhfInstance.addNamedExpression('Q1_TOTAL', '=SUM(Sheet1!$B$1:$B$3)');\nhfInstance.addNamedExpression('Q2_TOTAL', '=SUM(Sheet1!$C$1:$C$3)');\n\nconst data = [\n ['Widget A', 200, 250],\n ['Widget B', 150, 300],\n ['Widget C', 400, 350],\n ['Totals', '=Q1_TOTAL', '=Q2_TOTAL'],\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;"},"docsPath":"guides/formulas/formula-calculation/react/example-named-expressions2.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example1.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example1.tsx.json index ba8b3aa9c..b4c5e5ab2 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example1.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__react__example1.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Formulas ▸ Formula calculation · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst ExampleComponent = () => {\n const data1 = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n ];\n\n const data2 = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n ];\n\n // create an external HyperFormula instance\n const hyperformulaInstance = HyperFormula.buildEmpty({\n // to use an external HyperFormula instance,\n // initialize it with the `'internal-use-in-handsontable'` license key\n licenseKey: 'internal-use-in-handsontable',\n });\n\n return (\n <>\n

Sheet 1

\n \n

Sheet 2

\n \n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/react/example1.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"React (TS)"} +{"framework":"react","displayName":"Formulas ▸ Formula calculation · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HyperFormula } from 'hyperformula';\nimport { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst ExampleComponent = () => {\n const data1 = [\n ['10.26', null, 'Sum', '=SUM(A:A)'],\n ['20.12', null, 'Average', '=AVERAGE(A:A)'],\n ['30.01', null, 'Median', '=MEDIAN(A:A)'],\n ['40.29', null, 'MAX', '=MAX(A:A)'],\n ['50.18', null, 'MIN', '=MIN(A1:A5)'],\n ];\n\n const data2 = [\n ['Is A1 in Sheet1 > 10?', '=IF(Sheet1!A1>10,\"TRUE\",\"FALSE\")'],\n ['Is A:A in Sheet > 150?', '=IF(SUM(Sheet1!A:A)>150,\"TRUE\",\"FALSE\")'],\n ['How many blank cells are in the Sheet1?', '=COUNTBLANK(Sheet1!A1:D5)'],\n ['Generate a random number', '=RAND()'],\n ['Number of sheets in this workbook', '=SHEETS()'],\n ];\n\n // create an external HyperFormula instance\n const hyperformulaInstance = HyperFormula.buildEmpty({\n // this demo uses the GPLv3 key,\n // use your own HyperFormula license key in your app\n licenseKey: 'gpl-v3',\n });\n\n return (\n <>\n

Sheet 1

\n \n

Sheet 2

\n \n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/react/example1.tsx","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-custom-functions.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-custom-functions.vue.json index ace30c8dc..b44eaf6c5 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-custom-functions.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-custom-functions.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-custom-functions\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-custom-functions.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"Vue 3"} +{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Demo: custom COMMISSION function · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-custom-functions\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-custom-functions.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-custom-functions","exampleTitle":"Demo: custom COMMISSION function","docPermalink":"/formula-calculation","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-data-grid.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-data-grid.vue.json index 5a294c1e6..b8faef580 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-data-grid.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-data-grid.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Data grid example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-data-grid\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-data-grid.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"Vue 3"} +{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Data grid example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-data-grid\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-data-grid.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-data-grid","exampleTitle":"Data grid example","docPermalink":"/formula-calculation","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions1.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions1.vue.json index 6dabeb3b5..a4035e846 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-named-expressions1\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-named-expressions1.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"Vue 3"} +{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Demo: plain-value named expression · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-named-expressions1\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-named-expressions1.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions1","exampleTitle":"Demo: plain-value named expression","docPermalink":"/formula-calculation","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions2.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions2.vue.json index 9e3033ed8..1f8091ccc 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions2.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example-named-expressions2.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-named-expressions2\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-named-expressions2.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"Vue 3"} +{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Demo: formula-based named expressions · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example-named-expressions2\");","/src/App.vue":"\n\n"},"docsPath":"guides/formulas/formula-calculation/vue/example-named-expressions2.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example-named-expressions2","exampleTitle":"Demo: formula-based named expressions","docPermalink":"/formula-calculation","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example1.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example1.vue.json index eb322590c..0821f480b 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__formulas__formula-calculation__vue__example1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n","/src/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/vue/example1.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"Vue 3"} +{"framework":"vue","displayName":"Formulas ▸ Formula calculation · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"hyperformula\": \"3.5.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n","/src/styles.css":"h3.demo-preview {\n margin-bottom: 0.3rem !important;\n padding-top: 0 !important;\n margin-top: 0.5rem !important;\n}"},"docsPath":"guides/formulas/formula-calculation/vue/example1.vue","breadcrumb":["Formulas","Formula calculation"],"guide":"guides/formulas/formula-calculation/formula-calculation.md","guideTitle":"Formula calculation","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/formula-calculation","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example6.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example6.ts.json index e5f77a139..b8bd8f158 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example6.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example6.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Rows ▸ Rows sorting · Add custom sort icons (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example6',\n template: `\n \n \n `,\n styles: `\n :host ::ng-deep {\n .custom-sort-icon-example-1 .columnSorting.sortAction.ascending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n }\n\n .custom-sort-icon-example-1 .columnSorting.sortAction.descending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n }\n }\n `,\n})\nexport class AppComponent {\n\n readonly hotData = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ];\n\n readonly hotSettings: GridSettings = {\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-1',\n columnSorting: {\n initialConfig: {\n column: 1,\n sortOrder: 'desc',\n },\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/rows/rows-sorting/angular/example6.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"example6","exampleTitle":"Add custom sort icons (2)","docPermalink":"/rows-sorting","lang":"Angular"} +{"framework":"angular","displayName":"Rows ▸ Rows sorting · Add custom sort icons (2) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'app-example6',\n template: `\n \n \n `,\n styles: `\n :host ::ng-deep {\n .custom-sort-icon-example-1.handsontable {\n --ht-icon-arrow-narrow-up: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n --ht-icon-arrow-narrow-down: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n }\n }\n `,\n})\nexport class AppComponent {\n\n readonly hotData = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ];\n\n readonly hotSettings: GridSettings = {\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-1',\n columnSorting: {\n initialConfig: {\n column: 1,\n sortOrder: 'desc',\n },\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/rows/rows-sorting/angular/example6.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"example6","exampleTitle":"Add custom sort icons (2)","docPermalink":"/rows-sorting","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example7.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example7.ts.json index a98a6cc84..9d24a67e9 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example7.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__angular__example7.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Rows ▸ Rows sorting · Add custom sort icons (4) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\n\n@Component({\n selector: 'app-example7',\n template: `\n \n \n `,\n styles: `\n :host ::ng-deep {\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n }\n\n .custom-sort-icon-example-3 .handsontable .columnSorting.sortAction:before {\n right: 5px;\n }\n }\n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n readonly hotData = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ];\n\n readonly hotSettings: GridSettings = {\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Color',\n type: 'text',\n data: 'color',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-3',\n multiColumnSorting: {\n initialConfig: [\n {\n column: 0,\n sortOrder: 'asc',\n },\n {\n column: 1,\n sortOrder: 'desc',\n },\n {\n column: 2,\n sortOrder: 'asc',\n },\n {\n column: 3,\n sortOrder: 'desc',\n },\n {\n column: 4,\n sortOrder: 'asc',\n },\n {\n column: 5,\n sortOrder: 'desc',\n },\n {\n column: 6,\n sortOrder: 'asc',\n },\n ],\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/rows/rows-sorting/angular/example7.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"example7","exampleTitle":"Add custom sort icons (4)","docPermalink":"/rows-sorting","lang":"Angular"} +{"framework":"angular","displayName":"Rows ▸ Rows sorting · Add custom sort icons (4) · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule} from '@handsontable/angular-wrapper';\n\n@Component({\n selector: 'app-example7',\n template: `\n \n \n `,\n styles: `\n :host ::ng-deep {\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n }\n\n .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n }\n\n .custom-sort-icon-example-3 .handsontable th .relative > .ht-sort-indicator {\n inset-inline-end: calc(var(--ht-sort-indicator-offset-end) + 5px);\n }\n }\n `,\n standalone: true,\n imports: [HotTableModule],\n})\nexport class AppComponent {\n\n readonly hotData = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ];\n\n readonly hotSettings: GridSettings = {\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Color',\n type: 'text',\n data: 'color',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-3',\n multiColumnSorting: {\n initialConfig: [\n {\n column: 0,\n sortOrder: 'asc',\n },\n {\n column: 1,\n sortOrder: 'desc',\n },\n {\n column: 2,\n sortOrder: 'asc',\n },\n {\n column: 3,\n sortOrder: 'desc',\n },\n {\n column: 4,\n sortOrder: 'asc',\n },\n {\n column: 5,\n sortOrder: 'desc',\n },\n {\n column: 6,\n sortOrder: 'asc',\n },\n ],\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// register Handsontable's modules\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"guides/rows/rows-sorting/angular/example7.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"example7","exampleTitle":"Add custom sort icons (4)","docPermalink":"/rows-sorting","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.js.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.js.json index 29942a385..02bd6c1e3 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Rows ▸ Rows sorting · Add custom sort icons · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons');\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-1',\n columnSorting: {\n initialConfig: {\n column: 1,\n sortOrder: 'desc',\n },\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":".custom-sort-icon-example-1.handsontable .columnSorting.sortAction.ascending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n}\n\n.custom-sort-icon-example-1.handsontable .columnSorting.sortAction.descending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons.js","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"JavaScript"} +{"framework":"javascript","displayName":"Rows ▸ Rows sorting · Add custom sort icons · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons');\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-1',\n columnSorting: {\n initialConfig: {\n column: 1,\n sortOrder: 'desc',\n },\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":".custom-sort-icon-example-1.handsontable {\n --ht-icon-arrow-narrow-up: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n --ht-icon-arrow-narrow-down: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons.js","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.ts.json index 62cc20c1f..51ae8c1d9 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Rows ▸ Rows sorting · Add custom sort icons · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons')!;\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-1',\n columnSorting: {\n initialConfig: {\n column: 1,\n sortOrder: 'desc',\n },\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":".custom-sort-icon-example-1.handsontable .columnSorting.sortAction.ascending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n}\n\n.custom-sort-icon-example-1.handsontable .columnSorting.sortAction.descending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"TypeScript"} +{"framework":"typescript","displayName":"Rows ▸ Rows sorting · Add custom sort icons · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons')!;\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-1',\n columnSorting: {\n initialConfig: {\n column: 1,\n sortOrder: 'desc',\n },\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":".custom-sort-icon-example-1.handsontable {\n --ht-icon-arrow-narrow-up: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n --ht-icon-arrow-narrow-down: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.js.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.js.json index fff813c09..00f120535 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.js.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons3');\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Color',\n type: 'text',\n data: 'color',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-3',\n multiColumnSorting: {\n initialConfig: [\n {\n column: 0,\n sortOrder: 'asc',\n },\n {\n column: 1,\n sortOrder: 'desc',\n },\n {\n column: 2,\n sortOrder: 'asc',\n },\n {\n column: 3,\n sortOrder: 'desc',\n },\n {\n column: 4,\n sortOrder: 'asc',\n },\n {\n column: 5,\n sortOrder: 'desc',\n },\n {\n column: 6,\n sortOrder: 'asc',\n },\n ],\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable .columnSorting.sortAction::before {\n right: 5px;\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons3.js","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"JavaScript"} +{"framework":"javascript","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons3');\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Color',\n type: 'text',\n data: 'color',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-3',\n multiColumnSorting: {\n initialConfig: [\n {\n column: 0,\n sortOrder: 'asc',\n },\n {\n column: 1,\n sortOrder: 'desc',\n },\n {\n column: 2,\n sortOrder: 'asc',\n },\n {\n column: 3,\n sortOrder: 'desc',\n },\n {\n column: 4,\n sortOrder: 'asc',\n },\n {\n column: 5,\n sortOrder: 'desc',\n },\n {\n column: 6,\n sortOrder: 'asc',\n },\n ],\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable th .relative > .ht-sort-indicator {\n inset-inline-end: calc(var(--ht-sort-indicator-offset-end) + 5px);\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons3.js","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.ts.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.ts.json index b8e71ecfd..2341b6014 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__javascript__exampleCustomSortIcons3.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons3')!;\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Color',\n type: 'text',\n data: 'color',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-3',\n multiColumnSorting: {\n initialConfig: [\n {\n column: 0,\n sortOrder: 'asc',\n },\n {\n column: 1,\n sortOrder: 'desc',\n },\n {\n column: 2,\n sortOrder: 'asc',\n },\n {\n column: 3,\n sortOrder: 'desc',\n },\n {\n column: 4,\n sortOrder: 'asc',\n },\n {\n column: 5,\n sortOrder: 'desc',\n },\n {\n column: 6,\n sortOrder: 'asc',\n },\n ],\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable .columnSorting.sortAction::before {\n right: 5px;\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons3.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"TypeScript"} +{"framework":"typescript","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\nconst container = document.querySelector('#exampleCustomSortIcons3')!;\n\nnew Handsontable(container, {\n data: [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n ],\n columns: [\n {\n title: 'Brand',\n type: 'text',\n data: 'brand',\n },\n {\n title: 'Model',\n type: 'text',\n data: 'model',\n },\n {\n title: 'Color',\n type: 'text',\n data: 'color',\n },\n {\n title: 'Price',\n type: 'numeric',\n data: 'price',\n locale: 'en-US',\n numericFormat: {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 2,\n },\n },\n {\n title: 'Date',\n type: 'intl-date',\n data: 'sellDate',\n locale: 'en-US',\n dateFormat: { month: 'short', day: 'numeric', year: 'numeric' },\n className: 'htRight',\n },\n {\n title: 'Time',\n type: 'intl-time',\n data: 'sellTime',\n locale: 'en-US',\n timeFormat: { hour: '2-digit', minute: '2-digit', hour12: true },\n className: 'htRight',\n },\n {\n title: 'In stock',\n type: 'checkbox',\n data: 'inStock',\n className: 'htCenter',\n },\n ],\n className: 'custom-sort-icon-example-3',\n multiColumnSorting: {\n initialConfig: [\n {\n column: 0,\n sortOrder: 'asc',\n },\n {\n column: 1,\n sortOrder: 'desc',\n },\n {\n column: 2,\n sortOrder: 'asc',\n },\n {\n column: 3,\n sortOrder: 'desc',\n },\n {\n column: 4,\n sortOrder: 'asc',\n },\n {\n column: 5,\n sortOrder: 'desc',\n },\n {\n column: 6,\n sortOrder: 'asc',\n },\n ],\n },\n height: 'auto',\n stretchH: 'all',\n autoWrapRow: true,\n autoWrapCol: true,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable th .relative > .ht-sort-indicator {\n inset-inline-end: calc(var(--ht-sort-indicator-offset-end) + 5px);\n}"},"docsPath":"guides/rows/rows-sorting/javascript/exampleCustomSortIcons3.ts","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons.tsx.json index dd9971886..3ca0c97d3 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Rows ▸ Rows sorting · Add custom sort icons · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"exampleCustomSortIcons\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst data = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":".custom-sort-icon-example-1.handsontable .columnSorting.sortAction.ascending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n}\n\n.custom-sort-icon-example-1.handsontable .columnSorting.sortAction.descending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/react/exampleCustomSortIcons.tsx","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"React (TS)"} +{"framework":"react","displayName":"Rows ▸ Rows sorting · Add custom sort icons · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"exampleCustomSortIcons\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst data = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Mountain Frame',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":".custom-sort-icon-example-1.handsontable {\n --ht-icon-arrow-narrow-up: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n --ht-icon-arrow-narrow-down: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/react/exampleCustomSortIcons.tsx","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons3.tsx.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons3.tsx.json index 36d8eedfa..f46e9e55c 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons3.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__react__exampleCustomSortIcons3.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"exampleCustomSortIcons3\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst data = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable .columnSorting.sortAction::before {\n right: 5px;\n}"},"docsPath":"guides/rows/rows-sorting/react/exampleCustomSortIcons3.tsx","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"React (TS)"} +{"framework":"react","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport \"./styles.css\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"exampleCustomSortIcons3\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\n\n// register Handsontable's modules\nregisterAllModules();\n\nconst data = [\n {\n brand: 'Jetpulse',\n model: 'Racing Socks',\n color: 'White',\n price: 30,\n sellDate: '2023-10-11',\n sellTime: '01:23',\n inStock: false,\n },\n {\n brand: 'Gigabox',\n model: 'HL Frame',\n color: 'Black',\n price: 1890.9,\n sellDate: '2023-05-03',\n sellTime: '11:27',\n inStock: false,\n },\n {\n brand: 'Camido',\n model: 'Cycling Cap',\n color: 'Red',\n price: 130.1,\n sellDate: '2023-03-27',\n sellTime: '03:17',\n inStock: true,\n },\n {\n brand: 'Chatterpoint',\n model: 'Road Tire Tube',\n color: 'Green',\n price: 59,\n sellDate: '2023-08-28',\n sellTime: '08:01',\n inStock: true,\n },\n {\n brand: 'Eidel',\n model: 'HL Road Tire',\n color: 'Blue',\n price: 279.99,\n sellDate: '2023-10-02',\n sellTime: '13:23',\n inStock: true,\n },\n];\n\nconst ExampleComponent = () => {\n return (\n \n );\n};\n\nexport default ExampleComponent;","/src/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable th .relative > .ht-sort-indicator {\n inset-inline-end: calc(var(--ht-sort-indicator-offset-end) + 5px);\n}"},"docsPath":"guides/rows/rows-sorting/react/exampleCustomSortIcons3.tsx","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons.vue.json index 0db3f6cf0..ce269f911 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Rows ▸ Rows sorting · Add custom sort icons · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#exampleCustomSortIcons\");","/src/App.vue":"\n\n","/src/styles.css":".custom-sort-icon-example-1.handsontable .columnSorting.sortAction.ascending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n}\n\n.custom-sort-icon-example-1.handsontable .columnSorting.sortAction.descending::before {\n -webkit-mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/vue/exampleCustomSortIcons.vue","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"Vue 3"} +{"framework":"vue","displayName":"Rows ▸ Rows sorting · Add custom sort icons · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#exampleCustomSortIcons\");","/src/App.vue":"\n\n","/src/styles.css":".custom-sort-icon-example-1.handsontable {\n --ht-icon-arrow-narrow-up: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 21V9M8 13l4-4 4 4'/%3E%3Cpath d='M21 12a9 9 0 0 0-18 0'/%3E%3C/svg%3E\");\n --ht-icon-arrow-narrow-down: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0 0h24v24H0z' stroke='none'/%3E%3Cpath d='M12 3v12M16 11l-4 4-4-4'/%3E%3Cpath d='M3 12a9 9 0 0 0 18 0'/%3E%3C/svg%3E\");\n}"},"docsPath":"guides/rows/rows-sorting/vue/exampleCustomSortIcons.vue","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons","exampleTitle":"Add custom sort icons","docPermalink":"/rows-sorting","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons3.vue.json b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons3.vue.json index 27fa6236e..dbe8add89 100644 --- a/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons3.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/guides__rows__rows-sorting__vue__exampleCustomSortIcons3.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#exampleCustomSortIcons3\");","/src/App.vue":"\n\n","/src/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable .columnSorting.sortAction::before {\n right: 5px;\n}"},"docsPath":"guides/rows/rows-sorting/vue/exampleCustomSortIcons3.vue","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"Vue 3"} +{"framework":"vue","displayName":"Rows ▸ Rows sorting · Add custom sort icons (3) · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#exampleCustomSortIcons3\");","/src/App.vue":"\n\n","/src/styles.css":"#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-1::after {\n content: '①';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-2::after {\n content: '②';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-3::after {\n content: '③';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-4::after {\n content: '④';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-5::after {\n content: '⑤';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-6::after {\n content: '⑥';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting.sort-7::after {\n content: '⑦';\n}\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable span.colHeader.columnSorting::after {\n width: 10px;\n font-size: 10px;\n}\n\n\n#exampleCustomSortIcons3 .custom-sort-icon-example-3 .handsontable th .relative > .ht-sort-indicator {\n inset-inline-end: calc(var(--ht-sort-indicator-offset-end) + 5px);\n}"},"docsPath":"guides/rows/rows-sorting/vue/exampleCustomSortIcons3.vue","breadcrumb":["Rows","Rows sorting"],"guide":"guides/rows/rows-sorting/rows-sorting.md","guideTitle":"Rows sorting","exampleId":"exampleCustomSortIcons3","exampleTitle":"Add custom sort icons (3)","docPermalink":"/rows-sorting","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/manifest.json b/runner/apps/authoring/public/docs-examples/next/manifest.json index 3b94f50e2..bd6425e96 100644 --- a/runner/apps/authoring/public/docs-examples/next/manifest.json +++ b/runner/apps/authoring/public/docs-examples/next/manifest.json @@ -3,7 +3,7 @@ "docsBranch": "develop", "generatedFrom": "handsontable/docs content/guides/** + content/recipes/**", "hotVersion": "0.0.0-next-b0dc2e1-20261002", - "count": 1567, + "count": 1579, "examples": [ { "bucket": "next", @@ -11003,6 +11003,86 @@ "framework": "vue", "displayName": "Vue 3" }, + { + "bucket": "next", + "docsPath": "guides/columns/column-freezing/angular/example5.ts", + "file": "guides__columns__column-freezing__angular__example5.ts.json", + "breadcrumb": [ + "Columns", + "Column freezing" + ], + "guide": "guides/columns/column-freezing/column-freezing.md", + "guideTitle": "Column freezing", + "exampleId": "example5", + "exampleTitle": "Restore the column position on unfreeze", + "docPermalink": "/column-freezing", + "framework": "angular", + "displayName": "Angular" + }, + { + "bucket": "next", + "docsPath": "guides/columns/column-freezing/javascript/example5.js", + "file": "guides__columns__column-freezing__javascript__example5.js.json", + "breadcrumb": [ + "Columns", + "Column freezing" + ], + "guide": "guides/columns/column-freezing/column-freezing.md", + "guideTitle": "Column freezing", + "exampleId": "example5", + "exampleTitle": "Restore the column position on unfreeze", + "docPermalink": "/column-freezing", + "framework": "javascript", + "displayName": "JavaScript" + }, + { + "bucket": "next", + "docsPath": "guides/columns/column-freezing/react/example5.tsx", + "file": "guides__columns__column-freezing__react__example5.tsx.json", + "breadcrumb": [ + "Columns", + "Column freezing" + ], + "guide": "guides/columns/column-freezing/column-freezing.md", + "guideTitle": "Column freezing", + "exampleId": "example5", + "exampleTitle": "Restore the column position on unfreeze", + "docPermalink": "/column-freezing", + "framework": "react", + "displayName": "React (TS)" + }, + { + "bucket": "next", + "docsPath": "guides/columns/column-freezing/javascript/example5.ts", + "file": "guides__columns__column-freezing__javascript__example5.ts.json", + "breadcrumb": [ + "Columns", + "Column freezing" + ], + "guide": "guides/columns/column-freezing/column-freezing.md", + "guideTitle": "Column freezing", + "exampleId": "example5", + "exampleTitle": "Restore the column position on unfreeze", + "docPermalink": "/column-freezing", + "framework": "typescript", + "displayName": "TypeScript" + }, + { + "bucket": "next", + "docsPath": "guides/columns/column-freezing/vue/example5.vue", + "file": "guides__columns__column-freezing__vue__example5.vue.json", + "breadcrumb": [ + "Columns", + "Column freezing" + ], + "guide": "guides/columns/column-freezing/column-freezing.md", + "guideTitle": "Column freezing", + "exampleId": "example5", + "exampleTitle": "Restore the column position on unfreeze", + "docPermalink": "/column-freezing", + "framework": "vue", + "displayName": "Vue 3" + }, { "bucket": "next", "docsPath": "guides/columns/column-groups/angular/example1.ts", @@ -21101,6 +21181,40 @@ "framework": "react", "displayName": "React (TS)" }, + { + "bucket": "next", + "docsPath": "recipes/real-time/ai-columns-jev/javascript/example1.js", + "file": "recipes__real-time__ai-columns-jev__javascript__example1.js.json", + "breadcrumb": [ + "Recipes", + "Real Time", + "Add AI-classified columns with Jev" + ], + "guide": "recipes/real-time/ai-columns-jev/ai-columns-jev.md", + "guideTitle": "Add AI-classified columns with Jev", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/real-time/ai-columns-jev", + "framework": "javascript", + "displayName": "JavaScript" + }, + { + "bucket": "next", + "docsPath": "recipes/real-time/ai-columns-jev/javascript/example1.ts", + "file": "recipes__real-time__ai-columns-jev__javascript__example1.ts.json", + "breadcrumb": [ + "Recipes", + "Real Time", + "Add AI-classified columns with Jev" + ], + "guide": "recipes/real-time/ai-columns-jev/ai-columns-jev.md", + "guideTitle": "Add AI-classified columns with Jev", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/real-time/ai-columns-jev", + "framework": "typescript", + "displayName": "TypeScript" + }, { "bucket": "next", "docsPath": "recipes/real-time/websocket-updates/angular/example1.ts", @@ -21424,6 +21538,91 @@ "framework": "typescript", "displayName": "TypeScript" }, + { + "bucket": "next", + "docsPath": "recipes/themes/tabler-icons/angular/example1.ts", + "file": "recipes__themes__tabler-icons__angular__example1.ts.json", + "breadcrumb": [ + "Recipes", + "Themes", + "Handsontable with Tabler Icons" + ], + "guide": "recipes/themes/tabler-icons/tabler-icons.md", + "guideTitle": "Handsontable with Tabler Icons", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/themes/tabler-icons", + "framework": "angular", + "displayName": "Angular" + }, + { + "bucket": "next", + "docsPath": "recipes/themes/tabler-icons/javascript/example1.js", + "file": "recipes__themes__tabler-icons__javascript__example1.js.json", + "breadcrumb": [ + "Recipes", + "Themes", + "Handsontable with Tabler Icons" + ], + "guide": "recipes/themes/tabler-icons/tabler-icons.md", + "guideTitle": "Handsontable with Tabler Icons", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/themes/tabler-icons", + "framework": "javascript", + "displayName": "JavaScript" + }, + { + "bucket": "next", + "docsPath": "recipes/themes/tabler-icons/react/example1.tsx", + "file": "recipes__themes__tabler-icons__react__example1.tsx.json", + "breadcrumb": [ + "Recipes", + "Themes", + "Handsontable with Tabler Icons" + ], + "guide": "recipes/themes/tabler-icons/tabler-icons.md", + "guideTitle": "Handsontable with Tabler Icons", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/themes/tabler-icons", + "framework": "react", + "displayName": "React (TS)" + }, + { + "bucket": "next", + "docsPath": "recipes/themes/tabler-icons/javascript/example1.ts", + "file": "recipes__themes__tabler-icons__javascript__example1.ts.json", + "breadcrumb": [ + "Recipes", + "Themes", + "Handsontable with Tabler Icons" + ], + "guide": "recipes/themes/tabler-icons/tabler-icons.md", + "guideTitle": "Handsontable with Tabler Icons", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/themes/tabler-icons", + "framework": "typescript", + "displayName": "TypeScript" + }, + { + "bucket": "next", + "docsPath": "recipes/themes/tabler-icons/vue/example1.vue", + "file": "recipes__themes__tabler-icons__vue__example1.vue.json", + "breadcrumb": [ + "Recipes", + "Themes", + "Handsontable with Tabler Icons" + ], + "guide": "recipes/themes/tabler-icons/tabler-icons.md", + "guideTitle": "Handsontable with Tabler Icons", + "exampleId": "example1", + "exampleTitle": "Standard example", + "docPermalink": "/recipes/themes/tabler-icons", + "framework": "vue", + "displayName": "Vue 3" + }, { "bucket": "next", "docsPath": "guides/rows/row-freezing/angular/example1.ts", diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__angular__example1.ts.json index 5827d32ad..b97c17212 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__angular__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__angular__example1.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":8,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [\n \"src/styles.css\"\n ],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\nimport type { CellProperties } from 'handsontable/settings';\nimport type Handsontable from 'handsontable/base';\n\n/* start:skip-in-preview */\nconst inputData = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n/* end:skip-in-preview */\n\ntype RadioOption = { value: string; label: string } | string;\n\ninterface RadioCellProperties extends CellProperties {\n options: RadioOption[];\n}\n\nclass RadioEditor extends BaseEditor {\n override init(): void {}\n override open(): void {}\n override close(): void {}\n override focus(): void {}\n override getValue(): string { return this.originalValue as string; }\n override setValue(value: string): void { this.originalValue = value; }\n}\n\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild) td.removeChild(td.firstChild);\n\n const options: RadioOption[] = (cellProperties as RadioCellProperties).options || [];\n const wrapper = document.createElement('div');\n\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n\n const colHeader = instance.getColHeader(column as number);\n\n if (colHeader) wrapper.setAttribute('aria-label', String(colHeader));\n\n const isReadOnly = !!cellProperties.readOnly;\n\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n\n const cycle = (direction: 'next' | 'prev') => {\n if (!options.length) return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? (options[next] as { value: string }).value\n : (options[next] as string);\n\n instance.setDataAtCell(row as number, column as number, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n\n label.className = 'htUIRadio';\n\n const input = document.createElement('input');\n\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n\n const span = document.createElement('span');\n\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n\n label.appendChild(input);\n label.appendChild(span);\n wrapper.appendChild(label);\n\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = (e.target as HTMLInputElement).value;\n\n instance.setDataAtCell(row as number, column as number, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row as number, column as number);\n\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n\n return;\n }\n e.stopPropagation();\n });\n });\n\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer } as any);\n\nconst priorityOptions: RadioOption[] = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\n\nconst statusOptions: RadioOption[] = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'example1-radio',\n template: `
`,\n})\nexport class AppComponent {\n readonly data = inputData;\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Task', 'Priority', 'Status'],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n rowHeights: 96,\n columns: [\n { data: 'task', type: 'text', width: 300 },\n { data: 'priority', type: 'radio', width: 160, options: priorityOptions } as Handsontable.ColumnSettings,\n { data: 'status', type: 'radio', width: 170, options: statusOptions } as Handsontable.ColumnSettings,\n ],\n afterInit(this: Handsontable.Core) {\n this.rootElement.addEventListener('keydown', (e) => {\n if ((e.target as HTMLElement).tagName === 'INPUT') return;\n if (e.key !== 'Enter' && e.key !== 'F2') return;\n\n const sel = this.getSelectedLast();\n\n if (!sel) return;\n\n const [r, c] = sel;\n\n if (this.getCellMeta(r, c)['type'] !== 'radio') return;\n\n const td = this.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n }, true);\n },\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};","/src/styles.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The radio indicator appearance (dot, border,\n checked state) is intentionally left to the Handsontable theme. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/angular/example1.ts","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"Angular"} +{"framework":"angular","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":8,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [\n \"src/styles.css\"\n ],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\nimport type { CellProperties } from 'handsontable/settings';\nimport type Handsontable from 'handsontable/base';\n\n/* start:skip-in-preview */\nconst inputData = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n/* end:skip-in-preview */\n\ntype RadioOption = { value: string; label: string } | string;\n\ninterface RadioCellProperties extends CellProperties {\n options: RadioOption[];\n}\n\nclass RadioEditor extends BaseEditor {\n override init(): void {}\n override open(): void {}\n override close(): void {}\n override focus(): void {}\n override getValue(): string { return this.originalValue as string; }\n override setValue(value: string): void { this.originalValue = value; }\n}\n\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild) td.removeChild(td.firstChild);\n\n const options: RadioOption[] = (cellProperties as RadioCellProperties).options || [];\n const wrapper = document.createElement('div');\n\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n\n const colHeader = instance.getColHeader(column as number);\n\n if (colHeader) wrapper.setAttribute('aria-label', String(colHeader));\n\n const isReadOnly = !!cellProperties.readOnly;\n\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n\n const cycle = (direction: 'next' | 'prev') => {\n if (!options.length) return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? (options[next] as { value: string }).value\n : (options[next] as string);\n\n instance.setDataAtCell(row as number, column as number, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n\n label.className = 'htUIRadio';\n\n const input = document.createElement('input');\n\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n\n const span = document.createElement('span');\n\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n\n // The checked dot is a real `` element (Handsontable\n // itself inserts one as the input's next sibling for its own radio UI), not a CSS\n // pseudo-element -- so the recipe must add it explicitly to get the dot.\n const icon = document.createElement('i');\n\n icon.className = 'ht-icon ht-icon-radio';\n icon.setAttribute('aria-hidden', 'true');\n\n label.appendChild(input);\n label.appendChild(icon);\n label.appendChild(span);\n wrapper.appendChild(label);\n\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = (e.target as HTMLInputElement).value;\n\n instance.setDataAtCell(row as number, column as number, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row as number, column as number);\n\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n\n return;\n }\n e.stopPropagation();\n });\n });\n\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer } as any);\n\nconst priorityOptions: RadioOption[] = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\n\nconst statusOptions: RadioOption[] = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'example1-radio',\n template: `
`,\n})\nexport class AppComponent {\n readonly data = inputData;\n\n readonly gridSettings: GridSettings = {\n colHeaders: ['Task', 'Priority', 'Status'],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n rowHeights: 96,\n columns: [\n { data: 'task', type: 'text', width: 300 },\n { data: 'priority', type: 'radio', width: 160, options: priorityOptions } as Handsontable.ColumnSettings,\n { data: 'status', type: 'radio', width: 170, options: statusOptions } as Handsontable.ColumnSettings,\n ],\n afterInit(this: Handsontable.Core) {\n this.rootElement.addEventListener('keydown', (e) => {\n if ((e.target as HTMLElement).tagName === 'INPUT') return;\n if (e.key !== 'Enter' && e.key !== 'F2') return;\n\n const sel = this.getSelectedLast();\n\n if (!sel) return;\n\n const [r, c] = sel;\n\n if (this.getCellMeta(r, c)['type'] !== 'radio') return;\n\n const td = this.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n }, true);\n },\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};","/src/styles.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The ring, colors, and checked state are\n intentionally left to the Handsontable theme; the checked dot is a\n `.ht-icon-radio` element the renderer inserts as the input's next sibling\n (see Step 4 in the guide), not something this stylesheet draws. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/angular/example1.ts","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.js.json index d9c7c1e75..2447374bf 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.js.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.js.json @@ -1 +1 @@ -{"framework":"javascript","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\n// Register all Handsontable's modules.\nregisterAllModules();\n/* start:skip-in-preview */\nconst data = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n// Minimal editor stub — all interaction is handled by the renderer.\nclass RadioEditor extends BaseEditor {\n init() { }\n open() { }\n close() { }\n focus() { }\n getValue() { return this.originalValue; }\n setValue(value) { this.originalValue = value; }\n}\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild)\n td.removeChild(td.firstChild);\n const options = cellProperties.options || [];\n const wrapper = document.createElement('div');\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n const colHeader = instance.getColHeader(column);\n if (colHeader)\n wrapper.setAttribute('aria-label', String(colHeader));\n const isReadOnly = !!cellProperties.readOnly;\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n return String(v) === String(value);\n });\n // Cycle to the next or previous option and commit via setDataAtCell.\n // queueMicrotask restores focus after Handsontable re-renders the cell.\n const cycle = (direction) => {\n if (!options.length)\n return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? options[next].value\n : options[next];\n instance.setDataAtCell(row, column, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row, column);\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n label.className = 'htUIRadio';\n const input = document.createElement('input');\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n // Roving tabindex: exactly one radio per group is tabbable.\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n const span = document.createElement('span');\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n label.appendChild(input);\n label.appendChild(span);\n wrapper.appendChild(label);\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = e.target.value;\n instance.setDataAtCell(row, column, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row, column);\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n // Stop mousedown so Handsontable doesn't hijack the click for cell selection.\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row, column);\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n return;\n }\n // Block other keys from reaching Handsontable's shortcut system.\n e.stopPropagation();\n });\n });\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer });\n// Get the DOM element with the ID 'example1' where the Handsontable will be rendered\nconst container = document.querySelector('#example1');\nconst priorityOptions = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\nconst statusOptions = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n// Define configuration options for the Handsontable\nconst hotOptions = {\n data,\n colHeaders: ['Task', 'Priority', 'Status'],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n rowHeights: 96,\n columns: [\n { data: 'task', type: 'text', width: 300 },\n { data: 'priority', type: 'radio', options: priorityOptions, width: 160 },\n { data: 'status', type: 'radio', options: statusOptions, width: 170 },\n ],\n licenseKey: 'non-commercial-and-evaluation',\n};\n// Initialize the Handsontable instance with the specified configuration options\n// eslint-disable-next-line no-unused-vars\nconst hot = new Handsontable(container, hotOptions);\n// Enter / F2 on a radio cell: move focus to the checked (or first) radio input.\n// Use capture so this fires before Handsontable's own keydown handlers.\nhot.rootElement.addEventListener('keydown', (e) => {\n if (e.target.tagName === 'INPUT')\n return;\n if (e.key !== 'Enter' && e.key !== 'F2')\n return;\n const sel = hot.getSelectedLast();\n if (!sel)\n return;\n const [r, c] = sel;\n if (hot.getCellMeta(r, c).type !== 'radio')\n return;\n const td = hot.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n}, true);","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The radio indicator appearance (dot, border,\n checked state) is intentionally left to the Handsontable theme. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/javascript/example1.js","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"JavaScript"} +{"framework":"javascript","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\n// Register all Handsontable's modules.\nregisterAllModules();\n/* start:skip-in-preview */\nconst data = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n// Minimal editor stub — all interaction is handled by the renderer.\nclass RadioEditor extends BaseEditor {\n init() { }\n open() { }\n close() { }\n focus() { }\n getValue() { return this.originalValue; }\n setValue(value) { this.originalValue = value; }\n}\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild)\n td.removeChild(td.firstChild);\n const options = cellProperties.options || [];\n const wrapper = document.createElement('div');\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n const colHeader = instance.getColHeader(column);\n if (colHeader)\n wrapper.setAttribute('aria-label', String(colHeader));\n const isReadOnly = !!cellProperties.readOnly;\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n return String(v) === String(value);\n });\n // Cycle to the next or previous option and commit via setDataAtCell.\n // queueMicrotask restores focus after Handsontable re-renders the cell.\n const cycle = (direction) => {\n if (!options.length)\n return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? options[next].value\n : options[next];\n instance.setDataAtCell(row, column, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row, column);\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n label.className = 'htUIRadio';\n const input = document.createElement('input');\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n // Roving tabindex: exactly one radio per group is tabbable.\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n const span = document.createElement('span');\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n // The checked dot is a real `` element (Handsontable\n // itself inserts one as the input's next sibling for its own radio UI), not a CSS\n // pseudo-element -- so the recipe must add it explicitly to get the dot.\n const icon = document.createElement('i');\n icon.className = 'ht-icon ht-icon-radio';\n icon.setAttribute('aria-hidden', 'true');\n label.appendChild(input);\n label.appendChild(icon);\n label.appendChild(span);\n wrapper.appendChild(label);\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = e.target.value;\n instance.setDataAtCell(row, column, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row, column);\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n // Stop mousedown so Handsontable doesn't hijack the click for cell selection.\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row, column);\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n return;\n }\n // Block other keys from reaching Handsontable's shortcut system.\n e.stopPropagation();\n });\n });\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer });\n// Get the DOM element with the ID 'example1' where the Handsontable will be rendered\nconst container = document.querySelector('#example1');\nconst priorityOptions = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\nconst statusOptions = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n// Define configuration options for the Handsontable\nconst hotOptions = {\n data,\n colHeaders: ['Task', 'Priority', 'Status'],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n rowHeights: 96,\n columns: [\n { data: 'task', type: 'text', width: 300 },\n { data: 'priority', type: 'radio', options: priorityOptions, width: 160 },\n { data: 'status', type: 'radio', options: statusOptions, width: 170 },\n ],\n licenseKey: 'non-commercial-and-evaluation',\n};\n// Initialize the Handsontable instance with the specified configuration options\n// eslint-disable-next-line no-unused-vars\nconst hot = new Handsontable(container, hotOptions);\n// Enter / F2 on a radio cell: move focus to the checked (or first) radio input.\n// Use capture so this fires before Handsontable's own keydown handlers.\nhot.rootElement.addEventListener('keydown', (e) => {\n if (e.target.tagName === 'INPUT')\n return;\n if (e.key !== 'Enter' && e.key !== 'F2')\n return;\n const sel = hot.getSelectedLast();\n if (!sel)\n return;\n const [r, c] = sel;\n if (hot.getCellMeta(r, c).type !== 'radio')\n return;\n const td = hot.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n}, true);","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The ring, colors, and checked state are\n intentionally left to the Handsontable theme; the checked dot is a\n `.ht-icon-radio` element the renderer inserts as the input's next sibling\n (see Step 4 in the guide), not something this stylesheet draws. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/javascript/example1.js","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.ts.json index af33e990c..ebd722613 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__javascript__example1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\nimport type { CellProperties } from 'handsontable/settings';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n/* start:skip-in-preview */\nconst data = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n/* end:skip-in-preview */\n\ntype RadioOption = { value: string; label: string } | string;\n\ninterface RadioCellProperties extends CellProperties {\n options: RadioOption[];\n}\n\n// Minimal editor stub — all interaction is handled by the renderer.\nclass RadioEditor extends BaseEditor {\n init(): void {}\n open(): void {}\n close(): void {}\n focus(): void {}\n getValue(): string { return this.originalValue as string; }\n setValue(value: string): void { this.originalValue = value; }\n}\n\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild) td.removeChild(td.firstChild);\n\n const options: RadioOption[] = (cellProperties as RadioCellProperties).options || [];\n const wrapper = document.createElement('div');\n\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n\n const colHeader = instance.getColHeader(column as number);\n\n if (colHeader) wrapper.setAttribute('aria-label', String(colHeader));\n\n const isReadOnly = !!cellProperties.readOnly;\n\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n\n // Cycle to the next or previous option and commit via setDataAtCell.\n // queueMicrotask restores focus after Handsontable re-renders the cell.\n const cycle = (direction: 'next' | 'prev') => {\n if (!options.length) return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? (options[next] as { value: string }).value\n : (options[next] as string);\n\n instance.setDataAtCell(row as number, column as number, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n\n label.className = 'htUIRadio';\n\n const input = document.createElement('input');\n\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n // Roving tabindex: exactly one radio per group is tabbable.\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n\n const span = document.createElement('span');\n\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n\n label.appendChild(input);\n label.appendChild(span);\n wrapper.appendChild(label);\n\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = (e.target as HTMLInputElement).value;\n\n instance.setDataAtCell(row as number, column as number, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n\n // Stop mousedown so Handsontable doesn't hijack the click for cell selection.\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row as number, column as number);\n\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n\n return;\n }\n // Block other keys from reaching Handsontable's shortcut system.\n e.stopPropagation();\n });\n });\n\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\n\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer });\n\n// Get the DOM element with the ID 'example1' where the Handsontable will be rendered\nconst container = document.querySelector('#example1')!;\n\nconst priorityOptions: RadioOption[] = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\n\nconst statusOptions: RadioOption[] = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n\n// Define configuration options for the Handsontable\nconst hotOptions: Handsontable.GridSettings = {\n data,\n colHeaders: ['Task', 'Priority', 'Status'],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n rowHeights: 96,\n columns: [\n { data: 'task', type: 'text', width: 300 },\n { data: 'priority', type: 'radio', options: priorityOptions, width: 160 } as Handsontable.ColumnSettings,\n { data: 'status', type: 'radio', options: statusOptions, width: 170 } as Handsontable.ColumnSettings,\n ],\n licenseKey: 'non-commercial-and-evaluation',\n};\n\n// Initialize the Handsontable instance with the specified configuration options\n// eslint-disable-next-line no-unused-vars\nconst hot = new Handsontable(container, hotOptions);\n\n// Enter / F2 on a radio cell: move focus to the checked (or first) radio input.\n// Use capture so this fires before Handsontable's own keydown handlers.\nhot.rootElement.addEventListener('keydown', (e) => {\n if ((e.target as HTMLElement).tagName === 'INPUT') return;\n if (e.key !== 'Enter' && e.key !== 'F2') return;\n\n const sel = hot.getSelectedLast();\n\n if (!sel) return;\n\n const [r, c] = sel;\n\n if (hot.getCellMeta(r, c).type !== 'radio') return;\n\n const td = hot.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n}, true);","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The radio indicator appearance (dot, border,\n checked state) is intentionally left to the Handsontable theme. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/javascript/example1.ts","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"TypeScript"} +{"framework":"typescript","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\nimport type { CellProperties } from 'handsontable/settings';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n/* start:skip-in-preview */\nconst data = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n/* end:skip-in-preview */\n\ntype RadioOption = { value: string; label: string } | string;\n\ninterface RadioCellProperties extends CellProperties {\n options: RadioOption[];\n}\n\n// Minimal editor stub — all interaction is handled by the renderer.\nclass RadioEditor extends BaseEditor {\n init(): void {}\n open(): void {}\n close(): void {}\n focus(): void {}\n getValue(): string { return this.originalValue as string; }\n setValue(value: string): void { this.originalValue = value; }\n}\n\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild) td.removeChild(td.firstChild);\n\n const options: RadioOption[] = (cellProperties as RadioCellProperties).options || [];\n const wrapper = document.createElement('div');\n\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n\n const colHeader = instance.getColHeader(column as number);\n\n if (colHeader) wrapper.setAttribute('aria-label', String(colHeader));\n\n const isReadOnly = !!cellProperties.readOnly;\n\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n\n // Cycle to the next or previous option and commit via setDataAtCell.\n // queueMicrotask restores focus after Handsontable re-renders the cell.\n const cycle = (direction: 'next' | 'prev') => {\n if (!options.length) return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? (options[next] as { value: string }).value\n : (options[next] as string);\n\n instance.setDataAtCell(row as number, column as number, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n\n label.className = 'htUIRadio';\n\n const input = document.createElement('input');\n\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n // Roving tabindex: exactly one radio per group is tabbable.\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n\n const span = document.createElement('span');\n\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n\n // The checked dot is a real `` element (Handsontable\n // itself inserts one as the input's next sibling for its own radio UI), not a CSS\n // pseudo-element -- so the recipe must add it explicitly to get the dot.\n const icon = document.createElement('i');\n\n icon.className = 'ht-icon ht-icon-radio';\n icon.setAttribute('aria-hidden', 'true');\n\n label.appendChild(input);\n label.appendChild(icon);\n label.appendChild(span);\n wrapper.appendChild(label);\n\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = (e.target as HTMLInputElement).value;\n\n instance.setDataAtCell(row as number, column as number, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n\n // Stop mousedown so Handsontable doesn't hijack the click for cell selection.\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row as number, column as number);\n\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n\n return;\n }\n // Block other keys from reaching Handsontable's shortcut system.\n e.stopPropagation();\n });\n });\n\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\n\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer });\n\n// Get the DOM element with the ID 'example1' where the Handsontable will be rendered\nconst container = document.querySelector('#example1')!;\n\nconst priorityOptions: RadioOption[] = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\n\nconst statusOptions: RadioOption[] = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n\n// Define configuration options for the Handsontable\nconst hotOptions: Handsontable.GridSettings = {\n data,\n colHeaders: ['Task', 'Priority', 'Status'],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n rowHeights: 96,\n columns: [\n { data: 'task', type: 'text', width: 300 },\n { data: 'priority', type: 'radio', options: priorityOptions, width: 160 } as Handsontable.ColumnSettings,\n { data: 'status', type: 'radio', options: statusOptions, width: 170 } as Handsontable.ColumnSettings,\n ],\n licenseKey: 'non-commercial-and-evaluation',\n};\n\n// Initialize the Handsontable instance with the specified configuration options\n// eslint-disable-next-line no-unused-vars\nconst hot = new Handsontable(container, hotOptions);\n\n// Enter / F2 on a radio cell: move focus to the checked (or first) radio input.\n// Use capture so this fires before Handsontable's own keydown handlers.\nhot.rootElement.addEventListener('keydown', (e) => {\n if ((e.target as HTMLElement).tagName === 'INPUT') return;\n if (e.key !== 'Enter' && e.key !== 'F2') return;\n\n const sel = hot.getSelectedLast();\n\n if (!sel) return;\n\n const [r, c] = sel;\n\n if (hot.getCellMeta(r, c).type !== 'radio') return;\n\n const td = hot.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n}, true);","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The ring, colors, and checked state are\n intentionally left to the Handsontable theme; the checked dot is a\n `.ht-icon-radio` element the renderer inserts as the input's next sibling\n (see Step 4 in the guide), not something this stylesheet draws. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/javascript/example1.ts","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__react__example1.tsx.json b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__react__example1.tsx.json index a4fbe9e11..b25d55b37 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__react__example1.tsx.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__react__example1.tsx.json @@ -1 +1 @@ -{"framework":"react","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef } from 'react';\nimport { HotTable, HotColumn } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\nimport type { CellProperties } from 'handsontable/settings';\nimport type Handsontable from 'handsontable/base';\nimport './example1.css';\n\nregisterAllModules();\n\ntype RadioOption = { value: string; label: string } | string;\n\ninterface RadioCellProperties extends CellProperties {\n options: RadioOption[];\n}\n\nclass RadioEditor extends BaseEditor {\n init(): void {}\n open(): void {}\n close(): void {}\n focus(): void {}\n getValue(): string { return this.originalValue as string; }\n setValue(value: string): void { this.originalValue = value; }\n}\n\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild) td.removeChild(td.firstChild);\n\n const options: RadioOption[] = (cellProperties as RadioCellProperties).options || [];\n const wrapper = document.createElement('div');\n\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n\n const colHeader = instance.getColHeader(column as number);\n\n if (colHeader) wrapper.setAttribute('aria-label', String(colHeader));\n\n const isReadOnly = !!cellProperties.readOnly;\n\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n\n const cycle = (direction: 'next' | 'prev') => {\n if (!options.length) return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? (options[next] as { value: string }).value\n : (options[next] as string);\n\n instance.setDataAtCell(row as number, column as number, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n\n label.className = 'htUIRadio';\n\n const input = document.createElement('input');\n\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n\n const span = document.createElement('span');\n\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n\n label.appendChild(input);\n label.appendChild(span);\n wrapper.appendChild(label);\n\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = (e.target as HTMLInputElement).value;\n\n instance.setDataAtCell(row as number, column as number, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row as number, column as number);\n\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n\n return;\n }\n e.stopPropagation();\n });\n });\n\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\n\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer });\n\n/* start:skip-in-preview */\ninterface TaskRow {\n task: string;\n priority: string;\n status: string;\n}\n\nconst data: TaskRow[] = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n/* end:skip-in-preview */\n\nconst priorityOptions: RadioOption[] = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\n\nconst statusOptions: RadioOption[] = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef<{ hotInstance: Handsontable.Core | null }>(null);\n\n const afterInit = function(this: Handsontable.Core) {\n this.rootElement.addEventListener('keydown', (e) => {\n if ((e.target as HTMLElement).tagName === 'INPUT') return;\n if (e.key !== 'Enter' && e.key !== 'F2') return;\n\n const sel = this.getSelectedLast();\n\n if (!sel) return;\n\n const [r, c] = sel;\n\n if (this.getCellMeta(r, c).type !== 'radio') return;\n\n const td = this.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n }, true);\n };\n\n return (\n \n \n \n \n \n );\n};\n\nexport default ExampleComponent;","/src/example1.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The radio indicator appearance (dot, border,\n checked state) is intentionally left to the Handsontable theme. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/react/example1.tsx","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"React (TS)"} +{"framework":"react","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { useRef } from 'react';\nimport { HotTable, HotColumn } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { rendererFactory } from 'handsontable/renderers';\nimport { BaseEditor } from 'handsontable/editors/baseEditor';\nimport { registerCellType } from 'handsontable/cellTypes';\nimport type { CellProperties } from 'handsontable/settings';\nimport type Handsontable from 'handsontable/base';\nimport './example1.css';\n\nregisterAllModules();\n\ntype RadioOption = { value: string; label: string } | string;\n\ninterface RadioCellProperties extends CellProperties {\n options: RadioOption[];\n}\n\nclass RadioEditor extends BaseEditor {\n init(): void {}\n open(): void {}\n close(): void {}\n focus(): void {}\n getValue(): string { return this.originalValue as string; }\n setValue(value: string): void { this.originalValue = value; }\n}\n\nconst radioRenderer = rendererFactory(({ instance, td, row, column, value, cellProperties }) => {\n while (td.firstChild) td.removeChild(td.firstChild);\n\n const options: RadioOption[] = (cellProperties as RadioCellProperties).options || [];\n const wrapper = document.createElement('div');\n\n wrapper.className = 'htRadioCell';\n wrapper.setAttribute('role', 'radiogroup');\n\n const colHeader = instance.getColHeader(column as number);\n\n if (colHeader) wrapper.setAttribute('aria-label', String(colHeader));\n\n const isReadOnly = !!cellProperties.readOnly;\n\n const hasChecked = options.some((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n\n const cycle = (direction: 'next' | 'prev') => {\n if (!options.length) return;\n const i = options.findIndex((opt) => {\n const v = typeof opt === 'object' ? opt.value : opt;\n\n return String(v) === String(value);\n });\n const last = options.length - 1;\n const next = direction === 'next'\n ? (i === last || i === -1 ? 0 : i + 1)\n : (i <= 0 ? last : i - 1);\n const newValue = typeof options[next] === 'object'\n ? (options[next] as { value: string }).value\n : (options[next] as string);\n\n instance.setDataAtCell(row as number, column as number, newValue);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(newValue)}\"]`)?.focus();\n });\n };\n\n options.forEach((opt, idx) => {\n const optValue = typeof opt === 'object' ? opt.value : opt;\n const optLabel = typeof opt === 'object' ? opt.label : opt;\n const label = document.createElement('label');\n\n label.className = 'htUIRadio';\n\n const input = document.createElement('input');\n\n input.type = 'radio';\n input.className = 'htUIRadioInput';\n input.name = `radio-r${row}-c${column}`;\n input.value = optValue;\n input.checked = String(optValue) === String(value);\n input.tabIndex = (input.checked || (!hasChecked && idx === 0)) ? 0 : -1;\n input.disabled = isReadOnly;\n\n const span = document.createElement('span');\n\n span.className = 'htUIRadioLabel';\n span.textContent = optLabel;\n\n // The checked dot is a real `` element (Handsontable\n // itself inserts one as the input's next sibling for its own radio UI), not a CSS\n // pseudo-element -- so the recipe must add it explicitly to get the dot.\n const icon = document.createElement('i');\n\n icon.className = 'ht-icon ht-icon-radio';\n icon.setAttribute('aria-hidden', 'true');\n\n label.appendChild(input);\n label.appendChild(icon);\n label.appendChild(span);\n wrapper.appendChild(label);\n\n input.addEventListener('change', (e) => {\n e.stopPropagation();\n const v = (e.target as HTMLInputElement).value;\n\n instance.setDataAtCell(row as number, column as number, v);\n queueMicrotask(() => {\n const newTd = instance.getCell(row as number, column as number);\n\n newTd?.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(v)}\"]`)?.focus();\n });\n });\n\n label.addEventListener('mousedown', (e) => e.stopPropagation());\n\n input.addEventListener('keydown', (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n instance.selectCell(row as number, column as number);\n\n return;\n }\n if (e.key === 'ArrowDown' || e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n cycle('next');\n\n return;\n }\n if (e.key === 'ArrowUp' || e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n cycle('prev');\n\n return;\n }\n e.stopPropagation();\n });\n });\n\n td.appendChild(wrapper);\n td.style.verticalAlign = 'top';\n});\n\nregisterCellType('radio', { editor: RadioEditor, renderer: radioRenderer });\n\n/* start:skip-in-preview */\ninterface TaskRow {\n task: string;\n priority: string;\n status: string;\n}\n\nconst data: TaskRow[] = [\n { task: 'Refactor licensing app navigation', priority: 'high', status: 'in-progress' },\n { task: 'Theme Builder onboarding tour', priority: 'medium', status: 'todo' },\n { task: 'MCP server v1 release prep', priority: 'high', status: 'in-progress' },\n { task: 'GitHub triage rotation docs', priority: 'low', status: 'done' },\n { task: 'shadcn/ui integration recipe', priority: 'medium', status: 'todo' },\n];\n/* end:skip-in-preview */\n\nconst priorityOptions: RadioOption[] = [\n { value: 'low', label: 'Low' },\n { value: 'medium', label: 'Medium' },\n { value: 'high', label: 'High' },\n];\n\nconst statusOptions: RadioOption[] = [\n { value: 'todo', label: 'Todo' },\n { value: 'in-progress', label: 'In progress' },\n { value: 'done', label: 'Done' },\n];\n\nconst ExampleComponent = () => {\n const hotRef = useRef<{ hotInstance: Handsontable.Core | null }>(null);\n\n const afterInit = function(this: Handsontable.Core) {\n this.rootElement.addEventListener('keydown', (e) => {\n if ((e.target as HTMLElement).tagName === 'INPUT') return;\n if (e.key !== 'Enter' && e.key !== 'F2') return;\n\n const sel = this.getSelectedLast();\n\n if (!sel) return;\n\n const [r, c] = sel;\n\n if (this.getCellMeta(r, c).type !== 'radio') return;\n\n const td = this.getCell(r, c);\n const target = td?.querySelector('input[type=\"radio\"]:checked')\n ?? td?.querySelector('input[type=\"radio\"]');\n\n if (target) {\n e.stopImmediatePropagation();\n e.preventDefault();\n target.focus();\n }\n }, true);\n };\n\n return (\n \n \n \n \n \n );\n};\n\nexport default ExampleComponent;","/src/example1.css":"/* Scoped to .htRadioCell so theme's .htUIRadio styles in context menus and\n filter panels are not affected. The ring, colors, and checked state are\n intentionally left to the Handsontable theme; the checked dot is a\n `.ht-icon-radio` element the renderer inserts as the input's next sibling\n (see Step 4 in the guide), not something this stylesheet draws. */\n.htRadioCell {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 4px 0;\n line-height: 1.4;\n}\n\n.htRadioCell .htUIRadio {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--ht-foreground-color, #1f2937);\n padding: 2px 6px !important;\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n}\n\n.htRadioCell .htUIRadioLabel {\n flex: 1;\n}\n\n/* Ensure pointer cursor and prevent default outline; theme handles appearance. */\n.htRadioCell .htUIRadio > input[type='radio'] {\n cursor: pointer;\n}"},"docsPath":"recipes/cell-types/radio/react/example1.tsx","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"React (TS)"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__vue__example1.vue.json b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__vue__example1.vue.json index 572a8be1f..e1ba5a322 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__vue__example1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__cell-types__radio__vue__example1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n\n\n"},"docsPath":"recipes/cell-types/radio/vue/example1.vue","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"Vue 3"} +{"framework":"vue","displayName":"Recipes ▸ Cell Types ▸ Radio buttons · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n\n\n"},"docsPath":"recipes/cell-types/radio/vue/example1.vue","breadcrumb":["Recipes","Cell Types","Radio buttons"],"guide":"recipes/cell-types/radio/radio.md","guideTitle":"Radio buttons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/cell-types/radio","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__angular__example1.ts.json index 91a617a16..af46d6187 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__angular__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__angular__example1.ts.json @@ -1 +1 @@ -{"framework":"angular","displayName":"Recipes ▸ Import Export ▸ Import from CSV or Excel · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":8,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"papaparse\": \"5.7.0\",\n \"read-excel-file\": \"9.3.10\"\n },\n \"devDependencies\": {\n \"@types/papaparse\": \"5.5.2\"\n }\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [\n \"src/styles.css\"\n ],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, NgZone, ViewChild, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule } from '@handsontable/angular-wrapper';\nimport Papa from 'papaparse';\nimport readXlsxFile from 'read-excel-file/browser';\nimport type { Sheet } from 'read-excel-file/browser';\n\ninterface ParsedPayload {\n headers: string[];\n rows: Record[];\n}\n\nfunction extensionOf(name: string): string {\n const i = name.lastIndexOf('.');\n return i >= 0 ? name.slice(i + 1).toLowerCase() : '';\n}\n\nfunction normalizeCellValue(value: unknown): unknown {\n if (value === null || value === undefined) {\n return null;\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value;\n }\n if (value instanceof Date) {\n return value.toISOString().slice(0, 10);\n }\n const text = String(value).trim();\n return text === '' ? null : text;\n}\n\nfunction processPapaResults(results: Papa.ParseResult>): ParsedPayload {\n if (results.errors.length > 0) {\n throw new Error(results.errors[0].message || 'CSV parse error.');\n }\n const fields = (results.meta.fields ?? []).filter((f) => f !== undefined && f !== '');\n if (fields.length === 0) {\n throw new Error('No header row found in the CSV.');\n }\n const rows = results.data.map((row) => {\n const out: Record = {};\n for (const key of fields) {\n out[key] = normalizeCellValue(row[key]);\n }\n return out;\n });\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n return { headers: fields, rows };\n}\n\nfunction parseCsvText(text: string): ParsedPayload {\n const trimmed = text.trim();\n if (!trimmed) {\n throw new Error('The input is empty.');\n }\n const parsed = Papa.parse>(trimmed, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h) => h.trim(),\n });\n return processPapaResults(parsed);\n}\n\nasync function parseCsvFile(file: File): Promise {\n return new Promise((resolve, reject) => {\n Papa.parse>(file, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h: string) => h.trim(),\n complete: (results: Papa.ParseResult>) => {\n try {\n resolve(processPapaResults(results));\n } catch (e) {\n reject(e instanceof Error ? e : new Error(String(e)));\n }\n },\n error: (err: Error) => reject(err instanceof Error ? err : new Error(String(err))),\n });\n });\n}\n\nasync function parseXlsxFile(file: File): Promise {\n let sheets: Sheet[];\n try {\n sheets = await readXlsxFile(file);\n } catch {\n throw new Error('Could not read the Excel workbook. The file may be corrupted.');\n }\n const firstSheet = sheets[0];\n if (!firstSheet) {\n throw new Error('The workbook has no sheets.');\n }\n const matrix: unknown[][] = firstSheet.data;\n if (!matrix.length) {\n throw new Error('The sheet is empty.');\n }\n const rawHeader = (matrix[0] as unknown[]).map((cell) => String(cell ?? '').trim());\n if (rawHeader.length === 0 || rawHeader.every((h) => h === '')) {\n throw new Error('No header row found in the Excel sheet.');\n }\n const keys = rawHeader.map((h, i) => (h === '' ? `Column ${i + 1}` : h));\n const rows: Record[] = [];\n for (let r = 1; r < matrix.length; r++) {\n const line = matrix[r] as unknown[];\n const allEmpty = !line || (line as unknown[]).every((c) => normalizeCellValue(c) === null);\n if (allEmpty) {\n continue;\n }\n const obj: Record = {};\n for (let c = 0; c < keys.length; c++) {\n obj[keys[c]] = normalizeCellValue(line[c]);\n }\n rows.push(obj);\n }\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n return { headers: keys, rows };\n}\n\nasync function parseFile(file: File): Promise {\n const ext = extensionOf(file.name);\n if (ext === 'csv') {\n return parseCsvFile(file);\n }\n if (ext === 'xlsx') {\n return parseXlsxFile(file);\n }\n throw new Error('Unsupported file type. Use a .csv or .xlsx file.');\n}\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'example1-import-csv-excel',\n template: `\n
\n \n

Drop a .csv or .xlsx file here, or pick a source.

\n
\n \n \n
\n
\n\n @if (errorMessage) {\n
{{ errorMessage }}
\n }\n\n @if (gridData.length === 0) {\n
\n \n \n \n \n \n \n

No data loaded yet

\n

\n Drop a CSV or Excel file above, choose a file, or load the sample data to populate the table.\n

\n
\n } @else {\n \n }\n \n `,\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n private readonly zone = inject(NgZone);\n\n isDragOver = false;\n errorMessage = '';\n gridData: Record[] = [];\n\n private readonly SAMPLE_CSV = `Product,Category,In stock,Price\nWidget A,Hardware,true,19.99\nWidget B,Hardware,false,24.5\nService Pack,Services,true,0`;\n\n gridSettings: GridSettings = {\n colHeaders: [],\n columns: [],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n };\n\n onDragOver(event: DragEvent): void {\n event.preventDefault();\n this.isDragOver = true;\n }\n\n onDragLeave(): void {\n this.isDragOver = false;\n }\n\n onDrop(event: DragEvent): void {\n event.preventDefault();\n this.isDragOver = false;\n const file = event.dataTransfer?.files?.[0];\n if (file) {\n this.handleFile(file);\n }\n }\n\n onFileChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const file = input.files?.[0];\n if (file) {\n this.handleFile(file);\n }\n input.value = '';\n }\n\n async loadSampleData(): Promise {\n this.errorMessage = '';\n try {\n const payload = parseCsvText(this.SAMPLE_CSV);\n this.loadIntoGrid(payload);\n } catch (e) {\n this.errorMessage = e instanceof Error ? e.message : String(e);\n }\n }\n\n private async handleFile(file: File): Promise {\n this.errorMessage = '';\n if (file.size === 0) {\n this.errorMessage = 'The file is empty.';\n return;\n }\n try {\n const payload = await parseFile(file);\n this.zone.run(() => this.loadIntoGrid(payload));\n } catch (e) {\n this.zone.run(() => {\n this.errorMessage = e instanceof Error ? e.message : String(e);\n });\n }\n }\n\n private loadIntoGrid(payload: ParsedPayload): void {\n const { headers, rows } = payload;\n this.gridSettings = {\n ...this.gridSettings,\n colHeaders: headers,\n columns: this.columnsFromHeaders(headers, rows),\n };\n this.gridData = [...rows];\n }\n\n private columnsFromHeaders(headers: string[], rows: Record[]): GridSettings['columns'] {\n return headers.map((data) => {\n const values = rows\n .map((row) => row[data])\n .filter((v) => v !== null);\n if (values.length > 0 && values.every((v) => typeof v === 'number')) {\n return { data, type: 'numeric' };\n }\n if (values.length > 0 && values.every((v) => typeof v === 'boolean')) {\n return { data, type: 'checkbox' };\n }\n return { data, type: 'text' };\n });\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};","/src/styles.css":".import-csv-excel-wrap {\n display: flex;\n flex-direction: column;\n margin: 0 -1rem;\n}\n\n.import-dropzone {\n padding: 1.5rem 1rem;\n text-align: center;\n border: 0;\n border-bottom: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: transparent;\n color: var(--sl-color-gray-2, #555555);\n font-size: var(--sl-text-xs, 0.75rem);\n transition: background 0.15s ease;\n cursor: pointer;\n}\n\n.import-dropzone p {\n margin: 0 0 0.75rem;\n}\n\n.import-dropzone.import-dropzone--active {\n background: var(--sl-color-gray-6, #eeeeee);\n}\n\n.import-actions {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.import-file-label {\n display: inline-block;\n cursor: pointer;\n}\n\n.import-file-label span,\n.import-sample-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.375rem 0.75rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: var(--sl-color-gray-6, #eeeeee);\n color: var(--sl-color-gray-2, #555555);\n font-family: var(--sl-font, Inter, system-ui, -apple-system, sans-serif);\n font-size: var(--sl-text-xs, 0.75rem);\n font-weight: 500;\n line-height: 1.4;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.import-file-label:hover span,\n.import-sample-btn:hover {\n background: var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-white, #333333);\n}\n\n.import-file-label input {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n}\n\n.import-msg {\n margin: 0;\n padding: 0.75rem 1rem;\n border-radius: 0;\n font-size: var(--sl-text-xs, 0.75rem);\n}\n\n.import-msg--error {\n border-bottom: 1px solid var(--sl-color-red, #ef4444);\n background: var(--sl-color-red-low, rgba(239, 68, 68, 0.12));\n color: var(--sl-color-red, #ef4444);\n}\n\n.import-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 2.5rem 1rem;\n min-height: 200px;\n color: var(--sl-color-gray-2, #555555);\n text-align: center;\n}\n\n.import-empty-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-bottom: 0.25rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-gray-3, #777777);\n}\n\n.import-empty-title {\n margin: 0;\n color: var(--sl-color-white, #333333);\n font-size: var(--sl-text-sm, 0.875rem);\n font-weight: 600;\n}\n\n.import-empty-text {\n margin: 0;\n max-width: 38ch;\n font-size: var(--sl-text-xs, 0.75rem);\n line-height: 1.5;\n}"},"docsPath":"recipes/import-export/import-csv-excel/angular/example1.ts","breadcrumb":["Recipes","Import Export","Import from CSV or Excel"],"guide":"recipes/import-export/import-csv-excel/import-csv-excel.md","guideTitle":"Import from CSV or Excel","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/import-export/import-csv-excel","lang":"Angular"} +{"framework":"angular","displayName":"Recipes ▸ Import Export ▸ Import from CSV or Excel · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":8,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\",\n \"papaparse\": \"5.7.0\",\n \"read-excel-file\": \"9.3.12\"\n },\n \"devDependencies\": {\n \"@types/papaparse\": \"5.5.2\"\n }\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [\n \"src/styles.css\"\n ],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component, NgZone, ViewChild, inject } from '@angular/core';\nimport { GridSettings, HotTableComponent, HotTableModule } from '@handsontable/angular-wrapper';\nimport Papa from 'papaparse';\nimport readXlsxFile from 'read-excel-file/browser';\nimport type { Sheet } from 'read-excel-file/browser';\n\ninterface ParsedPayload {\n headers: string[];\n rows: Record[];\n}\n\nfunction extensionOf(name: string): string {\n const i = name.lastIndexOf('.');\n return i >= 0 ? name.slice(i + 1).toLowerCase() : '';\n}\n\nfunction normalizeCellValue(value: unknown): unknown {\n if (value === null || value === undefined) {\n return null;\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value;\n }\n if (value instanceof Date) {\n return value.toISOString().slice(0, 10);\n }\n const text = String(value).trim();\n return text === '' ? null : text;\n}\n\nfunction processPapaResults(results: Papa.ParseResult>): ParsedPayload {\n if (results.errors.length > 0) {\n throw new Error(results.errors[0].message || 'CSV parse error.');\n }\n const fields = (results.meta.fields ?? []).filter((f) => f !== undefined && f !== '');\n if (fields.length === 0) {\n throw new Error('No header row found in the CSV.');\n }\n const rows = results.data.map((row) => {\n const out: Record = {};\n for (const key of fields) {\n out[key] = normalizeCellValue(row[key]);\n }\n return out;\n });\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n return { headers: fields, rows };\n}\n\nfunction parseCsvText(text: string): ParsedPayload {\n const trimmed = text.trim();\n if (!trimmed) {\n throw new Error('The input is empty.');\n }\n const parsed = Papa.parse>(trimmed, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h) => h.trim(),\n });\n return processPapaResults(parsed);\n}\n\nasync function parseCsvFile(file: File): Promise {\n return new Promise((resolve, reject) => {\n Papa.parse>(file, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h: string) => h.trim(),\n complete: (results: Papa.ParseResult>) => {\n try {\n resolve(processPapaResults(results));\n } catch (e) {\n reject(e instanceof Error ? e : new Error(String(e)));\n }\n },\n error: (err: Error) => reject(err instanceof Error ? err : new Error(String(err))),\n });\n });\n}\n\nasync function parseXlsxFile(file: File): Promise {\n let sheets: Sheet[];\n try {\n sheets = await readXlsxFile(file);\n } catch {\n throw new Error('Could not read the Excel workbook. The file may be corrupted.');\n }\n const firstSheet = sheets[0];\n if (!firstSheet) {\n throw new Error('The workbook has no sheets.');\n }\n const matrix: unknown[][] = firstSheet.data;\n if (!matrix.length) {\n throw new Error('The sheet is empty.');\n }\n const rawHeader = (matrix[0] as unknown[]).map((cell) => String(cell ?? '').trim());\n if (rawHeader.length === 0 || rawHeader.every((h) => h === '')) {\n throw new Error('No header row found in the Excel sheet.');\n }\n const keys = rawHeader.map((h, i) => (h === '' ? `Column ${i + 1}` : h));\n const rows: Record[] = [];\n for (let r = 1; r < matrix.length; r++) {\n const line = matrix[r] as unknown[];\n const allEmpty = !line || (line as unknown[]).every((c) => normalizeCellValue(c) === null);\n if (allEmpty) {\n continue;\n }\n const obj: Record = {};\n for (let c = 0; c < keys.length; c++) {\n obj[keys[c]] = normalizeCellValue(line[c]);\n }\n rows.push(obj);\n }\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n return { headers: keys, rows };\n}\n\nasync function parseFile(file: File): Promise {\n const ext = extensionOf(file.name);\n if (ext === 'csv') {\n return parseCsvFile(file);\n }\n if (ext === 'xlsx') {\n return parseXlsxFile(file);\n }\n throw new Error('Unsupported file type. Use a .csv or .xlsx file.');\n}\n\n@Component({\n standalone: true,\n imports: [HotTableModule],\n selector: 'example1-import-csv-excel',\n template: `\n
\n \n

Drop a .csv or .xlsx file here, or pick a source.

\n
\n \n \n
\n
\n\n @if (errorMessage) {\n
{{ errorMessage }}
\n }\n\n @if (gridData.length === 0) {\n
\n \n \n \n \n \n \n

No data loaded yet

\n

\n Drop a CSV or Excel file above, choose a file, or load the sample data to populate the table.\n

\n
\n } @else {\n \n }\n \n `,\n})\nexport class AppComponent {\n @ViewChild(HotTableComponent, { static: false }) readonly hotTable!: HotTableComponent;\n\n private readonly zone = inject(NgZone);\n\n isDragOver = false;\n errorMessage = '';\n gridData: Record[] = [];\n\n private readonly SAMPLE_CSV = `Product,Category,In stock,Price\nWidget A,Hardware,true,19.99\nWidget B,Hardware,false,24.5\nService Pack,Services,true,0`;\n\n gridSettings: GridSettings = {\n colHeaders: [],\n columns: [],\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n };\n\n onDragOver(event: DragEvent): void {\n event.preventDefault();\n this.isDragOver = true;\n }\n\n onDragLeave(): void {\n this.isDragOver = false;\n }\n\n onDrop(event: DragEvent): void {\n event.preventDefault();\n this.isDragOver = false;\n const file = event.dataTransfer?.files?.[0];\n if (file) {\n this.handleFile(file);\n }\n }\n\n onFileChange(event: Event): void {\n const input = event.target as HTMLInputElement;\n const file = input.files?.[0];\n if (file) {\n this.handleFile(file);\n }\n input.value = '';\n }\n\n async loadSampleData(): Promise {\n this.errorMessage = '';\n try {\n const payload = parseCsvText(this.SAMPLE_CSV);\n this.loadIntoGrid(payload);\n } catch (e) {\n this.errorMessage = e instanceof Error ? e.message : String(e);\n }\n }\n\n private async handleFile(file: File): Promise {\n this.errorMessage = '';\n if (file.size === 0) {\n this.errorMessage = 'The file is empty.';\n return;\n }\n try {\n const payload = await parseFile(file);\n this.zone.run(() => this.loadIntoGrid(payload));\n } catch (e) {\n this.zone.run(() => {\n this.errorMessage = e instanceof Error ? e.message : String(e);\n });\n }\n }\n\n private loadIntoGrid(payload: ParsedPayload): void {\n const { headers, rows } = payload;\n this.gridSettings = {\n ...this.gridSettings,\n colHeaders: headers,\n columns: this.columnsFromHeaders(headers, rows),\n };\n this.gridData = [...rows];\n }\n\n private columnsFromHeaders(headers: string[], rows: Record[]): GridSettings['columns'] {\n return headers.map((data) => {\n const values = rows\n .map((row) => row[data])\n .filter((v) => v !== null);\n if (values.length > 0 && values.every((v) => typeof v === 'number')) {\n return { data, type: 'numeric' };\n }\n if (values.length > 0 && values.every((v) => typeof v === 'boolean')) {\n return { data, type: 'checkbox' };\n }\n return { data, type: 'text' };\n });\n }\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};","/src/styles.css":".import-csv-excel-wrap {\n display: flex;\n flex-direction: column;\n margin: 0 -1rem;\n}\n\n.import-dropzone {\n padding: 1.5rem 1rem;\n text-align: center;\n border: 0;\n border-bottom: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: transparent;\n color: var(--sl-color-gray-2, #555555);\n font-size: var(--sl-text-xs, 0.75rem);\n transition: background 0.15s ease;\n cursor: pointer;\n}\n\n.import-dropzone p {\n margin: 0 0 0.75rem;\n}\n\n.import-dropzone.import-dropzone--active {\n background: var(--sl-color-gray-6, #eeeeee);\n}\n\n.import-actions {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.import-file-label {\n display: inline-block;\n cursor: pointer;\n}\n\n.import-file-label span,\n.import-sample-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.375rem 0.75rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: var(--sl-color-gray-6, #eeeeee);\n color: var(--sl-color-gray-2, #555555);\n font-family: var(--sl-font, Inter, system-ui, -apple-system, sans-serif);\n font-size: var(--sl-text-xs, 0.75rem);\n font-weight: 500;\n line-height: 1.4;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.import-file-label:hover span,\n.import-sample-btn:hover {\n background: var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-white, #333333);\n}\n\n.import-file-label input {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n}\n\n.import-msg {\n margin: 0;\n padding: 0.75rem 1rem;\n border-radius: 0;\n font-size: var(--sl-text-xs, 0.75rem);\n}\n\n.import-msg--error {\n border-bottom: 1px solid var(--sl-color-red, #ef4444);\n background: var(--sl-color-red-low, rgba(239, 68, 68, 0.12));\n color: var(--sl-color-red, #ef4444);\n}\n\n.import-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 2.5rem 1rem;\n min-height: 200px;\n color: var(--sl-color-gray-2, #555555);\n text-align: center;\n}\n\n.import-empty-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-bottom: 0.25rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-gray-3, #777777);\n}\n\n.import-empty-title {\n margin: 0;\n color: var(--sl-color-white, #333333);\n font-size: var(--sl-text-sm, 0.875rem);\n font-weight: 600;\n}\n\n.import-empty-text {\n margin: 0;\n max-width: 38ch;\n font-size: var(--sl-text-xs, 0.75rem);\n line-height: 1.5;\n}"},"docsPath":"recipes/import-export/import-csv-excel/angular/example1.ts","breadcrumb":["Recipes","Import Export","Import from CSV or Excel"],"guide":"recipes/import-export/import-csv-excel/import-csv-excel.md","guideTitle":"Import from CSV or Excel","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/import-export/import-csv-excel","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__javascript__example1.ts.json index 85d4e0aa2..23488fc94 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__javascript__example1.ts.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__javascript__example1.ts.json @@ -1 +1 @@ -{"framework":"typescript","displayName":"Recipes ▸ Import Export ▸ Import from CSV or Excel · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"papaparse\": \"5.7.0\",\n \"read-excel-file\": \"9.3.10\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n

Drop a .csv or .xlsx file here, or pick a source.

\n
\n \n \n
\n
\n \n \n \n
\n \n \n \n \n \n \n

No data loaded yet

\n

Drop a CSV or Excel file above, choose a file, or load the sample data to populate the table.

\n
\n \n \n \n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport type { GridSettings } from 'handsontable/settings';\nimport Papa from 'papaparse';\nimport type readXlsxFile from 'read-excel-file/browser';\nimport type { Sheet } from 'read-excel-file/browser';\n\nregisterAllModules();\n\ntype ParsedPayload = {\n headers: string[];\n rows: Record[];\n};\n\ntype ParsedCellValue = string | number | boolean | null;\ntype ParsedRow = Record;\n\nconst CDN_PAPAPARSE = 'https://cdn.jsdelivr.net/npm/papaparse@5.5.3/papaparse.min.js';\nconst CDN_READ_EXCEL_FILE = 'https://cdn.jsdelivr.net/npm/read-excel-file@9.3.10/bundle/read-excel-file.min.js';\n\ndeclare global {\n interface Window {\n Papa?: typeof Papa;\n readXlsxFile?: typeof readXlsxFile;\n }\n}\n\nconst scriptPromises = new Map>();\n\nfunction loadScript(src: string): Promise {\n const cached = scriptPromises.get(src);\n\n if (cached) {\n return cached;\n }\n\n const p = new Promise((resolve, reject) => {\n const existing = document.querySelector(`script[data-cdn=\"${src}\"]`);\n\n if (existing) {\n existing.addEventListener('load', () => resolve(), { once: true });\n existing.addEventListener(\n 'error',\n () => reject(new Error(`Failed to load ${src}`)),\n { once: true },\n );\n if (existing.getAttribute('data-loaded') === '1') {\n resolve();\n }\n\n return;\n }\n\n const s = document.createElement('script');\n\n s.src = src;\n s.async = true;\n s.dataset.cdn = src;\n s.onload = () => {\n s.setAttribute('data-loaded', '1');\n resolve();\n };\n s.onerror = () => reject(new Error(`Failed to load ${src}`));\n document.head.appendChild(s);\n });\n\n scriptPromises.set(src, p);\n\n return p;\n}\n\nasync function ensurePapa(): Promise {\n if (typeof window.Papa !== 'undefined') {\n return window.Papa;\n }\n\n await loadScript(CDN_PAPAPARSE);\n\n if (typeof window.Papa === 'undefined') {\n throw new Error('PapaParse did not register on window.');\n }\n\n return window.Papa;\n}\n\nasync function ensureReadExcelFile(): Promise {\n if (typeof window.readXlsxFile !== 'undefined') {\n return window.readXlsxFile;\n }\n\n await loadScript(CDN_READ_EXCEL_FILE);\n\n if (typeof window.readXlsxFile === 'undefined') {\n throw new Error('read-excel-file did not register on window.');\n }\n\n return window.readXlsxFile;\n}\n\nfunction extensionOf(name: string): string {\n const i = name.lastIndexOf('.');\n\n return i >= 0 ? name.slice(i + 1).toLowerCase() : '';\n}\n\nfunction showError(el: HTMLElement | null, message: string): void {\n if (!el) {\n return;\n }\n\n el.textContent = message;\n el.hidden = false;\n}\n\nfunction clearError(el: HTMLElement | null): void {\n if (!el) {\n return;\n }\n\n el.textContent = '';\n el.hidden = true;\n}\n\nfunction normalizeCellValue(value: unknown): ParsedCellValue {\n if (value === null || value === undefined) {\n return null;\n }\n\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value;\n }\n\n if (value instanceof Date) {\n return value.toISOString().slice(0, 10);\n }\n\n const text = String(value).trim();\n\n return text === '' ? null : text;\n}\n\nfunction mapRowByHeaders(row: Record, headers: string[]): ParsedRow {\n const out: ParsedRow = {};\n\n for (const key of headers) {\n out[key] = normalizeCellValue(row[key]);\n }\n\n return out;\n}\n\nfunction processPapaResults(results: Papa.ParseResult>): ParsedPayload {\n if (results.errors.length > 0) {\n throw new Error(results.errors[0].message || 'CSV parse error.');\n }\n\n const fields = results.meta.fields?.filter((f) => f !== undefined && f !== '') ?? [];\n\n if (fields.length === 0) {\n throw new Error('No header row found in the CSV.');\n }\n\n const rows = (results.data as Record[]).map((row) => mapRowByHeaders(row, fields));\n\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n\n return { headers: fields, rows };\n}\n\nfunction parseCsvText(text: string, PapaRef: typeof Papa): ParsedPayload {\n const trimmed = text.trim();\n\n if (!trimmed) {\n throw new Error('The file is empty.');\n }\n\n const parsed = PapaRef.parse>(trimmed, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h) => h.trim(),\n });\n\n return processPapaResults(parsed);\n}\n\nasync function parseCsvFile(file: File, PapaRef: typeof Papa): Promise {\n return new Promise((resolve, reject) => {\n PapaRef.parse>(file, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h) => h.trim(),\n complete: (results) => {\n try {\n resolve(processPapaResults(results));\n } catch (e) {\n reject(e instanceof Error ? e : new Error(String(e)));\n }\n },\n error: (err) => reject(err instanceof Error ? err : new Error(String(err))),\n });\n });\n}\n\nasync function parseXlsxFile(file: File, readXlsxFileRef: typeof readXlsxFile): Promise {\n let sheets: Sheet[];\n\n try {\n sheets = await readXlsxFileRef(file);\n } catch {\n throw new Error('Could not read the Excel workbook. The file may be corrupted.');\n }\n\n const firstSheet = sheets[0];\n\n if (!firstSheet) {\n throw new Error('The workbook has no sheets.');\n }\n\n const matrix: unknown[][] = firstSheet.data;\n\n if (!matrix.length) {\n throw new Error('The sheet is empty.');\n }\n\n const rawHeader = matrix[0].map((cell) => String(cell ?? '').trim());\n\n if (rawHeader.length === 0 || rawHeader.every((h) => h === '')) {\n throw new Error('No header row found in the Excel sheet.');\n }\n\n const keys = rawHeader.map((h, i) => (h === '' ? `Column ${i + 1}` : h));\n\n const rows: Record[] = [];\n\n for (let r = 1; r < matrix.length; r++) {\n const line = matrix[r];\n const allEmpty = !line || line.every((c) => normalizeCellValue(c) === null);\n\n if (allEmpty) {\n continue;\n }\n\n const obj: ParsedRow = {};\n\n for (let c = 0; c < keys.length; c++) {\n const key = keys[c];\n const raw = line[c];\n\n obj[key] = normalizeCellValue(raw);\n }\n\n rows.push(obj);\n }\n\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n\n return { headers: keys, rows };\n}\n\nasync function parseFile(file: File): Promise {\n const ext = extensionOf(file.name);\n\n if (ext === 'csv') {\n const PapaRef = await ensurePapa();\n\n return parseCsvFile(file, PapaRef);\n }\n\n if (ext === 'xlsx') {\n const readXlsxFileRef = await ensureReadExcelFile();\n\n return parseXlsxFile(file, readXlsxFileRef);\n }\n\n throw new Error('Unsupported file type. Use a .csv or .xlsx file.');\n}\n\nconst SAMPLE_CSV = `Product,Category,In stock,Price\nWidget A,Hardware,true,19.99\nWidget B,Hardware,false,24.5\nService Pack,Services,true,0`;\n\nfunction columnsFromHeaders(headers: string[], rows: ParsedRow[]): GridSettings['columns'] {\n return headers.map((data) => {\n const values = rows\n .map((row) => row[data])\n .filter((v): v is string | number | boolean => v !== null);\n\n if (values.length > 0 && values.every((v) => typeof v === 'number')) {\n return { data, type: 'numeric' as const };\n }\n\n if (values.length > 0 && values.every((v) => typeof v === 'boolean')) {\n return { data, type: 'checkbox' as const };\n }\n\n return { data, type: 'text' as const };\n });\n}\n\nconst gridContainer = document.querySelector('#example1')!;\nconst emptyEl = document.querySelector('#import-empty');\nconst errEl = document.querySelector('#import-error');\nconst fileInput = document.querySelector('#import-file');\nconst dropzone = document.querySelector('#import-dropzone');\nconst sampleBtn = document.querySelector('#import-load-sample');\n\nlet hot: Handsontable | null = null;\n\nfunction loadIntoGrid({ headers, rows }: ParsedPayload): void {\n const columns = columnsFromHeaders(headers, rows);\n\n if (!hot) {\n if (emptyEl) {\n emptyEl.hidden = true;\n }\n gridContainer.hidden = false;\n hot = new Handsontable(gridContainer, {\n data: rows,\n columns,\n colHeaders: headers,\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n licenseKey: 'non-commercial-and-evaluation',\n });\n } else {\n hot.updateSettings({ colHeaders: headers, columns });\n hot.loadData(rows);\n }\n}\n\nasync function handleFile(file: File | null | undefined): Promise {\n clearError(errEl);\n\n if (!file) {\n return;\n }\n\n if (file.size === 0) {\n showError(errEl, 'The file is empty.');\n\n return;\n }\n\n try {\n const payload = await parseFile(file);\n\n loadIntoGrid(payload);\n } catch (e) {\n showError(errEl, e instanceof Error ? e.message : String(e));\n }\n}\n\nfileInput?.addEventListener('change', () => {\n const f = fileInput.files?.[0];\n\n handleFile(f);\n fileInput.value = '';\n});\n\ndropzone?.addEventListener('dragover', (ev) => {\n ev.preventDefault();\n dropzone.classList.add('import-dropzone--active');\n});\n\ndropzone?.addEventListener('dragleave', () => {\n dropzone.classList.remove('import-dropzone--active');\n});\n\ndropzone?.addEventListener('drop', (ev) => {\n ev.preventDefault();\n dropzone.classList.remove('import-dropzone--active');\n const f = ev.dataTransfer?.files?.[0];\n\n handleFile(f);\n});\n\nsampleBtn?.addEventListener('click', async () => {\n clearError(errEl);\n\n try {\n const PapaRef = await ensurePapa();\n const payload = parseCsvText(SAMPLE_CSV, PapaRef);\n\n loadIntoGrid(payload);\n } catch (e) {\n showError(errEl, e instanceof Error ? e.message : String(e));\n }\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":".import-csv-excel-wrap {\n display: flex;\n flex-direction: column;\n margin: 0 -1rem;\n}\n\n.import-dropzone {\n padding: 1.5rem 1rem;\n text-align: center;\n border: 0;\n border-bottom: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: transparent;\n color: var(--sl-color-gray-2, #555555);\n font-size: var(--sl-text-xs, 0.75rem);\n transition: background 0.15s ease;\n}\n\n.import-dropzone p {\n margin: 0 0 0.75rem;\n}\n\n.import-dropzone.import-dropzone--active {\n background: var(--sl-color-gray-6, #eeeeee);\n}\n\n.import-actions {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.import-file-label {\n display: inline-block;\n cursor: pointer;\n}\n\n.import-file-label span,\n.import-sample-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.375rem 0.75rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: var(--sl-color-gray-6, #eeeeee);\n color: var(--sl-color-gray-2, #555555);\n font-family: var(--sl-font, Inter, system-ui, -apple-system, sans-serif);\n font-size: var(--sl-text-xs, 0.75rem);\n font-weight: 500;\n line-height: 1.4;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.import-file-label:hover span,\n.import-sample-btn:hover {\n background: var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-white, #333333);\n}\n\n.import-file-label input {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n}\n\n.import-msg {\n margin: 0;\n padding: 0.75rem 1rem;\n border-radius: 0;\n font-size: var(--sl-text-xs, 0.75rem);\n}\n\n.import-msg--error {\n border-bottom: 1px solid var(--sl-color-red, #ef4444);\n background: var(--sl-color-red-low, rgba(239, 68, 68, 0.12));\n color: var(--sl-color-red, #ef4444);\n}\n\n.import-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 2.5rem 1rem;\n min-height: 200px;\n color: var(--sl-color-gray-2, #555555);\n text-align: center;\n}\n\n.import-empty[hidden] {\n display: none;\n}\n\n.import-empty-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-bottom: 0.25rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-gray-3, #777777);\n}\n\n.import-empty-title {\n margin: 0;\n color: var(--sl-color-white, #333333);\n font-size: var(--sl-text-sm, 0.875rem);\n font-weight: 600;\n}\n\n.import-empty-text {\n margin: 0;\n max-width: 38ch;\n font-size: var(--sl-text-xs, 0.75rem);\n line-height: 1.5;\n}\n\n#example1 {\n padding: 1rem;\n min-height: 180px;\n}\n\n#example1[hidden] {\n display: none;\n}"},"docsPath":"recipes/import-export/import-csv-excel/javascript/example1.ts","breadcrumb":["Recipes","Import Export","Import from CSV or Excel"],"guide":"recipes/import-export/import-csv-excel/import-csv-excel.md","guideTitle":"Import from CSV or Excel","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/import-export/import-csv-excel","lang":"TypeScript"} +{"framework":"typescript","displayName":"Recipes ▸ Import Export ▸ Import from CSV or Excel · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\",\n \"papaparse\": \"5.7.0\",\n \"read-excel-file\": \"9.3.12\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n

Drop a .csv or .xlsx file here, or pick a source.

\n
\n \n \n
\n
\n \n \n \n
\n \n \n \n \n \n \n

No data loaded yet

\n

Drop a CSV or Excel file above, choose a file, or load the sample data to populate the table.

\n
\n \n \n \n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport type { GridSettings } from 'handsontable/settings';\nimport Papa from 'papaparse';\nimport type readXlsxFile from 'read-excel-file/browser';\nimport type { Sheet } from 'read-excel-file/browser';\n\nregisterAllModules();\n\ntype ParsedPayload = {\n headers: string[];\n rows: Record[];\n};\n\ntype ParsedCellValue = string | number | boolean | null;\ntype ParsedRow = Record;\n\nconst CDN_PAPAPARSE = 'https://cdn.jsdelivr.net/npm/papaparse@5.5.3/papaparse.min.js';\nconst CDN_READ_EXCEL_FILE = 'https://cdn.jsdelivr.net/npm/read-excel-file@9.3.10/bundle/read-excel-file.min.js';\n\ndeclare global {\n interface Window {\n Papa?: typeof Papa;\n readXlsxFile?: typeof readXlsxFile;\n }\n}\n\nconst scriptPromises = new Map>();\n\nfunction loadScript(src: string): Promise {\n const cached = scriptPromises.get(src);\n\n if (cached) {\n return cached;\n }\n\n const p = new Promise((resolve, reject) => {\n const existing = document.querySelector(`script[data-cdn=\"${src}\"]`);\n\n if (existing) {\n existing.addEventListener('load', () => resolve(), { once: true });\n existing.addEventListener(\n 'error',\n () => reject(new Error(`Failed to load ${src}`)),\n { once: true },\n );\n if (existing.getAttribute('data-loaded') === '1') {\n resolve();\n }\n\n return;\n }\n\n const s = document.createElement('script');\n\n s.src = src;\n s.async = true;\n s.dataset.cdn = src;\n s.onload = () => {\n s.setAttribute('data-loaded', '1');\n resolve();\n };\n s.onerror = () => reject(new Error(`Failed to load ${src}`));\n document.head.appendChild(s);\n });\n\n scriptPromises.set(src, p);\n\n return p;\n}\n\nasync function ensurePapa(): Promise {\n if (typeof window.Papa !== 'undefined') {\n return window.Papa;\n }\n\n await loadScript(CDN_PAPAPARSE);\n\n if (typeof window.Papa === 'undefined') {\n throw new Error('PapaParse did not register on window.');\n }\n\n return window.Papa;\n}\n\nasync function ensureReadExcelFile(): Promise {\n if (typeof window.readXlsxFile !== 'undefined') {\n return window.readXlsxFile;\n }\n\n await loadScript(CDN_READ_EXCEL_FILE);\n\n if (typeof window.readXlsxFile === 'undefined') {\n throw new Error('read-excel-file did not register on window.');\n }\n\n return window.readXlsxFile;\n}\n\nfunction extensionOf(name: string): string {\n const i = name.lastIndexOf('.');\n\n return i >= 0 ? name.slice(i + 1).toLowerCase() : '';\n}\n\nfunction showError(el: HTMLElement | null, message: string): void {\n if (!el) {\n return;\n }\n\n el.textContent = message;\n el.hidden = false;\n}\n\nfunction clearError(el: HTMLElement | null): void {\n if (!el) {\n return;\n }\n\n el.textContent = '';\n el.hidden = true;\n}\n\nfunction normalizeCellValue(value: unknown): ParsedCellValue {\n if (value === null || value === undefined) {\n return null;\n }\n\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value;\n }\n\n if (value instanceof Date) {\n return value.toISOString().slice(0, 10);\n }\n\n const text = String(value).trim();\n\n return text === '' ? null : text;\n}\n\nfunction mapRowByHeaders(row: Record, headers: string[]): ParsedRow {\n const out: ParsedRow = {};\n\n for (const key of headers) {\n out[key] = normalizeCellValue(row[key]);\n }\n\n return out;\n}\n\nfunction processPapaResults(results: Papa.ParseResult>): ParsedPayload {\n if (results.errors.length > 0) {\n throw new Error(results.errors[0].message || 'CSV parse error.');\n }\n\n const fields = results.meta.fields?.filter((f) => f !== undefined && f !== '') ?? [];\n\n if (fields.length === 0) {\n throw new Error('No header row found in the CSV.');\n }\n\n const rows = (results.data as Record[]).map((row) => mapRowByHeaders(row, fields));\n\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n\n return { headers: fields, rows };\n}\n\nfunction parseCsvText(text: string, PapaRef: typeof Papa): ParsedPayload {\n const trimmed = text.trim();\n\n if (!trimmed) {\n throw new Error('The file is empty.');\n }\n\n const parsed = PapaRef.parse>(trimmed, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h) => h.trim(),\n });\n\n return processPapaResults(parsed);\n}\n\nasync function parseCsvFile(file: File, PapaRef: typeof Papa): Promise {\n return new Promise((resolve, reject) => {\n PapaRef.parse>(file, {\n header: true,\n dynamicTyping: true,\n skipEmptyLines: 'greedy',\n transformHeader: (h) => h.trim(),\n complete: (results) => {\n try {\n resolve(processPapaResults(results));\n } catch (e) {\n reject(e instanceof Error ? e : new Error(String(e)));\n }\n },\n error: (err) => reject(err instanceof Error ? err : new Error(String(err))),\n });\n });\n}\n\nasync function parseXlsxFile(file: File, readXlsxFileRef: typeof readXlsxFile): Promise {\n let sheets: Sheet[];\n\n try {\n sheets = await readXlsxFileRef(file);\n } catch {\n throw new Error('Could not read the Excel workbook. The file may be corrupted.');\n }\n\n const firstSheet = sheets[0];\n\n if (!firstSheet) {\n throw new Error('The workbook has no sheets.');\n }\n\n const matrix: unknown[][] = firstSheet.data;\n\n if (!matrix.length) {\n throw new Error('The sheet is empty.');\n }\n\n const rawHeader = matrix[0].map((cell) => String(cell ?? '').trim());\n\n if (rawHeader.length === 0 || rawHeader.every((h) => h === '')) {\n throw new Error('No header row found in the Excel sheet.');\n }\n\n const keys = rawHeader.map((h, i) => (h === '' ? `Column ${i + 1}` : h));\n\n const rows: Record[] = [];\n\n for (let r = 1; r < matrix.length; r++) {\n const line = matrix[r];\n const allEmpty = !line || line.every((c) => normalizeCellValue(c) === null);\n\n if (allEmpty) {\n continue;\n }\n\n const obj: ParsedRow = {};\n\n for (let c = 0; c < keys.length; c++) {\n const key = keys[c];\n const raw = line[c];\n\n obj[key] = normalizeCellValue(raw);\n }\n\n rows.push(obj);\n }\n\n if (rows.length === 0) {\n throw new Error('No data rows after the header.');\n }\n\n return { headers: keys, rows };\n}\n\nasync function parseFile(file: File): Promise {\n const ext = extensionOf(file.name);\n\n if (ext === 'csv') {\n const PapaRef = await ensurePapa();\n\n return parseCsvFile(file, PapaRef);\n }\n\n if (ext === 'xlsx') {\n const readXlsxFileRef = await ensureReadExcelFile();\n\n return parseXlsxFile(file, readXlsxFileRef);\n }\n\n throw new Error('Unsupported file type. Use a .csv or .xlsx file.');\n}\n\nconst SAMPLE_CSV = `Product,Category,In stock,Price\nWidget A,Hardware,true,19.99\nWidget B,Hardware,false,24.5\nService Pack,Services,true,0`;\n\nfunction columnsFromHeaders(headers: string[], rows: ParsedRow[]): GridSettings['columns'] {\n return headers.map((data) => {\n const values = rows\n .map((row) => row[data])\n .filter((v): v is string | number | boolean => v !== null);\n\n if (values.length > 0 && values.every((v) => typeof v === 'number')) {\n return { data, type: 'numeric' as const };\n }\n\n if (values.length > 0 && values.every((v) => typeof v === 'boolean')) {\n return { data, type: 'checkbox' as const };\n }\n\n return { data, type: 'text' as const };\n });\n}\n\nconst gridContainer = document.querySelector('#example1')!;\nconst emptyEl = document.querySelector('#import-empty');\nconst errEl = document.querySelector('#import-error');\nconst fileInput = document.querySelector('#import-file');\nconst dropzone = document.querySelector('#import-dropzone');\nconst sampleBtn = document.querySelector('#import-load-sample');\n\nlet hot: Handsontable | null = null;\n\nfunction loadIntoGrid({ headers, rows }: ParsedPayload): void {\n const columns = columnsFromHeaders(headers, rows);\n\n if (!hot) {\n if (emptyEl) {\n emptyEl.hidden = true;\n }\n gridContainer.hidden = false;\n hot = new Handsontable(gridContainer, {\n data: rows,\n columns,\n colHeaders: headers,\n rowHeaders: true,\n height: 'auto',\n width: '100%',\n licenseKey: 'non-commercial-and-evaluation',\n });\n } else {\n hot.updateSettings({ colHeaders: headers, columns });\n hot.loadData(rows);\n }\n}\n\nasync function handleFile(file: File | null | undefined): Promise {\n clearError(errEl);\n\n if (!file) {\n return;\n }\n\n if (file.size === 0) {\n showError(errEl, 'The file is empty.');\n\n return;\n }\n\n try {\n const payload = await parseFile(file);\n\n loadIntoGrid(payload);\n } catch (e) {\n showError(errEl, e instanceof Error ? e.message : String(e));\n }\n}\n\nfileInput?.addEventListener('change', () => {\n const f = fileInput.files?.[0];\n\n handleFile(f);\n fileInput.value = '';\n});\n\ndropzone?.addEventListener('dragover', (ev) => {\n ev.preventDefault();\n dropzone.classList.add('import-dropzone--active');\n});\n\ndropzone?.addEventListener('dragleave', () => {\n dropzone.classList.remove('import-dropzone--active');\n});\n\ndropzone?.addEventListener('drop', (ev) => {\n ev.preventDefault();\n dropzone.classList.remove('import-dropzone--active');\n const f = ev.dataTransfer?.files?.[0];\n\n handleFile(f);\n});\n\nsampleBtn?.addEventListener('click', async () => {\n clearError(errEl);\n\n try {\n const PapaRef = await ensurePapa();\n const payload = parseCsvText(SAMPLE_CSV, PapaRef);\n\n loadIntoGrid(payload);\n } catch (e) {\n showError(errEl, e instanceof Error ? e.message : String(e));\n }\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":".import-csv-excel-wrap {\n display: flex;\n flex-direction: column;\n margin: 0 -1rem;\n}\n\n.import-dropzone {\n padding: 1.5rem 1rem;\n text-align: center;\n border: 0;\n border-bottom: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: transparent;\n color: var(--sl-color-gray-2, #555555);\n font-size: var(--sl-text-xs, 0.75rem);\n transition: background 0.15s ease;\n}\n\n.import-dropzone p {\n margin: 0 0 0.75rem;\n}\n\n.import-dropzone.import-dropzone--active {\n background: var(--sl-color-gray-6, #eeeeee);\n}\n\n.import-actions {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.import-file-label {\n display: inline-block;\n cursor: pointer;\n}\n\n.import-file-label span,\n.import-sample-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.375rem 0.75rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: var(--sl-color-gray-6, #eeeeee);\n color: var(--sl-color-gray-2, #555555);\n font-family: var(--sl-font, Inter, system-ui, -apple-system, sans-serif);\n font-size: var(--sl-text-xs, 0.75rem);\n font-weight: 500;\n line-height: 1.4;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.import-file-label:hover span,\n.import-sample-btn:hover {\n background: var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-white, #333333);\n}\n\n.import-file-label input {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n}\n\n.import-msg {\n margin: 0;\n padding: 0.75rem 1rem;\n border-radius: 0;\n font-size: var(--sl-text-xs, 0.75rem);\n}\n\n.import-msg--error {\n border-bottom: 1px solid var(--sl-color-red, #ef4444);\n background: var(--sl-color-red-low, rgba(239, 68, 68, 0.12));\n color: var(--sl-color-red, #ef4444);\n}\n\n.import-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 2.5rem 1rem;\n min-height: 200px;\n color: var(--sl-color-gray-2, #555555);\n text-align: center;\n}\n\n.import-empty[hidden] {\n display: none;\n}\n\n.import-empty-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-bottom: 0.25rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-gray-3, #777777);\n}\n\n.import-empty-title {\n margin: 0;\n color: var(--sl-color-white, #333333);\n font-size: var(--sl-text-sm, 0.875rem);\n font-weight: 600;\n}\n\n.import-empty-text {\n margin: 0;\n max-width: 38ch;\n font-size: var(--sl-text-xs, 0.75rem);\n line-height: 1.5;\n}\n\n#example1 {\n padding: 1rem;\n min-height: 180px;\n}\n\n#example1[hidden] {\n display: none;\n}"},"docsPath":"recipes/import-export/import-csv-excel/javascript/example1.ts","breadcrumb":["Recipes","Import Export","Import from CSV or Excel"],"guide":"recipes/import-export/import-csv-excel/import-csv-excel.md","guideTitle":"Import from CSV or Excel","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/import-export/import-csv-excel","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__vue__example1.vue.json b/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__vue__example1.vue.json index 329bd5ec9..bc5c00129 100644 --- a/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__vue__example1.vue.json +++ b/runner/apps/authoring/public/docs-examples/next/recipes__import-export__import-csv-excel__vue__example1.vue.json @@ -1 +1 @@ -{"framework":"vue","displayName":"Recipes ▸ Import Export ▸ Import from CSV or Excel · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"papaparse\": \"5.7.0\",\n \"read-excel-file\": \"9.3.10\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n","/src/styles.css":".import-csv-excel-wrap {\n display: flex;\n flex-direction: column;\n margin: 0 -1rem;\n}\n\n.import-dropzone {\n padding: 1.5rem 1rem;\n text-align: center;\n border: 0;\n border-bottom: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: transparent;\n color: var(--sl-color-gray-2, #555555);\n font-size: var(--sl-text-xs, 0.75rem);\n transition: background 0.15s ease;\n cursor: pointer;\n}\n\n.import-dropzone p {\n margin: 0 0 0.75rem;\n}\n\n.import-dropzone.import-dropzone--active {\n background: var(--sl-color-gray-6, #eeeeee);\n}\n\n.import-actions {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.import-file-label {\n display: inline-block;\n cursor: pointer;\n}\n\n.import-file-label span,\n.import-sample-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.375rem 0.75rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: var(--sl-color-gray-6, #eeeeee);\n color: var(--sl-color-gray-2, #555555);\n font-family: var(--sl-font, Inter, system-ui, -apple-system, sans-serif);\n font-size: var(--sl-text-xs, 0.75rem);\n font-weight: 500;\n line-height: 1.4;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.import-file-label:hover span,\n.import-sample-btn:hover {\n background: var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-white, #333333);\n}\n\n.import-file-label input {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n}\n\n.import-msg {\n margin: 0;\n padding: 0.75rem 1rem;\n border-radius: 0;\n font-size: var(--sl-text-xs, 0.75rem);\n}\n\n.import-msg--error {\n border-bottom: 1px solid var(--sl-color-red, #ef4444);\n background: var(--sl-color-red-low, rgba(239, 68, 68, 0.12));\n color: var(--sl-color-red, #ef4444);\n}\n\n.import-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 2.5rem 1rem;\n min-height: 200px;\n color: var(--sl-color-gray-2, #555555);\n text-align: center;\n}\n\n.import-empty-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-bottom: 0.25rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-gray-3, #777777);\n}\n\n.import-empty-title {\n margin: 0;\n color: var(--sl-color-white, #333333);\n font-size: var(--sl-text-sm, 0.875rem);\n font-weight: 600;\n}\n\n.import-empty-text {\n margin: 0;\n max-width: 38ch;\n font-size: var(--sl-text-xs, 0.75rem);\n line-height: 1.5;\n}"},"docsPath":"recipes/import-export/import-csv-excel/vue/example1.vue","breadcrumb":["Recipes","Import Export","Import from CSV or Excel"],"guide":"recipes/import-export/import-csv-excel/import-csv-excel.md","guideTitle":"Import from CSV or Excel","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/import-export/import-csv-excel","lang":"Vue 3"} +{"framework":"vue","displayName":"Recipes ▸ Import Export ▸ Import from CSV or Excel · Standard example · Vue 3","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"vue","htWrappers":["@handsontable/vue3"],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":"pnpm exec vite --host 0.0.0.0 --port 5173","buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":5173,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":6,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-vue-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/vue3\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vue\": \"3.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-vue\": \"^5.0.0\",\n \"papaparse\": \"5.7.0\",\n \"read-excel-file\": \"9.3.12\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport vue from \"@vitejs/plugin-vue\";\n\nexport default defineConfig({ plugins: [vue()], server: { allowedHosts: true } });","/index.html":"\n\n\n \n \n Handsontable Vue Example\n\n\n
\n \n\n","/src/main.ts":"import { createApp } from \"vue\";\nimport \"./styles.css\";\nimport App from \"./App.vue\";\ncreateApp(App).mount(\"#example1\");","/src/App.vue":"\n\n","/src/styles.css":".import-csv-excel-wrap {\n display: flex;\n flex-direction: column;\n margin: 0 -1rem;\n}\n\n.import-dropzone {\n padding: 1.5rem 1rem;\n text-align: center;\n border: 0;\n border-bottom: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: transparent;\n color: var(--sl-color-gray-2, #555555);\n font-size: var(--sl-text-xs, 0.75rem);\n transition: background 0.15s ease;\n cursor: pointer;\n}\n\n.import-dropzone p {\n margin: 0 0 0.75rem;\n}\n\n.import-dropzone.import-dropzone--active {\n background: var(--sl-color-gray-6, #eeeeee);\n}\n\n.import-actions {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.import-file-label {\n display: inline-block;\n cursor: pointer;\n}\n\n.import-file-label span,\n.import-sample-btn {\n display: inline-flex;\n align-items: center;\n padding: 0.375rem 0.75rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n border-radius: 0;\n background: var(--sl-color-gray-6, #eeeeee);\n color: var(--sl-color-gray-2, #555555);\n font-family: var(--sl-font, Inter, system-ui, -apple-system, sans-serif);\n font-size: var(--sl-text-xs, 0.75rem);\n font-weight: 500;\n line-height: 1.4;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.import-file-label:hover span,\n.import-sample-btn:hover {\n background: var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-white, #333333);\n}\n\n.import-file-label input {\n position: absolute;\n width: 1px;\n height: 1px;\n opacity: 0;\n pointer-events: none;\n}\n\n.import-msg {\n margin: 0;\n padding: 0.75rem 1rem;\n border-radius: 0;\n font-size: var(--sl-text-xs, 0.75rem);\n}\n\n.import-msg--error {\n border-bottom: 1px solid var(--sl-color-red, #ef4444);\n background: var(--sl-color-red-low, rgba(239, 68, 68, 0.12));\n color: var(--sl-color-red, #ef4444);\n}\n\n.import-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 2.5rem 1rem;\n min-height: 200px;\n color: var(--sl-color-gray-2, #555555);\n text-align: center;\n}\n\n.import-empty-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-bottom: 0.25rem;\n border: 1px solid var(--sl-color-gray-5, #e0e0e0);\n color: var(--sl-color-gray-3, #777777);\n}\n\n.import-empty-title {\n margin: 0;\n color: var(--sl-color-white, #333333);\n font-size: var(--sl-text-sm, 0.875rem);\n font-weight: 600;\n}\n\n.import-empty-text {\n margin: 0;\n max-width: 38ch;\n font-size: var(--sl-text-xs, 0.75rem);\n line-height: 1.5;\n}"},"docsPath":"recipes/import-export/import-csv-excel/vue/example1.vue","breadcrumb":["Recipes","Import Export","Import from CSV or Excel"],"guide":"recipes/import-export/import-csv-excel/import-csv-excel.md","guideTitle":"Import from CSV or Excel","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/import-export/import-csv-excel","lang":"Vue 3"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.js.json new file mode 100644 index 000000000..8032328a1 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.js.json @@ -0,0 +1 @@ +{"framework":"javascript","displayName":"Recipes ▸ Real Time ▸ Add AI-classified columns with Jev · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { textRenderer } from 'handsontable/renderers';\n\nregisterAllModules();\n\n// The columns to add. `type` is the Jev question type: noul (yes or no),\n// score (one of ordered levels), choice (one option from a list).\nconst AI_COLUMNS = [\n {\n key: 'sentiment',\n name: 'Sentiment',\n type: 'score',\n prompt: 'How positive is this review overall?',\n options: ['Very negative', 'Negative', 'Mixed', 'Positive', 'Very positive'],\n },\n {\n key: 'category',\n name: 'Category',\n type: 'choice',\n prompt: 'Which category best fits the main issue in this review?',\n options: ['quality', 'shipping', 'price', 'support', 'usability'],\n },\n {\n key: 'needsReply',\n name: 'Needs reply',\n type: 'noul',\n prompt: 'Does this review warrant a reply from customer support?',\n },\n];\n\n/* start:skip-in-preview */\nconst reviews = [\n {\n id: 1,\n product: 'Wireless earbuds',\n review:\n \"Crisp sound, the case charges fast, and they pair instantly with my laptop. Easily the best pair I've owned under $100.\",\n },\n {\n id: 2,\n product: 'Wireless earbuds',\n review:\n \"Left bud died after nine days. Support sent a replacement without fuss, but I shouldn't have needed one this soon.\",\n },\n {\n id: 3,\n product: 'Standing desk',\n review:\n \"Motor is whisper quiet and the frame doesn't wobble at full height. Assembly took 40 minutes with clear instructions.\",\n },\n {\n id: 4,\n product: 'Standing desk',\n review: 'Great desk but shipping took 3 weeks and support never replied to my two emails asking where it was.',\n },\n {\n id: 5,\n product: 'Coffee grinder',\n review: \"Grind is consistent from espresso to French press. It's loud, but every burr grinder is.\",\n },\n {\n id: 6,\n product: 'Coffee grinder',\n review: 'Stopped working after two months. The hopper lid also cracked. Expected more for $180.',\n },\n {\n id: 7,\n product: 'Running shoes',\n review:\n 'Light, breathable, and the fit is true to size. Ran a half marathon in them the second week with no blisters.',\n },\n {\n id: 8,\n product: 'Running shoes',\n review:\n 'Comfortable shoe, but the sole started separating at the toe after 60 miles. Returned it, refund took 3 weeks.',\n },\n {\n id: 14,\n product: 'Mechanical keyboard',\n review: \"Two keys arrived dead. Support fixed it fast with a replacement, so I'm happy now, but the QA worries me.\",\n },\n {\n id: 24,\n product: 'Electric kettle',\n review: 'The kettle is good. The box arrived crushed and the lid was dented. Kept it anyway because it works.',\n },\n];\n\n// Jev's answers for the rows above, recorded from the API on 2026-10-08.\n// Keyed \":\". Score probabilities are per level index.\nconst RECORDED = {\n 'sentiment:1': { type: 'score', score: 4.0, confidence: 1.0, probabilities: { 0: 0, 1: 0, 2: 0, 3: 0, 4: 1 } },\n 'sentiment:2': {\n type: 'score',\n score: 1.66,\n confidence: 0.72,\n probabilities: { 0: 0, 1: 0.33, 2: 0.67, 3: 0, 4: 0 },\n },\n 'sentiment:3': {\n type: 'score',\n score: 3.95,\n confidence: 0.96,\n probabilities: { 0: 0, 1: 0, 2: 0, 3: 0.04, 4: 0.96 },\n },\n 'sentiment:4': {\n type: 'score',\n score: 1.95,\n confidence: 0.96,\n probabilities: { 0: 0, 1: 0.05, 2: 0.95, 3: 0, 4: 0 },\n },\n 'sentiment:5': {\n type: 'score',\n score: 3.05,\n confidence: 0.95,\n probabilities: { 0: 0, 1: 0, 2: 0.01, 3: 0.93, 4: 0.06 },\n },\n 'sentiment:6': { type: 'score', score: 0.2, confidence: 0.83, probabilities: { 0: 0.8, 1: 0.2, 2: 0, 3: 0, 4: 0 } },\n 'sentiment:7': {\n type: 'score',\n score: 3.98,\n confidence: 0.98,\n probabilities: { 0: 0, 1: 0, 2: 0, 3: 0.02, 4: 0.98 },\n },\n 'sentiment:8': {\n type: 'score',\n score: 1.21,\n confidence: 0.81,\n probabilities: { 0: 0.01, 1: 0.77, 2: 0.22, 3: 0, 4: 0 },\n },\n 'sentiment:14': {\n type: 'score',\n score: 2.04,\n confidence: 0.97,\n probabilities: { 0: 0, 1: 0, 2: 0.96, 3: 0.04, 4: 0 },\n },\n 'sentiment:24': {\n type: 'score',\n score: 2.06,\n confidence: 0.94,\n probabilities: { 0: 0, 1: 0.01, 2: 0.92, 3: 0.07, 4: 0 },\n },\n 'category:1': { type: 'choice', choice: 'quality', confidence: 0.52 },\n 'category:2': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:3': { type: 'choice', choice: 'quality', confidence: 0.79 },\n 'category:4': { type: 'choice', choice: 'shipping', confidence: 0.86 },\n 'category:5': { type: 'choice', choice: 'usability', confidence: 0.62 },\n 'category:6': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:7': { type: 'choice', choice: 'usability', confidence: 0.46 },\n 'category:8': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:14': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:24': { type: 'choice', choice: 'shipping', confidence: 0.99 },\n 'needsReply:1': { type: 'noul', noul: 0.12 },\n 'needsReply:2': { type: 'noul', noul: 0.7 },\n 'needsReply:3': { type: 'noul', noul: 0.12 },\n 'needsReply:4': { type: 'noul', noul: 0.9 },\n 'needsReply:5': { type: 'noul', noul: 0.12 },\n 'needsReply:6': { type: 'noul', noul: 0.88 },\n 'needsReply:7': { type: 'noul', noul: 0.12 },\n 'needsReply:8': { type: 'noul', noul: 0.79 },\n 'needsReply:14': { type: 'noul', noul: 0.65 },\n 'needsReply:24': { type: 'noul', noul: 0.69 },\n};\n/* end:skip-in-preview */\n\n// Stand-in for the model: a recorded answer after a short delay, so the page\n// needs no backend. For the real model, send `{ type, prompt, options, row }`\n// to a proxy that holds your key (see Step 5 on the page).\nfunction classify(row, column) {\n const answer = RECORDED[`${column.key}:${row.id}`];\n\n return new Promise((resolve, reject) => {\n setTimeout(\n () => {\n if (answer) {\n resolve(answer);\n } else {\n reject(new Error('No answer'));\n }\n },\n 150 + Math.random() * 250,\n );\n });\n}\n\n// Which of Jev's fields go into the cells. A Noul is a single probability and\n// has no confidence field, so a Noul column gets no confidence column.\nfunction toCells(column, answer) {\n switch (answer.type) {\n case 'noul':\n return { value: answer.noul };\n case 'score': {\n // The level with the highest probability; `probabilities` is keyed by level index.\n const [best] = Object.entries(answer.probabilities).sort(([, a], [, b]) => b - a)[0];\n\n return { value: column.options?.[Number(best)] ?? String(answer.score), confidence: answer.confidence };\n }\n case 'choice':\n return { value: answer.choice, confidence: answer.confidence };\n default:\n return { value: '' };\n }\n}\n\n// Per-cell state, keyed \":\" so it survives sorting.\nconst pending = new Set();\nconst failed = new Map();\n\nfunction cellKey(instance, visualRow, column) {\n const row = instance.getSourceDataAtRow(instance.toPhysicalRow(visualRow));\n\n return `${column.key}:${row.id}`;\n}\n\nconst valueRenderer = (column) => (instance, td, row, col, prop, value, cellProperties) => {\n const text = typeof value === 'number' ? value.toFixed(2) : (value ?? '');\n\n textRenderer(instance, td, row, col, prop, text, cellProperties);\n\n const key = cellKey(instance, row, column);\n\n td.classList.toggle('ai-pending', pending.has(key));\n td.classList.toggle('ai-error', failed.has(key));\n\n if (failed.has(key)) {\n td.textContent = 'err';\n td.title = failed.get(key) ?? '';\n } else {\n td.removeAttribute('title');\n }\n};\n\nconst confidenceRenderer = (column) => (instance, td, row, col, prop, value, cellProperties) => {\n const text = typeof value === 'number' ? `${Math.round(value * 100)}%` : '';\n\n textRenderer(instance, td, row, col, prop, text, cellProperties);\n\n const key = cellKey(instance, row, column);\n\n td.classList.toggle('ai-pending', pending.has(key));\n td.classList.toggle('ai-low', typeof value === 'number' && value < 0.6);\n td.classList.toggle('ai-high', typeof value === 'number' && value > 0.85);\n};\n\nconst rootContainer = document.querySelector('#example1');\n\n// Inject the controls row and the grid mount point inside #example1.\nrootContainer.innerHTML = `\n
\n
\n \n \n
\n
\n
\n`;\n\nconst button = rootContainer.querySelector('.ai-classify');\nconst status = rootContainer.querySelector('.ai-status');\n\nconst columns = [\n { data: 'id', readOnly: true, width: 50, className: 'htRight' },\n { data: 'product', readOnly: true, width: 140 },\n { data: 'review', readOnly: true, width: 380 },\n];\nconst headers = ['ID', 'Product', 'Review'];\n\nconst hot = new Handsontable(rootContainer.querySelector('.ai-columns-grid'), {\n data: reviews,\n columns,\n colHeaders: headers,\n columnSorting: true,\n height: 'auto',\n width: '100%',\n autoWrapRow: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\n// Runs `worker` over `items` with at most `limit` in flight.\nasync function runPool(items, limit, worker) {\n let next = 0;\n\n const lanes = Array.from({ length: Math.min(limit, items.length) }, async () => {\n while (next < items.length) {\n const item = items[next];\n\n next += 1;\n await worker(item);\n }\n });\n\n await Promise.all(lanes);\n}\n\nbutton.addEventListener('click', async () => {\n button.disabled = true;\n\n // 1. Add a value column per definition, a confidence column where Jev\n // returns one, and mark every new cell as pending.\n AI_COLUMNS.forEach((column) => {\n columns.push({\n data: column.key,\n readOnly: true,\n renderer: valueRenderer(column),\n width: 130,\n className: column.type === 'noul' ? 'htRight' : '',\n });\n headers.push(column.name);\n\n if (column.type !== 'noul') {\n columns.push({\n data: `${column.key}Confidence`,\n readOnly: true,\n renderer: confidenceRenderer(column),\n width: 125,\n className: 'htRight',\n });\n headers.push(`${column.name} conf.`);\n }\n\n reviews.forEach((row) => pending.add(`${column.key}:${row.id}`));\n });\n hot.updateSettings({ columns: [...columns], colHeaders: [...headers] });\n\n // 2. One request per cell, a few at a time. Results are written by physical\n // row, so a sort applied mid-fill cannot misplace them.\n const jobs = AI_COLUMNS.flatMap((column) => reviews.map((row) => ({ column, row })));\n let done = 0;\n\n await runPool(jobs, 4, async ({ column, row }) => {\n const key = `${column.key}:${row.id}`;\n const physicalRow = reviews.indexOf(row);\n\n try {\n const cells = toCells(column, await classify(row, column));\n\n hot.setSourceDataAtCell(physicalRow, column.key, cells.value);\n\n if (cells.confidence !== undefined) {\n hot.setSourceDataAtCell(physicalRow, `${column.key}Confidence`, cells.confidence);\n }\n } catch (error) {\n failed.set(key, error instanceof Error ? error.message : 'Request failed');\n } finally {\n pending.delete(key);\n done += 1;\n status.textContent = `${done} of ${jobs.length} answers`;\n hot.render();\n }\n });\n\n status.textContent = `Classified ${reviews.length} reviews.`;\n});","/src/main.js":"import \"../styles.css\";\nimport \"../index.js\";","/styles.css":"/* Grid mount point below the controls row. */\n.ai-columns-grid {\n margin-top: 8px;\n}\n\n.ai-status {\n margin-left: 12px;\n font-size: 0.9em;\n opacity: 0.8;\n}\n\n/* A cell waiting for the model's answer. The theme paints read-only cells with its own\n background, so these rules use !important to win. */\n@keyframes aiShimmer {\n from {\n background-position: 200% 0;\n }\n\n to {\n background-position: -200% 0;\n }\n}\n\n.handsontable tbody td.ai-pending {\n background-image: linear-gradient(\n 90deg,\n rgba(59, 130, 246, 0.08) 25%,\n rgba(59, 130, 246, 0.3) 50%,\n rgba(59, 130, 246, 0.08) 75%\n ) !important;\n background-size: 200% 100% !important;\n animation: aiShimmer 1.1s linear infinite;\n}\n\n/* A row the model could not answer. The tooltip carries the reason. */\n.handsontable tbody td.ai-error {\n color: #c62828;\n font-weight: 600;\n}\n\n/* Confidence bands: below 60% and above 85%. Everything in between stays neutral. */\n.handsontable tbody td.ai-low {\n background-color: rgba(239, 68, 68, 0.22) !important;\n}\n\n.handsontable tbody td.ai-high {\n background-color: rgba(34, 197, 94, 0.22) !important;\n}"},"docsPath":"recipes/real-time/ai-columns-jev/javascript/example1.js","breadcrumb":["Recipes","Real Time","Add AI-classified columns with Jev"],"guide":"recipes/real-time/ai-columns-jev/ai-columns-jev.md","guideTitle":"Add AI-classified columns with Jev","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/real-time/ai-columns-jev","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.ts.json new file mode 100644 index 000000000..6e58ea50b --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/recipes__real-time__ai-columns-jev__javascript__example1.ts.json @@ -0,0 +1 @@ +{"framework":"typescript","displayName":"Recipes ▸ Real Time ▸ Add AI-classified columns with Jev · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { textRenderer } from 'handsontable/renderers';\nimport type { BaseRenderer } from 'handsontable/renderers';\nimport type { ColumnSettings } from 'handsontable/settings';\n\nregisterAllModules();\n\ntype Row = {\n id: number;\n product: string;\n review: string;\n [aiColumn: string]: string | number | null;\n};\n\ntype AiColumn = {\n key: string;\n name: string;\n type: 'noul' | 'score' | 'choice';\n prompt: string;\n options?: string[];\n};\n\n// Jev's answer shapes, as returned by the API (only the fields this example reads).\ntype JevAnswer =\n | { type: 'noul'; noul: number }\n | { type: 'score'; score: number; confidence: number; probabilities: Record }\n | { type: 'choice'; choice: string; confidence: number };\n\n// The columns to add. `type` is the Jev question type: noul (yes or no),\n// score (one of ordered levels), choice (one option from a list).\nconst AI_COLUMNS: AiColumn[] = [\n {\n key: 'sentiment',\n name: 'Sentiment',\n type: 'score',\n prompt: 'How positive is this review overall?',\n options: ['Very negative', 'Negative', 'Mixed', 'Positive', 'Very positive'],\n },\n {\n key: 'category',\n name: 'Category',\n type: 'choice',\n prompt: 'Which category best fits the main issue in this review?',\n options: ['quality', 'shipping', 'price', 'support', 'usability'],\n },\n {\n key: 'needsReply',\n name: 'Needs reply',\n type: 'noul',\n prompt: 'Does this review warrant a reply from customer support?',\n },\n];\n\n/* start:skip-in-preview */\nconst reviews: Row[] = [\n { id: 1, product: 'Wireless earbuds', review: \"Crisp sound, the case charges fast, and they pair instantly with my laptop. Easily the best pair I've owned under $100.\" },\n { id: 2, product: 'Wireless earbuds', review: \"Left bud died after nine days. Support sent a replacement without fuss, but I shouldn't have needed one this soon.\" },\n { id: 3, product: 'Standing desk', review: \"Motor is whisper quiet and the frame doesn't wobble at full height. Assembly took 40 minutes with clear instructions.\" },\n { id: 4, product: 'Standing desk', review: 'Great desk but shipping took 3 weeks and support never replied to my two emails asking where it was.' },\n { id: 5, product: 'Coffee grinder', review: \"Grind is consistent from espresso to French press. It's loud, but every burr grinder is.\" },\n { id: 6, product: 'Coffee grinder', review: 'Stopped working after two months. The hopper lid also cracked. Expected more for $180.' },\n { id: 7, product: 'Running shoes', review: 'Light, breathable, and the fit is true to size. Ran a half marathon in them the second week with no blisters.' },\n { id: 8, product: 'Running shoes', review: 'Comfortable shoe, but the sole started separating at the toe after 60 miles. Returned it, refund took 3 weeks.' },\n { id: 14, product: 'Mechanical keyboard', review: \"Two keys arrived dead. Support fixed it fast with a replacement, so I'm happy now, but the QA worries me.\" },\n { id: 24, product: 'Electric kettle', review: 'The kettle is good. The box arrived crushed and the lid was dented. Kept it anyway because it works.' },\n];\n\n// Jev's answers for the rows above, recorded from the API on 2026-10-08.\n// Keyed \":\". Score probabilities are per level index.\nconst RECORDED: Record = {\n 'sentiment:1': { type: 'score', score: 4.0, confidence: 1.0, probabilities: { 0: 0, 1: 0, 2: 0, 3: 0, 4: 1 } },\n 'sentiment:2': { type: 'score', score: 1.66, confidence: 0.72, probabilities: { 0: 0, 1: 0.33, 2: 0.67, 3: 0, 4: 0 } },\n 'sentiment:3': { type: 'score', score: 3.95, confidence: 0.96, probabilities: { 0: 0, 1: 0, 2: 0, 3: 0.04, 4: 0.96 } },\n 'sentiment:4': { type: 'score', score: 1.95, confidence: 0.96, probabilities: { 0: 0, 1: 0.05, 2: 0.95, 3: 0, 4: 0 } },\n 'sentiment:5': { type: 'score', score: 3.05, confidence: 0.95, probabilities: { 0: 0, 1: 0, 2: 0.01, 3: 0.93, 4: 0.06 } },\n 'sentiment:6': { type: 'score', score: 0.2, confidence: 0.83, probabilities: { 0: 0.8, 1: 0.2, 2: 0, 3: 0, 4: 0 } },\n 'sentiment:7': { type: 'score', score: 3.98, confidence: 0.98, probabilities: { 0: 0, 1: 0, 2: 0, 3: 0.02, 4: 0.98 } },\n 'sentiment:8': { type: 'score', score: 1.21, confidence: 0.81, probabilities: { 0: 0.01, 1: 0.77, 2: 0.22, 3: 0, 4: 0 } },\n 'sentiment:14': { type: 'score', score: 2.04, confidence: 0.97, probabilities: { 0: 0, 1: 0, 2: 0.96, 3: 0.04, 4: 0 } },\n 'sentiment:24': { type: 'score', score: 2.06, confidence: 0.94, probabilities: { 0: 0, 1: 0.01, 2: 0.92, 3: 0.07, 4: 0 } },\n 'category:1': { type: 'choice', choice: 'quality', confidence: 0.52 },\n 'category:2': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:3': { type: 'choice', choice: 'quality', confidence: 0.79 },\n 'category:4': { type: 'choice', choice: 'shipping', confidence: 0.86 },\n 'category:5': { type: 'choice', choice: 'usability', confidence: 0.62 },\n 'category:6': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:7': { type: 'choice', choice: 'usability', confidence: 0.46 },\n 'category:8': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:14': { type: 'choice', choice: 'quality', confidence: 1.0 },\n 'category:24': { type: 'choice', choice: 'shipping', confidence: 0.99 },\n 'needsReply:1': { type: 'noul', noul: 0.12 },\n 'needsReply:2': { type: 'noul', noul: 0.7 },\n 'needsReply:3': { type: 'noul', noul: 0.12 },\n 'needsReply:4': { type: 'noul', noul: 0.9 },\n 'needsReply:5': { type: 'noul', noul: 0.12 },\n 'needsReply:6': { type: 'noul', noul: 0.88 },\n 'needsReply:7': { type: 'noul', noul: 0.12 },\n 'needsReply:8': { type: 'noul', noul: 0.79 },\n 'needsReply:14': { type: 'noul', noul: 0.65 },\n 'needsReply:24': { type: 'noul', noul: 0.69 },\n};\n/* end:skip-in-preview */\n\n// Stand-in for the model: a recorded answer after a short delay, so the page\n// needs no backend. For the real model, send `{ type, prompt, options, row }`\n// to a proxy that holds your key (see Step 5 on the page).\nfunction classify(row: Row, column: AiColumn): Promise {\n const answer = RECORDED[`${column.key}:${row.id}`];\n\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n if (answer) {\n resolve(answer);\n } else {\n reject(new Error('No answer'));\n }\n }, 150 + Math.random() * 250);\n });\n}\n\n// Which of Jev's fields go into the cells. A Noul is a single probability and\n// has no confidence field, so a Noul column gets no confidence column.\nfunction toCells(column: AiColumn, answer: JevAnswer): { value: string | number; confidence?: number } {\n switch (answer.type) {\n case 'noul':\n return { value: answer.noul };\n case 'score': {\n // The level with the highest probability; `probabilities` is keyed by level index.\n const [best] = Object.entries(answer.probabilities).sort(([, a], [, b]) => b - a)[0];\n\n return { value: column.options?.[Number(best)] ?? String(answer.score), confidence: answer.confidence };\n }\n case 'choice':\n return { value: answer.choice, confidence: answer.confidence };\n default:\n return { value: '' };\n }\n}\n\n// Per-cell state, keyed \":\" so it survives sorting.\nconst pending = new Set();\nconst failed = new Map();\n\nfunction cellKey(instance: Handsontable, visualRow: number, column: AiColumn): string {\n const row = instance.getSourceDataAtRow(instance.toPhysicalRow(visualRow)) as Row;\n\n return `${column.key}:${row.id}`;\n}\n\nconst valueRenderer = (column: AiColumn): BaseRenderer => (instance, td, row, col, prop, value, cellProperties) => {\n const text = typeof value === 'number' ? value.toFixed(2) : value ?? '';\n\n textRenderer(instance, td, row, col, prop, text, cellProperties);\n\n const key = cellKey(instance, row, column);\n\n td.classList.toggle('ai-pending', pending.has(key));\n td.classList.toggle('ai-error', failed.has(key));\n\n if (failed.has(key)) {\n td.textContent = 'err';\n td.title = failed.get(key) ?? '';\n } else {\n td.removeAttribute('title');\n }\n};\n\nconst confidenceRenderer = (column: AiColumn): BaseRenderer => (instance, td, row, col, prop, value, cellProperties) => {\n const text = typeof value === 'number' ? `${Math.round(value * 100)}%` : '';\n\n textRenderer(instance, td, row, col, prop, text, cellProperties);\n\n const key = cellKey(instance, row, column);\n\n td.classList.toggle('ai-pending', pending.has(key));\n td.classList.toggle('ai-low', typeof value === 'number' && value < 0.6);\n td.classList.toggle('ai-high', typeof value === 'number' && value > 0.85);\n};\n\nconst rootContainer = document.querySelector('#example1')!;\n\n// Inject the controls row and the grid mount point inside #example1.\nrootContainer.innerHTML = `\n
\n
\n \n \n
\n
\n
\n`;\n\nconst button = rootContainer.querySelector('.ai-classify')!;\nconst status = rootContainer.querySelector('.ai-status')!;\n\nconst columns: ColumnSettings[] = [\n { data: 'id', readOnly: true, width: 50, className: 'htRight' },\n { data: 'product', readOnly: true, width: 140 },\n { data: 'review', readOnly: true, width: 380 },\n];\nconst headers = ['ID', 'Product', 'Review'];\n\nconst hot = new Handsontable(rootContainer.querySelector('.ai-columns-grid')!, {\n data: reviews,\n columns,\n colHeaders: headers,\n columnSorting: true,\n height: 'auto',\n width: '100%',\n autoWrapRow: true,\n licenseKey: 'non-commercial-and-evaluation',\n});\n\n// Runs `worker` over `items` with at most `limit` in flight.\nasync function runPool(items: T[], limit: number, worker: (item: T) => Promise): Promise {\n let next = 0;\n\n const lanes = Array.from({ length: Math.min(limit, items.length) }, async () => {\n while (next < items.length) {\n const item = items[next];\n\n next += 1;\n await worker(item);\n }\n });\n\n await Promise.all(lanes);\n}\n\nbutton.addEventListener('click', async () => {\n button.disabled = true;\n\n // 1. Add a value column per definition, a confidence column where Jev\n // returns one, and mark every new cell as pending.\n AI_COLUMNS.forEach((column) => {\n columns.push({\n data: column.key,\n readOnly: true,\n renderer: valueRenderer(column),\n width: 130,\n className: column.type === 'noul' ? 'htRight' : '',\n });\n headers.push(column.name);\n\n if (column.type !== 'noul') {\n columns.push({\n data: `${column.key}Confidence`,\n readOnly: true,\n renderer: confidenceRenderer(column),\n width: 125,\n className: 'htRight',\n });\n headers.push(`${column.name} conf.`);\n }\n\n reviews.forEach((row) => pending.add(`${column.key}:${row.id}`));\n });\n hot.updateSettings({ columns: [...columns], colHeaders: [...headers] });\n\n // 2. One request per cell, a few at a time. Results are written by physical\n // row, so a sort applied mid-fill cannot misplace them.\n const jobs = AI_COLUMNS.flatMap((column) => reviews.map((row) => ({ column, row })));\n let done = 0;\n\n await runPool(jobs, 4, async ({ column, row }) => {\n const key = `${column.key}:${row.id}`;\n const physicalRow = reviews.indexOf(row);\n\n try {\n const cells = toCells(column, await classify(row, column));\n\n hot.setSourceDataAtCell(physicalRow, column.key, cells.value);\n\n if (cells.confidence !== undefined) {\n hot.setSourceDataAtCell(physicalRow, `${column.key}Confidence`, cells.confidence);\n }\n } catch (error) {\n failed.set(key, error instanceof Error ? error.message : 'Request failed');\n } finally {\n pending.delete(key);\n done += 1;\n status.textContent = `${done} of ${jobs.length} answers`;\n hot.render();\n }\n });\n\n status.textContent = `Classified ${reviews.length} reviews.`;\n});","/src/main.ts":"import \"../styles.css\";\nimport \"../index.ts\";","/styles.css":"/* Grid mount point below the controls row. */\n.ai-columns-grid {\n margin-top: 8px;\n}\n\n.ai-status {\n margin-left: 12px;\n font-size: 0.9em;\n opacity: 0.8;\n}\n\n/* A cell waiting for the model's answer. The theme paints read-only cells with its own\n background, so these rules use !important to win. */\n@keyframes aiShimmer {\n from {\n background-position: 200% 0;\n }\n\n to {\n background-position: -200% 0;\n }\n}\n\n.handsontable tbody td.ai-pending {\n background-image: linear-gradient(\n 90deg,\n rgba(59, 130, 246, 0.08) 25%,\n rgba(59, 130, 246, 0.3) 50%,\n rgba(59, 130, 246, 0.08) 75%\n ) !important;\n background-size: 200% 100% !important;\n animation: aiShimmer 1.1s linear infinite;\n}\n\n/* A row the model could not answer. The tooltip carries the reason. */\n.handsontable tbody td.ai-error {\n color: #c62828;\n font-weight: 600;\n}\n\n/* Confidence bands: below 60% and above 85%. Everything in between stays neutral. */\n.handsontable tbody td.ai-low {\n background-color: rgba(239, 68, 68, 0.22) !important;\n}\n\n.handsontable tbody td.ai-high {\n background-color: rgba(34, 197, 94, 0.22) !important;\n}"},"docsPath":"recipes/real-time/ai-columns-jev/javascript/example1.ts","breadcrumb":["Recipes","Real Time","Add AI-classified columns with Jev"],"guide":"recipes/real-time/ai-columns-jev/ai-columns-jev.md","guideTitle":"Add AI-classified columns with Jev","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/real-time/ai-columns-jev","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__angular__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__angular__example1.ts.json new file mode 100644 index 000000000..f879f01f8 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__angular__example1.ts.json @@ -0,0 +1 @@ +{"framework":"angular","displayName":"Recipes ▸ Themes ▸ Handsontable with Tabler Icons · Standard example · Angular","tier":2,"engine":"container","sandpackTemplate":null,"sandpackEnvironment":null,"container":"angular","htWrappers":["@handsontable/angular-wrapper"],"entry":"/src/main.ts","htmlEntry":"/src/index.html","devCommand":"pnpm exec ng serve --host 0.0.0.0 --port 3000","buildCommand":"ng build","outputDir":"dist","outputGlob":"dist/*/browser","staticExport":false,"spaMode":false,"port":3000,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":7,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-angular-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"ng serve\",\n \"build\": \"ng build\"\n },\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/angular-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@angular/animations\": \"22.0.6\",\n \"@angular/common\": \"22.0.6\",\n \"@angular/compiler\": \"22.0.6\",\n \"@angular/core\": \"22.0.6\",\n \"@angular/forms\": \"22.0.6\",\n \"@angular/platform-browser\": \"22.0.6\",\n \"@angular/platform-browser-dynamic\": \"22.0.6\",\n \"@angular/router\": \"22.0.6\",\n \"rxjs\": \"~7.8.2\",\n \"tslib\": \"^2.8.1\",\n \"zone.js\": \"~0.16.2\",\n \"@angular-devkit/build-angular\": \"22.0.6\",\n \"@angular/cli\": \"22.0.6\",\n \"@angular/compiler-cli\": \"22.0.6\",\n \"typescript\": \"~6.0.3\"\n },\n \"devDependencies\": {}\n}","/angular.json":"{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \"projects\": {\n \"app\": {\n \"projectType\": \"application\",\n \"root\": \"\",\n \"sourceRoot\": \"src\",\n \"prefix\": \"app\",\n \"architect\": {\n \"build\": {\n \"builder\": \"@angular-devkit/build-angular:application\",\n \"options\": {\n \"outputPath\": \"dist/app\",\n \"index\": \"src/index.html\",\n \"browser\": \"src/main.ts\",\n \"polyfills\": [\n \"zone.js\"\n ],\n \"tsConfig\": \"tsconfig.json\",\n \"assets\": [],\n \"styles\": [],\n \"scripts\": []\n },\n \"configurations\": {\n \"development\": {\n \"optimization\": false,\n \"sourceMap\": true\n }\n },\n \"defaultConfiguration\": \"development\"\n },\n \"serve\": {\n \"builder\": \"@angular-devkit/build-angular:dev-server\",\n \"configurations\": {\n \"development\": {\n \"buildTarget\": \"app:build:development\"\n }\n },\n \"defaultConfiguration\": \"development\"\n }\n }\n }\n }\n}","/tsconfig.json":"{\n \"compilerOptions\": {\n \"outDir\": \"./dist/out-tsc\",\n \"strict\": true,\n \"noImplicitOverride\": true,\n \"noPropertyAccessFromIndexSignature\": true,\n \"noImplicitReturns\": true,\n \"noFallthroughCasesInSwitch\": true,\n \"skipLibCheck\": true,\n \"esModuleInterop\": true,\n \"sourceMap\": true,\n \"declaration\": false,\n \"experimentalDecorators\": true,\n \"moduleResolution\": \"bundler\",\n \"importHelpers\": true,\n \"target\": \"ES2022\",\n \"module\": \"ES2022\",\n \"useDefineForClassFields\": false,\n \"lib\": [\n \"ES2022\",\n \"dom\"\n ]\n },\n \"angularCompilerOptions\": {\n \"enableI18nLegacyMessageIdFormat\": false,\n \"strictInjectionParameters\": true,\n \"strictInputAccessModifiers\": true,\n \"strictTemplates\": true\n }\n}","/src/index.html":"\n\n\n \n Handsontable Angular Example\n \n \n\n\n
\n \n
\n\n","/src/main.ts":"import { bootstrapApplication } from '@angular/platform-browser';\nimport { registerAllModules } from 'handsontable/registry';\nimport { AppComponent } from './app/app.component';\nimport { appConfig } from './app/app.config';\n\nregisterAllModules();\n\nbootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));","/src/app/app.component.ts":"import { Component } from '@angular/core';\nimport { GridSettings, HotTableModule } from '@handsontable/angular-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { mainTheme, registerTheme } from 'handsontable/themes';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n/* start:skip-in-preview */\n// In your project, install `@tabler/icons-webfont` and import its stylesheet instead.\nconst tablerCss = document.createElement('link');\n\ntablerCss.rel = 'stylesheet';\ntablerCss.href = 'https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.31.0/dist/tabler-icons.min.css';\ndocument.head.appendChild(tablerCss);\n/* end:skip-in-preview */\n\n// Every icon slot the grid renders, mapped to a Tabler Icons class list.\nconst tablerTheme = registerTheme(mainTheme);\n\ntablerTheme.params({\n icons: {\n arrowRight: 'ti ti-chevron-right',\n arrowRightWithBar: 'ti ti-chevron-right-pipe',\n arrowLeft: 'ti ti-chevron-left',\n arrowLeftWithBar: 'ti ti-chevron-left-pipe',\n arrowDown: 'ti ti-chevron-down',\n menu: 'ti ti-menu-2',\n selectArrow: 'ti ti-caret-down-filled',\n arrowNarrowUp: 'ti ti-arrow-narrow-up',\n arrowNarrowDown: 'ti ti-arrow-narrow-down',\n check: 'ti ti-check',\n checkbox: 'ti ti-check',\n caretHiddenLeft: 'ti ti-caret-left-filled',\n caretHiddenRight: 'ti ti-caret-right-filled',\n caretHiddenUp: 'ti ti-caret-up-filled',\n caretHiddenDown: 'ti ti-caret-down-filled',\n collapseOff: 'ti ti-minus',\n collapseOn: 'ti ti-plus',\n radio: 'ti ti-point-filled',\n chipClose: 'ti ti-x',\n search: 'ti ti-search',\n plus: 'ti ti-plus',\n menuList: 'ti ti-list',\n },\n});\n\n@Component({\n selector: 'example1-tabler-icons',\n standalone: true,\n imports: [HotTableModule],\n template: `
\n \n
`,\n})\nexport class AppComponent {\n readonly data = [\n { product: 'Standing desk', category: 'Furniture', inStock: true, units: 24 },\n { product: 'Monitor arm', category: 'Accessories', inStock: true, units: 61 },\n { product: 'Ergonomic chair', category: 'Furniture', inStock: false, units: 0 },\n { product: 'USB-C dock', category: 'Electronics', inStock: true, units: 138 },\n { product: 'Desk lamp', category: 'Lighting', inStock: true, units: 45 },\n { product: 'Cable tray', category: 'Accessories', inStock: false, units: 0 },\n ];\n\n readonly gridSettings: GridSettings = {\n // The mapping applies only when the theme is passed as an object.\n theme: tablerTheme,\n columns: [\n { data: 'product' },\n { data: 'category', type: 'dropdown', source: ['Furniture', 'Accessories', 'Electronics', 'Lighting'] },\n { data: 'inStock', type: 'checkbox' },\n { data: 'units', type: 'numeric' },\n ],\n colHeaders: ['Product', 'Category', 'In stock', 'Units'],\n rowHeaders: true,\n columnSorting: true,\n dropdownMenu: true,\n filters: true,\n // The hidden Units column puts a caret on the In stock header.\n hiddenColumns: { columns: [3], indicators: true },\n height: 260,\n licenseKey: 'non-commercial-and-evaluation',\n };\n}","/src/app/app.config.ts":"import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';\nimport { registerAllModules } from 'handsontable/registry';\nimport { HOT_GLOBAL_CONFIG, HotGlobalConfig, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';\n\n// Register Handsontable's modules.\nregisterAllModules();\n\nexport const appConfig: ApplicationConfig = {\n providers: [\n provideZoneChangeDetection({ eventCoalescing: true }),\n {\n provide: HOT_GLOBAL_CONFIG,\n useValue: { license: NON_COMMERCIAL_LICENSE } as HotGlobalConfig,\n },\n ],\n};"},"docsPath":"recipes/themes/tabler-icons/angular/example1.ts","breadcrumb":["Recipes","Themes","Handsontable with Tabler Icons"],"guide":"recipes/themes/tabler-icons/tabler-icons.md","guideTitle":"Handsontable with Tabler Icons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/themes/tabler-icons","lang":"Angular"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.js.json b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.js.json new file mode 100644 index 000000000..42ff24c6e --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.js.json @@ -0,0 +1 @@ +{"framework":"javascript","displayName":"Recipes ▸ Themes ▸ Handsontable with Tabler Icons · Standard example · JavaScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.js","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.js":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { mainTheme, registerTheme } from 'handsontable/themes';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n/* start:skip-in-preview */\n// In your project, install `@tabler/icons-webfont` and import its stylesheet instead.\nconst tablerCss = document.createElement('link');\n\ntablerCss.rel = 'stylesheet';\ntablerCss.href = 'https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.31.0/dist/tabler-icons.min.css';\ndocument.head.appendChild(tablerCss);\n/* end:skip-in-preview */\n\n// Every icon slot the grid renders, mapped to a Tabler Icons class list.\nconst tablerTheme = registerTheme(mainTheme);\n\ntablerTheme.params({\n icons: {\n arrowRight: 'ti ti-chevron-right',\n arrowRightWithBar: 'ti ti-chevron-right-pipe',\n arrowLeft: 'ti ti-chevron-left',\n arrowLeftWithBar: 'ti ti-chevron-left-pipe',\n arrowDown: 'ti ti-chevron-down',\n menu: 'ti ti-menu-2',\n selectArrow: 'ti ti-caret-down-filled',\n arrowNarrowUp: 'ti ti-arrow-narrow-up',\n arrowNarrowDown: 'ti ti-arrow-narrow-down',\n check: 'ti ti-check',\n checkbox: 'ti ti-check',\n caretHiddenLeft: 'ti ti-caret-left-filled',\n caretHiddenRight: 'ti ti-caret-right-filled',\n caretHiddenUp: 'ti ti-caret-up-filled',\n caretHiddenDown: 'ti ti-caret-down-filled',\n collapseOff: 'ti ti-minus',\n collapseOn: 'ti ti-plus',\n radio: 'ti ti-point-filled',\n chipClose: 'ti ti-x',\n search: 'ti ti-search',\n plus: 'ti ti-plus',\n menuList: 'ti ti-list',\n },\n});\n\nconst container = document.querySelector('#example1');\n\nnew Handsontable(container, {\n // The mapping applies only when the theme is passed as an object.\n theme: tablerTheme,\n data: [\n { product: 'Standing desk', category: 'Furniture', inStock: true, units: 24 },\n { product: 'Monitor arm', category: 'Accessories', inStock: true, units: 61 },\n { product: 'Ergonomic chair', category: 'Furniture', inStock: false, units: 0 },\n { product: 'USB-C dock', category: 'Electronics', inStock: true, units: 138 },\n { product: 'Desk lamp', category: 'Lighting', inStock: true, units: 45 },\n { product: 'Cable tray', category: 'Accessories', inStock: false, units: 0 },\n ],\n columns: [\n { data: 'product' },\n { data: 'category', type: 'dropdown', source: ['Furniture', 'Accessories', 'Electronics', 'Lighting'] },\n { data: 'inStock', type: 'checkbox' },\n { data: 'units', type: 'numeric' },\n ],\n colHeaders: ['Product', 'Category', 'In stock', 'Units'],\n rowHeaders: true,\n columnSorting: true,\n dropdownMenu: true,\n filters: true,\n // The hidden Units column puts a caret on the In stock header.\n hiddenColumns: { columns: [3], indicators: true },\n height: 260,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.js":"import \"../index.js\";"},"docsPath":"recipes/themes/tabler-icons/javascript/example1.js","breadcrumb":["Recipes","Themes","Handsontable with Tabler Icons"],"guide":"recipes/themes/tabler-icons/tabler-icons.md","guideTitle":"Handsontable with Tabler Icons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/themes/tabler-icons","lang":"JavaScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.ts.json b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.ts.json new file mode 100644 index 000000000..89d261098 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__javascript__example1.ts.json @@ -0,0 +1 @@ +{"framework":"typescript","displayName":"Recipes ▸ Themes ▸ Handsontable with Tabler Icons · Standard example · TypeScript","tier":1,"engine":"sandpack","sandpackTemplate":"vanilla-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":[],"entry":"/src/main.ts","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":4,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"vite\": \"^5.4.0\",\n \"typescript\": \"^5.4.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/index.html":"\n\n\n \n \n Handsontable Example\n \n\n\n
\n \n\n","/index.ts":"import Handsontable from 'handsontable/base';\nimport { registerAllModules } from 'handsontable/registry';\nimport { mainTheme, registerTheme } from 'handsontable/themes';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n/* start:skip-in-preview */\n// In your project, install `@tabler/icons-webfont` and import its stylesheet instead.\nconst tablerCss = document.createElement('link');\n\ntablerCss.rel = 'stylesheet';\ntablerCss.href = 'https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.31.0/dist/tabler-icons.min.css';\ndocument.head.appendChild(tablerCss);\n/* end:skip-in-preview */\n\n// Every icon slot the grid renders, mapped to a Tabler Icons class list.\nconst tablerTheme = registerTheme(mainTheme);\n\ntablerTheme.params({\n icons: {\n arrowRight: 'ti ti-chevron-right',\n arrowRightWithBar: 'ti ti-chevron-right-pipe',\n arrowLeft: 'ti ti-chevron-left',\n arrowLeftWithBar: 'ti ti-chevron-left-pipe',\n arrowDown: 'ti ti-chevron-down',\n menu: 'ti ti-menu-2',\n selectArrow: 'ti ti-caret-down-filled',\n arrowNarrowUp: 'ti ti-arrow-narrow-up',\n arrowNarrowDown: 'ti ti-arrow-narrow-down',\n check: 'ti ti-check',\n checkbox: 'ti ti-check',\n caretHiddenLeft: 'ti ti-caret-left-filled',\n caretHiddenRight: 'ti ti-caret-right-filled',\n caretHiddenUp: 'ti ti-caret-up-filled',\n caretHiddenDown: 'ti ti-caret-down-filled',\n collapseOff: 'ti ti-minus',\n collapseOn: 'ti ti-plus',\n radio: 'ti ti-point-filled',\n chipClose: 'ti ti-x',\n search: 'ti ti-search',\n plus: 'ti ti-plus',\n menuList: 'ti ti-list',\n },\n});\n\nconst container = document.querySelector('#example1')!;\n\nnew Handsontable(container, {\n // The mapping applies only when the theme is passed as an object.\n theme: tablerTheme,\n data: [\n { product: 'Standing desk', category: 'Furniture', inStock: true, units: 24 },\n { product: 'Monitor arm', category: 'Accessories', inStock: true, units: 61 },\n { product: 'Ergonomic chair', category: 'Furniture', inStock: false, units: 0 },\n { product: 'USB-C dock', category: 'Electronics', inStock: true, units: 138 },\n { product: 'Desk lamp', category: 'Lighting', inStock: true, units: 45 },\n { product: 'Cable tray', category: 'Accessories', inStock: false, units: 0 },\n ],\n columns: [\n { data: 'product' },\n { data: 'category', type: 'dropdown', source: ['Furniture', 'Accessories', 'Electronics', 'Lighting'] },\n { data: 'inStock', type: 'checkbox' },\n { data: 'units', type: 'numeric' },\n ],\n colHeaders: ['Product', 'Category', 'In stock', 'Units'],\n rowHeaders: true,\n columnSorting: true,\n dropdownMenu: true,\n filters: true,\n // The hidden Units column puts a caret on the In stock header.\n hiddenColumns: { columns: [3], indicators: true },\n height: 260,\n licenseKey: 'non-commercial-and-evaluation',\n});","/src/main.ts":"import \"../index.ts\";"},"docsPath":"recipes/themes/tabler-icons/javascript/example1.ts","breadcrumb":["Recipes","Themes","Handsontable with Tabler Icons"],"guide":"recipes/themes/tabler-icons/tabler-icons.md","guideTitle":"Handsontable with Tabler Icons","exampleId":"example1","exampleTitle":"Standard example","docPermalink":"/recipes/themes/tabler-icons","lang":"TypeScript"} diff --git a/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__react__example1.tsx.json b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__react__example1.tsx.json new file mode 100644 index 000000000..ef2c4cc24 --- /dev/null +++ b/runner/apps/authoring/public/docs-examples/next/recipes__themes__tabler-icons__react__example1.tsx.json @@ -0,0 +1 @@ +{"framework":"react","displayName":"Recipes ▸ Themes ▸ Handsontable with Tabler Icons · Standard example · React (TS)","tier":1,"engine":"sandpack","sandpackTemplate":"react-ts","sandpackEnvironment":"parcel","container":null,"htWrappers":["@handsontable/react-wrapper"],"entry":"/src/main.tsx","htmlEntry":"/index.html","devCommand":null,"buildCommand":"vite build","outputDir":"dist","outputGlob":null,"staticExport":false,"spaMode":false,"port":null,"installCommand":"pnpm install","htCoreRange":"0.0.0-next-b0dc2e1-20261002","fileCount":5,"assets":[],"skipped":[],"files":{"/package.json":"{\n \"name\": \"handsontable-react-example\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"packageManager\": \"pnpm@10.34.5\",\n \"dependencies\": {\n \"handsontable\": \"0.0.0-next-b0dc2e1-20261002\",\n \"@handsontable/react-wrapper\": \"0.0.0-next-b0dc2e1-20261002\",\n \"react\": \"18.x\",\n \"react-dom\": \"18.x\",\n \"vite\": \"^5.4.0\",\n \"@vitejs/plugin-react\": \"^4.0.0\"\n },\n \"scripts\": {\n \"start\": \"vite\",\n \"build\": \"vite build\"\n }\n}","/vite.config.js":"import { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\n\nexport default defineConfig({ plugins: [react()] });","/index.html":"\n\n\n \n \n Handsontable React Example\n \n\n\n
\n \n\n","/src/main.tsx":"import React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport App from \"./App\";\nconst root = createRoot(document.getElementById(\"example1\"));\nroot.render(React.createElement(App));","/src/App.tsx":"import { HotTable } from '@handsontable/react-wrapper';\nimport { registerAllModules } from 'handsontable/registry';\nimport { mainTheme, registerTheme } from 'handsontable/themes';\n\n// Register all Handsontable's modules.\nregisterAllModules();\n\n/* start:skip-in-preview */\n// In your project, install `@tabler/icons-webfont` and import its stylesheet instead.\nconst tablerCss = document.createElement('link');\n\ntablerCss.rel = 'stylesheet';\ntablerCss.href = 'https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.31.0/dist/tabler-icons.min.css';\ndocument.head.appendChild(tablerCss);\n/* end:skip-in-preview */\n\n// Every icon slot the grid renders, mapped to a Tabler Icons class list.\nconst tablerTheme = registerTheme(mainTheme);\n\ntablerTheme.params({\n icons: {\n arrowRight: 'ti ti-chevron-right',\n arrowRightWithBar: 'ti ti-chevron-right-pipe',\n arrowLeft: 'ti ti-chevron-left',\n arrowLeftWithBar: 'ti ti-chevron-left-pipe',\n arrowDown: 'ti ti-chevron-down',\n menu: 'ti ti-menu-2',\n selectArrow: 'ti ti-caret-down-filled',\n arrowNarrowUp: 'ti ti-arrow-narrow-up',\n arrowNarrowDown: 'ti ti-arrow-narrow-down',\n check: 'ti ti-check',\n checkbox: 'ti ti-check',\n caretHiddenLeft: 'ti ti-caret-left-filled',\n caretHiddenRight: 'ti ti-caret-right-filled',\n caretHiddenUp: 'ti ti-caret-up-filled',\n caretHiddenDown: 'ti ti-caret-down-filled',\n collapseOff: 'ti ti-minus',\n collapseOn: 'ti ti-plus',\n radio: 'ti ti-point-filled',\n chipClose: 'ti ti-x',\n search: 'ti ti-search',\n plus: 'ti ti-plus',\n menuList: 'ti ti-list',\n },\n});\n\nconst data = [\n { product: 'Standing desk', category: 'Furniture', inStock: true, units: 24 },\n { product: 'Monitor arm', category: 'Accessories', inStock: true, units: 61 },\n { product: 'Ergonomic chair', category: 'Furniture', inStock: false, units: 0 },\n { product: 'USB-C dock', category: 'Electronics', inStock: true, units: 138 },\n { product: 'Desk lamp', category: 'Lighting', inStock: true, units: 45 },\n { product: 'Cable tray', category: 'Accessories', inStock: false, units: 0 },\n];\n\nconst ExampleComponent = () => {\n return (\n