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.
- package/eslint.config.mjs +10 -0
- package/example_applications/complex_table/.quackage.json +9 -0
- package/example_applications/complex_table/Complex-Tabular-Application.js +320 -199
- package/example_applications/complex_table/Complex-Tabular-CustomDataProvider.js +25 -0
- package/example_applications/manifest_testbed/Pict-Template-Metacontroller-TemplateWithGroupRow.js +139 -0
- package/package.json +11 -5
- package/source/Pict-Section-Form.js +4 -1
- package/source/application/Pict-Application-Form.js +1 -1
- package/source/providers/Pict-Provider-DynamicSolver.js +25 -5
- package/source/providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.js +35 -8
- package/source/providers/Pict-Provider-Informary.js +20 -1
- package/source/providers/Pict-Provider-InputExtension.js +158 -0
- package/source/providers/Pict-Provider-MetaLists.js +160 -0
- package/source/providers/Pict-Provider-MetatemplateGenerator.js +2 -2
- package/source/providers/Pict-Provider-MetatemplateMacros.js +26 -0
- package/source/providers/inputs/Pict-Provider-Input-Select.js +189 -0
- package/source/templates/Pict-Template-Metacontroller-ValueSetWithGroup.js +2 -2
- package/source/views/Pict-View-DynamicForm-DefaultConfiguration.json +9 -1
- package/source/views/Pict-View-DynamicForm.js +325 -39
- package/source/views/Pict-View-Form-Metacontroller.js +5 -3
- package/test/PictSectionForm-Basic_tests.js +88 -1
- package/tsconfig.json +14 -0
- package/types/Pict-Section-Form.d.ts +35 -0
- package/types/Pict-Section-Form.d.ts.map +1 -0
- package/types/application/Pict-Application-Form.d.ts +18 -0
- package/types/application/Pict-Application-Form.d.ts.map +1 -0
- package/types/providers/Pict-Provider-DynamicLayout.d.ts +24 -0
- package/types/providers/Pict-Provider-DynamicLayout.d.ts.map +1 -0
- package/types/providers/Pict-Provider-DynamicSolver.d.ts +97 -0
- package/types/providers/Pict-Provider-DynamicSolver.d.ts.map +1 -0
- package/types/providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.d.ts +6 -0
- package/types/providers/Pict-Provider-DynamicTemplates-DefaultFormTemplates.d.ts.map +1 -0
- package/types/providers/Pict-Provider-DynamicTemplates.d.ts +16 -0
- package/types/providers/Pict-Provider-DynamicTemplates.d.ts.map +1 -0
- package/types/providers/Pict-Provider-Informary.d.ts +69 -0
- package/types/providers/Pict-Provider-Informary.d.ts.map +1 -0
- package/types/providers/Pict-Provider-MetatemplateGenerator.d.ts +14 -0
- package/types/providers/Pict-Provider-MetatemplateGenerator.d.ts.map +1 -0
- package/types/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts +17 -0
- package/types/templates/Pict-Template-Metacontroller-ValueSetWithGroup.d.ts.map +1 -0
- package/types/views/Pict-View-DynamicForm.d.ts +45 -0
- package/types/views/Pict-View-DynamicForm.d.ts.map +1 -0
- package/types/views/Pict-View-Form-Metacontroller.d.ts +94 -0
- 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
|
+
];
|
|
@@ -1,219 +1,340 @@
|
|
|
1
1
|
const libPictSectionForm = require('../../source/Pict-Section-Form.js');
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const libCustomDataProvider = require('./Complex-Tabular-CustomDataProvider.js');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
class ComplexTabularApplication extends libPictSectionForm.PictFormApplication
|
|
6
|
+
{
|
|
7
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
7
8
|
{
|
|
8
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
26
|
+
Sections: [
|
|
68
27
|
{
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
"
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
"
|
|
174
|
-
|
|
175
|
-
"
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
"
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
"
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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;
|