pict-section-recordset 1.1.0 → 1.2.0

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 (67) hide show
  1. package/package.json +5 -1
  2. package/source/views/RecordSet-Filters.js +20 -2
  3. package/source/views/filters/RecordSet-Filter-Base.js +86 -8
  4. package/source/views/read/RecordSet-Read.js +308 -2
  5. package/types/providers/Filter-Data-Provider.d.ts +1 -1
  6. package/types/providers/Filter-Data-Provider.d.ts.map +1 -1
  7. package/types/views/Filter-PersistenceView.d.ts +23 -2
  8. package/types/views/Filter-PersistenceView.d.ts.map +1 -1
  9. package/types/views/RecordSet-Filters.d.ts +26 -1
  10. package/types/views/RecordSet-Filters.d.ts.map +1 -1
  11. package/types/views/filters/RecordSet-Filter-Base.d.ts +14 -0
  12. package/types/views/filters/RecordSet-Filter-Base.d.ts.map +1 -1
  13. package/types/views/list/RecordSet-List.d.ts.map +1 -1
  14. package/types/views/read/RecordSet-Read.d.ts +51 -0
  15. package/types/views/read/RecordSet-Read.d.ts.map +1 -1
  16. package/.vscode/launch.json +0 -46
  17. package/CONTRIBUTING.md +0 -50
  18. package/debug/Harness.js +0 -0
  19. package/docs/.nojekyll +0 -0
  20. package/docs/README.md +0 -76
  21. package/docs/_brand.json +0 -18
  22. package/docs/_cover.md +0 -11
  23. package/docs/_sidebar.md +0 -19
  24. package/docs/_version.json +0 -7
  25. package/docs/api-reference.md +0 -233
  26. package/docs/filters.md +0 -151
  27. package/docs/index.html +0 -38
  28. package/docs/record-providers.md +0 -155
  29. package/docs/retold-catalog.json +0 -87
  30. package/docs/retold-keyword-index.json +0 -5227
  31. package/docs/views/create/README.md +0 -181
  32. package/docs/views/dashboard/README.md +0 -308
  33. package/docs/views/list/README.md +0 -260
  34. package/docs/views/read/README.md +0 -216
  35. package/eslint.config.mjs +0 -10
  36. package/example_applications/README.md +0 -39
  37. package/example_applications/ServeExamples.js +0 -82
  38. package/example_applications/bookstore/.quackage.json +0 -9
  39. package/example_applications/bookstore/Bookstore-Application-Configuration.json +0 -4
  40. package/example_applications/bookstore/Bookstore-Application.js +0 -671
  41. package/example_applications/bookstore/css/bookstore.css +0 -729
  42. package/example_applications/bookstore/css/pure.min.css +0 -11
  43. package/example_applications/bookstore/html/index.html +0 -46
  44. package/example_applications/bookstore/package.json +0 -34
  45. package/example_applications/bookstore/providers/PictRouter-Bookstore.json +0 -32
  46. package/example_applications/bookstore/views/PictView-Bookstore-Content-About.json +0 -21
  47. package/example_applications/bookstore/views/PictView-Bookstore-Content-Legal.json +0 -21
  48. package/example_applications/bookstore/views/PictView-Bookstore-Dashboard.js +0 -147
  49. package/example_applications/bookstore/views/PictView-Bookstore-Layout.js +0 -85
  50. package/example_applications/bookstore/views/PictView-Bookstore-Login.js +0 -58
  51. package/example_applications/bookstore/views/PictView-Bookstore-Navigation.js +0 -228
  52. package/example_applications/index.html +0 -50
  53. package/example_applications/mocks/book-edit-view.html +0 -173
  54. package/example_applications/mocks/book-read-view.html +0 -166
  55. package/example_applications/mocks/list-view.html +0 -185
  56. package/example_applications/package.json +0 -16
  57. package/example_applications/simple_entity/.quackage.json +0 -9
  58. package/example_applications/simple_entity/README-Simple-RecordSet.md +0 -8
  59. package/example_applications/simple_entity/Simple-RecordSet-Application.js +0 -887
  60. package/example_applications/simple_entity/html/index.html +0 -207
  61. package/example_applications/simple_entity/package.json +0 -27
  62. package/test/PictSectionRecordSet-Basic_tests.js +0 -205
  63. package/test/PictSectionRecordSet-Filter-Data-Provider_tests.js +0 -263
  64. package/test/PictSectionRecordSet-Filter-InstanceViews-Render_tests.js +0 -328
  65. package/test/PictSectionRecordSet-RecordProvider-Meadow_tests.js +0 -216
  66. package/tsconfig.build.json +0 -16
  67. package/tsconfig.json +0 -16
