pict-section-recordset 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 (120) hide show
  1. package/example_applications/simple_entity/Simple-RecordSet-Application.js +113 -0
  2. package/package.json +3 -3
  3. package/source/application/Pict-Application-RecordSet.js +1 -0
  4. package/source/providers/RecordSet-Link-Manager.js +2 -1
  5. package/source/providers/RecordSet-RecordProvider-Base.js +28 -0
  6. package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +53 -3
  7. package/source/providers/RecordSet-Router.js +1 -0
  8. package/source/services/RecordsSet-MetaController.js +85 -1
  9. package/source/templates/Pict-Template-FilterView.js +172 -0
  10. package/source/views/RecordSet-Filter.js +47 -9
  11. package/source/views/RecordSet-RecordBaseView.js +1 -0
  12. package/source/views/RecordsSet-MacroView.js +1 -0
  13. package/source/views/dashboard/RecordSet-Dashboard-HeaderDashboard.js +18 -17
  14. package/source/views/dashboard/RecordSet-Dashboard-PaginationBottom.js +68 -0
  15. package/source/views/dashboard/RecordSet-Dashboard-PaginationTop.js +128 -0
  16. package/source/views/dashboard/RecordSet-Dashboard-RecordList.js +80 -0
  17. package/source/views/dashboard/RecordSet-Dashboard-RecordListEntry.js +121 -0
  18. package/source/views/dashboard/RecordSet-Dashboard-RecordListHeader.js +99 -0
  19. package/source/views/dashboard/RecordSet-Dashboard-TabBarDashboard.js +1 -0
  20. package/source/views/dashboard/RecordSet-Dashboard-Title.js +67 -0
  21. package/source/views/dashboard/RecordSet-Dashboard.js +355 -37
  22. package/source/views/edit/RecordSet-Edit-HeaderEdit.js +1 -0
  23. package/source/views/edit/RecordSet-Edit-RecordEdit.js +1 -0
  24. package/source/views/edit/RecordSet-Edit-RecordEditControls.js +1 -0
  25. package/source/views/edit/RecordSet-Edit-RecordEditExtra.js +1 -0
  26. package/source/views/edit/RecordSet-Edit-TabBarEdit.js +1 -0
  27. package/source/views/edit/RecordSet-Edit.js +1 -0
  28. package/source/views/list/RecordSet-List-HeaderList.js +1 -0
  29. package/source/views/list/RecordSet-List-PaginationBottom.js +1 -0
  30. package/source/views/list/RecordSet-List-PaginationTop.js +1 -0
  31. package/source/views/list/RecordSet-List-RecordList.js +1 -0
  32. package/source/views/list/RecordSet-List-RecordListEntry.js +1 -0
  33. package/source/views/list/RecordSet-List-RecordListHeader.js +1 -0
  34. package/source/views/list/RecordSet-List-Title.js +1 -0
  35. package/source/views/list/RecordSet-List.js +12 -34
  36. package/source/views/read/RecordSet-Read-HeaderRead.js +1 -0
  37. package/source/views/read/RecordSet-Read-RecordRead.js +1 -0
  38. package/source/views/read/RecordSet-Read-RecordReadExtra.js +1 -0
  39. package/source/views/read/RecordSet-Read-TabBarRead.js +1 -0
  40. package/source/views/read/RecordSet-Read.js +1 -0
  41. package/types/Pict-Section-RecordSet.d.ts +1 -3
  42. package/types/application/Pict-Application-RecordSet.d.ts +1 -7
  43. package/types/application/Pict-Application-RecordSet.d.ts.map +1 -1
  44. package/types/providers/RecordSet-Link-Manager.d.ts +2 -5
  45. package/types/providers/RecordSet-Link-Manager.d.ts.map +1 -1
  46. package/types/providers/RecordSet-RecordProvider-Base.d.ts +19 -0
  47. package/types/providers/RecordSet-RecordProvider-Base.d.ts.map +1 -1
  48. package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts +38 -5
  49. package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -1
  50. package/types/providers/RecordSet-Router.d.ts +3 -8
  51. package/types/providers/RecordSet-Router.d.ts.map +1 -1
  52. package/types/services/RecordsSet-MetaController.d.ts +20 -4
  53. package/types/services/RecordsSet-MetaController.d.ts.map +1 -1
  54. package/types/templates/Pict-Template-FilterView.d.ts +18 -0
  55. package/types/templates/Pict-Template-FilterView.d.ts.map +1 -0
  56. package/types/views/RecordSet-Filter.d.ts +30 -27
  57. package/types/views/RecordSet-Filter.d.ts.map +1 -1
  58. package/types/views/RecordSet-RecordBaseView.d.ts +3 -28
  59. package/types/views/RecordSet-RecordBaseView.d.ts.map +1 -1
  60. package/types/views/RecordsSet-MacroView.d.ts +2 -25
  61. package/types/views/RecordsSet-MacroView.d.ts.map +1 -1
  62. package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts +6 -29
  63. package/types/views/dashboard/RecordSet-Dashboard-HeaderDashboard.d.ts.map +1 -1
  64. package/types/views/dashboard/RecordSet-Dashboard-PaginationBottom.d.ts +11 -0
  65. package/types/views/dashboard/RecordSet-Dashboard-PaginationBottom.d.ts.map +1 -0
  66. package/types/views/dashboard/RecordSet-Dashboard-PaginationTop.d.ts +11 -0
  67. package/types/views/dashboard/RecordSet-Dashboard-PaginationTop.d.ts.map +1 -0
  68. package/types/views/dashboard/RecordSet-Dashboard-RecordList.d.ts +11 -0
  69. package/types/views/dashboard/RecordSet-Dashboard-RecordList.d.ts.map +1 -0
  70. package/types/views/dashboard/RecordSet-Dashboard-RecordListEntry.d.ts +11 -0
  71. package/types/views/dashboard/RecordSet-Dashboard-RecordListEntry.d.ts.map +1 -0
  72. package/types/views/dashboard/RecordSet-Dashboard-RecordListHeader.d.ts +11 -0
  73. package/types/views/dashboard/RecordSet-Dashboard-RecordListHeader.d.ts.map +1 -0
  74. package/types/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.d.ts +2 -25
  75. package/types/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.d.ts.map +1 -1
  76. package/types/views/dashboard/RecordSet-Dashboard-TabBarDashboard.d.ts +2 -25
  77. package/types/views/dashboard/RecordSet-Dashboard-TabBarDashboard.d.ts.map +1 -1
  78. package/types/views/dashboard/RecordSet-Dashboard-Title.d.ts +11 -0
  79. package/types/views/dashboard/RecordSet-Dashboard-Title.d.ts.map +1 -0
  80. package/types/views/dashboard/RecordSet-Dashboard.d.ts +20 -25
  81. package/types/views/dashboard/RecordSet-Dashboard.d.ts.map +1 -1
  82. package/types/views/edit/RecordSet-Edit-HeaderEdit.d.ts +2 -25
  83. package/types/views/edit/RecordSet-Edit-HeaderEdit.d.ts.map +1 -1
  84. package/types/views/edit/RecordSet-Edit-RecordEdit.d.ts +2 -25
  85. package/types/views/edit/RecordSet-Edit-RecordEdit.d.ts.map +1 -1
  86. package/types/views/edit/RecordSet-Edit-RecordEditControls.d.ts +2 -25
  87. package/types/views/edit/RecordSet-Edit-RecordEditControls.d.ts.map +1 -1
  88. package/types/views/edit/RecordSet-Edit-RecordEditExtra.d.ts +2 -25
  89. package/types/views/edit/RecordSet-Edit-RecordEditExtra.d.ts.map +1 -1
  90. package/types/views/edit/RecordSet-Edit-TabBarEdit.d.ts +2 -25
  91. package/types/views/edit/RecordSet-Edit-TabBarEdit.d.ts.map +1 -1
  92. package/types/views/edit/RecordSet-Edit.d.ts +2 -25
  93. package/types/views/edit/RecordSet-Edit.d.ts.map +1 -1
  94. package/types/views/list/RecordSet-List-HeaderList.d.ts +2 -25
  95. package/types/views/list/RecordSet-List-HeaderList.d.ts.map +1 -1
  96. package/types/views/list/RecordSet-List-PaginationBottom.d.ts +2 -25
  97. package/types/views/list/RecordSet-List-PaginationBottom.d.ts.map +1 -1
  98. package/types/views/list/RecordSet-List-PaginationTop.d.ts +2 -25
  99. package/types/views/list/RecordSet-List-PaginationTop.d.ts.map +1 -1
  100. package/types/views/list/RecordSet-List-RecordList.d.ts +2 -25
  101. package/types/views/list/RecordSet-List-RecordList.d.ts.map +1 -1
  102. package/types/views/list/RecordSet-List-RecordListEntry.d.ts +2 -25
  103. package/types/views/list/RecordSet-List-RecordListEntry.d.ts.map +1 -1
  104. package/types/views/list/RecordSet-List-RecordListHeader.d.ts +2 -25
  105. package/types/views/list/RecordSet-List-RecordListHeader.d.ts.map +1 -1
  106. package/types/views/list/RecordSet-List-Title.d.ts +2 -25
  107. package/types/views/list/RecordSet-List-Title.d.ts.map +1 -1
  108. package/types/views/list/RecordSet-List.d.ts +2 -26
  109. package/types/views/list/RecordSet-List.d.ts.map +1 -1
  110. package/types/views/read/RecordSet-Read-HeaderRead.d.ts +2 -25
  111. package/types/views/read/RecordSet-Read-HeaderRead.d.ts.map +1 -1
  112. package/types/views/read/RecordSet-Read-RecordRead.d.ts +2 -25
  113. package/types/views/read/RecordSet-Read-RecordRead.d.ts.map +1 -1
  114. package/types/views/read/RecordSet-Read-RecordReadExtra.d.ts +2 -25
  115. package/types/views/read/RecordSet-Read-RecordReadExtra.d.ts.map +1 -1
  116. package/types/views/read/RecordSet-Read-TabBarRead.d.ts +2 -25
  117. package/types/views/read/RecordSet-Read-TabBarRead.d.ts.map +1 -1
  118. package/types/views/read/RecordSet-Read.d.ts +2 -25
  119. package/types/views/read/RecordSet-Read.d.ts.map +1 -1
  120. package/source/views/dashboard/RecordSet-Dashboard-RecordSetDashboard.js +0 -63
