pict-section-form 1.0.85 → 1.0.87
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/example_applications/simple_form/Simple-Form_Default_Manifest.json +30 -3
- package/package.json +1 -1
- package/source/providers/dynamictemplates/Pict-DynamicTemplates-DefaultFormTemplates.js +13 -0
- package/source/providers/inputs/Pict-Provider-Input-PreciseNumber.js +15 -1
- package/types/source/providers/inputs/Pict-Provider-Input-PreciseNumber.d.ts +3 -1
- package/types/source/providers/inputs/Pict-Provider-Input-PreciseNumber.d.ts.map +1 -1
- package/types/source/views/Pict-View-Form-Metacontroller.d.ts.map +1 -1
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
[
|
|
15
15
|
"Area = Height * Width",
|
|
16
16
|
"WidthCubeArea = Width ^ 3",
|
|
17
|
-
"HeightCubeArea = Height ^ 3"
|
|
17
|
+
"HeightCubeArea = Height ^ 3",
|
|
18
|
+
"DTPN = Height * Width",
|
|
19
|
+
"ITPNRO = Height * Width",
|
|
20
|
+
"ITDRO = Height * Width",
|
|
21
|
+
"ITPRO = Height * Width"
|
|
18
22
|
],
|
|
19
23
|
"MetaTemplates":
|
|
20
24
|
[
|
|
@@ -79,8 +83,31 @@
|
|
|
79
83
|
{
|
|
80
84
|
"Name":"Area of Rectangle",
|
|
81
85
|
"Hash":"Area",
|
|
82
|
-
"DataType":"
|
|
83
|
-
|
|
86
|
+
"DataType":"PreciseNumber"
|
|
87
|
+
|
|
88
|
+
,"PictForm": {"Section":"Area", "Row":4, "Width":2 }
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
"DTPN":
|
|
92
|
+
{
|
|
93
|
+
"Name":"DataType PreciseNumber",
|
|
94
|
+
"Hash":"DTPN",
|
|
95
|
+
"DataType":"PreciseNumber"
|
|
96
|
+
,"PictForm": {"InputType": "PreciseNumberReadOnly", "Section":"Marshaling", "Row":1, "Width":3 }
|
|
97
|
+
},
|
|
98
|
+
"ITPNRO":
|
|
99
|
+
{
|
|
100
|
+
"Name":"InputType PreciseNumberReadOnly",
|
|
101
|
+
"Hash":"ITPNRO",
|
|
102
|
+
"DataType":"PreciseNumber",
|
|
103
|
+
"InputType": "PreciseNumberReadOnly"
|
|
104
|
+
,"PictForm": {
|
|
105
|
+
"InputType": "PreciseNumberReadOnly",
|
|
106
|
+
"DecimalPrecision": 2,
|
|
107
|
+
"AddCommas": false,
|
|
108
|
+
"DigitsPrefix": "$",
|
|
109
|
+
"DigitsPostfix": " (estimated)",
|
|
110
|
+
"Section":"Marshaling", "Row":1, "Width":3 }
|
|
84
111
|
}
|
|
85
112
|
}
|
|
86
113
|
}
|
package/package.json
CHANGED
|
@@ -180,6 +180,19 @@ Glug glug glug Oo... -->
|
|
|
180
180
|
|
|
181
181
|
`
|
|
182
182
|
},
|
|
183
|
+
|
|
184
|
+
{
|
|
185
|
+
"HashPostfix": "-Template-Input-InputType-PreciseNumberReadOnly",
|
|
186
|
+
"DefaultInputExtensions": ["Pict-Input-PreciseNumber"],
|
|
187
|
+
"Template": /*HTML*/`
|
|
188
|
+
<!-- InputType PreciseNumberReadOnly {~D:Record.Hash~} {~D:Record.DataType~} -->
|
|
189
|
+
<span>{~D:Record.Name~}:</span>
|
|
190
|
+
<input type="hidden" {~D:Record.Macro.InputFullProperties~} value="">
|
|
191
|
+
<input type="text" id="INPUT-FOR-{~D:Record.Macro.RawHTMLID~}" {~D:Record.Macro.InputChangeHandler~} value="" readonly="readonly">
|
|
192
|
+
|
|
193
|
+
`
|
|
194
|
+
},
|
|
195
|
+
|
|
183
196
|
{
|
|
184
197
|
"HashPostfix": "-Template-Input-InputType-TextArea",
|
|
185
198
|
"Template": /*HTML*/`
|
|
@@ -15,7 +15,7 @@ class CustomInputHandler extends libPictSectionInputExtension
|
|
|
15
15
|
|
|
16
16
|
/** @type {import('pict')} */
|
|
17
17
|
this.pict;
|
|
18
|
-
/** @type {import('pict') & { Math: any }} */
|
|
18
|
+
/** @type {import('pict') & { Math: any } & { DataFormat: any }} */
|
|
19
19
|
this.fable;
|
|
20
20
|
/** @type {any} */
|
|
21
21
|
this.log;
|
|
@@ -42,6 +42,20 @@ class CustomInputHandler extends libPictSectionInputExtension
|
|
|
42
42
|
tmpValue = this.fable.Math.roundPrecise(tmpValue, pInput.PictForm.DecimalPrecision, tmpRoundingMethod);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
if (('AddCommas' in pInput.PictForm) && pInput.PictForm.AddCommas)
|
|
46
|
+
{
|
|
47
|
+
tmpValue = this.fable.DataFormat.formatterAddCommasToNumber(tmpValue);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if ('DigitsPrefix' in pInput.PictForm)
|
|
51
|
+
{
|
|
52
|
+
tmpValue = pInput.PictForm.DigitsPrefix + tmpValue;
|
|
53
|
+
}
|
|
54
|
+
if ('DigitsPostfix' in pInput.PictForm)
|
|
55
|
+
{
|
|
56
|
+
tmpValue = tmpValue + pInput.PictForm.DigitsPostfix;
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
return tmpValue;
|
|
46
60
|
}
|
|
47
61
|
|
|
@@ -10,9 +10,11 @@ declare class CustomInputHandler extends libPictSectionInputExtension {
|
|
|
10
10
|
constructor(pFable: any, pOptions: any, pServiceHash: any);
|
|
11
11
|
/** @type {import('pict')} */
|
|
12
12
|
pict: import("pict");
|
|
13
|
-
/** @type {import('pict') & { Math: any }} */
|
|
13
|
+
/** @type {import('pict') & { Math: any } & { DataFormat: any }} */
|
|
14
14
|
fable: import("pict") & {
|
|
15
15
|
Math: any;
|
|
16
|
+
} & {
|
|
17
|
+
DataFormat: any;
|
|
16
18
|
};
|
|
17
19
|
/** @type {any} */
|
|
18
20
|
log: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-Provider-Input-PreciseNumber.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-PreciseNumber.js"],"names":[],"mappings":";AAEA;;;;;;GAMG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,
|
|
1
|
+
{"version":3,"file":"Pict-Provider-Input-PreciseNumber.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-PreciseNumber.js"],"names":[],"mappings":";AAEA;;;;;;GAMG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,mEAAmE;IACnE,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,IAAI,EAAE,GAAG,CAAA;KAAE,GAAG;QAAE,UAAU,EAAE,GAAG,CAAA;KAAE,CACrD;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAGT,0CAoCC;IAED;;;;;;;;;;OAUG;IACH,6EAJW,GAAG,iBACH,MAAM,GACJ,OAAO,CAMnB;IAED;;;;;;;;;;OAUG;IACH,yEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pict-View-Form-Metacontroller.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-Form-Metacontroller.js"],"names":[],"mappings":";AASA;;GAEG;AAEH;;;;;;GAMG;AACH;IAEC,2DAeC;IAPA,+BAAuC;IAEvC,yBAA2B;IAE3B,wBAAsF;IAEtF,cAAkC;IAGnC;;;;OAIG;IACH,qBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mCAGC;IAED;;;OAGG;IACH,6BAFW,MAAM,OAKhB;IAED,yCAYC;IAED;;;;;OAKG;IACH,kCAHW,aAAa,GACX,IAAI,CAchB;IA2BD;;;;OAIG;IACH,WAFa,GAAG,CAMf;IAED,gDAGC;IAED,+CAGC;IAED;;;;;;;;OAQG;IACH,wDAHW,YAAY,SAmHtB;IAED;;;;;;;OAOG;IACH,4CAHW,MAAM,GACJ,IAAI,CAShB;IAED;;;;OAIG;IACH,6BAFa,IAAI,CAQhB;IAED;;;;;;;OAOG;IACH,+DAFW,YAAY,QAatB;IAED;;;;;OAKG;IACH,8EAFW,YAAY,QAmBtB;IAED;;;;;;OAMG;IACH,oEAHW,YAAY,GACV,IAAI,CAkDhB;IAED;;;;;OAKG;IACH,qCAHW,MAAM,GACJ,MAAM,GAAC,OAAO,CA2C1B;IAED;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"Pict-View-Form-Metacontroller.d.ts","sourceRoot":"","sources":["../../../source/views/Pict-View-Form-Metacontroller.js"],"names":[],"mappings":";AASA;;GAEG;AAEH;;;;;;GAMG;AACH;IAEC,2DAeC;IAPA,+BAAuC;IAEvC,yBAA2B;IAE3B,wBAAsF;IAEtF,cAAkC;IAGnC;;;;OAIG;IACH,qBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mCAGC;IAED;;;OAGG;IACH,6BAFW,MAAM,OAKhB;IAED,yCAYC;IAED;;;;;OAKG;IACH,kCAHW,aAAa,GACX,IAAI,CAchB;IA2BD;;;;OAIG;IACH,WAFa,GAAG,CAMf;IAED,gDAGC;IAED,+CAGC;IAED;;;;;;;;OAQG;IACH,wDAHW,YAAY,SAmHtB;IAED;;;;;;;OAOG;IACH,4CAHW,MAAM,GACJ,IAAI,CAShB;IAED;;;;OAIG;IACH,6BAFa,IAAI,CAQhB;IAED;;;;;;;OAOG;IACH,+DAFW,YAAY,QAatB;IAED;;;;;OAKG;IACH,8EAFW,YAAY,QAmBtB;IAED;;;;;;OAMG;IACH,oEAHW,YAAY,GACV,IAAI,CAkDhB;IAED;;;;;OAKG;IACH,qCAHW,MAAM,GACJ,MAAM,GAAC,OAAO,CA2C1B;IAED;;;;;OAKG;IACH,qEA+HC;IA3GA,yBAAiD;IA6GlD;;;OAGG;IACH,gCAFW,MAAM,QAgBhB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,4BAEL,sBAAsB,CAWjC;IAED;;;;OAIG;IACH,4BAFa,OAAO,CAKnB;CACD;;;;;;;;;;;;;;;;;;;;;;;;;;oBA1oBY,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM"}
|