pict-section-form 1.0.14 → 1.0.16

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.
Files changed (44) hide show
  1. package/eslint.config.mjs +10 -0
  2. package/example_applications/complex_table/.quackage.json +9 -0
  3. package/example_applications/complex_table/Complex-Tabular-Application.js +320 -199
  4. package/example_applications/complex_table/Complex-Tabular-CustomDataProvider.js +25 -0
  5. package/example_applications/manifest_testbed/Pict-Template-Metacontroller-TemplateWithGroupRow.js +139 -0
  6. package/package.json +11 -5
  7. package/source/Pict-Section-Form.js +4 -1
  8. package/source/application/Pict-Application-Form.js +1 -1
  9. package/source/providers/Pict-Provider-DynamicSolver.js +25 -5
  10. package/source/providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.js +35 -8
  11. package/source/providers/Pict-Provider-Informary.js +20 -1
  12. package/source/providers/Pict-Provider-InputExtension.js +158 -0
  13. package/source/providers/Pict-Provider-MetaLists.js +160 -0
  14. package/source/providers/Pict-Provider-MetatemplateGenerator.js +2 -2
  15. package/source/providers/Pict-Provider-MetatemplateMacros.js +26 -0
  16. package/source/providers/inputs/Pict-Provider-Input-Select.js +189 -0
  17. package/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js +2 -2
  18. package/source/views/Pict-View-DynamicForm-DefaultConfiguration.json +9 -1
  19. package/source/views/Pict-View-DynamicForm.js +325 -39
  20. package/source/views/Pict-View-Form-Metacontroller.js +5 -3
  21. package/test/PictSectionForm-Basic_tests.js +88 -1
  22. package/tsconfig.json +14 -0
  23. package/types/Pict-Section-Form.d.ts +35 -0
  24. package/types/Pict-Section-Form.d.ts.map +1 -0
  25. package/types/application/Pict-Application-Form.d.ts +18 -0
  26. package/types/application/Pict-Application-Form.d.ts.map +1 -0
  27. package/types/providers/Pict-Provider-DynamicLayout.d.ts +24 -0
  28. package/types/providers/Pict-Provider-DynamicLayout.d.ts.map +1 -0
  29. package/types/providers/Pict-Provider-DynamicSolver.d.ts +97 -0
  30. package/types/providers/Pict-Provider-DynamicSolver.d.ts.map +1 -0
  31. package/types/providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.d.ts +6 -0
  32. package/types/providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.d.ts.map +1 -0
  33. package/types/providers/Pict-Provider-DynamicTemplates.d.ts +16 -0
  34. package/types/providers/Pict-Provider-DynamicTemplates.d.ts.map +1 -0
  35. package/types/providers/Pict-Provider-Informary.d.ts +69 -0
  36. package/types/providers/Pict-Provider-Informary.d.ts.map +1 -0
  37. package/types/providers/Pict-Provider-MetatemplateGenerator.d.ts +14 -0
  38. package/types/providers/Pict-Provider-MetatemplateGenerator.d.ts.map +1 -0
  39. package/types/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts +17 -0
  40. package/types/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts.map +1 -0
  41. package/types/views/Pict-View-DynamicForm.d.ts +45 -0
  42. package/types/views/Pict-View-DynamicForm.d.ts.map +1 -0
  43. package/types/views/Pict-View-Form-Metacontroller.d.ts +94 -0
  44. package/types/views/Pict-View-Form-Metacontroller.d.ts.map +1 -0
@@ -0,0 +1,10 @@
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+
4
+
5
+ export default [
6
+ { files: ["source/**"], languageOptions: { sourceType: "commonjs" } },
7
+ { languageOptions: { globals: { ...globals.browser, ...globals.mocha, } } },
8
+ pluginJs.configs.recommended,
9
+ { rules: { "no-prototype-builtins": "off", "no-unused-vars": "warn", "no-case-declarations": "warn" } },
10
+ ];
@@ -0,0 +1,9 @@
1
+ {
2
+ "GulpExecutions": [
3
+ {
4
+ "Hash": "default",
5
+ "Name": "Default standard build.",
6
+ "BuildFileLabel": "",
7
+ "BrowsersListRC": "since 2022"
8
+ }]
9
+ }
@@ -1,219 +1,340 @@
1
1
  const libPictSectionForm = require('../../source/Pict-Section-Form.js');
