json-renderers-build-table 1.28.1 → 1.32.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.
- package/package.json +2 -1
- package/src/index.js +2 -2
- package/src/{v28 → v29}/actions/index.js +1 -0
- package/src/v29/builders/simple/index.js +45 -0
- package/src/{v27 → v30}/actions/index.js +1 -0
- package/src/v30/builders/simple/index.js +45 -0
- package/src/v31/actions/index.js +30 -0
- package/src/v31/actions/insertSearch/index.js +7 -0
- package/src/v31/actions/insertSearch/instructions/template.json +20 -0
- package/src/v31/actions/instructionsForOptions.json +44 -0
- package/src/v31/actions/instructionsForSerial.json +44 -0
- package/src/v31/builders/simple/index.js +41 -0
- package/src/v31/builders/simpleSearch/instructions/single.json +38 -0
- package/src/v31/builders/withFooter/base.json +53 -0
- package/src/v31/builders/withFooter/instructions/double.json +19 -0
- package/src/v32/actions/index.js +28 -0
- package/src/v32/actions/insertSearch/index.js +7 -0
- package/src/v32/actions/insertSearch/instructions/template.json +20 -0
- package/src/{v28/actions/insertOptions/instructions/single.json → v32/actions/instructionsForOptions.json} +21 -25
- package/src/{v28/actions/insertSerial/instructions/single.json → v32/actions/instructionsForSerial.json} +22 -26
- package/src/v32/builders/bodyOnly/base.json +1 -0
- package/src/v32/builders/bodyOnly/index.js +18 -0
- package/src/v32/builders/bodyOnly/instructions/double.json +18 -0
- package/src/v32/builders/footerOnly/base.json +3 -0
- package/src/v32/builders/footerOnly/index.js +21 -0
- package/src/v32/builders/footerOnly/instructions/single.json +19 -0
- package/src/v32/builders/headerOnly/base.json +53 -0
- package/src/v32/builders/headerOnly/index.js +18 -0
- package/src/v32/builders/headerOnly/instructions/single.json +38 -0
- package/src/v32/builders/simple/base.json +53 -0
- package/src/v32/builders/simple/index.js +41 -0
- package/src/v32/builders/simple/instructions/double.json +19 -0
- package/src/v32/builders/simple/instructions/single.json +38 -0
- package/src/v32/builders/simpleSearch/base.json +53 -0
- package/src/v32/builders/simpleSearch/instructions/double.json +19 -0
- package/src/v32/builders/simpleSearch/instructions/single.json +38 -0
- package/src/v32/builders/spec.json +107 -0
- package/src/v32/builders/withFooter/base.json +53 -0
- package/src/v32/builders/withFooter/index.js +40 -0
- package/src/v32/builders/withFooter/instructions/double.json +19 -0
- package/src/v32/builders/withFooter/instructions/single.json +56 -0
- package/src/v32/doubleInstruction/index.js +21 -0
- package/src/v32/guards/index.js +10 -0
- package/src/v32/guards/references/func/index.js +8 -0
- package/src/v32/guards/references/index.js +9 -0
- package/src/v32/guards/references/templateKey/index.js +8 -0
- package/src/v32/guards/structure/destinationPath/index.js +8 -0
- package/src/v32/guards/structure/func/index.js +8 -0
- package/src/v32/guards/structure/index.js +15 -0
- package/src/v32/guards/structure/sourcePath/index.js +8 -0
- package/src/v32/guards/structure/templateKey/index.js +9 -0
- package/src/v32/index.js +21 -0
- package/src/v32/singleInstruction/index.js +32 -0
- package/src/v32/writePath/index.js +62 -0
- package/src/v26/actions/index.js +0 -20
- package/src/v28/actions/insertOptions/index.js +0 -47
- package/src/v28/actions/insertOptions/instructions/footer.json +0 -22
- package/src/v28/actions/insertSerial/index.js +0 -47
- package/src/v28/actions/insertSerial/instructions/footer.json +0 -22
- package/src/v28/builders/simpleSearch/index.js +0 -40
- /package/src/{v26 → v29}/actions/insertOptions/index.js +0 -0
- /package/src/{v26 → v29}/actions/insertOptions/instructions/footer.json +0 -0
- /package/src/{v26 → v29}/actions/insertOptions/instructions/single.json +0 -0
- /package/src/{v27 → v29}/actions/insertSearch/index.js +0 -0
- /package/src/{v27 → v29}/actions/insertSearch/instructions/template.json +0 -0
- /package/src/{v26 → v29}/actions/insertSerial/index.js +0 -0
- /package/src/{v26 → v29}/actions/insertSerial/instructions/footer.json +0 -0
- /package/src/{v26 → v29}/actions/insertSerial/instructions/single.json +0 -0
- /package/src/{v26 → v29}/builders/bodyOnly/base.json +0 -0
- /package/src/{v26 → v29}/builders/bodyOnly/index.js +0 -0
- /package/src/{v26 → v29}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v26 → v29}/builders/footerOnly/base.json +0 -0
- /package/src/{v26 → v29}/builders/footerOnly/index.js +0 -0
- /package/src/{v26 → v29}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v26 → v29}/builders/headerOnly/base.json +0 -0
- /package/src/{v26 → v29}/builders/headerOnly/index.js +0 -0
- /package/src/{v26 → v29}/builders/headerOnly/instructions/single.json +0 -0
- /package/src/{v26 → v29}/builders/simple/base.json +0 -0
- /package/src/{v26 → v29}/builders/simple/instructions/double.json +0 -0
- /package/src/{v26 → v29}/builders/simple/instructions/single.json +0 -0
- /package/src/{v26/builders/withFooter → v29/builders/simpleSearch}/base.json +0 -0
- /package/src/{v26/builders/simple → v29/builders/simpleSearch}/index.js +0 -0
- /package/src/{v26/builders/withFooter → v29/builders/simpleSearch}/instructions/double.json +0 -0
- /package/src/{v27/builders/headerOnly → v29/builders/simpleSearch}/instructions/single.json +0 -0
- /package/src/{v26 → v29}/builders/spec.json +0 -0
- /package/src/{v27/builders/headerOnly → v29/builders/withFooter}/base.json +0 -0
- /package/src/{v26 → v29}/builders/withFooter/index.js +0 -0
- /package/src/{v27/builders/simple → v29/builders/withFooter}/instructions/double.json +0 -0
- /package/src/{v26 → v29}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v26 → v29}/doubleInstruction/index.js +0 -0
- /package/src/{v26 → v29}/guards/index.js +0 -0
- /package/src/{v26 → v29}/guards/references/func/index.js +0 -0
- /package/src/{v26 → v29}/guards/references/index.js +0 -0
- /package/src/{v26 → v29}/guards/references/templateKey/index.js +0 -0
- /package/src/{v26 → v29}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v26 → v29}/guards/structure/func/index.js +0 -0
- /package/src/{v26 → v29}/guards/structure/index.js +0 -0
- /package/src/{v26 → v29}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v26 → v29}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v26 → v29}/index.js +0 -0
- /package/src/{v26 → v29}/singleInstruction/index.js +0 -0
- /package/src/{v26 → v29}/writePath/index.js +0 -0
- /package/src/{v27 → v30}/actions/insertOptions/index.js +0 -0
- /package/src/{v27 → v30}/actions/insertOptions/instructions/footer.json +0 -0
- /package/src/{v27 → v30}/actions/insertOptions/instructions/single.json +0 -0
- /package/src/{v28 → v30}/actions/insertSearch/index.js +0 -0
- /package/src/{v28 → v30}/actions/insertSearch/instructions/template.json +0 -0
- /package/src/{v27 → v30}/actions/insertSerial/index.js +0 -0
- /package/src/{v27 → v30}/actions/insertSerial/instructions/footer.json +0 -0
- /package/src/{v27 → v30}/actions/insertSerial/instructions/single.json +0 -0
- /package/src/{v27 → v30}/builders/bodyOnly/base.json +0 -0
- /package/src/{v27 → v30}/builders/bodyOnly/index.js +0 -0
- /package/src/{v27 → v30}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v27 → v30}/builders/footerOnly/base.json +0 -0
- /package/src/{v27 → v30}/builders/footerOnly/index.js +0 -0
- /package/src/{v27 → v30}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v27/builders/simple → v30/builders/headerOnly}/base.json +0 -0
- /package/src/{v27 → v30}/builders/headerOnly/index.js +0 -0
- /package/src/{v27/builders/simple → v30/builders/headerOnly}/instructions/single.json +0 -0
- /package/src/{v27/builders/simpleSearch → v30/builders/simple}/base.json +0 -0
- /package/src/{v27/builders/simpleSearch → v30/builders/simple}/instructions/double.json +0 -0
- /package/src/{v27/builders/simpleSearch → v30/builders/simple}/instructions/single.json +0 -0
- /package/src/{v27/builders/withFooter → v30/builders/simpleSearch}/base.json +0 -0
- /package/src/{v27/builders/simple → v30/builders/simpleSearch}/index.js +0 -0
- /package/src/{v27/builders/withFooter → v30/builders/simpleSearch}/instructions/double.json +0 -0
- /package/src/{v28/builders/headerOnly → v30/builders/simpleSearch}/instructions/single.json +0 -0
- /package/src/{v27 → v30}/builders/spec.json +0 -0
- /package/src/{v28/builders/headerOnly → v30/builders/withFooter}/base.json +0 -0
- /package/src/{v27 → v30}/builders/withFooter/index.js +0 -0
- /package/src/{v28/builders/simple → v30/builders/withFooter}/instructions/double.json +0 -0
- /package/src/{v27 → v30}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v27 → v30}/doubleInstruction/index.js +0 -0
- /package/src/{v27 → v30}/guards/index.js +0 -0
- /package/src/{v27 → v30}/guards/references/func/index.js +0 -0
- /package/src/{v27 → v30}/guards/references/index.js +0 -0
- /package/src/{v27 → v30}/guards/references/templateKey/index.js +0 -0
- /package/src/{v27 → v30}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v27 → v30}/guards/structure/func/index.js +0 -0
- /package/src/{v27 → v30}/guards/structure/index.js +0 -0
- /package/src/{v27 → v30}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v27 → v30}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v27 → v30}/index.js +0 -0
- /package/src/{v27 → v30}/singleInstruction/index.js +0 -0
- /package/src/{v27 → v30}/writePath/index.js +0 -0
- /package/src/{v28 → v31}/builders/bodyOnly/base.json +0 -0
- /package/src/{v28 → v31}/builders/bodyOnly/index.js +0 -0
- /package/src/{v28 → v31}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v28 → v31}/builders/footerOnly/base.json +0 -0
- /package/src/{v28 → v31}/builders/footerOnly/index.js +0 -0
- /package/src/{v28 → v31}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v28/builders/simple → v31/builders/headerOnly}/base.json +0 -0
- /package/src/{v28 → v31}/builders/headerOnly/index.js +0 -0
- /package/src/{v28/builders/simple → v31/builders/headerOnly}/instructions/single.json +0 -0
- /package/src/{v28/builders/simpleSearch → v31/builders/simple}/base.json +0 -0
- /package/src/{v28/builders/simpleSearch → v31/builders/simple}/instructions/double.json +0 -0
- /package/src/{v28/builders/simpleSearch → v31/builders/simple}/instructions/single.json +0 -0
- /package/src/{v28/builders/withFooter → v31/builders/simpleSearch}/base.json +0 -0
- /package/src/{v27 → v31}/builders/simpleSearch/index.js +0 -0
- /package/src/{v28/builders/withFooter → v31/builders/simpleSearch}/instructions/double.json +0 -0
- /package/src/{v28 → v31}/builders/spec.json +0 -0
- /package/src/{v28 → v31}/builders/withFooter/index.js +0 -0
- /package/src/{v28 → v31}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v28 → v31}/doubleInstruction/index.js +0 -0
- /package/src/{v28 → v31}/guards/index.js +0 -0
- /package/src/{v28 → v31}/guards/references/func/index.js +0 -0
- /package/src/{v28 → v31}/guards/references/index.js +0 -0
- /package/src/{v28 → v31}/guards/references/templateKey/index.js +0 -0
- /package/src/{v28 → v31}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v28 → v31}/guards/structure/func/index.js +0 -0
- /package/src/{v28 → v31}/guards/structure/index.js +0 -0
- /package/src/{v28 → v31}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v28 → v31}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v28 → v31}/index.js +0 -0
- /package/src/{v28 → v31}/singleInstruction/index.js +0 -0
- /package/src/{v28 → v31}/writePath/index.js +0 -0
- /package/src/{v28/builders/simple → v32/builders/simpleSearch}/index.js +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the table body rows for the table using the configured columns and data.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"filePath": [
|
|
7
|
+
"children"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"sourcePath": {
|
|
11
|
+
"fileName": "data",
|
|
12
|
+
"filePath": [
|
|
13
|
+
"columns"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"func": "twoDimensional"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import fromCollection from "json-transformer-funcs-one-dimension";
|
|
2
|
+
import twoDimensional from "json-transformer-funcs-two-dimensions";
|
|
3
|
+
|
|
4
|
+
import spec from "../spec.json" with { type: "json" };
|
|
5
|
+
import base from "./base.json" with { type: "json" };
|
|
6
|
+
import singleInstructions from "./instructions/single.json" with { type: "json" };
|
|
7
|
+
|
|
8
|
+
import runSingleInstructions from "../../singleInstruction/index.js";
|
|
9
|
+
|
|
10
|
+
const registry = { data: {}, base, spec };
|
|
11
|
+
const functions = { fromCollection, twoDimensional };
|
|
12
|
+
|
|
13
|
+
const startFunc = (data, showLog = false, returnLog = []) => {
|
|
14
|
+
registry.data = data;
|
|
15
|
+
|
|
16
|
+
runSingleInstructions(singleInstructions, registry, functions, spec, showLog, returnLog);
|
|
17
|
+
|
|
18
|
+
return base?.children;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default startFunc;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the footer row for the table using the configured columns.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"filePath": [
|
|
7
|
+
"children"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"sourcePath": {
|
|
11
|
+
"fileName": "data",
|
|
12
|
+
"filePath": [
|
|
13
|
+
"columns"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"templateKey": "buildFooter",
|
|
17
|
+
"func": "fromCollection"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tagName": "table",
|
|
3
|
+
"attributes": {
|
|
4
|
+
"class": "table table-hover table-striped align-middle border mb-0"
|
|
5
|
+
},
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"tagName": "colgroup",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"data-role": "table-colgroup"
|
|
11
|
+
},
|
|
12
|
+
"children": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"tagName": "thead",
|
|
16
|
+
"attributes": {
|
|
17
|
+
"class": "table-dark",
|
|
18
|
+
"data-role": "table-header"
|
|
19
|
+
},
|
|
20
|
+
"children": [
|
|
21
|
+
{
|
|
22
|
+
"tagName": "tr",
|
|
23
|
+
"attributes": {
|
|
24
|
+
"data-role": "table-header-row"
|
|
25
|
+
},
|
|
26
|
+
"children": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"tagName": "tbody",
|
|
32
|
+
"attributes": {
|
|
33
|
+
"data-role": "table-body"
|
|
34
|
+
},
|
|
35
|
+
"children": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"tagName": "tfoot",
|
|
39
|
+
"attributes": {
|
|
40
|
+
"data-role": "table-footer"
|
|
41
|
+
},
|
|
42
|
+
"children": [
|
|
43
|
+
{
|
|
44
|
+
"tagName": "tr",
|
|
45
|
+
"attributes": {
|
|
46
|
+
"data-role": "table-footer-row"
|
|
47
|
+
},
|
|
48
|
+
"children": []
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import fromCollection from "json-transformer-funcs-one-dimension";
|
|
2
|
+
|
|
3
|
+
import spec from "../spec.json" with { type: "json" };
|
|
4
|
+
import base from "./base.json" with { type: "json" };
|
|
5
|
+
import singleInstructions from "./instructions/single.json" with { type: "json" };
|
|
6
|
+
|
|
7
|
+
import runSingleInstructions from "../../singleInstruction/index.js";
|
|
8
|
+
|
|
9
|
+
const registry = { data: {}, base, spec };
|
|
10
|
+
const functions = { fromCollection };
|
|
11
|
+
|
|
12
|
+
const startFunc = (data, showLog = false, returnLog = []) => {
|
|
13
|
+
registry.data = data;
|
|
14
|
+
runSingleInstructions(singleInstructions, registry, functions, spec, showLog, returnLog);
|
|
15
|
+
return base;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default startFunc;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the column widths for the table using the configured columns.",
|
|
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 the header row for the table using the configured columns.",
|
|
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
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tagName": "table",
|
|
3
|
+
"attributes": {
|
|
4
|
+
"class": "table table-hover table-striped align-middle border mb-0"
|
|
5
|
+
},
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"tagName": "colgroup",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"data-role": "table-colgroup"
|
|
11
|
+
},
|
|
12
|
+
"children": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"tagName": "thead",
|
|
16
|
+
"attributes": {
|
|
17
|
+
"class": "table-dark",
|
|
18
|
+
"data-role": "table-header"
|
|
19
|
+
},
|
|
20
|
+
"children": [
|
|
21
|
+
{
|
|
22
|
+
"tagName": "tr",
|
|
23
|
+
"attributes": {
|
|
24
|
+
"data-role": "table-header-row"
|
|
25
|
+
},
|
|
26
|
+
"children": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"tagName": "tbody",
|
|
32
|
+
"attributes": {
|
|
33
|
+
"data-role": "table-body"
|
|
34
|
+
},
|
|
35
|
+
"children": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"tagName": "tfoot",
|
|
39
|
+
"attributes": {
|
|
40
|
+
"data-role": "table-footer"
|
|
41
|
+
},
|
|
42
|
+
"children": [
|
|
43
|
+
{
|
|
44
|
+
"tagName": "tr",
|
|
45
|
+
"attributes": {
|
|
46
|
+
"data-role": "table-footer-row"
|
|
47
|
+
},
|
|
48
|
+
"children": []
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import fromCollection from "json-transformer-funcs-one-dimension";
|
|
2
|
+
import twoDimensional from "json-transformer-funcs-two-dimensions";
|
|
3
|
+
|
|
4
|
+
import spec from "../spec.json" with { type: "json" };
|
|
5
|
+
import base from "./base.json" with { type: "json" };
|
|
6
|
+
import singleInstructions from "./instructions/single.json" with { type: "json" };
|
|
7
|
+
import doubleInstructions from "./instructions/double.json" with { type: "json" };
|
|
8
|
+
|
|
9
|
+
import runSingleInstructions from "../../singleInstruction/index.js";
|
|
10
|
+
import runDoubleInstructions from "../../doubleInstruction/index.js";
|
|
11
|
+
import actions from "../../actions/index.js";
|
|
12
|
+
|
|
13
|
+
const functions = { fromCollection, twoDimensional };
|
|
14
|
+
|
|
15
|
+
const startFunc = (inConfig = {}, showLog = false, returnLog = []) => {
|
|
16
|
+
const localConfig = inConfig;
|
|
17
|
+
|
|
18
|
+
const localColumns = localConfig.columns || [];
|
|
19
|
+
const localData = localConfig.data || [];
|
|
20
|
+
const localOptions = localConfig.options || {};
|
|
21
|
+
|
|
22
|
+
const localBase = structuredClone(base);
|
|
23
|
+
const registry = {
|
|
24
|
+
data: {
|
|
25
|
+
columns: localColumns,
|
|
26
|
+
data: localData
|
|
27
|
+
},
|
|
28
|
+
base: localBase,
|
|
29
|
+
spec,
|
|
30
|
+
...localOptions
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
runSingleInstructions(singleInstructions, registry, functions, spec, showLog, returnLog);
|
|
34
|
+
runDoubleInstructions(doubleInstructions, registry, functions, spec, showLog, returnLog);
|
|
35
|
+
|
|
36
|
+
actions({ inOptions: localOptions, inBase: localBase });
|
|
37
|
+
|
|
38
|
+
return localBase;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default startFunc;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the table body rows for the table using the configured columns and data.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"dataRole": "table-body",
|
|
7
|
+
"filePath": [
|
|
8
|
+
"children"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"sourcePath": {
|
|
12
|
+
"fileName": "data",
|
|
13
|
+
"filePath": [
|
|
14
|
+
"columns"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"func": "twoDimensional"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the column widths for the table using the configured columns.",
|
|
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 the header row for the table using the configured columns.",
|
|
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
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tagName": "table",
|
|
3
|
+
"attributes": {
|
|
4
|
+
"class": "table table-hover table-striped align-middle border mb-0"
|
|
5
|
+
},
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"tagName": "colgroup",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"data-role": "table-colgroup"
|
|
11
|
+
},
|
|
12
|
+
"children": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"tagName": "thead",
|
|
16
|
+
"attributes": {
|
|
17
|
+
"class": "table-dark",
|
|
18
|
+
"data-role": "table-header"
|
|
19
|
+
},
|
|
20
|
+
"children": [
|
|
21
|
+
{
|
|
22
|
+
"tagName": "tr",
|
|
23
|
+
"attributes": {
|
|
24
|
+
"data-role": "table-header-row"
|
|
25
|
+
},
|
|
26
|
+
"children": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"tagName": "tbody",
|
|
32
|
+
"attributes": {
|
|
33
|
+
"data-role": "table-body"
|
|
34
|
+
},
|
|
35
|
+
"children": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"tagName": "tfoot",
|
|
39
|
+
"attributes": {
|
|
40
|
+
"data-role": "table-footer"
|
|
41
|
+
},
|
|
42
|
+
"children": [
|
|
43
|
+
{
|
|
44
|
+
"tagName": "tr",
|
|
45
|
+
"attributes": {
|
|
46
|
+
"data-role": "table-footer-row"
|
|
47
|
+
},
|
|
48
|
+
"children": []
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the table body rows for the table using the configured columns and data.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"dataRole": "table-body",
|
|
7
|
+
"filePath": [
|
|
8
|
+
"children"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"sourcePath": {
|
|
12
|
+
"fileName": "data",
|
|
13
|
+
"filePath": [
|
|
14
|
+
"columns"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"func": "twoDimensional"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the column widths for the table using the configured columns.",
|
|
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 the header row for the table using the configured columns.",
|
|
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
|
+
]
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"buildBodyTr": {
|
|
3
|
+
"tagName": "tr",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"class": "align-middle"
|
|
6
|
+
},
|
|
7
|
+
"children": []
|
|
8
|
+
},
|
|
9
|
+
"buildColGroup": {
|
|
10
|
+
"tagName": "col",
|
|
11
|
+
"attributes": {
|
|
12
|
+
"width": "${width}"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"buildHeader": {
|
|
16
|
+
"tagName": "th",
|
|
17
|
+
"textContent": "${columnName}",
|
|
18
|
+
"attributes": {
|
|
19
|
+
"class": "py-3 px-3 fw-semibold text-uppercase small"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"buildFooter": {
|
|
23
|
+
"tagName": "td",
|
|
24
|
+
"children": [
|
|
25
|
+
{
|
|
26
|
+
"tagName": "input",
|
|
27
|
+
"attributes": {
|
|
28
|
+
"type": "text",
|
|
29
|
+
"placeholder": "enter ${columnName}",
|
|
30
|
+
"name": "${columnName}",
|
|
31
|
+
"id": "${columnName}",
|
|
32
|
+
"list": "${columnName}",
|
|
33
|
+
"class": "form-control"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"buildBodyCell": {
|
|
39
|
+
"tagName": "td",
|
|
40
|
+
"textContent": "${rowValue}",
|
|
41
|
+
"attributes": {
|
|
42
|
+
"class": "py-3 px-3 text-secondary"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"button": {
|
|
46
|
+
"tagName": "button",
|
|
47
|
+
"textContent": "${columnName}",
|
|
48
|
+
"attributes": {
|
|
49
|
+
"class": "btn btn-primary btn-sm"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"buttonCell": {
|
|
53
|
+
"tagName": "td",
|
|
54
|
+
"attributes": {
|
|
55
|
+
"class": "py-2 px-3 text-center"
|
|
56
|
+
},
|
|
57
|
+
"children": [
|
|
58
|
+
{
|
|
59
|
+
"tagName": "button",
|
|
60
|
+
"textContent": "${agg:count}",
|
|
61
|
+
"attributes": {
|
|
62
|
+
"class": "btn btn-primary btn-sm"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"optionsButtonCell": {
|
|
68
|
+
"tagName": "td",
|
|
69
|
+
"attributes": {
|
|
70
|
+
"class": "py-2 px-3 text-center"
|
|
71
|
+
},
|
|
72
|
+
"children": [
|
|
73
|
+
{
|
|
74
|
+
"tagName": "button",
|
|
75
|
+
"textContent": "${columnName}",
|
|
76
|
+
"attributes": {
|
|
77
|
+
"class": "btn btn-primary btn-sm"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"buildOption": {
|
|
83
|
+
"tagName": "option",
|
|
84
|
+
"textContent": "${rowValue}",
|
|
85
|
+
"attributes": {
|
|
86
|
+
"value": "${rowValue}"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"buildSelect": {
|
|
90
|
+
"tagName": "select",
|
|
91
|
+
"attributes": {
|
|
92
|
+
"id": "LedgerName"
|
|
93
|
+
},
|
|
94
|
+
"children": []
|
|
95
|
+
},
|
|
96
|
+
"buildDataList": {
|
|
97
|
+
"tagName": "datalist",
|
|
98
|
+
"attributes": {
|
|
99
|
+
"data-name": "${columnName}"
|
|
100
|
+
},
|
|
101
|
+
"children": []
|
|
102
|
+
},
|
|
103
|
+
"emptyCell": {
|
|
104
|
+
"tagName": "td",
|
|
105
|
+
"children": []
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tagName": "table",
|
|
3
|
+
"attributes": {
|
|
4
|
+
"class": "table table-hover table-striped align-middle border mb-0"
|
|
5
|
+
},
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"tagName": "colgroup",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"data-role": "table-colgroup"
|
|
11
|
+
},
|
|
12
|
+
"children": []
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"tagName": "thead",
|
|
16
|
+
"attributes": {
|
|
17
|
+
"class": "table-dark",
|
|
18
|
+
"data-role": "table-header"
|
|
19
|
+
},
|
|
20
|
+
"children": [
|
|
21
|
+
{
|
|
22
|
+
"tagName": "tr",
|
|
23
|
+
"attributes": {
|
|
24
|
+
"data-role": "table-header-row"
|
|
25
|
+
},
|
|
26
|
+
"children": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"tagName": "tbody",
|
|
32
|
+
"attributes": {
|
|
33
|
+
"data-role": "table-body"
|
|
34
|
+
},
|
|
35
|
+
"children": []
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"tagName": "tfoot",
|
|
39
|
+
"attributes": {
|
|
40
|
+
"data-role": "table-footer"
|
|
41
|
+
},
|
|
42
|
+
"children": [
|
|
43
|
+
{
|
|
44
|
+
"tagName": "tr",
|
|
45
|
+
"attributes": {
|
|
46
|
+
"data-role": "table-footer-row"
|
|
47
|
+
},
|
|
48
|
+
"children": []
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import fromCollection from "json-transformer-funcs-one-dimension";
|
|
2
|
+
import twoDimensional from "json-transformer-funcs-two-dimensions";
|
|
3
|
+
|
|
4
|
+
import spec from "../spec.json" with { type: "json" };
|
|
5
|
+
import base from "./base.json" with { type: "json" };
|
|
6
|
+
import singleInstructions from "./instructions/single.json" with { type: "json" };
|
|
7
|
+
import doubleInstructions from "./instructions/double.json" with { type: "json" };
|
|
8
|
+
|
|
9
|
+
import runSingleInstructions from "../../singleInstruction/index.js";
|
|
10
|
+
import runDoubleInstructions from "../../doubleInstruction/index.js";
|
|
11
|
+
import actions from "../../actions/index.js";
|
|
12
|
+
|
|
13
|
+
const functions = { fromCollection, twoDimensional };
|
|
14
|
+
|
|
15
|
+
const startFunc = (inConfig = {}, showLog = false, returnLog = []) => {
|
|
16
|
+
const localConfig = inConfig
|
|
17
|
+
|
|
18
|
+
const localColumns = localConfig.inColumns || localConfig.columns || [];
|
|
19
|
+
const localData = localConfig.inData || localConfig.data || [];
|
|
20
|
+
const localOptions = localConfig.inOptions || localConfig.options || {};
|
|
21
|
+
|
|
22
|
+
const localBase = structuredClone(base);
|
|
23
|
+
const registry = {
|
|
24
|
+
data: {
|
|
25
|
+
columns: localColumns,
|
|
26
|
+
data: localData
|
|
27
|
+
},
|
|
28
|
+
base: localBase,
|
|
29
|
+
spec
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
runSingleInstructions(singleInstructions, registry, functions, spec, showLog, returnLog);
|
|
33
|
+
runDoubleInstructions(doubleInstructions, registry, functions, spec, showLog, returnLog);
|
|
34
|
+
|
|
35
|
+
actions({ inOptions: localOptions, inBase: localBase });
|
|
36
|
+
|
|
37
|
+
return localBase;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default startFunc;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Build the table body rows for the table using the configured columns and data.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"dataRole": "table-body",
|
|
7
|
+
"filePath": [
|
|
8
|
+
"children"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"sourcePath": {
|
|
12
|
+
"fileName": "data",
|
|
13
|
+
"filePath": [
|
|
14
|
+
"columns"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"func": "twoDimensional"
|
|
18
|
+
}
|
|
19
|
+
]
|