@m4l/components 9.2.49 → 9.2.50-beta.2

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.
Files changed (164) hide show
  1. package/@types/types.d.ts +8 -1
  2. package/components/Chip/ChipStyles.js +1 -1
  3. package/components/DataGrid/contexts/DataGridContext/index.js +1 -1
  4. package/components/DataGrid/contexts/FilterContext/index.js +1 -1
  5. package/components/DataGrid/dictionary.js +0 -3
  6. package/components/DataGrid/formatters/ColumnChipStatusFormatter/formatter.js +4 -3
  7. package/components/DataGrid/formatters/ColumnNestedValueFormatter/formatter.js +2 -1
  8. package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.d.ts +1 -1
  9. package/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js +4 -3
  10. package/components/DataGrid/slots/DataGridEnum.js +2 -2
  11. package/components/DataGrid/slots/DataGridSlot.js +1 -1
  12. package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
  13. package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.js +1 -1
  14. package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.js +2 -2
  15. package/components/DragResizeWindowRND/DragResizeWindowRND.js +0 -1
  16. package/components/DynamicFilter/DynamicFilter.styles.js +0 -1
  17. package/components/DynamicFilter/constants.d.ts +5 -2
  18. package/components/DynamicFilter/constants.js +9 -3
  19. package/components/DynamicFilter/dictionary.d.ts +40 -38
  20. package/components/DynamicFilter/dictionary.js +33 -39
  21. package/components/DynamicFilter/helpers/formatToInitialFilters.d.ts +3 -1
  22. package/components/DynamicFilter/helpers/formatToInitialFilters.js +30 -20
  23. package/components/DynamicFilter/helpers/formatToRowFilter.js +15 -6
  24. package/components/DynamicFilter/helpers/getPurgedInitialFiltersApplied.js +1 -1
  25. package/components/DynamicFilter/store/DynamicFilterContext.js +1 -1
  26. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.d.ts +1 -1
  27. package/components/DynamicFilter/subcomponents/AppliedFilterChip/AppliedFilterChip.js +4 -3
  28. package/components/DynamicFilter/subcomponents/AppliedFilters/useAppliedFilters.js +10 -3
  29. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
  30. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/helpers.js +7 -7
  31. package/components/DynamicFilter/subcomponents/FieldTypes/BooleanFilter/index.js +11 -8
  32. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +7 -7
  33. package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/index.js +10 -7
  34. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/helpers.js +17 -9
  35. package/components/DynamicFilter/subcomponents/FieldTypes/NumberFilter/index.js +13 -9
  36. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.d.ts +7 -7
  37. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/helpers.js +121 -46
  38. package/components/DynamicFilter/subcomponents/FieldTypes/SelectAsyncFilter/index.js +13 -11
  39. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.d.ts +8 -7
  40. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/helpers.js +127 -46
  41. package/components/DynamicFilter/subcomponents/FieldTypes/SelectFilter/index.js +11 -9
  42. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/helpers.js +11 -7
  43. package/components/DynamicFilter/subcomponents/FieldTypes/StringFilter/index.js +10 -7
  44. package/components/DynamicFilter/subcomponents/FieldTypes/fieldFactory.d.ts +1 -1
  45. package/components/DynamicFilter/subcomponents/FilterActions/FilterActions.js +2 -1
  46. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.d.ts +1 -1
  47. package/components/DynamicFilter/subcomponents/FilterActions/useFilterActions.js +2 -4
  48. package/components/DynamicFilter/subcomponents/InputFilter/useInputFilter.js +2 -2
  49. package/components/DynamicFilter/subcomponents/PopoverMenuFields/PopoverMenuFields.js +28 -14
  50. package/components/DynamicFilter/types.d.ts +60 -18
  51. package/components/DynamicSort/dictionary.d.ts +1 -0
  52. package/components/DynamicSort/dictionary.js +1 -5
  53. package/components/DynamicSort/slots/DynamicSortSlots.js +1 -1
  54. package/components/DynamicSort/store/DynamicSortContext.js +1 -1
  55. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +1 -1
  56. package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +28 -14
  57. package/components/GridLayout/GridLayout.js +1 -1
  58. package/components/GridLayout/styles.js +1 -1
  59. package/components/GridLayout/subcomponents/GridItem/index.js +1 -1
  60. package/components/GridLayout/subcomponents/Responsive/helper.js +1 -1
  61. package/components/GridLayout/subcomponents/Responsive/index.js +1 -1
  62. package/components/GridLayout/subcomponents/Responsive/responsiveUtils.js +3 -3
  63. package/components/GridLayout/subcomponents/withSizeProvider/index.js +1 -1
  64. package/components/Icon/Icon.js +1 -1
  65. package/components/Icon/constants.js +2 -2
  66. package/components/Icon/slots/IconSlots.js +1 -1
  67. package/components/Image/Image.js +1 -1
  68. package/components/Image/constant.js +2 -2
  69. package/components/Image/slots/ImageSlots.js +1 -1
  70. package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
  71. package/components/LanguagePopover/LanguagePopover.js +1 -1
  72. package/components/LoadingError/LoadingError.js +1 -1
  73. package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
  74. package/components/MFIsolationApp/MFIsolationApp.js +2 -2
  75. package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.js +1 -1
  76. package/components/NoItemSelected/NoItemSelected.js +1 -1
  77. package/components/NumberInput/hooks/useNumberInput/NumberInputReducer.js +1 -1
  78. package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +5 -3
  79. package/components/ObjectLogs/dictionary.js +1 -1
  80. package/components/Pager/Pager.styles.js +0 -8
  81. package/components/Pager/dicctionary.js +0 -5
  82. package/components/PrintingSystem/subcomponents/ChartNode/index.js +1 -1
  83. package/components/PropertyValue/PropertyValue.js +3 -3
  84. package/components/PropertyValue/PropertyValue.styles.js +4 -2
  85. package/components/PropertyValue/index.d.ts +1 -0
  86. package/components/PropertyValue/types.d.ts +0 -2
  87. package/components/ScrollBar/ScrollBar.js +1 -1
  88. package/components/SideBar/slots/SideBarEnum.js +4 -4
  89. package/components/SideBar/slots/SideBarSlots.js +1 -1
  90. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +1 -1
  91. package/components/ToastContainer/ToastContainer.js +1 -1
  92. package/components/WindowBase/slots/WindowBaseSlots.js +1 -1
  93. package/components/animate/variants/bounce.js +1 -1
  94. package/components/animate/variants/fade.js +1 -1
  95. package/components/animate/variants/transition.js +2 -2
  96. package/components/areas/components/AreasAdmin/AreasAdmin.js +1 -1
  97. package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
  98. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +1 -1
  99. package/components/areas/contexts/AreasContext/helpers/helper.js +14 -14
  100. package/components/areas/contexts/AreasContext/store.js +5 -5
  101. package/components/areas/icons.js +0 -8
  102. package/components/commercial/HamburgerMenu/classes/index.js +1 -1
  103. package/components/extended/React-Splitter-Layout/slots/SplitLayoutSlots.d.ts +9 -3
  104. package/components/extended/React-resizable-panels/SplitLayout.js +25 -5
  105. package/components/extended/React-resizable-panels/SplitLayout.styles.js +20 -6
  106. package/components/extended/React-resizable-panels/slots/SplitLayoutSlots.d.ts +12 -4
  107. package/components/extended/React-resizable-panels/types.d.ts +7 -0
  108. package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
  109. package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +3 -3
  110. package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
  111. package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.js +2 -2
  112. package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.js +1 -1
  113. package/components/hook-form/RHFNumberInput/index.d.ts +1 -0
  114. package/components/hook-form/RHFNumberInput/index.js +1 -0
  115. package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
  116. package/components/hook-form/RHFTextField/RHFTextField.styles.js +1 -3
  117. package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.js +1 -1
  118. package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +1 -1
  119. package/components/hook-form/RHFormContext/classes/index.js +1 -1
  120. package/components/hook-form/RHFormContext/index.js +1 -1
  121. package/components/hook-form/index.d.ts +1 -1
  122. package/components/index.d.ts +1 -1
  123. package/components/mui_extended/Accordion/Accordion.js +1 -1
  124. package/components/mui_extended/Accordion/slots/AccordionSlots.js +2 -2
  125. package/components/mui_extended/Accordion/styles.js +1 -0
  126. package/components/mui_extended/Autocomplete/Autocomplete.js +25 -12
  127. package/components/mui_extended/Autocomplete/Autocomplete.styles.js +1 -1
  128. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +3 -3
  129. package/components/mui_extended/CheckBox/CheckBox.js +1 -1
  130. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.js +2 -2
  131. package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.js +1 -1
  132. package/components/mui_extended/IconButton/slots/IconButtonSlots.js +1 -1
  133. package/components/mui_extended/ImageButton/utils/Clases/index.js +1 -1
  134. package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
  135. package/components/mui_extended/NavLink/NavLink.js +1 -1
  136. package/components/mui_extended/NavLink/constants.js +2 -2
  137. package/components/mui_extended/NavLink/slots/NavLinkSlots.js +1 -1
  138. package/components/mui_extended/Popover/Popover.js +1 -1
  139. package/components/mui_extended/Popover/Popover.styles.js +1 -5
  140. package/components/mui_extended/Popover/constants.js +2 -2
  141. package/components/mui_extended/Select/Select.js +1 -1
  142. package/components/mui_extended/Select/Select.styles.js +1 -1
  143. package/components/mui_extended/Select/constants.js +1 -1
  144. package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
  145. package/components/mui_extended/Tab/Tab.js +1 -1
  146. package/components/mui_extended/TabContent/TabContent.styles.js +2 -1
  147. package/components/mui_extended/TextField/constants.js +1 -1
  148. package/components/mui_extended/Tooltip/Tooltip.js +2 -2
  149. package/components/mui_extended/Tooltip/slots/TooltipSlots.js +2 -2
  150. package/components/mui_extended/Typography/Typography.js +1 -1
  151. package/components/mui_extended/Typography/constants.js +3 -3
  152. package/components/mui_extended/Typography/slots/typographySlots.js +1 -1
  153. package/components/popups/components/PopupsViewer/icons.js +0 -1
  154. package/hooks/useDataGridPersistence/constants.js +2 -2
  155. package/hooks/useDataGridPersistence/useDataGridPersistence.js +1 -1
  156. package/hooks/useDynamicFilterAndSort/styles.js +2 -0
  157. package/hooks/useDynamicFilterAndSort/types.d.ts +1 -0
  158. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +56 -12
  159. package/hooks/useSvgColor/constants.js +2 -2
  160. package/hooks/useSvgColor/helpers.js +1 -1
  161. package/hooks/useSvgColor/useSvgColor.js +1 -1
  162. package/index.js +109 -109
  163. package/package.json +3 -3
  164. package/components/PropertyValue/styles.d.ts +0 -1
