pict-section-recordset 1.0.28 → 1.0.29
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pict-section-recordset",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
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.
|
|
36
|
+
"pict": "^1.0.289",
|
|
37
37
|
"pict-application": "^1.0.27",
|
|
38
38
|
"pict-service-commandlineutility": "^1.0.15",
|
|
39
39
|
"quackage": "^1.0.42",
|
|
@@ -489,8 +489,8 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
489
489
|
break;
|
|
490
490
|
case 'boolean': //TODO: we didn't add filters for this - they are just numeric but it's weird for the user, maybe we should add views for this that account for the difference
|
|
491
491
|
case 'integer':
|
|
492
|
-
tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Match_Exact`, DisplayName: `${tmpFieldHumanName} Exact Match`, Type: '
|
|
493
|
-
tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Match_Fuzzy`, DisplayName: `${tmpFieldHumanName} Partial Match`, Type: '
|
|
492
|
+
tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Match_Exact`, DisplayName: `${tmpFieldHumanName} Exact Match`, Type: 'NumericMatch', FilterByColumn: tmpSchemaField, ExactMatch: true , Ordinal: tmpFieldFilterSchema.AvailableClauses.length + 1 });
|
|
493
|
+
tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Match_Fuzzy`, DisplayName: `${tmpFieldHumanName} Partial Match`, Type: 'NumericMatch', FilterByColumn: tmpSchemaField, ExactMatch: false , Ordinal: tmpFieldFilterSchema.AvailableClauses.length + 1 });
|
|
494
494
|
tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Range`, DisplayName: `${tmpFieldHumanName} in Range`, Type: 'NumberRange', FilterByColumn: tmpSchemaField , Ordinal: tmpFieldFilterSchema.AvailableClauses.length + 1 });
|
|
495
495
|
break;
|
|
496
496
|
default:
|
|
@@ -82,7 +82,7 @@ const _DEFAULT_CONFIGURATION_SUBSET_Filter =
|
|
|
82
82
|
Template: /*html*/`
|
|
83
83
|
<!-- DefaultPackage pict view template: [PRSP-SUBSET-Filters-Template-AddFilter-Dropdown] -->
|
|
84
84
|
<div>
|
|
85
|
-
<select onchange="event.preventDefault(); _Pict.views['PRSP-Filters'].render('PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown', undefined,
|
|
85
|
+
<select id="PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-Select" onchange="event.preventDefault(); _Pict.views['PRSP-Filters'].render('PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown', undefined,
|
|
86
86
|
{
|
|
87
87
|
RecordSet: event.target.querySelector('option:checked').getAttribute('data-i-recordset'),
|
|
88
88
|
FilterKey: event.target.querySelector('option:checked').getAttribute('data-i-filter-key'),
|
|
@@ -100,7 +100,7 @@ const _DEFAULT_CONFIGURATION_SUBSET_Filter =
|
|
|
100
100
|
Hash: 'PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown',
|
|
101
101
|
Template: /*html*/`
|
|
102
102
|
<!-- DefaultPackage pict view template: [PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown] -->
|
|
103
|
-
<select>
|
|
103
|
+
<select id="PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown-Select">
|
|
104
104
|
{~TS:PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-Entry:Record.AvailableClauses~}
|
|
105
105
|
</select>
|
|
106
106
|
<button type="button" id="PRSP_Filter_Button_ConfirmAdd" onclick="_Pict.views['PRSP-Filters'].addFilter(event, '{~D:Record.RecordSet~}', '{~D:Record.ViewContext~}',
|
|
@@ -382,7 +382,36 @@ class ViewRecordSetSUBSETFilters extends libPictView
|
|
|
382
382
|
//FIXME: since this is rendering to the DOM indirectly, can't marshal right after render; need to fix this better, if this even works
|
|
383
383
|
setTimeout(() =>
|
|
384
384
|
{
|
|
385
|
-
|
|
385
|
+
if (!pRecord)
|
|
386
|
+
{
|
|
387
|
+
pRecord = {};
|
|
388
|
+
}
|
|
389
|
+
if (!Array.isArray(pRecord.AvailableClauses))
|
|
390
|
+
{
|
|
391
|
+
const tmpSelect = document.getElementById('PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-Select');
|
|
392
|
+
if (tmpSelect)
|
|
393
|
+
{
|
|
394
|
+
const tmpActiveOption = document.getElementById('PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-Select')?.querySelector('option:checked')
|
|
395
|
+
const tmpRecordSet = tmpActiveOption?.getAttribute('data-i-recordset');
|
|
396
|
+
const tmpFilterKey = tmpActiveOption?.getAttribute('data-i-filter-key');
|
|
397
|
+
if (tmpRecordSet && tmpFilterKey)
|
|
398
|
+
{
|
|
399
|
+
const tmpProvider = this.pict.providers[`RSP-Provider-${tmpRecordSet}`];
|
|
400
|
+
if (tmpProvider)
|
|
401
|
+
{
|
|
402
|
+
pRecord.AvailableClauses = tmpProvider.getFilterClauseSchemaForKey(tmpFilterKey).AvailableClauses;
|
|
403
|
+
if (Array.isArray(pRecord.AvailableClauses))
|
|
404
|
+
{
|
|
405
|
+
this.render('PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown', undefined, pRecord);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
setTimeout(() =>
|
|
412
|
+
{
|
|
413
|
+
this.onMarshalToView();
|
|
414
|
+
}, 1);
|
|
386
415
|
}, 1);
|
|
387
416
|
return super.onAfterRender(pRenderable, pRenderDestinationAddress, pRecord, pContent);
|
|
388
417
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-Filters.d.ts","sourceRoot":"","sources":["../../source/views/RecordSet-Filters.js"],"names":[],"mappings":";AAwJA;IAEC,2DA8DC;IA1DA,kHAAkH;IAClH,MADW,GAAe,GAAG,OAAO,MAAM,CAAC,GAAG;QAAE,oBAAoB,EAAE;;;;;;SAAsC,CAAA;KAAE,CACrG;IAiDT,cAA+E;IAG/E,wCAA0E;IAU3E;;;;OAIG;IACH,qBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,qBAJW,KAAK,cACL,MAAM,gBACN,MAAM,QAShB;IAED;;;;OAIG;IACH,0BAJW,MAAM,gBACN,MAAM,kBACN,MAAM,QA+ChB;IAED;;;;OAIG;IACH,oBAJW,KAAK,cACL,MAAM,gBACN,MAAM,QAgBhB;IAED;;;;OAIG;IACH,0BAJW,KAAK,cACL,MAAM,gBACN,MAAM,QAQhB;IAED,mGAMC;IAED,wCAIC;
|
|
1
|
+
{"version":3,"file":"RecordSet-Filters.d.ts","sourceRoot":"","sources":["../../source/views/RecordSet-Filters.js"],"names":[],"mappings":";AAwJA;IAEC,2DA8DC;IA1DA,kHAAkH;IAClH,MADW,GAAe,GAAG,OAAO,MAAM,CAAC,GAAG;QAAE,oBAAoB,EAAE;;;;;;SAAsC,CAAA;KAAE,CACrG;IAiDT,cAA+E;IAG/E,wCAA0E;IAU3E;;;;OAIG;IACH,qBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,mBAFa,GAAG,CAaf;IAED;;;;OAIG;IACH,qBAJW,KAAK,cACL,MAAM,gBACN,MAAM,QAShB;IAED;;;;OAIG;IACH,0BAJW,MAAM,gBACN,MAAM,kBACN,MAAM,QA+ChB;IAED;;;;OAIG;IACH,oBAJW,KAAK,cACL,MAAM,gBACN,MAAM,QAgBhB;IAED;;;;OAIG;IACH,0BAJW,KAAK,cACL,MAAM,gBACN,MAAM,QAQhB;IAED,mGAMC;IAED,wCAIC;IAmED,6DAOC;IAED;;;;OAIG;IACH,yCAJW,MAAM,GAEL,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAUvC;IAED;;;;;OAKG;IACH,iBALW,MAAM,aACN,iBAAiB,GAEhB,OAAO,CAAC,WAAW,CAAC,CAU/B;IAED;;;OAGG;IACH,sBAHW,UAAU,aACV,iBAAiB,mBAY3B;IAED;;;;OAIG;IACH,oBAJW,WAAW,GAEV,MAAM,CA2BjB;IAED;;;;OAIG;IACH,eAJW,MAAM,GAEL,WAAW,CAsCtB;CACD;;;;;AApjBD,kCAAkC;AAClC,oDADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAiJ5B"}
|