pict-section-form 1.0.48 → 1.0.50
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/TabularManifestCSV.csv +47 -41
- package/package.json +11 -10
- package/source/application/Pict-Application-Form.js +4 -2
- package/source/providers/Pict-Provider-DynamicDataChangeDetection.js +1 -1
- package/source/providers/Pict-Provider-DynamicInput.js +9 -9
- package/source/providers/Pict-Provider-DynamicInputEvents.js +7 -7
- package/source/providers/Pict-Provider-DynamicLayout.js +8 -8
- package/source/providers/Pict-Provider-DynamicRecordSet.js +6 -6
- package/source/providers/Pict-Provider-DynamicSolver.js +39 -28
- package/source/providers/Pict-Provider-DynamicTabularData.js +32 -20
- package/source/providers/Pict-Provider-DynamicTemplates.js +14 -7
- package/source/providers/Pict-Provider-Informary.js +12 -5
- package/source/providers/Pict-Provider-InputExtension.js +6 -5
- package/source/providers/Pict-Provider-MetaLists.js +17 -5
- package/source/providers/Pict-Provider-MetatemplateGenerator.js +16 -43
- package/source/providers/Pict-Provider-MetatemplateMacros.js +16 -3
- package/source/providers/dynamictemplates/Pict-DynamicTemplates-DefaultFormTemplates-ReadOnly.js +2 -2
- package/source/providers/dynamictemplates/Pict-DynamicTemplates-DefaultFormTemplates.js +1 -1
- package/source/providers/inputs/Pict-Provider-Input-AutofillTriggerGroup.js +12 -7
- package/source/providers/inputs/Pict-Provider-Input-DateTime.js +14 -8
- package/source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js +17 -10
- package/source/providers/inputs/Pict-Provider-Input-Select.js +29 -19
- package/source/providers/inputs/Pict-Provider-Input-TabSelector.js +21 -13
- package/source/providers/layouts/Pict-Layout-Chart.js +9 -2
- package/source/providers/layouts/Pict-Layout-Record.js +10 -3
- package/source/providers/layouts/Pict-Layout-RecordSet.js +10 -3
- package/source/providers/layouts/Pict-Layout-Tabular.js +10 -3
- package/source/providers/layouts/Pict-Layout-TuiGrid/Pict-Section-TuiGrid.js +7 -7
- package/source/providers/layouts/Pict-Layout-TuiGrid.js +44 -31
- package/source/services/ManifestFactory.js +45 -16
- package/source/services/Pict-Service-DynamicApplication.js +10 -1
- package/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js +15 -8
- package/source/templates/Pict-Template-Metatemplate-Input.js +18 -11
- package/source/templates/Pict-Template-Metatemplate-InputWithHashAddress.js +18 -11
- package/source/templates/Pict-Template-Proxy-PluckJoinUnique.js +15 -0
- package/source/views/Pict-View-DynamicForm.js +62 -50
- package/source/views/Pict-View-Form-Metacontroller.js +31 -27
- package/tsconfig.json +4 -2
- package/types/source/application/Pict-Application-Form.d.ts +2 -0
- package/types/source/application/Pict-Application-Form.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-DynamicInput.d.ts +9 -9
- package/types/source/providers/Pict-Provider-DynamicInput.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-DynamicInputEvents.d.ts +2 -2
- package/types/source/providers/Pict-Provider-DynamicInputEvents.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-DynamicSolver.d.ts +15 -3
- package/types/source/providers/Pict-Provider-DynamicSolver.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-DynamicTabularData.d.ts +23 -7
- package/types/source/providers/Pict-Provider-DynamicTabularData.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-DynamicTemplates.d.ts +6 -0
- package/types/source/providers/Pict-Provider-DynamicTemplates.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-Informary.d.ts +8 -0
- package/types/source/providers/Pict-Provider-Informary.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-InputExtension.d.ts +2 -1
- package/types/source/providers/Pict-Provider-InputExtension.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-MetaLists.d.ts +12 -0
- package/types/source/providers/Pict-Provider-MetaLists.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-MetatemplateGenerator.d.ts +6 -11
- package/types/source/providers/Pict-Provider-MetatemplateGenerator.d.ts.map +1 -1
- package/types/source/providers/Pict-Provider-MetatemplateMacros.d.ts +14 -0
- package/types/source/providers/Pict-Provider-MetatemplateMacros.d.ts.map +1 -1
- package/types/source/providers/inputs/Pict-Provider-Input-AutofillTriggerGroup.d.ts +40 -0
- package/types/source/providers/inputs/Pict-Provider-Input-AutofillTriggerGroup.d.ts.map +1 -0
- package/types/source/providers/inputs/Pict-Provider-Input-DateTime.d.ts +4 -1
- package/types/source/providers/inputs/Pict-Provider-Input-DateTime.d.ts.map +1 -1
- package/types/source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.d.ts +121 -0
- package/types/source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.d.ts.map +1 -0
- package/types/source/providers/inputs/Pict-Provider-Input-Select.d.ts +6 -0
- package/types/source/providers/inputs/Pict-Provider-Input-Select.d.ts.map +1 -1
- package/types/source/providers/inputs/Pict-Provider-Input-TabSelector.d.ts +6 -0
- package/types/source/providers/inputs/Pict-Provider-Input-TabSelector.d.ts.map +1 -1
- package/types/source/providers/layouts/Pict-Layout-Chart.d.ts +6 -0
- package/types/source/providers/layouts/Pict-Layout-Chart.d.ts.map +1 -1
- package/types/source/providers/layouts/Pict-Layout-Record.d.ts +6 -0
- package/types/source/providers/layouts/Pict-Layout-Record.d.ts.map +1 -1
- package/types/source/providers/layouts/Pict-Layout-RecordSet.d.ts +6 -0
- package/types/source/providers/layouts/Pict-Layout-RecordSet.d.ts.map +1 -1
- package/types/source/providers/layouts/Pict-Layout-Tabular.d.ts +6 -0
- package/types/source/providers/layouts/Pict-Layout-Tabular.d.ts.map +1 -1
- package/types/source/providers/layouts/Pict-Layout-TuiGrid/Pict-Section-TuiGrid.d.ts +2 -1
- package/types/source/providers/layouts/Pict-Layout-TuiGrid.d.ts +26 -14
- package/types/source/providers/layouts/Pict-Layout-TuiGrid.d.ts.map +1 -1
- package/types/source/services/ManifestFactory.d.ts +23 -1
- package/types/source/services/ManifestFactory.d.ts.map +1 -1
- package/types/source/services/Pict-Service-DynamicApplication.d.ts +11 -0
- package/types/source/services/Pict-Service-DynamicApplication.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts +8 -10
- package/types/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Metatemplate-Input.d.ts +11 -11
- package/types/source/templates/Pict-Template-Metatemplate-Input.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Metatemplate-InputWithHashAddress.d.ts +11 -11
- package/types/source/templates/Pict-Template-Metatemplate-InputWithHashAddress.d.ts.map +1 -1
- package/types/source/templates/Pict-Template-Proxy-PluckJoinUnique.d.ts +17 -0
- package/types/source/templates/Pict-Template-Proxy-PluckJoinUnique.d.ts.map +1 -0
- package/types/source/views/Pict-View-DynamicForm.d.ts +24 -12
- package/types/source/views/Pict-View-DynamicForm.d.ts.map +1 -1
- package/types/source/views/Pict-View-Form-Metacontroller.d.ts +25 -16
- package/types/source/views/Pict-View-Form-Metacontroller.d.ts.map +1 -1
|
@@ -1,41 +1,47 @@
|
|
|
1
|
-
Form,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
Form,Form Name,SubManifest,DataOnly,Section Name,Group Name,Row,Width,Input Address,Input Name,Input Hash,Input Extra,Units,DataType,InputType,Equation,Default,Description,Tooltip,Input Notes,,Entity,EntityColumnFilter,EntityDestination,SingleRecord,TriggerGroup,TriggerAddress,MarshalEmptyValues
|
|
2
|
+
MathExampleForm,Math Example Form,,,Header,General Info,1,3,Header.FirstName,First Name,HeaderFirstName,,,String,,,,,,
|
|
3
|
+
MathExampleForm,,,,Header,General Info,1,3,Header.LastName,Last Name,HeaderLastName,,,String,,,,,,
|
|
4
|
+
MathExampleForm,,,,Header,General Info,1,6,Header.JobTitle,Job Title,JobTitle,,,String,,,,,,
|
|
5
|
+
MathExampleForm,,,,Header,General Info,2,12,Header.Description,Description,Description,,,String,,,,,,
|
|
6
|
+
MathExampleForm,,,,Header,General Info,3,12,Header.Planet,Planet,Planet,"Earth,Mars,Saturn,Jupiter",planetary,String,Option,,,,,
|
|
7
|
+
MathExampleForm,,,,Header,General Info,1,3,Header.LastName,Last Name,HeaderLastName,,,String,,,,,,
|
|
8
|
+
MathExampleForm,,,,Header,General Info,1,6,Header.JobTitle,Job Title,JobTitle,,,String,,,,,,
|
|
9
|
+
MathExampleForm,,,,Header,General Info,2,12,Header.Description,Description,Description,,,String,,,,,,
|
|
10
|
+
MathExampleForm,,,,Header,General Info,3,12,Header.Planet,Planet,Planet,"Earth,Mars,Saturn,Jupiter",planetary,String,Option,,,,,
|
|
11
|
+
MathExampleForm,,,,Bridge,Bridge Data,1,6,BridgeData.IDBridge,IDBridge,CurrentIDBridge,,,Number,,,,,,Bridge,FBV~IDBridge~EQ~{~D:Record.Value~},BridgeData.CurrentBridge,true
|
|
12
|
+
MathExampleForm,,,,Basic Geometry,Rectangle,1,6,Geometry.Rectangle.Width,Width,RectangleWidth,,,Number,,,7.25,,,
|
|
13
|
+
MathExampleForm,,,,Basic Geometry,Rectangle,1,6,Geometry.Rectangle.Height,Height,RectangleHeight,,,Number,,,10.3571,,,
|
|
14
|
+
MathExampleForm,,,,Basic Geometry,Rectangle,2,3,Geometry.Rectangle.Area,Area,RectangleArea,,unrounded,Number,,RectangleArea = RectangleWidth * RectangleHeight,,,,
|
|
15
|
+
MathExampleForm,,,,Basic Geometry,Rectangle,2,3,Geometry.Rectangle.AreaRoundedDefault,Area Rounded,RectangleAreaRoundedDefault,,default,Number,,RectangleAreaRoundedDefault = ROUND(RectangleWidth * RectangleHeight),,,,
|
|
16
|
+
MathExampleForm,,,,Basic Geometry,Rectangle,2,3,Geometry.Rectangle.AreaRoundedThree,Area Rounded 3,RectangleAreaRoundedThree,,3,Number,,"RectangleAreaRoundedThree = ROUND((RectangleWidth * RectangleHeight), 3)",,,,
|
|
17
|
+
MathExampleForm,,,,Basic Geometry,Rectangle,2,3,Geometry.Rectangle.AreaRoundedFour,Area Rounded 5,RectangleAreaRoundedFive,,5,Number,,"RectangleAreaRoundedFive = ROUND(RectangleArea, 5)",,,,
|
|
18
|
+
MathExampleForm,,,,Basic Geometry,Circle,1,12,Geometry.Circle.Radius,Radius,CircleRadius,,,Number,,,85.523,,,
|
|
19
|
+
MathExampleForm,,,,Basic Geometry,Circle,2,3,Geometry.Circle.Area,Area,CircleArea,,unrounded,Number,,CircleArea = PI() * CircleRadius^2,,,,
|
|
20
|
+
MathExampleForm,,,,Basic Geometry,Circle,2,3,Geometry.Circle.AreaRoundedDefault,Area Rounded,CircleAreaRoundedDefault,,default,Number,,CircleAreaRoundedDefault = ROUND(PI() * CircleRadius^2),,,,
|
|
21
|
+
MathExampleForm,,,,Basic Geometry,Circle,2,3,Geometry.Circle.AreaRoundedThree,Area Rounded 4,CircleAreaRoundedFour,,4,Number,,"CircleAreaRoundedFour = ROUND(CircleArea,4)",,,,
|
|
22
|
+
MathExampleForm,,,,Basic Geometry,Circle,2,3,Geometry.Circle.AreaRoundedFour,Area Rounded 6,CircleAreaRoundedSix,,6,Number,,"CircleAreaRoundedSix = ROUND(PI() * CircleRadius^2,6)",,,,
|
|
23
|
+
MathExampleForm,,Boxes,1,Box Collection,Boxes,1,1,Boxes,Boxes,Boxes,,,Array,TabularAddress,,,,,
|
|
24
|
+
MathExampleForm,,Boxes,,Box Collection,Boxes,1,1,Identifier,Identifier,BoxIdentifier,,,String,,,,,,
|
|
25
|
+
MathExampleForm,,Boxes,,Box Collection,Boxes,1,1,Width,Width,BoxWidth,,,Number,,,,,,
|
|
26
|
+
MathExampleForm,,Boxes,,Box Collection,Boxes,1,1,Height,Height,BoxHeight,,,Number,,,,,,
|
|
27
|
+
MathExampleForm,,Boxes,,Box Collection,Boxes,1,1,Depth,Depth,BoxDepth,,,Number,,,,,,
|
|
28
|
+
MathExampleForm,,Boxes,,Box Collection,Boxes,1,1,Floorspace,Floorspace,BoxFloorspace,,,Number,,BoxFloorspace = BoxWidth * BoxDepth,,,,
|
|
29
|
+
MathExampleForm,,Boxes,,Box Collection,Boxes,1,1,Volume,Volume,BoxVolume,,,Number,,BoxVolume = BoxFloorspace * BoxHeight,,,,
|
|
30
|
+
MathExampleForm,,,1,Box Summary Data,Box Summary Data,0,0,Boxes[].Floorspace,BoxesFloorspaceSet,BoxesFloorspaceSet,,,Number,,,,,,
|
|
31
|
+
MathExampleForm,,,1,Box Summary Data,Box Summary Data,0,0,Boxes[].Volume,BoxesVolumeSet,BoxesVolumeSet,,,Number,,,,,,
|
|
32
|
+
MathExampleForm,,,1,Box Summary Data,Box Summary Data,0,0,Boxes[].Depth,BoxesDepthSet,BoxesDepthSet,,,Number,,,,,,
|
|
33
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,1,12,BoxAggregate.Count,Box Count,BoxesCount,,,Number,,BoxesCount = COUNT(BoxesFloorspaceSet),,,,
|
|
34
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,2,6,BoxAggregate.AverageFloorspace,Average Floorspace,BoxesAverageFloorspace,,,Number,,BoxesAverageFloorspace = AVG(BoxesFloorspaceSet),,,,
|
|
35
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,2,6,BoxAggregate.TotalFloorspace,Total Floorspace,BoxesTotalFloorspace,,,Number,,BoxesTotalFloorspace = SUM(BoxesFloorspaceSet),,,,
|
|
36
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,3,4,BoxAggregate.AverageVolume,Average Volume,BoxesAverageVolume,,,Number,,BoxesAverageVolume = AVG(BoxesVolumeSet),,,,
|
|
37
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,3,4,BoxAggregate.TotalVolume,Total Volume,BoxesTotalVolume,,,Number,,BoxesTotalVolume = COUNT(BoxesVolumeSet),,,,
|
|
38
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,3,4,BoxAggregate.TotalVolumeRounded,Total Volume Rounded,BoxesTotalVolumeRounded,,,Number,,BoxesTotalVolumeRounded = ROUND(SUM(BoxesVolumeSet)),,,,
|
|
39
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,4,3,BoxAggregate.MinDepth,Minimum Depth,BoxesMinDepth,,,Number,,BoxesMinDepth = MIN(BoxesDepthSet),,,,
|
|
40
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,4,3,BoxAggregate.MeanDepth,Mean Depth,BoxesMeanDepth,,,Number,,BoxesMeanDepth = MEAN(BoxesDepthSet),,,,
|
|
41
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,4,3,BoxAggregate.MedianDepth,Median Depth,BoxesMedianDepth,,,Number,,BoxesMedianDepth = MEDIAN(BoxesDepthSet),,,,
|
|
42
|
+
MathExampleForm,,,,Box Summary Data,Box Summary Data,4,3,BoxAggregate.MaxDepth,Max Depth,BoxesMaxDepth,,,Number,,BoxesMaxDepth = MAX(BoxesDepthSet),,,,
|
|
43
|
+
MathExampleForm,,,,Complex Equation,Complex Equation,1,4,ComplexEquation.PR,PR,CePR,,,Number,,,4.5,,,
|
|
44
|
+
MathExampleForm,,,,Complex Equation,Complex Equation,1,4,ComplexEquation.Z,Z,CeZ,,,Number,,,1.5,,,
|
|
45
|
+
MathExampleForm,,,,Complex Equation,Complex Equation,1,4,ComplexEquation.C,C,CeC,,,Number,,,8.75,,,
|
|
46
|
+
MathExampleForm,,,,Complex Equation,Complex Equation,2,6,ComplexEquation.Result,(160 * PR * Z) / (C / 100) * PR * Z + (160 * (1 - C / 100)),CeResult,,,Number,,CeResult = (160 * CePR * CeZ) / (CeC / 100) * CePR * CeZ + (160 * (1 - CeC / 100)),,,,
|
|
47
|
+
MathExampleForm,,,,Complex Equation,Complex Equation,2,6,ComplexEquation.ResultRounded,Rounded 3,CeResultRounded,,,Number,,"CeResultRounded = ROUND(CeResult,3)",,,,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-form",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
4
4
|
"description": "Pict dynamic form sections",
|
|
5
5
|
"main": "source/Pict-Section-Form.js",
|
|
6
6
|
"directories": {
|
|
@@ -27,22 +27,23 @@
|
|
|
27
27
|
"author": "steven velozo <steven@velozo.com>",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@eslint/js": "^9.
|
|
30
|
+
"@eslint/js": "^9.17.0",
|
|
31
31
|
"browser-env": "^3.3.0",
|
|
32
|
-
"eslint": "^9.
|
|
32
|
+
"eslint": "^9.17.0",
|
|
33
33
|
"jquery": "^3.7.1",
|
|
34
|
-
"pict": "^1.0.
|
|
35
|
-
"pict-application": "^1.0.
|
|
34
|
+
"pict": "^1.0.227",
|
|
35
|
+
"pict-application": "^1.0.23",
|
|
36
36
|
"pict-service-commandlineutility": "^1.0.15",
|
|
37
|
-
"quackage": "^1.0.
|
|
38
|
-
"
|
|
37
|
+
"quackage": "^1.0.36",
|
|
38
|
+
"tui-grid": "^4.21.22",
|
|
39
|
+
"typescript": "^5.7.2"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"fable-serviceproviderbase": "^3.0.15",
|
|
42
43
|
"pict-provider": "^1.0.3",
|
|
43
|
-
"pict-section-tuigrid": "^1.0.
|
|
44
|
-
"pict-template": "^1.0.
|
|
45
|
-
"pict-view": "^1.0.
|
|
44
|
+
"pict-section-tuigrid": "^1.0.27",
|
|
45
|
+
"pict-template": "^1.0.10",
|
|
46
|
+
"pict-view": "^1.0.56"
|
|
46
47
|
},
|
|
47
48
|
"mocha": {
|
|
48
49
|
"diff": true,
|
|
@@ -4,9 +4,9 @@ const libPictSectionForm = require('../Pict-Section-Form.js');
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents a PictSectionFormApplication.
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
8
|
* This is the automagic controller for a dyncamic form application.
|
|
9
|
-
*
|
|
9
|
+
*
|
|
10
10
|
* @class
|
|
11
11
|
* @extends libPictApplication
|
|
12
12
|
*/
|
|
@@ -16,6 +16,8 @@ class PictSectionFormApplication extends libPictApplication
|
|
|
16
16
|
{
|
|
17
17
|
super(pFable, pOptions, pServiceHash);
|
|
18
18
|
|
|
19
|
+
/** @type {import('pict') & import('fable')} */
|
|
20
|
+
this.pict;
|
|
19
21
|
// Add the pict form service
|
|
20
22
|
this.pict.addServiceType('PictSectionForm', libPictSectionForm);
|
|
21
23
|
|
|
@@ -17,10 +17,10 @@ class PictDynamicInput extends libPictProvider
|
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* Creates an instance of the PictDynamicInput class.
|
|
20
|
-
*
|
|
21
|
-
* @param {
|
|
22
|
-
* @param {
|
|
23
|
-
* @param {
|
|
20
|
+
*
|
|
21
|
+
* @param {import('pict')} pFable - The fable object.
|
|
22
|
+
* @param {any} [pOptions={}] - The options object.
|
|
23
|
+
* @param {string} [pServiceHash] - The service hash object.
|
|
24
24
|
*/
|
|
25
25
|
constructor(pFable, pOptions, pServiceHash)
|
|
26
26
|
{
|
|
@@ -33,8 +33,8 @@ class PictDynamicInput extends libPictProvider
|
|
|
33
33
|
/**
|
|
34
34
|
* Retrieves the template hash for the input based on the provided view and input.
|
|
35
35
|
*
|
|
36
|
-
* @param {View} pView - The view object.
|
|
37
|
-
* @param {
|
|
36
|
+
* @param {import('../views/Pict-View-DynamicForm')} pView - The view object.
|
|
37
|
+
* @param {any} pInput - The input object.
|
|
38
38
|
* @returns {string|boolean} - The template hash if found, otherwise false.
|
|
39
39
|
*/
|
|
40
40
|
getInputTemplateHash(pView, pInput)
|
|
@@ -89,7 +89,7 @@ class PictDynamicInput extends libPictProvider
|
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
91
|
* Adds a default input provider for a given template full hash.
|
|
92
|
-
*
|
|
92
|
+
*
|
|
93
93
|
* @param {string} pTemplateFullHash - The full hash of the template.
|
|
94
94
|
* @param {any} pProvider - The provider to be added.
|
|
95
95
|
*/
|
|
@@ -108,7 +108,7 @@ class PictDynamicInput extends libPictProvider
|
|
|
108
108
|
/**
|
|
109
109
|
* Retrieves the default input providers based on the given view and input.
|
|
110
110
|
*
|
|
111
|
-
* @param {
|
|
111
|
+
* @param {import('../views/Pict-View-DynamicForm')} pView - The view object.
|
|
112
112
|
* @param {string} pInput - The input to retrieve input providers for.
|
|
113
113
|
* @returns {Array} An array of default input providers.
|
|
114
114
|
*/
|
|
@@ -124,4 +124,4 @@ class PictDynamicInput extends libPictProvider
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
module.exports = PictDynamicInput;
|
|
127
|
-
module.exports.default_configuration = _DefaultProviderConfiguration;
|
|
127
|
+
module.exports.default_configuration = _DefaultProviderConfiguration;
|
|
@@ -17,7 +17,7 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* Creates an instance of the PictDynamicInputEvents class.
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
21
|
* @param {object} pFable - The fable object.
|
|
22
22
|
* @param {object} pOptions - The options object.
|
|
23
23
|
* @param {object} pServiceHash - The service hash object.
|
|
@@ -30,7 +30,7 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Requests input data from the view based on the provided input hash.
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
34
|
* @param {Object} pView - The view object.
|
|
35
35
|
* @param {string} pInputHash - The input hash.
|
|
36
36
|
*/
|
|
@@ -112,7 +112,7 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
112
112
|
/**
|
|
113
113
|
* Requests input data for a tabular record.
|
|
114
114
|
*
|
|
115
|
-
* @param {
|
|
115
|
+
* @param {import('../views/Pict-View-DynamicForm')} pView - The view object.
|
|
116
116
|
* @param {number} pGroupIndex - The index of the group.
|
|
117
117
|
* @param {number} pInputIndex - The index of the input.
|
|
118
118
|
* @param {number} pRowIndex - The index of the row.
|
|
@@ -145,7 +145,7 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
145
145
|
}
|
|
146
146
|
catch (pError)
|
|
147
147
|
{
|
|
148
|
-
pView.log.error(`Dynamic form [${pView.Hash}]::[${pView.UUID}] gross error marshaling specific (${
|
|
148
|
+
pView.log.error(`Dynamic form [${pView.Hash}]::[${pView.UUID}] gross error marshaling specific (${pGroupIndex} | ${pInputIndex} | ${pRowIndex}) tabular data for group ${pGroupIndex} row ${pRowIndex} from view in dataChanged event: ${pError}`);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
else
|
|
@@ -175,7 +175,7 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
175
175
|
try
|
|
176
176
|
{
|
|
177
177
|
let tmpMarshalDestinationObject = pView.getMarshalDestinationObject();
|
|
178
|
-
|
|
178
|
+
|
|
179
179
|
// TODO: Can we simplify pView?
|
|
180
180
|
let tmpValueAddress = pView.pict.providers.Informary.getComposedContainerAddress(tmpInput.PictForm.InformaryContainerAddress, pRowIndex, tmpInput.PictForm.InformaryDataAddress);
|
|
181
181
|
let tmpValue = pView.sectionManifest.getValueByHash(tmpMarshalDestinationObject, tmpValueAddress);
|
|
@@ -196,7 +196,7 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
196
196
|
}
|
|
197
197
|
catch (pError)
|
|
198
198
|
{
|
|
199
|
-
pView.log.error(`Dynamic form [${pView.Hash}]::[${pView.UUID}] gross error marshaling specific (${
|
|
199
|
+
pView.log.error(`Dynamic form [${pView.Hash}]::[${pView.UUID}] gross error marshaling specific (${pGroupIndex} | ${pInputIndex} | ${pRowIndex}) tabular data for group ${pGroupIndex} row ${pRowIndex} from view in calling inputEvent ${pEvent}: ${pError}`);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
else
|
|
@@ -211,4 +211,4 @@ class PictDynamicInputEvents extends libPictProvider
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
module.exports = PictDynamicInputEvents;
|
|
214
|
-
module.exports.default_configuration = _DefaultProviderConfiguration;
|
|
214
|
+
module.exports.default_configuration = _DefaultProviderConfiguration;
|
|
@@ -17,7 +17,7 @@ class PictDynamicLayout extends libPictProvider
|
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* Creates an instance of the PictDynamicLayout class.
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
21
|
* @param {object} pFable - The fable object.
|
|
22
22
|
* @param {object} pOptions - The options object.
|
|
23
23
|
* @param {object} pServiceHash - The service hash object.
|
|
@@ -30,10 +30,10 @@ class PictDynamicLayout extends libPictProvider
|
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Generate a group layout template for the Dynamically Generated views.
|
|
33
|
-
*
|
|
33
|
+
*
|
|
34
34
|
* @param {object} pView - The view to generate the dynamic group layout for
|
|
35
35
|
* @param {object} pGroup - The group to generate and inject dynamic layout templates
|
|
36
|
-
* @returns
|
|
36
|
+
* @returns
|
|
37
37
|
*/
|
|
38
38
|
generateGroupLayoutTemplate(pView, pGroup)
|
|
39
39
|
{
|
|
@@ -41,12 +41,12 @@ class PictDynamicLayout extends libPictProvider
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* After a group template has been rendered, this lets a layout initialize any controls that
|
|
44
|
+
* After a group template has been rendered, this lets a layout initialize any controls that
|
|
45
45
|
* are necessary (e.g. a custom input type or such).
|
|
46
|
-
*
|
|
46
|
+
*
|
|
47
47
|
* @param {object} pView - The view to initialize the newly rendered control for
|
|
48
48
|
* @param {object} pGroup - The group to initialize the newly rendered control for
|
|
49
|
-
* @returns
|
|
49
|
+
* @returns
|
|
50
50
|
*/
|
|
51
51
|
onGroupLayoutInitialize(pView, pGroup)
|
|
52
52
|
{
|
|
@@ -55,7 +55,7 @@ class PictDynamicLayout extends libPictProvider
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* This fires after data has been marshaled to the form from the model.
|
|
58
|
-
*
|
|
58
|
+
*
|
|
59
59
|
* @param {object} pView - The view to initialize the newly rendered control for
|
|
60
60
|
* @param {object} pGroup - The group to initialize the newly rendered control for
|
|
61
61
|
* @returns {boolean}
|
|
@@ -67,4 +67,4 @@ class PictDynamicLayout extends libPictProvider
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
module.exports = PictDynamicLayout;
|
|
70
|
-
module.exports.default_configuration = _DefaultProviderConfiguration;
|
|
70
|
+
module.exports.default_configuration = _DefaultProviderConfiguration;
|
|
@@ -12,7 +12,7 @@ const _DefaultProviderConfiguration = (
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The PictRecordSet class is a provider to read and write record sets.
|
|
15
|
-
*
|
|
15
|
+
*
|
|
16
16
|
* Record sets are bodies of records that are larger than what we would want to
|
|
17
17
|
* be projected into a view.
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ class PictRecordSet extends libPictProvider
|
|
|
20
20
|
{
|
|
21
21
|
/**
|
|
22
22
|
* Creates an instance of the PictRecordSet class.
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* @param {object} pFable - The fable object.
|
|
25
25
|
* @param {object} pOptions - The options object.
|
|
26
26
|
* @param {object} pServiceHash - The service hash object.
|
|
@@ -35,7 +35,7 @@ class PictRecordSet extends libPictProvider
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* Returns the count for a specific dynamic record set.
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
39
|
* @param {Object} pFilter - The filter object.
|
|
40
40
|
* @param {Function} fCallback - The callback function to be called after the count is returned.
|
|
41
41
|
* @returns {any} - The result of the callback function.
|
|
@@ -47,7 +47,7 @@ class PictRecordSet extends libPictProvider
|
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Reads a record list.
|
|
50
|
-
*
|
|
50
|
+
*
|
|
51
51
|
* @param {Object} pFilter - The filter object.
|
|
52
52
|
* @param {Function} fCallback - The callback function to be called after the record list is read.
|
|
53
53
|
* @returns {any} - The result of the callback function.
|
|
@@ -59,7 +59,7 @@ class PictRecordSet extends libPictProvider
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Reads a record.
|
|
62
|
-
*
|
|
62
|
+
*
|
|
63
63
|
* @param {Object} pFilter - The filter object.
|
|
64
64
|
* @param {Function} fCallback - The callback function to be called after the record is read.
|
|
65
65
|
* @returns {any} - The result of the callback function.
|
|
@@ -71,7 +71,7 @@ class PictRecordSet extends libPictProvider
|
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Writes a record.
|
|
74
|
-
*
|
|
74
|
+
*
|
|
75
75
|
* @param {Object} pRecord - The record to be written.
|
|
76
76
|
* @param {Function} fCallback - The callback function to be called after the record is written.
|
|
77
77
|
* @returns {any} - The result of the callback function.
|
|
@@ -25,7 +25,7 @@ class PictDynamicSolver extends libPictProvider
|
|
|
25
25
|
{
|
|
26
26
|
/**
|
|
27
27
|
* Creates an instance of the PictDynamicSolver class.
|
|
28
|
-
*
|
|
28
|
+
*
|
|
29
29
|
* @param {object} pFable - The fable object.
|
|
30
30
|
* @param {object} pOptions - The options object.
|
|
31
31
|
* @param {object} pServiceHash - The service hash object.
|
|
@@ -35,6 +35,17 @@ class PictDynamicSolver extends libPictProvider
|
|
|
35
35
|
let tmpOptions = Object.assign({}, JSON.parse(JSON.stringify(_DefaultProviderConfiguration)), pOptions);
|
|
36
36
|
super(pFable, tmpOptions, pServiceHash);
|
|
37
37
|
|
|
38
|
+
/** @type {import('pict')} */
|
|
39
|
+
this.pict;
|
|
40
|
+
/** @type {import('pict') & { instantiateServiceProviderIfNotExists: (hash: string) => any }} */
|
|
41
|
+
this.fable;
|
|
42
|
+
/** @type {any} */
|
|
43
|
+
this.log;
|
|
44
|
+
/** @type {string} */
|
|
45
|
+
this.UUID;
|
|
46
|
+
/** @type {string} */
|
|
47
|
+
this.Hash;
|
|
48
|
+
|
|
38
49
|
// Initialize the solver service if it isn't up
|
|
39
50
|
this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');
|
|
40
51
|
|
|
@@ -42,15 +53,15 @@ class PictDynamicSolver extends libPictProvider
|
|
|
42
53
|
{
|
|
43
54
|
this.pict.addProvider('DynamicMetaLists', libDynamicMetaLists.default_configuration, libDynamicMetaLists);
|
|
44
55
|
}
|
|
45
|
-
if (!this.pict.providers['Pict-Input-Select'])
|
|
56
|
+
if (!this.pict.providers['Pict-Input-Select'])
|
|
46
57
|
{
|
|
47
58
|
this.pict.addProvider('Pict-Input-Select', libInputSelect.default_configuration, libInputSelect);
|
|
48
59
|
}
|
|
49
|
-
if (!this.pict.providers['Pict-Input-DateTime'])
|
|
60
|
+
if (!this.pict.providers['Pict-Input-DateTime'])
|
|
50
61
|
{
|
|
51
62
|
this.pict.addProvider('Pict-Input-DateTime', libInputDateTime.default_configuration, libInputDateTime);
|
|
52
63
|
}
|
|
53
|
-
if (!this.pict.providers['Pict-Input-TabSelector'])
|
|
64
|
+
if (!this.pict.providers['Pict-Input-TabSelector'])
|
|
54
65
|
{
|
|
55
66
|
this.pict.addProvider('Pict-Input-TabSelector', libInputTabSelector.default_configuration, libInputTabSelector);
|
|
56
67
|
}
|
|
@@ -66,12 +77,12 @@ class PictDynamicSolver extends libPictProvider
|
|
|
66
77
|
|
|
67
78
|
/**
|
|
68
79
|
* Checks the solver and returns the solver object if it passes the checks.
|
|
69
|
-
*
|
|
80
|
+
*
|
|
70
81
|
* Automatically converts string solvers to have an Ordinal of 1.
|
|
71
|
-
*
|
|
82
|
+
*
|
|
72
83
|
* @param {string|object} pSolver - The solver to be checked. It can be either a string or an object.
|
|
73
|
-
* @param {boolean} pFiltered - Indicates whether the solvers should be filtered.
|
|
74
|
-
* @param {number} pOrdinal - The ordinal value to compare with the solver's ordinal value when filtered.
|
|
84
|
+
* @param {boolean} [pFiltered=false] - Indicates whether the solvers should be filtered.
|
|
85
|
+
* @param {number} [pOrdinal] - The ordinal value to compare with the solver's ordinal value when filtered.
|
|
75
86
|
* @returns {object|undefined} - The solver object if it passes the checks, otherwise undefined.
|
|
76
87
|
*/
|
|
77
88
|
checkSolver(pSolver, pFiltered, pOrdinal)
|
|
@@ -87,7 +98,7 @@ class PictDynamicSolver extends libPictProvider
|
|
|
87
98
|
}
|
|
88
99
|
if (!('Expression' in tmpSolver))
|
|
89
100
|
{
|
|
90
|
-
this.
|
|
101
|
+
this.log.error(`Dynamic View solver ${pOrdinal} is missing the Expression property.`, { Solver: pSolver });
|
|
91
102
|
return;
|
|
92
103
|
}
|
|
93
104
|
if (!(`Ordinal` in tmpSolver))
|
|
@@ -106,7 +117,7 @@ class PictDynamicSolver extends libPictProvider
|
|
|
106
117
|
|
|
107
118
|
/**
|
|
108
119
|
* Runs each RecordSet solver formulae for a dynamic view group at a given ordinal.
|
|
109
|
-
*
|
|
120
|
+
*
|
|
110
121
|
* Or for all ordinals if no ordinal is passed.
|
|
111
122
|
*
|
|
112
123
|
* @param {array} pGroupSolverArray - An array of Solvers from the groups to solve.
|
|
@@ -116,7 +127,7 @@ class PictDynamicSolver extends libPictProvider
|
|
|
116
127
|
{
|
|
117
128
|
// This is purely for readability of the code below ... uglify optimizes it out.
|
|
118
129
|
let tmpFiltered = (typeof(pOrdinal) === 'undefined') ? false : true;
|
|
119
|
-
|
|
130
|
+
|
|
120
131
|
// Solve the group RecordSet solvers first
|
|
121
132
|
for (let j = 0; j < pGroupSolverArray.length; j++)
|
|
122
133
|
{
|
|
@@ -178,7 +189,7 @@ class PictDynamicSolver extends libPictProvider
|
|
|
178
189
|
executeSectionSolvers(pViewSectionSolverArray, pOrdinal)
|
|
179
190
|
{
|
|
180
191
|
let tmpFiltered = (typeof(pOrdinal) === 'undefined') ? false : true;
|
|
181
|
-
|
|
192
|
+
|
|
182
193
|
for (let i = 0; i < pViewSectionSolverArray.length; i++)
|
|
183
194
|
{
|
|
184
195
|
let tmpView = this.pict.views[pViewSectionSolverArray[i].ViewHash];
|
|
@@ -215,7 +226,7 @@ class PictDynamicSolver extends libPictProvider
|
|
|
215
226
|
executeViewSolvers(pViewSolverArray, pOrdinal)
|
|
216
227
|
{
|
|
217
228
|
let tmpFiltered = (typeof(pOrdinal) === 'undefined') ? false : true;
|
|
218
|
-
|
|
229
|
+
|
|
219
230
|
for (let i = 0; i < pViewSolverArray.length; i++)
|
|
220
231
|
{
|
|
221
232
|
let tmpSolver = this.checkSolver(pViewSolverArray[i].Solver, tmpFiltered, pOrdinal);
|
|
@@ -225,22 +236,22 @@ class PictDynamicSolver extends libPictProvider
|
|
|
225
236
|
}
|
|
226
237
|
tmpSolver.Hash = `${pViewSolverArray[i].ViewHash}-ViewSolve-${i}`;
|
|
227
238
|
tmpSolver.StartTimeStamp = +new Date();
|
|
239
|
+
let tmpView = this.pict.views[pViewSolverArray[i].ViewHash];
|
|
228
240
|
if (this.pict.LogNoisiness > 1)
|
|
229
241
|
{
|
|
230
242
|
tmpView.log.trace(`Dynamic View [${tmpView.UUID}]::[${tmpView.Hash}] running solve() on view [${pViewSolverArray[i].ViewHash}`);
|
|
231
243
|
}
|
|
232
244
|
// Solve with the normal view solve() pipeline
|
|
233
|
-
let tmpView = this.pict.views[pViewSolverArray[i].ViewHash];
|
|
234
245
|
tmpView.solve();
|
|
235
246
|
tmpSolver.EndTimeStamp = +new Date();
|
|
236
247
|
}
|
|
237
248
|
}
|
|
238
249
|
|
|
239
250
|
/**
|
|
240
|
-
* Checks if the given ordinal exists in the provided ordinal set.
|
|
241
|
-
*
|
|
251
|
+
* Checks if the given ordinal exists in the provided ordinal set.
|
|
252
|
+
*
|
|
242
253
|
* If not, it adds the ordinal to the set.
|
|
243
|
-
*
|
|
254
|
+
*
|
|
244
255
|
* @param {number} pOrdinal - The ordinal to check.
|
|
245
256
|
* @param {Object} pOrdinalSet - The ordinal set to check against.
|
|
246
257
|
* @returns {Object} - The ordinal object from the ordinal set.
|
|
@@ -258,18 +269,18 @@ class PictDynamicSolver extends libPictProvider
|
|
|
258
269
|
* Solves the views based on the provided view hashes or all views in pict.
|
|
259
270
|
*
|
|
260
271
|
* If non-dynamic views are also passed in, they are solved as well.
|
|
261
|
-
*
|
|
262
|
-
* This algorithm is particularly complex because it solves views in
|
|
272
|
+
*
|
|
273
|
+
* This algorithm is particularly complex because it solves views in
|
|
263
274
|
* order across two dimensions:
|
|
264
|
-
*
|
|
275
|
+
*
|
|
265
276
|
* 1. The order of the views in the view hash array.
|
|
266
277
|
* 2. Precedence order (based on Ordinal)
|
|
267
|
-
*
|
|
268
|
-
* The way it manages the precedence order solving is by enumerating the
|
|
278
|
+
*
|
|
279
|
+
* The way it manages the precedence order solving is by enumerating the
|
|
269
280
|
* view hash array multiple times until it exhausts the solution set.
|
|
270
|
-
*
|
|
271
|
-
* In dynamic views, when there are collisions in precedence order between
|
|
272
|
-
* Section Solvers and Group RecordSet Solvers, it prefers the RecordSet
|
|
281
|
+
*
|
|
282
|
+
* In dynamic views, when there are collisions in precedence order between
|
|
283
|
+
* Section Solvers and Group RecordSet Solvers, it prefers the RecordSet
|
|
273
284
|
* solvers first. The thinking behind this is that a RecordSet solver is
|
|
274
285
|
* a "tier down" from the core Section it resides within. These are
|
|
275
286
|
* leaves on the tree.
|
|
@@ -343,9 +354,9 @@ class PictDynamicSolver extends libPictProvider
|
|
|
343
354
|
this.log.trace(`DynamicSolver [${this.UUID}]::[${this.Hash}] Solving ordinal ${tmpOrdinalKeys[i]}`);
|
|
344
355
|
}
|
|
345
356
|
let tmpOrdinalContainer = tmpOrdinalsToSolve[tmpOrdinalKeys[i]];
|
|
346
|
-
this.executeGroupSolvers(tmpOrdinalContainer.GroupSolvers, tmpOrdinalKeys[i]);
|
|
347
|
-
this.executeSectionSolvers(tmpOrdinalContainer.SectionSolvers, tmpOrdinalKeys[i]);
|
|
348
|
-
this.executeViewSolvers(tmpOrdinalContainer.ViewSolvers, tmpOrdinalKeys[i]);
|
|
357
|
+
this.executeGroupSolvers(tmpOrdinalContainer.GroupSolvers, Number(tmpOrdinalKeys[i]));
|
|
358
|
+
this.executeSectionSolvers(tmpOrdinalContainer.SectionSolvers, Number(tmpOrdinalKeys[i]));
|
|
359
|
+
this.executeViewSolvers(tmpOrdinalContainer.ViewSolvers, Number(tmpOrdinalKeys[i]));
|
|
349
360
|
}
|
|
350
361
|
|
|
351
362
|
// Now regenerate the metalists .. after the solve has happened.
|