diff --git a/docz/docs/03-demos/01-frontend/01-react.md b/docz/docs/03-demos/02-frontend/01-react.md
similarity index 95%
rename from docz/docs/03-demos/01-frontend/01-react.md
rename to docz/docs/03-demos/02-frontend/01-react.md
index 0018b87..70861a5 100644
--- a/docz/docs/03-demos/01-frontend/01-react.md
+++ b/docz/docs/03-demos/02-frontend/01-react.md
@@ -216,7 +216,7 @@ in the example JSX code:
```jsx title="Example JSX for displaying arrays of objects"
{/* The `thead` section includes the table header row */}
-
Name
Index
+
Name
Index
{/* The `tbody` section includes the data rows */}
{/* generate row (TR) for each president */}
@@ -302,7 +302,7 @@ export default function SheetJSReactAoO() {
writeFileXLSX(wb, "SheetJSReactAoO.xlsx");
}, [pres]);
- return (
Name
Index
+ return (
Name
Index
{ /* generate row for each president */
// highlight-start
pres.map(pres => (
@@ -317,14 +317,18 @@ export default function SheetJSReactAoO() {
}
```
-How to run the example (click to show)
+How to run the example (click to hide)
-:::note
+:::note Tested Deployments
-This demo was last tested on 2023 October 08 with ViteJS 4.4.1 and React 18.2.0
+This demo was tested in the following environments:
+
+| ReactJS | ViteJS | Date |
+|:---------|:--------|:-----------|
+| `18.2.0` | `5.0.5` | 2023-12-04 |
:::
@@ -348,7 +352,7 @@ npm run dev`}
4) Replace `src/App.jsx` with the `src/SheetJSReactAoO.js` example.
The page will refresh and show a table with an Export button. Click the button
-and the page will attempt to download `SheetJSReactAoA.xlsx`.
+and the page will attempt to download `SheetJSReactAoO.xlsx`.
5) Build the site:
@@ -370,7 +374,7 @@ and test the page.
-:::note
+:::note Tested Deployments
This demo was last run on 2023 October 24 using `create-react-app@5.0.1` and
`react-scripts@5.0.1`.
@@ -397,7 +401,7 @@ npm start`}
4) Replace `src/App.js` with the `src/SheetJSReactAoO.js` example.
The page will refresh and show a table with an Export button. Click the button
-and the page will attempt to download `SheetJSReactAoA.xlsx`.
+and the page will attempt to download `SheetJSReactAoO.xlsx`.
5) Build the site:
@@ -474,12 +478,12 @@ export default function SheetJSReactHTML() {
}
```
-How to run the example (click to show)
+How to run the example (click to hide)
-:::note
+:::note Tested Deployments
This demo was last tested on 2023 October 08 with ViteJS 4.4.1 and React 18.2.0
@@ -527,7 +531,7 @@ and test the page.
-:::note
+:::note Tested Deployments
This demo was last run on 2023 October 24 using `create-react-app@5.0.1` and
`react-scripts@5.0.1`.
diff --git a/docz/docs/03-demos/01-frontend/02-vue.md b/docz/docs/03-demos/02-frontend/02-vue.md
similarity index 97%
rename from docz/docs/03-demos/01-frontend/02-vue.md
rename to docz/docs/03-demos/02-frontend/02-vue.md
index 6f33d35..1e81c71 100644
--- a/docz/docs/03-demos/01-frontend/02-vue.md
+++ b/docz/docs/03-demos/02-frontend/02-vue.md
@@ -241,7 +241,7 @@ const rows = ref([]);
-
Name
Index
+
Name
Index
@@ -334,7 +334,7 @@ function exportFile() {
-
Name
Index
+
Name
Index
{{ row.Name }}
{{ row.Index }}
@@ -352,8 +352,11 @@ function exportFile() {
:::note Tested Deployments
-This demo was last run on 2023 November 09 using `vue@3.3.8`. When running
-`npm init`, the package `create-vue@3.8.0` was installed.
+This demo was tested in the following environments:
+
+| VueJS | ViteJS | Date |
+|:--------|:--------|:-----------|
+| `3.3.9` | `4.5.1` | 2023-12-04 |
:::
@@ -377,7 +380,7 @@ npm run dev`}
4) Replace `src/App.vue` with the `src/SheetJSVueAoO.vue` example.
The page will refresh and show a table with an Export button. Click the button
-and the page will attempt to download `SheetJSVueAoA.xlsx`. There may be a delay
+and the page will attempt to download `SheetJSVueAoO.xlsx`. There may be a delay
since Vite will try to optimize the SheetJS library on the fly.
5) Stop the dev server and build the site:
@@ -427,7 +430,7 @@ npm run dev`}
4) Replace `App.vue` with the `src/SheetJSVueAoO.vue` example.
The page will refresh and show a table with an Export button. Click the button
-and the page will attempt to download `SheetJSVueAoA.xlsx`.
+and the page will attempt to download `SheetJSVueAoO.xlsx`.
5) Stop the dev server and build the site:
diff --git a/docz/docs/03-demos/01-frontend/03-angular.md b/docz/docs/03-demos/02-frontend/03-angular.md
similarity index 97%
rename from docz/docs/03-demos/01-frontend/03-angular.md
rename to docz/docs/03-demos/02-frontend/03-angular.md
index ddf5d98..65b9c15 100644
--- a/docz/docs/03-demos/01-frontend/03-angular.md
+++ b/docz/docs/03-demos/02-frontend/03-angular.md
@@ -219,7 +219,7 @@ storied syntax, instead opting for a `@for` block reminiscent of JavaScript[^4].
```html title="Example Template for displaying arrays of objects (Angular 2-16)"
-
Name
Index
+
Name
Index
// highlight-start
@@ -236,7 +236,7 @@ storied syntax, instead opting for a `@for` block reminiscent of JavaScript[^4].
```html title="Example Template for displaying arrays of objects (Angular 17+)"
-
Name
Index
+
Name
Index
// highlight-start
@for(row of rows; track $index) {
@@ -311,7 +311,7 @@ interface President { Name: string; Index: number };
selector: 'app-root',
template: `
-
Name
Index
+
Name
Index
// highlight-start
@@ -367,7 +367,7 @@ interface President { Name: string; Index: number };
standalone: true,
template: `
-
Name
Index
+
Name
Index
// highlight-start
@for(row of rows; track $index) {
@@ -414,11 +414,16 @@ export class AppComponent {
-How to run the example (click to show)
+How to run the example (click to hide)
:::note Tested Deployments
-This demo was last run on 2023-11-18 using Angular 17.0.3 and CLI `17.0.1`
+This demo was tested in the following environments:
+
+| Angular | Date |
+|:---------|:-----------|
+| `17.0.5` | 2023-12-04 |
+| `16.2.7` | 2023-10-22 |
:::
@@ -431,7 +436,7 @@ npx @angular/cli analytics disable -g
1) Create a new project:
```bash
-npx @angular/cli@17.0.1 new --minimal --defaults --no-interactive sheetjs-angular
+npx @angular/cli@17.0.5 new --minimal --defaults --no-interactive sheetjs-angular
```
2) Install the SheetJS dependency and start the dev server:
@@ -590,7 +595,7 @@ export class AppComponent {
-How to run the example (click to show)
+How to run the example (click to hide)
:::note Tested Deployments
diff --git a/docz/docs/03-demos/01-frontend/04-svelte.md b/docz/docs/03-demos/02-frontend/04-svelte.md
similarity index 82%
rename from docz/docs/03-demos/01-frontend/04-svelte.md
rename to docz/docs/03-demos/02-frontend/04-svelte.md
index db29f85..c4e00fc 100644
--- a/docz/docs/03-demos/01-frontend/04-svelte.md
+++ b/docz/docs/03-demos/02-frontend/04-svelte.md
@@ -115,7 +115,7 @@ function exportFile() {
-
Name
Index
+
Name
Index
{#each pres as p}
{p.Name}
@@ -128,16 +128,23 @@ function exportFile() {
```
-How to run the example (click to show)
+How to run the example (click to hide)
-:::note
+:::note Tested Deployments
-This demo was last run on 2023 August 27 using `svelte@4.2.0`. When running
-`npm create`, the package `create-vite@4.4.1` was installed.
+This demo was tested in the following environments:
+
+| Svelte | ViteJS | Date |
+|:--------|:--------|:-----------|
+| `4.2.8` | `5.0.5` | 2023-12-04 |
:::
-1) Run `npm create vite@latest sheetjs-svelte -- --template svelte-ts`.
+1) Create a new project:
+
+```bash
+npm create vite@latest sheetjs-svelte -- --template svelte-ts
+```
2) Install the SheetJS dependency and start the dev server:
@@ -156,8 +163,22 @@ The page will refresh and show a table with an Export button. Click the button
and the page will attempt to download `SheetJSSvelteAoA.xlsx`. There may be a
delay since Vite will try to optimize the SheetJS library on the fly.
-5) Build the site with `npm run build`, then test with `npx http-server dist`.
-Access `http://localhost:8080` with a web browser to test the bundled site.
+5) Build the site:
+
+```bash
+npm run build
+```
+
+The generated site will be placed in the `dist` folder.
+
+6) Start a local web server:
+
+```bash
+npx http-server dist
+```
+
+Access the displayed URL (typically `http://localhost:8080`) with a web browser
+and test the page.
@@ -206,16 +227,23 @@ function exportFile() {
```
-How to run the example (click to show)
+How to run the example (click to hide)
-:::note
+:::note Tested Deployments
-This demo was last run on 2023 August 27 using `svelte@4.2.0`. When running
-`npm create`, the package `create-vite@4.4.1` was installed.
+This demo was tested in the following environments:
+
+| Svelte | ViteJS | Date |
+|:--------|:--------|:-----------|
+| `4.2.8` | `5.0.5` | 2023-12-04 |
:::
-1) Run `npm create vite@latest sheetjs-svelte -- --template svelte-ts`.
+1) Create a new project:
+
+```bash
+npm create vite@latest sheetjs-svelte -- --template svelte-ts
+```
2) Install the SheetJS dependency and start the dev server:
@@ -234,7 +262,21 @@ The page will refresh and show a table with an Export button. Click the button
and the page will attempt to download `SheetJSSvelteHTML.xlsx`. There may be a
delay since Vite will try to optimize the SheetJS library on the fly.
-5) Build the site with `npm run build`, then test with `npx http-server dist`.
-Access `http://localhost:8080` with a web browser to test the bundled site.
+5) Build the site:
+
+```bash
+npm run build
+```
+
+The generated site will be placed in the `dist` folder.
+
+6) Start a local web server:
+
+```bash
+npx http-server dist
+```
+
+Access the displayed URL (typically `http://localhost:8080`) with a web browser
+and test the page.
diff --git a/docz/docs/03-demos/01-frontend/07-angularjs.md b/docz/docs/03-demos/02-frontend/07-angularjs.md
similarity index 97%
rename from docz/docs/03-demos/01-frontend/07-angularjs.md
rename to docz/docs/03-demos/02-frontend/07-angularjs.md
index b682f6d..c70c5ea 100644
--- a/docz/docs/03-demos/01-frontend/07-angularjs.md
+++ b/docz/docs/03-demos/02-frontend/07-angularjs.md
@@ -32,7 +32,12 @@ models and data flow strategies.
:::note Tested Deployments
-This demo was last run on 2023 November 19 using AngularJS `1.8.2`
+This demo was tested in the following environments:
+
+| Version | Date |
+|:------------------|:-----------|
+| `1.8.2` (latest) | 2023-12-04 |
+| `1.2.32` (legacy) | 2023-12-04 |
:::
@@ -294,7 +299,7 @@ However, this does not handle merge cells well!
The `sheet_to_html` function generates HTML that is aware of merges and other
worksheet features. The generated HTML does not contain any `
+```
+
+:::
+
2) Save the following to `SheetJSRequire.js`:
```js title="SheetJSRequire.js"
@@ -142,6 +168,10 @@ require(["xlsx"], function(XLSX) {
/* filter for the Presidents */
var prez = raw_data.filter(function(row) { return row.terms.some(function(term) { return term.type === "prez"; }); });
+ /* sort by first presidential term */
+ prez.forEach(function(row) { row.start = row.terms.find(function(term) {return term.type === "prez"; }).start; });
+ prez.sort(function(l,r) { return l.start.localeCompare(r.start); });
+
/* flatten objects */
var rows = prez.map(function(row) { return {
name: row.name.first + " " + row.name.last,
@@ -176,17 +206,19 @@ uses normal functions and traditional Promise chains.
:::
-3) Start a local HTTP server, then go to `http://localhost:8080/`
+3) Start a local HTTP server:
```bash
npx http-server .
```
+4) Load the displayed URL (typically `http://localhost:8080/`) in a web browser.
+
Click on "Click here to export" to generate a file.
### r.js Optimizer
-4) Create `build.js` configuration for the optimizer:
+5) Create `build.js` configuration for the optimizer:
```js title="build.js"
({
@@ -199,12 +231,23 @@ Click on "Click here to export" to generate a file.
});
```
-5) Run the `r.js` optimizer to create `SheetJSRequire.min.js`:
+6) Run the `r.js` optimizer to create `SheetJSRequire.min.js`:
```bash
npx -p requirejs@2.3.6 r.js -o build.js
```
+:::note pass
+
+To change the RequireJS version, change the version in the command. For example,
+the following command uses RequireJS `2.1.22` to generate an optimized script:
+
+```bash
+npx -p requirejs@2.1.22 r.js -o build.js
+```
+
+:::
+
6) Save the following to `optimized.html`:
```html title="optimized.html"
@@ -214,12 +257,24 @@ npx -p requirejs@2.3.6 r.js -o build.js