@m4l/layouts 9.1.13 → 9.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ModuleDetailTabs/useModuleDatailTabs.d.ts +83 -83
- package/hooks/index.d.ts +1 -0
- package/hooks/useDynamicAccordions/useBaseAccordions.js +2 -2
- package/hooks/useDynamicPaperForm/index.d.ts +2 -0
- package/hooks/useDynamicPaperForm/index.js +1 -0
- package/hooks/useDynamicPaperForm/types.d.ts +25 -0
- package/hooks/useDynamicPaperForm/useDynamicPaperForm.d.ts +9 -0
- package/hooks/useDynamicPaperForm/useDynamicPaperForm.js +55 -0
- package/index.js +5 -2
- package/layouts/MasterDetailLayout/MasterDetailLayout.js +15 -18
- package/layouts/MasterDetailLayout/constants.d.ts +2 -0
- package/layouts/MasterDetailLayout/constants.js +6 -0
- package/layouts/MasterDetailLayout/contexts/MasterDetailContext/index.js +14 -5
- package/layouts/MasterDetailLayout/contexts/MasterDetailContext/store.d.ts +16 -0
- package/layouts/MasterDetailLayout/contexts/MasterDetailContext/store.js +50 -0
- package/layouts/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +28 -0
- package/layouts/MasterDetailLayout/dicctionary.d.ts +6 -2
- package/layouts/MasterDetailLayout/dicctionary.js +8 -3
- package/layouts/MasterDetailLayout/helpers/getTotalModuleActions.d.ts +5 -0
- package/layouts/MasterDetailLayout/helpers/getTotalModuleActions.js +8 -0
- package/layouts/MasterDetailLayout/icons.d.ts +5 -0
- package/layouts/MasterDetailLayout/icons.js +8 -0
- package/layouts/MasterDetailLayout/slots/MasterDetailLayoutEnum.d.ts +3 -0
- package/layouts/MasterDetailLayout/slots/MasterDetailLayoutEnum.js +7 -0
- package/layouts/MasterDetailLayout/slots/MasterDetailLayoutSlot.d.ts +1 -0
- package/layouts/MasterDetailLayout/slots/MasterDetailLayoutSlot.js +11 -0
- package/layouts/MasterDetailLayout/styles.d.ts +2 -1
- package/layouts/MasterDetailLayout/styles.js +37 -5
- package/layouts/MasterDetailLayout/tests/MasterDetailLayout.test.d.ts +1 -0
- package/layouts/MasterDetailLayout/types.d.ts +6 -0
- package/layouts/ModuleLayout/contexts/ModuleContext/store.js +3 -1
- package/package.json +1 -1
- package/storybook/layouts/MasterDetailLayout/MasterDetailLayout.stories.d.ts +6 -0
- package/storybook/layouts/MasterDetailLayout/moks/mokData.d.ts +7 -0
- package/storybook/layouts/MasterDetailLayout/subcomponents/RenderMasterDetailLayout.d.ts +6 -0
- package/test/constants.d.ts +0 -2
- package/test/mocks.d.ts +2 -0
- package/commonjs/index.js +0 -7
- package/layouts/MasterDetailLayout/classes/constants.d.ts +0 -1
- package/layouts/MasterDetailLayout/classes/constants.js +0 -4
- package/layouts/MasterDetailLayout/classes/index.d.ts +0 -9
- package/layouts/MasterDetailLayout/classes/index.js +0 -23
- package/layouts/MasterDetailLayout/classes/types.d.ts +0 -6
- package/not_recognized/index.js +0 -963
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const icons = {
|
|
2
|
+
splitVertical: "frontend/components/masterdetaillayout/assets/icons/split_vertical.svg",
|
|
3
|
+
splitHorizontal: "frontend/components/masterdetaillayout/assets/icons/split_horizontal.svg",
|
|
4
|
+
noSplit: "frontend/components/masterdetaillayout/assets/icons/no_split.svg"
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
icons as i
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var MasterDetailLayoutSlots = /* @__PURE__ */ ((MasterDetailLayoutSlots2) => {
|
|
2
|
+
MasterDetailLayoutSlots2["masterDetailLayoutRoot"] = "MasterDetailLayoutRoot";
|
|
3
|
+
return MasterDetailLayoutSlots2;
|
|
4
|
+
})(MasterDetailLayoutSlots || {});
|
|
5
|
+
export {
|
|
6
|
+
MasterDetailLayoutSlots as M
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MasterDetailLayoutRootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown>, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import styled from "@mui/material/styles/styled";
|
|
2
|
+
import { M as MASTER_DETAIL_LAYOUT_PREFIX } from "../constants.js";
|
|
3
|
+
import { M as MasterDetailLayoutSlots } from "./MasterDetailLayoutEnum.js";
|
|
4
|
+
import { m as masterDetailLayoutStyles } from "../styles.js";
|
|
5
|
+
const MasterDetailLayoutRootStyled = styled("div", {
|
|
6
|
+
name: MASTER_DETAIL_LAYOUT_PREFIX,
|
|
7
|
+
slot: MasterDetailLayoutSlots.masterDetailLayoutRoot
|
|
8
|
+
})(masterDetailLayoutStyles.masterDetailLayoutRoot);
|
|
9
|
+
export {
|
|
10
|
+
MasterDetailLayoutRootStyled as M
|
|
11
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { MasterDetailLayoutStyles } from './types';
|
|
2
|
+
export declare const masterDetailLayoutStyles: MasterDetailLayoutStyles;
|
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { M as MASTER_DETAIL_LAYOUT_PREFIX } from "./constants.js";
|
|
2
|
+
const masterDetailLayoutStyles = {
|
|
3
|
+
/**
|
|
4
|
+
* Estilos para el componente root del MasterDetailLayout
|
|
5
|
+
*/
|
|
6
|
+
masterDetailLayoutRoot: ({ theme }) => ({
|
|
7
|
+
[`&.${MASTER_DETAIL_LAYOUT_PREFIX}-root`]: {
|
|
8
|
+
display: "flex",
|
|
9
|
+
width: "100%",
|
|
10
|
+
height: "100%",
|
|
11
|
+
overFlow: "visible",
|
|
12
|
+
"& .M4LModuleLayout-root .M4LModuleLayout-moduleContent": {
|
|
13
|
+
display: "flex",
|
|
14
|
+
width: "100%",
|
|
15
|
+
height: "100%",
|
|
16
|
+
boxShadow: "none",
|
|
17
|
+
background: theme.vars.palette.background.default,
|
|
18
|
+
border: theme.vars.size.borderRadius.r0,
|
|
19
|
+
borderColor: "transparent",
|
|
20
|
+
borderRadius: theme.vars.size.borderRadius.r1,
|
|
21
|
+
overFlow: "visible",
|
|
22
|
+
"& .splitter-layout": {
|
|
23
|
+
gap: theme.vars.size.borderRadius.r2
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"& .M4LSplitLayout-secondPart": {
|
|
27
|
+
background: theme.vars.palette.background.default,
|
|
28
|
+
borderRadius: theme.vars.size.borderRadius.r1
|
|
29
|
+
},
|
|
30
|
+
"& .layout-pane-primary": {
|
|
31
|
+
background: theme.vars.palette.background.default,
|
|
32
|
+
borderRadius: theme.vars.size.borderRadius.r1
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
};
|
|
5
37
|
export {
|
|
6
|
-
|
|
38
|
+
masterDetailLayoutStyles as m
|
|
7
39
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ModuleLayoutProps } from '../ModuleLayout/types';
|
|
3
|
+
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
4
|
+
import { MasterDetailLayoutSlots } from './slots/MasterDetailLayoutEnum';
|
|
5
|
+
import { MASTER_DETAIL_LAYOUT_PREFIX } from './constants';
|
|
6
|
+
import { Theme } from '@mui/material/styles';
|
|
3
7
|
export interface ContainerProps {
|
|
4
8
|
vertical: boolean;
|
|
5
9
|
}
|
|
@@ -7,3 +11,5 @@ export interface MasterDetailLayoutProps extends Omit<ModuleLayoutProps, 'childr
|
|
|
7
11
|
masterComponent: ((props?: any) => JSX.Element) | ReactNode;
|
|
8
12
|
detailComponent: ((props?: any) => JSX.Element) | ReactNode;
|
|
9
13
|
}
|
|
14
|
+
export type MasterDetailLayoutSlotsType = keyof typeof MasterDetailLayoutSlots;
|
|
15
|
+
export type MasterDetailLayoutStyles = OverridesStyleRules<MasterDetailLayoutSlotsType, typeof MASTER_DETAIL_LAYOUT_PREFIX, Theme>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { create } from "zustand";
|
|
2
|
+
import { devtools } from "zustand/middleware";
|
|
3
|
+
import { immer } from "zustand/middleware/immer";
|
|
2
4
|
import { M as MODULE_LAYOUT_STORE_ID } from "../../constants.js";
|
|
3
5
|
const createDevtools = (immerMiddlewere, config) => {
|
|
4
6
|
const { enabled = false } = config;
|
package/package.json
CHANGED
package/test/constants.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Formatters } from '@m4l/graphics';
|
|
2
1
|
import { HostToolsType, Toaster } from '@m4l/core';
|
|
3
2
|
import { BaseDataForTesting } from './types';
|
|
4
3
|
export declare const moduleIdForTesting = "testing";
|
|
@@ -66,4 +65,3 @@ export declare const environmentDataForTesting: {
|
|
|
66
65
|
export declare const baseDataForTesting: BaseDataForTesting;
|
|
67
66
|
export declare const mock_toaster: Toaster;
|
|
68
67
|
export declare const hostToolsDataForTesting: HostToolsType;
|
|
69
|
-
export declare const formatterValues: Formatters;
|
package/test/mocks.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Formatters } from '@m4l/graphics';
|
|
1
2
|
import * as core from '@m4l/core';
|
|
2
3
|
import * as graphics from '@m4l/graphics';
|
|
3
4
|
export declare const mock_addFlag: import('vitest').Mock<(...args: any[]) => any>;
|
|
@@ -14,6 +15,7 @@ export declare const mock_useEnvironment: {
|
|
|
14
15
|
environment_assets: string;
|
|
15
16
|
domain_token: string;
|
|
16
17
|
};
|
|
18
|
+
export declare const formatterValues: Formatters;
|
|
17
19
|
export declare const mockedGraphics: {
|
|
18
20
|
useFormatter: import('vitest').MockInstance<() => graphics.Formatters>;
|
|
19
21
|
};
|
package/commonjs/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const componentName = "M4LMasterDetailLayout";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { MasterDetailLayoutClassesType } from './types';
|
|
2
|
-
export declare const masterDetailLayoutClasses: MasterDetailLayoutClassesType;
|
|
3
|
-
export declare function getMasterDetailLayoutUtilityClass(slot: string): string;
|
|
4
|
-
/**
|
|
5
|
-
* Hook para obtener las clases del componente MasterDetailLayout
|
|
6
|
-
*/
|
|
7
|
-
export declare const getMasterDetailLayoutUtilityClasses: () => {
|
|
8
|
-
root: string;
|
|
9
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { c as componentName } from "./constants.js";
|
|
4
|
-
generateUtilityClasses(componentName, [
|
|
5
|
-
/* elements */
|
|
6
|
-
"root"
|
|
7
|
-
/* states or variants of elements */
|
|
8
|
-
]);
|
|
9
|
-
function getMasterDetailLayoutUtilityClass(slot) {
|
|
10
|
-
return generateUtilityClass(componentName, slot);
|
|
11
|
-
}
|
|
12
|
-
const getMasterDetailLayoutUtilityClasses = () => {
|
|
13
|
-
const slots = {
|
|
14
|
-
root: ["root"]
|
|
15
|
-
};
|
|
16
|
-
const composedClasses = unstable_composeClasses(slots, getMasterDetailLayoutUtilityClass, {});
|
|
17
|
-
return {
|
|
18
|
-
...composedClasses
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
getMasterDetailLayoutUtilityClasses as g
|
|
23
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { getMasterDetailLayoutUtilityClasses } from '.';
|
|
2
|
-
export interface MasterDetailLayoutClassesType {
|
|
3
|
-
root: string;
|
|
4
|
-
}
|
|
5
|
-
export type MasterDetailLayoutClassesKey = keyof MasterDetailLayoutClassesType;
|
|
6
|
-
export type Classes = ReturnType<typeof getMasterDetailLayoutUtilityClasses>;
|