@@ -1,887 +0,0 @@
1
- const libPictRecordSet = require('../../source/Pict-Section-RecordSet.js');
2
-
3
- const BaseFilterView = require('../../source/views/filters/RecordSet-Filter-ExternalJoinSelectedValueList.js');
4
-
5
- const CustomViewConfig =
6
- {
7
- ViewIdentifier: 'PRSP-FilterType-ExternalJoinSelectedValueList-MyCoolView',
8
-
9
- Templates:
10
- [
11
- {
12
- Hash: 'PRSP-Filter-ExternalJoin-SelectedValueList-Template-Custom',
13
- Template: /*html*/`
14
- <!-- DefaultPackage pict view template: [PRSP-Filter-ExternalJoin-SelectedValueList-Template] -->
15
- <table>
16
- <tbody>
17
- <td valign="top">{~T:PRSP-Filter-ExternalJoin-SelectedValueList-SearchResults-Custom~}</td>
18
- <td>
19
- <button onclick="_Pict.views['{~D:Context[0].Hash~}'].handleAdd(event, '{~D:Record.ClauseAddress~}', '{~D:Record.Hash~}')">--&gt;</button>
20
- <button onclick="_Pict.views['{~D:Context[0].Hash~}'].handleRemove(event, '{~D:Record.ClauseAddress~}', '{~D:Record.Hash~}')">&lt;--</button>
21
- </td>
22
- <td valign="top">{~T:PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues-Custom~}</td>
23
- </tbody>
24
- </table>
25
- <!-- DefaultPackage end view template: [PRSP-Filter-ExternalJoin-SelectedValueList-Template] -->
26
- `
27
- },
28
- {
29
- Hash: 'PRSP-Filter-ExternalJoin-SelectedValueList-SearchResults-Custom',
30
- Template: /*html*/`
31
- <!-- DefaultPackage pict view template: [PRSP-Filter-ExternalJoin-SearchResults] -->
32
- <form id="PRSP_Filter_{~D:Record.Hash~}_Search_Form" onsubmit="_Pict.views['{~D:Context[0].Hash~}'].performSearch(event, '{~D:Record.ClauseAddress~}', '{~D:Record.Hash~}'); return false;">
33
- <input id="PRSP_Filter_{~D:Record.Hash~}_Search_Value" type="text" placeholder="Search..." value="{~D:Record.SearchInputValue~}" />
34
- <button type="submit" id="PRSP_Filter_{~D:Record.Hash~}_Button_Search" onclick="_Pict.views['{~D:Context[0].Hash~}'].performSearch(event, '{~D:Record.ClauseAddress~}', '{~D:Record.Hash~}')">Search</button>
35
- </form>
36
- <label>{~D:Record.Label~}</label>
37
- <select id="PRSP_Filter_{~D:Record.Hash~}_ResultsList" size="25">
38
- {~TSWP:PRSP-Filter-ExternalJoin-SelectedValueList-SearchResults-Entry-Custom:Record.SearchResults:Record~}
39
- </select>
40
- <!-- DefaultPackage end view template: [PRSP-Filter-ExternalJoin-SearchResults] -->
41
- `
42
- },
43
- {
44
- Hash: 'PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues-Custom',
45
- Template: /*html*/`
46
- <!-- DefaultPackage view template: [PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues] -->
47
- <label>Selection</label>
48
- <select id="PRSP_Filter_{~D:Record.Hash~}_SelectedValuesSelect" size="25">
49
- {~TSWP:PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues-Entry-Custom:Record.SelectedValues:Record~}
50
- </select>
51
- <!-- DefaultPackage end view template: [PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues] -->
52
- `
53
- },
54
- {
55
- Hash: 'PRSP-Filter-ExternalJoin-SelectedValueList-SearchResults-Entry-Custom',
56
- Template: /*html*/`
57
- <!-- DefaultPackage pict view template: [PRSP-Filter-ExternalJoin-SelectedValueList-Template] -->
58
- <option value="{~DVBK:Record.Data:Record.Payload.ExternalFilterTableLookupColumn~}">{~TFA:Record.Payload.ExternalRecordDisplayTemplate:Record~}</option>
59
- <!-- DefaultPackage end view template: [PRSP-Filter-ExternalJoin-SelectedValueList-Template] -->
60
- `
61
- },
62
- {
63
- Hash: 'PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues-Entry-Custom',
64
- Template: /*html*/`
65
- <!-- DefaultPackage pict view template: [PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues-Entry] -->
66
- <option value="{~DVBK:Record.Data:Record.Payload.ExternalFilterTableLookupColumn~}">{~TFA:Record.Payload.ExternalRecordDisplayTemplate:Record~}</option>
67
- <!-- DefaultPackage end view template: [PRSP-Filter-ExternalJoin-SelectedValueList-SelectedValues-Entry] -->
68
- `
69
- }
70
- ],
71
- };
72
-
73
- class CustomFilterView extends BaseFilterView
74
- {
75
- getFilterFormTemplate()
76
- {
77
- return 'PRSP-Filter-ExternalJoin-SelectedValueList-Template-Custom';
78
- }
79
-
80
- handleAdd(pEvent, pClauseInformaryAddress, pClauseHash)
81
- {
82
- pEvent.preventDefault();
83
- const tmpClause = this.getInformaryScopedValue(pClauseInformaryAddress);
84
- if (!tmpClause)
85
- {
86
- this.pict.log.error(`[Filter-ExternalJoinSelectedValueList] No clause found for address: ${pClauseInformaryAddress}`);
87
- return;
88
- }
89
- const tmpRecordLookupValue = this.pict.ContentAssignment.readContent(`#PRSP_Filter_${tmpClause.Hash}_ResultsList`);
90
- const tmpRecordLookupColumn = tmpClause.ExternalFilterTableLookupColumn || `ID${tmpClause.ExternalFilterByTable}`;
91
- const tmpRecordToAdd = tmpClause.SearchResults.find((r) => r[tmpRecordLookupColumn] == tmpRecordLookupValue);
92
- if (!tmpRecordToAdd)
93
- {
94
- this.pict.log.error(`[Filter-ExternalJoinSelectedValueList] No record found for value: ${tmpRecordLookupValue} in search results.`);
95
- return;
96
- }
97
- if (!tmpClause.SelectedValues)
98
- {
99
- tmpClause.SelectedValues = [];
100
- }
101
- if (tmpClause.SelectedValues.some((pSV) => pSV[tmpRecordLookupColumn] == tmpRecordLookupValue))
102
- {
103
- return;
104
- }
105
- const tmpValue = tmpRecordToAdd[tmpClause.ExternalFilterByTableConnectionColumn];
106
- if (tmpValue == null)
107
- {
108
- this.pict.log.error(`[Filter-ExternalJoinSelectedValueList] No value found for column: ${tmpClause.ExternalFilterByTableConnectionColumn} in record: ${JSON.stringify(tmpRecordToAdd)}`);
109
- return;
110
- }
111
- tmpClause.SelectedValues.push(tmpRecordToAdd);
112
- if (!tmpClause.Values)
113
- {
114
- tmpClause.Values = [];
115
- }
116
- if (!tmpClause.Values.some((pV) => pV == tmpValue))
117
- {
118
- tmpClause.Values.push(tmpValue);
119
- }
120
- const tmpRecord = Object.assign({ ClauseAddress: pClauseInformaryAddress }, tmpClause);
121
- this.prepareRecord(tmpRecord);
122
- const tmpDestinationAddress = `#PRSP_Filter_Container_${pClauseHash}`;
123
- this.render(null, tmpDestinationAddress, tmpRecord);
124
- }
125
-
126
- handleRemove(pEvent, pClauseInformaryAddress, pClauseHash)
127
- {
128
- pEvent.preventDefault();
129
- const tmpClause = this.getInformaryScopedValue(pClauseInformaryAddress);
130
- if (!tmpClause)
131
- {
132
- this.pict.log.error(`[Filter-ExternalJoinSelectedValueList] No clause found for address: ${pClauseInformaryAddress}`);
133
- return;
134
- }
135
- const tmpRecordLookupValue = this.pict.ContentAssignment.readContent(`#PRSP_Filter_${tmpClause.Hash}_SelectedValuesSelect`);
136
- const tmpRecordLookupColumn = tmpClause.ExternalFilterTableLookupColumn || `ID${tmpClause.ExternalFilterByTable}`;
137
- const tmpRecordIndexToRemove = tmpClause.SelectedValues.findIndex((r) => r[tmpRecordLookupColumn] == tmpRecordLookupValue);
138
- if (tmpRecordIndexToRemove < 0)
139
- {
140
- this.pict.log.error(`[Filter-ExternalJoinSelectedValueList] No record found to remove for value: ${tmpRecordLookupValue}`);
141
- return;
142
- }
143
- const tmpRecordToRemove = tmpClause.SelectedValues.splice(tmpRecordIndexToRemove, 1)[0];
144
- const tmpValue = tmpRecordToRemove[tmpClause.ExternalFilterByTableConnectionColumn];
145
- tmpClause.Values = tmpClause.Values.filter((pV) => pV !== tmpValue);
146
- const tmpRecord = Object.assign({ ClauseAddress: pClauseInformaryAddress }, tmpClause);
147
- this.prepareRecord(tmpRecord);
148
- const tmpDestinationAddress = `#PRSP_Filter_Container_${pClauseHash}`;
149
- this.render(null, tmpDestinationAddress, tmpRecord);
150
- }
151
- }
152
-
153
- CustomFilterView.default_configuration = Object.assign({}, BaseFilterView.default_configuration, CustomViewConfig);
154
-
155
- class SimpleApplication extends libPictRecordSet.PictRecordSetApplication
156
- {
157
- onInitialize()
158
- {
159
- this.pict.addView('PRSP-FilterType-ExternalJoinSelectedValueList-MyCoolView', {}, CustomFilterView);
160
- this.pict.addView('SpecialBookView',
161
- {
162
- "ViewIdentifier": "SpecialBookView",
163
-
164
- "DefaultRenderable": "SpecialBookView",
165
- "DefaultDestinationAddress": "#Placeholder",
166
- "IncludeInMetacontrollerOperations": true,
167
-
168
- "AutoRender": false,
169
-
170
- "Templates": [
171
- {
172
- "Hash": "SpecialBookView-Content",
173
- "Template": /*html*/`
174
- <div>
175
- This is a special book view, here's some text: <br />
176
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
177
- </div>
178
- `
179
- }
180
- ],
181
- "Renderables": [
182
- {
183
- "RenderableHash": "SpecialBookView",
184
- "TemplateHash": "SpecialBookView-Content"
185
- }
186
- ]
187
- });
188
-
189
- return super.onInitialize();
190
- }
191
- }
192
-
193
- module.exports = SimpleApplication;
194
-
195
- module.exports.default_configuration.pict_configuration = (
196
- {
197
- "Product": "Simple Record Set",
198
-
199
- "PictApplicationConfiguration":
200
- {
201
- "AutoRenderMainViewportViewAfterInitialize": false
202
- },
203
-
204
- "Manifests": // Manifest'Ohs: Breakfast of Champions
205
- {
206
- "Book-View":
207
- {
208
- "Form": "BookViewManifest",
209
- "Scope": "Book-View",
210
- "Descriptors":
211
- {
212
- "BookDetails.Title":
213
- {
214
- "Name": "Title",
215
- "Hash": "ViewBookName",
216
- "DataType": "String",
217
- "PictForm":
218
- {
219
- "Row": "1",
220
- "Section": "BookView",
221
- "Group": "BookView"
222
- }
223
- },
224
- "BookDetails.Genre":
225
- {
226
- "Name": "Genre",
227
- "Hash": "ViewBookGenre",
228
- "DataType": "String",
229
- "PictForm":
230
- {
231
- "Row": "1",
232
- "Section": "BookView",
233
- "Group": "BookView"
234
- }
235
- },
236
- "BookDetails.ISBN":
237
- {
238
- "Name": "ISBN",
239
- "Hash": "ViewBookISBN",
240
- "DataType": "String",
241
- "PictForm":
242
- {
243
- "Row": "2",
244
- "Section": "BookView",
245
- "Group": "BookView"
246
- }
247
- }
248
- },
249
- "Sections":
250
- [
251
- {
252
- "Name": "Book View",
253
- "Hash": "BookView",
254
- "Solvers": [],
255
- "ShowTitle": false,
256
- "Groups": [
257
- {
258
- "Name": "Book View",
259
- "Hash": "BookView",
260
- "Rows": [],
261
- "RecordSetSolvers": [],
262
- "ShowTitle": false
263
- }
264
- ]
265
- }
266
- ]
267
- },
268
- "Author-View":
269
- {
270
- "Form": "AuthorViewManifest",
271
- "Scope": "Author-View",
272
- "Descriptors":
273
- {
274
- "AuthorDetails.Name":
275
- {
276
- "Name": "Author Name",
277
- "Hash": "ViewAuthorName",
278
- "DataType": "String",
279
- "PictForm":
280
- {
281
- "Row": "1",
282
- "Section": "AuthorView",
283
- "Group": "AuthorView"
284
- }
285
- },
286
- },
287
- "Sections":
288
- [
289
- {
290
- "Name": "Author View",
291
- "Hash": "AuthorView",
292
- "Solvers": [],
293
- "ShowTitle": false,
294
- "Groups": [
295
- {
296
- "Name": "Author View",
297
- "Hash": "AuthorView",
298
- "Rows": [],
299
- "RecordSetSolvers": [],
300
- "ShowTitle": false
301
- }
302
- ]
303
- }
304
- ]
305
- },
306
- "AuthorMetadata":
307
- {
308
- "Form": "AuthorMetadataManifest",
309
- "Scope": "AuthorMetadata",
310
- "Descriptors":
311
- {
312
- "AuthorDetails.GUIDAuthor":
313
- {
314
- "Name": "Author GUID",
315
- "Hash": "ViewGUIDAuthor",
316
- "DataType": "String",
317
- "PictForm":
318
- {
319
- "Row": "1",
320
- "Section": "AuthorMetadata",
321
- "Group": "AuthorMetadata"
322
- }
323
- },
324
- "AuthorDetails.IDAuthor":
325
- {
326
- "Name": "ID Author",
327
- "Hash": "ViewIDAuthor",
328
- "DataType": "String",
329
- "PictForm":
330
- {
331
- "Row": "1",
332
- "Section": "AuthorMetadata",
333
- "Group": "AuthorMetadata"
334
- }
335
- },
336
- },
337
- "Sections":
338
- [
339
- {
340
- "Name": "Author Metadata",
341
- "Hash": "AuthorMetadata",
342
- "Solvers": [],
343
- "ShowTitle": false,
344
- "Groups": [
345
- {
346
- "Name": "Author Metadata",
347
- "Hash": "AuthorMetadata",
348
- "Rows": [],
349
- "RecordSetSolvers": [],
350
- "ShowTitle": false
351
- }
352
- ]
353
- }
354
- ]
355
- },
356
- "BookFormDashboardExample":
357
- {
358
- "Form": "BookFormManifest",
359
- "Scope": "BookFormDashboardExample",
360
- "TitleTemplate": "Form Dashboard Example",
361
- "WithRecordsetData": true,
362
- "Descriptors":
363
- {
364
- "BookFormDashboard.TextExample": {
365
- "Hash": "TextExample",
366
- "Name": "Text Example",
367
- "DataAddress": "BookFormDashboard.TextExample",
368
- "DataType": "String",
369
- "PictForm": {
370
- "Section": "ExampleTextSection",
371
- "Group": "ExampleTextGroup"
372
- },
373
- "Default": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
374
- },
375
- },
376
- "Sections":
377
- [
378
- {
379
- "Name": "ExampleTextSection",
380
- "Hash": "ExampleTextSection",
381
- "Solvers": [],
382
- "ShowTitle": false,
383
- "Groups": [
384
- {
385
- "Name": "ExampleTextGroup",
386
- "Hash": "ExampleTextGroup",
387
- "Rows": [],
388
- "RecordSetSolvers": [],
389
- "ShowTitle": false
390
- }
391
- ]
392
- },
393
- {
394
- "Name": "ExampleSection",
395
- "Hash": "ExampleSection",
396
- "ShowTitle": false,
397
- "Solvers": [],
398
- "Groups": [
399
- {
400
- "Name": "ExampleGroup",
401
- "Hash": "ExampleGroup",
402
- "Rows": [],
403
- "RecordSetSolvers": [],
404
- "Layout": "Tabular",
405
- "RecordSetAddress": "PSRS-Dashboard-Data",
406
- "RecordManifest": "ExampleReferenceManifest"
407
- }
408
- ]
409
- }
410
- ],
411
- "ReferenceManifests":
412
- {
413
- "ExampleReferenceManifest":
414
- {
415
- "Scope": "ExampleReferenceManifest",
416
- "Descriptors":
417
- {
418
- "Authors.0.Name":
419
- {
420
- "Hash": "Author",
421
- "Name": "Author",
422
- "DataAddress": "Authors.0.Name",
423
- "DataType": "String",
424
- "IsTabular": true
425
- },
426
- },
427
- "Sections": [],
428
- "ReferenceManifests": {}
429
- },
430
- }
431
- },
432
- "Bestsellers":
433
- {
434
- "Scope": "Bestsellers",
435
- "CoreEntity": "Book",
436
- "TitleTemplate": "Bestsellers ({~D:Record.RecordSet~} LoL)",
437
- "GlobalSolvers":
438
- [
439
- {
440
- "Ordinal": 0,
441
- "Expression": "AppData.AuthorsFavoriteNumber = AVG(RecordSubset[].IDBook)",
442
- },
443
- {
444
- "Ordinal": 1,
445
- "Expression": "AppData.AuthorsLeastFavoriteNumber = SUM(RecordSubset[].IDBook)",
446
- },
447
- {
448
- "Ordinal": 1,
449
- "Expression": "AppData.BookCount = COUNT(RecordSet[])",
450
- },
451
- {
452
- "Ordinal": 1,
453
- "Expression": "AppData.TotalLibraryValue = SUM(RecordSet[].Price)",
454
- },
455
- ],
456
- "Descriptors":
457
- {
458
- "IDBook":
459
- {
460
- "Name": "Book Identifier",
461
- "Hash": "BookIdentifier",
462
- },
463
- "PublicationYear":
464
- {
465
- "Name": "PublicationYear",
466
- "Hash": "PublicationYear",
467
- "PictDashboard":
468
- {
469
- "Equation": "ROUND(SQRT(PublicationYear), 3)",
470
- "ValueTemplate": "{~D:Record.Payload.PublicationYear~} ({~SBR:Record.Data.PictDashboard.Equation:Record.Payload:Pict.PictSectionRecordSet.getManifest(Record.Data.ManifestHash)~})",
471
- }
472
- },
473
- "Title":
474
- {
475
- "Name": "Title",
476
- "Hash": "Title",
477
- "PictDashboard":
478
- {
479
- "ValueTemplate": "{~D:Record.Payload.Title~} ({~D:AppData.RSP-Provider-BookstoreInventory.Authors.length~} authors in cohort)"
480
- }
481
- },
482
- "AuthorBookCount":
483
- {
484
- "Name": "Author Book Count",
485
- "Hash": "AuthorBookCount",
486
- },
487
- "Authors":
488
- {
489
- "Name": "Authors",
490
- "Hash": "BookAuthors",
491
- "DataType": "Array",
492
- "PictDashboard":
493
- {
494
- "ValueTemplate": "{~PJU:, ^Name^Record.Payload.Authors~}"
495
- }
496
- },
497
- "AuthorCount":
498
- {
499
- "Name": "Number of Authors",
500
- "Hash": "AuthorCount",
501
- "DataType": "Number",
502
- "PictDashboard":
503
- {
504
- "EquationNamespaceScope": "Full",
505
- "Equation": "Payload.Authors.length + 0", //FIXME: having to + 0 here seems sketchy
506
- "Solvers":
507
- [
508
- {
509
- "Ordinal": 0,
510
- "Expression": "Price = ROUND(RANDOMFLOATBETWEEN(0.5, 40), 2)",
511
- },
512
- "AuthorCount = COS(Authors.length)",
513
- ],
514
- }
515
- },
516
- "AuthorSineWave":
517
- {
518
- "Name": "Number of Authors in Orbit",
519
- "Hash": "AuthorSineWave",
520
- "DataType": "Number",
521
- "PictDashboard":
522
- {
523
- "Equation": "AuthorSineWave = ROUND(SIN(BookIdentifier / 100)^3,5)", //FIXME: having to + 0 here seems sketchy
524
- //"ValueTemplate": "{~D:Record.Payload.AuthorsInOrbit~}",
525
- "Solvers": [ "AuthorsInOrbit = SIN(Authors.length)" ],
526
- }
527
- }
528
- },
529
- },
530
- "Underdogs":
531
- {
532
- "Scope": "Underdogs",
533
- "CoreEntity": "Book",
534
- "Descriptors":
535
- {
536
- "Title":
537
- {
538
- "Name": "Title",
539
- "Hash": "Title",
540
- "DataType": "String",
541
- "PictDashboard":
542
- {
543
- }
544
- },
545
- "Authors":
546
- {
547
- "Name": "Authors",
548
- "Hash": "BookAuthors",
549
- "DataType": "Array",
550
- "PictDashboard":
551
- {
552
- "ValueTemplate": "{~PJU:, ^Name^Record.Payload.Authors~}"
553
- }
554
- },
555
- "AuthorCount":
556
- {
557
- "Name": "Number of Authors",
558
- "Hash": "AuthorCount",
559
- "DataType": "Number",
560
- "PictDashboard":
561
- {
562
- "EquationNamespaceScope": "Full",
563
- "Equation": "Payload.Authors.length + 0", //FIXME: having to + 0 here seems sketchy
564
- "Solvers":
565
- [
566
- {
567
- "Ordinal": 0,
568
- "Expression": "Price = ROUND(RANDOMFLOATBETWEEN(0.5, 40), 2)",
569
- },
570
- "AuthorCount = COS(Authors.length)",
571
- ],
572
- }
573
- }
574
- },
575
- },
576
- "NewReleases":
577
- {
578
- "Scope": "NewReleases",
579
- "CoreEntity": "Book",
580
- "Descriptors":
581
- {
582
- "Title":
583
- {
584
- "Name": "Title",
585
- "Hash": "Title",
586
- "DataType": "String"
587
- },
588
- "Authors":
589
- {
590
- "Name": "Authors",
591
- "Hash": "Authors",
592
- "PictDashboard":
593
- {
594
- }
595
- },
596
- "AuthorCount":
597
- {
598
- "Name": "Number of Authors",
599
- "Hash": "AuthorCount",
600
- "DataType": "Number",
601
- "PictDashboard":
602
- {
603
- }
604
- }
605
- },
606
- }
607
- },
608
- "Filters":
609
- {
610
- "ExternalJoinBookByAuthor":
611
- {
612
- "Label": "Author's Name",
613
- "Type": "ExternalJoinStringMatch",
614
- "ExternalFilterByColumns": [ "Name" ],
615
- "DisplayName": "Author's Name",
616
-
617
- "CoreConnectionColumn": "IDBook",
618
-
619
- "JoinTable": "BookAuthorJoin",
620
- "JoinTableExternalConnectionColumn": "IDAuthor",
621
- "JoinTableCoreConnectionColumn": "IDBook",
622
-
623
- "ExternalFilterByTable": "Author",
624
- "ExternalFilterByTableConnectionColumn": "IDAuthor"
625
- },
626
- "ExternalJoinBookBySelectedAuthors":
627
- {
628
- "Label": "Authors",
629
- "Type": "ExternalJoinSelectedValueList",
630
- "ExternalFilterByColumns": [ "Name", "GUIDAuthor" ],
631
-
632
- "MaximumSelectedExternalRecords": 5,
633
- "ExternalRecordDisplayTemplate": "{~D:Record.Data.Name~}",
634
-
635
- "CoreConnectionColumn": "IDBook",
636
-
637
- "JoinTable": "BookAuthorJoin",
638
- "JoinTableExternalConnectionColumn": "IDAuthor",
639
- "JoinTableCoreConnectionColumn": "IDBook",
640
-
641
- "ExternalFilterByTable": "Author",
642
- "ExternalFilterByTableConnectionColumn": "IDAuthor",
643
- "CustomFilterViewHash": "MyCoolView"
644
- },
645
- "InternalJoinBySelectedJoinIDs":
646
- {
647
- "Label": "Join IDs (internal test)",
648
- "Type": "InternalJoinSelectedValue",
649
- "ExternalFilterByColumns": [ "IDBookAuthorJoin" ],
650
-
651
- "ExternalRecordDisplayTemplate": "{~D:Record.Data.IDBookAuthorJoin~} [{~D:Record.Data.IDBook~} &lt;-&gt; {~D:Record.Data.IDAuthor~}]",
652
-
653
- "CoreConnectionColumn": "IDBook",
654
-
655
- "RemoteTable": "BookAuthorJoin",
656
- "JoinExternalConnectionColumn": "IDBook",
657
- "JoinInternalConnectionColumn": "IDBook"
658
- }
659
- },
660
- "FilterCriteria":
661
- {
662
- "FilterRecordsetByBookAndCreateDate":
663
- [
664
- {
665
- "FilterDefinitionHash": "ExternalJoinBookBySelectedAuthors",
666
- "FilterByColumn": "IDBook"
667
- },
668
- {
669
- "FilterDefinitionHash": "InternalJoinBySelectedJoinIDs",
670
- "FilterByColumn": "IDBook"
671
- },
672
- {
673
- "Type": "DateRange",
674
- "FilterByColumn": "CreateDate"
675
- },
676
- {
677
- "Type": "StringMatch",
678
- "FilterByColumn": "Genre"
679
- }
680
- ],
681
- "FilterRecordsetByTitle":
682
- [
683
- {
684
- "Type": "StringMatch",
685
- "FilterByColumn": "Title"
686
- },
687
- ]
688
- },
689
-
690
- "DefaultRecordSetConfigurations":
691
- [
692
- {
693
- "RecordSet": "Book",
694
-
695
- "RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
696
- "RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
697
-
698
- "RecordSetIgnoreFilterFields": [ "Deleted", "DeletingIDUser", "DeleteDate", "UpdateDate" ],
699
-
700
- "RecordSetFieldFilterClauses":
701
- {
702
- "Title":
703
- [
704
- { "FilterKey": "Title", "ClauseKey": "TitleMatch", "Label": "Book Title Custom Filter", "Type": "StringMatch", "FilterByColumn": "Title", "ExactMatch": true }
705
- ]
706
- },
707
-
708
- "RecordSetListColumns": [
709
- {
710
- "Key": "Title",
711
- "DisplayName": "Title"
712
- },
713
- {
714
- "Key": "Genre",
715
- "DisplayName": "Genre"
716
- },
717
- {
718
- "Key": "ISBN",
719
- "DisplayName": "Int'l SBN"
720
- }
721
- ],
722
-
723
- "FilterExperiences":
724
- {
725
- "FilterByAuthorAndCreateDate":
726
- {
727
- "Ordinal": 1,
728
- "FilterCriteriaHash": "FilterRecordsetByBookAndCreateDate",
729
- "Default": true
730
- },
731
- "FilterByTitle":
732
- {
733
- "Ordinal": 2,
734
- "FilterCriteriaHash": "FilterRecordsetByTitle"
735
- }
736
- },
737
-
738
- "RecordSetReadManifestOnly": true,
739
- "RecordSetReadDefaultManifestView": "Book-View",
740
- "RecordSetReadManifestsView": [ "Book-View" ],
741
-
742
- "ReadLayout": "Split",
743
-
744
- "RecordSetReadTabs":
745
- [
746
- {
747
- Type: "AttachedRecord",
748
- RecordSet: "Author",
749
- Title: "Author",
750
- JoiningRecordSet: "BookAuthorJoin"
751
- },
752
- {
753
- Type: "Manifest",
754
- Manifest: "AuthorMetadata",
755
- Title: "Author Metadata"
756
- },
757
- {
758
- Type: "View",
759
- View: "SpecialBookView",
760
- Title: "More Book Info"
761
- }
762
- ],
763
-
764
- "RecordSetListManifestOnly": false,
765
-
766
- "RecordSetListManifests": [ "Bestsellers", "Underdogs", "NewReleases" ],
767
- "RecordSetDashboardManifests": [ "Bestsellers" ],
768
-
769
- "RecordSetListHasExtraColumns": true,
770
- "RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid var(--theme-color-border-default, #ccc); padding: 5px; background-color: var(--theme-color-background-tertiary, #f2f2f2); color: var(--theme-color-text-primary, #333);\">Cover</th>",
771
- "RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
772
-
773
- "SearchFields": [ "Title" ],
774
-
775
- "RecordSetFilterURLTemplate-Default": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
776
- "RecordSetFilterURLTemplate-List": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
777
- "RecordSetFilterURLTemplate-Dashboard": "/PSRS/{~D:Record.RecordSet~}/Dashboard/FilteredTo/{~D:Record.FilterString~}",
778
-
779
- "RecordSetURLPrefix": "/1.0/"
780
- },
781
- {
782
- "RecordSet": "BookstoreInventory",
783
- "Title": "Bookstore Inventory",
784
-
785
- "RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
786
- "RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
787
-
788
- "RecordSetDashboardManifestOnly": true,
789
-
790
- "RecordSetDashboardManifests": [ "Bestsellers", "Underdogs", "NewReleases", "BookFormDashboardExample" ],
791
-
792
- "RecordDecorationConfiguration":
793
- [
794
- {
795
- "Entity": "BookAuthorJoin",
796
- "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^Record.State.CoreEntityRecordSubset~}",
797
- "Destination": "State.BookAuthorJoins"
798
- },
799
- {
800
- "Entity": "Author",
801
- "Filter": "FBL~IDAuthor~INN~{~PJU:,^IDAuthor^Record.State.BookAuthorJoins~}",
802
- "Destination": "State.Authors"
803
- },
804
- {
805
- "Type": "MapJoin",
806
- "DestinationRecordSetAddress": "State.CoreEntityRecordSubset",
807
- "DestinationJoinValue": "IDBook",
808
- "JoinJoinValueLHS": "IDBook",
809
- "Joins": "State.BookAuthorJoins",
810
- "JoinJoinValueRHS": "IDAuthor",
811
- "JoinRecordSetAddress": "State.Authors",
812
- "JoinValue": "IDAuthor",
813
- "RecordDestinationAddress": "Authors"
814
- },
815
- {
816
- "Entity": "BookAuthorJoin",
817
- "Filter": "FBL~IDAuthor~INN~{~PJU:,^IDAuthor^Record.State.Authors~}",
818
- "Destination": "State.BookAuthorJoinsRev"
819
- },
820
- {
821
- "Entity": "Book",
822
- "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^Record.State.BookAuthorJoinsRev~}",
823
- "Destination": "State.BooksForAuthors"
824
- },
825
- {
826
- "Type": "MapJoin",
827
- "DestinationRecordSetAddress": "State.Authors",
828
- "DestinationJoinValue": "IDAuthor",
829
- "JoinJoinValueLHS": "IDAuthor",
830
- "Joins": "State.BookAuthorJoinsRev",
831
- "JoinJoinValueRHS": "IDBook",
832
- "JoinRecordSetAddress": "State.BooksForAuthors",
833
- "JoinValue": "IDBook",
834
- "RecordDestinationAddress": "Books"
835
- }
836
- ],
837
- "AvailableVerbs": [ "Dashboard" ],
838
-
839
- "RecordSetListHasExtraColumns": true,
840
- "RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid var(--theme-color-border-default, #ccc); padding: 5px; background-color: var(--theme-color-background-tertiary, #f2f2f2); color: var(--theme-color-text-primary, #333);\">Cover</th>",
841
- "RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
842
-
843
- "SearchFields": [ "Title" ],
844
-
845
- "RecordSetFilterURLTemplate-Default": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
846
- "RecordSetFilterURLTemplate-List": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
847
- "RecordSetFilterURLTemplate-Dashboard": "/PSRS/{~D:Record.RecordSet~}/Dashboard/FilteredTo/{~D:Record.FilterString~}",
848
- //TODO: something like this to reduce boilerplate
849
- "RecordSetFilterURLTemplate-Dashboard-Specific": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/$$DASHBOARD_HASH$$/FilteredTo/{~D:Record.FilterString~}",
850
- "RecordSetFilterURLTemplate-Dashboard-Bestsellers": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/Bestsellers/FilteredTo/{~D:Record.FilterString~}",
851
- "RecordSetFilterURLTemplate-Dashboard-BookFormDashboardExample": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/BookFormDashboardExample/FilteredTo/{~D:Record.FilterString~}",
852
- "RecordSetFilterURLTemplate-Dashboard-Underdogs": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/Underdogs/FilteredTo/{~D:Record.FilterString~}",
853
- "RecordSetFilterURLTemplate-Dashboard-NewReleases": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/NewReleases/FilteredTo/{~D:Record.FilterString~}",
854
-
855
- "RecordSetURLPrefix": "/1.0/"
856
- },
857
- {
858
- "RecordSet": "Author",
859
-
860
- "RecordSetType": "MeadowEndpoint",
861
- "RecordSetMeadowEntity": "Author",
862
-
863
- "RecordSetURLPrefix": "/1.0/",
864
-
865
- "RecordSetReadManifestOnly": true,
866
- "RecordSetReadManifestsView": [ "Author-View" ],
867
-
868
- "ReadLayout": "Tab",
869
- "RecordSetReadTabTitle": "Author",
870
-
871
- "RecordSetReadTabs":
872
- [
873
- {
874
- Type: "Manifest",
875
- Manifest: "AuthorMetadata",
876
- Title: "Author Metadata"
877
- }
878
- ],
879
-
880
- },
881
- {
882
- "RecordSet": "RandomizedValues",
883
-
884
- "RecordSetType": "Custom" // This means the `PS-RSP-RandomizedValues` provider will be checked for to get records.
885
- }
886
- ]
887
- });