2
2
 
3
- module.exports = libPictSectionForm.PictFormApplication;
3
+ const libCustomDataProvider = require('./Complex-Tabular-CustomDataProvider.js');
4
4
 
5
- module.exports.default_configuration = libPictSectionForm.PictFormApplication.default_configuration;
6
- module.exports.default_configuration.pict_configuration = (
5
+ class ComplexTabularApplication extends libPictSectionForm.PictFormApplication
6
+ {
7
+ constructor(pFable, pOptions, pServiceHash)
7
8
  {
8
- "Product": "SimpleTable",
9
-
10
- "DefaultAppData": require('./FruitData.json'),
11
-
12
- "DefaultFormManifest":
13
- {
14
- "Scope": "SuperSimpleTabularForm",
15
-
16
- "Sections": [
17
- {
18
- "Hash": "Recipe",
19
- "Name": "Fruit-based Recipe",
20
-
21
-
22
- "Solvers":
23
- [
24
- "TotalFruitCalories = SUM(FruitNutritionCalories)",
25
- "AverageFruitCalories = MEAN(FruitNutritionCalories)",
26
- { "Ordinal": 99, "Expression": "AverageFatPercent = MEAN(FruitPercentTotalFat)"},
27
- "RecipeCounterSurfaceArea = RecipeCounterWidth * RecipeCounterDepth",
28
- "RecipeCounterVolume = RecipeCounterSurfaceArea * RecipeVerticalClearance",
29
- ],
9
+ super(pFable, pOptions, pServiceHash);
30
10
 
31
- "Groups": [
32
- {
33
- "Hash": "Recipe",
34
- "Name": "Recipe",
35
- },
36
- {
37
- "Hash": "Statistics",
38
- "Name": "Statistics",
39
- },
40
- {
41
- "Hash": "FruitStatistics",
42
- "Name": "Statistics About the Fruit",
43
- }
44
- ]
45
- },
46
- {
47
- "Hash": "FruitGrid",
48
- "Name": "Fruits of the World",
49
- "Groups": [
50
- {
51
-
52
- "Hash": "FruitGrid",
53
- "Name": "FruitGrid",
54
-
55
- "Layout": "Tabular",
56
-
57
- "RecordSetSolvers": [
58
- {"Ordinal": 0, "Expression": "PercentTotalFat = (Fat * 9) / Calories"}
59
- ],
60
- "RecordSetAddress": "FruitData.FruityVice",
61
- "RecordManifest": "FruitEditor"
62
- }
63
- ]
64
- },
65
- ],
11
+ this.pict.addProvider('CustomDataProvider', libCustomDataProvider.default_configuration, libCustomDataProvider);
12
+ }
13
+ }
14
+
15
+ module.exports = ComplexTabularApplication;
16
+
17
+ module.exports.default_configuration = libPictSectionForm.PictFormApplication.default_configuration;
18
+ module.exports.default_configuration.pict_configuration = {
19
+ Product: "SimpleTable",
20
+
21
+ DefaultAppData: require("./FruitData.json"),
22
+
23
+ DefaultFormManifest: {
24
+ Scope: "SuperSimpleTabularForm",
66
25
 
67
- "Descriptors":
26
+ Sections: [
68
27
  {
69
- "RecipeName": { "Name": "Recipe Name", "Hash": "RecipeName", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
70
- "RecipeType": { "Name": "Recipe Type", "Hash": "RecipeType", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
71
- "RecipeDescription": { "Name": "Description", "Hash": "RecipeDescription", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
72
- "Inventor": { "Name": "Inventor", "Hash": "Inventor", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
73
-
74
- "Recipe.Feeds": {
75
- "Name": "Feeds", "Hash": "RecipeFeeds", "DataType": "PreciseNumber", "Default": "1",
76
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 1, "Width": 1 }
77
- },
78
- "Recipe.TotalCalories": {
79
- "Name": "Calories in the Fruits", "Hash": "RecipeCalories", "DataType": "PreciseNumber", "Default": "1",
80
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 1, "Width": 1 }
81
- },
28
+ Hash: "Recipe",
29
+ Name: "Fruit-based Recipe",
82
30
 
83
- "Recipe.CounterWidth": {
84
- "Name": "Counter Prep Width Requirements", "Hash": "RecipeCounterWidth", "DataType": "PreciseNumber", "Default": "10",
85
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 2, "Width": 1 }
86
- },
87
- "Recipe.CounterDepth": {
88
- "Name": "Counter Prep Depth Requirements", "Hash": "RecipeCounterDepth", "DataType": "PreciseNumber", "Default": "5",
89
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 2, "Width": 1 }
90
- },
91
- "Recipe.CounterSurfaceArea": {
92
- "Name": "Required Counter Surface Area", "Hash": "RecipeCounterSurfaceArea", "DataType": "PreciseNumber",
93
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 2, "Width": 1 }
94
- },
31
+ Solvers:
32
+ [
33
+ "TotalFruitCalories = SUM(FruitNutritionCalories)",
34
+ "AverageFruitCalories = MEAN(FruitNutritionCalories)",
35
+ {
36
+ Ordinal: 99,
37
+ Expression: "AverageFatPercent = MEAN(FruitPercentTotalFat)",
38
+ },
39
+ "RecipeCounterSurfaceArea = RecipeCounterWidth * RecipeCounterDepth",
40
+ "RecipeCounterVolume = RecipeCounterSurfaceArea * RecipeVerticalClearance",
41
+ ],
95
42
 
96
- "Recipe.VerticalClearance": {
97
- "Name": "Prep Vertical Clearance", "Hash": "RecipeVerticalClearance", "DataType": "PreciseNumber", "Default": "12",
98
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 3, "Width": 1 }
99
- },
100
- "Recipe.PrepVolume": {
101
- "Name": "Preparation Volume Requirements", "Hash": "RecipeCounterVolume", "DataType": "PreciseNumber",
102
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 3, "Width": 1 }
103
- },
104
- "Recipe.MoistureContent": {
105
- "Name": "Required Moisture Content", "Hash": "RecipeMoistureContent", "DataType": "PreciseNumber",
106
- "PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 3, "Width": 1 }
107
- },
43
+ MetaTemplates:
44
+ [
45
+ {
46
+ //onclick="{~D:Record.Macro.DataRequestFunction~}"
47
+ "HashPostfix": "-Template-Wrap-Prefix",
48
+ "Template": "<h1>Rectangular Area Solver Micro-app</h1><div><a href=\"#\" onclick=\"_Pict.PictApplication.solve()\">[ solve ]</a></div><hr />"
49
+ }
50
+ ],
108
51
 
109
- "FruitStats.TotalCalories": {
110
- "Name": "Total Calories in All Fruits", "Hash": "TotalFruitCalories", "DataType": "PreciseNumber",
111
- "PictForm": { "Section": "Recipe", "Group": "FruitStatistics", "Row": 1, "Width": 1 }
112
- },
113
- "FruitStats.AverageCalories": {
114
- "Name": "Average (mean) Calories in All Fruits", "Hash": "AverageFruitCalories", "DataType": "PreciseNumber",
115
- "PictForm": { "Section": "Recipe", "Group": "FruitStatistics", "Row": 1, "Width": 1 }
116
- },
117
- "FruitStats.AverageFatPercent": {
118
- "Name": "Average (mean) Fat Percentage in All Fruits", "Hash": "AverageFatPercent", "DataType": "PreciseNumber",
119
- "PictForm": { "Section": "Recipe", "Group": "FruitStatistics", "Row": 1, "Width": 1 }
120
- },
52
+ PickLists:
53
+ [
54
+ {
55
+ Hash: "Families",
56
+ ListAddress: "AppData.FruitMetaLists.Families",
57
+ ListSourceAddress: "FruitData.FruityVice[]",
58
+ TextTemplate: "{~D:Record.family~}",
59
+ IDTemplate: "{~D:Record.family~}",
60
+ Unique: true,
61
+ Sorted: true,
62
+ UpdateFrequency: "Once",
63
+ },
64
+ {
65
+ Hash: "Orders",
66
+ ListAddress: "AppData.FruitMetaLists.Orders",
67
+ ListSourceAddress: "FruitData.FruityVice[]",
68
+ TextTemplate: "{~D:Record.order~}",
69
+ IDTemplate: "{~D:Record.order~}",
70
+ Unique: true,
71
+ UpdateFrequency: "Once",
72
+ },
73
+ {
74
+ Hash: "Genuses",
75
+ ListAddress: "AppData.FruitMetaLists.Genuses",
76
+ ListSourceAddress: "FruitData.FruityVice[]",
77
+ TextTemplate: "{~D:Record.genus~}",
78
+ IDTemplate: "{~D:Record.genus~}",
79
+ Sorted: true,
80
+ UpdateFrequency: "Always",
81
+ },
82
+ ],
121
83
 
84
+ Groups: [
85
+ {
86
+ Hash: "Recipe",
87
+ Name: "Recipe",
88
+ },
89
+ {
90
+ Hash: "Statistics",
91
+ Name: "Statistics",
92
+ },
93
+ {
94
+ Hash: "FruitStatistics",
95
+ Name: "Statistics About the Fruit",
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ Hash: "FruitGrid",
101
+ Name: "Fruits of the World",
102
+ Groups: [
103
+ {
104
+ Hash: "FruitGrid",
105
+ Name: "FruitGrid",
122
106
 
107
+ Layout: "Tabular",
123
108
 
124
- "FruitData.FruityVice":
125
- {
126
- "Name": "Fruits of the Earth",
127
- "Hash": "FruitGrid",
128
- "DataType": "Array",
129
- "Default": []
130
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
109
+ RecordSetSolvers: [
110
+ {
111
+ Ordinal: 0,
112
+ Expression: "PercentTotalFat = (Fat * 9) / Calories",
113
+ },
114
+ ],
115
+ RecordSetAddress: "FruitData.FruityVice",
116
+ RecordManifest: "FruitEditor",
117
+ },
118
+ ],
119
+ },
120
+ ],
121
+
122
+ Descriptors: {
123
+ RecipeName: {
124
+ Name: "Recipe Name",
125
+ Hash: "RecipeName",
126
+ DataType: "String",
127
+ PictForm: { Section: "Recipe", Group: "Recipe", Row: 1 },
128
+ },
129
+ RecipeType: {
130
+ Name: "Recipe Type",
131
+ Hash: "RecipeType",
132
+ DataType: "String",
133
+ PictForm:
134
+ {
135
+ Section:"Recipe",
136
+ Group:"Recipe",
137
+ Row: 1,
138
+ "InputType":"Combo",
139
+ "Entries":
140
+ [
141
+ "Smoothie", "Salad", "Dessert", "Main Course", "Side Dish", "Snack"
142
+ ]
143
+ },
144
+ },
145
+ RecipeDescription: {
146
+ Name: "Description",
147
+ Hash: "RecipeDescription",
148
+ DataType: "String",
149
+ PictForm: { Section: "Recipe", Group: "Recipe", Row: 2 },
150
+ },
151
+ Inventor: {
152
+ Name: "Inventor",
153
+ Hash: "Inventor",
154
+ DataType: "String",
155
+ PictForm: { Section: "Recipe", Group: "Recipe", Row: 3 },
156
+ },
157
+ "MetaFruit.Information.FavoriteGenus": {
158
+ Name: "Favorite Genus",
159
+ Hash: "FavoriteGenus",
160
+ DataType: "String",
161
+ PictForm: { Section: "Recipe", Group: "Recipe", Row: 4 },
162
+ },
163
+
164
+ "Recipe.Feeds": {
165
+ Name: "Feeds",
166
+ Hash: "RecipeFeeds",
167
+ DataType: "PreciseNumber",
168
+ Default: "1",
169
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 1, Width: 1,
170
+ "InputType":"Option",
171
+ "Providers": ["CustomDataProvider", "Pict-Input-Select"],
172
+ "SelectOptions": [{"id":"few", "text":"Few"}, {"id":"some", "text":"Some"}, {"id":"many", "text":"Many"}]
131
173
  },
174
+ },
175
+ "Recipe.TotalCalories": {
176
+ Name: "Calories in the Fruits",
177
+ Hash: "RecipeCalories",
178
+ DataType: "PreciseNumber",
179
+ Default: "1",
180
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 1, Width: 1 },
181
+ },
182
+
183
+ "Recipe.CounterWidth": {
184
+ Name: "Counter Prep Width Requirements",
185
+ Hash: "RecipeCounterWidth",
186
+ DataType: "PreciseNumber",
187
+ Default: "10",
188
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 2, Width: 1 },
189
+ },
190
+ "Recipe.CounterDepth": {
191
+ Name: "Counter Prep Depth Requirements",
192
+ Hash: "RecipeCounterDepth",
193
+ DataType: "PreciseNumber",
194
+ Default: "5",
195
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 2, Width: 1 },
196
+ },
197
+ "Recipe.CounterSurfaceArea": {
198
+ Name: "Required Counter Surface Area",
199
+ Hash: "RecipeCounterSurfaceArea",
200
+ DataType: "PreciseNumber",
201
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 2, Width: 1 },
202
+ },
203
+
204
+ "Recipe.VerticalClearance": {
205
+ Name: "Prep Vertical Clearance",
206
+ Hash: "RecipeVerticalClearance",
207
+ DataType: "PreciseNumber",
208
+ Default: "12",
209
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 3, Width: 1 },
210
+ },
211
+ "Recipe.PrepVolume": {
212
+ Name: "Preparation Volume Requirements",
213
+ Hash: "RecipeCounterVolume",
214
+ DataType: "PreciseNumber",
215
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 3, Width: 1 },
216
+ },
217
+ "Recipe.MoistureContent": {
218
+ Name: "Required Moisture Content",
219
+ Hash: "RecipeMoistureContent",
220
+ DataType: "PreciseNumber",
221
+ PictForm: { Section: "Recipe", Group: "Statistics", Row: 3, Width: 1 },
222
+ },
132
223
 