@@ -1,5 +1,6 @@
1
1
  const libPictView = require('pict-view');
2
2
 
3
+ /** @type {Record<string, any>} */
3
4
  const _DEFAULT_CONFIGURATION_SUBSET_Filter =
4
5
  {
5
6
  ViewIdentifier: 'PRSP-SUBSET-Filter',
@@ -31,7 +32,7 @@ const _DEFAULT_CONFIGURATION_SUBSET_Filter =
31
32
  Template: /*html*/`
32
33
  <!-- DefaultPackage pict view template: [PRSP-SUBSET-Filter-Template] -->
33
34
  <section id="PRSP_Filter_Container">
34
- <form id="PRSP_Filter_Form" onsubmit="_Pict.views['PRSP-Filters'].handleSearch(event)">
35
+ <form id="PRSP_Filter_Form" onsubmit="_Pict.views['PRSP-Filters'].handleSearch(event, '{~D:Record.RecordSet~}', '{~D:Record.ViewContext~}'); return false;">
35
36
  {~T:PRSP-SUBSET-Filter-Template-Input-Fieldset~}
36
37
  {~T:PRSP-SUBSET-Filter-Template-Button-Fieldset~}
37
38
  </form>
@@ -55,7 +56,7 @@ const _DEFAULT_CONFIGURATION_SUBSET_Filter =
55
56
  Template: /*html*/`
56
57
  <!-- DefaultPackage pict view template: [PRSP-SUBSET-Filter-Template-Button-Fieldset] -->
57
58
  <fieldset>
58
- <button type="button" id="PRSP_Filter_Button_Reset" onclick="_Pict.views['PRSP-Filters'].handleReset(event)">Reset</button>
59
+ <button type="button" id="PRSP_Filter_Button_Reset" onclick="_Pict.views['PRSP-Filters'].handleReset(event, '{~D:Record.RecordSet~}', '{~D:Record.ViewContext~}')">Reset</button>
59
60
  <button type="submit" id="PRSP_Filter_Button_Apply">Apply</button>
60
61
  </fieldset>
61
62
  <!-- DefaultPackage end view template: [PRSP-SUBSET-Filter-Template-Button-Fieldset] -->
@@ -82,20 +83,57 @@ class viewRecordSetSUBSETFilter extends libPictView
82
83
  {
83
84
  let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_SUBSET_Filter, pOptions);
84
85
  super(pFable, tmpOptions, pServiceHash);
86
+ /** @type {import('fable') & import('pict') & { PictSectionRecordSet: import('../Pict-Section-RecordSet.js') }} */
87
+ this.pict;
85
88
  }
