ets-fe-ng-sdk 20.3.17 → 20.3.19

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.
@@ -6762,19 +6762,34 @@ class FilterFormArrayGroupPipe {
6762
6762
  * @param exactMatch Whether to require exact matches
6763
6763
  * @returns Filter function for FormGroups
6764
6764
  */
6765
- this.filterFunc = (queryObject, exactMatch) => (group) => {
6765
+ this.filterFunc = (_queryObject, exactMatch) => (group) => {
6766
+ const queryObject = _queryObject.filter((x) => x.value != null);
6767
+ if (!queryObject || queryObject.length === 0)
6768
+ return true;
6766
6769
  const formGroupValue = group.getRawValue();
6767
6770
  // console.log('formGroupValue', formGroupValue);
6768
- for (const key of queryObject || [])
6769
- if ((key.type == 'string' &&
6770
- (exactMatch
6771
- ? formGroupValue[key.key]?.toLowerCase() == key.value
6772
- : formGroupValue[key.key]
6773
- ?.toLowerCase()
6774
- ?.includes(key.value))) ||
6775
- formGroupValue[key.key] == key.value)
6776
- return true;
6777
- return false;
6771
+ // All conditions must match (AND logic)
6772
+ for (const key of queryObject) {
6773
+ const formValue = formGroupValue[key.key];
6774
+ if (key.type === 'string') {
6775
+ const formValueStr = formValue?.toLowerCase() || '';
6776
+ const keyValueStr = key.value?.toLowerCase() || '';
6777
+ if (exactMatch) {
6778
+ if (formValueStr !== keyValueStr)
6779
+ return false;
6780
+ }
6781
+ else {
6782
+ if (!formValueStr.includes(keyValueStr))
6783
+ return false;
6784
+ }
6785
+ }
6786
+ else {
6787
+ // For non-string types, use strict equality
6788
+ if (formValue !== key.value)
6789
+ return false;
6790
+ }
6791
+ }
6792
+ return true;
6778
6793
  };
6779
6794
  }
6780
6795
  /**
@@ -20898,7 +20913,7 @@ class TableInputComponent extends FormGeneratorComponent {
20898
20913
  /** Whether to use partial matching for filters */
20899
20914
  this.filterLikeMatch = input(...(ngDevMode ? [undefined, { debugName: "filterLikeMatch" }] : []));
20900
20915
  /** Whether to use exact matching for filters (inverse of filterLikeMatch) */
20901
- this.filterExactMatch = computed(() => (this.filterLikeMatch() ? false : true), ...(ngDevMode ? [{ debugName: "filterExactMatch" }] : []));
20916
+ this.filterExactMatch = computed(() => !this.filterLikeMatch(), ...(ngDevMode ? [{ debugName: "filterExactMatch" }] : []));
20902
20917
  /** Whether to show the table */
20903
20918
  this.isShow = input(...(ngDevMode ? [undefined, { debugName: "isShow" }] : []));
20904
20919
  /** The number of items to display per page */