pict-section-form 1.0.8 → 1.0.12
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/.vscode/settings.json +3 -0
- package/example_applications/complex_table/Complex-Tabular-Application.js +231 -0
- package/example_applications/complex_table/FruitData.json +694 -0
- package/example_applications/complex_table/README-SimpleTable.md +31 -0
- package/example_applications/complex_table/html/index.html +13 -0
- package/example_applications/complex_table/package.json +26 -0
- package/example_applications/gradebook/.quackage.json +9 -0
- package/example_applications/gradebook/css/gradebook.css +248 -0
- package/example_applications/gradebook/css/pure.min.css +11 -0
- package/example_applications/gradebook/html/index.html +20 -0
- package/example_applications/gradebook/package.json +30 -0
- package/example_applications/gradebook/source/Gradebook-Application.js +27 -0
- package/example_applications/gradebook/source/manifests/Assignment-Manifest.json +38 -0
- package/example_applications/gradebook/source/manifests/Gradebook-Manifest.js +56 -0
- package/example_applications/gradebook/source/manifests/Student-Manifest.json +39 -0
- package/example_applications/gradebook/source/providers/Gradebook-Data.js +84 -0
- package/example_applications/gradebook/source/views/BasicContent-View-Templates.json +42 -0
- package/example_applications/gradebook/source/views/html/About.html +39 -0
- package/example_applications/gradebook/source/views/html/Legal.html +34 -0
- package/example_applications/postcard_example/providers/PictProvider-BestPostcardTheme.js +6 -46
- package/example_applications/postcard_example/providers/PictProvider-Dynamic-Sections-MockServerResponse.json +8 -4
- package/example_applications/simple_form/html/index.html +1 -1
- package/example_applications/simple_table/Simple-Tabular-Application.js +2 -1
- package/package.json +6 -5
- package/source/Pict-Form-Metacontroller.js +3 -0
- package/source/Pict-Section-Form-Provider-Templates-DefaultFormTemplates.js +99 -83
- package/source/Pict-Section-Form-View-DefaultConfiguration.json +3 -1
- package/source/Pict-Section-Form-View.js +261 -48
- package/source/Pict-Section-Form.js +0 -4
- package/source/Pict-Service-Informary.js +13 -4
- package/source/Pict-Template-Base.js +86 -0
- package/source/Pict-Template-MetacontrollerValueSetWithGroup.js +172 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
const libPictSectionForm = require('../../source/Pict-Section-Form.js');
|
|
2
|
+
|
|
3
|
+
class FruityGrid extends libPictSectionForm.PictFormApplication
|
|
4
|
+
{
|
|
5
|
+
constructor(pFable, pOptions, pServiceHash)
|
|
6
|
+
{
|
|
7
|
+
super(pFable, pOptions, pServiceHash);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
onBeforeInitialize()
|
|
11
|
+
{
|
|
12
|
+
this.log.trace(`Loading the fruitiest data ever!`);
|
|
13
|
+
this.AppData.FruitData = require('./FruitData.json');
|
|
14
|
+
this.log.trace(`... LOADED THE FRUIT!`);
|
|
15
|
+
return super.onBeforeInitialize();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = FruityGrid;
|
|
20
|
+
|
|
21
|
+
module.exports.default_configuration = libPictSectionForm.PictFormApplication.default_configuration;
|
|
22
|
+
module.exports.default_configuration.pict_configuration = (
|
|
23
|
+
{
|
|
24
|
+
"Product": "SimpleTable",
|
|
25
|
+
"DefaultFormManifest":
|
|
26
|
+
{
|
|
27
|
+
"Scope": "SuperSimpleTabularForm",
|
|
28
|
+
|
|
29
|
+
"Sections": [
|
|
30
|
+
{
|
|
31
|
+
"Hash": "Recipe",
|
|
32
|
+
"Name": "Fruit-based Recipe",
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
"Solvers":
|
|
36
|
+
[
|
|
37
|
+
"TotalFruitCalories = SUM(FruitNutritionCalories)",
|
|
38
|
+
"AverageFruitCalories = MEAN(FruitNutritionCalories)",
|
|
39
|
+
"AverageFatPercent = MEAN(FruitPercentTotalFat)"
|
|
40
|
+
],
|
|
41
|
+
|
|
42
|
+
"Groups": [
|
|
43
|
+
{
|
|
44
|
+
"Hash": "Recipe",
|
|
45
|
+
"Name": "Recipe",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"Hash": "Statistics",
|
|
49
|
+
"Name": "Statistics",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"Hash": "FruitStatistics",
|
|
53
|
+
"Name": "Statistics About the Fruit",
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
"Hash": "FruitGrid",
|
|
60
|
+
"Name": "Fruits of the World",
|
|
61
|
+
"Groups": [
|
|
62
|
+
{
|
|
63
|
+
|
|
64
|
+
"Hash": "FruitGrid",
|
|
65
|
+
"Name": "FruitGrid",
|
|
66
|
+
|
|
67
|
+
"Layout": "Tabular",
|
|
68
|
+
|
|
69
|
+
"RecordSetSolvers": [
|
|
70
|
+
"PercentTotalFat = (Fat * 9) / Calories"
|
|
71
|
+
],
|
|
72
|
+
"RecordSetAddress": "FruitData.FruityVice",
|
|
73
|
+
"RecordManifest": "FruitEditor"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
|
|
79
|
+
"Descriptors":
|
|
80
|
+
{
|
|
81
|
+
"RecipeName": { "Name": "Recipe Name", "Hash": "RecipeName", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
|
|
82
|
+
"RecipeType": { "Name": "Recipe Type", "Hash": "RecipeType", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
|
|
83
|
+
"RecipeDescription": { "Name": "Description", "Hash": "RecipeDescription", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
|
|
84
|
+
"Inventor": { "Name": "Inventor", "Hash": "Inventor", "DataType": "String", "PictForm": { "Section": "Recipe", "Group": "Recipe" } },
|
|
85
|
+
|
|
86
|
+
"Recipe.Feeds": {
|
|
87
|
+
"Name": "Feeds", "Hash": "RecipeFeeds", "DataType": "PreciseNumber", "Default": "1",
|
|
88
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 1, "Width": 1 }
|
|
89
|
+
},
|
|
90
|
+
"Recipe.TotalCalories": {
|
|
91
|
+
"Name": "Calories in the Fruits", "Hash": "RecipeCalories", "DataType": "PreciseNumber", "Default": "1",
|
|
92
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 1, "Width": 1 }
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
"Recipe.CounterWidth": {
|
|
96
|
+
"Name": "Counter Prep Width Requirements", "Hash": "RecipeCounterWidth", "DataType": "PreciseNumber", "Default": "10",
|
|
97
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 2, "Width": 1 }
|
|
98
|
+
},
|
|
99
|
+
"Recipe.CounterDepth": {
|
|
100
|
+
"Name": "Counter Prep Depth Requirements", "Hash": "RecipeCounterDepth", "DataType": "PreciseNumber", "Default": "5",
|
|
101
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 2, "Width": 1 }
|
|
102
|
+
},
|
|
103
|
+
"Recipe.CounterSurfaceArea": {
|
|
104
|
+
"Name": "Required Counter Surface Area", "Hash": "RecipeCounterDepth", "DataType": "PreciseNumber",
|
|
105
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 2, "Width": 1 }
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
"Recipe.VerticalClearance": {
|
|
109
|
+
"Name": "Prep Vertical Clearance", "Hash": "RecipeVerticalClearance", "DataType": "PreciseNumber", "Default": "12",
|
|
110
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 3, "Width": 1 }
|
|
111
|
+
},
|
|
112
|
+
"Recipe.PrepVolume": {
|
|
113
|
+
"Name": "Preparation Volume Requirements", "Hash": "RecipeCounterVolume", "DataType": "PreciseNumber",
|
|
114
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 3, "Width": 1 }
|
|
115
|
+
},
|
|
116
|
+
"Recipe.MoistureContent": {
|
|
117
|
+
"Name": "Required Moisture Content", "Hash": "RecipeMoistureContent", "DataType": "PreciseNumber",
|
|
118
|
+
"PictForm": { "Section": "Recipe", "Group": "Statistics", "Row": 3, "Width": 1 }
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
"FruitStats.TotalCalories": {
|
|
122
|
+
"Name": "Total Calories in All Fruits", "Hash": "TotalFruitCalories", "DataType": "PreciseNumber",
|
|
123
|
+
"PictForm": { "Section": "Recipe", "Group": "FruitStatistics", "Row": 1, "Width": 1 }
|
|
124
|
+
},
|
|
125
|
+
"FruitStats.AverageCalories": {
|
|
126
|
+
"Name": "Average (mean) Calories in All Fruits", "Hash": "AverageFruitCalories", "DataType": "PreciseNumber",
|
|
127
|
+
"PictForm": { "Section": "Recipe", "Group": "FruitStatistics", "Row": 1, "Width": 1 }
|
|
128
|
+
},
|
|
129
|
+
"FruitStats.AverageFatPercent": {
|
|
130
|
+
"Name": "Average (mean) Fat Percentage in All Fruits", "Hash": "AverageFatPercent", "DataType": "PreciseNumber",
|
|
131
|
+
"PictForm": { "Section": "Recipe", "Group": "FruitStatistics", "Row": 1, "Width": 1 }
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
"FruitData.FruityVice":
|
|
137
|
+
{
|
|
138
|
+
"Name": "Fruits of the Earth",
|
|
139
|
+
"Hash": "FruitGrid",
|
|
140
|
+
"DataType": "Array",
|
|
141
|
+
"Default": []
|
|
142
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
"FruitData.FruityVice[].nutritions.calories":
|
|
146
|
+
{
|
|
147
|
+
"Hash": "FruitNutritionCalories"
|
|
148
|
+
},
|
|
149
|
+
"FruitData.FruityVice[].nutritions.percent_total_fat":
|
|
150
|
+
{
|
|
151
|
+
"Hash": "FruitPercentTotalFat"
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
"ReferenceManifests":
|
|
156
|
+
{
|
|
157
|
+
"FruitEditor":
|
|
158
|
+
{
|
|
159
|
+
"Scope": "FruitEditor",
|
|
160
|
+
|
|
161
|
+
"Descriptors":
|
|
162
|
+
{
|
|
163
|
+
"name":
|
|
164
|
+
{
|
|
165
|
+
"Name": "Fruit Name",
|
|
166
|
+
"Hash": "Name",
|
|
167
|
+
"DataType": "String",
|
|
168
|
+
"Default": "(unnamed fruit)"
|
|
169
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
170
|
+
},
|
|
171
|
+
"family":
|
|
172
|
+
{
|
|
173
|
+
"Name": "Family",
|
|
174
|
+
"Hash": "Family",
|
|
175
|
+
"DataType": "String"
|
|
176
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
177
|
+
},
|
|
178
|
+
"order":
|
|
179
|
+
{
|
|
180
|
+
"Name": "Order",
|
|
181
|
+
"Hash": "Order",
|
|
182
|
+
"DataType": "String"
|
|
183
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
184
|
+
},
|
|
185
|
+
"genus":
|
|
186
|
+
{
|
|
187
|
+
"Name": "Genus",
|
|
188
|
+
"Hash": "Genus",
|
|
189
|
+
"DataType": "String"
|
|
190
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
191
|
+
},
|
|
192
|
+
"nutritions.calories":
|
|
193
|
+
{
|
|
194
|
+
"Name": "Calories",
|
|
195
|
+
"Hash": "Calories",
|
|
196
|
+
"DataType": "Number"
|
|
197
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
198
|
+
},
|
|
199
|
+
"nutritions.fat":
|
|
200
|
+
{
|
|
201
|
+
"Name": "Fat",
|
|
202
|
+
"Hash": "Fat",
|
|
203
|
+
"DataType": "Number"
|
|
204
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
205
|
+
},
|
|
206
|
+
"nutritions.carbohydrates":
|
|
207
|
+
{
|
|
208
|
+
"Name": "Carbohydrates",
|
|
209
|
+
"Hash": "Carbs",
|
|
210
|
+
"DataType": "Number"
|
|
211
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
212
|
+
},
|
|
213
|
+
"nutritions.protein":
|
|
214
|
+
{
|
|
215
|
+
"Name": "Protein",
|
|
216
|
+
"Hash": "Protein",
|
|
217
|
+
"DataType": "Number"
|
|
218
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
219
|
+
},
|
|
220
|
+
"nutritions.percent_total_fat":
|
|
221
|
+
{
|
|
222
|
+
"Name": "PercentTotalFat",
|
|
223
|
+
"Hash": "PercentTotalFat",
|
|
224
|
+
"DataType": "Number"
|
|
225
|
+
, "PictForm": { "Section": "FruitGrid", "Group": "FruitGrid" }
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
});
|