json-renderers-build-table 1.32.2 → 1.36.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/package.json +6 -3
  2. package/src/index.js +2 -2
  3. package/src/v32/actions/instructionsForOptions.json +1 -1
  4. package/src/v33/actions/index.js +12 -0
  5. package/src/v34/actions/index.js +12 -0
  6. package/src/{v30 → v34}/builders/simple/index.js +9 -4
  7. package/src/v35/builders/bodyOnly/base.json +1 -0
  8. package/src/v35/builders/bodyOnly/double.json +1 -0
  9. package/src/v35/builders/bodyOnly/index.js +37 -0
  10. package/src/v35/builders/bodyOnly/single.json +1 -0
  11. package/src/v35/builders/footerOnly/base.json +1 -0
  12. package/src/v35/builders/footerOnly/double.json +1 -0
  13. package/src/v35/builders/footerOnly/index.js +37 -0
  14. package/src/v35/builders/footerOnly/single.json +1 -0
  15. package/src/v35/builders/headerOnly/base.json +1 -0
  16. package/src/v35/builders/headerOnly/double.json +1 -0
  17. package/src/v35/builders/headerOnly/index.js +37 -0
  18. package/src/v35/builders/headerOnly/single.json +1 -0
  19. package/src/v35/builders/simple/base.json +1 -0
  20. package/src/v35/builders/simple/double.json +1 -0
  21. package/src/v35/builders/simple/index.js +30 -0
  22. package/src/v35/builders/simple/single.json +1 -0
  23. package/src/v35/builders/withFooter/base.json +1 -0
  24. package/src/v35/builders/withFooter/double.json +1 -0
  25. package/src/v35/builders/withFooter/index.js +30 -0
  26. package/src/v35/builders/withFooter/single.json +56 -0
  27. package/src/v35/index.js +11 -0
  28. package/src/v35/public.js +2 -0
  29. package/src/v36/builders/bodyOnly/base.json +1 -0
  30. package/src/v36/builders/bodyOnly/double.json +1 -0
  31. package/src/v36/builders/bodyOnly/index.js +37 -0
  32. package/src/v36/builders/bodyOnly/single.json +1 -0
  33. package/src/v36/builders/footerOnly/base.json +1 -0
  34. package/src/v36/builders/footerOnly/double.json +1 -0
  35. package/src/v36/builders/footerOnly/index.js +37 -0
  36. package/src/v36/builders/footerOnly/single.json +1 -0
  37. package/src/v36/builders/headerOnly/base.json +1 -0
  38. package/src/v36/builders/headerOnly/double.json +1 -0
  39. package/src/v36/builders/headerOnly/index.js +37 -0
  40. package/src/v36/builders/headerOnly/single.json +1 -0
  41. package/src/v36/builders/simple/base.json +1 -0
  42. package/src/v36/builders/simple/double.json +1 -0
  43. package/src/v36/builders/simple/index.js +30 -0
  44. package/src/v36/builders/simple/single.json +1 -0
  45. package/src/v36/builders/spec.json +107 -0
  46. package/src/v36/builders/withFooter/base.json +1 -0
  47. package/src/v36/builders/withFooter/double.json +1 -0
  48. package/src/v36/builders/withFooter/index.js +33 -0
  49. package/src/v36/builders/withFooter/single.json +56 -0
  50. package/src/v36/index.js +11 -0
  51. package/src/v36/public.js +2 -0
  52. package/src/v29/actions/index.js +0 -26
  53. package/src/v29/actions/insertOptions/index.js +0 -47
  54. package/src/v29/actions/insertOptions/instructions/footer.json +0 -22
  55. package/src/v29/actions/insertOptions/instructions/single.json +0 -62
  56. package/src/v29/actions/insertSearch/index.js +0 -7
  57. package/src/v29/actions/insertSearch/instructions/template.json +0 -20
  58. package/src/v29/actions/insertSerial/index.js +0 -47
  59. package/src/v29/actions/insertSerial/instructions/footer.json +0 -22
  60. package/src/v29/actions/insertSerial/instructions/single.json +0 -62
  61. package/src/v29/builders/simple/index.js +0 -45
  62. package/src/v30/actions/index.js +0 -26
  63. package/src/v30/actions/insertOptions/index.js +0 -47
  64. package/src/v30/actions/insertOptions/instructions/footer.json +0 -22
  65. package/src/v30/actions/insertOptions/instructions/single.json +0 -62
  66. package/src/v30/actions/insertSearch/index.js +0 -7
  67. package/src/v30/actions/insertSearch/instructions/template.json +0 -20
  68. package/src/v30/actions/insertSerial/index.js +0 -47
  69. package/src/v30/actions/insertSerial/instructions/footer.json +0 -22
  70. package/src/v30/actions/insertSerial/instructions/single.json +0 -62
  71. package/src/v31/actions/index.js +0 -30
  72. package/src/v31/actions/insertSearch/index.js +0 -7
  73. package/src/v31/actions/insertSearch/instructions/template.json +0 -20
  74. package/src/v31/actions/instructionsForOptions.json +0 -44
  75. package/src/v31/actions/instructionsForSerial.json +0 -44
  76. package/src/v31/builders/bodyOnly/base.json +0 -1
  77. package/src/v31/builders/bodyOnly/index.js +0 -18
  78. package/src/v31/builders/bodyOnly/instructions/double.json +0 -18
  79. package/src/v31/builders/footerOnly/base.json +0 -3
  80. package/src/v31/builders/footerOnly/index.js +0 -21
  81. package/src/v31/builders/footerOnly/instructions/single.json +0 -19
  82. package/src/v31/builders/headerOnly/base.json +0 -53
  83. package/src/v31/builders/headerOnly/index.js +0 -18
  84. package/src/v31/builders/headerOnly/instructions/single.json +0 -38
  85. package/src/v31/builders/simple/base.json +0 -53
  86. package/src/v31/builders/simple/instructions/double.json +0 -19
  87. package/src/v31/builders/simple/instructions/single.json +0 -38
  88. package/src/v31/builders/simpleSearch/base.json +0 -53
  89. package/src/v31/builders/simpleSearch/index.js +0 -40
  90. package/src/v31/builders/simpleSearch/instructions/double.json +0 -19
  91. package/src/v31/builders/simpleSearch/instructions/single.json +0 -38
  92. package/src/v31/builders/withFooter/base.json +0 -53
  93. package/src/v31/builders/withFooter/index.js +0 -40
  94. package/src/v31/builders/withFooter/instructions/double.json +0 -19
  95. package/src/v31/builders/withFooter/instructions/single.json +0 -56
  96. package/src/v31/doubleInstruction/index.js +0 -21
  97. package/src/v31/guards/index.js +0 -10
  98. package/src/v31/guards/references/func/index.js +0 -8
  99. package/src/v31/guards/references/index.js +0 -9
  100. package/src/v31/guards/references/templateKey/index.js +0 -8
  101. package/src/v31/guards/structure/destinationPath/index.js +0 -8
  102. package/src/v31/guards/structure/func/index.js +0 -8
  103. package/src/v31/guards/structure/index.js +0 -15
  104. package/src/v31/guards/structure/sourcePath/index.js +0 -8
  105. package/src/v31/guards/structure/templateKey/index.js +0 -9
  106. package/src/v31/index.js +0 -21
  107. package/src/v31/singleInstruction/index.js +0 -32
  108. package/src/v31/writePath/index.js +0 -62
  109. /package/src/{v29 → v33}/builders/bodyOnly/base.json +0 -0
  110. /package/src/{v29 → v33}/builders/bodyOnly/index.js +0 -0
  111. /package/src/{v29 → v33}/builders/bodyOnly/instructions/double.json +0 -0
  112. /package/src/{v29 → v33}/builders/footerOnly/base.json +0 -0
  113. /package/src/{v29 → v33}/builders/footerOnly/index.js +0 -0
  114. /package/src/{v29 → v33}/builders/footerOnly/instructions/single.json +0 -0
  115. /package/src/{v29 → v33}/builders/headerOnly/base.json +0 -0
  116. /package/src/{v29 → v33}/builders/headerOnly/index.js +0 -0
  117. /package/src/{v29 → v33}/builders/headerOnly/instructions/single.json +0 -0
  118. /package/src/{v29 → v33}/builders/simple/base.json +0 -0
  119. /package/src/{v31 → v33}/builders/simple/index.js +0 -0
  120. /package/src/{v29 → v33}/builders/simple/instructions/double.json +0 -0
  121. /package/src/{v29 → v33}/builders/simple/instructions/single.json +0 -0
  122. /package/src/{v29 → v33}/builders/simpleSearch/base.json +0 -0
  123. /package/src/{v29 → v33}/builders/simpleSearch/index.js +0 -0
  124. /package/src/{v29 → v33}/builders/simpleSearch/instructions/double.json +0 -0
  125. /package/src/{v29 → v33}/builders/simpleSearch/instructions/single.json +0 -0
  126. /package/src/{v29 → v33}/builders/spec.json +0 -0
  127. /package/src/{v29 → v33}/builders/withFooter/base.json +0 -0
  128. /package/src/{v29 → v33}/builders/withFooter/index.js +0 -0
  129. /package/src/{v29 → v33}/builders/withFooter/instructions/double.json +0 -0
  130. /package/src/{v29 → v33}/builders/withFooter/instructions/single.json +0 -0
  131. /package/src/{v29 → v33}/doubleInstruction/index.js +0 -0
  132. /package/src/{v29 → v33}/guards/index.js +0 -0
  133. /package/src/{v29 → v33}/guards/references/func/index.js +0 -0
  134. /package/src/{v29 → v33}/guards/references/index.js +0 -0
  135. /package/src/{v29 → v33}/guards/references/templateKey/index.js +0 -0
  136. /package/src/{v29 → v33}/guards/structure/destinationPath/index.js +0 -0
  137. /package/src/{v29 → v33}/guards/structure/func/index.js +0 -0
  138. /package/src/{v29 → v33}/guards/structure/index.js +0 -0
  139. /package/src/{v29 → v33}/guards/structure/sourcePath/index.js +0 -0
  140. /package/src/{v29 → v33}/guards/structure/templateKey/index.js +0 -0
  141. /package/src/{v29 → v33}/index.js +0 -0
  142. /package/src/{v29 → v33}/singleInstruction/index.js +0 -0
  143. /package/src/{v29 → v33}/writePath/index.js +0 -0
  144. /package/src/{v30 → v34}/builders/bodyOnly/base.json +0 -0
  145. /package/src/{v30 → v34}/builders/bodyOnly/index.js +0 -0
  146. /package/src/{v30 → v34}/builders/bodyOnly/instructions/double.json +0 -0
  147. /package/src/{v30 → v34}/builders/footerOnly/base.json +0 -0
  148. /package/src/{v30 → v34}/builders/footerOnly/index.js +0 -0
  149. /package/src/{v30 → v34}/builders/footerOnly/instructions/single.json +0 -0
  150. /package/src/{v30 → v34}/builders/headerOnly/base.json +0 -0
  151. /package/src/{v30 → v34}/builders/headerOnly/index.js +0 -0
  152. /package/src/{v30 → v34}/builders/headerOnly/instructions/single.json +0 -0
  153. /package/src/{v30 → v34}/builders/simple/base.json +0 -0
  154. /package/src/{v30 → v34}/builders/simple/instructions/double.json +0 -0
  155. /package/src/{v30 → v34}/builders/simple/instructions/single.json +0 -0
  156. /package/src/{v30 → v34}/builders/simpleSearch/base.json +0 -0
  157. /package/src/{v30 → v34}/builders/simpleSearch/index.js +0 -0
  158. /package/src/{v30 → v34}/builders/simpleSearch/instructions/double.json +0 -0
  159. /package/src/{v30 → v34}/builders/simpleSearch/instructions/single.json +0 -0
  160. /package/src/{v30 → v34}/builders/spec.json +0 -0
  161. /package/src/{v30 → v34}/builders/withFooter/base.json +0 -0
  162. /package/src/{v30 → v34}/builders/withFooter/index.js +0 -0
  163. /package/src/{v30 → v34}/builders/withFooter/instructions/double.json +0 -0
  164. /package/src/{v30 → v34}/builders/withFooter/instructions/single.json +0 -0
  165. /package/src/{v30 → v34}/doubleInstruction/index.js +0 -0
  166. /package/src/{v30 → v34}/guards/index.js +0 -0
  167. /package/src/{v30 → v34}/guards/references/func/index.js +0 -0
  168. /package/src/{v30 → v34}/guards/references/index.js +0 -0
  169. /package/src/{v30 → v34}/guards/references/templateKey/index.js +0 -0
  170. /package/src/{v30 → v34}/guards/structure/destinationPath/index.js +0 -0
  171. /package/src/{v30 → v34}/guards/structure/func/index.js +0 -0
  172. /package/src/{v30 → v34}/guards/structure/index.js +0 -0
  173. /package/src/{v30 → v34}/guards/structure/sourcePath/index.js +0 -0
  174. /package/src/{v30 → v34}/guards/structure/templateKey/index.js +0 -0
  175. /package/src/{v30 → v34}/index.js +0 -0
  176. /package/src/{v30 → v34}/singleInstruction/index.js +0 -0
  177. /package/src/{v30 → v34}/writePath/index.js +0 -0
  178. /package/src/{v31 → v35}/builders/spec.json +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-renderers-build-table",
