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.
- package/fesm2022/ets-fe-ng-sdk.mjs +27 -12
- package/fesm2022/ets-fe-ng-sdk.mjs.map +1 -1
- package/index.d.ts +7 -7
- package/package.json +1 -1
|
@@ -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 = (
|
|
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
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
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(() =>
|
|
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 */
|