pict-section-recordset 1.0.31 → 1.0.33

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.31",
3
+ "version": "1.0.33",
4
4
  "description": "Pict dynamic record set management views",
5
5
  "main": "source/Pict-Section-RecordSet.js",
6
6
  "directories": {
@@ -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.108",
46
+ "pict-section-form": "^1.0.109",
47
47
  "pict-template": "^1.0.13",
48
48
  "pict-view": "^1.0.63"
49
49
  },
@@ -491,7 +491,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
491
491
  case 'integer':
492
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
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
- tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Range`, DisplayName: `${tmpFieldHumanName} in Range`, Type: 'NumberRange', FilterByColumn: tmpSchemaField , Ordinal: tmpFieldFilterSchema.AvailableClauses.length + 1 });
494
+ tmpFieldFilterSchema.AvailableClauses.push({ FilterKey: tmpSchemaField, ClauseKey: `${tmpSchemaField}_Range`, DisplayName: `${tmpFieldHumanName} in Range`, Type: 'NumbericRange', FilterByColumn: tmpSchemaField , Ordinal: tmpFieldFilterSchema.AvailableClauses.length + 1 });
495
495
  break;
496
496
  default:
497
497
  this.pict.log.warn(`Unsupported field type ${tmpColumn.type} for field ${tmpSchemaField}`, { Schema: tmpColumn });
@@ -368,7 +368,7 @@ class ViewRecordSetSUBSETFilters extends libPictView
368
368
  this.pict.log.info(`Adding filter: ${pFilterKey} with clause: ${pClauseKey} to record set: ${pRecordSet} in view context: ${pViewContext}`);
369
369
  this.pict.providers[`RSP-Provider-${pRecordSet}`].addFilterClause(pFilterKey, pClauseKey);
370
370
  //FIXME: we need the record from the original render here but no longer have it...
371
- //this.render();
371
+ this.render(undefined, undefined, { RecordSet: pRecordSet, ViewContext: pViewContext });
372
372
  }
373
373
 
374
374
  getFilterSchema(pRecordSet)
@@ -385,6 +385,10 @@ class ViewRecordSetSUBSETFilters extends libPictView
385
385
  onAfterRender(pRenderable)
386
386
  {
387
387
  const res = super.onAfterRender(pRenderable);
388
+ if (pRenderable?.RenderableHash === 'PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-AddFilterClauseDropdown')
389
+ {
390
+ return;
391
+ }
388
392
  const tmpRecord = { };
389
393
  const tmpSelect = document.getElementById('PRSP-SUBSET-Filters-Template-AddFilter-Dropdown-Select');
390
394
  if (tmpSelect)
@@ -397,6 +401,8 @@ class ViewRecordSetSUBSETFilters extends libPictView
397
401
  const tmpProvider = this.pict.providers[`RSP-Provider-${tmpRecordSet}`];
398
402
  if (tmpProvider)
399
403
  {
404
+ tmpRecord.RecordSet = tmpRecordSet;
405
+ tmpRecord.FilterKey = tmpFilterKey;
400
406
  tmpRecord.AvailableClauses = tmpProvider.getFilterClauseSchemaForKey(tmpFilterKey).AvailableClauses;
401
407
  if (Array.isArray(tmpRecord.AvailableClauses))
402
408
  {
@@ -20,6 +20,7 @@ class ViewRecordSetSUBSETFilterBaseRange extends ViewRecordSetSUBSETFilterBase
20
20
 
21
21
  pRecord.StartClauseDescriptor =
22
22
  {
23
+ Hash: this.fable.DataFormat.sanitizeObjectKey(pRecord.StartClauseAddress),
23
24
  Address: pRecord.StartClauseAddress,
24
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
25
26
  Name: pRecord.MinimumLabel || `Minimum ${pRecord.ExternalFilterByColumn || pRecord.ExternalFilterByColumns?.[0] || pRecord.FilterByColumn || pRecord.FilterByColumns?.[0] || 'Value'}`,
@@ -28,6 +29,7 @@ class ViewRecordSetSUBSETFilterBaseRange extends ViewRecordSetSUBSETFilterBase
28
29
 
29
30
  pRecord.EndClauseDescriptor =
30
31
  {
32
+ Hash: this.fable.DataFormat.sanitizeObjectKey(pRecord.EndClauseAddress),
31
33
  Address: pRecord.EndClauseAddress,
32
34
  Name: pRecord.MaximumLabel || `Maximum ${pRecord.ExternalFilterByColumn || pRecord.ExternalFilterByColumns?.[0] || pRecord.FilterByColumn || pRecord.FilterByColumns?.[0] || 'Value'}`,
33
35
  DataType: 'String',
@@ -33,7 +33,8 @@ class ViewRecordSetSUBSETFilterDateMatch extends ViewRecordSetSUBSETFilterBase
33
33
  */
34
34
  prepareRecord(pRecord)
35
35
  {
36
- //{~IWVDA:PSRSFilterProxyView:Record.ClauseDescriptor~}
36
+ super.prepareRecord(pRecord);
37
+
37
38
  pRecord.ClauseDescriptor.DataType = 'DateTime';
38
39
  }
39
40
 
@@ -33,6 +33,8 @@ class ViewRecordSetSUBSETFilterExternalJoinDateMatch extends ViewRecordSetSUBSET
33
33
  */
34
34
  prepareRecord(pRecord)
35
35
  {
36
+ super.prepareRecord(pRecord);
37
+
36
38
  pRecord.ClauseDescriptor.DataType = 'DateTime';
37
39
  }
38
40
 
@@ -1 +1 @@
1
- {"version":3,"file":"RecordSet-Filters.d.ts","sourceRoot":"","sources":["../../source/views/RecordSet-Filters.js"],"names":[],"mappings":";AAwJA;IAEC,2DAqEC;IAjEA,kHAAkH;IAClH,MADW,GAAe,GAAG,OAAO,MAAM,CAAC,GAAG;QAAE,oBAAoB,EAAE;;;;;;SAAsC,CAAA;KAAE,CACrG;IAwDT,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,mGAOC;IAED,wCAIC;IAkCD,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;;;;;AA3hBD,kCAAkC;AAClC,oDADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAiJ5B"}
1
+ {"version":3,"file":"RecordSet-Filters.d.ts","sourceRoot":"","sources":["../../source/views/RecordSet-Filters.js"],"names":[],"mappings":";AAwJA;IAEC,2DAqEC;IAjEA,kHAAkH;IAClH,MADW,GAAe,GAAG,OAAO,MAAM,CAAC,GAAG;QAAE,oBAAoB,EAAE;;;;;;SAAsC,CAAA;KAAE,CACrG;IAwDT,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,mGAOC;IAED,wCAIC;IAwCD,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;;;;;AAjiBD,kCAAkC;AAClC,oDADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAiJ5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"RecordSet-Filter-Base-Range.d.ts","sourceRoot":"","sources":["../../../source/views/filters/RecordSet-Filter-Base-Range.js"],"names":[],"mappings":";AAGA;CAgCC"}
1
+ {"version":3,"file":"RecordSet-Filter-Base-Range.d.ts","sourceRoot":"","sources":["../../../source/views/filters/RecordSet-Filter-Base-Range.js"],"names":[],"mappings":";AAGA;CAkCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RecordSet-Filter-DateMatch.d.ts","sourceRoot":"","sources":["../../../source/views/filters/RecordSet-Filter-DateMatch.js"],"names":[],"mappings":";AAqBA;CAsBC"}
1
+ {"version":3,"file":"RecordSet-Filter-DateMatch.d.ts","sourceRoot":"","sources":["../../../source/views/filters/RecordSet-Filter-DateMatch.js"],"names":[],"mappings":";AAqBA;CAuBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RecordSet-Filter-ExternalJoinDateMatch.d.ts","sourceRoot":"","sources":["../../../source/views/filters/RecordSet-Filter-ExternalJoinDateMatch.js"],"names":[],"mappings":";AAqBA;CAqBC"}
1
+ {"version":3,"file":"RecordSet-Filter-ExternalJoinDateMatch.d.ts","sourceRoot":"","sources":["../../../source/views/filters/RecordSet-Filter-ExternalJoinDateMatch.js"],"names":[],"mappings":";AAqBA;CAuBC"}