133
- "FruitData.FruityVice[].nutritions.calories":
134
- {
135
- "Hash": "FruitNutritionCalories"
224
+ "FruitStats.TotalCalories": {
225
+ Name: "Total Calories in All Fruits",
226
+ Hash: "TotalFruitCalories",
227
+ DataType: "PreciseNumber",
228
+ PictForm: {
229
+ Section: "Recipe",
230
+ Group: "FruitStatistics",
231
+ Row: 1,
232
+ Width: 1,
233
+ },
234
+ },
235
+ "FruitStats.AverageCalories": {
236
+ Name: "Average (mean) Calories in All Fruits",
237
+ Hash: "AverageFruitCalories",
238
+ DataType: "PreciseNumber",
239
+ PictForm: {
240
+ Section: "Recipe",
241
+ Group: "FruitStatistics",
242
+ Row: 1,
243
+ Width: 1,
136
244
  },
137
- "FruitData.FruityVice[].nutritions.percent_total_fat":
138
- {
139
- "Hash": "FruitPercentTotalFat"
245
+ },
246
+ "FruitStats.AverageFatPercent": {
247
+ Name: "Average (mean) Fat Percentage in All Fruits",
248
+ Hash: "AverageFatPercent",
249
+ DataType: "PreciseNumber",
250
+ PictForm: {
251
+ Section: "Recipe",
252
+ Group: "FruitStatistics",
253
+ Row: 1,
254
+ Width: 1,
140
255
  },
141
256
  },
142
257
 
143
- "ReferenceManifests":
144
- {
145
- "FruitEditor":
146
- {
147
- "Scope": "FruitEditor",
258
+ "FruitData.FruityVice": {
259
+ Name: "Fruits of the Earth",
260
+ Hash: "FruitGrid",
261
+ DataType: "Array",
262
+ Default: [],
263
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
264
+ },
148
265
 
149
- "Descriptors":
150
- {
151
- "name":
152
- {
153
- "Name": "Fruit Name",
154
- "Hash": "Name",
155
- "DataType": "String",
156
- "Default": "(unnamed fruit)"
157
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
158
- },
159
- "family":
160
- {
161
- "Name": "Family",
162
- "Hash": "Family",
163
- "DataType": "String"
164
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
165
- },
166
- "order":
167
- {
168
- "Name": "Order",
169
- "Hash": "Order",
170
- "DataType": "String"
171
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
172
- },
173
- "genus":
174
- {
175
- "Name": "Genus",
176
- "Hash": "Genus",
177
- "DataType": "String"
178
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
179
- },
180
- "nutritions.calories":
181
- {
182
- "Name": "Calories",
183
- "Hash": "Calories",
184
- "DataType": "Number"
185
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
186
- },
187
- "nutritions.fat":
188
- {
189
- "Name": "Fat",
190
- "Hash": "Fat",
191
- "DataType": "Number"
192
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
193
- },
194
- "nutritions.carbohydrates":
195
- {
196
- "Name": "Carbohydrates",
197
- "Hash": "Carbs",
198
- "DataType": "Number"
199
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
200
- },
201
- "nutritions.protein":
202
- {
203
- "Name": "Protein",
204
- "Hash": "Protein",
205
- "DataType": "Number"
206
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
207
- },
208
- "nutritions.percent_total_fat":
209
- {
210
- "Name": "PercentTotalFat",
211
- "Hash": "PercentTotalFat",
212
- "DataType": "Number"
213
- , "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
214
- }
215
- }
216
- }
217
- }
218
- }
219
- });
266
+ "FruitData.FruityVice[].nutritions.calories": {
267
+ Hash: "FruitNutritionCalories",
268
+ },
269
+ "FruitData.FruityVice[].nutritions.percent_total_fat": {
270
+ Hash: "FruitPercentTotalFat",
271
+ },
272
+ },
273
+
274
+ ReferenceManifests: {
275
+ FruitEditor: {
276
+ Scope: "FruitEditor",
277
+
278
+ Descriptors: {
279
+ name: {
280
+ Name: "Fruit Name",
281
+ Hash: "Name",
282
+ DataType: "String",
283
+ Default: "(unnamed fruit)",
284
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
285
+ },
286
+ family: {
287
+ Name: "Family",
288
+ Hash: "Family",
289
+ DataType: "String",
290
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid", "InputType":"Option",
291
+ "Providers": ["Pict-Input-Select"],
292
+ "SelectOptionsPickList": "Families"}
293
+ },
294
+ order: {
295
+ Name: "Order",
296
+ Hash: "Order",
297
+ DataType: "String",
298
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
299
+ },
300
+ genus: {
301
+ Name: "Genus",
302
+ Hash: "Genus",
303
+ DataType: "String",
304
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
305
+ },
306
+ "nutritions.calories": {
307
+ Name: "Calories",
308
+ Hash: "Calories",
309
+ DataType: "Number",
310
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid"},
311
+ },
312
+ "nutritions.fat": {
313
+ Name: "Fat",
314
+ Hash: "Fat",
315
+ DataType: "Number",
316
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
317
+ },
318
+ "nutritions.carbohydrates": {
319
+ Name: "Carbohydrates",
320
+ Hash: "Carbs",
321
+ DataType: "Number",
322
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
323
+ },
324
+ "nutritions.protein": {
325
+ Name: "Protein",
326
+ Hash: "Protein",
327
+ DataType: "Number",
328
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
329
+ },
330
+ "nutritions.percent_total_fat": {
331
+ Name: "PercentTotalFat",
332
+ Hash: "PercentTotalFat",
333
+ DataType: "Number",
334
+ PictForm: { Section: "FruitGrid", Group: "FruitGrid" },
335
+ },
336
+ },
337
+ },
338
+ },
339
+ },
340
+ };
@@ -0,0 +1,25 @@
1
+ const libPictSectionInputExtension = require('../../source/Pict-Section-Form.js').PictInputExtensionProvider;
2
+
3
+ class CustomInputHandler extends libPictSectionInputExtension
4
+ {
5
+ constructor(pFable, pOptions, pServiceHash)
6
+ {
7
+ super(pFable, pOptions, pServiceHash);
8
+ }
9
+
10
+ onInputInitialize(pView, pGroup, pRow, pInput, pValue, pHTMLSelector)
11
+ {
12
+ this.log.trace(`CustomInputHandler.onInputInitializeTabular() for view [${pView.Hash}] called`);
13
+ //this.log.trace(`The input object is: ${JSON.stringify(pInput)}`);
14
+ return super.onInputInitialize(pView, pGroup, pInput, pHTMLSelector);
15
+ }
16
+
17
+ onInputInitializeTabular(pView, pGroup, pInput, pValue, pHTMLSelector)
18
+ {
19
+ this.log.trace(`CustomInputHandler.onInputInitializeTabular() for view [${pView.Hash}] called`);
20
+ //this.log.trace(`The input object is: ${JSON.stringify(pInput)}`);
21
+ return super.onInputInitializeTabular(pView, pGroup, pInput, pHTMLSelector);
22
+ }
23
+ }
24
+
25
+ module.exports = CustomInputHandler;