json-renderers-build-table 1.26.2 → 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 +5 -4
- package/src/index.js +2 -2
- package/src/{v26 → v29}/actions/index.js +25 -19
- package/src/{v26 → v29}/actions/insertOptions/index.js +47 -47
- package/src/{v24 → v29}/actions/insertOptions/instructions/footer.json +22 -22
- package/src/{v26 → v29}/actions/insertOptions/instructions/single.json +62 -62
- package/src/v29/actions/insertSearch/index.js +7 -0
- package/src/v29/actions/insertSearch/instructions/template.json +20 -0
- package/src/{v26 → v29}/actions/insertSerial/index.js +47 -47
- package/src/{v26 → v29}/actions/insertSerial/instructions/footer.json +22 -22
- package/src/{v24 → v29}/actions/insertSerial/instructions/single.json +62 -62
- package/src/v29/builders/simple/index.js +45 -0
- package/src/{v26/builders/simple → v29/builders/simpleSearch}/index.js +40 -40
- package/src/{v25 → v29}/builders/withFooter/index.js +40 -40
- package/src/{v25 → v29}/index.js +21 -21
- package/src/{v25 → v30}/actions/index.js +25 -19
- package/src/{v24 → v30}/actions/insertOptions/index.js +47 -47
- package/src/{v26 → v30}/actions/insertOptions/instructions/footer.json +22 -22
- package/src/{v25 → v30}/actions/insertOptions/instructions/single.json +62 -62
- package/src/v30/actions/insertSearch/index.js +7 -0
- package/src/v30/actions/insertSearch/instructions/template.json +20 -0
- package/src/{v24 → v30}/actions/insertSerial/index.js +47 -47
- package/src/{v24 → v30}/actions/insertSerial/instructions/footer.json +22 -22
- package/src/{v26 → v30}/actions/insertSerial/instructions/single.json +62 -62
- package/src/v30/builders/simple/index.js +45 -0
- package/src/{v25/builders/simple → v30/builders/simpleSearch}/index.js +40 -40
- package/src/{v26 → v30}/builders/withFooter/index.js +40 -40
- package/src/{v26 → v30}/index.js +21 -21
- package/src/{v24 → v30}/singleInstruction/index.js +5 -5
- 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/index.js +40 -0
- package/src/v31/builders/withFooter/index.js +40 -0
- package/src/{v22 → v31}/index.js +7 -1
- package/src/{v25 → v31}/singleInstruction/index.js +5 -5
- 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/{v24/actions/insertOptions/instructions/single.json → v32/actions/instructionsForOptions.json} +58 -62
- package/src/{v25/actions/insertSerial/instructions/single.json → v32/actions/instructionsForSerial.json} +58 -62
- package/src/v32/builders/simple/index.js +41 -0
- package/src/v32/builders/simple/instructions/single.json +38 -0
- package/src/v32/builders/simpleSearch/index.js +40 -0
- package/src/v32/builders/simpleSearch/instructions/double.json +19 -0
- package/src/v32/builders/simpleSearch/instructions/single.json +38 -0
- package/src/{v23 → v32}/builders/spec.json +4 -0
- package/src/v32/builders/withFooter/index.js +40 -0
- package/src/v32/builders/withFooter/instructions/double.json +19 -0
- package/src/{v23 → v32}/index.js +21 -34
- package/src/{v22 → v32}/singleInstruction/index.js +5 -5
- package/src/v22/builders/simple/index.js +0 -22
- package/src/v22/builders/spec.json +0 -88
- package/src/v22/builders/withFooter/index.js +0 -24
- package/src/v23/builders/simple/index.js +0 -22
- package/src/v23/builders/withFooter/index.js +0 -24
- package/src/v23/builders/withOptions/index.js +0 -51
- package/src/v23/builders/withOptions/instructions/double.json +0 -19
- package/src/v23/builders/withOptions/instructions/postSingle.json +0 -22
- package/src/v23/builders/withOptions/instructions/single.json +0 -78
- package/src/v23/builders/withSerial/index.js +0 -51
- package/src/v23/builders/withSerial/instructions/double.json +0 -19
- package/src/v23/builders/withSerial/instructions/postSingle.json +0 -22
- package/src/v23/builders/withSerial/instructions/single.json +0 -78
- package/src/v23/singleInstruction/index.js +0 -32
- package/src/v24/actions/index.js +0 -5
- package/src/v24/builders/simple/index.js +0 -49
- package/src/v24/builders/withFooter/index.js +0 -49
- package/src/v24/index.js +0 -71
- package/src/v25/actions/insertOptions/index.js +0 -47
- package/src/v25/actions/insertOptions/instructions/footer.json +0 -22
- package/src/v25/actions/insertSerial/index.js +0 -47
- package/src/v25/actions/insertSerial/instructions/footer.json +0 -22
- package/src/v26/builders/bodyOnly/base.json +0 -1
- package/src/v26/builders/bodyOnly/index.js +0 -18
- package/src/v26/builders/bodyOnly/instructions/double.json +0 -18
- package/src/v26/builders/footerOnly/base.json +0 -3
- package/src/v26/builders/footerOnly/index.js +0 -21
- package/src/v26/builders/footerOnly/instructions/single.json +0 -19
- package/src/v26/builders/headerOnly/index.js +0 -18
- package/src/v26/builders/withFooter/base.json +0 -53
- package/src/v26/builders/withFooter/instructions/single.json +0 -56
- package/src/v26/doubleInstruction/index.js +0 -21
- package/src/v26/guards/index.js +0 -10
- package/src/v26/guards/references/func/index.js +0 -8
- package/src/v26/guards/references/index.js +0 -9
- package/src/v26/guards/references/templateKey/index.js +0 -8
- package/src/v26/guards/structure/destinationPath/index.js +0 -8
- package/src/v26/guards/structure/func/index.js +0 -8
- package/src/v26/guards/structure/index.js +0 -15
- package/src/v26/guards/structure/sourcePath/index.js +0 -8
- package/src/v26/guards/structure/templateKey/index.js +0 -9
- package/src/v26/writePath/index.js +0 -62
- /package/src/{v22 → v29}/builders/bodyOnly/base.json +0 -0
- /package/src/{v22 → v29}/builders/bodyOnly/index.js +0 -0
- /package/src/{v22 → v29}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v22 → v29}/builders/footerOnly/base.json +0 -0
- /package/src/{v22 → v29}/builders/footerOnly/index.js +0 -0
- /package/src/{v22 → v29}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v22 → v29}/builders/headerOnly/base.json +0 -0
- /package/src/{v22 → v29}/builders/headerOnly/index.js +0 -0
- /package/src/{v22 → v29}/builders/headerOnly/instructions/single.json +0 -0
- /package/src/{v22 → v29}/builders/simple/base.json +0 -0
- /package/src/{v22 → v29}/builders/simple/instructions/double.json +0 -0
- /package/src/{v22 → v29}/builders/simple/instructions/single.json +0 -0
- /package/src/{v22/builders/withFooter → v29/builders/simpleSearch}/base.json +0 -0
- /package/src/{v22/builders/withFooter → v29/builders/simpleSearch}/instructions/double.json +0 -0
- /package/src/{v23/builders/headerOnly → v29/builders/simpleSearch}/instructions/single.json +0 -0
- /package/src/{v24 → v29}/builders/spec.json +0 -0
- /package/src/{v23/builders/headerOnly → v29/builders/withFooter}/base.json +0 -0
- /package/src/{v23/builders/simple → v29/builders/withFooter}/instructions/double.json +0 -0
- /package/src/{v22 → v29}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v22 → v29}/doubleInstruction/index.js +0 -0
- /package/src/{v22 → v29}/guards/index.js +0 -0
- /package/src/{v22 → v29}/guards/references/func/index.js +0 -0
- /package/src/{v22 → v29}/guards/references/index.js +0 -0
- /package/src/{v22 → v29}/guards/references/templateKey/index.js +0 -0
- /package/src/{v22 → v29}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v22 → v29}/guards/structure/func/index.js +0 -0
- /package/src/{v22 → v29}/guards/structure/index.js +0 -0
- /package/src/{v22 → v29}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v22 → v29}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v26 → v29}/singleInstruction/index.js +0 -0
- /package/src/{v22 → v29}/writePath/index.js +0 -0
- /package/src/{v23 → v30}/builders/bodyOnly/base.json +0 -0
- /package/src/{v23 → v30}/builders/bodyOnly/index.js +0 -0
- /package/src/{v23 → v30}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v23 → v30}/builders/footerOnly/base.json +0 -0
- /package/src/{v23 → v30}/builders/footerOnly/index.js +0 -0
- /package/src/{v23 → v30}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v23/builders/simple → v30/builders/headerOnly}/base.json +0 -0
- /package/src/{v23 → v30}/builders/headerOnly/index.js +0 -0
- /package/src/{v23/builders/simple → v30/builders/headerOnly}/instructions/single.json +0 -0
- /package/src/{v23/builders/withFooter → v30/builders/simple}/base.json +0 -0
- /package/src/{v23/builders/withFooter → v30/builders/simple}/instructions/double.json +0 -0
- /package/src/{v24/builders/headerOnly → v30/builders/simple}/instructions/single.json +0 -0
- /package/src/{v23/builders/withOptions → v30/builders/simpleSearch}/base.json +0 -0
- /package/src/{v24/builders/simple → v30/builders/simpleSearch}/instructions/double.json +0 -0
- /package/src/{v24/builders/simple → v30/builders/simpleSearch}/instructions/single.json +0 -0
- /package/src/{v25 → v30}/builders/spec.json +0 -0
- /package/src/{v23/builders/withSerial → v30/builders/withFooter}/base.json +0 -0
- /package/src/{v24 → v30}/builders/withFooter/instructions/double.json +0 -0
- /package/src/{v23 → v30}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v23 → v30}/doubleInstruction/index.js +0 -0
- /package/src/{v23 → v30}/guards/index.js +0 -0
- /package/src/{v23 → v30}/guards/references/func/index.js +0 -0
- /package/src/{v23 → v30}/guards/references/index.js +0 -0
- /package/src/{v23 → v30}/guards/references/templateKey/index.js +0 -0
- /package/src/{v23 → v30}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v23 → v30}/guards/structure/func/index.js +0 -0
- /package/src/{v23 → v30}/guards/structure/index.js +0 -0
- /package/src/{v23 → v30}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v23 → v30}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v23 → v30}/writePath/index.js +0 -0
- /package/src/{v24 → v31}/builders/bodyOnly/base.json +0 -0
- /package/src/{v24 → v31}/builders/bodyOnly/index.js +0 -0
- /package/src/{v24 → v31}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v24 → v31}/builders/footerOnly/base.json +0 -0
- /package/src/{v24 → v31}/builders/footerOnly/index.js +0 -0
- /package/src/{v24 → v31}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v24 → v31}/builders/headerOnly/base.json +0 -0
- /package/src/{v24 → v31}/builders/headerOnly/index.js +0 -0
- /package/src/{v25 → v31}/builders/headerOnly/instructions/single.json +0 -0
- /package/src/{v24 → v31}/builders/simple/base.json +0 -0
- /package/src/{v25 → v31}/builders/simple/instructions/double.json +0 -0
- /package/src/{v25 → v31}/builders/simple/instructions/single.json +0 -0
- /package/src/{v24/builders/withFooter → v31/builders/simpleSearch}/base.json +0 -0
- /package/src/{v25/builders/withFooter → v31/builders/simpleSearch}/instructions/double.json +0 -0
- /package/src/{v26/builders/headerOnly → v31/builders/simpleSearch}/instructions/single.json +0 -0
- /package/src/{v26 → v31}/builders/spec.json +0 -0
- /package/src/{v25/builders/headerOnly → v31/builders/withFooter}/base.json +0 -0
- /package/src/{v26/builders/simple → v31/builders/withFooter}/instructions/double.json +0 -0
- /package/src/{v24 → v31}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v24 → v31}/doubleInstruction/index.js +0 -0
- /package/src/{v24 → v31}/guards/index.js +0 -0
- /package/src/{v24 → v31}/guards/references/func/index.js +0 -0
- /package/src/{v24 → v31}/guards/references/index.js +0 -0
- /package/src/{v24 → v31}/guards/references/templateKey/index.js +0 -0
- /package/src/{v24 → v31}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v24 → v31}/guards/structure/func/index.js +0 -0
- /package/src/{v24 → v31}/guards/structure/index.js +0 -0
- /package/src/{v24 → v31}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v24 → v31}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v24 → v31}/writePath/index.js +0 -0
- /package/src/{v25 → v32}/builders/bodyOnly/base.json +0 -0
- /package/src/{v25 → v32}/builders/bodyOnly/index.js +0 -0
- /package/src/{v25 → v32}/builders/bodyOnly/instructions/double.json +0 -0
- /package/src/{v25 → v32}/builders/footerOnly/base.json +0 -0
- /package/src/{v25 → v32}/builders/footerOnly/index.js +0 -0
- /package/src/{v25 → v32}/builders/footerOnly/instructions/single.json +0 -0
- /package/src/{v25/builders/simple → v32/builders/headerOnly}/base.json +0 -0
- /package/src/{v25 → v32}/builders/headerOnly/index.js +0 -0
- /package/src/{v26/builders/simple → v32/builders/headerOnly}/instructions/single.json +0 -0
- /package/src/{v25/builders/withFooter → v32/builders/simple}/base.json +0 -0
- /package/src/{v26/builders/withFooter → v32/builders/simple}/instructions/double.json +0 -0
- /package/src/{v26/builders/headerOnly → v32/builders/simpleSearch}/base.json +0 -0
- /package/src/{v26/builders/simple → v32/builders/withFooter}/base.json +0 -0
- /package/src/{v25 → v32}/builders/withFooter/instructions/single.json +0 -0
- /package/src/{v25 → v32}/doubleInstruction/index.js +0 -0
- /package/src/{v25 → v32}/guards/index.js +0 -0
- /package/src/{v25 → v32}/guards/references/func/index.js +0 -0
- /package/src/{v25 → v32}/guards/references/index.js +0 -0
- /package/src/{v25 → v32}/guards/references/templateKey/index.js +0 -0
- /package/src/{v25 → v32}/guards/structure/destinationPath/index.js +0 -0
- /package/src/{v25 → v32}/guards/structure/func/index.js +0 -0
- /package/src/{v25 → v32}/guards/structure/index.js +0 -0
- /package/src/{v25 → v32}/guards/structure/sourcePath/index.js +0 -0
- /package/src/{v25 → v32}/guards/structure/templateKey/index.js +0 -0
- /package/src/{v25 → v32}/writePath/index.js +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Prepend the serial column width to the table colgroup.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"dataRole": "table-colgroup",
|
|
7
|
+
"filePath": [
|
|
8
|
+
"children"
|
|
9
|
+
],
|
|
10
|
+
"action": "unshift"
|
|
11
|
+
},
|
|
12
|
+
"sourcePath": null,
|
|
13
|
+
"templateKey": "colGroupForSerial",
|
|
14
|
+
"func": null
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"narration": "Prepend the serial header cell to the table header row.",
|
|
18
|
+
"destinationPath": {
|
|
19
|
+
"fileName": "base",
|
|
20
|
+
"dataRole": "table-header-row",
|
|
21
|
+
"filePath": [
|
|
22
|
+
"children"
|
|
23
|
+
],
|
|
24
|
+
"action": "unshift"
|
|
25
|
+
},
|
|
26
|
+
"sourcePath": null,
|
|
27
|
+
"templateKey": "headerSerialCell",
|
|
28
|
+
"func": null
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"narration": "Prepend the serial number cell into each table body row.",
|
|
32
|
+
"destinationPath": {
|
|
33
|
+
"fileName": "base",
|
|
34
|
+
"dataRole": "table-body",
|
|
35
|
+
"filePath": [
|
|
36
|
+
"children"
|
|
37
|
+
],
|
|
38
|
+
"action": "unshiftSerialToRows"
|
|
39
|
+
},
|
|
40
|
+
"sourcePath": null,
|
|
41
|
+
"templateKey": "buildBodyCell",
|
|
42
|
+
"func": null
|
|
43
|
+
}
|
|
44
|
+
]
|
|
@@ -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,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.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
|
+
};
|
|
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,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;
|
package/src/{v22 → v31}/index.js
RENAMED
|
@@ -4,7 +4,13 @@ import bodyOnly from "./builders/bodyOnly/index.js";
|
|
|
4
4
|
import withFooter from "./builders/withFooter/index.js";
|
|
5
5
|
import footerOnly from "./builders/footerOnly/index.js";
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export {
|
|
8
|
+
simple,
|
|
9
|
+
headerOnly,
|
|
10
|
+
bodyOnly,
|
|
11
|
+
withFooter,
|
|
12
|
+
footerOnly
|
|
13
|
+
};
|
|
8
14
|
|
|
9
15
|
export default {
|
|
10
16
|
simple,
|
|
@@ -5,19 +5,19 @@ import checkInstruction from "../guards/index.js";
|
|
|
5
5
|
const runSingleInstruction = (instruction, registry, functions, spec, showLog, returnLog) => {
|
|
6
6
|
if (!checkInstruction(instruction, functions, spec, showLog, returnLog)) return;
|
|
7
7
|
|
|
8
|
+
const localShowLog = showLog;
|
|
8
9
|
const localSpec = spec;
|
|
9
10
|
const templateKey = instruction.templateKey;
|
|
10
11
|
const localSpecKey = localSpec[templateKey];
|
|
11
12
|
|
|
12
|
-
console.log("
|
|
13
|
-
console.log("localSpecKey ; ", localSpecKey);
|
|
13
|
+
if (localShowLog) console.log("singleInstruction ; ", templateKey, localSpecKey);
|
|
14
14
|
|
|
15
15
|
const source = resolvePath(registry, instruction.sourcePath);
|
|
16
16
|
const result = functions[instruction.func](source, localSpecKey);
|
|
17
17
|
|
|
18
|
-
if (templateKey === "buildFooter") {
|
|
19
|
-
|
|
20
|
-
};
|
|
18
|
+
// if (templateKey === "buildFooter") {
|
|
19
|
+
// console.log("result ; ", result);
|
|
20
|
+
// };
|
|
21
21
|
|
|
22
22
|
writePath(registry, instruction.destinationPath, result);
|
|
23
23
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { runSingleInstructions } from "json-instructions";
|
|
2
|
+
|
|
3
|
+
import insertSearch from "./insertSearch/index.js";
|
|
4
|
+
|
|
5
|
+
import serialInstructions from "./instructionsForSerial.json" with { type: "json" };
|
|
6
|
+
import optionInstructions from "./instructionsForOptions.json" with { type: "json" };
|
|
7
|
+
|
|
8
|
+
const startFunc = ({ inOptions = {}, inBase, showLog = false, returnLog = [] }) => {
|
|
9
|
+
const localOptions = inOptions;
|
|
10
|
+
|
|
11
|
+
const localBase = inBase;
|
|
12
|
+
|
|
13
|
+
if (localOptions.showSerial || localOptions.serial) {
|
|
14
|
+
runSingleInstructions(serialInstructions, { base: localBase }, showLog, returnLog);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
if (localOptions.showOptions || localOptions.options) {
|
|
18
|
+
runSingleInstructions(optionInstructions, { base: localBase }, showLog, returnLog);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
if (localOptions.showSearch) {
|
|
22
|
+
insertSearch();
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return localBase;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default startFunc;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tagName": "div",
|
|
3
|
+
"children": [
|
|
4
|
+
{
|
|
5
|
+
"tagName": "label",
|
|
6
|
+
"textContent": "KeshavSoft"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"tagName": "input",
|
|
10
|
+
"attributes": {
|
|
11
|
+
"value": "KeshavSoft",
|
|
12
|
+
"placeholder": "KeshavSoft"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"tagName": "button",
|
|
17
|
+
"textContent": "show"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -1,62 +1,58 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"narration": "Append the options column width to the table colgroup.",
|
|
4
|
-
"destinationPath": {
|
|
5
|
-
"fileName": "base",
|
|
6
|
-
"dataRole": "table-colgroup",
|
|
7
|
-
"filePath": [
|
|
8
|
-
"children"
|
|
9
|
-
],
|
|
10
|
-
"action": "push"
|
|
11
|
-
},
|
|
12
|
-
"sourcePath":
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"fileName": "
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"templateKey": "optionsButtonCell",
|
|
60
|
-
"func": "applyTemplate"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Append the options column width to the table colgroup.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"dataRole": "table-colgroup",
|
|
7
|
+
"filePath": [
|
|
8
|
+
"children"
|
|
9
|
+
],
|
|
10
|
+
"action": "push"
|
|
11
|
+
},
|
|
12
|
+
"sourcePath": null,
|
|
13
|
+
"templateKey": "colGroupForOption",
|
|
14
|
+
"func": null
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"narration": "Append the options header cell to the table header row.",
|
|
18
|
+
"destinationPath": {
|
|
19
|
+
"fileName": "base",
|
|
20
|
+
"dataRole": "table-header-row",
|
|
21
|
+
"filePath": [
|
|
22
|
+
"children"
|
|
23
|
+
],
|
|
24
|
+
"action": "push"
|
|
25
|
+
},
|
|
26
|
+
"sourcePath": null,
|
|
27
|
+
"templateKey": "headerForOption",
|
|
28
|
+
"func": null
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"narration": "Append the options button cell into each table body row.",
|
|
32
|
+
"destinationPath": {
|
|
33
|
+
"fileName": "base",
|
|
34
|
+
"dataRole": "table-body",
|
|
35
|
+
"filePath": [
|
|
36
|
+
"children"
|
|
37
|
+
],
|
|
38
|
+
"action": "pushToRows"
|
|
39
|
+
},
|
|
40
|
+
"sourcePath": null,
|
|
41
|
+
"templateKey": "optionsButtonCell",
|
|
42
|
+
"func": null
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"narration": "Append the options footer cell to the table footer row.",
|
|
46
|
+
"destinationPath": {
|
|
47
|
+
"fileName": "base",
|
|
48
|
+
"dataRole": "table-footer-row",
|
|
49
|
+
"filePath": [
|
|
50
|
+
"children"
|
|
51
|
+
],
|
|
52
|
+
"action": "push"
|
|
53
|
+
},
|
|
54
|
+
"sourcePath": null,
|
|
55
|
+
"templateKey": "optionsButtonCell",
|
|
56
|
+
"func": null
|
|
57
|
+
}
|
|
58
|
+
]
|
|
@@ -1,62 +1,58 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"narration": "Prepend the serial column width to the table colgroup.",
|
|
4
|
-
"destinationPath": {
|
|
5
|
-
"fileName": "base",
|
|
6
|
-
"dataRole": "table-colgroup",
|
|
7
|
-
"filePath": [
|
|
8
|
-
"children"
|
|
9
|
-
],
|
|
10
|
-
"action": "unshift"
|
|
11
|
-
},
|
|
12
|
-
"sourcePath":
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"fileName": "
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"templateKey": "buildBodyCell",
|
|
60
|
-
"func": "applyTemplate"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"narration": "Prepend the serial column width to the table colgroup.",
|
|
4
|
+
"destinationPath": {
|
|
5
|
+
"fileName": "base",
|
|
6
|
+
"dataRole": "table-colgroup",
|
|
7
|
+
"filePath": [
|
|
8
|
+
"children"
|
|
9
|
+
],
|
|
10
|
+
"action": "unshift"
|
|
11
|
+
},
|
|
12
|
+
"sourcePath": null,
|
|
13
|
+
"templateKey": "colGroupForSerial",
|
|
14
|
+
"func": null
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"narration": "Prepend the serial header cell to the table header row.",
|
|
18
|
+
"destinationPath": {
|
|
19
|
+
"fileName": "base",
|
|
20
|
+
"dataRole": "table-header-row",
|
|
21
|
+
"filePath": [
|
|
22
|
+
"children"
|
|
23
|
+
],
|
|
24
|
+
"action": "unshift"
|
|
25
|
+
},
|
|
26
|
+
"sourcePath": null,
|
|
27
|
+
"templateKey": "headerSerialCell",
|
|
28
|
+
"func": null
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"narration": "Prepend the serial number cell into each table body row.",
|
|
32
|
+
"destinationPath": {
|
|
33
|
+
"fileName": "base",
|
|
34
|
+
"dataRole": "table-body",
|
|
35
|
+
"filePath": [
|
|
36
|
+
"children"
|
|
37
|
+
],
|
|
38
|
+
"action": "unshiftSerialToRows"
|
|
39
|
+
},
|
|
40
|
+
"sourcePath": null,
|
|
41
|
+
"templateKey": "buildBodyCell",
|
|
42
|
+
"func": null
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"narration": "Prepend the serial footer cell to the table footer row.",
|
|
46
|
+
"destinationPath": {
|
|
47
|
+
"fileName": "base",
|
|
48
|
+
"dataRole": "table-footer-row",
|
|
49
|
+
"filePath": [
|
|
50
|
+
"children"
|
|
51
|
+
],
|
|
52
|
+
"action": "unshift"
|
|
53
|
+
},
|
|
54
|
+
"sourcePath": null,
|
|
55
|
+
"templateKey": "headerSerialCell",
|
|
56
|
+
"func": null
|
|
57
|
+
}
|
|
58
|
+
]
|
|
@@ -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,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,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.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
|
+
};
|
|
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
|
+
]
|