dp-widgets-framework 1.5.6 → 1.5.7

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/dist/index.esm.js CHANGED
@@ -39494,14 +39494,12 @@ function FiltersContent({ filterGroups, showHeader, onFilterChange, widget, appe
39494
39494
  }, className: "py-1.5 text-sm font-medium text-primary-600 hover:text-primary-800 hover:bg-primary-50 rounded-md transition-colors px-2", children: "Clear All Filters" })) : (jsxRuntimeExports.jsx("div", {})), jsxRuntimeExports.jsx(Button, { onClick: () => {
39495
39495
  // Convert option IDs back to original label values
39496
39496
  const filtersWithLabels = {};
39497
- Object.entries(selectedFilters).forEach(([groupId, optionIds]) => {
39498
- const group = filterGroups.find(g => g.id === groupId);
39499
- if (group) {
39500
- filtersWithLabels[groupId] = optionIds.map(optionId => {
39501
- const option = group.options.find(opt => opt.id === optionId);
39502
- return (option === null || option === void 0 ? void 0 : option.label) || optionId;
39503
- });
39504
- }
39497
+ filterGroups.forEach((group) => {
39498
+ const optionIds = selectedFilters[group.id] || [];
39499
+ filtersWithLabels[group.id] = optionIds.map(optionId => {
39500
+ const option = group.options.find(opt => opt.id === optionId);
39501
+ return (option === null || option === void 0 ? void 0 : option.label) || optionId;
39502
+ });
39505
39503
  });
39506
39504
  onApplyFilters === null || onApplyFilters === void 0 ? void 0 : onApplyFilters(filtersWithLabels);
39507
39505
  }, disabled: isEditing, className: `${isEditing ? 'bg-gray-400 cursor-not-allowed' : 'bg-primary-600 hover:bg-primary-700'} text-white`, title: isEditing ? 'Save the layout first to apply filters' : '', children: "Apply Filters" })] }) })] }));
package/dist/index.js CHANGED
@@ -39521,14 +39521,12 @@ function FiltersContent({ filterGroups, showHeader, onFilterChange, widget, appe
39521
39521
  }, className: "py-1.5 text-sm font-medium text-primary-600 hover:text-primary-800 hover:bg-primary-50 rounded-md transition-colors px-2", children: "Clear All Filters" })) : (jsxRuntimeExports.jsx("div", {})), jsxRuntimeExports.jsx(Button, { onClick: () => {
39522
39522
  // Convert option IDs back to original label values
39523
39523
  const filtersWithLabels = {};
39524
- Object.entries(selectedFilters).forEach(([groupId, optionIds]) => {
39525
- const group = filterGroups.find(g => g.id === groupId);
39526
- if (group) {
39527
- filtersWithLabels[groupId] = optionIds.map(optionId => {
39528
- const option = group.options.find(opt => opt.id === optionId);
39529
- return (option === null || option === void 0 ? void 0 : option.label) || optionId;
39530
- });
39531
- }
39524
+ filterGroups.forEach((group) => {
39525
+ const optionIds = selectedFilters[group.id] || [];
39526
+ filtersWithLabels[group.id] = optionIds.map(optionId => {
39527
+ const option = group.options.find(opt => opt.id === optionId);
39528
+ return (option === null || option === void 0 ? void 0 : option.label) || optionId;
39529
+ });
39532
39530
  });
39533
39531
  onApplyFilters === null || onApplyFilters === void 0 ? void 0 : onApplyFilters(filtersWithLabels);
39534
39532
  }, disabled: isEditing, className: `${isEditing ? 'bg-gray-400 cursor-not-allowed' : 'bg-primary-600 hover:bg-primary-700'} text-white`, title: isEditing ? 'Save the layout first to apply filters' : '', children: "Apply Filters" })] }) })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dp-widgets-framework",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"