pict-section-form 1.0.138 → 1.0.140

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.
@@ -37,7 +37,9 @@ class RecordLayout extends libPictSectionGroupLayout
37
37
  tmpTemplate += tmpMetatemplateGenerator.getMetatemplateTemplateReference(pView, `-Template-Group-Prefix`, `getGroup("${pGroup.GroupIndex}")`);
38
38
  for (let j = 0; j < pGroup.Rows.length; j++)
39
39
  {
40
- let tmpRow = pGroup.Rows[j];
40
+ // TODO: Validate that the row exists? Bootstrap seems to have it here.
41
+ let tmpRow = pGroup.Rows[j]
42
+ tmpRow.WidthTotalRaw = 0;
41
43
 
42
44
  tmpTemplate += tmpMetatemplateGenerator.getMetatemplateTemplateReference(pView, `-Template-Row-Prefix`, `getGroup("${pGroup.GroupIndex}")`);
43
45
 
@@ -48,9 +50,56 @@ class RecordLayout extends libPictSectionGroupLayout
48
50
  tmpInput.PictForm.InputIndex = k;
49
51
  tmpInput.PictForm.GroupIndex = pGroup.GroupIndex;
50
52
  tmpInput.PictForm.RowIndex = j;
53
+ let tmpInputWidth = 1;
54
+ try
55
+ {
56
+ tmpInputWidth = Math.abs(parseFloat(tmpInput.PictForm.Width));
57
+ }
58
+ catch (pParseError)
59
+ {
60
+ tmpInputWidth = 1;
61
+ }
62
+ if (!tmpInputWidth || isNaN(tmpInputWidth) || tmpInputWidth <= 0)
63
+ {
64
+ tmpInputWidth = 1;
65
+ }
66
+ tmpInput.PictForm.RawWidth = tmpInputWidth;
67
+ tmpRow.WidthTotalRaw += tmpInputWidth;
68
+
69
+ //tmpTemplate += tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(pView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("${pGroup.GroupIndex}","${j}","${k}")`);
70
+ }
71
+ // Now that we've gotten all the raw widths for the row, quantize them properly.
72
+ // Default by quantizing to 99 percentage units wide
73
+ let tmpGroupQuantizedWidth = 95;
74
+ if ('WidthQuantization' in pGroup)
75
+ {
76
+ try
77
+ {
78
+ tmpGroupQuantizedWidth = Math.abs(parseInt(pGroup.WidthQuantization));
79
+ if (!tmpGroupQuantizedWidth || isNaN(tmpGroupQuantizedWidth) || tmpGroupQuantizedWidth <= 0)
80
+ {
81
+ tmpGroupQuantizedWidth = 95;
82
+ }
83
+ }
84
+ catch(pParseError)
85
+ {
86
+ // TODO: UGH THIS IS NaN at the moment.......
87
+ tmpGroupQuantizedWidth = 95;
88
+ }
89
+ }
90
+ else if ('WidthQuantization' in this.pict.PictApplication.options)
91
+ {
92
+ tmpGroupQuantizedWidth = this.pict.PictApplication.options.WidthQuantization;
93
+ }
94
+ for (let k = 0; k < tmpRow.Inputs.length; k++)
95
+ {
96
+ let tmpInput = tmpRow.Inputs[k];
97
+ tmpInput.PictForm.QuantizedWidth = Math.round((tmpInput.PictForm.RawWidth / tmpRow.WidthTotalRaw) * tmpGroupQuantizedWidth);
98
+ //this.fable.log.trace(`Quantized input width for Group ${pGroup.GroupIndex} Row ${j} Input ${k} (${tmpInput.Name}) to ${tmpInput.PictForm.QuantizedWidth} (Raw: ${tmpInput.PictForm.RawWidth} / Total Raw: ${tmpRow.WidthTotalRaw} / Group Quantization: ${tmpGroupQuantizedWidth})`);
51
99
 
52
100
  tmpTemplate += tmpMetatemplateGenerator.getInputMetatemplateTemplateReference(pView, tmpInput.DataType, tmpInput.PictForm.InputType, `getInput("${pGroup.GroupIndex}","${j}","${k}")`);
53
101
  }
102
+
54
103
  tmpTemplate += tmpMetatemplateGenerator.getMetatemplateTemplateReference(pView, `-Template-Row-Postfix`, `getGroup("${pGroup.GroupIndex}")`);
55
104
  }
56
105
  tmpTemplate += tmpMetatemplateGenerator.getMetatemplateTemplateReference(pView, `-Template-Group-Postfix`, `getGroup("${pGroup.GroupIndex}")`);