86
89
 
87
- handleSearch(event)
90
+ /**
91
+ * @param {Event} pEvent - The DOM event that triggered the search
92
+ * @param {string} pRecordSet - The record set being filtered
93
+ * @param {string} pViewContext - The view context for the filter (ex. List, Dashboard)
94
+ */
95
+ handleSearch(pEvent, pRecordSet, pViewContext)
88
96
  {
89
- event.preventDefault(); // don't submit the form
90
- event.stopPropagation();
91
- this.pict.views['RSP-RecordSet-List']?.handleSearch?.(this.pict.ContentAssignment.readContent('input[name="filter"]'));
97
+ pEvent.preventDefault(); // don't submit the form
98
+ pEvent.stopPropagation();
99
+ const tmpSearchString = this.pict.ContentAssignment.readContent(`input[name="filter"]`);
100
+ this.performSearch(pRecordSet, pViewContext, tmpSearchString ? String(tmpSearchString) : ' ');
92
101
  }
93
102
 
94
- handleReset(event)
103
+ /**
104
+ * @param {string} pRecordSet - The record set being filtered
105
+ * @param {string} pViewContext - The view context for the filter (ex. List, Dashboard)
106
+ * @param {string} [pFilterString] - The filter string to apply, defaults to a single space if not provided
107
+ */
108
+ performSearch(pRecordSet, pViewContext, pFilterString)
95
109
  {
96
- event.stopPropagation();
110
+ const tmpPictRouter = this.pict.providers.PictRouter;
111
+ const tmpProviderConfiguration = this.pict.PictSectionRecordSet.recordSetProviderConfigurations[pRecordSet];
112
+ let filterExpr = ' ';
113
+ if (pFilterString)
114
+ {
115
+ const searchFields = tmpProviderConfiguration?.SearchFields ?? [ 'Name' ];
116
+ filterExpr = searchFields.map((filterField) => `FBVOR~${filterField}~LK~${encodeURIComponent(`%${pFilterString}%`)}`).join('~');
117
+ }
118
+ let tmpURLTemplate = tmpProviderConfiguration[`RecordSetFilterURLTemplate-${pViewContext}`] || tmpProviderConfiguration[`RecordSetFilterURLTemplate-Default`];
119
+ const tmpURL = this.pict.parseTemplate(tmpURLTemplate,
120
+ {
121
+ RecordSet: pRecordSet,
122
+ FilterString: filterExpr,
123
+ });
124
+ tmpPictRouter.router.navigate(tmpURL);
125
+ }
126
+
127
+ /**
128
+ * @param {Event} pEvent - The DOM event that triggered the search
129
+ * @param {string} pRecordSet - The record set being filtered
130
+ * @param {string} pViewContext - The view context for the filter (ex. List, Dashboard)
131
+ */
132
+ handleReset(pEvent, pRecordSet, pViewContext)
133
+ {
134
+ pEvent.preventDefault();
97
135
  this.pict.ContentAssignment.assignContent('input[name="filter"]', '');
98
- this.pict.views['RSP-RecordSet-List']?.handleSearch?.('');
136
+ this.performSearch(pRecordSet, pViewContext);
99
137
  }