3
- "version": "1.32.2",
3
+ "version": "1.36.2",
4
4
  "description": "Focused table specification builder with configurable rows and cells",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -18,11 +18,14 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@keshavsoft/json-to-tag": "^1.9.3",
21
- "json-instructions": "^1.8.3",
21
+ "json-instructions": "^1.11.1",
22
+ "json-renderers-build-table-options": "^1.4.1",
22
23
  "json-transformer-funcs": "^1.24.7",
23
24
  "json-transformer-funcs-one-dimension": "^1.6.1",
24
25
  "json-transformer-funcs-primitive": "^1.9.3",
25
- "json-transformer-funcs-two-dimensions": "^1.5.2"
26
+ "json-transformer-funcs-two-dimensions": "^1.5.2",
27
+ "json-instruction-single": "^1.2.2",
28
+ "json-instruction-double": "^1.2.1"
26
29
  },
27
30
  "devDependencies": {
28
31
  "vite": "^8.3.4"
package/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./v32/index.js";
2
- export { default } from "./v32/index.js";
1
+ export * from "./v36/index.js";
2
+ export { default } from "./v36/index.js";
@@ -52,7 +52,7 @@
52
52
  "action": "push"
53
53
  },
54
54
  "sourcePath": null,
55
- "templateKey": "optionsButtonCell",
55
+ "templateKey": "tdWithButtonSaveWarning",
56
56
  "func": null
