inviton-powerduck 0.0.217 → 0.0.219
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/common/css/ladda-themeless-zoomin.min.css +89 -89
- package/components/chart-js/thirdparty/flot/jquery.flot.categories.min.js +93 -93
- package/components/chart-js/thirdparty/flot/jquery.flot.crosshair.min.js +83 -83
- package/components/chart-js/thirdparty/flot/jquery.flot.navigate.min.js +270 -270
- package/components/chart-js/thirdparty/flot/jquery.flot.pie.min.js +507 -507
- package/components/chart-js/thirdparty/flot/jquery.flot.stack.min.js +104 -104
- package/components/counter/testall.tsx +136 -11
- package/components/dropdown/css/smart-dropdown.scss +422 -0
- package/components/dropdown/smart-dropdown.tsx +739 -0
- package/components/dropdown/ts/select2-multi-checkboxes.ts +29 -5
- package/components/image-crop/vendor/jquery.Jcrop.min.css +344 -344
- package/components/svg/skilift-svg.tsx +6 -6
- package/package.json +1 -1
|
@@ -109,7 +109,8 @@ import { PortalUtils } from '../../../common/utils/utils';
|
|
|
109
109
|
return stripDiacritics(text).toUpperCase();
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
let data = self.currentData || [];
|
|
112
|
+
let data = self.currentData || [] ;
|
|
113
|
+
|
|
113
114
|
const searchTerm = normalizeForSearch(params.data?.term?.trim());
|
|
114
115
|
|
|
115
116
|
if (searchTerm == null || searchTerm.trim() == '') {
|
|
@@ -117,10 +118,33 @@ import { PortalUtils } from '../../../common/utils/utils';
|
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
const filterItems = (items: any[], searchTerm: string): any[] => {
|
|
122
|
+
return items
|
|
123
|
+
.map(item => {
|
|
124
|
+
const itemText = normalizeForSearch(item.text);
|
|
125
|
+
|
|
126
|
+
// If item has children, filter them recursively
|
|
127
|
+
if (item.children && item.children.length > 0) {
|
|
128
|
+
const filteredChildren = filterItems(item.children, searchTerm);
|
|
129
|
+
|
|
130
|
+
// Keep parent if it matches OR if any child matches
|
|
131
|
+
if (itemText.includes(searchTerm) || filteredChildren.length > 0) {
|
|
132
|
+
return {
|
|
133
|
+
...item,
|
|
134
|
+
children: filteredChildren
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
return null;
|
|
138
|
+
} else {
|
|
139
|
+
// Leaf node: keep if it matches
|
|
140
|
+
return itemText.includes(searchTerm) ? item : null;
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
.filter(Boolean); // remove nulls
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
const filteredData = filterItems(data, searchTerm);
|
|
124
148
|
|
|
125
149
|
success({ results: filteredData || [] });
|
|
126
150
|
// success({ results: data || [] });
|