pict-section-form 1.0.162 → 1.0.164
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/debug/BuildHarnessTestApp.sh +1 -1
- package/debug/PICTSection-TabularManifests.json +28 -16
- package/debug/TabularManifestCSV.csv +4 -3
- package/debug/data/DefaultFormManifest.json +28 -16
- package/debug/data/MathExampleForm-Reconstituted.csv +17 -16
- package/debug/data/MathExampleForm.json +28 -16
- package/package.json +2 -2
- package/source/providers/Pict-Provider-DynamicTabularData.js +6 -7
- package/source/providers/dynamictemplates/Pict-DynamicTemplates-DefaultFormTemplates.js +1 -1
- package/source/views/Pict-View-Form-Metacontroller.js +61 -68
- package/test/PictSectionForm-Basic_tests.js +10 -10
- package/types/source/providers/Pict-Provider-DynamicTabularData.d.ts.map +1 -1
- package/types/source/views/Pict-View-Form-Metacontroller.d.ts +3 -1
- package/types/source/views/Pict-View-Form-Metacontroller.d.ts.map +1 -1
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"DataAddress": "BoxDecorationSet",
|
|
312
312
|
"DataType": "Array",
|
|
313
313
|
"FormGroup": "BoxDecorationGroup",
|
|
314
|
-
"FormSection": "
|
|
314
|
+
"FormSection": "BoxDecorations"
|
|
315
315
|
},
|
|
316
316
|
"Boxes[].Floorspace": {
|
|
317
317
|
"Hash": "BoxesFloorspaceSet",
|
|
@@ -809,14 +809,16 @@
|
|
|
809
809
|
},
|
|
810
810
|
{
|
|
811
811
|
"Name": "Box Decoration",
|
|
812
|
-
"Hash": "
|
|
812
|
+
"Hash": "BoxDecorations",
|
|
813
813
|
"Solvers": [],
|
|
814
814
|
"Groups": [
|
|
815
815
|
{
|
|
816
816
|
"Name": "Box Decorations",
|
|
817
817
|
"Hash": "BoxDecorationGroup",
|
|
818
818
|
"Rows": [],
|
|
819
|
-
"RecordSetSolvers": [
|
|
819
|
+
"RecordSetSolvers": [
|
|
820
|
+
"VolumeLessTen = BoxVolume - 10"
|
|
821
|
+
],
|
|
820
822
|
"HideTabularEditingControls": true,
|
|
821
823
|
"ShowTitle": true,
|
|
822
824
|
"Layout": "Tabular",
|
|
@@ -825,23 +827,11 @@
|
|
|
825
827
|
}
|
|
826
828
|
]
|
|
827
829
|
},
|
|
828
|
-
{
|
|
829
|
-
"Name": "Box Decoration",
|
|
830
|
-
"Hash": "BoxDecorations",
|
|
831
|
-
"Solvers": [],
|
|
832
|
-
"Groups": [
|
|
833
|
-
{
|
|
834
|
-
"Name": "Box Decorations",
|
|
835
|
-
"Hash": "BoxDecorationGroup",
|
|
836
|
-
"Rows": [],
|
|
837
|
-
"RecordSetSolvers": []
|
|
838
|
-
}
|
|
839
|
-
]
|
|
840
|
-
},
|
|
841
830
|
{
|
|
842
831
|
"Name": "Box Summary Data",
|
|
843
832
|
"Hash": "Box_Summary_Data",
|
|
844
833
|
"Solvers": [
|
|
834
|
+
"MAP VAR row FROM Boxes: ColorInputBackgroundTabular(\"BoxDecorations\", \"BoxDecorationGroup\", \"VolumeLessTen\", stepIndex, \"#FFCCCC\", 1)",
|
|
845
835
|
"BoxesCount = COUNT(BoxesFloorspaceSet)",
|
|
846
836
|
"BoxesAverageFloorspace = AVG(BoxesFloorspaceSet)",
|
|
847
837
|
"BoxesTotalFloorspace = SUM(BoxesFloorspaceSet)",
|
|
@@ -1140,6 +1130,28 @@
|
|
|
1140
1130
|
},
|
|
1141
1131
|
"IsTabular": true
|
|
1142
1132
|
},
|
|
1133
|
+
"VolumeLessTen": {
|
|
1134
|
+
"Hash": "VolumeLessTen",
|
|
1135
|
+
"Name": "VolumeLessTen",
|
|
1136
|
+
"DataAddress": "VolumeLessTen",
|
|
1137
|
+
"DataType": "PreciseNumber",
|
|
1138
|
+
"PictForm": {
|
|
1139
|
+
"InputType": "DataOnly",
|
|
1140
|
+
"Row": "1",
|
|
1141
|
+
"Width": "1",
|
|
1142
|
+
"Providers": [
|
|
1143
|
+
"Pict-Input-AutofillTriggerGroup"
|
|
1144
|
+
],
|
|
1145
|
+
"AutofillTriggerGroup": {
|
|
1146
|
+
"TriggerGroupHash": "Box",
|
|
1147
|
+
"MarshalEmptyValues": false,
|
|
1148
|
+
"TriggerAllInputs": true
|
|
1149
|
+
},
|
|
1150
|
+
"Section": "BoxDecorations",
|
|
1151
|
+
"Group": "BoxDecorationGroup"
|
|
1152
|
+
},
|
|
1153
|
+
"IsTabular": true
|
|
1154
|
+
},
|
|
1143
1155
|
"DecorativeText": {
|
|
1144
1156
|
"Hash": "DecorativeText",
|
|
1145
1157
|
"Name": "Decorative Text",
|
|
@@ -29,11 +29,12 @@ MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp
|
|
|
29
29
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,,,,1,1,,,Floorspace,Floorspace,BoxFloorspace,,,Number,,,BoxFloorspace = BoxWidth * BoxDepth,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
30
30
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,,,,1,1,,,Volume,Volume,BoxVolume,,,Number,,,BoxVolume = BoxFloorspace * BoxHeight,,,,,,,,,,Box,,true,,,,,,,,,,,,,,,,,,,,,
|
|
31
31
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,,,,1,1,,,WarehouseSpaceLeft,Warehouse Space Left,WarehouseSpaceLeft,,,Number,,,,,,,,,,,,,Box,,true,,,,,,,,,,,,,,,,,,,,,
|
|
32
|
-
MathExampleForm,,BoxCollectionSecondaryTable,1,Boxes,1,Box Decoration,
|
|
32
|
+
MathExampleForm,,BoxCollectionSecondaryTable,1,Boxes,1,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,,,true,1,1,,,BoxDecorationSet,BoxDecorationSet,BoxDecorationSet,,,Array,,TabularAddress,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
33
33
|
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,,,,1,1,,,Identifier,Identifier,BoxIdentifier,,,String,,DataOnly,,,,,,,,,,,Box,,X,,,,,,,,,,,,,,,,,,,,,
|
|
34
|
-
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,,,,1,1,,,Volume,Volume,BoxVolume,,,PreciseNumber,,DataOnly
|
|
34
|
+
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,,,,1,1,,,Volume,Volume,BoxVolume,,,PreciseNumber,,DataOnly,VolumeLessTen = BoxVolume - 10,,,,,,,,,,Box,,X,,,,,,,,,,,,,,,,,,,,,
|
|
35
|
+
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,,,,1,1,,,VolumeLessTen,VolumeLessTen,VolumeLessTen,,,PreciseNumber,,DataOnly,,,,,,,,,,,Box,,X,,,,,,,,,,,,,,,,,,,,,
|
|
35
36
|
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,,,,1,1,,,DecorativeText,Decorative Text,DecorativeText,,,String,,,,,,,,,,,,,Box,,X,,,,,,,,,,,,,,,,,,,,,
|
|
36
|
-
MathExampleForm,,,,,1,Box Summary Data,,Box Summary Data,,,,,1,1,,,Boxes[].Floorspace,BoxesFloorSpaceSet,BoxesFloorspaceSet,,,Object
|
|
37
|
+
MathExampleForm,,,,,1,Box Summary Data,,Box Summary Data,,,,,1,1,,,Boxes[].Floorspace,BoxesFloorSpaceSet,BoxesFloorspaceSet,,,Object,,,"MAP VAR row FROM Boxes: ColorInputBackgroundTabular(""BoxDecorations"", ""BoxDecorationGroup"", ""VolumeLessTen"", stepIndex, ""#FFCCCC"", 1)",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
37
38
|
MathExampleForm,,,,,1,Box Summary Data,,Box Summary Data,,,,,1,1,,,Boxes[].Volume,BoxesVolumeSet,BoxesVolumeSet,,,Object,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
38
39
|
MathExampleForm,,,,,1,Box Summary Data,,Box Summary Data,,,,,1,1,,,Boxes[].Depth,BoxesDepthSet,BoxesDepthSet,,,Object,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
39
40
|
MathExampleForm,,,,,,Box Summary Data,,Box Summary Data,,,,,1,12,,,BoxAggregate.Count,Box Count,BoxesCount,,,Number,,,BoxesCount = COUNT(BoxesFloorspaceSet),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"DataAddress": "BoxDecorationSet",
|
|
312
312
|
"DataType": "Array",
|
|
313
313
|
"FormGroup": "BoxDecorationGroup",
|
|
314
|
-
"FormSection": "
|
|
314
|
+
"FormSection": "BoxDecorations"
|
|
315
315
|
},
|
|
316
316
|
"Boxes[].Floorspace": {
|
|
317
317
|
"Hash": "BoxesFloorspaceSet",
|
|
@@ -958,14 +958,16 @@
|
|
|
958
958
|
},
|
|
959
959
|
{
|
|
960
960
|
"Name": "Box Decoration",
|
|
961
|
-
"Hash": "
|
|
961
|
+
"Hash": "BoxDecorations",
|
|
962
962
|
"Solvers": [],
|
|
963
963
|
"Groups": [
|
|
964
964
|
{
|
|
965
965
|
"Name": "Box Decorations",
|
|
966
966
|
"Hash": "BoxDecorationGroup",
|
|
967
967
|
"Rows": [],
|
|
968
|
-
"RecordSetSolvers": [
|
|
968
|
+
"RecordSetSolvers": [
|
|
969
|
+
"VolumeLessTen = BoxVolume - 10"
|
|
970
|
+
],
|
|
969
971
|
"HideTabularEditingControls": true,
|
|
970
972
|
"ShowTitle": true,
|
|
971
973
|
"Layout": "Tabular",
|
|
@@ -974,23 +976,11 @@
|
|
|
974
976
|
}
|
|
975
977
|
]
|
|
976
978
|
},
|
|
977
|
-
{
|
|
978
|
-
"Name": "Box Decoration",
|
|
979
|
-
"Hash": "BoxDecorations",
|
|
980
|
-
"Solvers": [],
|
|
981
|
-
"Groups": [
|
|
982
|
-
{
|
|
983
|
-
"Name": "Box Decorations",
|
|
984
|
-
"Hash": "BoxDecorationGroup",
|
|
985
|
-
"Rows": [],
|
|
986
|
-
"RecordSetSolvers": []
|
|
987
|
-
}
|
|
988
|
-
]
|
|
989
|
-
},
|
|
990
979
|
{
|
|
991
980
|
"Name": "Box Summary Data",
|
|
992
981
|
"Hash": "Box_Summary_Data",
|
|
993
982
|
"Solvers": [
|
|
983
|
+
"MAP VAR row FROM Boxes: ColorInputBackgroundTabular(\"BoxDecorations\", \"BoxDecorationGroup\", \"VolumeLessTen\", stepIndex, \"#FFCCCC\", 1)",
|
|
994
984
|
"BoxesCount = COUNT(BoxesFloorspaceSet)",
|
|
995
985
|
"BoxesAverageFloorspace = AVG(BoxesFloorspaceSet)",
|
|
996
986
|
"BoxesTotalFloorspace = SUM(BoxesFloorspaceSet)",
|
|
@@ -1859,6 +1849,28 @@
|
|
|
1859
1849
|
},
|
|
1860
1850
|
"IsTabular": true
|
|
1861
1851
|
},
|
|
1852
|
+
"VolumeLessTen": {
|
|
1853
|
+
"Hash": "VolumeLessTen",
|
|
1854
|
+
"Name": "VolumeLessTen",
|
|
1855
|
+
"DataAddress": "VolumeLessTen",
|
|
1856
|
+
"DataType": "PreciseNumber",
|
|
1857
|
+
"PictForm": {
|
|
1858
|
+
"InputType": "DataOnly",
|
|
1859
|
+
"Row": "1",
|
|
1860
|
+
"Width": "1",
|
|
1861
|
+
"Providers": [
|
|
1862
|
+
"Pict-Input-AutofillTriggerGroup"
|
|
1863
|
+
],
|
|
1864
|
+
"AutofillTriggerGroup": {
|
|
1865
|
+
"TriggerGroupHash": "Box",
|
|
1866
|
+
"MarshalEmptyValues": false,
|
|
1867
|
+
"TriggerAllInputs": true
|
|
1868
|
+
},
|
|
1869
|
+
"Section": "BoxDecorations",
|
|
1870
|
+
"Group": "BoxDecorationGroup"
|
|
1871
|
+
},
|
|
1872
|
+
"IsTabular": true
|
|
1873
|
+
},
|
|
1862
1874
|
"DecorativeText": {
|
|
1863
1875
|
"Hash": "DecorativeText",
|
|
1864
1876
|
"Name": "Decorative Text",
|
|
@@ -19,10 +19,11 @@ MathExampleForm,,,,,,Basic Geometry,Basic_Geometry,Circle,Circle,,,,2,3,,,Geomet
|
|
|
19
19
|
MathExampleForm,,,,,,Basic Geometry,Basic_Geometry,Circle,Circle,,,,2,3,,,Geometry.Circle.AreaRoundedDefault,Area Rounded,CircleAreaRoundedDefault,,default,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
20
20
|
MathExampleForm,,,,,,Basic Geometry,Basic_Geometry,Circle,Circle,,,,2,3,,,Geometry.Circle.AreaRoundedThree,Area Rounded 4,CircleAreaRoundedFour,,4,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
21
21
|
MathExampleForm,,,,,,Basic Geometry,Basic_Geometry,Circle,Circle,,,,2,3,,,Geometry.Circle.AreaRoundedFour,Area Rounded 6,CircleAreaRoundedSix,,6,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
22
|
-
MathExampleForm,,BoxCollectionSecondaryTable,true,Boxes,1,Box Decoration,
|
|
23
|
-
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,
|
|
24
|
-
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,
|
|
25
|
-
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,
|
|
22
|
+
MathExampleForm,,BoxCollectionSecondaryTable,true,Boxes,1,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,Tabular,,true,,,3,10,Boxes,Boxes,Boxes,,,Array,,,BoxFloorspace = BoxWidth * BoxDepth,1,,,,,,,,,,,,,,,,,,
|
|
23
|
+
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,Tabular,,true,1,1,,,DecorativeText,Decorative Text,DecorativeText,,,String,,,VolumeLessTen = BoxVolume - 10,1,,,,,,,,,Box,,true,,,,,,,
|
|
24
|
+
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,Tabular,,true,1,1,,,VolumeLessTen,VolumeLessTen,VolumeLessTen,,,PreciseNumber,,DataOnly,,,,,,,,,,,Box,,true,,,,,,,
|
|
25
|
+
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,Tabular,,true,1,1,,,Volume,Volume,BoxVolume,,,PreciseNumber,,DataOnly,,,,,,,,,,,Box,,true,,,,,,,
|
|
26
|
+
MathExampleForm,,BoxCollectionSecondaryTable,,,,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,Tabular,,true,1,1,,,Identifier,Identifier,BoxIdentifier,,,String,,DataOnly,,,,,,,,,,,Box,,true,,,,,,,
|
|
26
27
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,Tabular,,true,1,1,,,WarehouseSpaceLeft,Warehouse Space Left,WarehouseSpaceLeft,,,Number,,,BoxVolume = BoxFloorspace * BoxHeight,1,,,,,,,,,Box,,true,,,,,,,
|
|
27
28
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,Tabular,,true,1,1,,,Volume,Volume,BoxVolume,,,Number,,,,,,,,,,,,,Box,,true,,,,,,,
|
|
28
29
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,Tabular,,true,1,1,,,Floorspace,Floorspace,BoxFloorspace,,,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
@@ -31,18 +32,18 @@ MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp
|
|
|
31
32
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,Tabular,,true,1,1,,,Width,Width,BoxWidth,,,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
32
33
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,Tabular,,true,1,1,,,BoxCategory,Category,BoxCategory,,,String,,,,,,,,,,,,,Box,,true,,,,,,,
|
|
33
34
|
MathExampleForm,,BoxCollectionData,,,,Box Collection,BoxCollSec,Boxes,BoxCollGrp,Tabular,,true,1,1,,,Identifier,Identifier,BoxIdentifier,,,String,,,,,,,,,,,,,Box,,true,,,,,,,
|
|
34
|
-
MathExampleForm,,,,,1,Box Decoration,
|
|
35
|
-
MathExampleForm,,,,,1,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,,,,,Boxes[].Floorspace,BoxesFloorSpaceSet,BoxesFloorspaceSet,,,Object,,,
|
|
36
|
-
MathExampleForm,,,,,1,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,,,,,Boxes[].Volume,BoxesVolumeSet,BoxesVolumeSet,,,Object,,,
|
|
37
|
-
MathExampleForm,,,,,1,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,,,,,Boxes[].Depth,BoxesDepthSet,BoxesDepthSet,,,Object,,,
|
|
38
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,1,12,,,BoxAggregate.Count,Box Count,BoxesCount,,,Number,,,
|
|
39
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,2,6,,,BoxAggregate.AverageFloorspace,Average Floorspace,BoxesAverageFloorspace,,,Number,,,
|
|
40
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,2,6,,,BoxAggregate.TotalFloorspace,Total Floorspace,BoxesTotalFloorspace,,,Number,,,
|
|
41
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,3,4,,,BoxAggregate.AverageVolume,Average Volume,BoxesAverageVolume,,,Number,,,
|
|
42
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,3,4,,,BoxAggregate.TotalVolume,Total Volume,BoxesTotalVolume,,,Number,,,
|
|
43
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,3,4,,,BoxAggregate.TotalVolumeRounded,Total Volume Rounded,BoxesTotalVolumeRounded,,,Number,,,
|
|
44
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,4,3,,,BoxAggregate.MinDepth,Minimum Depth,BoxesMinDepth,,,Number,,,
|
|
45
|
-
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,4,3,,,BoxAggregate.MeanDepth,Mean Depth,BoxesMeanDepth,,,Number
|
|
35
|
+
MathExampleForm,,,,,1,Box Decoration,BoxDecorations,Box Decorations,BoxDecorationGroup,Tabular,,true,,,,,BoxDecorationSet,BoxDecorationSet,BoxDecorationSet,,,Array,,,,,,,,,,,,,,,,,,,,,,
|
|
36
|
+
MathExampleForm,,,,,1,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,,,,,Boxes[].Floorspace,BoxesFloorSpaceSet,BoxesFloorspaceSet,,,Object,,,"MAP VAR row FROM Boxes: ColorInputBackgroundTabular(""BoxDecorations"", ""BoxDecorationGroup"", ""VolumeLessTen"", stepIndex, ""#FFCCCC"", 1)",1,,,,,,,,,,,,,,,,,,
|
|
37
|
+
MathExampleForm,,,,,1,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,,,,,Boxes[].Volume,BoxesVolumeSet,BoxesVolumeSet,,,Object,,,BoxesCount = COUNT(BoxesFloorspaceSet),1,,,,,,,,,,,,,,,,,,
|
|
38
|
+
MathExampleForm,,,,,1,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,,,,,Boxes[].Depth,BoxesDepthSet,BoxesDepthSet,,,Object,,,BoxesAverageFloorspace = AVG(BoxesFloorspaceSet),1,,,,,,,,,,,,,,,,,,
|
|
39
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,1,12,,,BoxAggregate.Count,Box Count,BoxesCount,,,Number,,,BoxesTotalFloorspace = SUM(BoxesFloorspaceSet),1,,,,,,,,,,,,,,,,,,
|
|
40
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,2,6,,,BoxAggregate.AverageFloorspace,Average Floorspace,BoxesAverageFloorspace,,,Number,,,BoxesAverageVolume = AVG(BoxesVolumeSet),1,,,,,,,,,,,,,,,,,,
|
|
41
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,2,6,,,BoxAggregate.TotalFloorspace,Total Floorspace,BoxesTotalFloorspace,,,Number,,,BoxesTotalVolume = COUNT(BoxesVolumeSet),1,,,,,,,,,,,,,,,,,,
|
|
42
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,3,4,,,BoxAggregate.AverageVolume,Average Volume,BoxesAverageVolume,,,Number,,,BoxesTotalVolumeRounded = ROUND(SUM(BoxesVolumeSet)),1,,,,,,,,,,,,,,,,,,
|
|
43
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,3,4,,,BoxAggregate.TotalVolume,Total Volume,BoxesTotalVolume,,,Number,,,BoxesMinDepth = MIN(BoxesDepthSet),1,,,,,,,,,,,,,,,,,,
|
|
44
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,3,4,,,BoxAggregate.TotalVolumeRounded,Total Volume Rounded,BoxesTotalVolumeRounded,,,Number,,,BoxesMeanDepth = MEAN(BoxesDepthSet),1,,,,,,,,,,,,,,,,,,
|
|
45
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,4,3,,,BoxAggregate.MinDepth,Minimum Depth,BoxesMinDepth,,,Number,,,BoxesMedianDepth = MEDIAN(BoxesDepthSet),1,,,,,,,,,,,,,,,,,,
|
|
46
|
+
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,4,3,,,BoxAggregate.MeanDepth,Mean Depth,BoxesMeanDepth,,,Number,,,BoxesMaxDepth = MAX(BoxesDepthSet),1,,,,,,,,,,,,,,,,,,
|
|
46
47
|
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,4,3,,,BoxAggregate.MedianDepth,Median Depth,BoxesMedianDepth,,,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
47
48
|
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,4,3,,,BoxAggregate.MaxDepth,Max Depth,BoxesMaxDepth,,,Number,,,,,,,,,,,,,,,,,,,,,,
|
|
48
49
|
MathExampleForm,,,,,,Box Summary Data,Box_Summary_Data,Box Summary Data,Box_Summary_Data,,,,5,4,,,BoxChart_Sizes,Box Category Volume Comparison,BoxChart_Sizes,,,Object,,Chart,,,,,,,,,,,,,,,pie,,"objectkeystoarray(aggregationhistogrambyobject(Boxes, ""BoxCategory"", ""Volume""))",,Box Categories,"objectvaluestoarray(aggregationhistogrambyobject(Boxes, ""BoxCategory"", ""Volume""))"
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
"DataAddress": "BoxDecorationSet",
|
|
312
312
|
"DataType": "Array",
|
|
313
313
|
"FormGroup": "BoxDecorationGroup",
|
|
314
|
-
"FormSection": "
|
|
314
|
+
"FormSection": "BoxDecorations"
|
|
315
315
|
},
|
|
316
316
|
"Boxes[].Floorspace": {
|
|
317
317
|
"Hash": "BoxesFloorspaceSet",
|
|
@@ -958,14 +958,16 @@
|
|
|
958
958
|
},
|
|
959
959
|
{
|
|
960
960
|
"Name": "Box Decoration",
|
|
961
|
-
"Hash": "
|
|
961
|
+
"Hash": "BoxDecorations",
|
|
962
962
|
"Solvers": [],
|
|
963
963
|
"Groups": [
|
|
964
964
|
{
|
|
965
965
|
"Name": "Box Decorations",
|
|
966
966
|
"Hash": "BoxDecorationGroup",
|
|
967
967
|
"Rows": [],
|
|
968
|
-
"RecordSetSolvers": [
|
|
968
|
+
"RecordSetSolvers": [
|
|
969
|
+
"VolumeLessTen = BoxVolume - 10"
|
|
970
|
+
],
|
|
969
971
|
"HideTabularEditingControls": true,
|
|
970
972
|
"ShowTitle": true,
|
|
971
973
|
"Layout": "Tabular",
|
|
@@ -974,23 +976,11 @@
|
|
|
974
976
|
}
|
|
975
977
|
]
|
|
976
978
|
},
|
|
977
|
-
{
|
|
978
|
-
"Name": "Box Decoration",
|
|
979
|
-
"Hash": "BoxDecorations",
|
|
980
|
-
"Solvers": [],
|
|
981
|
-
"Groups": [
|
|
982
|
-
{
|
|
983
|
-
"Name": "Box Decorations",
|
|
984
|
-
"Hash": "BoxDecorationGroup",
|
|
985
|
-
"Rows": [],
|
|
986
|
-
"RecordSetSolvers": []
|
|
987
|
-
}
|
|
988
|
-
]
|
|
989
|
-
},
|
|
990
979
|
{
|
|
991
980
|
"Name": "Box Summary Data",
|
|
992
981
|
"Hash": "Box_Summary_Data",
|
|
993
982
|
"Solvers": [
|
|
983
|
+
"MAP VAR row FROM Boxes: ColorInputBackgroundTabular(\"BoxDecorations\", \"BoxDecorationGroup\", \"VolumeLessTen\", stepIndex, \"#FFCCCC\", 1)",
|
|
994
984
|
"BoxesCount = COUNT(BoxesFloorspaceSet)",
|
|
995
985
|
"BoxesAverageFloorspace = AVG(BoxesFloorspaceSet)",
|
|
996
986
|
"BoxesTotalFloorspace = SUM(BoxesFloorspaceSet)",
|
|
@@ -1859,6 +1849,28 @@
|
|
|
1859
1849
|
},
|
|
1860
1850
|
"IsTabular": true
|
|
1861
1851
|
},
|
|
1852
|
+
"VolumeLessTen": {
|
|
1853
|
+
"Hash": "VolumeLessTen",
|
|
1854
|
+
"Name": "VolumeLessTen",
|
|
1855
|
+
"DataAddress": "VolumeLessTen",
|
|
1856
|
+
"DataType": "PreciseNumber",
|
|
1857
|
+
"PictForm": {
|
|
1858
|
+
"InputType": "DataOnly",
|
|
1859
|
+
"Row": "1",
|
|
1860
|
+
"Width": "1",
|
|
1861
|
+
"Providers": [
|
|
1862
|
+
"Pict-Input-AutofillTriggerGroup"
|
|
1863
|
+
],
|
|
1864
|
+
"AutofillTriggerGroup": {
|
|
1865
|
+
"TriggerGroupHash": "Box",
|
|
1866
|
+
"MarshalEmptyValues": false,
|
|
1867
|
+
"TriggerAllInputs": true
|
|
1868
|
+
},
|
|
1869
|
+
"Section": "BoxDecorations",
|
|
1870
|
+
"Group": "BoxDecorationGroup"
|
|
1871
|
+
},
|
|
1872
|
+
"IsTabular": true
|
|
1873
|
+
},
|
|
1862
1874
|
"DecorativeText": {
|
|
1863
1875
|
"Hash": "DecorativeText",
|
|
1864
1876
|
"Name": "Decorative Text",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-form",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.164",
|
|
4
4
|
"description": "Pict dynamic form sections",
|
|
5
5
|
"main": "source/Pict-Section-Form.js",
|
|
6
6
|
"directories": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"browser-env": "^3.3.0",
|
|
35
35
|
"eslint": "^9.39.1",
|
|
36
36
|
"jquery": "^3.7.1",
|
|
37
|
-
"pict": "^1.0.
|
|
37
|
+
"pict": "^1.0.342",
|
|
38
38
|
"pict-application": "^1.0.29",
|
|
39
39
|
"pict-service-commandlineutility": "^1.0.16",
|
|
40
40
|
"quackage": "^1.0.45",
|
|
@@ -212,8 +212,6 @@ class DynamicTabularData extends libPictProvider
|
|
|
212
212
|
tmpRowPrototype = JSON.parse(JSON.stringify(tmpGroup.DefaultRows[tmpDestinationObject.length]));
|
|
213
213
|
}
|
|
214
214
|
tmpDestinationObject.push(tmpGroup.supportingManifest.populateDefaults(tmpRowPrototype));
|
|
215
|
-
// Run the solver
|
|
216
|
-
this.pict.providers.DynamicSolver.solveViews();
|
|
217
215
|
|
|
218
216
|
// Also render any other views that have this as the RecordSetAddress
|
|
219
217
|
// Filter the views by each Group.RecordSetAddress and find the ones with this RecordSetAddress
|
|
@@ -241,6 +239,9 @@ class DynamicTabularData extends libPictProvider
|
|
|
241
239
|
tmpViewsToRender[i].render();
|
|
242
240
|
}
|
|
243
241
|
|
|
242
|
+
// Run the solver
|
|
243
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
244
|
+
|
|
244
245
|
//pView.render();
|
|
245
246
|
//pView.marshalToView();
|
|
246
247
|
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
@@ -428,9 +429,6 @@ class DynamicTabularData extends libPictProvider
|
|
|
428
429
|
}
|
|
429
430
|
tmpDestinationObject.splice(tmpRowIndex, 1);
|
|
430
431
|
|
|
431
|
-
// Run the solver
|
|
432
|
-
this.pict.providers.DynamicSolver.solveViews();
|
|
433
|
-
|
|
434
432
|
// Also render any other views that have this as the RecordSetAddress
|
|
435
433
|
// Filter the views by each Group.RecordSetAddress and find the ones with this RecordSetAddress
|
|
436
434
|
let tmpViewsToRender = this.pict.views.PictFormMetacontroller.filterViews(
|
|
@@ -457,8 +455,9 @@ class DynamicTabularData extends libPictProvider
|
|
|
457
455
|
tmpViewsToRender[i].render();
|
|
458
456
|
}
|
|
459
457
|
|
|
460
|
-
//
|
|
461
|
-
|
|
458
|
+
// Run the solver
|
|
459
|
+
this.pict.providers.DynamicSolver.solveViews();
|
|
460
|
+
|
|
462
461
|
// We've re-rendered but we don't know what needs to be marshaled based on the solve that ran above so marshal everything
|
|
463
462
|
this.pict.views.PictFormMetacontroller.marshalFormSections();
|
|
464
463
|
}
|
|
@@ -858,7 +858,7 @@ Glug glug glug Oo... -->
|
|
|
858
858
|
"HashPostfix": "-TabularTemplate-Begin-Input-DataType-PreciseNumber",
|
|
859
859
|
"Template": /*HTML*/`
|
|
860
860
|
<!-- DataType PreciseNumber {~D:Record.Hash~} {~D:Record.DataType~} -->
|
|
861
|
-
<input type="Number" {~D:Record.Macro.HTMLName~} {~D:Record.Macro.InformaryTabular~} `
|
|
861
|
+
<input type="Number" {~D:Record.Macro.HTMLName~} {~D:Record.Macro.InformaryTabular~} id="TABULAR-DATA-{~D:Record.Macro.RawHTMLID~}-{~D:Context[2].Key~}" `
|
|
862
862
|
},
|
|
863
863
|
{
|
|
864
864
|
"HashPostfix": "-TabularTemplate-End-Input-DataType-PreciseNumber",
|
|
@@ -13,6 +13,7 @@ const READY_TO_FINALIZE_TYPE = 'ReadyToFinalize';
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @typedef {(a: any, b: any) => number} SortFunction
|
|
16
|
+
* @typedef {import('manyfest').ManifestDescriptor} ManifestDescriptor
|
|
16
17
|
*/
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -291,7 +292,6 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
291
292
|
createDistinctManifest(pManifest, pUUID)
|
|
292
293
|
{
|
|
293
294
|
const tmpDescriptorHashes = Object.keys(pManifest?.Descriptors || {});
|
|
294
|
-
const tmpDescriptorHashSet = new Set(tmpDescriptorHashes);
|
|
295
295
|
const tmpUUID = pUUID != null ? pUUID : this.pict.getUUID().replace(/-/g, '');
|
|
296
296
|
const tmpManifest = JSON.parse(JSON.stringify(pManifest));
|
|
297
297
|
for (const tmpSection of tmpManifest.Sections || [])
|
|
@@ -304,8 +304,11 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
304
304
|
tmpGroup.Hash = `${tmpGroup.Hash}_${tmpUUID}`;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
+
/** @type {Record<string, ManifestDescriptor>} */
|
|
308
|
+
const tmpDescriptors = tmpManifest.Descriptors || {};
|
|
309
|
+
/** @type {Record<string, ManifestDescriptor>} */
|
|
307
310
|
const tmpNewDescriptors = {};
|
|
308
|
-
for (const [ tmpKey, tmpDescriptor ] of Object.entries(
|
|
311
|
+
for (const [ tmpKey, tmpDescriptor ] of Object.entries(tmpDescriptors))
|
|
309
312
|
{
|
|
310
313
|
if (!tmpDescriptor.DataAddress)
|
|
311
314
|
{
|
|
@@ -313,31 +316,15 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
313
316
|
}
|
|
314
317
|
tmpDescriptor.OriginalDataAddress = tmpDescriptor.DataAddress;
|
|
315
318
|
// we only make distinct top level properties to keep things as tidy as possible so do a split to isoloate that
|
|
316
|
-
//TODO: if we have .. dereferences (for example) in the data address, this
|
|
319
|
+
//TODO: if we have .. dereferences (for example) in the data address, this may not work properly
|
|
317
320
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
if (tmpDotIndex >= 0 && (tmpDotIndex < tmpArrayIndex || tmpArrayIndex < 0))
|
|
321
|
-
{
|
|
322
|
-
const tmpPrefixPart = tmpDescriptor.DataAddress.substring(0, tmpDotIndex);
|
|
323
|
-
const tmpPostfixPart = tmpDescriptor.DataAddress.substring(tmpDotIndex);
|
|
324
|
-
tmpDescriptor.DataAddress = `${tmpPrefixPart}_${tmpUUID}${tmpPostfixPart}`;
|
|
325
|
-
}
|
|
326
|
-
else if (tmpArrayIndex >= 0 && (tmpArrayIndex < tmpDotIndex || tmpDotIndex < 0))
|
|
327
|
-
{
|
|
328
|
-
const tmpArrayPart = tmpDescriptor.DataAddress.substring(0, tmpArrayIndex);
|
|
329
|
-
const tmpPostfixPart = tmpDescriptor.DataAddress.substring(tmpArrayIndex);
|
|
330
|
-
tmpDescriptor.DataAddress = `${tmpArrayPart}_${tmpUUID}${tmpPostfixPart}`;
|
|
331
|
-
}
|
|
332
|
-
else
|
|
333
|
-
{
|
|
334
|
-
//FIXME: do we want to allow prefixing the data address? (ex. nesting it under a parent object) - caller can still do this themselves.
|
|
335
|
-
tmpDescriptor.DataAddress = `${tmpDescriptor.OriginalDataAddress}_${tmpUUID}`;
|
|
336
|
-
}
|
|
321
|
+
// nest the data addresses inside a container that is unique to this injection
|
|
322
|
+
tmpDescriptor.DataAddress = `${tmpUUID}.${tmpDescriptor.OriginalDataAddress}`;
|
|
337
323
|
if (tmpDescriptor.Address != null)
|
|
338
324
|
{
|
|
339
325
|
tmpDescriptor.Address = tmpDescriptor.DataAddress;
|
|
340
326
|
}
|
|
327
|
+
// nesting doesn't work for hashes, so we append instead for input, section and group hashes
|
|
341
328
|
if (tmpDescriptor.Hash)
|
|
342
329
|
{
|
|
343
330
|
tmpDescriptor.OriginalHash = tmpDescriptor.Hash;
|
|
@@ -357,7 +344,9 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
357
344
|
tmpNewDescriptors[tmpDescriptor.DataAddress] = tmpDescriptor;
|
|
358
345
|
}
|
|
359
346
|
tmpManifest.Descriptors = tmpNewDescriptors;
|
|
347
|
+
/** @type {Record<string, string>} */
|
|
360
348
|
const tmpAddressTranslation = {};
|
|
349
|
+
/** @type {Record<string, string>} */
|
|
361
350
|
const tmpHashTranslation = {};
|
|
362
351
|
for (const tmpDescriptor of Object.values(tmpManifest?.Descriptors || {}))
|
|
363
352
|
{
|
|
@@ -370,6 +359,15 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
370
359
|
tmpHashTranslation[tmpDescriptor.OriginalHash] = tmpDescriptor.Hash;
|
|
371
360
|
}
|
|
372
361
|
}
|
|
362
|
+
const escapeRegExp =
|
|
363
|
+
/**
|
|
364
|
+
* @param {string} str - the string to match
|
|
365
|
+
* @return {string} - the escaped string
|
|
366
|
+
*/
|
|
367
|
+
(str) =>
|
|
368
|
+
{
|
|
369
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
370
|
+
}
|
|
373
371
|
for (const [ tmpOriginalAddress, tmpUpdatedAddress ] of Object.entries(tmpAddressTranslation))
|
|
374
372
|
{
|
|
375
373
|
for (const tmpIterAddress of Object.keys(tmpAddressTranslation))
|
|
@@ -378,10 +376,10 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
378
376
|
{
|
|
379
377
|
continue;
|
|
380
378
|
}
|
|
381
|
-
const tmpTranslatedAddress = tmpAddressTranslation[tmpIterAddress].replace(new RegExp(`^${tmpOriginalAddress}\\b`, 'g'), tmpUpdatedAddress);
|
|
379
|
+
const tmpTranslatedAddress = tmpAddressTranslation[tmpIterAddress].replace(new RegExp(`^${escapeRegExp(tmpOriginalAddress)}\\b`, 'g'), tmpUpdatedAddress);
|
|
382
380
|
if (tmpTranslatedAddress !== tmpAddressTranslation[tmpIterAddress])
|
|
383
381
|
{
|
|
384
|
-
|
|
382
|
+
this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Updated address translation for "${tmpIterAddress}" from "${tmpAddressTranslation[tmpIterAddress]}" to "${tmpTranslatedAddress}".`);
|
|
385
383
|
tmpAddressTranslation[tmpIterAddress] = tmpTranslatedAddress;
|
|
386
384
|
const [ tmpCurrentKey, tmpOriginalDescriptor ] = Object.entries(tmpManifest.Descriptors).find(([ pKey, pDescriptor ]) => pDescriptor.OriginalDataAddress === tmpIterAddress);
|
|
387
385
|
tmpManifest.Descriptors[tmpCurrentKey].DataAddress = tmpTranslatedAddress;
|
|
@@ -399,17 +397,15 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
399
397
|
tmpAddressMappings.sort((a, b) => b.From.length - a.From.length);
|
|
400
398
|
const tmpHashMappings = Object.entries(tmpHashTranslation).map(([ pOldHash, pNewHash ]) => ({ From: pOldHash, To: pNewHash }));
|
|
401
399
|
tmpHashMappings.sort((a, b) => b.From.length - a.From.length);
|
|
402
|
-
const escapeRegExp = (string) =>
|
|
403
|
-
{
|
|
404
|
-
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
405
|
-
}
|
|
406
400
|
for (const tmpSection of tmpManifest.Sections || [])
|
|
407
401
|
{
|
|
408
402
|
if (Array.isArray(tmpSection.Solvers) && tmpSection.Solvers.length > 0)
|
|
409
403
|
{
|
|
410
404
|
for (let i = 0; i < tmpSection.Solvers.length; i++)
|
|
411
405
|
{
|
|
406
|
+
/** @type {Record<string, any>|string} */
|
|
412
407
|
const tmpSolver = tmpSection.Solvers[i];
|
|
408
|
+
/** @type {string} */
|
|
413
409
|
const tmpSolverExpression = typeof tmpSolver === 'string' ? tmpSolver : tmpSolver.Expression;
|
|
414
410
|
if (!tmpSolverExpression)
|
|
415
411
|
{
|
|
@@ -419,15 +415,28 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
419
415
|
//FIXME: what if there is a collision in a suffix-part and we replace too much?
|
|
420
416
|
for (const tmpMapping of tmpAddressMappings)
|
|
421
417
|
{
|
|
422
|
-
|
|
418
|
+
const tmpUpdatedSolverIter = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
|
|
419
|
+
if (tmpUpdatedSolverIter !== tmpUpdatedSolver)
|
|
420
|
+
{
|
|
421
|
+
//this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Iteratively updated section solver reference ${i} address from "${tmpUpdatedSolver}" to "${tmpUpdatedSolverIter}".`, tmpMapping);
|
|
422
|
+
}
|
|
423
|
+
tmpUpdatedSolver = tmpUpdatedSolverIter;
|
|
423
424
|
}
|
|
424
425
|
for (const tmpMapping of tmpHashMappings)
|
|
425
426
|
{
|
|
426
|
-
|
|
427
|
+
const tmpUpdatedSolverIter = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
|
|
428
|
+
if (tmpUpdatedSolverIter !== tmpUpdatedSolver)
|
|
429
|
+
{
|
|
430
|
+
//this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Iteratively updated section solver reference ${i} hash from "${tmpUpdatedSolver}" to "${tmpUpdatedSolverIter}".`, tmpMapping);
|
|
431
|
+
}
|
|
432
|
+
tmpUpdatedSolver = tmpUpdatedSolverIter;
|
|
427
433
|
}
|
|
428
|
-
if (tmpUpdatedSolver !==
|
|
434
|
+
if (tmpUpdatedSolver !== tmpSolverExpression)
|
|
429
435
|
{
|
|
430
|
-
//
|
|
436
|
+
//FIXME: hack to remove duplicated tmpUUID prefixes
|
|
437
|
+
const tmpPrefix = `${tmpUUID}.`;
|
|
438
|
+
tmpUpdatedSolver = tmpUpdatedSolver.replace(new RegExp(`(${escapeRegExp(tmpPrefix)})+`), tmpPrefix);
|
|
439
|
+
this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Updated section solver reference ${i} from "${tmpSolverExpression}" to "${tmpUpdatedSolver}".`);
|
|
431
440
|
if (typeof tmpSolver === 'string')
|
|
432
441
|
{
|
|
433
442
|
tmpSection.Solvers[i] = tmpUpdatedSolver;
|
|
@@ -443,38 +452,8 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
443
452
|
{
|
|
444
453
|
if (tmpGroup.RecordSetAddress)
|
|
445
454
|
{
|
|
446
|
-
let tmpRecordSetAddress = tmpGroup.RecordSetAddress
|
|
447
|
-
|
|
448
|
-
{
|
|
449
|
-
tmpRecordSetAddress = tmpRecordSetAddress.replace(new RegExp(`^${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
|
|
450
|
-
}
|
|
451
|
-
if (tmpRecordSetAddress !== tmpGroup.RecordSetAddress)
|
|
452
|
-
{
|
|
453
|
-
//this.pict.log.info(`DocumentDynamicSectionManager._addTestSections: Updated group record set address from "${tmpGroup.RecordSetAddress}" to "${tmpRecordSetAddress}".`);
|
|
454
|
-
}
|
|
455
|
-
else
|
|
456
|
-
{
|
|
457
|
-
let tmpArrayIndex = tmpRecordSetAddress.indexOf('[');
|
|
458
|
-
let tmpDotIndex = tmpRecordSetAddress.indexOf('.');
|
|
459
|
-
if (tmpDotIndex >= 0 && (tmpDotIndex < tmpArrayIndex || tmpArrayIndex < 0))
|
|
460
|
-
{
|
|
461
|
-
const tmpPrefixPart = tmpRecordSetAddress.substring(0, tmpDotIndex);
|
|
462
|
-
const tmpPostfixPart = tmpRecordSetAddress.substring(tmpDotIndex);
|
|
463
|
-
tmpRecordSetAddress = `${tmpPrefixPart}_${tmpUUID}${tmpPostfixPart}`;
|
|
464
|
-
}
|
|
465
|
-
else if (tmpArrayIndex >= 0 && (tmpArrayIndex < tmpDotIndex || tmpDotIndex < 0))
|
|
466
|
-
{
|
|
467
|
-
const tmpArrayPart = tmpRecordSetAddress.substring(0, tmpArrayIndex);
|
|
468
|
-
const tmpPostfixPart = tmpRecordSetAddress.substring(tmpArrayIndex);
|
|
469
|
-
tmpRecordSetAddress = `${tmpArrayPart}_${tmpUUID}${tmpPostfixPart}`;
|
|
470
|
-
}
|
|
471
|
-
else
|
|
472
|
-
{
|
|
473
|
-
//FIXME: do we want to allow prefixing the data address? (ex. nesting it under a parent object) - caller can still do this themselves.
|
|
474
|
-
tmpRecordSetAddress = `${tmpGroup.RecordSetAddress}_${tmpUUID}`;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
//TODO: does this need to go into the mappings if it isn't there?
|
|
455
|
+
let tmpRecordSetAddress = `${tmpUUID}.${tmpGroup.RecordSetAddress}`;
|
|
456
|
+
this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Updated group record set address from "${tmpGroup.RecordSetAddress}" to "${tmpRecordSetAddress}".`);
|
|
478
457
|
tmpGroup.RecordSetAddress = tmpRecordSetAddress;
|
|
479
458
|
|
|
480
459
|
}
|
|
@@ -482,6 +461,7 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
482
461
|
{
|
|
483
462
|
for (let i = 0; i < tmpGroup.RecordSetSolvers.length; i++)
|
|
484
463
|
{
|
|
464
|
+
/** @type {Record<string, any>|string} */
|
|
485
465
|
const tmpSolver = tmpGroup.RecordSetSolvers[i];
|
|
486
466
|
const tmpSolverExpression = typeof tmpSolver === 'string' ? tmpSolver : tmpSolver.Expression;
|
|
487
467
|
if (!tmpSolverExpression)
|
|
@@ -492,15 +472,28 @@ class PictFormMetacontroller extends libPictViewClass
|
|
|
492
472
|
//FIXME: what if there is a collision in a suffix-part and we replace too much?
|
|
493
473
|
for (const tmpMapping of tmpAddressMappings)
|
|
494
474
|
{
|
|
495
|
-
|
|
475
|
+
const tmpUpdatedSolverIter = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
|
|
476
|
+
if (tmpUpdatedSolverIter !== tmpUpdatedSolver)
|
|
477
|
+
{
|
|
478
|
+
//this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Updated group solver reference ${i} address from "${tmpUpdatedSolver}" to "${tmpUpdatedSolverIter}".`);
|
|
479
|
+
}
|
|
480
|
+
tmpUpdatedSolver = tmpUpdatedSolverIter;
|
|
496
481
|
}
|
|
497
482
|
for (const tmpMapping of tmpHashMappings)
|
|
498
483
|
{
|
|
499
|
-
|
|
484
|
+
const tmpUpdatedSolverIter = tmpUpdatedSolver.replace(new RegExp(`\\b${escapeRegExp(tmpMapping.From)}\\b`, 'g'), tmpMapping.To);
|
|
485
|
+
if (tmpUpdatedSolverIter !== tmpUpdatedSolver)
|
|
486
|
+
{
|
|
487
|
+
//this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Updated group solver reference ${i} hash from "${tmpUpdatedSolver}" to "${tmpUpdatedSolverIter}".`);
|
|
488
|
+
}
|
|
489
|
+
tmpUpdatedSolver = tmpUpdatedSolverIter;
|
|
500
490
|
}
|
|
501
|
-
if (tmpUpdatedSolver !==
|
|
491
|
+
if (tmpUpdatedSolver !== tmpSolverExpression)
|
|
502
492
|
{
|
|
503
|
-
//
|
|
493
|
+
//FIXME: hack to remove duplicated tmpUUID prefixes
|
|
494
|
+
const tmpPrefix = `${tmpUUID}.`;
|
|
495
|
+
tmpUpdatedSolver = tmpUpdatedSolver.replace(new RegExp(`(${escapeRegExp(tmpPrefix)})+`), tmpPrefix);
|
|
496
|
+
this.pict.log.info(`DocumentDynamicSectionManager.createDistinctManifest: Updated group solver reference ${i} from "${tmpSolverExpression}" to "${tmpUpdatedSolver}".`);
|
|
504
497
|
if (typeof tmpSolver === 'string')
|
|
505
498
|
{
|
|
506
499
|
tmpGroup.RecordSetSolvers[i] = tmpUpdatedSolver;
|
|
@@ -322,8 +322,8 @@ suite
|
|
|
322
322
|
try
|
|
323
323
|
{
|
|
324
324
|
_Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2 });
|
|
325
|
-
Expect(_Pict.AppData
|
|
326
|
-
Expect(_Pict.AppData
|
|
325
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
|
|
326
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue2)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
|
|
327
327
|
}
|
|
328
328
|
catch (pError)
|
|
329
329
|
{
|
|
@@ -479,8 +479,8 @@ suite
|
|
|
479
479
|
try
|
|
480
480
|
{
|
|
481
481
|
_Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2 });
|
|
482
|
-
Expect(_Pict.AppData
|
|
483
|
-
Expect(_Pict.AppData
|
|
482
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
|
|
483
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue2)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
|
|
484
484
|
}
|
|
485
485
|
catch (pError)
|
|
486
486
|
{
|
|
@@ -634,7 +634,7 @@ suite
|
|
|
634
634
|
const tmpUUID = _Pict.getUUID().substring(0, 8);
|
|
635
635
|
const tmpDistinctManifest = _Pict.views.PictFormMetacontroller.createDistinctManifest(tmpManifest, tmpUUID);
|
|
636
636
|
_Pict.log.info('Distinct Manifest:', tmpDistinctManifest);
|
|
637
|
-
Expect(tmpDistinctManifest.Sections[0].Groups[0].RecordSetAddress).to.equal(
|
|
637
|
+
Expect(tmpDistinctManifest.Sections[0].Groups[0].RecordSetAddress).to.equal(`${tmpUUID}.LevelOfIndirection.DataTableAddress`, 'Group RecordSetAddress should be preserved in distinct manifest.');
|
|
638
638
|
tmpHashedAggregateValue = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue')[0];
|
|
639
639
|
tmpHashedAggregateValue2 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue2')[0];
|
|
640
640
|
tmpHashedAggregateValue3 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'IndirectAggregateValue')[0];
|
|
@@ -658,8 +658,8 @@ suite
|
|
|
658
658
|
try
|
|
659
659
|
{
|
|
660
660
|
_Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2, tmpHashedAggregateValue3 });
|
|
661
|
-
Expect(_Pict.AppData
|
|
662
|
-
Expect(_Pict.AppData
|
|
661
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
|
|
662
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue2)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
|
|
663
663
|
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue3)).to.equal('15', 'IndirectAggregateValue should equal 15 (via indirection) using manifest method');
|
|
664
664
|
}
|
|
665
665
|
catch (pError)
|
|
@@ -823,7 +823,7 @@ suite
|
|
|
823
823
|
const tmpUUID = _Pict.getUUID().substring(0, 8);
|
|
824
824
|
const tmpDistinctManifest = _Pict.views.PictFormMetacontroller.createDistinctManifest(tmpManifest, tmpUUID);
|
|
825
825
|
_Pict.log.info('Distinct Manifest:', tmpDistinctManifest);
|
|
826
|
-
Expect(tmpDistinctManifest.Sections[0].Groups[0].RecordSetAddress).to.equal(
|
|
826
|
+
Expect(tmpDistinctManifest.Sections[0].Groups[0].RecordSetAddress).to.equal(`${tmpUUID}.LevelOfIndirection.DataTableAddress`, 'Group RecordSetAddress should be preserved in distinct manifest.');
|
|
827
827
|
tmpHashedAggregateValue = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue')[0];
|
|
828
828
|
tmpHashedAggregateValue2 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'AggregateValue2')[0];
|
|
829
829
|
tmpHashedAggregateValue3 = Object.entries(tmpDistinctManifest.Descriptors).find(([pKey, pValue]) => pValue.OriginalHash == 'IndirectAggregateValue')[0];
|
|
@@ -847,8 +847,8 @@ suite
|
|
|
847
847
|
try
|
|
848
848
|
{
|
|
849
849
|
_Pict.log.info(`AppData after`, { AppData: _Pict.AppData, tmpHashedAggregateValue, tmpHashedAggregateValue2, tmpHashedAggregateValue3 });
|
|
850
|
-
Expect(_Pict.AppData
|
|
851
|
-
Expect(_Pict.AppData
|
|
850
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via hash)');
|
|
851
|
+
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue2)).to.equal('15', 'AggregateValue should equal 15 (SUM of ValueArray via address)');
|
|
852
852
|
Expect(_Pict.manifest.getValueByHash(_Pict.AppData, tmpHashedAggregateValue3)).to.equal('15', 'IndirectAggregateValue should equal 15 (via indirection) using manifest method');
|
|
853
853
|
}
|
|
854
854
|
catch (pError)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Provider-DynamicTabularData.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicTabularData.js"],"names":[],"mappings":";AAaA;;;GAGG;AAEH;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAahB;IANA,kBAAkB;IAClB,SADW,GAAG,CACF;IACZ,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IAKV;;;;;;OAMG;IACH,6CAHW,MAAM,GACJ,cAAa,OAAO,CAehC;IAED;;;;;;;OAOG;IACH,+CAJW,MAAM,eACN,MAAM,GACJ,iBAAiB,GAAC,OAAO,CAiBrC;IAED;;;;;;;OAOG;IACH,oDAJW,MAAM,cACN,MAAM,GACJ,iBAAiB,GAAC,OAAO,CA+BrC;IAED;;;;;;;OAOG;IACH,8CAJW,MAAM,kBACN,MAAM,GACJ,OAAO,MAAO,CAkD1B;IAED;;;;;OAKG;IACH,+CAFW,MAAM,
|
|
1
|
+
{"version":3,"file":"Pict-Provider-DynamicTabularData.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicTabularData.js"],"names":[],"mappings":";AAaA;;;GAGG;AAEH;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAahB;IANA,kBAAkB;IAClB,SADW,GAAG,CACF;IACZ,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IAKV;;;;;;OAMG;IACH,6CAHW,MAAM,GACJ,cAAa,OAAO,CAehC;IAED;;;;;;;OAOG;IACH,+CAJW,MAAM,eACN,MAAM,GACJ,iBAAiB,GAAC,OAAO,CAiBrC;IAED;;;;;;;OAOG;IACH,oDAJW,MAAM,cACN,MAAM,GACJ,iBAAiB,GAAC,OAAO,CA+BrC;IAED;;;;;;;OAOG;IACH,8CAJW,MAAM,kBACN,MAAM,GACJ,OAAO,MAAO,CAkD1B;IAED;;;;;OAKG;IACH,+CAFW,MAAM,QA2DhB;IAGD;;;;;OAKG;IACH,4DAFW,MAAM,QA2BhB;IAED;;;;;;;;OAQG;IACH,iDALW,MAAM,aACN,MAAM,GAAC,MAAM,gBACb,MAAM,GACJ,OAAO,CA4BnB;IAED;;;;;;;OAOG;IACH,iDAJW,MAAM,aACN,MAAM,GAAC,MAAM,GACX,OAAO,CA2BnB;IAED;;;;;;;OAOG;IACH,+CAJW,MAAM,aACN,MAAM,GAAC,MAAM,GACX,OAAO,CAgCnB;IAGD;;;;;;;OAOG;IACH,+CAJW,MAAM,aACN,MAAM,GAAC,MAAM,GACX,OAAO,CA2DnB;CACD;;;;;AA/cD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B;;;;;UAIW,MAAM"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export = PictFormMetacontroller;
|
|
2
2
|
/**
|
|
3
3
|
* @typedef {(a: any, b: any) => number} SortFunction
|
|
4
|
+
* @typedef {import('manyfest').ManifestDescriptor} ManifestDescriptor
|
|
4
5
|
*/
|
|
5
6
|
/**
|
|
6
7
|
* Class representing a PictFormMetacontroller.
|
|
@@ -221,9 +222,10 @@ declare class PictFormMetacontroller extends libPictViewClass {
|
|
|
221
222
|
get isPictMetacontroller(): boolean;
|
|
222
223
|
}
|
|
223
224
|
declare namespace PictFormMetacontroller {
|
|
224
|
-
export { default_configuration, SortFunction };
|
|
225
|
+
export { default_configuration, SortFunction, ManifestDescriptor };
|
|
225
226
|
}
|
|
226
227
|
import libPictViewClass = require("pict-view");
|
|
227
228
|
declare const default_configuration: Record<string, any>;
|
|
228
229
|
type SortFunction = (a: any, b: any) => number;
|
|
230
|
+
type ManifestDescriptor = import("manyfest").ManifestDescriptor;
|
|
229
231
|
//# sourceMappingURL=Pict-View-Form-Metacontroller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-View-Form-Metacontroller.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-Form-Metacontroller.js"],"names":[],"mappings":";AAaA
|
|
1
|
+
{"version":3,"file":"Pict-View-Form-Metacontroller.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-Form-Metacontroller.js"],"names":[],"mappings":";AAaA;;;GAGG;AAEH;;;;;;GAMG;AACH;IAEC,2DAyBC;IAjBA,yBAA2B;IAE3B,wBAAsF;IAEtF,cAAkC;IAElC,gCAAkC;IAClC,8BAAiC;IAEjC;;;;;;MAOE;IAQH,wCAGC;IARD,kCAGC;IAOD;;;;OAIG;IACH,qBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAaf;IAED,yCAYC;IAED;;;;;OAKG;IACH,kCAHW,aAAa,GACX,IAAI,CAsBhB;IA8BD;;;;OAIG;IACH,WAFa,GAAG,CAMf;IAED,gDAGC;IAED,gDAGC;IAED,+CAGC;IAED;;;;OAIG;IACH,2DAJW,MAAM,GAEL,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAW9B;IAED;;;;;;OAMG;IACH,mCANW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,sBACnB,MAAM,UACN,MAAM,GAEL,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAwBtD;IAED;;;;;OAKG;IACH,0BALW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,sBACnB,MAAM,GAEL,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC,CAgCtD;IAED;;;;;;;;;OASG;IACH,kCALW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UACnB,MAAM,GAEL,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CA6N9B;IAED;;;;OAIG;IACH,uCAJW,KAAK,CAAC,MAAM,CAAC,sBACb,MAAM,UACN,MAAM,QAuBhB;IAED;;;OAGG;IACH,6CAHW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,sBACnB,MAAM,SAehB;IAED;;;;;;;;OAQG;IACH,wDAHW,YAAY,SAoHtB;IAED;;;;;;;OAOG;IACH,4CAHW,MAAM,GACJ,IAAI,CAShB;IAED;;;;OAIG;IACH,6BAFa,IAAI,CAQhB;IAED;;;;;;;OAOG;IACH,+DAFW,YAAY,QAatB;IAED;;;;;;;OAOG;IACH,gEAFW,YAAY,QAatB;IAED;;;;;OAKG;IACH,8EAFW,YAAY,QAmBtB;IAED;;;;;;OAMG;IACH,oEAHW,YAAY,GACV,IAAI,CAkDhB;IAED;;;;;;;OAOG;IACH,uEAJW,YAAY,GAEX,IAAI,CAsFf;IAED;;;;;OAKG;IACH,qCAHW,MAAM,GACJ,MAAM,GAAC,OAAO,CA2C1B;IAED,+CAeC;IAED;;;;;;;OAOG;IACH,kFAJW,MAAM,GAEJ,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAoLtC;IA5JC,gCAA0D;IAC1D,yBAAiD;IA6JnD;;;;OAIG;IACH,gCAHW,MAAM,qBACN,MAAM,QA0BhB;IAED;;;OAGG;IACH,yDAHW,MAAM,uBACN,MAAM,QAKhB;IAED;;;;;OAKG;IACH,yDALW,MAAM,uBACN,MAAM,GAEL,OAAO,CAoDlB;IAED;;;;OAIG;IACH,sCAJW,MAAM,GAEL,OAAO,CA0ClB;IAED;;;OAGG;IACH,wDAHW,MAAM,6BAuBhB;IAED,oCAgBC;IAED;;;;OAIG;IACH,4BAFa,OAAO,CAKnB;CACD;;;;;qCAGU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;oBA51CjB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM;0BAC1B,OAAO,UAAU,EAAE,kBAAkB"}
|