@@ -903,7 +903,7 @@ class PictFormMetacontroller extends libPictViewClass
903
903
  {
904
904
  let tmpDescriptor = tmpManifest.elementDescriptors[tmpDescriptorKeys[i]];
905
905
 
906
- if (tmpDescriptor && tmpDescriptor.PictForm)
906
+ if (tmpDescriptor)
907
907
  {
908
908
  this.pict.manifest.addDescriptor(tmpDescriptorKeys[i], tmpDescriptor);
909
909
  }
@@ -18,6 +18,7 @@ declare class PictDynamicSolver extends libPictProvider {
18
18
  instantiateServiceProviderIfNotExists: (hash: string) => any;
19
19
  ExpressionParser: any;
20
20
  };
21
+ runSolver(pSolverExpression: any): any;
21
22
  /**
22
23
  * Checks the solver and returns the solver object if it passes the checks.
23
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA8BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqChB;IA9BA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,uHAAuH;IACvH,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC;QAAC,gBAAgB,EAAE,GAAG,CAAA;KAAE,CACzG;IA6BX;;;;;;;;;OASG;IACH,qBALW,MAAM,GAAC,MAAM,cACb,OAAO,aACP,MAAM,GACJ,MAAM,GAAC,SAAS,CA8B5B;IAED;;;;;;;OAOG;IACH,wDAFW,MAAM,QAyDhB;IAED;;;;;OAKG;IACH,gEAFW,MAAM,QA+BhB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAiFxB;IADA;;;;;MAAuC;CAExC;;;;;AAhWD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B"}
1
+ {"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA+BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqChB;IA9BA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,uHAAuH;IACvH,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC;QAAC,gBAAgB,EAAE,GAAG,CAAA;KAAE,CACzG;IA6BX,uCAaC;IAED;;;;;;;;;OASG;IACH,qBALW,MAAM,GAAC,MAAM,cACb,OAAO,aACP,MAAM,GACJ,MAAM,GAAC,SAAS,CA8B5B;IAED;;;;;;;OAOG;IACH,wDAFW,MAAM,QAyDhB;IAED;;;;;OAKG;IACH,gEAFW,MAAM,QA+BhB;IAED;;;;;OAKG;IACH,sDAFW,MAAM,QAwBhB;IAED;;;;;;;;OAQG;IACH,gCAJW,MAAM,yBAWhB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,yBAFW,QAAM,MAAM,EAAE,QAiFxB;IADA;;;;;MAAuC;CAExC;;;;;AA/WD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B"}
@@ -0,0 +1,103 @@
1
+ export = CustomInputHandler;
2
+ /**
3
+ * CustomInputHandler class.
4
+ *
5
+ * @class
6
+ * @extends libPictSectionInputExtension
7
+ * @memberof providers.inputs
8
+ */
9
+ declare class CustomInputHandler extends libPictSectionInputExtension {
10
+ constructor(pFable: any, pOptions: any, pServiceHash: any);
11
+ /** @type {import('pict')} */
12
+ pict: import("pict");
13
+ /** @type {import('pict')} */
14
+ fable: import("pict");
15
+ currentChartObjects: {};
16
+ getInputChartConfiguration(pView: any, pInput: any, pValue: any): any;
17
+ initializeChartVisualization(pView: any, pGroup: any, pRow: any, pInput: any, pValue: any, pHTMLSelector: any): boolean;
18
+ /**
19
+ * Initializes a tabular input element.
20
+ *
21
+ * @param {Object} pView - The view object.
22
+ * @param {Object} pGroup - The group object.
23
+ * @param {Object} pInput - The input object.
24
+ * @param {any} pValue - The input value.
25
+ * @param {string} pHTMLSelector - The HTML selector.
26
+ * @param {number} pRowIndex - The index of the row.
27
+ * @param {string} pTransactionGUID - The transaction GUID for the event dispatch.
28
+ * @returns {any} - The result of the initialization.
29
+ */
30
+ onInputInitializeTabular(pView: any, pGroup: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number, pTransactionGUID: string): any;
31
+ /**
32
+ * Handles the change event for the data in the select input.
33
+ *
34
+ * @param {Object} pView - The view object.
35
+ * @param {Object} pInput - The input object.
36
+ * @param {any} pValue - The new value of the input.
37
+ * @param {string} pHTMLSelector - The HTML selector of the input.
38
+ * @param {string} pTransactionGUID - The transaction GUID for the event dispatch.
39
+ * @returns {any} - The result of the super.onDataChange method.
40
+ */
41
+ onDataChange(pView: any, pInput: any, pValue: any, pHTMLSelector: string, pTransactionGUID: string): any;
42
+ /**
43
+ * Handles the change event for tabular data.
44
+ *
45
+ * @param {Object} pView - The view object.
46
+ * @param {Object} pInput - The input object.
47
+ * @param {any} pValue - The new value.
48
+ * @param {string} pHTMLSelector - The HTML selector.
49
+ * @param {number} pRowIndex - The index of the row.
50
+ * @param {string} pTransactionGUID - The transaction GUID for the event dispatch.
51
+ * @returns {any} - The result of the super method.
52
+ */
53
+ onDataChangeTabular(pView: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number, pTransactionGUID: string): any;
54
+ /**
55
+ * Marshals data to the form for the given input.
56
+ *
57
+ * @param {Object} pView - The view object.
58
+ * @param {Object} pGroup - The group object.
59
+ * @param {Object} pRow - The row object.
60
+ * @param {Object} pInput - The input object.
61
+ * @param {any} pValue - The value to be marshaled.
62
+ * @param {string} pHTMLSelector - The HTML selector.
63
+ * @param {string} pTransactionGUID - The transaction GUID for the event dispatch.
64
+ * @returns {boolean} - Returns true if the value is successfully marshaled to the form, otherwise false.
65
+ */
66
+ onDataMarshalToForm(pView: any, pGroup: any, pRow: any, pInput: any, pValue: any, pHTMLSelector: string, pTransactionGUID: string): boolean;
67
+ /**
68
+ * Marshals data to a form in tabular format.
69
+ *
70
+ * @param {Object} pView - The view object.
71
+ * @param {Object} pGroup - The group object.
72
+ * @param {Object} pInput - The input object.
73
+ * @param {any} pValue - The value parameter.
74
+ * @param {string} pHTMLSelector - The HTML selector parameter.
75
+ * @param {number} pRowIndex - The row index parameter.
76
+ * @param {string} pTransactionGUID - The transaction GUID for the event dispatch.
77
+ * @returns {any} - The result of the data marshaling.
78
+ */
79
+ onDataMarshalToFormTabular(pView: any, pGroup: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number, pTransactionGUID: string): any;
80
+ /**
81
+ * Handles the data request event for a select input in the PictProviderInputSelect class.
82
+ *
83
+ * @param {Object} pView - The view object.
84
+ * @param {Object} pInput - The input object.
85
+ * @param {any} pValue - The value object.
86
+ * @param {string} pHTMLSelector - The HTML selector object.
87
+ * @returns {any} - The result of the onDataRequest method.
88
+ */
89
+ onDataRequest(pView: any, pInput: any, pValue: any, pHTMLSelector: string): any;
90
+ /**
91
+ * Handles the data request event for a tabular input.
92
+ *
93
+ * @param {Object} pView - The view object.
94
+ * @param {Object} pInput - The input object.
95
+ * @param {any} pValue - The value object.
96
+ * @param {string} pHTMLSelector - The HTML selector.
97
+ * @param {number} pRowIndex - The row index.
98
+ * @returns {any} - The result of the data request.
99
+ */
100
+ onDataRequestTabular(pView: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number): any;
101
+ }
102
+ import libPictSectionInputExtension = require("../Pict-Provider-InputExtension.js");
103
+ //# sourceMappingURL=Pict-Provider-Input-Chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pict-Provider-Input-Chart.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-Chart.js"],"names":[],"mappings":";AAEA;;;;;;GAMG;AACH;IAEC,2DAYC;IARA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;IAIV,wBAA6B;IAG9B,sEA+EC;IAED,wHAyBC;IAoBD;;;;;;;;;;;OAWG;IACH,uEANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;;OASG;IACH,8CALW,GAAG,iBACH,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;;;OAUG;IACH,qDANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;;;;OAWG;IACH,6EALW,GAAG,iBACH,MAAM,oBACN,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;;;;;;OAWG;IACH,yEANW,GAAG,iBACH,MAAM,aACN,MAAM,oBACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;OAQG;IACH,+CAJW,GAAG,iBACH,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;;OASG;IACH,sDALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;CACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Layout-Record.d.ts","sourceRoot":"","sources":["../../../../source/providers/layouts/Pict-Layout-Record.js"],"names":[],"mappings":";AAEA;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;CAgDX"}
1
+ {"version":3,"file":"Pict-Layout-Record.d.ts","sourceRoot":"","sources":["../../../../source/providers/layouts/Pict-Layout-Record.js"],"names":[],"mappings":";AAEA;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;CAiGX"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-View-PSF-SupportBase.d.ts","sourceRoot":"","sources":["../../../../source/views/support/Pict-View-PSF-SupportBase.js"],"names":[],"mappings":";AAqBA;IAEC,2DAYC;IALA,yBAA2B;IAC3B,wBAAkC;IAMnC;;;;;;;;;;;;;;MAgMC;IAED,8CAKC;IAGD,8CA6BC;IAED,uMA8GC;IAED,8BAiIC;CACD"}
1
+ {"version":3,"file":"Pict-View-PSF-SupportBase.d.ts","sourceRoot":"","sources":["../../../../source/views/support/Pict-View-PSF-SupportBase.js"],"names":[],"mappings":";AAqBA;IAEC,2DAYC;IALA,yBAA2B;IAC3B,wBAAkC;IAMnC;;;;;;;;;;;;;;MAsMC;IAED,8CAKC;IAGD,8CA6BC;IAED,uMA8GC;IAED,8BAiIC;CACD"}