pict-section-recordset 1.0.23 → 1.0.26

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 (100) hide show
  1. package/eslint.config.mjs +10 -0
  2. package/example_applications/simple_entity/Simple-RecordSet-Application.js +170 -110
  3. package/package.json +11 -11
  4. package/source/application/Pict-Application-RecordSet.js +8 -0
  5. package/source/providers/RecordSet-DynamicRecordsetSolver.js +1 -0
  6. package/source/providers/RecordSet-Link-Manager.js +2 -2
  7. package/source/providers/RecordSet-RecordProvider-Base.js +9 -2
  8. package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +118 -16
  9. package/source/services/RecordsSet-MetaController.js +41 -19
  10. package/source/templates/Pict-Template-FilterInstanceViews.js +222 -0
  11. package/source/templates/Pict-Template-FilterView.js +4 -2
  12. package/source/views/RecordSet-Filters.js +449 -0
  13. package/source/views/dashboard/RecordSet-Dashboard.js +66 -9
  14. package/source/views/filters/RecordSet-Filter-Base-Range.js +38 -0
  15. package/source/views/filters/RecordSet-Filter-Base.js +88 -0
  16. package/source/views/filters/RecordSet-Filter-DateMatch.js +56 -0
  17. package/source/views/filters/RecordSet-Filter-DateRange.js +75 -0
  18. package/source/views/filters/RecordSet-Filter-ExternalJoinDateMatch.js +55 -0
  19. package/source/views/filters/RecordSet-Filter-ExternalJoinDateRange.js +57 -0
  20. package/source/views/filters/RecordSet-Filter-ExternalJoinNumericMatch.js +54 -0
  21. package/source/views/filters/RecordSet-Filter-ExternalJoinNumericRange.js +57 -0
  22. package/source/views/filters/RecordSet-Filter-ExternalJoinStringMatch.js +45 -0
  23. package/source/views/filters/RecordSet-Filter-ExternalJoinStringRange.js +46 -0
  24. package/source/views/filters/RecordSet-Filter-InternalJoinDateMatch.js +55 -0
  25. package/source/views/filters/RecordSet-Filter-InternalJoinDateRange.js +57 -0
  26. package/source/views/filters/RecordSet-Filter-InternalJoinNumericMatch.js +55 -0
  27. package/source/views/filters/RecordSet-Filter-InternalJoinNumericRange.js +57 -0
  28. package/source/views/filters/RecordSet-Filter-InternalJoinStringMatch.js +45 -0
  29. package/source/views/filters/RecordSet-Filter-InternalJoinStringRange.js +46 -0
  30. package/source/views/filters/RecordSet-Filter-NumericMatch.js +55 -0
  31. package/source/views/filters/RecordSet-Filter-NumericRange.js +57 -0
  32. package/source/views/filters/RecordSet-Filter-StringMatch.js +45 -0
  33. package/source/views/filters/RecordSet-Filter-StringRange.js +46 -0
  34. package/source/views/filters/index.js +27 -0
  35. package/source/views/list/RecordSet-List.js +44 -6
  36. package/test/PictSectionRecordSet-RecordProvider-Meadow_tests.js +11 -0
  37. package/types/application/Pict-Application-RecordSet.d.ts.map +1 -1
  38. package/types/providers/RecordSet-DynamicRecordsetSolver.d.ts +10 -8
  39. package/types/providers/RecordSet-DynamicRecordsetSolver.d.ts.map +1 -1
  40. package/types/providers/RecordSet-Link-Manager.d.ts +3 -3
  41. package/types/providers/RecordSet-RecordProvider-Base.d.ts +9 -0
  42. package/types/providers/RecordSet-RecordProvider-Base.d.ts.map +1 -1
  43. package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts +30 -4
  44. package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -1
  45. package/types/services/RecordsSet-MetaController.d.ts +2 -2
  46. package/types/services/RecordsSet-MetaController.d.ts.map +1 -1
  47. package/types/templates/Pict-Template-FilterInstanceViews.d.ts +19 -0
  48. package/types/templates/Pict-Template-FilterInstanceViews.d.ts.map +1 -0
  49. package/types/templates/Pict-Template-FilterView.d.ts.map +1 -1
  50. package/types/views/RecordSet-Filters.d.ts +84 -0
  51. package/types/views/RecordSet-Filters.d.ts.map +1 -0
  52. package/types/views/dashboard/RecordSet-Dashboard.d.ts +4 -2
  53. package/types/views/dashboard/RecordSet-Dashboard.d.ts.map +1 -1
  54. package/types/views/filters/RecordSet-Filter-Base-Range.d.ts +5 -0
  55. package/types/views/filters/RecordSet-Filter-Base-Range.d.ts.map +1 -0
  56. package/types/views/filters/RecordSet-Filter-Base.d.ts +29 -0
  57. package/types/views/filters/RecordSet-Filter-Base.d.ts.map +1 -0
  58. package/types/views/filters/RecordSet-Filter-DateMatch.d.ts +9 -0
  59. package/types/views/filters/RecordSet-Filter-DateMatch.d.ts.map +1 -0
  60. package/types/views/filters/RecordSet-Filter-DateRange.d.ts +9 -0
  61. package/types/views/filters/RecordSet-Filter-DateRange.d.ts.map +1 -0
  62. package/types/views/filters/RecordSet-Filter-ExternalJoinDateMatch.d.ts +9 -0
  63. package/types/views/filters/RecordSet-Filter-ExternalJoinDateMatch.d.ts.map +1 -0
  64. package/types/views/filters/RecordSet-Filter-ExternalJoinDateRange.d.ts +9 -0
  65. package/types/views/filters/RecordSet-Filter-ExternalJoinDateRange.d.ts.map +1 -0
  66. package/types/views/filters/RecordSet-Filter-ExternalJoinNumericMatch.d.ts +9 -0
  67. package/types/views/filters/RecordSet-Filter-ExternalJoinNumericMatch.d.ts.map +1 -0
  68. package/types/views/filters/RecordSet-Filter-ExternalJoinNumericRange.d.ts +9 -0
  69. package/types/views/filters/RecordSet-Filter-ExternalJoinNumericRange.d.ts.map +1 -0
  70. package/types/views/filters/RecordSet-Filter-ExternalJoinStringMatch.d.ts +9 -0
  71. package/types/views/filters/RecordSet-Filter-ExternalJoinStringMatch.d.ts.map +1 -0
  72. package/types/views/filters/RecordSet-Filter-ExternalJoinStringRange.d.ts +9 -0
  73. package/types/views/filters/RecordSet-Filter-ExternalJoinStringRange.d.ts.map +1 -0
  74. package/types/views/filters/RecordSet-Filter-InternalJoinDateMatch.d.ts +9 -0
  75. package/types/views/filters/RecordSet-Filter-InternalJoinDateMatch.d.ts.map +1 -0
  76. package/types/views/filters/RecordSet-Filter-InternalJoinDateRange.d.ts +9 -0
  77. package/types/views/filters/RecordSet-Filter-InternalJoinDateRange.d.ts.map +1 -0
  78. package/types/views/filters/RecordSet-Filter-InternalJoinNumericMatch.d.ts +9 -0
  79. package/types/views/filters/RecordSet-Filter-InternalJoinNumericMatch.d.ts.map +1 -0
  80. package/types/views/filters/RecordSet-Filter-InternalJoinNumericRange.d.ts +9 -0
  81. package/types/views/filters/RecordSet-Filter-InternalJoinNumericRange.d.ts.map +1 -0
  82. package/types/views/filters/RecordSet-Filter-InternalJoinStringMatch.d.ts +9 -0
  83. package/types/views/filters/RecordSet-Filter-InternalJoinStringMatch.d.ts.map +1 -0
  84. package/types/views/filters/RecordSet-Filter-InternalJoinStringRange.d.ts +9 -0
  85. package/types/views/filters/RecordSet-Filter-InternalJoinStringRange.d.ts.map +1 -0
  86. package/types/views/filters/RecordSet-Filter-NumericMatch.d.ts +9 -0
  87. package/types/views/filters/RecordSet-Filter-NumericMatch.d.ts.map +1 -0
  88. package/types/views/filters/RecordSet-Filter-NumericRange.d.ts +9 -0
  89. package/types/views/filters/RecordSet-Filter-NumericRange.d.ts.map +1 -0
  90. package/types/views/filters/RecordSet-Filter-StringMatch.d.ts +9 -0
  91. package/types/views/filters/RecordSet-Filter-StringMatch.d.ts.map +1 -0
  92. package/types/views/filters/RecordSet-Filter-StringRange.d.ts +9 -0
  93. package/types/views/filters/RecordSet-Filter-StringRange.d.ts.map +1 -0
  94. package/types/views/filters/index.d.ts +20 -0
  95. package/types/views/filters/index.d.ts.map +1 -0
  96. package/types/views/list/RecordSet-List.d.ts +12 -2
  97. package/types/views/list/RecordSet-List.d.ts.map +1 -1
  98. package/source/views/RecordSet-Filter.js +0 -159
  99. package/types/views/RecordSet-Filter.d.ts +0 -39
  100. package/types/views/RecordSet-Filter.d.ts.map +0 -1
