pict-section-form 1.0.96 → 1.0.97

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "workbench.colorTheme": "FreshCut",
2
+ "workbench.colorTheme": "SynthWave '84",
3
3
  "sqltools.connections": [
4
4
  {
5
5
  "mysqlOptions": {
@@ -79,6 +79,7 @@ module.exports.default_configuration.pict_configuration = {
79
79
  },
80
80
  "RecipeCounterSurfaceArea = RecipeCounterWidth * RecipeCounterDepth",
81
81
  "RecipeCounterVolume = RecipeCounterSurfaceArea * RecipeVerticalClearance",
82
+ `InspirationLink = CONCAT("https://www.google.com/search?q=", RecipeName, " recipe")`,
82
83
  ],
83
84
 
84
85
  MetaTemplates:
@@ -148,6 +149,10 @@ module.exports.default_configuration.pict_configuration = {
148
149
  Ordinal: 1,
149
150
  Expression: "ProteinFatRatio = Protein / Fat * 100",
150
151
  },
152
+ {
153
+ Ordinal: 2,
154
+ Expression: `HealthInfoLink = CONCAT("https://www.google.com/search?q=", Family, " health information")`,
155
+ },
151
156
  ],
152
157
 
153
158
  PickLists:
@@ -193,6 +198,12 @@ module.exports.default_configuration.pict_configuration = {
193
198
  DataType: "String",
194
199
  PictForm: { Section: "Recipe", Group: "Recipe", Row: 1 },
195
200
  },
201
+ InspirationLink: {
202
+ Name: "Inspiration",
203
+ Hash: "InspirationLink",
204
+ DataType: "String",
205
+ PictForm: { Section: "Recipe", Group: "Recipe", Row: 1, InputType: "Link" },
206
+ },
196
207
  RecipeType: {
197
208
  Name: "Recipe Type",
198
209
  Hash: "RecipeType",
@@ -451,6 +462,9 @@ module.exports.default_configuration.pict_configuration = {
451
462
  "FruitData.FruityVice[].nutritions.calories": {
452
463
  Hash: "FruitNutritionCalories",
453
464
  },
465
+ "FruitData.FruityVice[].health_info": {
466
+ Hash: "FruitHealthInfo",
467
+ },
454
468
  "FruitData.FruityVice[].nutritions.percent_total_fat": {
455
469
  Hash: "FruitPercentTotalFat",
456
470
  },
@@ -563,6 +577,13 @@ module.exports.default_configuration.pict_configuration = {
563
577
  Default: "(unnamed fruit)",
564
578
  PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
565
579
  },
580
+ health_info: {
581
+ Name: "Health Info.",
582
+ Hash: "HealthInfoLink",
583
+ DataType: "String",
584
+ Default: "",
585
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid", "InputType": "Link" },
586
+ },
566
587
  family: {
567
588
  Name: "Family",
568
589
  Hash: "Family",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-form",
3
- "version": "1.0.96",
3
+ "version": "1.0.97",
4
4
  "description": "Pict dynamic form sections",
5
5
  "main": "source/Pict-Section-Form.js",
6
6
  "directories": {
@@ -12,6 +12,7 @@ const libInputAutofillTriggerGroup = require('./inputs/Pict-Provider-Input-Autof
12
12
  const libInputMarkdown = require('./inputs/Pict-Provider-Input-Markdown.js');
13
13
  const libInputHTML = require('./inputs/Pict-Provider-Input-HTML.js');
14
14
  const libInputPreciseNumber = require('./inputs/Pict-Provider-Input-PreciseNumber.js');
15
+ const libInputLink = require('./inputs/Pict-Provider-Input-Link.js');
15
16
  const libInputTemplatedEntityLookup = require('./inputs/Pict-Provider-Input-TemplatedEntityLookup.js');
16
17
 
17
18
  /** @type {Record<string, any>} */
@@ -104,6 +105,10 @@ class PictDynamicSolver extends libPictProvider
104
105
  {
105
106
  this.pict.addProvider('Pict-Input-TemplatedEntityLookup', libInputTemplatedEntityLookup.default_configuration, libInputTemplatedEntityLookup);
106
107
  }
108
+ if (!this.pict.providers['Pict-Input-Link'])
109
+ {
110
+ this.pict.addProvider('Pict-Input-Link', libInputLink.default_configuration, libInputLink);
111
+ }
107
112
  }
108
113
 
109
114
  /**
@@ -225,6 +225,15 @@ Glug glug glug Oo... -->
225
225
  "Template": /*HTML*/`
226
226
  <!-- InputType ReadOnly {~D:Record.Hash~} {~D:Record.DataType~} -->
227
227
  <span>{~D:Record.Name~}:</span> <input type="text" readonly {~D:Record.Macro.InputFullProperties~}></input>
228
+ `
229
+ },
230
+ {
231
+ "HashPostfix": "-Template-Input-InputType-Link",
232
+ "DefaultInputExtensions": ["Pict-Input-Link"],
233
+ "Template": /*HTML*/`
234
+ <!-- InputType Link {~D:Record.Hash~} {~D:Record.DataType~} -->
235
+ <input type="hidden" {~D:Record.Macro.InputFullProperties~} value="">
236
+ <a id="INPUT-FOR-{~D:Record.Macro.RawHTMLID~}">{~D:Record.Name~}</a>
228
237
  `
229
238
  },
230
239
  {
@@ -377,6 +386,17 @@ Glug glug glug Oo... -->
377
386
  <span>{~D:Record.PictForm.ExtraDescription~}</span>
378
387
  <input type="text" readonly {~D:Record.Macro.InputFullProperties~}></input>
379
388
  </div>
389
+ `
390
+ },
391
+ {
392
+ "HashPostfix": "-VerticalTemplate-Input-InputType-Link",
393
+ "DefaultInputExtensions": ["Pict-Input-Link"],
394
+ "Template": /*HTML*/`
395
+ <!-- InputType Link {~D:Record.Hash~} {~D:Record.DataType~} -->
396
+ <div class="pict-form-vertical-input">
397
+ <input type="hidden" {~D:Record.Macro.InputFullProperties~} value="">
398
+ <a {~D:Record.Macro.InputFullProperties~}>{~D:Record.Name~}</a>
399
+ </div>
380
400
  `
381
401
  },
382
402
  {
@@ -803,6 +823,19 @@ Glug glug glug Oo... -->
803
823
  "Template": /*HTML*/` value="">`
804
824
  },
805
825
 
826
+ {
827
+ "HashPostfix": "-TabularTemplate-Begin-Input-InputType-Link",
828
+ "DefaultInputExtensions": ["Pict-Input-Link"],
829
+ "Template": /*HTML*/`
830
+ <!-- DataType Number {~D:Record.Hash~} {~D:Record.DataType~} -->
831
+ <input type="hidden" {~D:Record.Macro.HTMLName~} {~D:Record.Macro.InformaryTabular~} `
832
+ },
833
+ {
834
+ "HashPostfix": "-TabularTemplate-End-Input-InputType-Link",
835
+ "Template": /*HTML*/` value="">
836
+ <a id="TABULAR-DATA-{~D:Record.Macro.RawHTMLID~}-{~D:Context[2].Key~}" {~D:Record.Macro.HTMLName~}>{~D:Record.Name~}</a>`
837
+ },
838
+
806
839
  {
807
840
  "HashPostfix": "-TabularTemplate-Begin-Input-InputType-TemplatedEntityLookup",
808
841
  "Template": /*HTML*/`
@@ -0,0 +1,59 @@
1
+ const libPictSectionInputExtension = require('../Pict-Provider-InputExtension.js');
2
+
3
+ /**
4
+ * CustomInputHandler class.
5
+ *
6
+ * @class
7
+ * @extends libPictSectionInputExtension
8
+ * @memberof providers.inputs
9
+ */
10
+ class LinkInputHandler extends libPictSectionInputExtension
11
+ {
12
+ constructor(pFable, pOptions, pServiceHash)
13
+ {
14
+ super(pFable, pOptions, pServiceHash);
15
+
16
+ /** @type {import('pict')} */
17
+ this.pict;
18
+ /** @type {import('pict') & { Math: any } & { DataFormat: any }} */
19
+ this.fable;
20
+ /** @type {any} */
21
+ this.log;
22
+ }
23
+
24
+ /**
25
+ * Marshals data to the form for the given input.
26
+ *
27
+ * @param {Object} pView - The view object.
28
+ * @param {Object} pGroup - The group object.
29
+ * @param {Object} pRow - The row object.
30
+ * @param {Object} pInput - The input object.
31
+ * @param {any} pValue - The value to be marshaled.
32
+ * @param {string} pHTMLSelector - The HTML selector.
33
+ * @returns {boolean} - Returns true if the value is successfully marshaled to the form, otherwise false.
34
+ */
35
+ onDataMarshalToForm(pView, pGroup, pRow, pInput, pValue, pHTMLSelector)
36
+ {
37
+ this.pict.ContentAssignment.setAttribute(this.getInputHTMLID(pInput.Macro.RawHTMLID), 'href', pValue);
38
+ return super.onDataMarshalToForm(pView, pGroup, pRow, pInput, pValue, pHTMLSelector);
39
+ }
40
+
41
+ /**
42
+ * Marshals data to a form in tabular format.
43
+ *
44
+ * @param {Object} pView - The view object.
45
+ * @param {Object} pGroup - The group object.
46
+ * @param {Object} pInput - The input object.
47
+ * @param {any} pValue - The value parameter.
48
+ * @param {string} pHTMLSelector - The HTML selector parameter.
49
+ * @param {number} pRowIndex - The row index parameter.
50
+ * @returns {any} - The result of the data marshaling.
51
+ */
52
+ onDataMarshalToFormTabular(pView, pGroup, pInput, pValue, pHTMLSelector, pRowIndex)
53
+ {
54
+ this.pict.ContentAssignment.setAttribute(this.getTabularInputHTMLID(pInput.Macro.RawHTMLID, pRowIndex), 'href', pValue);
55
+ return super.onDataMarshalToFormTabular(pView, pGroup, pInput, pValue, pHTMLSelector, pRowIndex);
56
+ }
57
+ }
58
+
59
+ module.exports = LinkInputHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"Pict-Provider-DynamicSolver.d.ts","sourceRoot":"","sources":["../../../source/providers/Pict-Provider-DynamicSolver.js"],"names":[],"mappings":";AA2BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAqEhB;IA9DA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,gGAAgG;IAChG,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,CAClF;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,qBAAqB;IACrB,MADW,MAAM,CACR;IACT,qBAAqB;IACrB,MADW,MAAM,CACR;IAuDV;;;;;;;;;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;;;;AAhYD,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":";AA4BA;;GAEG;AACH;IAEC;;;;;;OAMG;IACH,oBAJW,MAAM,YACN,MAAM,gBACN,MAAM,EAyEhB;IAlEA,6BAA6B;IAC7B,MADW,OAAO,MAAM,CAAC,CAChB;IACT,gGAAgG;IAChG,OADW,OAAO,MAAM,CAAC,GAAG;QAAE,qCAAqC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAA;KAAE,CAClF;IACV,kBAAkB;IAClB,KADW,GAAG,CACN;IACR,qBAAqB;IACrB,MADW,MAAM,CACR;IACT,qBAAqB;IACrB,MADW,MAAM,CACR;IA2DV;;;;;;;;;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;;;;AApYD,kCAAkC;AAClC,6CADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAS3B"}
@@ -0,0 +1,47 @@
1
+ export = LinkInputHandler;
2
+ /**
3
+ * CustomInputHandler class.
4
+ *
5
+ * @class
6
+ * @extends libPictSectionInputExtension
7
+ * @memberof providers.inputs
8
+ */
9
+ declare class LinkInputHandler extends libPictSectionInputExtension {
10
+ constructor(pFable: any, pOptions: any, pServiceHash: any);
11
+ /** @type {import('pict')} */
12
+ pict: import("pict");
13
+ /** @type {import('pict') & { Math: any } & { DataFormat: any }} */
14
+ fable: import("pict") & {
15
+ Math: any;
16
+ } & {
17
+ DataFormat: any;
18
+ };
19
+ /** @type {any} */
20
+ log: any;
21
+ /**
22
+ * Marshals data to the form for the given input.
23
+ *
24
+ * @param {Object} pView - The view object.
25
+ * @param {Object} pGroup - The group object.
26
+ * @param {Object} pRow - The row object.
27
+ * @param {Object} pInput - The input object.
28
+ * @param {any} pValue - The value to be marshaled.
29
+ * @param {string} pHTMLSelector - The HTML selector.
30
+ * @returns {boolean} - Returns true if the value is successfully marshaled to the form, otherwise false.
31
+ */
32
+ onDataMarshalToForm(pView: any, pGroup: any, pRow: any, pInput: any, pValue: any, pHTMLSelector: string): boolean;
33
+ /**
34
+ * Marshals data to a form in tabular format.
35
+ *
36
+ * @param {Object} pView - The view object.
37
+ * @param {Object} pGroup - The group object.
38
+ * @param {Object} pInput - The input object.
39
+ * @param {any} pValue - The value parameter.
40
+ * @param {string} pHTMLSelector - The HTML selector parameter.
41
+ * @param {number} pRowIndex - The row index parameter.
42
+ * @returns {any} - The result of the data marshaling.
43
+ */
44
+ onDataMarshalToFormTabular(pView: any, pGroup: any, pInput: any, pValue: any, pHTMLSelector: string, pRowIndex: number): any;
45
+ }
46
+ import libPictSectionInputExtension = require("../Pict-Provider-InputExtension.js");
47
+ //# sourceMappingURL=Pict-Provider-Input-Link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pict-Provider-Input-Link.d.ts","sourceRoot":"","sources":["../../../../source/providers/inputs/Pict-Provider-Input-Link.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;;;;;;;;;;OAUG;IACH,6EAJW,GAAG,iBACH,MAAM,GACJ,OAAO,CAMnB;IAED;;;;;;;;;;OAUG;IACH,yEALW,GAAG,iBACH,MAAM,aACN,MAAM,GACJ,GAAG,CAMf;CACD"}