57
57
  }
58
58
  ]
@@ -0,0 +1,12 @@
1
+ import buildOptions from "json-renderers-build-table-options";
2
+
3
+ const startFunc = ({ inOptions = {}, inBase, showLog = false, returnLog = [] }) => {
4
+ const fromOptions = buildOptions({
5
+ options: inOptions,
6
+ base: inBase, showLog, returnLog
7
+ });
8
+
9
+ return fromOptions;
10
+ };
11
+
12
+ export default startFunc;
@@ -0,0 +1,12 @@
1
+ import buildOptions from "json-renderers-build-table-options";
2
+
3
+ const startFunc = ({ inOptions = {}, inBase, showLog = false, returnLog = [] }) => {
4
+ const fromOptions = buildOptions({
5
+ options: inOptions,
6
+ base: inBase, showLog, returnLog
7
+ });
8
+
9
+ return fromOptions;
10
+ };
11
+
12
+ export default startFunc;
@@ -1,5 +1,6 @@
1
1
  import fromCollection from "json-transformer-funcs-one-dimension";
2
2
  import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+
3
4
  import { runSingleInstructions, runDoubleInstructions } from "json-instructions";
4
5
 
5
6
  import spec from "../spec.json" with { type: "json" };
@@ -7,6 +8,9 @@ import base from "./base.json" with { type: "json" };
7
8
  import singleInstructions from "./instructions/single.json" with { type: "json" };