@@ -0,0 +1,10 @@
1
+ import globals from "globals";
2
+ import pluginJs from "@eslint/js";
3
+
4
+
5
+ export default [
6
+ { files: ["source/**", "test/**"], languageOptions: { sourceType: "commonjs" } },
7
+ { languageOptions: { globals: { ...globals.browser, ...globals.mocha, } } },
8
+ pluginJs.configs.recommended,
9
+ { rules: { "no-prototype-builtins": "off", "no-unused-vars": "warn" } },
10
+ ];
@@ -1,7 +1,13 @@
1
+ const { ajax } = require('jquery');
1
2
  const libPictRecordSet = require('../../source/Pict-Section-RecordSet.js');
2
3
  //const libPictSectionForm = require('pict-section-recordset');
4
+ const libPictRecordSetLocalDateRangeFilterView = require('../../source/views/filters/RecordSet-Filter-DateRange.js');
3
5
 
4
- module.exports = libPictRecordSet.PictRecordSetApplication;
6
+ class SimpleApplication extends libPictRecordSet.PictRecordSetApplication
7
+ {
8
+ }
9
+
10
+ module.exports = SimpleApplication;
5
11
 
6
12
  module.exports.default_configuration.pict_configuration = (
7
13
  {
@@ -175,133 +181,187 @@ module.exports.default_configuration.pict_configuration = (
175
181
  },
176
182
  }
177
183
  },
