json-renderers-build 1.7.1 → 1.9.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 (116) hide show
  1. package/README.md +8 -4
  2. package/docs/dist/min.js +541 -266
  3. package/docs/dist/v4/min.js +320 -320
  4. package/docs/dist/v5/min.js +312 -312
  5. package/docs/dist/v7/min.js +272 -0
  6. package/docs/dist/v8/min.js +268 -0
  7. package/docs/dist/v9/min.js +587 -0
  8. package/docs/index.html +2 -2
  9. package/package.json +1 -1
  10. package/src/index.js +2 -2
  11. package/src/v7/index.js +47 -47
  12. package/src/v7/select/index.js +20 -20
  13. package/src/v7/select/options/index.js +17 -17
  14. package/src/v7/select/options/skeleton.json +17 -17
  15. package/src/v7/table/body/cells/index.js +23 -23
  16. package/src/v7/table/body/cells/skeleton.json +17 -17
  17. package/src/v7/table/body/index.js +15 -15
  18. package/src/v7/table/body/rows/index.js +36 -36
  19. package/src/v7/table/body/rows/skeleton.json +4 -4
  20. package/src/v7/table/body/skeleton.json +4 -4
  21. package/src/v7/table/head/cells/index.js +23 -23
  22. package/src/v7/table/head/cells/skeleton.json +17 -17
  23. package/src/v7/table/head/index.js +15 -15
  24. package/src/v7/table/head/row/index.js +15 -15
  25. package/src/v7/table/head/row/skeleton.json +4 -4
  26. package/src/v7/table/head/skeleton.json +4 -4
  27. package/src/v7/table/index.js +26 -26
  28. package/src/v7/table/skeleton.json +6 -6
  29. package/src/v8/common/deriveColumnsFromData.js +20 -0
  30. package/src/v8/index.js +40 -0
  31. package/src/v8/meta.js +6 -0
  32. package/src/v8/registerGlobal.js +14 -0
  33. package/src/v8/select/index.js +21 -0
  34. package/src/v8/select/options/index.js +17 -0
  35. package/src/v8/select/options/skeleton.json +17 -0
  36. package/src/v8/select/skeleton.json +7 -0
  37. package/src/v8/table/body/cells/index.js +17 -0
  38. package/src/v8/table/body/cells/skeleton.json +17 -0
  39. package/src/v8/table/body/index.js +20 -0
  40. package/src/v8/table/body/rows/index.js +23 -0
  41. package/src/v8/table/body/rows/skeleton.json +4 -0
  42. package/src/v8/table/body/skeleton.json +4 -0
  43. package/src/v8/table/head/cells/index.js +17 -0
  44. package/src/v8/table/head/cells/skeleton.json +17 -0
  45. package/src/v8/table/head/index.js +15 -0
  46. package/src/v8/table/head/row/index.js +15 -0
  47. package/src/v8/table/head/row/skeleton.json +4 -0
  48. package/src/v8/table/head/skeleton.json +4 -0
  49. package/src/v8/table/index.js +26 -0
  50. package/src/v8/table/skeleton.json +7 -0
  51. package/src/v9/common/deriveColumnsFromData.js +20 -0
  52. package/src/v9/index.js +36 -0
  53. package/src/v9/meta.js +6 -0
  54. package/src/v9/registerGlobal.js +14 -0
  55. package/src/v9/select/index.js +21 -0
  56. package/src/v9/select/options/index.js +17 -0
  57. package/src/v9/select/options/skeleton.json +17 -0
  58. package/src/v9/select/skeleton.json +7 -0
  59. package/src/v9/table/footer/empty/cell/index.js +5 -0
  60. package/src/v9/table/footer/empty/cell/tag.json +6 -0
  61. package/src/v9/table/footer/empty/index.js +6 -0
  62. package/src/v9/table/footer/empty/row/index.js +10 -0
  63. package/src/v9/table/footer/empty/row/tag.json +7 -0
  64. package/src/v9/table/footer/index.js +28 -0
  65. package/src/v9/table/footer/inputs/cell/index.js +15 -0
  66. package/src/v9/table/footer/inputs/cell/tag.json +7 -0
  67. package/src/v9/table/footer/inputs/index.js +6 -0
  68. package/src/v9/table/footer/inputs/input/tag.json +9 -0
  69. package/src/v9/table/footer/inputs/row/index.js +10 -0
  70. package/src/v9/table/footer/inputs/row/tag.json +7 -0
  71. package/src/v9/table/footer/inputsWithSave/button/tag.json +8 -0
  72. package/src/v9/table/footer/inputsWithSave/cell/index.js +20 -0
  73. package/src/v9/table/footer/inputsWithSave/cell/tag.json +7 -0
  74. package/src/v9/table/footer/inputsWithSave/index.js +6 -0
  75. package/src/v9/table/footer/inputsWithSave/input/tag.json +9 -0
  76. package/src/v9/table/footer/inputsWithSave/row/index.js +13 -0
  77. package/src/v9/table/footer/inputsWithSave/row/tag.json +7 -0
  78. package/src/v9/table/footer/tag.json +7 -0
  79. package/src/v9/table/footer/totals/cell/index.js +21 -0
  80. package/src/v9/table/footer/totals/cell/tag.json +7 -0
  81. package/src/v9/table/footer/totals/index.js +6 -0
  82. package/src/v9/table/footer/totals/row/index.js +12 -0
  83. package/src/v9/table/footer/totals/row/tag.json +7 -0
  84. package/src/v9/table/index.js +33 -0
  85. package/src/v9/table/options/index.js +18 -0
  86. package/src/v9/table/options/showOptions/index.js +39 -0
  87. package/src/v9/table/options/showSerial/index.js +19 -0
  88. package/src/v9/table/render-requests.json +107 -0
  89. package/src/v9/table/table/body/cell/index.js +12 -0
  90. package/src/v9/table/table/body/cell/tag.json +7 -0
  91. package/src/v9/table/table/body/index.js +17 -0
  92. package/src/v9/table/table/body/row/index.js +18 -0
  93. package/src/v9/table/table/body/row/tag.json +4 -0
  94. package/src/v9/table/table/body/tag.json +4 -0
  95. package/src/v9/table/table/head/cell/index.js +12 -0
  96. package/src/v9/table/table/head/cell/tag.json +7 -0
  97. package/src/v9/table/table/head/index.js +16 -0
  98. package/src/v9/table/table/head/row/index.js +14 -0
  99. package/src/v9/table/table/head/row/tag.json +4 -0
  100. package/src/v9/table/table/head/tag.json +4 -0
  101. package/src/v9/table/table/index.js +36 -0
  102. package/src/v9/table/table/tag.json +7 -0
  103. package/src/v9/table_10oct/body/cells/index.js +17 -0
  104. package/src/v9/table_10oct/body/cells/skeleton.json +17 -0
  105. package/src/v9/table_10oct/body/index.js +20 -0
  106. package/src/v9/table_10oct/body/rows/index.js +23 -0
  107. package/src/v9/table_10oct/body/rows/skeleton.json +4 -0
  108. package/src/v9/table_10oct/body/skeleton.json +4 -0
  109. package/src/v9/table_10oct/head/cells/index.js +17 -0
  110. package/src/v9/table_10oct/head/cells/skeleton.json +17 -0
  111. package/src/v9/table_10oct/head/index.js +15 -0
  112. package/src/v9/table_10oct/head/row/index.js +15 -0
  113. package/src/v9/table_10oct/head/row/skeleton.json +4 -0
  114. package/src/v9/table_10oct/head/skeleton.json +4 -0
  115. package/src/v9/table_10oct/index.js +26 -0
  116. package/src/v9/table_10oct/skeleton.json +7 -0
