@m4l/components 9.1.142 → 9.1.144

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 (194) hide show
  1. package/.storybook/utils/getStylesColorsByMode.d.ts +48 -48
  2. package/@types/types.d.ts +17 -0
  3. package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +7 -7
  4. package/components/AppBar/slots/AppBarSlots.d.ts +6 -6
  5. package/components/AppBar/slots/AppBarSlots.js +1 -1
  6. package/components/Chip/slots/ChipSlots.d.ts +2 -2
  7. package/components/Color/slots/ColorSlots.d.ts +2 -2
  8. package/components/Color/slots/ColorSlots.js +1 -1
  9. package/components/CommonActions/components/ActionCancel/slots/ActionsCancelSlots.d.ts +1 -1
  10. package/components/CommonActions/components/ActionFormCancel/slots/ActionFormCancelSlots.d.ts +1 -1
  11. package/components/CommonActions/components/ActionIntro/slots/ActionsIntroSlots.d.ts +1 -1
  12. package/components/CommonActions/components/ActionsContainer/slots/ActionsContainerSlots.d.ts +1 -1
  13. package/components/DataGrid/DataGrid.d.ts +9 -0
  14. package/components/DataGrid/DataGrid.js +95 -0
  15. package/components/DataGrid/contexts/DataGridContext/index.js +2 -2
  16. package/components/DataGrid/contexts/FilterContext/index.js +2 -2
  17. package/components/DataGrid/formatters/ColumnDateFormatter/useColumnDate.js +6 -2
  18. package/components/DataGrid/hooks/useDataGrid.js +1 -1
  19. package/components/DataGrid/hooks/useFilters.js +1 -1
  20. package/components/DataGrid/index.d.ts +8 -9
  21. package/components/DataGrid/index.js +1 -89
  22. package/components/DataGrid/slots/DataGridEnum.d.ts +2 -1
  23. package/components/DataGrid/slots/DataGridEnum.js +1 -0
  24. package/components/DataGrid/slots/DataGridSlot.d.ts +19 -18
  25. package/components/DataGrid/slots/DataGridSlot.js +13 -8
  26. package/components/DataGrid/styles.js +10 -8
  27. package/components/DataGrid/subcomponents/Actions/index.js +15 -12
  28. package/components/DataGrid/subcomponents/Actions/subcomponents/Settings/subcomponents/ColumnsConfig/index.js +1 -1
  29. package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +1 -1
  30. package/components/DataGrid/subcomponents/Actions/types.d.ts +2 -0
  31. package/components/DataGrid/subcomponents/Table/index.js +1 -1
  32. package/components/DataGrid/subcomponents/Table/subcomponents/DraggableHeaderRenderer.js +1 -1
  33. package/components/DataGrid/types.d.ts +8 -12
  34. package/components/DragResizeWindow/slots/DragResizeWindowSlots.d.ts +2 -2
  35. package/components/DynamicFilter/__tests__/fronEndHelpers.test.d.ts +1 -0
  36. package/components/DynamicFilter/helpers/frontEndHelpers.d.ts +12 -0
  37. package/components/DynamicFilter/helpers/frontEndHelpers.js +213 -0
  38. package/components/DynamicFilter/index.d.ts +1 -0
  39. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +15 -15
  40. package/components/DynamicFilter/slots/dynamicFilterSlots.js +1 -1
  41. package/components/DynamicFilter/store/DynamicFilterContext.d.ts +1 -1
  42. package/components/DynamicFilter/store/DynamicFilterStore.d.ts +1 -1
  43. package/components/DynamicFilter/store/DynamicFilterStore.js +5 -2
  44. package/components/DynamicFilter/store/{DynamicFilterStoreTypes.d.ts → types.d.ts} +4 -5
  45. package/components/DynamicFilter/store/useDynamicFilterStore.d.ts +1 -1
  46. package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.d.ts +1 -1
  47. package/components/DynamicFilter/subcomponents/AppliedFilterChip/useAppliedFilterChip.js +2 -4
  48. package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +4 -0
  49. package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.js +2 -1
  50. package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +0 -1
  51. package/components/DynamicFilter/subcomponents/PopoverMenuFields/usePopoverMenuFields.js +1 -3
  52. package/components/DynamicFilter/types.d.ts +2 -2
  53. package/components/DynamicSort/DynamicSort.styles.js +3 -0
  54. package/components/DynamicSort/constants.d.ts +3 -3
  55. package/components/DynamicSort/constants.js +5 -3
  56. package/components/DynamicSort/dictionary.js +3 -2
  57. package/components/DynamicSort/helpers/formatToRowSort.js +3 -2
  58. package/components/DynamicSort/helpers/frontEndHelpers.d.ts +7 -0
  59. package/components/DynamicSort/helpers/frontEndHelpers.js +38 -0
  60. package/components/DynamicSort/helpers/getPurgedInitialSortApplyed.js +2 -2
  61. package/components/DynamicSort/index.d.ts +2 -1
  62. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +29 -29
  63. package/components/DynamicSort/store/DynamicSortContext.d.ts +3 -3
  64. package/components/DynamicSort/store/DynamicSortContext.js +5 -14
  65. package/components/DynamicSort/store/DynamicSortStore.d.ts +2 -2
  66. package/components/DynamicSort/store/DynamicSortStore.js +30 -21
  67. package/components/DynamicSort/store/{type.d.ts → types.d.ts} +19 -22
  68. package/components/DynamicSort/store/useDynamicSortStore.d.ts +1 -1
  69. package/components/DynamicSort/store/useDynamicSortStore.js +1 -1
  70. package/components/DynamicSort/subcomponents/AppliedSortChip/useAppliedSortChip.d.ts +1 -1
  71. package/components/DynamicSort/subcomponents/AppliedSortChip/useAppliedSortChip.js +3 -4
  72. package/components/DynamicSort/subcomponents/AppliedSorts/AppliedSorts.js +1 -1
  73. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.d.ts +1 -1
  74. package/components/DynamicSort/subcomponents/AppliedSorts/useAppliedSorts.js +2 -1
  75. package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +4 -0
  76. package/components/DynamicSort/subcomponents/FieldTypes/DataTypeComponent.js +2 -2
  77. package/components/DynamicSort/subcomponents/FieldTypes/FieldTypeInterface.d.ts +4 -4
  78. package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.d.ts +4 -4
  79. package/components/DynamicSort/subcomponents/FieldTypes/StringSort/helpers.js +4 -4
  80. package/components/DynamicSort/subcomponents/FieldTypes/StringSort/index.js +1 -1
  81. package/components/DynamicSort/subcomponents/FieldTypes/fieldFactory.d.ts +2 -3
  82. package/components/DynamicSort/subcomponents/FieldTypes/fieldFactory.js +4 -4
  83. package/components/DynamicSort/subcomponents/InputSort/InputSort.js +11 -2
  84. package/components/DynamicSort/subcomponents/InputSort/useInputSort.d.ts +13 -1
  85. package/components/DynamicSort/subcomponents/InputSort/useInputSort.js +26 -16
  86. package/components/DynamicSort/subcomponents/PopoverMenuFields/PopoverMenuFields.js +5 -4
  87. package/components/DynamicSort/subcomponents/PopoverMenuFields/usePopoverMenuFields.d.ts +2 -1
  88. package/components/DynamicSort/subcomponents/PopoverMenuFields/usePopoverMenuFields.js +6 -5
  89. package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -2
  90. package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.js +8 -6
  91. package/components/DynamicSort/subcomponents/SortActions/SortActions.js +1 -1
  92. package/components/DynamicSort/subcomponents/SortActions/useSortActions.js +4 -4
  93. package/components/DynamicSort/tests/fronEndHelpers.test.d.ts +1 -0
  94. package/components/DynamicSort/types.d.ts +36 -46
  95. package/components/Icon/slots/IconSlots.d.ts +2 -2
  96. package/components/Label/slots/LabelSlots.d.ts +1 -1
  97. package/components/LanguagePopover/slots/LanguagePopoverSlots.d.ts +1 -1
  98. package/components/LoadingError/slots/LoadingErrorSlots.d.ts +8 -8
  99. package/components/MenuActions/MenuActions.js +1 -1
  100. package/components/MenuActions/slots/MenuActionsSlots.d.ts +6 -6
  101. package/components/MenuActions/types.d.ts +4 -7
  102. package/components/ModalDialog/slots/ModalDialogSlots.d.ts +2 -2
  103. package/components/NoItemSelected/slots/NoItemSelectedSlots.d.ts +3 -3
  104. package/components/NumberInput/slots/NumberInputSlots.d.ts +5 -5
  105. package/components/ObjectLogs/index.js +1 -1
  106. package/components/PDFViewer/slots/PDFViewerSlots.d.ts +1 -1
  107. package/components/Pager/Pager.js +4 -1
  108. package/components/Pager/slots/PagerSlots.d.ts +4 -4
  109. package/components/PaperForm/slots/PaperFormSlots.d.ts +3 -3
  110. package/components/PropertyValue/slots/PropertyValueSlots.d.ts +3 -3
  111. package/components/ScrollBar/slots/ScrollBarSlots.d.ts +1 -1
  112. package/components/SideBar/slots/SideBarSlots.d.ts +15 -15
  113. package/components/ToastContainer/slots/toastContainerSlots.d.ts +7 -7
  114. package/components/WindowBase/slots/WindowBaseSlots.d.ts +8 -8
  115. package/components/WindowBase/subcomponents/Header/types.d.ts +2 -4
  116. package/components/WindowConfirm/slots/WindowConfirmSlots.d.ts +8 -8
  117. package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +17 -17
  118. package/components/areas/components/AreasAdmin/subcomponents/AreaChip/AreaChip.js +1 -1
  119. package/components/areas/components/AreasViewer/slots/AreasViewerSlots.d.ts +5 -5
  120. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/index.js +2 -2
  121. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/Component/types.d.ts +1 -0
  122. package/components/areas/contexts/WindowToolsMFContext/types.d.ts +1 -1
  123. package/components/areas/types.d.ts +2 -4
  124. package/components/extended/React-Spinners/PropagateLoaderSpinner/slots/PropagateLoaderSpinnerSlots.d.ts +1 -1
  125. package/components/extended/React-Splitter-Layout/slots/SplitLayoutSlots.d.ts +3 -3
  126. package/components/extended/React-Window/FixedSizeList/slots/FixedSizeListSlots.js +1 -1
  127. package/components/extended/React-Window/VariableSizeList/VariableSizeList.js +1 -1
  128. package/components/hook-form/RHFAutocomplete/slots/RHFAutocompleteSlots.d.ts +1 -1
  129. package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.d.ts +3 -3
  130. package/components/hook-form/RHFColorPicker/slots/RHFColorPickerSlots.d.ts +1 -1
  131. package/components/hook-form/RHFDateTime/slots/RHFDateTimeSlots.d.ts +1 -1
  132. package/components/hook-form/RHFNumberInput/slots/RHFNumberInputSlots.d.ts +1 -1
  133. package/components/hook-form/RHFPeriod/slots/RHFPeriodSlots.d.ts +4 -4
  134. package/components/hook-form/RHFSelect/slots/RHFSlots.d.ts +2 -2
  135. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +2 -2
  136. package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +3 -3
  137. package/components/hook-form/RHFTimePicker/slots/RHFTimePickerSlots.d.ts +1 -1
  138. package/components/index.d.ts +27 -33
  139. package/components/mui_extended/Accordion/slots/AccordionSlots.d.ts +2 -2
  140. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +5 -5
  141. package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +1 -1
  142. package/components/mui_extended/Avatar/slots/AvatarSlots.d.ts +1 -1
  143. package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
  144. package/components/mui_extended/Button/slots/ButtonSlots.d.ts +1 -1
  145. package/components/mui_extended/CheckBox/slots/CheckBoxSlots.d.ts +2 -2
  146. package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +4 -4
  147. package/components/mui_extended/Dialog/slots/DialogSlots.d.ts +2 -2
  148. package/components/mui_extended/Divider/slots/DividerSlots.d.ts +2 -2
  149. package/components/mui_extended/IconButton/IconButton.js +2 -2
  150. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
  151. package/components/mui_extended/LoadingButton/slots/LoadingButtonSlots.d.ts +1 -1
  152. package/components/mui_extended/MenuDivider/slots/MenuDividerSlots.d.ts +2 -2
  153. package/components/mui_extended/MenuItem/slots/MenuItemSlots.d.ts +2 -2
  154. package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
  155. package/components/mui_extended/NavLink/slots/NavLinkSlots.d.ts +1 -1
  156. package/components/mui_extended/Popper/slots/PopperStlots.d.ts +1 -1
  157. package/components/mui_extended/Select/slots/SelectSlots.d.ts +3 -3
  158. package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
  159. package/components/mui_extended/Stack/slots/StackSlot.d.ts +1 -1
  160. package/components/mui_extended/Tab/Slots/TabSlots.d.ts +1 -1
  161. package/components/mui_extended/Tabs/slots/TabsSlots.d.ts +1 -1
  162. package/components/mui_extended/TextField/slots/TextFieldSlots.d.ts +1 -1
  163. package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +3 -3
  164. package/components/mui_extended/ToggleButton/slots/ToggleButtonSlots.d.ts +1 -1
  165. package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
  166. package/components/mui_extended/Tooltip/slots/TooltipSlots.d.ts +1 -1
  167. package/components/mui_extended/Typography/slots/typographySlots.d.ts +1 -1
  168. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +2 -2
  169. package/components/popups/components/PopupsProvider/contexts/PopupsContext/types.d.ts +6 -13
  170. package/components/popups/components/PopupsProvider/hooks/usePopops/usePopups.js +1 -1
  171. package/components/popups/components/PopupsViewer/slots/popupsViewerSlots.d.ts +5 -5
  172. package/hooks/index.d.ts +1 -0
  173. package/hooks/useDynamicFilterAndSort/constants.d.ts +1 -0
  174. package/hooks/useDynamicFilterAndSort/constants.js +4 -0
  175. package/hooks/useDynamicFilterAndSort/icons.d.ts +6 -0
  176. package/hooks/useDynamicFilterAndSort/icons.js +11 -0
  177. package/hooks/useDynamicFilterAndSort/index.d.ts +2 -0
  178. package/hooks/useDynamicFilterAndSort/index.js +1 -0
  179. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.d.ts +5 -0
  180. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortEnum.js +9 -0
  181. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.d.ts +9 -0
  182. package/hooks/useDynamicFilterAndSort/slots/DynamicFilterAndSortSlots.js +22 -0
  183. package/hooks/useDynamicFilterAndSort/styles.d.ts +2 -0
  184. package/hooks/useDynamicFilterAndSort/styles.js +43 -0
  185. package/hooks/useDynamicFilterAndSort/types.d.ts +34 -0
  186. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.d.ts +10 -0
  187. package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +90 -0
  188. package/index.js +304 -295
  189. package/package.json +1 -1
  190. package/utils/getValidDate.d.ts +4 -0
  191. package/utils/getValidDate.js +17 -0
  192. package/utils/index.d.ts +1 -0
  193. package/vendor.js +2 -2
  194. package/not_recognized/index.js +0 -23261
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export declare const StyledMUITypography: import('@emotion/styled').StyledComponent<Pick<import('@mui/material').TypographyOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
5
5
  ref?: ((instance: HTMLSpanElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLSpanElement> | null | undefined;
6
- }, "children" | "zIndex" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "flex" | "color" | "left" | "right" | "bottom" | "top" | "style" | "position" | "padding" | "variant" | "borderRadius" | "width" | "display" | "borderColor" | "height" | "gap" | "minHeight" | "minWidth" | "margin" | "overflow" | "boxShadow" | "justifyContent" | "alignItems" | "paddingLeft" | "borderLeft" | "borderTop" | "maxWidth" | "flexDirection" | "paddingRight" | "borderRight" | "flexGrow" | "marginLeft" | "textOverflow" | "borderBottom" | "gridTemplateColumns" | "marginBottom" | "alignContent" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateRows" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginRight" | "marginTop" | "maxHeight" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingTop" | "rowGap" | "textAlign" | "visibility" | "whiteSpace" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "sx" | "classes" | "className" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "variantMapping">, "children" | "ref" | "title" | "zIndex" | "id" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "flex" | "hidden" | "color" | "left" | "right" | "bottom" | "top" | "content" | "style" | "position" | "padding" | "variant" | "borderRadius" | "width" | "display" | "borderColor" | "height" | "gap" | "minHeight" | "minWidth" | "margin" | "overflow" | "boxShadow" | "justifyContent" | "alignItems" | "paddingLeft" | "borderLeft" | "borderTop" | "maxWidth" | "flexDirection" | "paddingRight" | "borderRight" | "flexGrow" | "marginLeft" | "textOverflow" | "borderBottom" | "gridTemplateColumns" | "marginBottom" | "alignContent" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateRows" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginRight" | "marginTop" | "maxHeight" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingTop" | "rowGap" | "textAlign" | "translate" | "visibility" | "whiteSpace" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "sx" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "slot" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "key" | "align" | "gutterBottom" | "noWrap" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TypographyOwnerState> & Record<string, unknown> & {
6
+ }, "children" | "zIndex" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "flex" | "color" | "left" | "right" | "bottom" | "top" | "style" | "position" | "padding" | "variant" | "borderRadius" | "width" | "display" | "borderColor" | "height" | "gap" | "minHeight" | "minWidth" | "margin" | "overflow" | "boxShadow" | "justifyContent" | "alignItems" | "paddingLeft" | "borderLeft" | "borderTop" | "maxWidth" | "flexDirection" | "paddingRight" | "borderRight" | "flexGrow" | "marginLeft" | "textOverflow" | "borderBottom" | "gridTemplateColumns" | "marginBottom" | "alignContent" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateRows" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginRight" | "marginTop" | "maxHeight" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingTop" | "rowGap" | "textAlign" | "visibility" | "whiteSpace" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "className" | "classes" | "sx" | "p" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "variantMapping">, "children" | "ref" | "title" | "zIndex" | "id" | "paragraph" | "border" | "fontWeight" | "lineHeight" | "letterSpacing" | "fontSize" | "textTransform" | "fontFamily" | "typography" | "flex" | "hidden" | "color" | "left" | "right" | "bottom" | "top" | "content" | "style" | "position" | "padding" | "variant" | "borderRadius" | "width" | "display" | "borderColor" | "height" | "gap" | "minHeight" | "minWidth" | "margin" | "overflow" | "boxShadow" | "justifyContent" | "alignItems" | "paddingLeft" | "borderLeft" | "borderTop" | "maxWidth" | "flexDirection" | "paddingRight" | "borderRight" | "flexGrow" | "marginLeft" | "textOverflow" | "borderBottom" | "gridTemplateColumns" | "marginBottom" | "alignContent" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateRows" | "justifyItems" | "justifySelf" | "marginBlockEnd" | "marginBlockStart" | "marginInlineEnd" | "marginInlineStart" | "marginRight" | "marginTop" | "maxHeight" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingTop" | "rowGap" | "textAlign" | "translate" | "visibility" | "whiteSpace" | "gridArea" | "gridColumn" | "gridRow" | "marginBlock" | "marginInline" | "paddingBlock" | "paddingInline" | "className" | "classes" | "sx" | "p" | "slot" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "align" | "gutterBottom" | "noWrap" | "variantMapping"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Partial<import('../types').TypographyOwnerState> & Record<string, unknown> & {
7
7
  ownerState: Partial<import('../types').TypographyOwnerState> & Record<string, unknown>;
8
8
  }, {}, {}>;