8
9
  import doubleInstructions from "./instructions/double.json" with { type: "json" };
9
10
 
11
+ // import runSingleInstructions from "../../singleInstruction/index.js";
12
+ // import runDoubleInstructions from "../../doubleInstruction/index.js";
13
+
10
14
  import actions from "../../actions/index.js";
11
15
 
12
16
  const functions = { fromCollection, twoDimensional };
@@ -16,7 +20,8 @@ const startFunc = (inConfig = {}, showLog = false, returnLog = []) => {
16
20
 
17
21
  const localColumns = localConfig.columns || [];
18
22
  const localData = localConfig.data || [];
19
- const localOptions = localConfig.options
23
+ const localOptions = localConfig.options || {};
24
+ const localShowLog = localConfig?.showLog;
20
25
 
21
26
  const localBase = structuredClone(base);
22
27
  const registry = {
@@ -28,15 +33,15 @@ const startFunc = (inConfig = {}, showLog = false, returnLog = []) => {
28
33
  spec,
29
34
  ...localOptions
30
35
  };
36
+ console.log("registry : ", localShowLog, registry);
31
37
 
32
- console.log(" localOptions ", localOptions, registry)
38
+ runSingleInstructions(singleInstructions, registry, localShowLog, returnLog);
33
39
 
34
- runSingleInstructions(singleInstructions, registry, showLog, returnLog);
35
40
  runDoubleInstructions(doubleInstructions, registry, showLog, returnLog);
36
41
 
42
+ // runSingleInstructions(singleInstructions, registry, functions, spec, showLog, returnLog);
37
43
  // runDoubleInstructions(doubleInstructions, registry, functions, spec, showLog, returnLog);
38
44
 
39
-
40
45
  actions({ inOptions: localOptions, inBase: localBase });
41
46
 
42
47
  return localBase;
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1 @@
1
+ [{"narration":"Build only the body rows","destinationPath":{"fileName":"base","dataRole":"table-body","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"func":"twoDimensional"}]
@@ -0,0 +1,37 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+ import { runSingleInstructions } from "json-instruction-single";
4
+ import { runDoubleInstructions } from "json-instruction-double";
5
+ import spec from "../spec.json" with { type: "json" };
6
+ import base from "./base.json" with { type: "json" };
7
+ import singleInstructions from "./single.json" with { type: "json" };
8
+ import doubleInstructions from "./double.json" with { type: "json" };
9
+ import actions from "../../actions/index.js";
10
+
11
+ const functions = { fromCollection, twoDimensional };
12
+
13
+ const startFunc = (config = {}, showLog = false, returnLog = []) => {
14
+ const columns = config.columns || config.inColumns || [];
15
+ const data = config.data || config.inData || [];
16
+ const options = config.options || config.inOptions || {};
17
+ const localBase = structuredClone(base);
18
+ const registry = {
19
+ data: { columns, data },
20
+ base: localBase,
21
+ spec,
22
+ ...options
23
+ };
24
+ const instructionOptions = {
25
+ functions,
26
+ showLog: config.showLog ?? showLog,
27
+ returnLog
28
+ };
29
+
30
+ runSingleInstructions(singleInstructions, registry, instructionOptions);
31
+ runDoubleInstructions(doubleInstructions, registry, instructionOptions);
32
+ actions({ inOptions: options, inBase: localBase });
33
+
34
+ return localBase;
35
+ };
36
+
37
+ export default startFunc;
@@ -0,0 +1 @@
1
+ []
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1,37 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+ import { runSingleInstructions } from "json-instruction-single";
4
+ import { runDoubleInstructions } from "json-instruction-double";
5
+ import spec from "../spec.json" with { type: "json" };
6
+ import base from "./base.json" with { type: "json" };
7
+ import singleInstructions from "./single.json" with { type: "json" };
8
+ import doubleInstructions from "./double.json" with { type: "json" };
9
+ import actions from "../../actions/index.js";
10
+
11
+ const functions = { fromCollection, twoDimensional };
12
+
13
+ const startFunc = (config = {}, showLog = false, returnLog = []) => {
14
+ const columns = config.columns || config.inColumns || [];
15
+ const data = config.data || config.inData || [];
16
+ const options = config.options || config.inOptions || {};
17
+ const localBase = structuredClone(base);
18
+ const registry = {
19
+ data: { columns, data },
20
+ base: localBase,
21
+ spec,
22
+ ...options
23
+ };
24
+ const instructionOptions = {
25
+ functions,
26
+ showLog: config.showLog ?? showLog,
27
+ returnLog
28
+ };
29
+
30
+ runSingleInstructions(singleInstructions, registry, instructionOptions);
31
+ runDoubleInstructions(doubleInstructions, registry, instructionOptions);
32
+ actions({ inOptions: options, inBase: localBase });
33
+
34
+ return localBase;
35
+ };
36
+
37
+ export default startFunc;
@@ -0,0 +1 @@
1
+ [{"narration":"Build only the footer row","destinationPath":{"fileName":"base","dataRole":"table-footer-row","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildFooter","func":"fromCollection"}]
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1,37 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+ import { runSingleInstructions } from "json-instruction-single";
4
+ import { runDoubleInstructions } from "json-instruction-double";
5
+ import spec from "../spec.json" with { type: "json" };
6
+ import base from "./base.json" with { type: "json" };
7
+ import singleInstructions from "./single.json" with { type: "json" };
8
+ import doubleInstructions from "./double.json" with { type: "json" };
9
+ import actions from "../../actions/index.js";
10
+
11
+ const functions = { fromCollection, twoDimensional };
12
+
13
+ const startFunc = (config = {}, showLog = false, returnLog = []) => {
14
+ const columns = config.columns || config.inColumns || [];
15
+ const data = config.data || config.inData || [];
16
+ const options = config.options || config.inOptions || {};
17
+ const localBase = structuredClone(base);
18
+ const registry = {
19
+ data: { columns, data },
20
+ base: localBase,
21
+ spec,
22
+ ...options
23
+ };
24
+ const instructionOptions = {
25
+ functions,
26
+ showLog: config.showLog ?? showLog,
27
+ returnLog
28
+ };
29
+
30
+ runSingleInstructions(singleInstructions, registry, instructionOptions);
31
+ runDoubleInstructions(doubleInstructions, registry, instructionOptions);
32
+ actions({ inOptions: options, inBase: localBase });
33
+
34
+ return localBase;
35
+ };
36
+
37
+ export default startFunc;
@@ -0,0 +1 @@
1
+ [{"narration":"Build only the header row","destinationPath":{"fileName":"base","dataRole":"table-header-row","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildHeader","func":"fromCollection"}]
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1 @@
1
+ [{"narration":"Build table body","destinationPath":{"fileName":"base","dataRole":"table-body","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"func":"twoDimensional"}]
@@ -0,0 +1,30 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+
4
+ import runSingleInstructions from "json-instruction-single";
5
+ import runDoubleInstructions from "json-instruction-double";
6
+
7
+ import spec from "../spec.json" with { type: "json" };
8
+ import base from "./base.json" with { type: "json" };
9
+
10
+ import singleInstructions from "./single.json" with { type: "json" };
11
+ import doubleInstructions from "./double.json" with { type: "json" };
12
+
13
+ const startFunc = ({ data, columns, options }) => {
14
+
15
+ const localBase = structuredClone(base);
16
+
17
+ const registry = {
18
+ data: { columns, data },
19
+ base: localBase,
20
+ spec,
21
+ ...options
22
+ };
23
+
24
+ runSingleInstructions(singleInstructions, registry);
25
+ runDoubleInstructions(doubleInstructions, registry);
26
+
27
+ return localBase;
28
+ };
29
+
30
+ export default startFunc;
@@ -0,0 +1 @@
1
+ [{"narration":"Build column widths","destinationPath":{"fileName":"base","dataRole":"table-colgroup","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildColGroup","func":"fromCollection"},{"narration":"Build table header","destinationPath":{"fileName":"base","dataRole":"table-header-row","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildHeader","func":"fromCollection"}]
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1 @@
1
+ [{"narration":"Build table body","destinationPath":{"fileName":"base","dataRole":"table-body","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"func":"twoDimensional"}]
@@ -0,0 +1,30 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+
4
+ import runSingleInstructions from "json-instruction-single";
5
+ import runDoubleInstructions from "json-instruction-double";
6
+
7
+ import spec from "../spec.json" with { type: "json" };
8
+ import base from "./base.json" with { type: "json" };
9
+
10
+ import singleInstructions from "./single.json" with { type: "json" };
11
+ import doubleInstructions from "./double.json" with { type: "json" };
12
+
13
+ const startFunc = ({ data, columns, options }) => {
14
+
15
+ const localBase = structuredClone(base);
16
+
17
+ const registry = {
18
+ data: { columns, data },
19
+ base: localBase,
20
+ spec,
21
+ ...options
22
+ };
23
+
24
+ runSingleInstructions(singleInstructions, registry);
25
+ runDoubleInstructions(doubleInstructions, registry);
26
+
27
+ return localBase;
28
+ };
29
+
30
+ export default startFunc;
@@ -0,0 +1,56 @@
1
+ [
2
+ {
3
+ "narration": "Build column widths",
4
+ "destinationPath": {
5
+ "fileName": "base",
6
+ "dataRole": "table-colgroup",
7
+ "filePath": [
8
+ "children"
9
+ ]
10
+ },
11
+ "sourcePath": {
12
+ "fileName": "data",
13
+ "filePath": [
14
+ "columns"
15
+ ]
16
+ },
17
+ "templateKey": "buildColGroup",
18
+ "func": "fromCollection"
19
+ },
20
+ {
21
+ "narration": "Build table header",
22
+ "destinationPath": {
23
+ "fileName": "base",
24
+ "dataRole": "table-header-row",
25
+ "filePath": [
26
+ "children"
27
+ ]
28
+ },
29
+ "sourcePath": {
30
+ "fileName": "data",
31
+ "filePath": [
32
+ "columns"
33
+ ]
34
+ },
35
+ "templateKey": "buildHeader",
36
+ "func": "fromCollection"
37
+ },
38
+ {
39
+ "narration": "Build footer input cells",
40
+ "destinationPath": {
41
+ "fileName": "base",
42
+ "dataRole": "table-footer-row",
43
+ "filePath": [
44
+ "children"
45
+ ]
46
+ },
47
+ "sourcePath": {
48
+ "fileName": "data",
49
+ "filePath": [
50
+ "columns"
51
+ ]
52
+ },
53
+ "templateKey": "buildFooter",
54
+ "func": "fromCollection"
55
+ }
56
+ ]
@@ -0,0 +1,11 @@
1
+ import simple from "./builders/simple/index.js";
2
+ import withFooter from "./builders/withFooter/index.js";
3
+
4
+ // import headerOnly from "./builders/headerOnly/index.js";
5
+ // import bodyOnly from "./builders/bodyOnly/index.js";
6
+
7
+ // import footerOnly from "./builders/footerOnly/index.js";
8
+
9
+ export { simple, withFooter };
10
+
11
+ export default { simple, withFooter };
@@ -0,0 +1,2 @@
1
+ export * from "./index.js";
2
+ export { default } from "./index.js";
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1 @@
1
+ [{"narration":"Build only the body rows","destinationPath":{"fileName":"base","dataRole":"table-body","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"func":"twoDimensional"}]
@@ -0,0 +1,37 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+ import { runSingleInstructions } from "json-instruction-single";
4
+ import { runDoubleInstructions } from "json-instruction-double";
5
+ import spec from "../spec.json" with { type: "json" };
6
+ import base from "./base.json" with { type: "json" };
7
+ import singleInstructions from "./single.json" with { type: "json" };
8
+ import doubleInstructions from "./double.json" with { type: "json" };
9
+ import actions from "../../actions/index.js";
10
+
11
+ const functions = { fromCollection, twoDimensional };
12
+
13
+ const startFunc = (config = {}, showLog = false, returnLog = []) => {
14
+ const columns = config.columns || config.inColumns || [];
15
+ const data = config.data || config.inData || [];
16
+ const options = config.options || config.inOptions || {};
17
+ const localBase = structuredClone(base);
18
+ const registry = {
19
+ data: { columns, data },
20
+ base: localBase,
21
+ spec,
22
+ ...options
23
+ };
24
+ const instructionOptions = {
25
+ functions,
26
+ showLog: config.showLog ?? showLog,
27
+ returnLog
28
+ };
29
+
30
+ runSingleInstructions(singleInstructions, registry, instructionOptions);
31
+ runDoubleInstructions(doubleInstructions, registry, instructionOptions);
32
+ actions({ inOptions: options, inBase: localBase });
33
+
34
+ return localBase;
35
+ };
36
+
37
+ export default startFunc;
@@ -0,0 +1 @@
1
+ []
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1,37 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+ import { runSingleInstructions } from "json-instruction-single";
4
+ import { runDoubleInstructions } from "json-instruction-double";
5
+ import spec from "../spec.json" with { type: "json" };
6
+ import base from "./base.json" with { type: "json" };
7
+ import singleInstructions from "./single.json" with { type: "json" };
8
+ import doubleInstructions from "./double.json" with { type: "json" };
9
+ import actions from "../../actions/index.js";
10
+
11
+ const functions = { fromCollection, twoDimensional };
12
+
13
+ const startFunc = (config = {}, showLog = false, returnLog = []) => {
14
+ const columns = config.columns || config.inColumns || [];
15
+ const data = config.data || config.inData || [];
16
+ const options = config.options || config.inOptions || {};
17
+ const localBase = structuredClone(base);
18
+ const registry = {
19
+ data: { columns, data },
20
+ base: localBase,
21
+ spec,
22
+ ...options
23
+ };
24
+ const instructionOptions = {
25
+ functions,
26
+ showLog: config.showLog ?? showLog,
27
+ returnLog
28
+ };
29
+
30
+ runSingleInstructions(singleInstructions, registry, instructionOptions);
31
+ runDoubleInstructions(doubleInstructions, registry, instructionOptions);
32
+ actions({ inOptions: options, inBase: localBase });
33
+
34
+ return localBase;
35
+ };
36
+
37
+ export default startFunc;
@@ -0,0 +1 @@
1
+ [{"narration":"Build only the footer row","destinationPath":{"fileName":"base","dataRole":"table-footer-row","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildFooter","func":"fromCollection"}]
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1,37 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+ import { runSingleInstructions } from "json-instruction-single";
4
+ import { runDoubleInstructions } from "json-instruction-double";
5
+ import spec from "../spec.json" with { type: "json" };
6
+ import base from "./base.json" with { type: "json" };
7
+ import singleInstructions from "./single.json" with { type: "json" };
8
+ import doubleInstructions from "./double.json" with { type: "json" };
9
+ import actions from "../../actions/index.js";
10
+
11
+ const functions = { fromCollection, twoDimensional };
12
+
13
+ const startFunc = (config = {}, showLog = false, returnLog = []) => {
14
+ const columns = config.columns || config.inColumns || [];
15
+ const data = config.data || config.inData || [];
16
+ const options = config.options || config.inOptions || {};
17
+ const localBase = structuredClone(base);
18
+ const registry = {
19
+ data: { columns, data },
20
+ base: localBase,
21
+ spec,
22
+ ...options
23
+ };
24
+ const instructionOptions = {
25
+ functions,
26
+ showLog: config.showLog ?? showLog,
27
+ returnLog
28
+ };
29
+
30
+ runSingleInstructions(singleInstructions, registry, instructionOptions);
31
+ runDoubleInstructions(doubleInstructions, registry, instructionOptions);
32
+ actions({ inOptions: options, inBase: localBase });
33
+
34
+ return localBase;
35
+ };
36
+
37
+ export default startFunc;
@@ -0,0 +1 @@
1
+ [{"narration":"Build only the header row","destinationPath":{"fileName":"base","dataRole":"table-header-row","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildHeader","func":"fromCollection"}]
@@ -0,0 +1 @@
1
+ {"tagName":"table","attributes":{"class":"table table-hover table-striped align-middle border mb-0"},"children":[{"tagName":"colgroup","attributes":{"data-role":"table-colgroup"},"children":[]},{"tagName":"thead","attributes":{"class":"table-dark","data-role":"table-header"},"children":[{"tagName":"tr","attributes":{"data-role":"table-header-row"},"children":[]}]},{"tagName":"tbody","attributes":{"data-role":"table-body"},"children":[]},{"tagName":"tfoot","attributes":{"data-role":"table-footer"},"children":[{"tagName":"tr","attributes":{"data-role":"table-footer-row"},"children":[]}]}]}
@@ -0,0 +1 @@
1
+ [{"narration":"Build table body","destinationPath":{"fileName":"base","dataRole":"table-body","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"func":"twoDimensional"}]
@@ -0,0 +1,30 @@
1
+ import fromCollection from "json-transformer-funcs-one-dimension";
2
+ import twoDimensional from "json-transformer-funcs-two-dimensions";
3
+
4
+ import runSingleInstructions from "json-instruction-single";
5
+ import runDoubleInstructions from "json-instruction-double";
6
+
7
+ import spec from "../spec.json" with { type: "json" };
8
+ import base from "./base.json" with { type: "json" };
9
+
10
+ import singleInstructions from "./single.json" with { type: "json" };
11
+ import doubleInstructions from "./double.json" with { type: "json" };
12
+
13
+ const startFunc = ({ data, columns, options }) => {
14
+
15
+ const localBase = structuredClone(base);
16
+
17
+ const registry = {
18
+ data: { columns, data },
19
+ base: localBase,
20
+ spec,
21
+ ...options
22
+ };
23
+
24
+ runSingleInstructions(singleInstructions, registry);
25
+ runDoubleInstructions(doubleInstructions, registry);
26
+
27
+ return localBase;
28
+ };
29
+
30
+ export default startFunc;
@@ -0,0 +1 @@
1
+ [{"narration":"Build column widths","destinationPath":{"fileName":"base","dataRole":"table-colgroup","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildColGroup","func":"fromCollection"},{"narration":"Build table header","destinationPath":{"fileName":"base","dataRole":"table-header-row","filePath":["children"]},"sourcePath":{"fileName":"data","filePath":["columns"]},"templateKey":"buildHeader","func":"fromCollection"}]