@@ -1,21 +1,21 @@
1
- import renderSelectOptions from "./options/index.js";
2
-
3
- import skeletonJson from './skeleton.json' with { type: 'json' };
4
-
5
- const startFunc = ({
6
- inData,
7
- } = {}) => {
8
- const localData = inData ?? [];
9
-
10
- let localChildren = renderSelectOptions({
11
- inData: localData
12
- });
13
-
14
- const select = structuredClone(skeletonJson);
15
- select.children = localChildren;
16
-
17
- return select;
18
- };
19
-
20
- export { renderSelectOptions };
1
+ import renderSelectOptions from "./options/index.js";
2
+
3
+ import skeletonJson from './skeleton.json' with { type: 'json' };
4
+
5
+ const startFunc = ({
6
+ inData,
7
+ } = {}) => {
8
+ const localData = inData ?? [];
9
+
10
+ let localChildren = renderSelectOptions({
11
+ inData: localData
12
+ });
13
+
14
+ const select = structuredClone(skeletonJson);
15
+ select.children = localChildren;
16
+
17
+ return select;
18
+ };
19
+
20
+ export { renderSelectOptions };
21
21
  export default startFunc;
@@ -1,17 +1,17 @@
1
- import jsonTransform from "@keshavsoft/json-transformer";
2
-
3
- import skeletonJson from './skeleton.json' with { type: 'json' };
4
-
5
- const startFunc = ({
6
- inData,
7
- } = {}) => {
8
- const localData = inData ?? [];
9
-
10
- let specAsJsonToDom = jsonTransform({
11
- children: localData
12
- }, skeletonJson);
13
-
14
- return specAsJsonToDom?.children ?? [];
15
- };
16
-
17
- export default startFunc;
1
+ import jsonTransform from "@keshavsoft/json-transformer";
2
+
3
+ import skeletonJson from './skeleton.json' with { type: 'json' };
4
+
5
+ const startFunc = ({
6
+ inData,
7
+ } = {}) => {
8
+ const localData = inData ?? [];
9
+
10
+ let specAsJsonToDom = jsonTransform({
11
+ children: localData
12
+ }, skeletonJson);
13
+
14
+ return specAsJsonToDom?.children ?? [];
15
+ };
16
+
17
+ export default startFunc;
@@ -1,17 +1,17 @@
1
- {
2
- "transform": {
3
- "children": ""
4
- },
5
- "operation": {
6
- "children": {
7
- "operationType": "loopArray",
8
- "template": {
9
- "tagName": "option",
10
- "attributes": {
11
- "value": "${}"
12
- },
13
- "textContent": "${}"
14
- }
15
- }
16
- }
17
- }
1
+ {
2
+ "transform": {
3
+ "children": ""
4
+ },
5
+ "operation": {
6
+ "children": {
7
+ "operationType": "loopArray",
8
+ "template": {
9
+ "tagName": "option",
10
+ "attributes": {
11
+ "value": "${}"
12
+ },
13
+ "textContent": "${}"
14
+ }
15
+ }
16
+ }
17
+ }
@@ -1,23 +1,23 @@
1
- import jsonTransform from "@keshavsoft/json-transformer";
2
-
3
- import skeletonJson from './skeleton.json' with { type: 'json' };
4
-
5
- const startFunc = ({
6
- inData,
7
- } = {}) => {
8
- const rawData = inData ?? [];
9
- const localData = rawData.map(val => {
10
- if (typeof val === "object" && val !== null) {
11
- return JSON.stringify(val);
12
- }
13
- return String(val ?? "");
14
- });
15
-
16
- const tdAsArray = jsonTransform({
17
- children: localData
18
- }, skeletonJson);
19
-
20
- return tdAsArray?.children ?? [];
21
- };
22
-
23
- export default startFunc;
1
+ import jsonTransform from "@keshavsoft/json-transformer";
2
+
3
+ import skeletonJson from './skeleton.json' with { type: 'json' };
4
+
5
+ const startFunc = ({
6
+ inData,
7
+ } = {}) => {
8
+ const rawData = inData ?? [];
9
+ const localData = rawData.map(val => {
10
+ if (typeof val === "object" && val !== null) {
11
+ return JSON.stringify(val);
12
+ }
13
+ return String(val ?? "");
14
+ });
15
+
16
+ const tdAsArray = jsonTransform({
17
+ children: localData
18
+ }, skeletonJson);
19
+
20
+ return tdAsArray?.children ?? [];
21
+ };
22
+
23
+ export default startFunc;
@@ -1,17 +1,17 @@
1
- {
2
- "transform": {
3
- "children": ""
4
- },
5
- "operation": {
6
- "children": {
7
- "operationType": "loopArray",
8
- "template": {
9
- "tagName": "td",
10
- "attributes": {
11
- "value": "${}"
12
- },
13
- "textContent": "${}"
14
- }
15
- }
16
- }
17
- }
1
+ {
2
+ "transform": {
3
+ "children": ""
4
+ },
5
+ "operation": {
6
+ "children": {
7
+ "operationType": "loopArray",
8
+ "template": {
9
+ "tagName": "td",
10
+ "attributes": {
11
+ "value": "${}"
12
+ },
13
+ "textContent": "${}"
14
+ }
15
+ }
16
+ }
17
+ }
@@ -1,15 +1,15 @@
1
- import bodyRows from "./rows/index.js";
2
- import skeletonJson from './skeleton.json' with { type: 'json' };
3
-
4
- const startFunc = ({
5
- inData,
6
- inColumns
7
- } = {}) => {
8
- const tbody = structuredClone(skeletonJson);
9
-
10
- tbody.children = bodyRows({ inData, inColumns });
11
-
12
- return tbody;
13
- };
14
-
15
- export default startFunc;
1
+ import bodyRows from "./rows/index.js";
2
+ import skeletonJson from './skeleton.json' with { type: 'json' };
3
+
4
+ const startFunc = ({
5
+ inData,
6
+ inColumns
7
+ } = {}) => {
8
+ const tbody = structuredClone(skeletonJson);
9
+
10
+ tbody.children = bodyRows({ inData, inColumns });
11
+
12
+ return tbody;
13
+ };
14
+
15
+ export default startFunc;
@@ -1,36 +1,36 @@
1
- import bodyCells from "../cells/index.js";
2
- import skeletonJson from './skeleton.json' with { type: 'json' };
3
-
4
- const startFunc = ({
5
- inData,
6
- inColumns
7
- } = {}) => {
8
- const localData = inData ?? [];
9
- const localColumns = inColumns;
10
-
11
- return localData.map(row => {
12
- let cellValues;
13
-
14
- if (Array.isArray(row)) {
15
- cellValues = row;
16
- } else if (typeof row === "object" && row !== null) {
17
- if (Array.isArray(localColumns) && localColumns.length > 0) {
18
- cellValues = localColumns.map(col => {
19
- const key = typeof col === "object" ? (col.key || col.dataKey || col.title || col.name) : col;
20
- return row[key] ?? "";
21
- });
22
- } else {
23
- cellValues = Object.values(row);
24
- }
25
- } else {
26
- cellValues = [row];
27
- }
28
-
29
- const tr = structuredClone(skeletonJson);
30
- tr.children = bodyCells({ inData: cellValues });
31
-
32
- return tr;
33
- });
34
- };
35
-
36
- export default startFunc;
1
+ import bodyCells from "../cells/index.js";
2
+ import skeletonJson from './skeleton.json' with { type: 'json' };
3
+
4
+ const startFunc = ({
5
+ inData,
6
+ inColumns
7
+ } = {}) => {
8
+ const localData = inData ?? [];
9
+ const localColumns = inColumns;
10
+
11
+ return localData.map(row => {
12
+ let cellValues;
13
+
14
+ if (Array.isArray(row)) {
15
+ cellValues = row;
16
+ } else if (typeof row === "object" && row !== null) {
17
+ if (Array.isArray(localColumns) && localColumns.length > 0) {
18
+ cellValues = localColumns.map(col => {
19
+ const key = typeof col === "object" ? (col.key || col.dataKey || col.title || col.name) : col;
20
+ return row[key] ?? "";
21
+ });
22
+ } else {
23
+ cellValues = Object.values(row);
24
+ }
25
+ } else {
26
+ cellValues = [row];
27
+ }
28
+
29
+ const tr = structuredClone(skeletonJson);
30
+ tr.children = bodyCells({ inData: cellValues });
31
+
32
+ return tr;
33
+ });
34
+ };
35
+
36
+ export default startFunc;
@@ -1,4 +1,4 @@
1
- {
2
- "tagName": "tr",
3
- "children": []
4
- }
1
+ {
2
+ "tagName": "tr",
3
+ "children": []
4
+ }
@@ -1,4 +1,4 @@
1
- {
2
- "tagName": "tbody",
3
- "children": []
4
- }
1
+ {
2
+ "tagName": "tbody",
3
+ "children": []
4
+ }
@@ -1,23 +1,23 @@
1
- import jsonTransform from "@keshavsoft/json-transformer";
2
-
3
- import skeletonJson from './skeleton.json' with { type: 'json' };
4
-
5
- const startFunc = ({
6
- inData,
7
- } = {}) => {
8
- const rawData = inData ?? [];
9
- const localData = rawData.map(col => {
10
- if (typeof col === "object" && col !== null) {
11
- return col.title || col.name || col.key || "";
12
- }
13
- return String(col);
14
- });
15
-
16
- const thAsArray = jsonTransform({
17
- children: localData
18
- }, skeletonJson);
19
-
20
- return thAsArray?.children ?? [];
21
- };
22
-
23
- export default startFunc;
1
+ import jsonTransform from "@keshavsoft/json-transformer";
2
+
3
+ import skeletonJson from './skeleton.json' with { type: 'json' };
4
+
5
+ const startFunc = ({
6
+ inData,
7
+ } = {}) => {
8
+ const rawData = inData ?? [];
9
+ const localData = rawData.map(col => {
10
+ if (typeof col === "object" && col !== null) {
11
+ return col.title || col.name || col.key || "";
12
+ }
13
+ return String(col);
14
+ });
15
+
16
+ const thAsArray = jsonTransform({
17
+ children: localData
18
+ }, skeletonJson);
19
+
20
+ return thAsArray?.children ?? [];
21
+ };
22
+
23
+ export default startFunc;
@@ -1,17 +1,17 @@
1
- {
2
- "transform": {
3
- "children": ""
4
- },
5
- "operation": {
6
- "children": {
7
- "operationType": "loopArray",
8
- "template": {
9
- "tagName": "th",
10
- "attributes": {
11
- "value": "${}"
12
- },
13
- "textContent": "${}"
14
- }
15
- }
16
- }
17
- }
1
+ {
2
+ "transform": {
3
+ "children": ""
4
+ },
5
+ "operation": {
6
+ "children": {
7
+ "operationType": "loopArray",
8
+ "template": {
9
+ "tagName": "th",
10
+ "attributes": {
11
+ "value": "${}"
12
+ },
13
+ "textContent": "${}"
14
+ }
15
+ }
16
+ }
17
+ }
@@ -1,15 +1,15 @@
1
- import headRow from "./row/index.js";
2
- import skeletonJson from './skeleton.json' with { type: 'json' };
3
-
4
- const startFunc = ({
5
- inData,
6
- } = {}) => {
7
- const localData = inData ?? [];
8
- const thead = structuredClone(skeletonJson);
9
-
10
- thead.children = [headRow({ inData: localData })];
11
-
12
- return thead;
13
- };
14
-
15
- export default startFunc;
1
+ import headRow from "./row/index.js";
2
+ import skeletonJson from './skeleton.json' with { type: 'json' };
3
+
4
+ const startFunc = ({
5
+ inData,
6
+ } = {}) => {
7
+ const localData = inData ?? [];
8
+ const thead = structuredClone(skeletonJson);
9
+
10
+ thead.children = [headRow({ inData: localData })];
11
+
12
+ return thead;
13
+ };
14
+
15
+ export default startFunc;
@@ -1,15 +1,15 @@
1
- import headCells from "../cells/index.js";
2
- import skeletonJson from './skeleton.json' with { type: 'json' };
3
-
4
- const startFunc = ({
5
- inData,
6
- } = {}) => {
7
- const localData = inData ?? [];
8
- const row = structuredClone(skeletonJson);
9
-
10
- row.children = headCells({ inData: localData });
11
-
12
- return row;
13
- };
14
-
15
- export default startFunc;
1
+ import headCells from "../cells/index.js";
2
+ import skeletonJson from './skeleton.json' with { type: 'json' };
3
+
4
+ const startFunc = ({
5
+ inData,
6
+ } = {}) => {
7
+ const localData = inData ?? [];
8
+ const row = structuredClone(skeletonJson);
9
+
10
+ row.children = headCells({ inData: localData });
11
+
12
+ return row;
13
+ };
14
+
15
+ export default startFunc;
@@ -1,4 +1,4 @@
1
- {
2
- "tagName": "tr",
3
- "children": []
4
- }
1
+ {
2
+ "tagName": "tr",
3
+ "children": []
4
+ }
@@ -1,4 +1,4 @@
1
- {
2
- "tagName": "thead",
3
- "children": []
4
- }
1
+ {
2
+ "tagName": "thead",
3
+ "children": []
4
+ }
@@ -1,26 +1,26 @@
1
- import renderTableHead from "./head/index.js";
2
- import renderTableBody from "./body/index.js";
3
- import skeletonJson from './skeleton.json' with { type: 'json' };
4
-
5
- const startFunc = ({
6
- inColumns,
7
- inData
8
- } = {}) => {
9
- const localColumns = inColumns ?? [];
10
- const localData = inData ?? [];
11
-
12
- const table = structuredClone(skeletonJson);
13
-
14
- table.children = [
15
- renderTableHead({ inData: localColumns }),
16
- renderTableBody({ inData: localData, inColumns: localColumns })
17
- ];
18
-
19
- return table;
20
- };
21
-
22
- export {
23
- renderTableHead,
24
- renderTableBody
25
- };
26
- export default startFunc;
1
+ import renderTableHead from "./head/index.js";
2
+ import renderTableBody from "./body/index.js";
3
+ import skeletonJson from './skeleton.json' with { type: 'json' };
4
+
5
+ const startFunc = ({
6
+ inColumns,
7
+ inData
8
+ } = {}) => {
9
+ const localColumns = inColumns ?? [];
10
+ const localData = inData ?? [];
11
+
12
+ const table = structuredClone(skeletonJson);
13
+
14
+ table.children = [
15
+ renderTableHead({ inData: localColumns }),
16
+ renderTableBody({ inData: localData, inColumns: localColumns })
17
+ ];
18
+
19
+ return table;
20
+ };
21
+
22
+ export {
23
+ renderTableHead,
24
+ renderTableBody
25
+ };
26
+ export default startFunc;
@@ -1,7 +1,7 @@
1
- {
2
- "tagName": "table",
3
- "attributes": {
4
- "class": "table table-hover table-striped mb-0"
5
- },
6
- "children": []
1
+ {
2
+ "tagName": "table",
3
+ "attributes": {
4
+ "class": "table table-hover table-striped mb-0"
5
+ },
6
+ "children": []
7
7
  }
@@ -0,0 +1,20 @@
1
+ const deriveColumnsFromData = ({ inData = [] } = {}) => {
2
+ const localData = inData;
3
+
4
+ if (!Array.isArray(localData) || localData.length === 0) {
5
+ return [];
6
+ }
7
+
8
+ const firstRow = localData[0];
9
+ if (!firstRow || typeof firstRow !== "object") {
10
+ return [];
11
+ }
12
+
13
+ return Object.keys(firstRow).map(key => ({
14
+ key,
15
+ label: key
16
+ }));
17
+ };
18
+
19
+ export { deriveColumnsFromData };
20
+ export default deriveColumnsFromData;
@@ -0,0 +1,40 @@
1
+ import registerGlobal from "./registerGlobal.js";
2
+
3
+ import renderTable, { renderTableHead, renderTableBody } from "./table/index.js";
4
+ import renderSelect, { renderSelectOptions } from "./select/index.js";
5
+
6
+ const RENDERER_MAP = {
7
+ table: renderTable,
8
+ select: renderSelect,
9
+ selectOptionsOnly: renderSelectOptions,
10
+ tableHead: renderTableHead,
11
+ tableBody: renderTableBody
12
+ };
13
+
14
+ const render = ({
15
+ type = "table",
16
+ data,
17
+ columns
18
+ }) => {
19
+ const rawType = type;
20
+ const renderer = RENDERER_MAP[rawType];
21
+
22
+ const localData = data;
23
+ const localColumns = columns;
24
+
25
+ return renderer({
26
+ inColumns: localColumns,
27
+ inData: localData
28
+ });
29
+ };
30
+
31
+ registerGlobal(render);
32
+
33
+ export {
34
+ renderTable,
35
+ renderTableHead,
36
+ renderTableBody,
37
+ renderSelect,
38
+ renderSelectOptions
39
+ };
40
+ export default render;
package/src/v8/meta.js ADDED
@@ -0,0 +1,6 @@
1
+ export const meta = {
2
+ version: "v8.0.0",
3
+ description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
4
+ };
5
+
6
+ export default meta;
@@ -0,0 +1,14 @@
1
+ import meta from "./meta.js";
2
+
3
+ export const registerGlobal = (inFuncDefinition) => {
4
+ if (typeof globalThis === "undefined" || !inFuncDefinition) return;
5
+
6
+ globalThis.ks ??= {};
7
+
8
+ globalThis.ks.jsonRenderersBuild ??= {
9
+ meta,
10
+ renderToDom: inFuncDefinition
11
+ };
12
+ };
13
+
14
+ export default registerGlobal;
@@ -0,0 +1,21 @@
1
+ import renderSelectOptions from "./options/index.js";
2
+
3
+ import skeletonJson from './skeleton.json' with { type: 'json' };
4
+
5
+ const startFunc = ({
6
+ inData,
7
+ }) => {
8
+ const localData = inData;
9
+
10
+ let localChildren = renderSelectOptions({
11
+ inData: localData
12
+ });
13
+
14
+ const select = structuredClone(skeletonJson);
15
+ select.children = localChildren;
16
+
17
+ return select;
18
+ };
19
+
20
+ export { renderSelectOptions };
21
+ export default startFunc;