pict-section-recordset 1.0.42 → 1.0.43
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
|
@@ -365,19 +365,26 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
365
365
|
/**
|
|
366
366
|
* @param {string} pSchemaField - The schema field name.
|
|
367
367
|
* @param {Record<string, any>} pColumn - The full column definition from the schema.
|
|
368
|
+
* @param {Record<string, any>} [pMeadowSchemaField] - The meadow schema field definition.
|
|
368
369
|
*/
|
|
369
|
-
getFieldFilterClauses(pSchemaField, pColumn)
|
|
370
|
+
getFieldFilterClauses(pSchemaField, pColumn, pMeadowSchemaField)
|
|
370
371
|
{
|
|
371
372
|
/** @type {Record<string, any>} */
|
|
372
373
|
let tmpRangeClause;
|
|
373
374
|
let tmpFieldFilterClauses = this.options.FieldFilterClauses?.[pSchemaField];
|
|
374
375
|
if (!Array.isArray(tmpFieldFilterClauses))
|
|
375
376
|
{
|
|
377
|
+
let tmpFieldType = pColumn.type;
|
|
378
|
+
if (pMeadowSchemaField && typeof pMeadowSchemaField.Type === 'string')
|
|
379
|
+
{
|
|
380
|
+
tmpFieldType = pMeadowSchemaField.Type.toLowerCase();
|
|
381
|
+
}
|
|
376
382
|
tmpFieldFilterClauses = [];
|
|
377
383
|
const tmpFieldHumanName = this._getHumanReadableFieldName(pSchemaField);
|
|
378
|
-
switch (
|
|
384
|
+
switch (tmpFieldType)
|
|
379
385
|
{
|
|
380
386
|
case 'string':
|
|
387
|
+
case 'autoguid':
|
|
381
388
|
tmpFieldFilterClauses.push({ FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Match_Exact`, DisplayName: `${tmpFieldHumanName} Exact Match`, Type: 'StringMatch', FilterByColumn: pSchemaField, ExactMatch: true, Ordinal: tmpFieldFilterClauses.length + 1 });
|
|
382
389
|
tmpFieldFilterClauses.push({ FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Match_Fuzzy`, DisplayName: `${tmpFieldHumanName} Partial Match`, Type: 'StringMatch', FilterByColumn: pSchemaField, ExactMatch: false , Ordinal: tmpFieldFilterClauses.length + 1 });
|
|
383
390
|
tmpRangeClause = { FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Range`, DisplayName: `${tmpFieldHumanName} in Range`, Type: 'StringRange', FilterByColumn: pSchemaField , Ordinal: tmpFieldFilterClauses.length + 1 };
|
|
@@ -387,6 +394,8 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
387
394
|
break;
|
|
388
395
|
case 'date':
|
|
389
396
|
case 'datetime':
|
|
397
|
+
case 'createdate':
|
|
398
|
+
case 'updatedate':
|
|
390
399
|
tmpFieldFilterClauses.push({ FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Match_Exact`, DisplayName: `${tmpFieldHumanName} Exact Match`, Type: 'DateMatch', FilterByColumn: pSchemaField, ExactMatch: true , Ordinal: tmpFieldFilterClauses.length + 1 });
|
|
391
400
|
tmpFieldFilterClauses.push({ FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Match_Fuzzy`, DisplayName: `${tmpFieldHumanName} Partial Match`, Type: 'DateMatch', FilterByColumn: pSchemaField, ExactMatch: false , Ordinal: tmpFieldFilterClauses.length + 1 });
|
|
392
401
|
tmpRangeClause = { FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Range`, DisplayName: `${tmpFieldHumanName} in Range`, Type: 'DateRange', FilterByColumn: pSchemaField , Ordinal: tmpFieldFilterClauses.length + 1 };
|
|
@@ -395,7 +404,13 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
395
404
|
tmpFieldFilterClauses.push(tmpRangeClause);
|
|
396
405
|
break;
|
|
397
406
|
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
|
|
407
|
+
case 'deleted':
|
|
398
408
|
case 'integer':
|
|
409
|
+
case 'decimal':
|
|
410
|
+
case 'autoidentity':
|
|
411
|
+
case 'createiduser':
|
|
412
|
+
case 'updateiduser':
|
|
413
|
+
case 'deleteiduser':
|
|
399
414
|
tmpFieldFilterClauses.push({ FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Match_Exact`, DisplayName: `${tmpFieldHumanName} Exact Match`, Type: 'NumericMatch', FilterByColumn: pSchemaField, ExactMatch: true , Ordinal: tmpFieldFilterClauses.length + 1 });
|
|
400
415
|
tmpFieldFilterClauses.push({ FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Match_Fuzzy`, DisplayName: `${tmpFieldHumanName} Partial Match`, Type: 'NumericMatch', FilterByColumn: pSchemaField, ExactMatch: false , Ordinal: tmpFieldFilterClauses.length + 1 });
|
|
401
416
|
tmpRangeClause = { FilterKey: pSchemaField, ClauseKey: `${pSchemaField}_Range`, DisplayName: `${tmpFieldHumanName} in Range`, Type: 'NumericRange', FilterByColumn: pSchemaField , Ordinal: tmpFieldFilterClauses.length + 1 };
|
|
@@ -598,6 +613,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
598
613
|
}
|
|
599
614
|
++tmpOrdinal;
|
|
600
615
|
const tmpColumn = tmpProperties[tmpSchemaField];
|
|
616
|
+
const tmpMeadowSchemaField = tmpSchema.MeadowSchema?.Schema?.find?.((f) => f.Column === tmpSchemaField);
|
|
601
617
|
let tmpFieldFilterSchema = this._FilterSchema[tmpSchemaField];
|
|
602
618
|
if (!tmpFieldFilterSchema)
|
|
603
619
|
{
|
|
@@ -631,7 +647,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
631
647
|
{
|
|
632
648
|
tmpFieldFilterSchema.AvailableClauses = [];
|
|
633
649
|
}
|
|
634
|
-
const tmpFieldFilterClauses = this.getFieldFilterClauses(tmpSchemaField, tmpColumn);
|
|
650
|
+
const tmpFieldFilterClauses = this.getFieldFilterClauses(tmpSchemaField, tmpColumn, tmpMeadowSchemaField);
|
|
635
651
|
if (Array.isArray(tmpFieldFilterClauses) && tmpFieldFilterClauses.length > 0)
|
|
636
652
|
{
|
|
637
653
|
for (const tmpFilterClause of tmpFieldFilterClauses)
|
|
@@ -126,8 +126,9 @@ declare class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
126
126
|
/**
|
|
127
127
|
* @param {string} pSchemaField - The schema field name.
|
|
128
128
|
* @param {Record<string, any>} pColumn - The full column definition from the schema.
|
|
129
|
+
* @param {Record<string, any>} [pMeadowSchemaField] - The meadow schema field definition.
|
|
129
130
|
*/
|
|
130
|
-
getFieldFilterClauses(pSchemaField: string, pColumn: Record<string, any>): any;
|
|
131
|
+
getFieldFilterClauses(pSchemaField: string, pColumn: Record<string, any>, pMeadowSchemaField?: Record<string, any>): any;
|
|
131
132
|
/**
|
|
132
133
|
* @param {(error?: Error) => void} fCallback - The callback function.
|
|
133
134
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecordSet-RecordProvider-MeadowEndpoints.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js"],"names":[],"mappings":";AAGA;;;GAGG;AAEH;;;GAGG;AACH;IAcE;;;;;;;;;aASS;IACT,MAVW,OAAO,MAAM,CAAC,GAAG;QACpB,GAAG,EAAE,GAAG,CAAC;QACT,QAAQ,EACf;YACI,oBAAoB,EAAE,YAAY,CAAC;;;;;;aAAsC,CAAC,CAAC;YAC/E,CAAK,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;SACnB,CAAC;QACE,6CAA6C,EAAE,CAAC,IAAI,QAAQ,KAAK,GAAG,CAAC;QACrE,oBAAoB,EAAE,YAAY,CAAC;;;;;;SAAsC,CAAC,CAAA;KAC7E,CACI;IACT;aAVa,GAAG;kBAEf;YACI,oBAAoB,EAAE,YAAY,CAAC;;;;;;aAAsC,CAAC,CAAC;YAC/E,CAAK,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;SACnB;uDACkD,CAAC,IAAI,QAAQ,KAAK,GAAG;8BAC9C,YAAY,CAAC;;;;;;SAAsC,CAAC;MAG5D;IAMtB,kCAAkC;IAClC,SADW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAClB;IACZ,kDAAkD;IAClD,cADW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CACvB;IACvB,kDAAkD;IAClD,iBADW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CACpB;IAG3B,0EAA0E;IAC1E,sBADa,OAAO,iDAAiD,CAAC,CAerE;IAVC,wEAAwE;IAExE,iBAFW,OAAO,iDAAiD,CAAC,CAE4B;IAUlG;;OAEG;IACH,0BAFY,KAAK,CAAC,MAAM,CAAC,CASxB;IAED;;;;OAIG;IACH,qBAFW,MAAM,GAAC,MAAM,gBA4BvB;IAED;;;;OAIG;IACH,uBAFW,MAAM,GAAC,MAAM,gBA2BvB;IAED,iGAiBC;IA+CD;;;;OAIG;IACH,4BAFW,eAAe,gBA0BzB;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAsB7B;IAED;;;;OAIG;IACH,sBAFW,MAAM,GAAC,MAAM,gBAKvB;IAaD;;;;OAIG;IACH,qBAFW,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,gBAK7B;IAcD
|
|
1
|
+
{"version":3,"file":"RecordSet-RecordProvider-MeadowEndpoints.d.ts","sourceRoot":"","sources":["../../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js"],"names":[],"mappings":";AAGA;;;GAGG;AAEH;;;GAGG;AACH;IAcE;;;;;;;;;aASS;IACT,MAVW,OAAO,MAAM,CAAC,GAAG;QAC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