@m4l/layouts 9.3.0 → 9.3.1-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.
@@ -55,7 +55,7 @@ export declare const colorsLight: {
55
55
  readonly backdrop: string;
56
56
  readonly base: string;
57
57
  readonly blur: string;
58
- readonly paper: "#000";
58
+ readonly paper: "#fff";
59
59
  };
60
60
  readonly chips: {
61
61
  readonly error: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
@@ -288,7 +288,7 @@ export declare const colorsLight: {
288
288
  readonly border: {
289
289
  readonly main: string;
290
290
  readonly dens: string;
291
- readonly default: string | undefined;
291
+ readonly default: string;
292
292
  readonly secondary: string;
293
293
  readonly disabled: string;
294
294
  readonly error: string;
@@ -440,7 +440,7 @@ export declare const colorsDark: {
440
440
  readonly backdrop: string;
441
441
  readonly base: string;
442
442
  readonly blur: string;
443
- readonly paper: "#000";
443
+ readonly paper: "#fff";
444
444
  };
445
445
  readonly chips: {
446
446
  readonly error: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
@@ -673,7 +673,7 @@ export declare const colorsDark: {
673
673
  readonly border: {
674
674
  readonly main: string;
675
675
  readonly dens: string;
676
- readonly default: string | undefined;
676
+ readonly default: string;
677
677
  readonly secondary: string;
678
678
  readonly disabled: string;
679
679
  readonly error: string;
@@ -19,118 +19,120 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
19
19
  size?: Extract<import('@m4l/styles').Sizes, "small" | "medium"> | undefined;
20
20
  children?: null | undefined;
21
21
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
22
- title?: string | undefined;
22
+ title?: string | undefined | undefined;
23
23
  component?: React.ElementType | undefined;
24
- id?: string | undefined;
24
+ id?: string | undefined | undefined;
25
25
  disabled?: boolean | undefined;
26
26
  action?: React.Ref<import('@mui/material').ButtonBaseActions> | undefined;
27
- hidden?: boolean | undefined;
27
+ hidden?: boolean | undefined | undefined;
28
28
  color?: Extract<import('@m4l/styles').ComponentPalletColor, "default"> | undefined;
29
- content?: string | undefined;
29
+ content?: string | undefined | undefined;
30
30
  style?: React.CSSProperties | undefined;
31
- translate?: "yes" | "no" | undefined;
31
+ translate?: "yes" | "no" | undefined | undefined;
32
32
  urlIcon?: string | undefined;
33
- lang?: string | undefined;
34
- slot?: string | undefined;
35
- dir?: string | undefined;
33
+ lang?: string | undefined | undefined;
34
+ slot?: string | undefined | undefined;
35
+ dir?: string | undefined | undefined;
36
36
  className?: string | undefined;
37
37
  classes?: (Partial<import('@mui/material').TabClasses> & Partial<import('@mui/material').ClassNameMap<never>>) | undefined;
38
38
  sx?: import('@mui/system').SxProps<import('@mui/material').Theme> | undefined;
39
39
  key?: import('react').Key | null | undefined;
40
- defaultChecked?: boolean | undefined;
40
+ defaultChecked?: boolean | undefined | undefined;
41
41
  defaultValue?: string | number | readonly string[] | undefined;
42
- suppressContentEditableWarning?: boolean | undefined;
43
- suppressHydrationWarning?: boolean | undefined;
44
- accessKey?: string | undefined;
45
- autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
46
- autoFocus?: boolean | undefined;
47
- contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
48
- contextMenu?: string | undefined;
42
+ suppressContentEditableWarning?: boolean | undefined | undefined;
43
+ suppressHydrationWarning?: boolean | undefined | undefined;
44
+ accessKey?: string | undefined | undefined;
45
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
46
+ autoFocus?: boolean | undefined | undefined;
47
+ contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
48
+ contextMenu?: string | undefined | undefined;
49
49
  draggable?: (boolean | "false" | "true") | undefined;
50
- enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
51
- nonce?: string | undefined;
50
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
51
+ nonce?: string | undefined | undefined;
52
52
  spellCheck?: (boolean | "false" | "true") | undefined;
53
53
  tabIndex?: NonNullable<React.HTMLAttributes<any>["tabIndex"]> | undefined;
54
- radioGroup?: string | undefined;
54
+ radioGroup?: string | undefined | undefined;
55
55
  role?: import('react').AriaRole | undefined;
56
- about?: string | undefined;
57
- datatype?: string | undefined;
56
+ about?: string | undefined | undefined;
57
+ datatype?: string | undefined | undefined;
58
58
  inlist?: any;
59
- prefix?: string | undefined;
60
- property?: string | undefined;
61
- rel?: string | undefined;
62
- resource?: string | undefined;
63
- rev?: string | undefined;
64
- typeof?: string | undefined;
65
- vocab?: string | undefined;
66
- autoCorrect?: string | undefined;
67
- autoSave?: string | undefined;
68
- itemProp?: string | undefined;
69
- itemScope?: boolean | undefined;
70
- itemType?: string | undefined;
71
- itemID?: string | undefined;
72
- itemRef?: string | undefined;
73
- results?: number | undefined;
74
- security?: string | undefined;
75
- unselectable?: "on" | "off" | undefined;
76
- inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
77
- is?: string | undefined;
78
- "aria-activedescendant"?: string | undefined;
59
+ prefix?: string | undefined | undefined;
60
+ property?: string | undefined | undefined;
61
+ rel?: string | undefined | undefined;
62
+ resource?: string | undefined | undefined;
63
+ rev?: string | undefined | undefined;
64
+ typeof?: string | undefined | undefined;
65
+ vocab?: string | undefined | undefined;
66
+ autoCorrect?: string | undefined | undefined;
67
+ autoSave?: string | undefined | undefined;
68
+ itemProp?: string | undefined | undefined;
69
+ itemScope?: boolean | undefined | undefined;
70
+ itemType?: string | undefined | undefined;
71
+ itemID?: string | undefined | undefined;
72
+ itemRef?: string | undefined | undefined;
73
+ results?: number | undefined | undefined;
74
+ security?: string | undefined | undefined;
75
+ unselectable?: "on" | "off" | undefined | undefined;
76
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
77
+ is?: string | undefined | undefined;
78
+ exportparts?: string | undefined | undefined;
79
+ part?: string | undefined | undefined;
80
+ "aria-activedescendant"?: string | undefined | undefined;
79
81
  "aria-atomic"?: (boolean | "false" | "true") | undefined;
80
- "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
81
- "aria-braillelabel"?: string | undefined;
82
- "aria-brailleroledescription"?: string | undefined;
82
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
83
+ "aria-braillelabel"?: string | undefined | undefined;
84
+ "aria-brailleroledescription"?: string | undefined | undefined;
83
85
  "aria-busy"?: (boolean | "false" | "true") | undefined;
84
- "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
85
- "aria-colcount"?: number | undefined;
86
- "aria-colindex"?: number | undefined;
87
- "aria-colindextext"?: string | undefined;
88
- "aria-colspan"?: number | undefined;
89
- "aria-controls"?: string | undefined;
90
- "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
91
- "aria-describedby"?: string | undefined;
92
- "aria-description"?: string | undefined;
93
- "aria-details"?: string | undefined;
86
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
87
+ "aria-colcount"?: number | undefined | undefined;
88
+ "aria-colindex"?: number | undefined | undefined;
89
+ "aria-colindextext"?: string | undefined | undefined;
90
+ "aria-colspan"?: number | undefined | undefined;
91
+ "aria-controls"?: string | undefined | undefined;
92
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
93
+ "aria-describedby"?: string | undefined | undefined;
94
+ "aria-description"?: string | undefined | undefined;
95
+ "aria-details"?: string | undefined | undefined;
94
96
  "aria-disabled"?: (boolean | "false" | "true") | undefined;
95
- "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
96
- "aria-errormessage"?: string | undefined;
97
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
98
+ "aria-errormessage"?: string | undefined | undefined;
97
99
  "aria-expanded"?: (boolean | "false" | "true") | undefined;
98
- "aria-flowto"?: string | undefined;
100
+ "aria-flowto"?: string | undefined | undefined;
99
101
  "aria-grabbed"?: (boolean | "false" | "true") | undefined;
100
- "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
102
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
101
103
  "aria-hidden"?: (boolean | "false" | "true") | undefined;
102
- "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
103
- "aria-keyshortcuts"?: string | undefined;
104
- "aria-label"?: string | undefined;
105
- "aria-labelledby"?: string | undefined;
106
- "aria-level"?: number | undefined;
107
- "aria-live"?: "off" | "assertive" | "polite" | undefined;
104
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
105
+ "aria-keyshortcuts"?: string | undefined | undefined;
106
+ "aria-label"?: string | undefined | undefined;
107
+ "aria-labelledby"?: string | undefined | undefined;
108
+ "aria-level"?: number | undefined | undefined;
109
+ "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
108
110
  "aria-modal"?: (boolean | "false" | "true") | undefined;
109
111
  "aria-multiline"?: (boolean | "false" | "true") | undefined;
110
112
  "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
111
- "aria-orientation"?: "horizontal" | "vertical" | undefined;
112
- "aria-owns"?: string | undefined;
113
- "aria-placeholder"?: string | undefined;
114
- "aria-posinset"?: number | undefined;
115
- "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
113
+ "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
114
+ "aria-owns"?: string | undefined | undefined;
115
+ "aria-placeholder"?: string | undefined | undefined;
116
+ "aria-posinset"?: number | undefined | undefined;
117
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
116
118
  "aria-readonly"?: (boolean | "false" | "true") | undefined;
117
- "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
119
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
118
120
  "aria-required"?: (boolean | "false" | "true") | undefined;
119
- "aria-roledescription"?: string | undefined;
120
- "aria-rowcount"?: number | undefined;
121
- "aria-rowindex"?: number | undefined;
122
- "aria-rowindextext"?: string | undefined;
123
- "aria-rowspan"?: number | undefined;
121
+ "aria-roledescription"?: string | undefined | undefined;
122
+ "aria-rowcount"?: number | undefined | undefined;
123
+ "aria-rowindex"?: number | undefined | undefined;
124
+ "aria-rowindextext"?: string | undefined | undefined;
125
+ "aria-rowspan"?: number | undefined | undefined;
124
126
  "aria-selected"?: (boolean | "false" | "true") | undefined;
125
- "aria-setsize"?: number | undefined;
126
- "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
127
- "aria-valuemax"?: number | undefined;
128
- "aria-valuemin"?: number | undefined;
129
- "aria-valuenow"?: number | undefined;
130
- "aria-valuetext"?: string | undefined;
127
+ "aria-setsize"?: number | undefined | undefined;
128
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
129
+ "aria-valuemax"?: number | undefined | undefined;
130
+ "aria-valuemin"?: number | undefined | undefined;
131
+ "aria-valuenow"?: number | undefined | undefined;
132
+ "aria-valuetext"?: string | undefined | undefined;
131
133
  dangerouslySetInnerHTML?: {
132
134
  __html: string | TrustedHTML;
133
- } | undefined;
135
+ } | undefined | undefined;
134
136
  onCopy?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
135
137
  onCopyCapture?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
136
138
  onCut?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
@@ -149,7 +151,7 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
149
151
  onBlurCapture?: import('react').FocusEventHandler<HTMLDivElement> | undefined;
150
152
  onChange?: import('react').FormEventHandler<HTMLDivElement> | undefined;
151
153
  onChangeCapture?: import('react').FormEventHandler<HTMLDivElement> | undefined;
152
- onBeforeInput?: import('react').FormEventHandler<HTMLDivElement> | undefined;
154
+ onBeforeInput?: import('react').InputEventHandler<HTMLDivElement> | undefined;
153
155
  onBeforeInputCapture?: import('react').FormEventHandler<HTMLDivElement> | undefined;
154
156
  onInput?: import('react').FormEventHandler<HTMLDivElement> | undefined;
155
157
  onInputCapture?: import('react').FormEventHandler<HTMLDivElement> | undefined;
@@ -199,8 +201,6 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
199
201
  onProgressCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
200
202
  onRateChange?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
201
203
  onRateChangeCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
202
- onResize?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
203
- onResizeCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
204
204
  onSeeked?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
205
205
  onSeekedCapture?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
206
206
  onSeeking?: import('react').ReactEventHandler<HTMLDivElement> | undefined;
@@ -291,6 +291,7 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
291
291
  onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLDivElement> | undefined;
292
292
  onTransitionEnd?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
293
293
  onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLDivElement> | undefined;
294
+ dataTestId?: string | undefined;
294
295
  centerRipple?: boolean | undefined;
295
296
  disableRipple?: boolean | undefined;
296
297
  disableTouchRipple?: boolean | undefined;
@@ -301,8 +302,8 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
301
302
  TouchRippleProps?: Partial<import('@mui/material/ButtonBase/TouchRipple').TouchRippleProps> | undefined;
302
303
  touchRippleRef?: React.Ref<import('@mui/material/ButtonBase/TouchRipple').TouchRippleActions> | undefined;
303
304
  disableFocusRipple?: boolean | undefined;
304
- dataTestId?: string | undefined;
305
- iconPosition?: ("top" | "bottom" | "start" | "end") | undefined;
305
+ ariaLabel?: string | undefined;
306
+ iconPosition?: "top" | "bottom" | "start" | "end" | undefined;
306
307
  wrapped?: boolean | undefined;
307
308
  }[];
308
309
  handleChangeTab: (newValue: string) => void;
@@ -17,6 +17,7 @@ function MasterDetailLayout(props) {
17
17
  detailComponent,
18
18
  moduleActions,
19
19
  version,
20
+ buildTime,
20
21
  splitPosition
21
22
  } = props;
22
23
  const { host_static_assets, environment_assets } = useEnvironment();
@@ -28,39 +29,41 @@ function MasterDetailLayout(props) {
28
29
  setSplitPositionState(newPostion);
29
30
  }, []);
30
31
  const splitActions = useMemo(
31
- () => [
32
- {
33
- iconUrl: `${host_static_assets}/${environment_assets}/${icons.splitVertical}`,
34
- onClick: () => onChangePostionInternal("vertical"),
35
- visibility: "main",
36
- label: getLabel(dictionary.LABEL_SPLIT_VERTICAL),
37
- tag: "vertical",
38
- className: "splitactions",
39
- disabled: splitPositionState === "vertical",
40
- key: "vertical"
41
- },
42
- {
43
- iconUrl: `${host_static_assets}/${environment_assets}/${icons.splitHorizontal}`,
44
- onClick: () => onChangePostionInternal("horizontal"),
45
- visibility: "main",
46
- label: getLabel(dictionary.LABEL_SPLIT_HORIZONTAL),
47
- tag: "horizontal",
48
- className: "splitactions",
49
- disabled: splitPositionState === "horizontal",
50
- key: "horizontal"
51
- },
52
- {
53
- iconUrl: `${host_static_assets}/${environment_assets}/${icons.noSplit}`,
54
- onClick: () => onChangePostionInternal("none"),
55
- visibility: "main",
56
- label: getLabel(dictionary.LABEL_NO_SPLIT),
57
- tag: "none",
58
- className: "splitactions",
59
- disabled: splitPositionState === "none",
60
- key: "none"
32
+ () => {
33
+ if (isMobile) {
34
+ return [];
61
35
  }
62
- ],
63
- [getLabel, splitPositionState, environment_assets, host_static_assets, onChangePostionInternal]
36
+ return [
37
+ {
38
+ iconUrl: `${host_static_assets}/${environment_assets}/${icons.splitVertical}`,
39
+ onClick: () => onChangePostionInternal("vertical"),
40
+ label: getLabel(dictionary.LABEL_SPLIT_VERTICAL),
41
+ className: "splitactions",
42
+ checkable: true,
43
+ checked: splitPositionState === "vertical",
44
+ key: "vertical"
45
+ },
46
+ {
47
+ iconUrl: `${host_static_assets}/${environment_assets}/${icons.splitHorizontal}`,
48
+ onClick: () => onChangePostionInternal("horizontal"),
49
+ label: getLabel(dictionary.LABEL_SPLIT_HORIZONTAL),
50
+ className: "splitactions",
51
+ checkable: true,
52
+ checked: splitPositionState === "horizontal",
53
+ key: "horizontal"
54
+ },
55
+ {
56
+ iconUrl: `${host_static_assets}/${environment_assets}/${icons.noSplit}`,
57
+ onClick: () => onChangePostionInternal("none"),
58
+ label: getLabel(dictionary.LABEL_NO_SPLIT),
59
+ className: "splitactions",
60
+ checkable: true,
61
+ checked: splitPositionState === "none",
62
+ key: "none"
63
+ }
64
+ ];
65
+ },
66
+ [isMobile, host_static_assets, environment_assets, getLabel, splitPositionState, onChangePostionInternal]
64
67
  );
65
68
  const onClickViewDetail = useCallback(() => {
66
69
  moduleLayoutRef.current?.openModal({
@@ -80,11 +83,12 @@ function MasterDetailLayout(props) {
80
83
  }, [detailComponent, getLabel]);
81
84
  const finalModuleActions = useMemo(() => {
82
85
  const actions = getTotalModuleActions(
86
+ splitPositionState,
83
87
  splitActions,
84
88
  moduleActions
85
89
  );
86
90
  return actions;
87
- }, [splitActions, moduleActions]);
91
+ }, [splitActions, moduleActions, splitPositionState]);
88
92
  const classRoot = getComponentSlotRoot(MASTER_DETAIL_LAYOUT_PREFIX);
89
93
  return /* @__PURE__ */ jsx(MasterDetailProvider, { onClickViewDetail, children: /* @__PURE__ */ jsx(MasterDetailLayoutRootStyled, { className: classRoot, children: /* @__PURE__ */ jsx(
90
94
  ModuleLayout,
@@ -93,6 +97,7 @@ function MasterDetailLayout(props) {
93
97
  moduleId,
94
98
  moduleActions: finalModuleActions,
95
99
  version,
100
+ buildTime,
96
101
  children: /* @__PURE__ */ jsx(
97
102
  SplitLayout,
98
103
  {
@@ -1,5 +1,5 @@
1
- import { ModuleAction } from '@m4l/components';
1
+ import { ModuleAction, GroupActionMenuItem } from '@m4l/components';
2
2
  /**
3
3
  * Obtiene las acciones totales del modulo
4
4
  */
5
- export declare function getTotalModuleActions(splitActions: ModuleAction[], moduleActions?: ModuleAction[]): ModuleAction[];
5
+ export declare function getTotalModuleActions(selectedActionKey: string, splitActions: GroupActionMenuItem[], moduleActions?: ModuleAction[]): ModuleAction[];
@@ -1,6 +1,13 @@
1
- function getTotalModuleActions(splitActions, moduleActions = []) {
2
- let totalActions = [...splitActions];
3
- totalActions = moduleActions.concat(totalActions);
1
+ function getTotalModuleActions(selectedActionKey, splitActions, moduleActions = []) {
2
+ let totalActions = [];
3
+ const groupAction = {
4
+ type: "groupActions",
5
+ actions: splitActions,
6
+ key: "splitActions",
7
+ selectedActionKey,
8
+ visibility: "main"
9
+ };
10
+ totalActions = moduleActions.concat(groupAction);
4
11
  return totalActions;
5
12
  }
6
13
  export {
@@ -4,7 +4,7 @@ import { forwardRef, useRef, useImperativeHandle } from "react";
4
4
  import { B as BaseModuleLayout } from "./subcomponents/BaseModuleLayout/index.js";
5
5
  import { a as ModuleProvider } from "./contexts/ModuleContext/index.js";
6
6
  const ModuleLayout = forwardRef((props, ref) => {
7
- const { moduleId, moduleActions, version, children } = props;
7
+ const { moduleId, moduleActions, version, children, buildTime } = props;
8
8
  const moduleRef = useRef(null);
9
9
  const closeModal = () => {
10
10
  moduleRef.current?.closeModal();
@@ -17,7 +17,16 @@ const ModuleLayout = forwardRef((props, ref) => {
17
17
  closeModal,
18
18
  current: moduleRef.current
19
19
  }));
20
- return /* @__PURE__ */ jsx(ModuleProvider, { moduleId, moduleActions, version, children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(BaseModuleLayout, { ref: moduleRef, children }) }) });
20
+ return /* @__PURE__ */ jsx(
21
+ ModuleProvider,
22
+ {
23
+ moduleId,
24
+ moduleActions,
25
+ version,
26
+ buildTime,
27
+ children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(BaseModuleLayout, { ref: moduleRef, children }) })
28
+ }
29
+ );
21
30
  });
22
31
  export {
23
32
  ModuleLayout as M
@@ -4,7 +4,7 @@ import { createContext, useRef, useEffect } from "react";
4
4
  import { c as createModuleLayoutStore } from "./store.js";
5
5
  const ModuleContext = createContext(null);
6
6
  function ModuleProvider(props) {
7
- const { children, moduleActions, moduleId, version } = props;
7
+ const { children, moduleActions, moduleId, version, buildTime } = props;
8
8
  const { setActions } = useWindowToolsMF();
9
9
  const moduleLayoutStoreRef = useRef();
10
10
  useEffect(() => {
@@ -17,6 +17,7 @@ function ModuleProvider(props) {
17
17
  moduleActions,
18
18
  moduleId,
19
19
  version,
20
+ buildTime,
20
21
  setActions
21
22
  });
22
23
  moduleLayoutStoreRef.current.getState().init();
@@ -10,7 +10,7 @@ const createDevtools = (immerMiddlewere, config) => {
10
10
  return immerMiddlewere;
11
11
  };
12
12
  const createModuleLayoutStore = (initProps, storeDevtoolsEnabled = false) => {
13
- const { moduleActions, moduleId, version, setActions } = initProps;
13
+ const { moduleActions, moduleId, version, setActions, buildTime } = initProps;
14
14
  const startProps = {
15
15
  configOptions: {
16
16
  moduleId
@@ -18,7 +18,8 @@ const createModuleLayoutStore = (initProps, storeDevtoolsEnabled = false) => {
18
18
  dynamicActions: [],
19
19
  finalModuleActions: [],
20
20
  moduleActions: [],
21
- version
21
+ version,
22
+ buildTime
22
23
  };
23
24
  return create(
24
25
  createDevtools(
@@ -40,7 +41,7 @@ const createModuleLayoutStore = (initProps, storeDevtoolsEnabled = false) => {
40
41
  const actionsConcatenated = (moduleActions || []).concat(dynamicActions);
41
42
  state.dynamicActions = dynamicActions;
42
43
  state.finalModuleActions = actionsConcatenated;
43
- setActions(actionsConcatenated, state.version);
44
+ setActions(actionsConcatenated, state.version, state.buildTime);
44
45
  });
45
46
  },
46
47
  /**
@@ -51,7 +52,7 @@ const createModuleLayoutStore = (initProps, storeDevtoolsEnabled = false) => {
51
52
  const actionsConcatenated = newModuleActions.concat(state.dynamicActions);
52
53
  state.moduleActions = moduleActions;
53
54
  state.finalModuleActions = actionsConcatenated;
54
- setActions(actionsConcatenated, state.version);
55
+ setActions(actionsConcatenated, state.version, state.buildTime);
55
56
  });
56
57
  }
57
58
  })),
@@ -5,7 +5,9 @@ export interface ModuleLayoutContextStateProps {
5
5
  }
6
6
  export interface ModuleLayoutProviderProps extends Omit<ModuleLayoutContextStateProps, 'init'> {
7
7
  children: ReactNode;
8
- version: string;
8
+ /**
9
+ * "moduleActions" acciones del módulo
10
+ */
9
11
  moduleActions?: ModuleAction[];
10
12
  /**
11
13
  * "storeId" identificador del store
@@ -15,6 +17,14 @@ export interface ModuleLayoutProviderProps extends Omit<ModuleLayoutContextState
15
17
  * "storeDevtoolsEnabled" determina si se debe usar devtools para el store
16
18
  */
17
19
  storeDevtoolsEnabled?: boolean;
20
+ /**
21
+ * "version" versión del módulo
22
+ */
23
+ version: string;
24
+ /**
25
+ * "buildTime" fecha de compilación del módulo
26
+ */
27
+ buildTime?: string;
18
28
  }
19
29
  export interface ModuleLayoutContextProps extends ModuleLayoutContextStateProps {
20
30
  setDynamicActions: (dynamicActions: ModuleAction[]) => void;
@@ -40,6 +50,10 @@ export interface ModuleLayoutState extends Pick<ModuleLayoutProviderProps, 'stor
40
50
  * "version" Versión del módulo
41
51
  */
42
52
  version: string;
53
+ /**
54
+ * "buildTime" fecha de compilación del módulo
55
+ */
56
+ buildTime?: string;
43
57
  }
44
58
  export interface ModuleLayoutStateWithActions extends ModuleLayoutState {
45
59
  /**
@@ -55,4 +69,4 @@ export interface ModuleLayoutStateWithActions extends ModuleLayoutState {
55
69
  */
56
70
  updateModuleActions: (moduleActions: ModuleAction[]) => void;
57
71
  }
58
- export type InitialModuleLayoutStoreProps = Pick<ModuleLayoutState, 'moduleActions' | 'version' | 'storeId'> & Pick<WindowToolsMF, 'setActions'> & ModuleLayoutContextStateProps;
72
+ export type InitialModuleLayoutStoreProps = Pick<ModuleLayoutState, 'moduleActions' | 'version' | 'storeId' | 'buildTime'> & Pick<WindowToolsMF, 'setActions'> & ModuleLayoutContextStateProps;
@@ -18,6 +18,7 @@ export interface ModuleLayoutProps {
18
18
  moduleActions?: ModuleAction[];
19
19
  children: ReactNode;
20
20
  version: string;
21
+ buildTime?: string;
21
22
  }
22
23
  export type ModuleLayoutSlotsType = keyof typeof ModuleLayoutSlots;
23
24
  export type ModuleLayoutStyles = OverridesStyleRules<ModuleLayoutSlotsType, typeof MODULE_LAYOUT_KEY, Theme>;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "9.3.0",
3
+ "version": "9.3.1-beta.2",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team ",
6
6
  "lint-staged": {
7
7
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
8
8
  },
9
9
  "peerDependencies": {
10
- "@m4l/components": "^9.0.0",
10
+ "@m4l/components": "9.2.56-beta.2",
11
11
  "@m4l/core": "^2.0.0",
12
- "@m4l/graphics": "^7.0.0",
13
- "@m4l/styles": "^7.0.0"
12
+ "@m4l/graphics": "7.1.1-beta.2",
13
+ "@m4l/styles": "7.1.28-beta.2"
14
14
  },
15
15
  "resolutions": {
16
16
  "glob": "^10.4.5",