pict-section-recordset 1.0.59 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +50 -0
- package/README.md +13 -0
- package/docs/css/docuserve.css +73 -0
- package/docs/index.html +36 -48
- package/docs/retold-catalog.json +187 -0
- package/docs/retold-keyword-index.json +3265 -0
- package/package.json +10 -10
- package/source/providers/Filter-Data-Provider.js +9 -12
- package/source/views/RecordSet-Filters.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-recordset",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "Pict dynamic record set management views",
|
|
5
5
|
"main": "source/Pict-Section-RecordSet.js",
|
|
6
6
|
"directories": {
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"browser-env": "^3.3.0",
|
|
34
34
|
"eslint": "^9.28.0",
|
|
35
35
|
"jquery": "^3.7.1",
|
|
36
|
-
"pict": "^1.0.
|
|
37
|
-
"pict-application": "^1.0.
|
|
38
|
-
"pict-service-commandlineutility": "^1.0.
|
|
39
|
-
"quackage": "^1.0.
|
|
36
|
+
"pict": "^1.0.348",
|
|
37
|
+
"pict-application": "^1.0.32",
|
|
38
|
+
"pict-service-commandlineutility": "^1.0.18",
|
|
39
|
+
"quackage": "^1.0.51",
|
|
40
40
|
"typescript": "^5.9.3"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"fable-serviceproviderbase": "^3.0.
|
|
44
|
-
"pict-provider": "^1.0.
|
|
43
|
+
"fable-serviceproviderbase": "^3.0.18",
|
|
44
|
+
"pict-provider": "^1.0.10",
|
|
45
45
|
"pict-router": "^1.0.4",
|
|
46
|
-
"pict-section-form": "^1.0.
|
|
47
|
-
"pict-template": "^1.0.
|
|
48
|
-
"pict-view": "^1.0.
|
|
46
|
+
"pict-section-form": "^1.0.187",
|
|
47
|
+
"pict-template": "^1.0.14",
|
|
48
|
+
"pict-view": "^1.0.66",
|
|
49
49
|
"sinon": "^21.0.1"
|
|
50
50
|
},
|
|
51
51
|
"mocha": {
|
|
@@ -150,6 +150,8 @@ class FilterDataProvider extends libPictProvider
|
|
|
150
150
|
applyExpectedFilterExperience(pRecordSet, pViewContext)
|
|
151
151
|
{
|
|
152
152
|
const applyLastUsed = this.getRememberLastUsedFilterExperience(pRecordSet, pViewContext);
|
|
153
|
+
const tmpDefaultFilterExperience = this.getDefaultFilterExperience(pRecordSet, pViewContext);
|
|
154
|
+
const tmpFallbackDefaultExperienceURLParam = this.getFallbackDefaultFilterExperienceSettings(pRecordSet, pViewContext);
|
|
153
155
|
if (applyLastUsed)
|
|
154
156
|
{
|
|
155
157
|
// first try to set last used filter experience as default on load
|
|
@@ -165,10 +167,9 @@ class FilterDataProvider extends libPictProvider
|
|
|
165
167
|
this.loadFilterMeta(pRecordSet, pViewContext, tmpLastUsedFilterExperience.FilterExperienceHash, true);
|
|
166
168
|
return true;
|
|
167
169
|
}
|
|
168
|
-
}
|
|
170
|
+
}
|
|
169
171
|
// if no last used filter experience, fall back to default filter experience on load
|
|
170
|
-
|
|
171
|
-
if (tmpDefaultFilterExperience)
|
|
172
|
+
else if (tmpDefaultFilterExperience && tmpDefaultFilterExperience.FilterExperienceHash)
|
|
172
173
|
{
|
|
173
174
|
this.pict.log.info(`Applying default filter experience on load for record set: ${pRecordSet} with view context: ${pViewContext}`);
|
|
174
175
|
// if we are already on the default filter experience by URL, skip loading it again
|
|
@@ -180,15 +181,11 @@ class FilterDataProvider extends libPictProvider
|
|
|
180
181
|
return true;
|
|
181
182
|
}
|
|
182
183
|
// finally, check for a fallback default experience URL param to load (could be server/customer provided)
|
|
183
|
-
|
|
184
|
-
if (tmpFallbackDefaultExperienceURLParam)
|
|
184
|
+
else if (tmpFallbackDefaultExperienceURLParam && tmpFallbackDefaultExperienceURLParam.length > 0)
|
|
185
185
|
{
|
|
186
|
-
|
|
187
|
-
{
|
|
188
|
-
|
|
189
|
-
this.fable.providers.RecordSetRouter.pictRouter.navigate(`/PSRS/${pRecordSet}/${pViewContext}/FilterExperience/${tmpFallbackDefaultExperienceURLParam}`);
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
186
|
+
this.pict.log.info(`Applying fallback default filter experience URL param on load for record set: ${pRecordSet} with view context: ${pViewContext}`);
|
|
187
|
+
this.fable.providers.RecordSetRouter.pictRouter.navigate(`/PSRS/${pRecordSet}/${pViewContext}/FilterExperience/${tmpFallbackDefaultExperienceURLParam}`);
|
|
188
|
+
return true;
|
|
192
189
|
}
|
|
193
190
|
// no filter experience to apply
|
|
194
191
|
return false;
|
|
@@ -321,7 +318,7 @@ class FilterDataProvider extends libPictProvider
|
|
|
321
318
|
let tmpFilterExperienceHash = (typeof(pFilterExperienceHash) === 'string') ? pFilterExperienceHash : null;
|
|
322
319
|
if (!tmpFilterExperienceHash || tmpFilterExperienceHash.length === 0)
|
|
323
320
|
{
|
|
324
|
-
console.
|
|
321
|
+
console.warn('No filter experience hash provided to resolve storage key.');
|
|
325
322
|
return '';
|
|
326
323
|
}
|
|
327
324
|
return `Filter_Meta_${pRecordSet}_${pViewContext}_${tmpFilterExperienceHash}`;
|
|
@@ -233,7 +233,7 @@ class ViewRecordSetSUBSETFilters extends libPictView
|
|
|
233
233
|
{
|
|
234
234
|
this.lookup[this.chars.charCodeAt(i)] = i;
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
this.newFilterSearchApplied = false;
|
|
237
237
|
this.addFilterCallback = null;
|
|
238
238
|
this.removeFilterCallback = null;
|
|
239
239
|
}
|
|
@@ -337,6 +337,7 @@ class ViewRecordSetSUBSETFilters extends libPictView
|
|
|
337
337
|
{
|
|
338
338
|
pEvent.preventDefault(); // don't submit the form
|
|
339
339
|
pEvent.stopPropagation();
|
|
340
|
+
this.newFilterSearchApplied = true;
|
|
340
341
|
//FIXME: store this filter string in the bundle so we can re-apply it on re-render
|
|
341
342
|
const tmpSearchString = this.pict.ContentAssignment.readContent(`input[name="filter"]`);
|
|
342
343
|
this.performSearch(pRecordSet, pViewContext, tmpSearchString ? String(tmpSearchString) : '');
|
|
@@ -397,6 +398,7 @@ class ViewRecordSetSUBSETFilters extends libPictView
|
|
|
397
398
|
});
|
|
398
399
|
// new search means this can't be out of date anymore
|
|
399
400
|
this.pict.providers.FilterDataProvider.filterExperienceModifiedFromURLHash = false;
|
|
401
|
+
this.newFilterSearchApplied = false;
|
|
400
402
|
}
|
|
401
403
|
|
|
402
404
|
/**
|