pict-section-form 1.0.83 → 1.0.84

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.
@@ -10,6 +10,7 @@
10
10
  <ul>
11
11
  <li><a href="debug/index.html">Debug Harness (must build from debug folder)</a></li>
12
12
  <li><a href="simple_form/dist/index.html">Simple Form</a></li>
13
+ <li><a href="simple_distill/dist/index.html">Simple Distilling</a></li>
13
14
  <li><a href="simple_table/dist/index.html">Simple Table</a></li>
14
15
  <li><a href="complex_table/dist/index.html">Complex Grid</a></li>
15
16
  <li><a href="complex_tuigrid/dist/index.html">Complex Grid (using Toast UI Grid)</a></li>
@@ -9,6 +9,27 @@ module.exports.default_configuration.pict_configuration = (
9
9
  "DefaultFormManifest": {
10
10
  "Scope": "SuperSimpleForm",
11
11
 
12
+ "InitialBundle":
13
+ [
14
+ {
15
+ "Entity": "Author",
16
+ "Filter": "FBV~IDAuthor~EQ~100",
17
+ "Destination": "AppData.CurrentAuthor",
18
+ // This marshals a single record
19
+ "SingleRecord": true
20
+ },
21
+ {
22
+ "Entity": "BookAuthorJoin",
23
+ "Filter": "FBV~IDAuthor~EQ~{~D:AppData.CurrentAuthor.IDAuthor~}",
24
+ "Destination": "AppData.BookAuthorJoins"
25
+ },
26
+ {
27
+ "Entity": "Book",
28
+ "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^AppData.BookAuthorJoins~}",
29
+ "Destination": "AppData.Books"
30
+ }
31
+ ],
32
+
12
33
  "Sections": [
13
34
  {
14
35
  "Hash": "Book",
@@ -55,10 +76,7 @@ module.exports.default_configuration.pict_configuration = (
55
76
  "Destination": "AppData.Books"
56
77
  }
57
78
  ],
58
- EntityBundleTriggerGroup: "BookTriggerGroup",
59
- EntityBundleTriggerMetacontrollerSolve: true,
60
- EntityBundleTriggerMetacontrollerRender: true,
61
- EntityBundleTriggerOnInitialize: true
79
+ EntityBundleTriggerGroup: "BookTriggerGroup"
62
80
  }
63
81
  },
64
82
  "Author.Name": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-form",
3
- "version": "1.0.83",
3
+ "version": "1.0.84",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -27,20 +27,20 @@
27
27
  "author": "steven velozo <steven@velozo.com>",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@eslint/js": "^9.21.0",
30
+ "@eslint/js": "^9.26.0",
31
31
  "browser-env": "^3.3.0",
32
- "eslint": "^9.21.0",
32
+ "eslint": "^9.26.0",
33
33
  "jquery": "^3.7.1",
34
- "pict": "^1.0.243",
34
+ "pict": "^1.0.245",
35
35
  "pict-application": "^1.0.25",
36
36
  "pict-service-commandlineutility": "^1.0.15",
37
37
  "quackage": "^1.0.41",
38
38
  "tui-grid": "^4.21.22",
39
- "typescript": "^5.7.3"
39
+ "typescript": "^5.8.3"
40
40
  },
41
41
  "dependencies": {
42
42
  "fable-serviceproviderbase": "^3.0.15",
43
- "marked": "^15.0.7",
43
+ "marked": "^15.0.11",
44
44
  "pict-provider": "^1.0.3",
45
45
  "pict-section-tuigrid": "^1.0.27",
46
46
  "pict-template": "^1.0.10",
@@ -92,6 +92,20 @@ class PictFormMetacontroller extends libPictViewClass
92
92
  return this.manifest.getValueByHash(this.getMarshalDestinationObject(), pHashAddress);
93
93
  }
94
94
 
