diff --git a/README.md b/README.md index ee07466..b3e6233 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,13 @@ for more example I invite to tests data: [click here and check `Renderer` folder | Navigation | [EndRowCell](./src/cell/EndRowCell.ts) | 2 | `#! END_ROW` | Go to the beginning of next row | | | Worksheet
Navigation
Loop | [FinishCell](./src/cell/FinishCell.ts) | 7 | `#! FINISH conditionPath` | Finish rendering for current worksheet and:
1) go to next worksheet if `conditionPath===true`
2) repeat this template worksheet again (`conditionPath === false`) - looping through worksheets
3) finished whole rendering when this worksheet is the last one. | **Examples:**
`#! FINISHED ` or `#! FINISHED itemFromLoop.__iterated` | | Worksheet | [WsNameCell](./src/cell/WsNameCell.ts) | 13 | `#! WS_NAME pathToVariable` | Set worksheet's name. | **Examples:**
`#! WS_NAME worksheetName`
`#! WS_NAME item.title`
`#! WS_NAME translatedNames.0` | -| View Model | **TODO: describe it!** [DeleteCell](./src/cell/DeleteCell.ts) | | | | | | Loop | **TODO: describe it!** [DumpColsCell](./src/cell/DumpColsCell.ts) | | | | | -| Loop | **TODO: describe it!** [ForEachCell](./src/cell/ForEachCell.ts) | | | | | +| Loop | **TODO: describe it! test done: simple; tests todo: nested, with formula, stripped, through worksheets,** [ForEachCell](./src/cell/ForEachCell.ts) | | | | | | Loop | **TODO: describe it!** [ContinueCell](./src/cell/ContinueCell.ts) | | | | | | Loop | **TODO: describe it!** [EndLoopCell](./src/cell/EndLoopCell.ts) | | | | | | Aggregation | **TODO: describe it!** [AverageCell](./src/cell/AverageCell.ts) | | | | | | Aggregation| **TODO: describe it!** [SumCell](./src/cell/SumCell.ts) | | | | | +| View Model | **TODO: test - nested loop** [DeleteCell](./src/cell/DeleteCell.ts) | 14 | `#! DELETE pathToVariable` | Delete variable, useful for nested loops.| | ## Commands [PREVIOUS VERSION]: diff --git a/tests/integration/data/Renderer005-ForEach-simple/expected.xlsx b/tests/integration/data/Renderer005-ForEach-simple/expected.xlsx new file mode 100644 index 0000000..a0f728a Binary files /dev/null and b/tests/integration/data/Renderer005-ForEach-simple/expected.xlsx differ diff --git a/tests/integration/data/Renderer005-ForEach-simple/template.xlsx b/tests/integration/data/Renderer005-ForEach-simple/template.xlsx new file mode 100644 index 0000000..2fc0750 Binary files /dev/null and b/tests/integration/data/Renderer005-ForEach-simple/template.xlsx differ diff --git a/tests/integration/data/Renderer005-ForEach-simple/viewModel.json b/tests/integration/data/Renderer005-ForEach-simple/viewModel.json new file mode 100644 index 0000000..b7284cf --- /dev/null +++ b/tests/integration/data/Renderer005-ForEach-simple/viewModel.json @@ -0,0 +1,52 @@ +{ + "projects": [ + { + "name": "ExcelJS", + "role": "maintainer", + "platform": "github", + "link": "https://github.com/exceljs/exceljs", + "stars": 5300, + "forks": 682 + }, + { + "name": "xlsx-import", + "role": "owner", + "platform": "github", + "link": "https://github.com/siemienik/xlsx-import", + "stars": 2, + "forks": 0 + }, + { + "name": "xlsx-import", + "role": "owner", + "platform": "npm", + "link": "https://www.npmjs.com/package/xlsx-import", + "stars": "n.o.", + "forks": "n.o." + }, + { + "name": "xlsx-renderer", + "role": "owner", + "platform": "github", + "link": "https://github.com/siemienik/xlsx-renderer", + "stars": 1, + "forks": 0 + }, + { + "name": "xlsx-renderer", + "role": "owner", + "platform": "npm", + "link": "https://www.npmjs.com/package/xlsx-renderer", + "stars": "n.o.", + "forks": "n.o." + }, + { + "name": "TS Package Structure", + "role": "owner", + "platform": "github", + "link": "https://github.com/Siemienik/ts-package-structure", + "stars": 2, + "forks": 0 + } + ] +} \ No newline at end of file