100
138
  }
101
139
 
@@ -1,5 +1,6 @@
1
1
  const libPictView = require('pict-view');
2
2
 
3
+ /** @type {Record<string, any>} */
3
4
  const _DEFAULT_CONFIGURATION_Base_View = (
4
5
  {
5
6
  ViewIdentifier: 'PRSP-RecordSet-View-Base',
@@ -1,5 +1,6 @@
1
1
  const libPictView = require('pict-view');
2
2
 
3
+ /** @type {Record<string, any>} */
3
4
  const _DEFAULT_CONFIGURATION_Dashboard_HeaderDashboard = (
4
5
  {
5
6
  ViewIdentifier: 'PRSP-Main',
@@ -1,11 +1,12 @@
1
1
  const libPictView = require('pict-view');
2
2
 
3
- const _DEFAULT_CONFIGURATION_Dashboard_HeaderDashboard =
3
+ /** @type {Record<string, any>} */
4
+ const _DEFAULT_CONFIGURATION_Dashboard_HeaderList =
4
5
  {
5
- ViewIdentifier: 'PRSP-Dashboard-HeaderDashboard',
6
+ ViewIdentifier: 'PRSP-Dashboard-HeaderList',
6
7
 
7
- DefaultRenderable: 'PRSP_Renderable_HeaderDashboard',
8
- DefaultDestinationAddress: '#PRSP_HeaderDashboard_Container',
8
+ DefaultRenderable: 'PRSP_Renderable_HeaderList',
9
+ DefaultDestinationAddress: '#PRSP_HeaderList_Container',
9
10
  DefaultTemplateRecordAddress: false,
10
11
 
11
12
  // If this is set to true, when the App initializes this will.
@@ -27,37 +28,37 @@ const _DEFAULT_CONFIGURATION_Dashboard_HeaderDashboard =
27
28
  Templates:
28
29
  [
29
30
  {
30
- Hash: 'PRSP-Dashboard-HeaderDashboard-Template',
31
+ Hash: 'PRSP-Dashboard-HeaderList-Template',
31
32
  Template: /*html*/`
32
- <!-- DefaultPackage pict view template: [PRSP-Dashboard-HeaderDashboard-Template] -->
33
- <!-- DefaultPackage end view template: [PRSP-Dashboard-HeaderDashboard-Template] -->
33
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-HeaderList-Template] -->
34
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-HeaderList-Template] -->
34
35
  `
35
- }
36
+ },
36
37
  ],
37
38
 
38
39
  Renderables:
39
40
  [
40
41
  {
41
- RenderableHash: 'PRSP_Renderable_HeaderDashboard',
42
- TemplateHash: 'PRSP-Dashboard-HeaderDashboard-Template',
43
- DestinationAddress: '#PRSP_HeaderDashboard_Container',
42
+ RenderableHash: 'PRSP_Renderable_HeaderList',
43
+ TemplateHash: 'PRSP-Dashboard-HeaderList-Template',
44
+ DestinationAddress: '#PRSP_HeaderList_Container',
44
45
  RenderMethod: 'replace'
45
- }
46
+ },
46
47
  ],
47
48
 
48
- Manifests: {}
49
+ Manifests: {},
49
50
  };
50
51
 
51
- class viewRecordSetDashboardHeaderDashboard extends libPictView
52
+ class viewRecordSetListHeaderList extends libPictView
52
53
  {
53
54
  constructor(pFable, pOptions, pServiceHash)
54
55
  {
55
- let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_Dashboard_HeaderDashboard, pOptions);
56
+ let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_Dashboard_HeaderList, pOptions);
56
57
  super(pFable, tmpOptions, pServiceHash);
57
58
  }
58
59
  }
59
60
 
60
- module.exports = viewRecordSetDashboardHeaderDashboard;
61
+ module.exports = viewRecordSetListHeaderList;
61
62
 
62
- module.exports.default_configuration = _DEFAULT_CONFIGURATION_Dashboard_HeaderDashboard;
63
+ module.exports.default_configuration = _DEFAULT_CONFIGURATION_Dashboard_HeaderList;
63
64
 