178
- "DefaultRecordSetConfigurations":
184
+ "Filters":
185
+ {
186
+ "ExternalJoinBookByAuthor":
187
+ {
188
+ "Type": "ExternalJoinStringMatch",
189
+ "ExternalFilterByColumns": [ "Name" ],
190
+
191
+ "CoreConnectionColumn": "IDBook",
192
+
193
+ "JoinTable": "BookAuthorJoin",
194
+ "JoinTableExternalConnectionColumn": "IDAuthor",
195
+ "JoinTableCoreConnectionColumn": "IDBook",
196
+
197
+ "ExternalFilterByTable": "Author",
198
+ "ExternalFilterByTableConnectionColumn": "IDAuthor"
199
+ }
200
+ },
201
+ "FilterCriteria":
202
+ {
203
+ "FilterRecordsetByBookAndCreateDate":
179
204
  [
180
205
  {
181
- "RecordSet": "Book",
206
+ "FilterDefinitionHash": "ExternalJoinBookByAuthor",
207
+ "FilterByColumn": "IDBook"
208
+ },
209
+ {
210
+ "Type": "DateRange",
211
+ "FilterByColumn": "CreateDate"
212
+ }
213
+ ],
214
+ "FilterRecordsetByTitle":
215
+ [
216
+ {
217
+ "Type": "StringMatch",
218
+ "FilterByColumn": "Title"
219
+ },
220
+ ]
221
+ },
222
+
223
+ "DefaultRecordSetConfigurations":
224
+ [
225
+ {
226
+ "RecordSet": "Book",
182
227
 
183
- "RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
184
- "RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
228
+ "RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
229
+ "RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
185
230
 
186
- "RecordSetListColumns": [
187
- {
188
- "Key": "Title",
189
- "DisplayName": "Title"
190
- },
191
- {
192
- "Key": "Genre",
193
- "DisplayName": "Genre"
194
- },
195
- {
196
- "Key": "ISBN",
197
- "DisplayName": "Int'l SBN"
198
- }
199
- ],
231
+ "RecordSetListColumns": [
232
+ {
233
+ "Key": "Title",
234
+ "DisplayName": "Title"
235
+ },
236
+ {
237
+ "Key": "Genre",
238
+ "DisplayName": "Genre"
239
+ },
240
+ {
241
+ "Key": "ISBN",
242
+ "DisplayName": "Int'l SBN"
243
+ }
244
+ ],
245
+
246
+ "FilterExperiences":
247
+ {
248
+ "FilterByAuthorAndCreateDate":
249
+ {
250
+ "Ordinal": 1,
251
+ "FilterCriteriaHash": "FilterRecordsetByBookAndCreateDate",
252
+ "Default": true
253
+ },
254
+ "FilterByTitle":
255
+ {
256
+ "Ordinal": 2,
257
+ "FilterCriteriaHash": "FilterRecordsetByTitle"
258
+ }
259
+ },
200
260
 
201
- "RecordSetListManifestOnly": false,
261
+ "RecordSetListManifestOnly": false,
202
262
 
203
- "RecordSetListManifests": [ "Bestsellers", "Underdogs", "NewReleases" ],
204
- "RecordSetDashboardManifests": [ "Bestsellers" ],
263
+ "RecordSetListManifests": [ "Bestsellers", "Underdogs", "NewReleases" ],
264
+ "RecordSetDashboardManifests": [ "Bestsellers" ],
205
265
 
206
- "RecordSetListHasExtraColumns": true,
207
- "RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;\">Cover</th>",
208
- "RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
266
+ "RecordSetListHasExtraColumns": true,
267
+ "RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;\">Cover</th>",
268
+ "RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
209
269
 
210
- "SearchFields": [ "Title" ],
270
+ "SearchFields": [ "Title" ],
211
271
 
212
- "RecordSetFilterURLTemplate-Default": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
213
- "RecordSetFilterURLTemplate-List": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
214
- "RecordSetFilterURLTemplate-Dashboard": "/PSRS/{~D:Record.RecordSet~}/Dashboard/FilteredTo/{~D:Record.FilterString~}",
272
+ "RecordSetFilterURLTemplate-Default": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
273
+ "RecordSetFilterURLTemplate-List": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
274
+ "RecordSetFilterURLTemplate-Dashboard": "/PSRS/{~D:Record.RecordSet~}/Dashboard/FilteredTo/{~D:Record.FilterString~}",
215
275
 
216
- "RecordSetURLPrefix": "/1.0/"
217
- },
218
- {
219
- "RecordSet": "BookstoreInventory",
220
- "Title": "Bookstore Inventory",
276
+ "RecordSetURLPrefix": "/1.0/"
277
+ },
278
+ {
279
+ "RecordSet": "BookstoreInventory",
280
+ "Title": "Bookstore Inventory",
221
281
 
222
- "RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
223
- "RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
282
+ "RecordSetType": "MeadowEndpoint", // Could be "Custom" which would require a provider to already be created for the record set.
283
+ "RecordSetMeadowEntity": "Book", // This leverages the /Schema endpoint to get the record set columns.
224
284
 
225
- "RecordSetListManifestOnly": true,
285
+ "RecordSetListManifestOnly": true,
226
286
 
227
- "RecordSetDashboardManifests": [ "Bestsellers", "Underdogs", "NewReleases" ],
287
+ "RecordSetDashboardManifests": [ "Bestsellers", "Underdogs", "NewReleases" ],
228
288
 
229
- "RecordDecorationConfiguration":
230
- [
231
- {
232
- "Entity": "BookAuthorJoin",
233
- "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^Record.State.CoreEntityRecordSubset~}",
234
- "Destination": "State.BookAuthorJoins"
235
- },
236
- {
237
- "Entity": "Author",
238
- "Filter": "FBL~IDAuthor~INN~{~PJU:,^IDAuthor^Record.State.BookAuthorJoins~}",
239
- "Destination": "State.Authors"
240
- },
241
- {
242
- "Type": "MapJoin",
243
- "DestinationRecordSetAddress": "State.CoreEntityRecordSubset",
244
- "DestinationJoinValue": "IDBook",
245
- "JoinJoinValueLHS": "IDBook",
246
- "Joins": "State.BookAuthorJoins",
247
- "JoinJoinValueRHS": "IDAuthor",
248
- "JoinRecordSetAddress": "State.Authors",
249
- "JoinValue": "IDAuthor",
250
- "RecordDestinationAddress": "Authors"
251
- },
252
- {
253
- "Entity": "BookAuthorJoin",
254
- "Filter": "FBL~IDAuthor~INN~{~PJU:,^IDAuthor^Record.State.Authors~}",
255
- "Destination": "State.BookAuthorJoinsRev"
256
- },
257
- {
258
- "Entity": "Book",
259
- "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^Record.State.BookAuthorJoinsRev~}",
260
- "Destination": "State.BooksForAuthors"
261
- },
262
- {
263
- "Type": "MapJoin",
264
- "DestinationRecordSetAddress": "State.Authors",
265
- "DestinationJoinValue": "IDAuthor",
266
- "JoinJoinValueLHS": "IDAuthor",
267
- "Joins": "State.BookAuthorJoinsRev",
268
- "JoinJoinValueRHS": "IDBook",
269
- "JoinRecordSetAddress": "State.BooksForAuthors",
270
- "JoinValue": "IDBook",
271
- "RecordDestinationAddress": "Books"
272
- }
273
- ],
274
- "AvailableVerbs": [ "Dashboard" ],
289
+ "RecordDecorationConfiguration":
290
+ [
291
+ {
292
+ "Entity": "BookAuthorJoin",
293
+ "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^Record.State.CoreEntityRecordSubset~}",
294
+ "Destination": "State.BookAuthorJoins"
295
+ },
296
+ {
297
+ "Entity": "Author",
298
+ "Filter": "FBL~IDAuthor~INN~{~PJU:,^IDAuthor^Record.State.BookAuthorJoins~}",
299
+ "Destination": "State.Authors"
300
+ },
301
+ {
302
+ "Type": "MapJoin",
303
+ "DestinationRecordSetAddress": "State.CoreEntityRecordSubset",
304
+ "DestinationJoinValue": "IDBook",
305
+ "JoinJoinValueLHS": "IDBook",
306
+ "Joins": "State.BookAuthorJoins",
307
+ "JoinJoinValueRHS": "IDAuthor",
308
+ "JoinRecordSetAddress": "State.Authors",
309
+ "JoinValue": "IDAuthor",
310
+ "RecordDestinationAddress": "Authors"
311
+ },
312
+ {
313
+ "Entity": "BookAuthorJoin",
314
+ "Filter": "FBL~IDAuthor~INN~{~PJU:,^IDAuthor^Record.State.Authors~}",
315
+ "Destination": "State.BookAuthorJoinsRev"
316
+ },
317
+ {
318
+ "Entity": "Book",
319
+ "Filter": "FBL~IDBook~INN~{~PJU:,^IDBook^Record.State.BookAuthorJoinsRev~}",
320
+ "Destination": "State.BooksForAuthors"
321
+ },
322
+ {
323
+ "Type": "MapJoin",
324
+ "DestinationRecordSetAddress": "State.Authors",
325
+ "DestinationJoinValue": "IDAuthor",
326
+ "JoinJoinValueLHS": "IDAuthor",
327
+ "Joins": "State.BookAuthorJoinsRev",
328
+ "JoinJoinValueRHS": "IDBook",
329
+ "JoinRecordSetAddress": "State.BooksForAuthors",
330
+ "JoinValue": "IDBook",
331
+ "RecordDestinationAddress": "Books"
332
+ }
333
+ ],
334
+ "AvailableVerbs": [ "Dashboard" ],
275
335
 
276
- "RecordSetListHasExtraColumns": true,
277
- "RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;\">Cover</th>",
278
- "RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
336
+ "RecordSetListHasExtraColumns": true,
337
+ "RecordSetListExtraColumnsHeaderTemplate": "<th style=\"border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;\">Cover</th>",
338
+ "RecordSetListExtraColumnRowTemplate": "<td><img src=\"{~D:Record.Data.ImageURL~}\"></td>",
279
339
 
280
- "SearchFields": [ "Title" ],
340
+ "SearchFields": [ "Title" ],
281
341
 
282
- "RecordSetFilterURLTemplate-Default": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
283
- "RecordSetFilterURLTemplate-List": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
284
- "RecordSetFilterURLTemplate-Dashboard": "/PSRS/{~D:Record.RecordSet~}/Dashboard/FilteredTo/{~D:Record.FilterString~}",
285
- //TODO: something like this to reduce boilerplate
286
- "RecordSetFilterURLTemplate-Dashboard-Specific": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/$$DASHBOARD_HASH$$/FilteredTo/{~D:Record.FilterString~}",
287
- "RecordSetFilterURLTemplate-Dashboard-Bestsellers": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/Bestsellers/FilteredTo/{~D:Record.FilterString~}",
288
- "RecordSetFilterURLTemplate-Dashboard-Underdogs": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/Underdogs/FilteredTo/{~D:Record.FilterString~}",
289
- "RecordSetFilterURLTemplate-Dashboard-NewReleases": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/NewReleases/FilteredTo/{~D:Record.FilterString~}",
342
+ "RecordSetFilterURLTemplate-Default": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
343
+ "RecordSetFilterURLTemplate-List": "/PSRS/{~D:Record.RecordSet~}/List/FilteredTo/{~D:Record.FilterString~}",
344
+ "RecordSetFilterURLTemplate-Dashboard": "/PSRS/{~D:Record.RecordSet~}/Dashboard/FilteredTo/{~D:Record.FilterString~}",
345
+ //TODO: something like this to reduce boilerplate
346
+ "RecordSetFilterURLTemplate-Dashboard-Specific": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/$$DASHBOARD_HASH$$/FilteredTo/{~D:Record.FilterString~}",
347
+ "RecordSetFilterURLTemplate-Dashboard-Bestsellers": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/Bestsellers/FilteredTo/{~D:Record.FilterString~}",
348
+ "RecordSetFilterURLTemplate-Dashboard-Underdogs": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/Underdogs/FilteredTo/{~D:Record.FilterString~}",
349
+ "RecordSetFilterURLTemplate-Dashboard-NewReleases": "/PSRS/{~D:Record.RecordSet~}/SpecificDashboard/NewReleases/FilteredTo/{~D:Record.FilterString~}",
290
350
 
291
- "RecordSetURLPrefix": "/1.0/"
292
- },
293
- {
294
- "RecordSet": "Author",
351
+ "RecordSetURLPrefix": "/1.0/"
352
+ },
353
+ {
354
+ "RecordSet": "Author",
295
355
 
296
- "RecordSetType": "MeadowEndpoint",
297
- "RecordSetMeadowEntity": "Author",
356
+ "RecordSetType": "MeadowEndpoint",
357
+ "RecordSetMeadowEntity": "Author",
298
358
 
299
- "RecordSetURLPrefix": "/1.0/"
300
- },
301
- {
302
- "RecordSet": "RandomizedValues",
359
+ "RecordSetURLPrefix": "/1.0/"
360
+ },
361
+ {
362
+ "RecordSet": "RandomizedValues",
303
363
 
304
- "RecordSetType": "Custom" // This means the `PS-RSP-RandomizedValues` provider will be checked for to get records.
305
- }
306
- ]
307
- });
364
+ "RecordSetType": "Custom" // This means the `PS-RSP-RandomizedValues` provider will be checked for to get records.
365
+ }
366
+ ]
367
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-recordset",
3
- "version": "1.0.23",
3
+ "version": "1.0.26",
4
4
  "description": "Pict dynamic record set management views",
