pict-section-recordset 1.0.34 → 1.0.36

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.
@@ -7,6 +7,12 @@
7
7
  <script type="text/javascript">Pict.safeOnDocumentReady(() => { Pict.safeLoadPictApplication(SimpleApplication, 1)});</script>
8
8
  </head>
9
9
  <body>
10
+ <nav>
11
+ <ul>
12
+ <li><a href="#/PSRS/Book/List">Book List</a></li>
13
+ <li><a href="#/PSRS/Author/List">Author List</a></li>
14
+ </ul>
15
+ </nav>
10
16
  <div id="PRSP_Container"></div>
11
17
  <script src="./simple_application.js" type="text/javascript"></script>
12
18
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pict-section-recordset",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "Pict dynamic record set management views",
5
5
  "main": "source/Pict-Section-RecordSet.js",
6
6
  "directories": {
@@ -33,7 +33,7 @@
33
33
  "browser-env": "^3.3.0",
34
34
  "eslint": "^9.28.0",
35
35
  "jquery": "^3.7.1",
36
- "pict": "^1.0.293",
36
+ "pict": "^1.0.295",
37
37
  "pict-application": "^1.0.27",
38
38
  "pict-service-commandlineutility": "^1.0.15",
39
39
  "quackage": "^1.0.42",
@@ -43,7 +43,7 @@
43
43
  "fable-serviceproviderbase": "^3.0.15",
44
44
  "pict-provider": "^1.0.6",
45
45
  "pict-router": "^1.0.4",
46
- "pict-section-form": "^1.0.109",
46
+ "pict-section-form": "^1.0.110",
47
47
  "pict-template": "^1.0.13",
48
48
  "pict-view": "^1.0.63"
49
49
  },
@@ -166,7 +166,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
166
166
  return new Promise((resolve, reject) =>
167
167
  {
168
168
  const [ tmpClauses, tmpExperience ] = this._prepareFilterState(tmpEntity, pOptions);
169
- this.pict.providers.FilterManager.loadRecordPageByFilter(tmpClauses, tmpExperience, pOptions.Offset || 0, pOptions.PageSize || 250, (pError) =>
169
+ this.pict.providers.FilterManager.loadRecordPageByFilterUsingProvider(this._EntityProvider, tmpClauses, tmpExperience, pOptions.Offset || 0, pOptions.PageSize || 250, (pError) =>
170
170
  {
171
171
  if (pError)
172
172
  {
@@ -211,7 +211,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
211
211
  return new Promise((resolve, reject) =>
212
212
  {
213
213
  const [ tmpClauses, tmpExperience ] = this._prepareFilterState(tmpEntity, pOptions, 'Count');
214
- this.pict.providers.FilterManager.countRecordsByFilter(tmpClauses, tmpExperience, (pError) =>
214
+ this.pict.providers.FilterManager.countRecordsByFilterUsingProivider(this._EntityProvider, tmpClauses, tmpExperience, (pError) =>
215
215
  {
216
216
  if (pError)
217
217
  {
@@ -20,7 +20,7 @@ class ViewRecordSetSUBSETFilterBaseRange extends ViewRecordSetSUBSETFilterBase
20
20
 
21
21
  pRecord.StartClauseDescriptor =
22
22
  {
23
- Hash: this.fable.DataFormat.sanitizeObjectKey(pRecord.StartClauseAddress),
23
+ Hash: this.fable.DataFormat.sanitizeObjectKey(this.constructor.name),
24
24
  Address: pRecord.StartClauseAddress,
25
25
  //TODO: figure out a nice pattern for extracting a name for the field from the filter - and allow the filter author to provide the label here
26
26
  Name: pRecord.MinimumLabel || `Minimum ${pRecord.ExternalFilterByColumn || pRecord.ExternalFilterByColumns?.[0] || pRecord.FilterByColumn || pRecord.FilterByColumns?.[0] || 'Value'}`,
@@ -29,7 +29,7 @@ class ViewRecordSetSUBSETFilterBaseRange extends ViewRecordSetSUBSETFilterBase
29
29
 
30
30
  pRecord.EndClauseDescriptor =
31
31
  {
32
- Hash: this.fable.DataFormat.sanitizeObjectKey(pRecord.EndClauseAddress),
32
+ Hash: this.fable.DataFormat.sanitizeObjectKey(this.constructor.name),
33
33
  Address: pRecord.EndClauseAddress,
34
34
  Name: pRecord.MaximumLabel || `Maximum ${pRecord.ExternalFilterByColumn || pRecord.ExternalFilterByColumns?.[0] || pRecord.FilterByColumn || pRecord.FilterByColumns?.[0] || 'Value'}`,
35
35
  DataType: 'String',
@@ -81,7 +81,7 @@ class ViewRecordSetSUBSETFilterBase extends libPictView
81
81
  pRecord.ClauseDescriptor =
82
82
  {
83
83
  Address: pRecord.ClauseValueAddress,
84
- Hash: this.fable.DataFormat.sanitizeObjectKey(pRecord.ClauseValueAddress),
84
+ Hash: this.fable.DataFormat.sanitizeObjectKey(this.constructor.name),
85
85
  //TODO: figure out a nice pattern for extracting a name for the field from the filter - and allow the filter author to provide the label here
86
86
  Name: pRecord.Label || pRecord.ExternalFilterByColumn || pRecord.ExternalFilterByColumns?.[0] || pRecord.FilterByColumn || pRecord.FilterByColumns?.[0] || 'Value',
87
87
  DataType: 'String',
@@ -22,7 +22,11 @@ const _DEFAULT_CONFIGURATION_List_RecordList =
22
22
  AutoSolveWithApp: false,
23
23
  AutoSolveOrdinal: 0,
24
24
 
25
- CSS: false,
25
+ CSS: /*css*/`
26
+ tr#PRSP_List_Table_Empty:not(:first-child) {
27
+ display: none;
28
+ }
29
+ `,
26
30
  CSSPriority: 500,
27
31
 
28
32
  Templates:
@@ -45,9 +49,20 @@ const _DEFAULT_CONFIGURATION_List_RecordList =
45
49
  <thead>{~T:PRSP-List-RecordListHeader-Template~}</thead>
46
50
  <tbody id="PRSP_RecordList_Container_Entries">
47
51
  {~T:PRSP-List-RecordListEntry-Template~}
52
+ {~T:PRSP-List-RecordList-Template-EmptyTable~}
48
53
  </tbody>
49
54
  </table>
50
55
  <!-- DefaultPackage end view template: [PRSP-List-RecordList-Template-Table] -->
56
+ `
57
+ },
58
+ {
59
+ Hash: 'PRSP-List-RecordList-Template-EmptyTable',
60
+ Template: /*html*/`
61
+ <!-- DefaultPackage pict view template: [PRSP-List-RecordList-Template-EmptyTable] -->
62
+ <tr id="PRSP_List_Table_Empty">
63
+ <td colspan="100%" style="text-align: center; padding: 10px;">No records found.</td>
64
+ </tr>
65
+ <!-- DefaultPackage end view template: [PRSP-List-RecordList-Template-EmptyTable] -->
51
66
  `
52
67
  }
53
68
  ],