pict-section-form 1.0.140 → 1.0.142

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.
@@ -180,7 +180,9 @@ This is configuration based on solvers.
180
180
 
181
181
  ### Configurability via Address
182
182
 
183
- This is configuration based on solvers.
183
+ This is configuration based on pre-formatted data at specific locations...
184
+ technically the inline solvers above can be run as a part of any form solve
185
+ and store their data in a location the chart can read from.
184
186
 
185
187
  ```json
186
188
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-form",
3
- "version": "1.0.140",
3
+ "version": "1.0.142",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -31,7 +31,7 @@
31
31
  "browser-env": "^3.3.0",
32
32
  "eslint": "^9.38.0",
33
33
  "jquery": "^3.7.1",
34
- "pict": "^1.0.318",
34
+ "pict": "^1.0.320",
35
35
  "pict-application": "^1.0.29",
36
36
  "pict-service-commandlineutility": "^1.0.15",
37
37
  "quackage": "^1.0.42",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "fable-serviceproviderbase": "^3.0.15",
43
- "marked": "^16.4.1",
43
+ "marked": "^15.0.12",
44
44
  "pict-provider": "^1.0.6",
45
45
  "pict-section-tuigrid": "^1.0.27",
46
46
  "pict-template": "^1.0.13",
@@ -121,6 +121,7 @@ class CustomInputHandler extends libPictSectionInputExtension
121
121
  this.defaultDataParsingConfiguration = JSON.parse(JSON.stringify(this.options.DefaultDataParsingConfiguration));
122
122
 
123
123
  this.currentChartObjects = {};
124
+ this.currentChartDataObjects = {};
124
125
  }
125
126
 
126
127
  /**
@@ -590,6 +591,8 @@ class CustomInputHandler extends libPictSectionInputExtension
590
591
  else
591
592
  {
592
593
  this.currentChartObjects[`Object-For-${pInput.Macro.RawHTMLID}`] = new window.Chart(tmpChartCanvasElement, tmpChartConfiguration);
594
+ // TODO: Make this invalidation better.
595
+ this.currentChartDataObjects[`Data-For-${pInput.Macro.RawHTMLID}`] = JSON.stringify(tmpChartConfiguration.data);
593
596
  }
594
597
  }
595
598
 
@@ -673,6 +676,21 @@ class CustomInputHandler extends libPictSectionInputExtension
673
676
  */
674
677
  onDataMarshalToForm(pView, pGroup, pRow, pInput, pValue, pHTMLSelector, pTransactionGUID)
675
678
  {
679
+ if (!this.currentChartObjects[`Object-For-${pInput.Macro.RawHTMLID}`])
680
+ {
681
+ this.initializeChartVisualization(pView, pGroup, pRow, pInput, pValue, pHTMLSelector);
682
+ }
683
+ else
684
+ {
685
+ let tmpChartConfiguration = this.getInputChartConfiguration(pView, pInput, pValue);
686
+ let tmpNewChartDataString = JSON.stringify(tmpChartConfiguration.data);
687
+ if (this.currentChartDataObjects[`Data-For-${pInput.Macro.RawHTMLID}`] !== tmpNewChartDataString)
688
+ {
689
+ this.currentChartObjects[`Object-For-${pInput.Macro.RawHTMLID}`].data = tmpChartConfiguration.data;
690
+ this.currentChartObjects[`Object-For-${pInput.Macro.RawHTMLID}`].update();
691
+ this.currentChartDataObjects[`Data-For-${pInput.Macro.RawHTMLID}`] = tmpNewChartDataString;
692
+ }
693
+ }
676
694
  return super.onDataMarshalToForm(pView, pGroup, pRow, pInput, pValue, pHTMLSelector, pTransactionGUID);
677
695
  }
678
696
 
@@ -12,7 +12,19 @@ declare class CustomInputHandler extends libPictSectionInputExtension {
12
12
  pict: import("pict");
13
13
  /** @type {import('pict')} */
14
14
  fable: import("pict");
15
+ defaultCoreParsingConfiguration: any;
16
+ defaultLabelParsingConfiguration: any;
17
+ defaultDataParsingConfiguration: any;
15
18
  currentChartObjects: {};
19
+ /**
20
+ *
21
+ * @param {Object} pInput - The PictForm input object
22
+ * @param {*} pChartConfiguration - The current configuration object for the form
23
+ * @param {*} pParsingConfiguration - The parsing configuration to apply
24
+ * @param {*} pInputParsingConfigurationScope - The input-specific parsing configuration string address for additional configuration
25
+ * @returns
26
+ */
27
+ applyInputParsingConfiguration(pInput: any, pChartConfiguration: any, pParsingConfiguration: any, pInputParsingConfigurationScope: any): boolean;
16
28
  getInputChartConfiguration(pView: any, pInput: any, pValue: any): any;
17
29
  initializeChartVisualization(pView: any, pGroup: any, pRow: any, pInput: any, pValue: any, pHTMLSelector: any): boolean;
18
30
  /**
@@ -1 +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
+ {"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,2DAgHC;IA5GA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,6BAA6B;IAC7B,OADW,OAAO,MAAM,CAAC,CACf;IAoCV,qCAA+G;IAiC/G,sCAAiH;IAiCjH,qCAA+G;IAE/G,wBAA6B;IAG9B;;;;;;;OAOG;IACH,iEALW,GAAC,yBACD,GAAC,mCACD,GAAC,WA0ZX;IAED,sEAwBC;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"}