95
+ gatherInitialBundle(fCallback)
96
+ {
97
+ if (this.manifestDescription && this.manifestDescription.InitialBundle)
98
+ {
99
+ this.log.info(`Gathering initial bundle for ${this.manifestDescription.InitialBundle.length} entities.`);
100
+ return this.pict.EntityProvider.gatherDataFromServer(this.manifestDescription.InitialBundle, fCallback);
101
+ }
102
+ else
103
+ {
104
+ this.log.info('No initial bundle to gather.');
105
+ return fCallback();
106
+ }
107
+ }
108
+
95
109
  /**
96
110
  * Executes after the initialization of the object.
97
111
  *
@@ -104,7 +118,12 @@ class PictFormMetacontroller extends libPictViewClass
104
118
  this.bootstrapPictFormViewsFromManifest();
105
119
  // Generate the metatemplate (the container for each section)
106
120
  this.generateMetatemplate();
107
- return super.onAfterInitializeAsync(fCallback);
121
+
122
+ return super.onAfterInitializeAsync(
123
+ function (pError)
124
+ {
125
+ this.gatherInitialBundle(fCallback);
126
+ }.bind(this));
108
127
  }
109
128
 
110
129
  /**
@@ -484,7 +503,7 @@ class PictFormMetacontroller extends libPictViewClass
484
503
  return tmpSectionList;
485
504
  }
486
505
  }
487
-
506
+ this.manifestDescription = tmpManifestDescription;
488
507
  let tmpManifest = this.fable.instantiateServiceProviderWithoutRegistration('Manifest', tmpManifestDescription);
489
508
 
490
509
  if (this.options.AutoPopulateDefaultObject)
@@ -54,9 +54,9 @@ declare class CustomInputHandler extends libPictSectionInputExtension {
54
54
  * @param {any} pValue - The value of the input.
55
55
  * @param {string} pHTMLSelector - The HTML selector.
56
56
  *
57
- * @return {Promise<Error?>} - Returns a promise that resolves when the data has been gathered.
57
+ * @return {Promise<any>} - Returns a promise that resolves when the data has been gathered.
58
58
  */
59
- gatherDataFromServer(pView: any, pInput: any, pValue: any, pHTMLSelector: string): Promise<Error | null>;
59
+ gatherDataFromServer(pView: any, pInput: any, pValue: any, pHTMLSelector: string): Promise<any>;
60
60
  /**
61
61
  * Initializes a tabular input element.
62
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Provider-Input-EntityBundleRequest.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAGT,oGA0EC;IAED;;;;;;;;;OASG;IACH,sDALW,GAAG,iBACH,MAAM,GAEL,OAAO,CAAC,KAAK,OAAC,CAAC,CA4D1B;IAoBD;;;;;;;;;;OAUG;IACH,uEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;OAQG;IACH,8CAJW,GAAG,iBACH,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;OASG;IACH,qDALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;OAUG;IACH,6EAJW,GAAG,iBACH,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;;;;;OAUG;IACH,yEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;CACD"}
1
+ {"version":3,"file":"Pict-Provider-Input-EntityBundleRequest.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-EntityBundleRequest.js"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH;IAEC,2DAUC;IANA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,4DAA4D;IAC5D,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,CAAA;KAAE,CAC9C;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IAGT,oGA0EC;IAED;;;;;;;;;OASG;IACH,sDALW,GAAG,iBACH,MAAM,GAEL,OAAO,CAAC,GAAG,CAAC,CAsEvB;IAyBD;;;;;;;;;;OAUG;IACH,uEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;IAED;;;;;;;;OAQG;IACH,8CAJW,GAAG,iBACH,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;OASG;IACH,qDALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;IAED;;;;;;;;;;OAUG;IACH,6EAJW,GAAG,iBACH,MAAM,GACJ,OAAO,CAKnB;IAED;;;;;;;;;;OAUG;IACH,yEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAKf;CACD"}
@@ -38,6 +38,7 @@ declare class PictFormMetacontroller extends libPictViewClass {
38
38
  * @param {string} pHashAddress
39
39
  */
40
40
  getValueByHash(pHashAddress: string): any;
41
+ gatherInitialBundle(fCallback: any): any;
41
42
  /**
42
43
  * Executes after the initialization of the object.
43
44
  *
@@ -116,6 +117,7 @@ declare class PictFormMetacontroller extends libPictViewClass {
116
117
  * @returns {Array} - An array of section definitions.
117
118
  */
118
119
  bootstrapPictFormViewsFromManifest(pManifestDescription: any): any[];
120
+ manifestDescription: any;
119
121
  /**
120
122
  * Trigger an event on all inputs on all views.
121
123
  * @param {string} pEvent - The event to trigger
@@ -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;;;;;OAKG;IACH,kCAHW,aAAa,GACX,IAAI,CAShB;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,qEAqHC;IAED;;;OAGG;IACH,gCAFW,MAAM,QAgBhB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,4BAEL,sBAAsB,CAWjC;IAED;;;;OAIG;IACH,4BAFa,OAAO,CAKnB;CACD;;;;;;;;;;;;;;;;;;;;;;;;;;oBA7mBY,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM"}
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,qEAqHC;IAjGA,yBAAiD;IAmGlD;;;OAGG;IACH,gCAFW,MAAM,QAgBhB;IAED;;;;;OAKG;IACH,0BAJW,MAAM,4BAEL,sBAAsB,CAWjC;IAED;;;;OAIG;IACH,4BAFa,OAAO,CAKnB;CACD;;;;;;;;;;;;;;;;;;;;;;;;;;oBAhoBY,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,KAAK,MAAM"}