5
5
  "main": "source/Pict-Section-RecordSet.js",
6
6
  "directories": {
@@ -20,32 +20,32 @@
20
20
  "coverage": "npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec",
21
21
  "build": "npx quack build",
22
22
  "test": "npx mocha -u tdd -R spec",
23
- "lint": "eslint source/**",
23
+ "lint": "eslint source",
24
24
  "types": "tsc -p tsconfig.build.json"
25
25
  },
26
26
  "types": "types/Pict-Section-RecordSet.d.ts",
27
27
  "author": "steven velozo <steven@velozo.com>",
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
- "@eslint/js": "^9.27.0",
30
+ "@eslint/js": "^9.28.0",
31
31
  "@types/mocha": "^10.0.10",
32
32
  "@types/node": "^16.18.126",
33
33
  "browser-env": "^3.3.0",
34
- "eslint": "^9.27.0",
34
+ "eslint": "^9.28.0",
35
35
  "jquery": "^3.7.1",
36
- "pict": "^1.0.270",
37
- "pict-application": "^1.0.25",
36
+ "pict": "^1.0.284",
37
+ "pict-application": "^1.0.27",
38
38
  "pict-service-commandlineutility": "^1.0.15",
39
- "quackage": "^1.0.41",
39
+ "quackage": "^1.0.42",
40
40
  "typescript": "^5.8.3"