package/@types/types.d.ts CHANGED
@@ -145,7 +145,7 @@ import { RHFUploadSingleFileOwnerState, RHFUploadSingleFileSlotsType } from '../
145
145
  import { ChipStatusFormatterSlotsType } from '../components/formatters/ChipStatusFormatter/types';
146
146
  import { RHFUploadImageOwnerState, RHFUploadImageSlotsType } from '../components/hook-form/RHFUpload/RHFUploadImage/types';
147
147
  import { PrintingSystemOwnerState, PrintingSystemSlotsType } from '../components/PrintingSystem/types';
148
-
148
+ import { SplitLayoutOwnerState } from '../components/extended/React-resizable-panels/types';
149
149
  declare module '@mui/material/styles' {
150
150
  // Define the slots in the theme
151
151
  interface ComponentNameToClassKey {
@@ -222,6 +222,7 @@ declare module '@mui/material/styles' {
222
222
  M4LChipStatusFormatter: ChipStatusFormatterSlotsType;
223
223
  M4LRHFUploadImage: RHFUploadImageSlotsType;
224
224
  M4LPrintingSystem: PrintingSystemSlotsType;
225
+ M4LSplitLayout: SplitLayoutOwnerState;
225
226
  }
226
227
  interface ComponentsPropsList {
227
228
  // Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
@@ -298,6 +299,7 @@ declare module '@mui/material/styles' {
298
299
  M4LChipStatusFormatter: Partial<ChipStatusFormatterOwnerState>;
299
300
  M4LRHFUploadImage: Partial<RHFUploadImageOwnerState>;
300
301
  M4LPrintingSystem: Partial<PrintingSystemOwnerState>;
302
+ M4LSplitLayout: Partial<SplitLayoutOwnerState>;
301
303
  }
302
304
  interface Components {
303
305
  M4LDynamicFilter?: {
@@ -675,5 +677,10 @@ declare module '@mui/material/styles' {
675
677
  styleOverrides?: ComponentsOverrides<Theme>['M4LPrintingSystem'];
676
678
  variants?: ComponentsVariants['M4LPrintingSystem'];
677
679
  };
680
+ M4LSplitLayout?: {
681
+ defaultProps?: ComponentsPropsList['M4LSplitLayout'];
682
+ styleOverrides?: ComponentsOverrides<Theme>['M4LSplitLayout'];
683
+ variants?: ComponentsVariants['M4LSplitLayout'];
684
+ };
678
685
  }
679
686
  }
@@ -1,5 +1,5 @@
1
1
  import { g as getSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
2
- import { lighten, darken } from "@mui/material/styles";
2
+ import { darken, lighten } from "@mui/material/styles";
3
3
  const getExternalColor = (externalColor) => {
4
4
  try {
5
5
  return {
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { createContext, useState, useMemo, useEffect, useCallback } from "react";
2
+ import { useState, useMemo, useEffect, useCallback, createContext } from "react";
3
3
  import { c as castMapColumnsWidthToRecord } from "../../helpers/castMapColumnsWidthToRecord.js";
4
4
  import { useFirstRender } from "@m4l/graphics";
5
5
  const DataGridContext = createContext(null);
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { createContext, useState } from "react";
2
+ import { useState, createContext } from "react";
3
3
  import { voidFunction } from "@m4l/core";
4
4
  const initialState = {
5
5
  activeFilters: false,
@@ -5,9 +5,6 @@ function getDataGridComponentsDictionary() {
5
5
  return ["data_grid"].concat(getPagerComponentsDictionary()).concat(getMenuActionsComponentsDictionary()).concat(getModalDictionary());
6
6
  }
7
7
  const dictionary = {
8
- LABEL_ACTIONS: "actions",
9
- LABEL_ROWS_PER_PAGE: "pager.rows_per_page",
10
- LABEL_OF: "pager.of",
11
8
  DENSITY_COMPACT: `${getDataGridComponentsDictionary()[0]}.density_compact`,
12
9
  DENSITY_STANDARD: `${getDataGridComponentsDictionary()[0]}.density_standard`,
13
10
  DENSITY_CONFORTABLE: `${getDataGridComponentsDictionary()[0]}.density_confortable`,
@@ -2,12 +2,13 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
3
  import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
4
4
  import { C as ChipStatusFormatterColumnWrapperStyled } from "../../../formatters/ChipStatusFormatter/slots/ChipStatusFormatterSlots.js";
5
+ import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
5
6
  import { C as ChipStatusFormatter } from "../../../formatters/ChipStatusFormatter/ChipStatusFormatter.js";
6
7
  const ColumnChipStatusFormatter = (props) => {
7
- const { fieldStatus: uriStatus, fieldLabel: uriLabel, statusesColors, fallbackColor } = props;
8
+ const { fieldStatus, fieldLabel, statusesColors, fallbackColor } = props;
8
9
  return (obProps) => {
9
- const label = typeof uriLabel === "string" ? getPropertyByString(obProps, getFieldValueWithRow(uriStatus.toString())) : uriLabel(obProps, uriStatus);
10
- const status = getPropertyByString(obProps, getFieldValueWithRow(uriStatus.toString()));
10
+ const status = getNullGuard(getPropertyByString(obProps, getFieldValueWithRow(fieldStatus.toString())));
11
+ const label = typeof fieldLabel === "string" ? getNullGuard(getPropertyByString(obProps, getFieldValueWithRow(fieldLabel))) : fieldLabel(obProps.row, status);
11
12
  return /* @__PURE__ */ jsx(
12
13
  ChipStatusFormatter,
13
14
  {
@@ -2,10 +2,11 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { getPropertyByString } from "@m4l/core";
3
3
  import React from "react";
4
4
  import { g as getFieldValueWithRow } from "../../../../helpers/getFieldValueWithRow.js";
5
+ import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
5
6
  function ColumnNestedValueFormatter(props) {
6
7
  const { fieldValue, Component = React.Fragment } = props;
7
8
  return (obProps) => {
8
- const property = getPropertyByString(obProps, getFieldValueWithRow(fieldValue));
9
+ const property = getNullGuard(getPropertyByString(obProps, getFieldValueWithRow(fieldValue)));
9
10
  const value = typeof property === "object" ? JSON.stringify(property) : property;
10
11
  return /* @__PURE__ */ jsx(Component, { children: value });
11
12
  };
@@ -5,6 +5,6 @@ import { ColumnNestedValueFormatterProps } from './types';
5
5
  */
6
6
  export declare const useColumnNestedValue: <TRow>(props: ColumnNestedValueFormatterProps<TRow>) => {
7
7
  formatter: (obProps: any) => import("react/jsx-runtime").JSX.Element;
8
- customFilter: (row: TRow, value: string) => boolean;
8
+ customFilter: (row: TRow, value: string) => any;
9
9
  customSort: (a: TRow, b: TRow) => 0 | 1 | -1;
10
10
  };
@@ -2,10 +2,11 @@ import { getPropertyByString } from "@m4l/core";
2
2
  import { useState, useRef, useEffect, useMemo } from "react";
3
3
  import { deepEqual } from "fast-equals";
4
4
  import { g as getColumnKey } from "../../helpers/getColumnKey.js";
5
+ import { g as getNullGuard } from "../../../../utils/getNullGuard.js";
5
6
  import { C as ColumnNestedValueFormatter } from "./formatter.js";
6
7
  const getCustomNestedValueFilter = (props) => {
7
8
  return (row, value) => {
8
- const property = getPropertyByString(row, props.fieldValue) ?? "";
9
+ const property = getNullGuard(getPropertyByString(row, props.fieldValue));
9
10
  if (typeof property === "object") {
10
11
  return Object.values(property).includes(value);
11
12
  }
@@ -15,8 +16,8 @@ const getCustomNestedValueFilter = (props) => {
15
16
  const getCustomNestedValueSort = (props) => {
16
17
  return (a, b) => {
17
18
  const keyWiouthRow = getColumnKey(props.fieldValue);
18
- const valueA = getPropertyByString(a, keyWiouthRow);
19
- const valueB = getPropertyByString(b, keyWiouthRow);
19
+ const valueA = getNullGuard(getPropertyByString(a, keyWiouthRow));
20
+ const valueB = getNullGuard(getPropertyByString(b, keyWiouthRow));
20
21
  if (typeof valueA === "object" || typeof valueB === "object" || valueA === void 0 || valueB === void 0) {
21
22
  return 0;
22
23
  }
@@ -40,6 +40,6 @@ export {
40
40
  ColumnsConfigSlots as C,
41
41
  DataGridSlots as D,
42
42
  RowsCountSlots as R,
43
- TableSlots as T,
44
- TextEditorSlots as a
43
+ TextEditorSlots as T,
44
+ TableSlots as a
45
45
  };
@@ -1,7 +1,7 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import { InputBase } from "@mui/material";
3
3
  import { D as DATAGRID_PREFIX_NAME } from "../constants.js";
4
- import { D as DataGridSlots, A as ActionsSlots, R as RowsCountSlots, C as ColumnsConfigSlots, T as TableSlots, a as TextEditorSlots } from "./DataGridEnum.js";
4
+ import { D as DataGridSlots, T as TextEditorSlots, A as ActionsSlots, a as TableSlots, R as RowsCountSlots, C as ColumnsConfigSlots } from "./DataGridEnum.js";
5
5
  import { d as dataGridStyles } from "../styles.js";
6
6
  const DataGridRootStyled = styled("div", {
7
7
  name: DATAGRID_PREFIX_NAME,
@@ -17,6 +17,7 @@ function getComparator(columns, sortColumn) {
17
17
  return column.customSort;
18
18
  }
19
19
  switch (typeOrder) {
20
+ //Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
20
21
  case "number":
21
22
  return (a, b) => {
22
23
  try {
@@ -25,6 +26,7 @@ function getComparator(columns, sortColumn) {
25
26
  return -1;
26
27
  }
27
28
  };
29
+ //Por defecto retorna una función de ordenamiento de string
28
30
  default:
29
31
  return (a, b) => {
30
32
  try {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { C as CheckboxIcon, a as CheckboxCheckedIcon, b as CheckboxIndeterminateIcon } from "./CustomIcons.js";
3
+ import { C as CheckboxIndeterminateIcon, a as CheckboxCheckedIcon, b as CheckboxIcon } from "./CustomIcons.js";
4
4
  import { Checkbox } from "@mui/material";
5
5
  const CheckboxFormatter = forwardRef(
6
6
  function CheckboxFormatter2({ onChange, checked, ...props }, _ref) {
@@ -10,7 +10,7 @@ function CheckboxIndeterminateIcon(props) {
10
10
  return /* @__PURE__ */ jsx(SvgIcon, { ...props, children: /* @__PURE__ */ jsx("path", { d: "M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.75 8h-6.5a.75.75 0 00-.75.75v.5c0 .414.336.75.75.75h6.5a.75.75 0 00.75-.75v-.5a.75.75 0 00-.75-.75z" }) });
11
11
  }
12
12
  export {
13
- CheckboxIcon as C,
13
+ CheckboxIndeterminateIcon as C,
14
14
  CheckboxCheckedIcon as a,
15
- CheckboxIndeterminateIcon as b
15
+ CheckboxIcon as b
16
16
  };
@@ -138,7 +138,6 @@ const DragResizeWindowRND = forwardRef((props, ref) => {
138
138
  minWindowWidth: minWidth,
139
139
  minWindowHeight: minHeight,
140
140
  wrapperRef,
141
- currentState,
142
141
  allowHeightResizeContainer,
143
142
  allowWidthResizeContainer
144
143
  });
@@ -80,7 +80,6 @@ const dynamicFilterStyles = {
80
80
  borderColor: "transparent",
81
81
  paddingLeft: theme.vars.size.baseSpacings.sp2,
82
82
  paddingRight: theme.vars.size.baseSpacings.sp2,
83
- width: "100%",
84
83
  height: "100%",
85
84
  "&::placeholder": {
86
85
  color: theme.vars.palette.text.secondary
@@ -1,9 +1,12 @@
1
- import { BooleanOperator, DateTimeOperator, FilterField, NumberOperator, SelectOperator, StringOperator } from './types';
1
+ import { BooleanOperator, DateTimeOperator, FilterField, NumberOperator, SelectOperator, SelectOperatorAsync, StringOperator } from './types';
2
2
  export declare const DYNAMIC_FILTER_KEY_COMPONENT = "M4LDynamicFilter";
3
3
  export declare const DYNAMIC_FILTER_SOTORE_ID = "M4LDynamicFilterStore";
4
4
  export declare const ALL_FIELD: FilterField;
5
5
  export declare const STRING_OPERATORS: Array<StringOperator>;
6
6
  export declare const NUMBER_OPERATORS: Array<NumberOperator>;
7
7
  export declare const BOOLEAN_OPERATORS: Array<BooleanOperator>;
8
- export declare const SELECT_OPERATORS: Array<SelectOperator>;
8
+ export declare const SELECT_OPERATORS_MULTIPLE: Array<SelectOperator>;
9
+ export declare const SELECT_OPERATORS_SINGLE: Array<SelectOperator>;
10
+ export declare const SELECT_ASYNC_OPERATORS_MULTIPLE: Array<SelectOperatorAsync>;
11
+ export declare const SELECT_ASYNC_OPERATORS_SINGLE: Array<SelectOperatorAsync>;
9
12
  export declare const DATE_TIME_OPERATORS: Array<DateTimeOperator>;
@@ -11,7 +11,10 @@ const ALL_FIELD = {
11
11
  const STRING_OPERATORS = ["c", "nc"];
12
12
  const NUMBER_OPERATORS = ["b", "e", "ne", "gt", "gte", "lt", "lte"];
13
13
  const BOOLEAN_OPERATORS = ["e", "ne"];
14
- const SELECT_OPERATORS = ["in", "nin"];
14
+ const SELECT_OPERATORS_MULTIPLE = ["in", "nin"];
15
+ const SELECT_OPERATORS_SINGLE = ["e", "ne"];
16
+ const SELECT_ASYNC_OPERATORS_MULTIPLE = ["in", "nin"];
17
+ const SELECT_ASYNC_OPERATORS_SINGLE = ["e", "ne"];
15
18
  const DATE_TIME_OPERATORS = [
16
19
  "b",
17
20
  "e",
@@ -26,8 +29,11 @@ export {
26
29
  BOOLEAN_OPERATORS as B,
27
30
  DYNAMIC_FILTER_KEY_COMPONENT as D,
28
31
  NUMBER_OPERATORS as N,
29
- SELECT_OPERATORS as S,
32
+ SELECT_ASYNC_OPERATORS_MULTIPLE as S,
30
33
  DYNAMIC_FILTER_SOTORE_ID as a,
31
34
  DATE_TIME_OPERATORS as b,
32
- STRING_OPERATORS as c
35
+ SELECT_ASYNC_OPERATORS_SINGLE as c,
36
+ SELECT_OPERATORS_MULTIPLE as d,
37
+ SELECT_OPERATORS_SINGLE as e,
38
+ STRING_OPERATORS as f
33
39
  };
@@ -5,43 +5,45 @@ export declare const DYNAMIC_FILTER_DICTIONARY_ID = "dynamic_filter";
5
5
  */
6
6
  export declare function getDynamicFilterComponentsDictionary(): string[];
7
7
  export declare const DICCTIONARY: {
8
- readonly input_placeholder: "input_placeholder";
9
- readonly operand_true: "operand_true";
10
- readonly operand_false: "operand_false";
11
- readonly filter_tooltip_refresh: "filter_tooltip_refresh";
12
- readonly filter_tooltip_dirty: "filter_tooltip_dirty";
13
- readonly filter_tooltip_invalid: "filter_tooltip_invalid";
14
- readonly operator_b: "operator_b";
15
- readonly operator_e: "operator_e";
16
- readonly operator_ne: "operator_ne";
17
- readonly operator_gt: "operator_gt";
18
- readonly operator_gte: "operator_gte";
19
- readonly operator_lt: "operator_lt";
20
- readonly operator_lte: "operator_lte";
21
- readonly operator_c: "operator_c";
22
- readonly operator_nc: "operator_nc";
23
- readonly operator_in: "operator_in";
24
- readonly operator_nin: "operator_nin";
25
- readonly label_boolean_operator: "label_boolean_operator";
26
- readonly label_boolean_operand1: "label_boolean_operand1";
27
- readonly label_operator_date_time: "label_operator_date_time";
28
- readonly label_operand1_date_time: "label_operand1_date_time";
29
- readonly label_operand2_date_time: "label_operand2_date_time";
30
- readonly label_operator_number: "label_operator_number";
31
- readonly label_operand1_number: "label_operand1_number";
32
- readonly label_operand2_number: "label_operand2_number";
33
- readonly label_operator_string: "label_operator_string";
34
- readonly label_operand1_string: "label_operand1_string";
35
- readonly operator_required: "operator_required";
36
- readonly error_invalid_date: "error_invalid_date";
37
- readonly error_less_than_start: "error_less_than_start";
38
- readonly label_select_operator: "label_select_operator";
39
- readonly label_select_operands_array: "label_select_operands_array";
40
- readonly error_operand_required: "error_operand_required";
8
+ readonly input_placeholder: "dynamic_filter.input_placeholder";
9
+ readonly operand_true: "dynamic_filter.operand_true";
10
+ readonly operand_false: "dynamic_filter.operand_false";
11
+ readonly filter_tooltip_refresh: "dynamic_filter.filter_tooltip_refresh";
12
+ readonly filter_tooltip_dirty: "dynamic_filter.filter_tooltip_dirty";
13
+ readonly filter_tooltip_invalid: "dynamic_filter.filter_tooltip_invalid";
14
+ readonly tooltip_clear_filters: "dynamic_filter.tooltip_clear_filters";
15
+ readonly operator_b: "dynamic_filter.operator_b";
16
+ readonly operator_e: "dynamic_filter.operator_e";
17
+ readonly operator_ne: "dynamic_filter.operator_ne";
18
+ readonly operator_gt: "dynamic_filter.operator_gt";
19
+ readonly operator_gte: "dynamic_filter.operator_gte";
20
+ readonly operator_lt: "dynamic_filter.operator_lt";
21
+ readonly operator_lte: "dynamic_filter.operator_lte";
22
+ readonly operator_c: "dynamic_filter.operator_c";
23
+ readonly operator_nc: "dynamic_filter.operator_nc";
24
+ readonly operator_in: "dynamic_filter.operator_in";
25
+ readonly operator_nin: "dynamic_filter.operator_nin";
26
+ readonly label_boolean_operator: "dynamic_filter.label_boolean_operator";
27
+ readonly label_boolean_operand1: "dynamic_filter.label_boolean_operand1";
28
+ readonly label_operator_date_time: "dynamic_filter.label_operator_date_time";
29
+ readonly label_operand1_date_time: "dynamic_filter.label_operand1_date_time";
30
+ readonly label_operand2_date_time: "dynamic_filter.label_operand2_date_time";
31
+ readonly label_operator_number: "dynamic_filter.label_operator_number";
32
+ readonly label_operand1_number: "dynamic_filter.label_operand1_number";
33
+ readonly label_operand2_number: "dynamic_filter.label_operand2_number";
34
+ readonly label_operator_string: "dynamic_filter.label_operator_string";
35
+ readonly label_operand1_string: "dynamic_filter.label_operand1_string";
36
+ readonly label_select_operator: "dynamic_filter.label_select_operator";
37
+ readonly label_select_operands_array: "dynamic_filter.label_select_operands_array";
38
+ readonly label_select_operand1: "dynamic_filter.label_select_operand1";
39
+ readonly label_select_operand2: "dynamic_filter.label_select_operand2";
40
+ readonly label_select_async_operand1: "dynamic_filter.label_select_async_operand1";
41
+ readonly label_select_async_operands_array: "dynamic_filter.label_select_async_operands_array";
42
+ readonly label_no_fields_available: "dynamic_filter.label_no_fields_available";
43
+ readonly error_operand_required: "dynamic_filter.error_operand_required";
44
+ readonly error_operator_required: "dynamic_filter.error_operator_required";
45
+ readonly error_invalid_date: "dynamic_filter.error_invalid_date";
46
+ readonly error_less_than_start: "dynamic_filter.error_less_than_start";
47
+ readonly error_operand_mustbe_number: "dynamic_filter.error_operand_mustbe_number";
41
48
  };
42
49
  export type TypeDictionary = typeof DICCTIONARY;
43
- /**
44
- * getDynamicFilterDictionary: Devuelve el id del diccionario de un componente DynamicFilter.
45
- * @param key - Clave del diccionario.
46
- */
47
- export declare const getDynamicFilterDictionary: (key: keyof TypeDictionary) => string;
@@ -7,45 +7,39 @@ function getDynamicFilterComponentsDictionary() {
7
7
  );
8
8
  }
9
9
  const DICCTIONARY = {
10
- input_placeholder: "input_placeholder",
11
- operand_true: "operand_true",
12
- operand_false: "operand_false",
13
- filter_tooltip_refresh: "filter_tooltip_refresh",
14
- filter_tooltip_dirty: "filter_tooltip_dirty",
15
- filter_tooltip_invalid: "filter_tooltip_invalid",
16
- operator_b: "operator_b",
17
- operator_e: "operator_e",
18
- operator_ne: "operator_ne",
19
- operator_gt: "operator_gt",
20
- operator_gte: "operator_gte",
21
- operator_lt: "operator_lt",
22
- operator_lte: "operator_lte",
23
- operator_c: "operator_c",
24
- operator_nc: "operator_nc",
25
- operator_in: "operator_in",
26
- operator_nin: "operator_nin",
27
- label_boolean_operator: "label_boolean_operator",
28
- label_boolean_operand1: "label_boolean_operand1",
29
- label_operator_date_time: "label_operator_date_time",
30
- label_operand1_date_time: "label_operand1_date_time",
31
- label_operand2_date_time: "label_operand2_date_time",
32
- label_operator_number: "label_operator_number",
33
- label_operand1_number: "label_operand1_number",
34
- label_operand2_number: "label_operand2_number",
35
- label_operator_string: "label_operator_string",
36
- label_operand1_string: "label_operand1_string",
37
- operator_required: "operator_required",
38
- error_invalid_date: "error_invalid_date",
39
- error_less_than_start: "error_less_than_start",
40
- label_select_operator: "label_select_operator",
41
- label_select_operands_array: "label_select_operands_array",
42
- error_operand_required: "error_operand_required"
43
- };
44
- const getDynamicFilterDictionary = (key) => {
45
- return `${DYNAMIC_FILTER_DICTIONARY_ID}.${key}`;
10
+ input_placeholder: `${DYNAMIC_FILTER_DICTIONARY_ID}.input_placeholder`,
11
+ operand_true: `${DYNAMIC_FILTER_DICTIONARY_ID}.operand_true`,
12
+ operand_false: `${DYNAMIC_FILTER_DICTIONARY_ID}.operand_false`,
13
+ filter_tooltip_refresh: `${DYNAMIC_FILTER_DICTIONARY_ID}.filter_tooltip_refresh`,
14
+ filter_tooltip_dirty: `${DYNAMIC_FILTER_DICTIONARY_ID}.filter_tooltip_dirty`,
15
+ filter_tooltip_invalid: `${DYNAMIC_FILTER_DICTIONARY_ID}.filter_tooltip_invalid`,
16
+ tooltip_clear_filters: `${DYNAMIC_FILTER_DICTIONARY_ID}.tooltip_clear_filters`,
17
+ //Labels de los formularios de los filtros
18
+ label_boolean_operator: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_boolean_operator`,
19
+ label_boolean_operand1: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_boolean_operand1`,
20
+ label_operator_date_time: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operator_date_time`,
21
+ label_operand1_date_time: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operand1_date_time`,
22
+ label_operand2_date_time: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operand2_date_time`,
23
+ label_operator_number: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operator_number`,
24
+ label_operand1_number: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operand1_number`,
25
+ label_operand2_number: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operand2_number`,
26
+ label_operator_string: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operator_string`,
27
+ label_operand1_string: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_operand1_string`,
28
+ label_select_operator: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operator`,
29
+ label_select_operands_array: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operands_array`,
30
+ label_select_operand1: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_operand1`,
31
+ label_select_async_operand1: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_async_operand1`,
32
+ label_select_async_operands_array: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_select_async_operands_array`,
33
+ label_no_fields_available: `${DYNAMIC_FILTER_DICTIONARY_ID}.label_no_fields_available`,
34
+ //Validations
35
+ error_operand_required: `${DYNAMIC_FILTER_DICTIONARY_ID}.error_operand_required`,
36
+ error_operator_required: `${DYNAMIC_FILTER_DICTIONARY_ID}.error_operator_required`,
37
+ error_invalid_date: `${DYNAMIC_FILTER_DICTIONARY_ID}.error_invalid_date`,
38
+ error_less_than_start: `${DYNAMIC_FILTER_DICTIONARY_ID}.error_less_than_start`,
39
+ error_operand_mustbe_number: `${DYNAMIC_FILTER_DICTIONARY_ID}.error_operand_mustbe_number`
46
40
  };
47
41
  export {
48
- DICCTIONARY as D,
49
- getDynamicFilterComponentsDictionary as a,
50
- getDynamicFilterDictionary as g
42
+ DYNAMIC_FILTER_DICTIONARY_ID as D,
43
+ DICCTIONARY as a,
44
+ getDynamicFilterComponentsDictionary as g
51
45
  };
@@ -1,6 +1,8 @@
1
1
  import { FilterFieldApplied, InitialFilterApplied } from '../types';
2
2
  /**
3
- * Función formateadora filtros como el DynamicFilter los usa a nivel interno a como se guardan en las cookies
3
+ * Función formateadora filtros como el DynamicFilter los usa a nivel interno diferente como se guardan en las cookies
4
+ * Por ejemplo: El filtro internamente trabaja con Date, pero se guarda en las cookies como string
5
+ * Adicionalmente se formatean los filtros para que no se guarden los undefined
4
6
  * @param appliedFilters Filtros actualmente aplicados
5
7
  * @returns
6
8
  */
@@ -1,29 +1,39 @@
1
1
  import { f as filterValidOperandsArraySelectAsync } from "../subcomponents/FieldTypes/SelectAsyncFilter/helpers.js";
2
+ import { f as filterValidOperandsArraySelect } from "../subcomponents/FieldTypes/SelectFilter/helpers.js";
2
3
  function formatToInitialFilters(appliedFilters) {
3
- return appliedFilters.map((appliedFilter) => {
4
- const ret = {
5
- name: appliedFilter.field.name,
6
- operator: appliedFilter.operator,
7
- operand1: appliedFilter.operand1,
8
- operand2: appliedFilter.operator === "b" ? appliedFilter.operand2 : void 0
9
- };
10
- if (appliedFilter.fieldType === "datetime") {
11
- ret.operand1 = appliedFilter.operand1.toISOString();
12
- ret.operand2 = appliedFilter.operator === "b" ? appliedFilter.operand2.toISOString() : void 0;
13
- }
14
- if (appliedFilter.fieldType === "selectAsync") {
15
- const validOperandsArray = filterValidOperandsArraySelectAsync(
16
- appliedFilter.operandsArray,
17
- appliedFilter.field
4
+ return appliedFilters.map((af) => {
5
+ let operandArray = void 0;
6
+ let operand1 = af.operand1;
7
+ let operand2 = af.operand2;
8
+ if (af.fieldType === "datetime") {
9
+ operand1 = af.operand1.toISOString();
10
+ operand2 = af.operator === "b" ? af.operand2.toISOString() : void 0;
11
+ } else if (af.fieldType === "selectAsync" && af.field.type === "selectAsync") {
12
+ if (af.field.selectAsyncOptions.multiple) {
13
+ const validOperandsArray = filterValidOperandsArraySelectAsync(
14
+ af.operandsArray,
15
+ af.field
16
+ );
17
+ if (validOperandsArray && validOperandsArray?.length > 0) {
18
+ operandArray = validOperandsArray;
19
+ }
20
+ }
21
+ } else if (af.fieldType === "select") {
22
+ const validOperandsArray = filterValidOperandsArraySelect(
23
+ af.operandsArray,
24
+ af.field
18
25
  );
19
26
  if (validOperandsArray && validOperandsArray?.length > 0) {
20
- ret.operandsArray = validOperandsArray;
27
+ operandArray = validOperandsArray;
21
28
  }
22
29
  }
23
- if (ret.operand2 === void 0) {
24
- delete ret.operand2;
25
- }
26
- return ret;
30
+ return {
31
+ name: af.field.name,
32
+ operator: af.operator,
33
+ ...operand1 ? { operand1 } : {},
34
+ ...operand2 ? { operand2 } : {},
35
+ ...operandArray ? { operandArray } : {}
36
+ };
27
37
  });
28
38
  }
29
39
  export {
@@ -1,17 +1,26 @@
1
1
  const formatToRawFilter = (appliedFilters) => {
2
2
  return appliedFilters.map((af) => {
3
3
  let oa = void 0;
4
- if (af.fieldType === "selectAsync" && af.field.type === "selectAsync" && af.operandsArray) {
5
- oa = Array.isArray(af.operandsArray) ? af.operandsArray.map(af.field.selectAsyncOptions.getOptionId) : [af.field.selectAsyncOptions.getOptionId(af.operandsArray)];
6
- }
7
- if (af.fieldType === "select" && af.field.type === "select" && af.operandsArray) {
8
- oa = Array.isArray(af.operandsArray) ? af.operandsArray : [af.operandsArray];
4
+ let o1 = void 0;
5
+ if (af.fieldType === "selectAsync" && af.field.type === "selectAsync") {
6
+ if (af.field.selectAsyncOptions.multiple) {
7
+ o1 = void 0;
8
+ oa = af.operandsArray.map(af.field.selectAsyncOptions.getOptionId);
9
+ } else {
10
+ o1 = af.field.selectAsyncOptions.getOptionId(af.operand1);
11
+ }
12
+ } else if (af.fieldType === "select" && af.field.type === "select" && af.operandsArray) {
13
+ if (af.field.selectOptions.multiple) {
14
+ oa = af.operandsArray;
15
+ }
16
+ } else {
17
+ o1 = af.operand1;
9
18
  }
10
19
  return {
11
20
  n: af.field.name,
12
21
  ft: af.field.type,
13
22
  o: af.operator,
14
- o1: af.operand1,
23
+ o1,
15
24
  o2: af.operator === "b" ? af.operand2 : void 0,
16
25
  oa
17
26
  };
@@ -49,7 +49,7 @@ function getPurgedInitialFiltersApplied(fields, initialFilters, getFieldByName)
49
49
  field,
50
50
  field.presence === "fixed"
51
51
  );
52
- newFilter.id = newFilters.length + 1;
52
+ newFilter.id = -(newFilters.length + 1);
53
53
  newFilters.push(newFilter);
54
54
  }
55
55
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { createContext, forwardRef, useRef, useImperativeHandle, useEffect } from "react";
2
+ import { forwardRef, useRef, useImperativeHandle, useEffect, createContext } from "react";
3
3
  import { useStore } from "zustand";
4
4
  import { shallow } from "zustand/shallow";
5
5
  import { useModuleDictionary, useEnvironment, useModuleSkeleton } from "@m4l/core";
@@ -2,5 +2,5 @@ import { FilterFieldApplied } from '../../types';
2
2
  /**
3
3
  * AppliedFilterChip: Componente encargado de mostrar el chip de filtro aplicado
4
4
  */
5
- declare function AppliedFilterChip(props: FilterFieldApplied): import("react/jsx-runtime").JSX.Element;
5
+ declare function AppliedFilterChip(filter: FilterFieldApplied): import("react/jsx-runtime").JSX.Element;
6
6
  export default AppliedFilterChip;
@@ -2,15 +2,16 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { C as Chip } from "../../../Chip/Chip.js";
3
3
  import { u as useDynamicFilterBase } from "../DynamicFilterBase/useDynamicFilterBase.js";
4
4
  import { u as useAppliedFilterChip } from "./useAppliedFilterChip.js";
5
- function AppliedFilterChip(props) {
6
- const { fixed } = props;
5
+ function AppliedFilterChip(filter) {
6
+ const { fixed, isSet } = filter;
7
7
  const { size } = useDynamicFilterBase();
8
- const { onEditFilter, onDelete, iconFieldUrl, labels } = useAppliedFilterChip(props);
8
+ const { onEditFilter, onDelete, iconFieldUrl, labels } = useAppliedFilterChip(filter);
9
9
  return /* @__PURE__ */ jsx(
10
10
  Chip,
11
11
  {
12
12
  size,
13
13
  opacity: true,
14
+ color: isSet ? "default" : "error",
14
15
  variant: "contained",
15
16
  onClick: onEditFilter,
16
17
  startIcon: iconFieldUrl,
@@ -1,10 +1,17 @@
1
1
  import { u as useDynamicFilterStore } from "../../store/useDynamicFilterStore.js";
2
+ import { useMemo } from "react";
2
3
  function useAppliedFilters() {
3
4
  const appliedFilter = useDynamicFilterStore((state) => state.appliedFilters);
4
5
  const isSkeleton = useDynamicFilterStore((state) => state.ownerState.isSkeleton);
5
- const appliedFiltersSorted = [...appliedFilter].sort(
6
- (filterA, filterB) => filterA.isSet !== filterB.isSet ? Number(filterA.isSet) - Number(filterB.isSet) : filterB.id - filterA.id
7
- );
6
+ const appliedFiltersSorted = useMemo(() => {
7
+ const appliedFiltersFixed = [...appliedFilter.filter((f) => f.fixed)].sort(
8
+ (filterA, filterB) => filterA.isSet !== filterB.isSet ? Number(filterA.isSet) - Number(filterB.isSet) : filterB.id - filterA.id
9
+ );
10
+ const appliedFiltersSortedNoFixed = [...appliedFilter.filter((f) => !f.fixed)].sort(
11
+ (filterA, filterB) => filterA.isSet !== filterB.isSet ? Number(filterA.isSet) - Number(filterB.isSet) : filterB.id - filterA.id
12
+ );
13
+ return [...appliedFiltersFixed, ...appliedFiltersSortedNoFixed];
14
+ }, [appliedFilter]);
8
15
  return {
9
16
  appliedFiltersSorted,
10
17
  isSkeleton
@@ -4,11 +4,11 @@ import { a as getComponentSlotRoot } from "../../../../utils/getComponentSlotRoo
4
4
  import { D as DYNAMIC_FILTER_KEY_COMPONENT } from "../../constants.js";
5
5
  import { u as useDynamicFilterBase } from "./useDynamicFilterBase.js";
6
6
  import { R as RootStyled, I as InnerContainerStyled } from "../../slots/dynamicFilterSlots.js";
7
- import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
8
7
  import { I as InputFilter } from "../InputFilter/InputFilter.js";
9
8
  import { A as AppliedFilters } from "../AppliedFilters/AppliedFilters.js";
10
9
  import { F as FilterActions } from "../FilterActions/FilterActions.js";
11
10
  import { P as PopoverFilter } from "../PopoverFilter/PopoverFilter.js";
11
+ import { D as DynamicFilterSlots } from "../../slots/SlotsEnum.js";
12
12
  function DynamicFilterBase() {
13
13
  const { ownerState, dataTestId } = useDynamicFilterBase();
14
14
  const classRoot = getComponentSlotRoot(DYNAMIC_FILTER_KEY_COMPONENT);