@@ -0,0 +1,68 @@
1
+ const libPictView = require('pict-view');
2
+
3
+ /** @type {Record<string, any>} */
4
+ const _DEFAULT_CONFIGURATION_List_PaginationBottom = (
5
+ {
6
+ ViewIdentifier: 'PRSP-Dashboard-PaginationBottom',
7
+
8
+ DefaultRenderable: 'PRSP_Renderable_PaginationBottom',
9
+ DefaultDestinationAddress: '#PRSP_PaginationBottom_Container',
10
+ DefaultTemplateRecordAddress: false,
11
+
12
+ // If this is set to true, when the App initializes this will.
13
+ // While the App initializes, initialize will be called.
14
+ AutoInitialize: false,
15
+ AutoInitializeOrdinal: 0,
16
+
17
+ // If this is set to true, when the App autorenders (on load) this will.
18
+ // After the App initializes, render will be called.
19
+ AutoRender: false,
20
+ AutoRenderOrdinal: 0,
21
+
22
+ AutoSolveWithApp: false,
23
+ AutoSolveOrdinal: 0,
24
+
25
+ CSS: false,
26
+ CSSPriority: 500,
27
+
28
+ Templates:
29
+ [
30
+ {
31
+ Hash: 'PRSP-Dashboard-PaginationBottom-Template',
32
+ Template: /*html*/`
33
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-PaginationBottom-Template] -->
34
+ <nav id="RSP_Lower_Pagination_Container">
35
+ {~T:PRSP-Dashboard-Pagination-Template-Description~}
36
+ {~T:PRSP-Dashboard-Pagination-Template-Buttons~}
37
+ </nav>
38
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-PaginationBottom-Template] -->
39
+ `
40
+ }
41
+ ],
42
+
43
+ Renderables:
44
+ [
45
+ {
46
+ RenderableHash: 'PRSP_Renderable_PaginationBottom',
47
+ TemplateHash: 'PRSP-Dashboard-PaginationBottom-Template',
48
+ DestinationAddress: '#PRSP_PaginationBottom_Container',
49
+ RenderMethod: 'replace'
50
+ }
51
+ ],
52
+
53
+ Manifests: {}
54
+ });
55
+
56
+ class viewRecordSetListPaginationBottom extends libPictView
57
+ {
58
+ constructor(pFable, pOptions, pServiceHash)
59
+ {
60
+ let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_PaginationBottom, pOptions);
61
+ super(pFable, tmpOptions, pServiceHash);
62
+ }
63
+ }
64
+
65
+ module.exports = viewRecordSetListPaginationBottom;
66
+
67
+ module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_PaginationBottom;
68
+
@@ -0,0 +1,128 @@
1
+ const libPictView = require('pict-view');
2
+
3
+ /** @type {Record<string, any>} */
4
+ const _DEFAULT_CONFIGURATION_List_PaginationTop = (
5
+ {
6
+ ViewIdentifier: 'PRSP-Dashboard-PaginationTop',
7
+
8
+ DefaultRenderable: 'PRSP_Renderable_PaginationTop',
9
+ DefaultDestinationAddress: '#PRSP_PaginationTop_Container',
10
+ DefaultTemplateRecordAddress: false,
11
+
12
+ // If this is set to true, when the App initializes this will.
13
+ // While the App initializes, initialize will be called.
14
+ AutoInitialize: false,
15
+ AutoInitializeOrdinal: 0,
16
+
17
+ // If this is set to true, when the App autorenders (on load) this will.
18
+ // After the App initializes, render will be called.
19
+ AutoRender: false,
20
+ AutoRenderOrdinal: 0,
21
+
22
+ AutoSolveWithApp: false,
23
+ AutoSolveOrdinal: 0,
24
+
25
+ CSS: false,
26
+ CSSPriority: 500,
27
+
28
+ Templates:
29
+ [
30
+ {
31
+ Hash: 'PRSP-Dashboard-PaginationTop-Template',
32
+ Template: /*html*/`
33
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-PaginationTop-Template] -->
34
+ <nav id="RSP_Upper_Pagination_Container" role="navigation" aria-label="pagination">
35
+ {~T:PRSP-Dashboard-Pagination-Template-Description~}
36
+ {~T:PRSP-Dashboard-Pagination-Template-Buttons~}
37
+ </nav>
38
+ <div>
39
+ {~TS:PRSP-Dashboard-Pagination-Template-Pages:Record.PageLinksLimited~}
40
+ </div>
41
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-PaginationTop-Template] -->
42
+ `
43
+ },
44
+ {
45
+ Hash: 'PRSP-Dashboard-Pagination-Template-Description',
46
+ Template: /*html*/`
47
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Description] -->
48
+ <div>
49
+ Showing
50
+ <span id="PRSP_Pagination_Description_Records_Start">{~D:Record.Offset~}</span> to
51
+ <span id="PRSP_Pagination_Description_Records_End">{~D:Record.PageEnd~}</span> of
52
+ <span id="PRSP_Pagination_Description_Records_Total">{~D:Record.TotalRecordCount.Count~}</span> total records.
53
+ </div>
54
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Description] -->
55
+ `
56
+ },
57
+ {
58
+ Hash: 'PRSP-Dashboard-Pagination-Template-Buttons',
59
+ Template: /*html*/`
60
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Buttons] -->
61
+ <ul style="list-style-type: none; padding: 0; display: flex; justify-content: center;">
62
+ {~TIfAbs:PRSP-Dashboard-Pagination-Template-Button-Previous:Record:Record.PageLinkBookmarks.ShowPreviousLink^TRUE^true~}
63
+ {~TS:PRSP-Dashboard-Pagination-Template-Button-Page~}
64
+ {~TIfAbs:PRSP-Dashboard-Pagination-Template-Button-Next:Record:Record.PageLinkBookmarks.ShowNextLink^TRUE^true~}
65
+ </ul>
66
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Buttons] -->
67
+ `
68
+ },
69
+ {
70
+ Hash: 'PRSP-Dashboard-Pagination-Template-Button-Previous',
71
+ Template: /*html*/`
72
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Previous] -->
73
+ <li><a href="{~D:Record.PageLinkBookmarks.PreviousLink.URL~}" aria-label="Previous page">&laquo; Previous</a></li>
74
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Previous] -->
75
+ `
76
+ },
77
+ {
78
+ Hash: 'PRSP-Dashboard-Pagination-Template-Button-Next',
79
+ Template: /*html*/`
80
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Next] -->
81
+ <li style="margin-left: 15px;"><a href="{~D:Record.PageLinkBookmarks.NextLink.URL~}" aria-label="Next page">Next &raquo;</a></li>
82
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Next] -->
83
+ `
84
+ },
85
+ {
86
+ Hash: 'PRSP-Dashboard-Pagination-Template-Button-Page',
87
+ Template: /*html*/`
88
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Page] -->
89
+ <li><a href="#" aria-label="Go to page {~D:Record.Page~}">{~D:Record.Page~}</a></li>
90
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Page] -->
91
+ `
92
+ },
93
+ {
94
+ Hash: 'PRSP-Dashboard-Pagination-Template-Pages',
95
+ Template: /*html*/`
96
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-Pagination-Template-Button-Pages] -->
97
+ <a href="{~D:Record.URL~}" aria-label="Go to page {~D:Record.Page~}" class="page-offset_{~D:Record.RelativeOffset~}">{~D:Record.Page~}</a>
98
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-Pagination-Template-Button-Pages] -->
99
+ `
100
+ }
101
+ ],
102
+
103
+ Renderables:
104
+ [
105
+ {
106
+ RenderableHash: 'PRSP_Renderable_PaginationTop',
107
+ TemplateHash: 'PRSP-Dashboard-PaginationTop-Template',
108
+ DestinationAddress: '#PRSP_PaginationTop_Container',
109
+ RenderMethod: 'replace'
110
+ }
111
+ ],
112
+
113
+ Manifests: {}
114
+ });
115
+
116
+ class viewRecordSetListPaginationTop extends libPictView
117
+ {
118
+ constructor(pFable, pOptions, pServiceHash)
119
+ {
120
+ let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_PaginationTop, pOptions);
121
+ super(pFable, tmpOptions, pServiceHash);
122
+ }
123
+ }
124
+
125
+ module.exports = viewRecordSetListPaginationTop;
126
+
127
+ module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_PaginationTop;
128
+
@@ -0,0 +1,80 @@
1
+ const libPictView = require('pict-view');
2
+
3
+ /** @type {Record<string, any>} */
4
+ const _DEFAULT_CONFIGURATION_List_RecordList =
5
+ {
6
+ ViewIdentifier: 'PRSP-Dashboard-RecordList',
7
+
8
+ DefaultRenderable: 'PRSP_Renderable_RecordList',
9
+ DefaultDestinationAddress: '#PRSP_RecordList_Container',
10
+ DefaultTemplateRecordAddress: false,
11
+
12
+ // If this is set to true, when the App initializes this will.
13
+ // While the App initializes, initialize will be called.
14
+ AutoInitialize: false,
15
+ AutoInitializeOrdinal: 0,
16
+
17
+ // If this is set to true, when the App autorenders (on load) this will.
18
+ // After the App initializes, render will be called.
19
+ AutoRender: false,
20
+ AutoRenderOrdinal: 0,
21
+
22
+ AutoSolveWithApp: false,
23
+ AutoSolveOrdinal: 0,
24
+
25
+ CSS: false,
26
+ CSSPriority: 500,
27
+
28
+ Templates:
29
+ [
30
+ {
31
+ Hash: 'PRSP-Dashboard-RecordList-Template',
32
+ Template: /*html*/`
33
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordList-Template] -->
34
+ <section id="PRSP_List_Container">
35
+ {~T:PRSP-Dashboard-RecordList-Template-Table~}
36
+ </section>
37
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordList-Template] -->
38
+ `
39
+ },
40
+ {
41
+ Hash: 'PRSP-Dashboard-RecordList-Template-Table',
42
+ Template: /*html*/`
43
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordList-Template-Table] -->
44
+ <table id="PRSP_List_Table" tablespacing="0" cellpadding="0" cellspacing="0" style="width: 100%; border-collapse: collapse; margin-bottom: 20px;">
45
+ <thead>{~T:PRSP-Dashboard-RecordListHeader-Template~}</thead>
46
+ <tbody id="PRSP_RecordList_Container_Entries">
47
+ {~T:PRSP-Dashboard-RecordListEntry-Template~}
48
+ </tbody>
49
+ </table>
50
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordList-Template-Table] -->
51
+ `
52
+ }
53
+ ],
54
+
55
+ Renderables:
56
+ [
57
+ {
58
+ RenderableHash: 'PRSP_Renderable_RecordList',
59
+ TemplateHash: 'PRSP-Dashboard-RecordList-Template',
60
+ DestinationAddress: '#PRSP_RecordList_Container',
61
+ RenderMethod: 'replace'
62
+ }
63
+ ],
64
+
65
+ Manifests: {}
66
+ };
67
+
68
+ class viewRecordSetListRecordList extends libPictView
69
+ {
70
+ constructor(pFable, pOptions, pServiceHash)
71
+ {
72
+ let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordList, pOptions);
73
+ super(pFable, tmpOptions, pServiceHash);
74
+ }
75
+ }
76
+
77
+ module.exports = viewRecordSetListRecordList;
78
+
79
+ module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_RecordList;
80
+
@@ -0,0 +1,121 @@
1
+ const libPictView = require('pict-view');
2
+
3
+ /** @type {Record<string, any>} */
4
+ const _DEFAULT_CONFIGURATION_List_RecordListEntry = (
5
+ {
6
+ ViewIdentifier: 'PRSP-Dashboard-RecordListEntry',
7
+
8
+ DefaultRenderable: 'PRSP_Renderable_RecordListEntry',
9
+ DefaultDestinationAddress: '#PRSP_RecordListEntry_Container',
10
+ DefaultTemplateRecordAddress: false,
11
+
12
+ // If this is set to true, when the App initializes this will.
13
+ // While the App initializes, initialize will be called.
14
+ AutoInitialize: false,
15
+ AutoInitializeOrdinal: 0,
16
+
17
+ // If this is set to true, when the App autorenders (on load) this will.
18
+ // After the App initializes, render will be called.
19
+ AutoRender: false,
20
+ AutoRenderOrdinal: 0,
21
+
22
+ AutoSolveWithApp: false,
23
+ AutoSolveOrdinal: 0,
24
+
25
+ CSS: false,
26
+ CSSPriority: 500,
27
+
28
+ Templates:
29
+ [
30
+ {
31
+ // TODO: Add extras template here; it's in the header but not here yet.
32
+ Hash: 'PRSP-Dashboard-RecordListEntry-Template',
33
+ Template: /*html*/`
34
+ {~TSWP:PRSP-Dashboard-RecordListEntry-Template-Row:Record.Records.Records:Record~}
35
+ `
36
+ },
37
+ {
38
+ Hash: 'PRSP-Dashboard-RecordListEntry-Template-Row',
39
+ Template: /*html*/`
40
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListEntry-Template] -->
41
+ <tr>
42
+ {~TSWP:PRSP-Dashboard-RecordListEntry-Template-Row-Cell:Record.Payload.TableCells:Record.Data~}
43
+ {~T:PRSP-Dashboard-RecordListHeader-Template-Extra-Row~}
44
+ {~T:PRSP-Dashboard-RecordListAction-Template-Cell~}
45
+ </tr>
46
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListEntry-Template] -->
47
+ `
48
+ },
49
+ {
50
+ Hash: 'PRSP-Dashboard-RecordListHeader-Template-Extra-Row',
51
+ Template: /*html*/`
52
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template-Extra-Row] -->
53
+ {~TBR:Record.Payload.RecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash~}
54
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Extra-Row] -->
55
+ `
56
+ // {~TBR:Record.Payload.RecordSetConfiguration.RecordSetListExtraColumnRowTemplateHash~}
57
+
58
+ },
59
+ {
60
+ Hash: 'PRSP-Dashboard-RecordListEntry-Template-Row-Cell',
61
+ Template: /*html*/`
62
+ <td style="border-bottom: 1px solid #ccc; padding: 5px;">
63
+ {~DVBK:Record.Payload:Record.Data.Key~}
64
+ </td>
65
+ `
66
+ },
67
+ {
68
+ Hash: 'PRSP-Dashboard-RecordListEntry-Template-Entry-Cell-Datum',
69
+ Template: /*html*/`
70
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListEntry-Template-Entry-Cell-Datum] -->
71
+ `
72
+ },
73
+ {
74
+ Hash: 'PRSP-Dashboard-RecordListAction-Template-Cell',
75
+ // FIXME: Needs a better way of getting the appropriate link templates in (likely requiring piping the RecordSet to the link manager)
76
+ Template: /*html*/`
77
+ <td style="border-bottom: 1px solid #ccc; padding: 5px;">
78
+ <ul>
79
+ {~TSWP:PRSP-Dashboard-RecordListAction-Template-Cell-Datum:Pict.providers.RecordSetLinkManager.linkTemplates:Record~}
80
+ </ul>
81
+ </td>
82
+ `
83
+ },
84
+ {
85
+ Hash: 'PRSP-Dashboard-RecordListAction-Template-Cell-Datum',
86
+ // These use the new TemplateByReference template expression, which uses the values in these addresses to lookup the template hash then renders those template with the current Record state.
87
+ // This is part one of refactoring to include metatemplate resolution ase a core behavior pict itself rather than a pict-section-form capability
88
+ Template: /*html*/`
89
+ <li><a href="{~TBR:Record.Data.URL~}">{~TBR:Record.Data.Name~}</a></li>
90
+ `
91
+ // {~Breakpoint~}
92
+
93
+ },
94
+ ],
95
+
96
+ Renderables:
97
+ [
98
+ {
99
+ RenderableHash: 'PRSP_Renderable_RecordListEntry',
100
+ TemplateHash: 'PRSP-Dashboard-RecordListEntry-Template',
101
+ DestinationAddress: '#PRSP_RecordListEntry_Container',
102
+ RenderMethod: 'replace'
103
+ }
104
+ ],
105
+
106
+ Manifests: {}
107
+ });
108
+
109
+ class viewRecordSetListRecordListEntry extends libPictView
110
+ {
111
+ constructor(pFable, pOptions, pServiceHash)
112
+ {
113
+ let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordListEntry, pOptions);
114
+ super(pFable, tmpOptions, pServiceHash);
115
+ }
116
+ }
117
+
118
+ module.exports = viewRecordSetListRecordListEntry;
119
+
120
+ module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_RecordListEntry;
121
+
@@ -0,0 +1,99 @@
1
+ const libPictView = require('pict-view');
2
+
3
+ /** @type {Record<string, any>} */
4
+ const _DEFAULT_CONFIGURATION_List_RecordListHeader = (
5
+ {
6
+ ViewIdentifier: 'PRSP-Dashboard-RecordListHeader',
7
+
8
+ DefaultRenderable: 'PRSP_Renderable_RecordListHeader',
9
+ DefaultDestinationAddress: '#PRSP_RecordListHeader_Container',
10
+ DefaultTemplateRecordAddress: false,
11
+
12
+ // If this is set to true, when the App initializes this will.
13
+ // While the App initializes, initialize will be called.
14
+ AutoInitialize: false,
15
+ AutoInitializeOrdinal: 0,
16
+
17
+ // If this is set to true, when the App autorenders (on load) this will.
18
+ // After the App initializes, render will be called.
19
+ AutoRender: false,
20
+ AutoRenderOrdinal: 0,
21
+
22
+ AutoSolveWithApp: false,
23
+ AutoSolveOrdinal: 0,
24
+
25
+ CSS: false,
26
+ CSSPriority: 500,
27
+
28
+ Templates:
29
+ [
30
+ {
31
+ Hash: 'PRSP-Dashboard-RecordListHeader-Template',
32
+ Template: /*html*/`
33
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template] -->
34
+ <tr>
35
+ {~TS:PRSP-Dashboard-RecordListHeader-Template-Header:Record.TableCells~}
36
+ {~T:PRSP-Dashboard-RecordListHeader-Template-Extra-Header~}
37
+ {~T:PRSP-Dashboard-RecordListActions-Template-Header~}
38
+ </tr>
39
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Template] -->
40
+ `
41
+ },
42
+ {
43
+ Hash: 'PRSP-Dashboard-RecordListHeader-Template-Header',
44
+ Template: /*html*/`
45
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template-Header] -->
46
+ <th style="border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;">
47
+ {~D:Record.DisplayName~}
48
+ </th>
49
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Template-Header] -->
50
+ `
51
+ },
52
+ {
53
+ Hash: 'PRSP-Dashboard-RecordListHeader-Template-Extra-Header',
54
+ Template: /*html*/`
55
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListHeader-Template-Extra-Header] -->
56
+ {~TBR:Record.RecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash~}
57
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListHeader-Extra-Header] -->
58
+ `
59
+ // {~TBR:Record.RecordSetConfiguration.RecordSetListExtraColumnsHeaderTemplateHash~}
60
+
61
+ },
62
+ {
63
+ Hash: 'PRSP-Dashboard-RecordListActions-Template-Header',
64
+ Template: /*html*/`
65
+ <!-- DefaultPackage pict view template: [PRSP-Dashboard-RecordListActions-Template-Header] -->
66
+ <th style="border-bottom: 1px solid #ccc; padding: 5px; background-color: #f2f2f2; color: #333;">
67
+ Actions
68
+ </th>
69
+ <!-- DefaultPackage end view template: [PRSP-Dashboard-RecordListActions-Template-Header] -->
70
+ `
71
+ },
72
+ ],
73
+
74
+ Renderables:
75
+ [
76
+ {
77
+ RenderableHash: 'PRSP_Renderable_RecordListHeader',
78
+ TemplateHash: 'PRSP-Dashboard-RecordListHeader-Template',
79
+ DestinationAddress: '#PRSP_RecordListHeader_Container',
80
+ RenderMethod: 'replace'
81
+ }
82
+ ],
83
+
84
+ Manifests: {}
85
+ });
86
+
87
+ class viewRecordSetListRecordListHeader extends libPictView
88
+ {
89
+ constructor(pFable, pOptions, pServiceHash)
90
+ {
91
+ let tmpOptions = Object.assign({}, _DEFAULT_CONFIGURATION_List_RecordListHeader, pOptions);
92
+ super(pFable, tmpOptions, pServiceHash);
93
+ }
94
+ }
95
+
96
+ module.exports = viewRecordSetListRecordListHeader;
97
+
98
+ module.exports.default_configuration = _DEFAULT_CONFIGURATION_List_RecordListHeader;
99
+
@@ -1,5 +1,6 @@
1
1
  const libPictView = require('pict-view');
2
2
 
3
+ /** @type {Record<string, any>} */
3
4
  const _DEFAULT_CONFIGURATION_Dashboard_TabBarDashboard =
4
5
  {
5
6
  ViewIdentifier: 'PRSP-Dashboard-TabBarDashboard',