41
41
  },
42
42
  "dependencies": {
43
43
  "fable-serviceproviderbase": "^3.0.15",
44
- "pict-provider": "^1.0.4",
44
+ "pict-provider": "^1.0.6",
45
45
  "pict-router": "^1.0.4",
46
- "pict-section-form": "^1.0.97",
47
- "pict-template": "^1.0.10",
48
- "pict-view": "^1.0.60"
46
+ "pict-section-form": "^1.0.106",
47
+ "pict-template": "^1.0.12",
48
+ "pict-view": "^1.0.62"
49
49
  },
50
50
  "mocha": {
51
51
  "diff": true,
@@ -1,7 +1,9 @@
1
1
  const libPictApplication = require('pict-application');
2
+ const libPictSectionForm = require('pict-section-form');
2
3
 
3
4
  const libPictSectionRecordSet = require('../Pict-Section-RecordSet.js');
4
5
  const libDynamicSolver = require('../providers/RecordSet-DynamicRecordsetSolver.js');
6
+ const libPictDynamicFormDependencyManager = require('pict-section-form').PictDynamicFormDependencyManager;
5
7
 
6
8
  /**
7
9
  * Represents a PictSectionRecordSetApplication.
@@ -21,7 +23,13 @@ class PictSectionRecordSetApplication extends libPictApplication
21
23
  this.pict;
22
24
  // Add the pict recordset meta controller service
23
25
  this.pict.addServiceType('PictSectionRecordSet', libPictSectionRecordSet);
26
+ //FIXME: this is probably wrong, but needed for now?
27
+ this.pict.addServiceType('PictSectionForm', libPictSectionForm);
28
+
24
29
  this.fable.addProviderSingleton('DynamicRecordsetSolver', libDynamicSolver.default_configuration, libDynamicSolver);
30
+
31
+ // add the dependencies for dynamic controls
32
+ this.fable.addAndInstantiateSingletonService('PictDynamicFormDependencyManager', libPictDynamicFormDependencyManager.default_configuration, libPictDynamicFormDependencyManager);
25
33
  }
26
34
 
27
35
  onInitialize()
@@ -155,6 +155,7 @@ class RecordSetDynamicRecordsetSolver extends libPictProvider
155
155
  return {
156
156
  Pict: this.pict,
157
157
  AppData: this.pict.AppData,
158
+ Bundle: this.pict.Bundle,
158
159
  RecordSubset: pRecords,
159
160
  Manifest: pManifest,
160
161
  };
@@ -9,7 +9,7 @@ const _DEFAULT_PROVIDER_CONFIGURATION =
9
9
  AutoInitializeOrdinal: 0
10
10
  }
11
11
 
12
- class PictRecordSetRouter extends libPictProvider
12
+ class PictRecordSetLinkManager extends libPictProvider
13
13
  {
14
14
  constructor(pFable, pOptions, pServiceHash)
15
15
  {
@@ -49,5 +49,5 @@ class PictRecordSetRouter extends libPictProvider
49
49
  }
50
50
  }
51
51
 
52
- module.exports = PictRecordSetRouter;
52
+ module.exports = PictRecordSetLinkManager;
53
53
  module.exports.default_configuration = _DEFAULT_PROVIDER_CONFIGURATION;
@@ -52,7 +52,7 @@ class RecordSetProviderBase extends libPictProvider
52
52
  {
53
53
  /**
54
54
  * Creates an instance of RecordSetProvider.
55
- * @param {import('fable')} pFable - The Fable object.
55
+ * @param {import('pict')} pFable - The Fable object.
56
56
  * @param {Record<string, any>} [pOptions] - Custom options for the provider.
57
57
  * @param {string} [pServiceHash] - The service hash.
58
58
  */
@@ -64,7 +64,7 @@ class RecordSetProviderBase extends libPictProvider
64
64
 
65
65
  /** @type {Record<string, any>} */
66
66
  this.options;
67
- /** @type {import('fable')} */
67
+ /** @type {import('pict')} */
68
68
  this.fable;
69
69
  /** @type {import('pict')} */
70
70
  this.pict;
@@ -92,6 +92,13 @@ class RecordSetProviderBase extends libPictProvider
92
92
  return { };
93
93
  }
94
94
 
95
+ /*
96
+ get availableFilters()
97
+ {
98
+ return { IDBook: [ 'NumericMatch', 'NumericRange', 'ExternalJoinBookByAuthor' ], Title: [ 'StringMatch', 'StringRange' ] };
99
+ }
100
+ */
101
+
95
102
  /**
96
103
  * Read records from the provider.
97
104
  *