From 7cea1d056ea6549f689fba50ee9d5da01b34e1d4 Mon Sep 17 00:00:00 2001 From: Thierry Normand Date: Tue, 5 Mar 2024 14:46:16 -0500 Subject: [PATCH 1/2] Added a fix for the '*' in the filter --- .../ogc-filter-form/ogc-filter-form.component.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts b/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts index ded0764fab..92d027c3ab 100644 --- a/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts @@ -148,8 +148,8 @@ export class OgcFilterFormComponent implements OnInit { value && value.length > 0 ? of(this._filterValues(value)) : this.selectedField$.value - ? of(this.selectedField$.value.values) - : of([]); + ? of(this.selectedField$.value.values) + : of([]); if (value && value.length >= 1) { this.changeProperty(value, pos); } @@ -168,6 +168,9 @@ export class OgcFilterFormComponent implements OnInit { } private _filterValues(value: string): string[] { + if (value.includes('*')) { + value = value.replaceAll('*', '\\*'); + } const keywordRegex = new RegExp( value .toString() @@ -343,14 +346,14 @@ export class OgcFilterFormComponent implements OnInit { return pos && pos === 1 ? 'lowerBoundary' : pos && pos === 2 - ? 'upperBoundary' - : undefined; + ? 'upperBoundary' + : undefined; case OgcFilterOperator.During: return pos && pos === 1 ? 'begin' : pos && pos === 2 - ? 'end' - : undefined; + ? 'end' + : undefined; default: return; } From 99e8ac6d34c8f863728bcbc0af13d15c7f860f22 Mon Sep 17 00:00:00 2001 From: Thierry Normand Date: Fri, 8 Mar 2024 13:52:48 -0500 Subject: [PATCH 2/2] Resolved issue with special characters in advanced filter options 'AS' --- .../lib/filter/ogc-filter-form/ogc-filter-form.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts b/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts index 92d027c3ab..7593b09a9d 100644 --- a/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts +++ b/packages/geo/src/lib/filter/ogc-filter-form/ogc-filter-form.component.ts @@ -168,11 +168,9 @@ export class OgcFilterFormComponent implements OnInit { } private _filterValues(value: string): string[] { - if (value.includes('*')) { - value = value.replaceAll('*', '\\*'); - } const keywordRegex = new RegExp( value + .replace(/[.*+?^${}()|[\]\\]/g, '') .toString() .normalize('NFD') .replace(/[\u0300-\u036f]/g, ''),