9
9
  /**
@@ -36,8 +36,8 @@ const createPopupsStore = (initProps) => {
36
36
  });
37
37
  }
38
38
  state.hashPopups[initialPopups[index].popupId] = {
39
- ...popupData,
40
- component: popupData.functionComponent
39
+ ...popupData
40
+ // component: popupData.functionComponent,
41
41
  };
42
42
  state.popupsIds.push(initialPopups[index].popupId);
43
43
  if (initialPopups[index].zIndex > maxZindex) {
@@ -46,15 +46,15 @@ export interface PopupStoreProps extends Pick<DragResizeWindowProps, 'bounds' |
46
46
  */
47
47
  zIndex: number;
48
48
  /**
49
- * "componentProps" Propiedades que se le pasan al componente que se va a mostrar en el popup.
50
- */
51
- componentProps?: Record<string, any>;
52
- /**
53
- * functionComponent retorna el componente que se va a mostrar en el popup.
49
+ * component retorna el componente que se va a mostrar en el popup.
54
50
  *
55
51
  * Lo unico que necesita es guardar la referencia la función que retorna el componente.
56
52
  */
57
- functionComponent?: React.FC<Record<string, any>>;
53
+ component: React.FC<Record<string, any>>;
54
+ /**
55
+ * "componentProps" Propiedades que se le pasan al componente que se va a mostrar en el popup.
56
+ */
57
+ componentProps?: Record<string, any>;
58
58
  /**
59
59
  * "onMouseDown" Evento nativo del Draggable, para tomar acciones externamente
60
60
  */
@@ -91,9 +91,6 @@ export interface PopupStoreProps extends Pick<DragResizeWindowProps, 'bounds' |
91
91
  * "dynamicMFStore" Almacén de microfrontends din
92
92
  */
93
93
  dynamicMFStore?: Record<string, any>;
94
- /**
95
- * "emergeType" Tipo de emergencia
96
- */
97
94
  /**
98
95
  * dynamic params
99
96
  */
@@ -114,10 +111,6 @@ export interface PopupStoreProps extends Pick<DragResizeWindowProps, 'bounds' |
114
111
  * "maximized" Indica si el popup está maximizado
115
112
  */
116
113
  maximized?: boolean;
117
- /**
118
- * "component" Componente que se va a mostrar en el popup.
119
- */
120
- component?: React.FC<Record<string, any>>;
121
114
  }
122
115
  /**
123
116
  * Interface que define el store del componente (variables y funciones )
@@ -32,7 +32,7 @@ const usePopups = (popupId) => {
32
32
  shallow
33
33
  );
34
34
  const component = usePopupsStore(
35
- (state) => state.hashPopups[popupId]?.component,
35
+ (state) => state.hashPopups[popupId].component,
36
36
  shallow
37
37
  );
38
38
  const {
@@ -1,15 +1,15 @@
1
1
  export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
2
2
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
3
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
3
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
4
4
  export declare const PopupDragWindowRootStyled: import('@emotion/styled').StyledComponent<Pick<import('../../../../DragResizeWindow/types').DragResizeWindowProps & import('react').RefAttributes<HTMLDivElement>, keyof import('react').RefAttributes<HTMLDivElement> | keyof import('../../../../DragResizeWindow/types').DragResizeWindowProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
5
5
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
6
6
  }, {}, {}>;
7
7
  export declare const WindowBaseContentStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
8
8
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
9
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
9
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
10
10
  export declare const PopupHeaderContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
11
11
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
12
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
12
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
13
13
  export declare const PopupHeaderTitleStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
14
14
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
15
15
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
@@ -18,7 +18,7 @@ export declare const PopupHeaderSubTitleStyled: import('@emotion/styled').Styled
18
18
  }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof import('react').ClassAttributes<HTMLSpanElement> | keyof import('react').HTMLAttributes<HTMLSpanElement>>, {}>;
19
19
  export declare const PopupContentRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
20
20
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
21
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
21
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
22
22
  export declare const PopupContentWrapperStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown> & {
23
23
  ownerState: Partial<import('../types').PopupsViewerOwnerState> & Record<string, unknown>;
24
- }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').HTMLAttributes<HTMLDivElement> | keyof import('react').ClassAttributes<HTMLDivElement>>, {}>;
24
+ }, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
package/hooks/index.d.ts CHANGED
@@ -8,3 +8,4 @@ export { useComponentSize } from './useComponentSize';
8
8
  export * from './useSvgColor';
9
9
  export { useFormReadyForUpdate } from './useFormReadyForUpdate';
10
10
  export { useStateRef } from './useStateRef';
11
+ export * from './useDynamicFilterAndSort';
@@ -0,0 +1 @@
1
+ export declare const M4LDYNAMIC_KEY_FILTER_AND_SORT = "M4LDynamicFilterAndSort";
@@ -0,0 +1,4 @@
1
+ const M4LDYNAMIC_KEY_FILTER_AND_SORT = "M4LDynamicFilterAndSort";
2
+ export {
3
+ M4LDYNAMIC_KEY_FILTER_AND_SORT as M
4
+ };
@@ -0,0 +1,6 @@
1
+ export declare const ICON_PATH_FILTER = "frontend/components/data_grid/assets/icons/filter.svg";
2
+ export declare const ICON_PATH_SORT = "frontend/components/data_grid/assets/icons/sort.svg";
3
+ export declare const ASSETS_URL = "frontend/components/Dynamic_sort/assets/icons";
4
+ export declare const ASSETS: {
5
+ readonly refresh: "frontend/components/Dynamic_sort/assets/icons/restart.svg";
6
+ };
@@ -0,0 +1,11 @@
1
+ const ICON_PATH_FILTER = "frontend/components/data_grid/assets/icons/filter.svg";
2
+ const ICON_PATH_SORT = "frontend/components/data_grid/assets/icons/sort.svg";
3
+ const ASSETS_URL = "frontend/components/Dynamic_sort/assets/icons";
4
+ const ASSETS = {
5
+ refresh: `${ASSETS_URL}/restart.svg`
6
+ };
7
+ export {
8
+ ASSETS as A,
9
+ ICON_PATH_FILTER as I,
10
+ ICON_PATH_SORT as a
11
+ };
@@ -0,0 +1,2 @@
1
+ export { useDynamicFilterAndSort } from './useDynamicFilterAndSort';
2
+ export type { ChangeFilterSort } from './types';
@@ -0,0 +1,5 @@
1
+ export declare enum DynamicFilterAndSortSlots {
2
+ stackLeftActions = "stackLeftActions",
3
+ stackCustomHeader = "stackCustomHeader",
4
+ stackRightActions = "stackRightActions"
5
+ }
@@ -0,0 +1,9 @@
1
+ var DynamicFilterAndSortSlots = /* @__PURE__ */ ((DynamicFilterAndSortSlots2) => {
2
+ DynamicFilterAndSortSlots2["stackLeftActions"] = "stackLeftActions";
3
+ DynamicFilterAndSortSlots2["stackCustomHeader"] = "stackCustomHeader";
4
+ DynamicFilterAndSortSlots2["stackRightActions"] = "stackRightActions";
5
+ return DynamicFilterAndSortSlots2;
6
+ })(DynamicFilterAndSortSlots || {});
7
+ export {
8
+ DynamicFilterAndSortSlots as D
9
+ };
@@ -0,0 +1,9 @@
1
+ export declare const StackLeftActionsStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').StackProps, keyof import('../../..').StackProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').DynamicFilterAndSortOwnerState> & Record<string, unknown> & {
2
+ ownerState: Partial<import('../types').DynamicFilterAndSortOwnerState> & Record<string, unknown>;
3
+ }, {}, {}>;
4
+ export declare const StackCustomHeaderStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').StackProps, keyof import('../../..').StackProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').DynamicFilterAndSortOwnerState> & Record<string, unknown> & {
5
+ ownerState: Partial<import('../types').DynamicFilterAndSortOwnerState> & Record<string, unknown>;
6
+ }, {}, {}>;
7
+ export declare const StackRightActionsStyled: import('@emotion/styled').StyledComponent<Pick<import('../../..').StackProps, keyof import('../../..').StackProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').DynamicFilterAndSortOwnerState> & Record<string, unknown> & {
8
+ ownerState: Partial<import('../types').DynamicFilterAndSortOwnerState> & Record<string, unknown>;
9
+ }, {}, {}>;
@@ -0,0 +1,22 @@
1
+ import { styled } from "@mui/material/styles";
2
+ import { M as M4LDYNAMIC_KEY_FILTER_AND_SORT } from "../constants.js";
3
+ import { S as Stack } from "../../../components/mui_extended/Stack/Stack.js";
4
+ import { D as DynamicFilterAndSortSlots } from "./DynamicFilterAndSortEnum.js";
5
+ import { d as dynamicFilterAndSortStyles } from "../styles.js";
6
+ const StackLeftActionsStyled = styled(Stack, {
7
+ name: M4LDYNAMIC_KEY_FILTER_AND_SORT,
8
+ slot: DynamicFilterAndSortSlots.stackLeftActions
9
+ })(dynamicFilterAndSortStyles.stackLeftActions);
10
+ const StackCustomHeaderStyled = styled(Stack, {
11
+ name: M4LDYNAMIC_KEY_FILTER_AND_SORT,
12
+ slot: DynamicFilterAndSortSlots.stackCustomHeader
13
+ })(dynamicFilterAndSortStyles.stackCustomHeader);
14
+ const StackRightActionsStyled = styled(Stack, {
15
+ name: M4LDYNAMIC_KEY_FILTER_AND_SORT,
16
+ slot: DynamicFilterAndSortSlots.stackRightActions
17
+ })(dynamicFilterAndSortStyles.stackRightActions);
18
+ export {
19
+ StackLeftActionsStyled as S,
20
+ StackRightActionsStyled as a,
21
+ StackCustomHeaderStyled as b
22
+ };
@@ -0,0 +1,2 @@
1
+ import { DynamicFilterAndSortStyles } from './types';
2
+ export declare const dynamicFilterAndSortStyles: DynamicFilterAndSortStyles;
@@ -0,0 +1,43 @@
1
+ const dynamicFilterAndSortStyles = {
2
+ /**
3
+ * Estilos para los leftActions
4
+ */
5
+ stackLeftActions: ({ theme }) => ({
6
+ gap: theme.vars.size.baseSpacings.sp1,
7
+ "& .MuiBadge-badge": {
8
+ width: `${theme.vars.size.baseSpacings.sp2} !important`,
9
+ minWidth: `${theme.vars.size.baseSpacings.sp2} !important`,
10
+ minHeight: `${theme.vars.size.baseSpacings.sp2} !important`,
11
+ height: `${theme.vars.size.baseSpacings.sp2} !important`,
12
+ backgroundColor: `${theme.vars.palette.primary.enabled} !important`
13
+ }
14
+ }),
15
+ /**
16
+ * Estilos para el Stack que contiene los componentes de filtro y ordenamiento
17
+ */
18
+ stackCustomHeader: ({ theme, ownerState }) => ({
19
+ flexDirection: theme.generalSettings.isMobile ? "column" : "row",
20
+ gap: theme.vars.size.baseSpacings.sp3,
21
+ padding: `0 ${theme.vars.size.baseSpacings.sp1}`,
22
+ '& [class*="M4LDynamicFilter-root"]': {
23
+ display: ownerState.showDynamicFilter ? "block" : "none",
24
+ width: "auto",
25
+ flexGrow: theme.generalSettings.isMobile ? 1 : 2
26
+ },
27
+ '& [class*="dynamic_sort-root"]': {
28
+ display: ownerState.showDynamicSort ? "block" : "none",
29
+ width: "auto",
30
+ flexGrow: 1
31
+ }
32
+ }),
33
+ /**
34
+ * Estilos para el Stack que contiene los componentes de filtro y ordenamiento
35
+ */
36
+ stackRightActions: ({ theme }) => ({
37
+ alignItems: "center",
38
+ gap: theme.vars.size.baseSpacings.sp1
39
+ })
40
+ };
41
+ export {
42
+ dynamicFilterAndSortStyles as d
43
+ };
@@ -0,0 +1,34 @@
1
+ import { DynamicSortProps, InitialSortApplied, RawSortFieldApply } from '../../components/DynamicSort/types';
2
+ import { DynamicFilterProps, InitialFilterApplied, RawFilterFieldApply } from '../../components/DynamicFilter/types';
3
+ import { OverridesStyleRules } from '@mui/material/styles/overrides';
4
+ import { DynamicFilterAndSortSlots } from './slots/DynamicFilterAndSortEnum';
5
+ import { M4LDYNAMIC_KEY_FILTER_AND_SORT } from './constants';
6
+ import { Theme } from '@mui/material/styles';
7
+ interface ChangeFilter {
8
+ filters?: Array<InitialFilterApplied>;
9
+ rawFilters?: Array<RawFilterFieldApply>;
10
+ }
11
+ interface ChangeSort {
12
+ sorts?: Array<InitialSortApplied>;
13
+ rawSorts?: Array<RawSortFieldApply>;
14
+ }
15
+ export interface ChangeFilterSort {
16
+ eventFilters?: ChangeFilter;
17
+ eventSorts?: ChangeSort;
18
+ }
19
+ export interface UseDynamicFilterAndSortProps extends Pick<DynamicFilterProps, 'fields' | 'withAllField' | 'initialAppliedFilters'> {
20
+ initialFilterToggleed?: boolean;
21
+ initialSortToggleed?: boolean;
22
+ rightActions?: React.ReactNode;
23
+ onChangeFilterSort: (params: ChangeFilterSort) => void;
24
+ dataTestId?: string;
25
+ sorts?: DynamicSortProps['fields'];
26
+ initialAppliedSorts?: DynamicSortProps['initialAppliedSorts'];
27
+ }
28
+ export interface DynamicFilterAndSortOwnerState {
29
+ showDynamicFilter: boolean;
30
+ showDynamicSort: boolean;
31
+ }
32
+ export type DynamicFilterAndSortSlotsType = keyof typeof DynamicFilterAndSortSlots;
33
+ export type DynamicFilterAndSortStyles = OverridesStyleRules<DynamicFilterAndSortSlotsType, typeof M4LDYNAMIC_KEY_FILTER_AND_SORT, Theme>;
34
+ export {};
@@ -0,0 +1,10 @@
1
+ import { UseDynamicFilterAndSortProps } from './types';
2
+ /**
3
+ * Hook para manejar los filtros y ordenamientos dinamicos
4
+ */
5
+ export declare const useDynamicFilterAndSort: (props: UseDynamicFilterAndSortProps) => {
6
+ leftActions: import("react/jsx-runtime").JSX.Element;
7
+ rightActions: import("react/jsx-runtime").JSX.Element;
8
+ visibleCustomHeader: boolean;
9
+ customHeaderComponent: import("react/jsx-runtime").JSX.Element;
10
+ };
@@ -0,0 +1,90 @@
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
+ import { useEnvironment } from "@m4l/core";
3
+ import { T as ToggleIconButton } from "../../components/mui_extended/ToggleIconButton/ToggleIconButton.js";
4
+ import { I as ICON_PATH_FILTER, a as ICON_PATH_SORT, A as ASSETS } from "./icons.js";
5
+ import { useState, useMemo, useRef, useCallback } from "react";
6
+ import { D as DynamicFilter } from "../../components/DynamicFilter/DynamicFilter.js";
7
+ import { D as DynamicSort } from "../../components/DynamicSort/DynamicSort.js";
8
+ import { S as StackLeftActionsStyled, a as StackRightActionsStyled, b as StackCustomHeaderStyled } from "./slots/DynamicFilterAndSortSlots.js";
9
+ import { B as Badge } from "../../components/mui_extended/Badge/Badge.js";
10
+ import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
11
+ import { M as M4LDYNAMIC_KEY_FILTER_AND_SORT } from "./constants.js";
12
+ import { D as DynamicFilterAndSortSlots } from "./slots/DynamicFilterAndSortEnum.js";
13
+ import { I as IconButton } from "../../components/mui_extended/IconButton/IconButton.js";
14
+ const useDynamicFilterAndSort = (props) => {
15
+ const { fields, sorts, onChangeFilterSort, dataTestId, initialAppliedFilters, initialAppliedSorts, withAllField, rightActions, initialFilterToggleed = true, initialSortToggleed = true } = props;
16
+ const { host_static_assets, environment_assets } = useEnvironment();
17
+ const [togglesLeftActions, setTogglesLeftActions] = useState({ filter: initialFilterToggleed, sort: initialSortToggleed });
18
+ const [invisibleBadge, setInvisibleBadge] = useState({
19
+ filter: initialAppliedFilters?.length === 0,
20
+ sort: initialAppliedSorts?.length === 0
21
+ });
22
+ const visibleCustomHeader = useMemo(() => togglesLeftActions.filter || togglesLeftActions.sort, [togglesLeftActions]);
23
+ const sortIconUrl = `${host_static_assets}/${environment_assets}/${ASSETS.refresh}`;
24
+ const eventRefs = useRef({
25
+ eventFilters: { filters: initialAppliedFilters, rawFilters: [] },
26
+ eventSorts: { sorts: initialAppliedSorts, rawSorts: [] }
27
+ });
28
+ const handleToggles = (key) => {
29
+ setTogglesLeftActions((prev) => ({ ...prev, [key]: !prev[key] }));
30
+ };
31
+ const handleChangeFilters = useCallback(
32
+ (filters, rawFilters) => {
33
+ setInvisibleBadge((prev) => ({ ...prev, filter: filters.length === 0 }));
34
+ eventRefs.current = {
35
+ ...eventRefs.current,
36
+ eventFilters: { filters, rawFilters }
37
+ };
38
+ onChangeFilterSort(eventRefs.current);
39
+ },
40
+ [onChangeFilterSort]
41
+ );
42
+ const handleChangeSorts = useCallback((Sorts, rawSorts) => {
43
+ setInvisibleBadge((prev) => ({ ...prev, sort: Sorts.length === 0 }));
44
+ eventRefs.current = {
45
+ ...eventRefs.current,
46
+ eventSorts: { sorts: Sorts, rawSorts }
47
+ };
48
+ onChangeFilterSort(eventRefs.current);
49
+ }, [onChangeFilterSort]);
50
+ const onRefresh = useCallback(() => {
51
+ onChangeFilterSort(eventRefs.current);
52
+ }, [onChangeFilterSort]);
53
+ const leftActions = useMemo(() => /* @__PURE__ */ jsxs(StackLeftActionsStyled, { direction: "row", ownerState: {}, ...getPropDataTestId(M4LDYNAMIC_KEY_FILTER_AND_SORT, DynamicFilterAndSortSlots.stackLeftActions, dataTestId), children: [
54
+ /* @__PURE__ */ jsx(Badge, { badgeContent: "", size: "small", color: "primary", invisible: invisibleBadge.filter, children: /* @__PURE__ */ jsx(ToggleIconButton, { icon: `${host_static_assets}/${environment_assets}/${ICON_PATH_FILTER}`, isToggled: togglesLeftActions.filter, onToggle: () => handleToggles("filter") }) }),
55
+ /* @__PURE__ */ jsx(Badge, { badgeContent: "", size: "small", color: "primary", invisible: invisibleBadge.sort, children: /* @__PURE__ */ jsx(ToggleIconButton, { icon: `${host_static_assets}/${environment_assets}/${ICON_PATH_SORT}`, isToggled: togglesLeftActions.sort, onToggle: () => handleToggles("sort") }) })
56
+ ] }), [togglesLeftActions, invisibleBadge, host_static_assets, environment_assets]);
57
+ const finalRightActions = useMemo(() => /* @__PURE__ */ jsxs(
58
+ StackRightActionsStyled,
59
+ {
60
+ direction: "row",
61
+ ownerState: {},
62
+ ...getPropDataTestId(M4LDYNAMIC_KEY_FILTER_AND_SORT, DynamicFilterAndSortSlots.stackRightActions, dataTestId),
63
+ children: [
64
+ /* @__PURE__ */ jsx(
65
+ IconButton,
66
+ {
67
+ icon: sortIconUrl,
68
+ "aria-label": "refresh",
69
+ onClick: onRefresh
70
+ }
71
+ ),
72
+ rightActions
73
+ ]
74
+ }
75
+ ), [dataTestId, rightActions, sortIconUrl, onRefresh]);
76
+ const dynamicsFiltersSorts = useMemo(() => /* @__PURE__ */ jsxs(Fragment, { children: [
77
+ /* @__PURE__ */ jsx(DynamicFilter, { fields, initialAppliedFilters, onChangeFilters: handleChangeFilters, withAllField }),
78
+ sorts ? /* @__PURE__ */ jsx(DynamicSort, { fields: sorts, initialAppliedSorts, onChangeSorts: handleChangeSorts }) : null
79
+ ] }), [fields, sorts, initialAppliedFilters, initialAppliedSorts, handleChangeFilters, handleChangeSorts, withAllField]);
80
+ const customHeaderComponent = useMemo(() => /* @__PURE__ */ jsx(StackCustomHeaderStyled, { direction: "row", ownerState: { showDynamicFilter: togglesLeftActions.filter, showDynamicSort: togglesLeftActions.sort }, ...getPropDataTestId(M4LDYNAMIC_KEY_FILTER_AND_SORT, DynamicFilterAndSortSlots.stackCustomHeader, dataTestId), children: dynamicsFiltersSorts }), [togglesLeftActions]);
81
+ return {
82
+ leftActions,
83
+ rightActions: finalRightActions,
84
+ visibleCustomHeader,
85
+ customHeaderComponent
86
+ };
87
+ };
88
+ export {
89
+ useDynamicFilterAndSort as u
90
+ };