@m4l/components 9.3.8-BE190825-beta.2 → 9.3.8-JT200825.beta.1
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/@types/types.d.ts +0 -9
- package/components/DataGrid/contexts/DataGridContext/index.js +2 -2
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +4 -2
- package/components/DataGrid/types.d.ts +2 -0
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +0 -2
- package/components/PaperForm/PaperForm.js +4 -6
- package/components/PaperForm/styles.js +10 -21
- package/components/PaperForm/types.d.ts +2 -3
- package/components/PropertyValue/PropertyValue.styles.js +0 -1
- package/components/areas/contexts/AreasContext/store.js +2 -2
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +0 -5
- package/components/index.d.ts +1 -2
- package/index.js +2 -4
- package/package.json +1 -1
- package/storybook/components/DataGrid/subcomponents/DataGridRender.d.ts +2 -0
- package/storybook/components/paperForm/PaperForm.stories.d.ts +0 -5
- package/components/FormContainer/FormContainer.d.ts +0 -7
- package/components/FormContainer/FormContainer.js +0 -21
- package/components/FormContainer/FormContainer.styles.d.ts +0 -2
- package/components/FormContainer/FormContainer.styles.js +0 -27
- package/components/FormContainer/constants.d.ts +0 -2
- package/components/FormContainer/constants.js +0 -8
- package/components/FormContainer/index.d.ts +0 -1
- package/components/FormContainer/index.js +0 -1
- package/components/FormContainer/slots/FormContainerEnum.d.ts +0 -5
- package/components/FormContainer/slots/FormContainerEnum.js +0 -9
- package/components/FormContainer/slots/FormContainerSlots.d.ts +0 -9
- package/components/FormContainer/slots/FormContainerSlots.js +0 -22
- package/components/FormContainer/test/FormContainer.test.d.ts +0 -1
- package/components/FormContainer/types.d.ts +0 -11
- package/components/PaperForm/index.js +0 -1
- package/storybook/components/FormContainer/FormContainer.stories.d.ts +0 -13
package/@types/types.d.ts
CHANGED
|
@@ -153,8 +153,6 @@ import { CardOwnerState, CardSlotsType } from '../components/Card/types';
|
|
|
153
153
|
import { ContainerFlowOwnerState, ContainerFlowSlotsType } from '../components/ContainerFlow/types';
|
|
154
154
|
import { NoItemPrivilegesOwnerState, NoItemPrivilegesSlotsType } from '../components/NoItemPrivileges/types';
|
|
155
155
|
import { ImageTextOwnerState, ImageTextSlotsType } from '../components/ImageText/types';
|
|
156
|
-
import { FormContainerOwnerState, FormContainerSlotsType } from '../components/FormContainer/types';
|
|
157
|
-
|
|
158
156
|
declare module '@mui/material/styles' {
|
|
159
157
|
// Define the slots in the theme
|
|
160
158
|
interface ComponentNameToClassKey {
|
|
@@ -240,7 +238,6 @@ declare module '@mui/material/styles' {
|
|
|
240
238
|
M4LNoItemPrivileges: NoItemPrivilegesSlotsType;
|
|
241
239
|
M4LSettingsLayoutBase: SettingsLayoutSlotsType;
|
|
242
240
|
M4LImageText: ImageTextSlotsType;
|
|
243
|
-
M4LFormContainer: FormContainerSlotsType;
|
|
244
241
|
}
|
|
245
242
|
interface ComponentsPropsList {
|
|
246
243
|
// Extend ComponentsProps or ComponentsOwnerState(this extend ComponentProps)
|
|
@@ -326,7 +323,6 @@ declare module '@mui/material/styles' {
|
|
|
326
323
|
M4LNoItemPrivileges: Partial<NoItemPrivilegesOwnerState>;
|
|
327
324
|
M4LSettingsLayoutBase: Partial<SettingsLayoutOwnerState>;
|
|
328
325
|
M4LImageText: Partial<ImageTextOwnerState>;
|
|
329
|
-
M4LFormContainer: Partial<FormContainerOwnerState>;
|
|
330
326
|
}
|
|
331
327
|
interface Components {
|
|
332
328
|
M4LDynamicFilter?: {
|
|
@@ -749,10 +745,5 @@ declare module '@mui/material/styles' {
|
|
|
749
745
|
styleOverrides?: ComponentsOverrides<Theme>['M4LImageText'];
|
|
750
746
|
variants?: ComponentsVariants['M4LImageText'];
|
|
751
747
|
};
|
|
752
|
-
M4LFormContainer?: {
|
|
753
|
-
defaultProps?: ComponentsPropsList['M4LFormContainer'];
|
|
754
|
-
styleOverrides?: ComponentsOverrides<Theme>['M4LFormContainer'];
|
|
755
|
-
variants?: ComponentsVariants['M4LFormContainer'];
|
|
756
|
-
};
|
|
757
748
|
}
|
|
758
749
|
}
|
|
@@ -166,7 +166,7 @@ function DataGridProvider(props) {
|
|
|
166
166
|
});
|
|
167
167
|
useEffect(() => {
|
|
168
168
|
const keys = new Set(columns.map((c) => c.key));
|
|
169
|
-
if (sortSettings?.sortsColumns) {
|
|
169
|
+
if (sortSettings?.sortsColumns && !sortSettings.skipColumnValidation) {
|
|
170
170
|
for (const sort of sortSettings.sortsColumns) {
|
|
171
171
|
if (!keys.has(sort)) {
|
|
172
172
|
throw new Error(
|
|
@@ -175,7 +175,7 @@ function DataGridProvider(props) {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
if (filterSettings?.filterColumns) {
|
|
178
|
+
if (filterSettings?.filterColumns && !filterSettings.skipColumnValidation) {
|
|
179
179
|
for (const filterField of filterSettings.filterColumns) {
|
|
180
180
|
if (!keys.has(filterField.name)) {
|
|
181
181
|
throw new Error(
|
|
@@ -17,7 +17,6 @@ function getComparator(columns, sortColumn) {
|
|
|
17
17
|
return column.customSort;
|
|
18
18
|
}
|
|
19
19
|
switch (typeOrder) {
|
|
20
|
-
//Si el tipo de dato de la columna es un numerico, retorna una función de ordenamiento numérica
|
|
21
20
|
case "number":
|
|
22
21
|
return (a, b) => {
|
|
23
22
|
try {
|
|
@@ -26,7 +25,6 @@ function getComparator(columns, sortColumn) {
|
|
|
26
25
|
return -1;
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
|
-
//Por defecto retorna una función de ordenamiento de string
|
|
30
28
|
default:
|
|
31
29
|
return (a, b) => {
|
|
32
30
|
try {
|
|
@@ -185,6 +183,10 @@ const useSortColumnsRows = (sourceColumns, sourceRows, popoverHandlers) => {
|
|
|
185
183
|
let fixedValue;
|
|
186
184
|
if (typeof valueMaybeString === "string") {
|
|
187
185
|
fixedValue = valueMaybeString;
|
|
186
|
+
} else if (typeof valueMaybeString === "number") {
|
|
187
|
+
fixedValue = valueMaybeString.toString();
|
|
188
|
+
} else if (valueMaybeString !== null && valueMaybeString !== void 0) {
|
|
189
|
+
fixedValue = String(valueMaybeString);
|
|
188
190
|
} else {
|
|
189
191
|
fixedValue = "";
|
|
190
192
|
}
|
|
@@ -88,6 +88,7 @@ export interface SortSettings {
|
|
|
88
88
|
sortsColumns: string[];
|
|
89
89
|
sortsApplied: SortApplied[];
|
|
90
90
|
onChange: (event: SortChangeEvent) => void;
|
|
91
|
+
skipColumnValidation?: boolean;
|
|
91
92
|
}
|
|
92
93
|
/**---------------------------------------------------------------- */
|
|
93
94
|
export type FilterChangeAdd = {
|
|
@@ -110,6 +111,7 @@ export interface FilterSettings {
|
|
|
110
111
|
filterColumns: FilterColumn[];
|
|
111
112
|
filtersApplied: FilterApplied[];
|
|
112
113
|
onChange: (event: FilterChangeEvent) => void;
|
|
114
|
+
skipColumnValidation?: boolean;
|
|
113
115
|
}
|
|
114
116
|
/**--------------------Termina tipado de filtros-------------------------------------------- */
|
|
115
117
|
export interface GridProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> extends Omit<NativeDataGridProps<TRow, TSummaryRow>, 'rowKeyGetter' | 'rows' | 'columns' | 'onRowsChange' | 'selectedRows' | 'onSelectedRowsChange' | 'renderers'> {
|
|
@@ -56,11 +56,9 @@ const useNumberInput = (parameters) => {
|
|
|
56
56
|
(event, field, fieldValue, reason) => {
|
|
57
57
|
if (field === "value" && typeof fieldValue !== "string") {
|
|
58
58
|
switch (reason) {
|
|
59
|
-
// only a blur event will dispatch `numberInput:clamp`
|
|
60
59
|
case "numberInput:inputChange":
|
|
61
60
|
onChange?.(event, fieldValue);
|
|
62
61
|
break;
|
|
63
|
-
// only a blur event will dispatch `numberInput:clamp`
|
|
64
62
|
case "numberInput:clamp":
|
|
65
63
|
onChange?.(event, fieldValue);
|
|
66
64
|
break;
|
|
@@ -24,8 +24,7 @@ function PaperForm(props) {
|
|
|
24
24
|
color = "default",
|
|
25
25
|
size = "medium",
|
|
26
26
|
isForm = false,
|
|
27
|
-
variant = "standard"
|
|
28
|
-
height = "auto"
|
|
27
|
+
variant = "standard"
|
|
29
28
|
} = props;
|
|
30
29
|
const { currentSize } = useComponentSize(size);
|
|
31
30
|
const paperFormRef = useRef(null);
|
|
@@ -34,8 +33,7 @@ function PaperForm(props) {
|
|
|
34
33
|
size: currentSize,
|
|
35
34
|
color,
|
|
36
35
|
isForm,
|
|
37
|
-
paperFormVariant: variant
|
|
38
|
-
height
|
|
36
|
+
paperFormVariant: variant
|
|
39
37
|
};
|
|
40
38
|
return /* @__PURE__ */ jsxs(
|
|
41
39
|
PaperFormRootStyled,
|
|
@@ -45,8 +43,8 @@ function PaperForm(props) {
|
|
|
45
43
|
ownerState: { ...ownerState },
|
|
46
44
|
...process.env.NODE_ENV !== "production" ? { "data-testid": dataTestId } : {},
|
|
47
45
|
children: [
|
|
48
|
-
|
|
49
|
-
/* @__PURE__ */ jsx(ContentStyled, { ownerState: {
|
|
46
|
+
/* @__PURE__ */ jsx(Header, { urlIcon, title, color, size }),
|
|
47
|
+
/* @__PURE__ */ jsx(ContentStyled, { ownerState: { isForm }, children: renderChildren(children) })
|
|
50
48
|
]
|
|
51
49
|
}
|
|
52
50
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as getHeightSizeStyles } from "../../utils/getSizeStyles/getSizeStyles.js";
|
|
2
2
|
const paperFormStyles = {
|
|
3
3
|
/**
|
|
4
4
|
*************************************************************
|
|
@@ -6,25 +6,14 @@ const paperFormStyles = {
|
|
|
6
6
|
* @param theme
|
|
7
7
|
***********************************************************
|
|
8
8
|
*/
|
|
9
|
-
paperFormRoot: ({ theme
|
|
9
|
+
paperFormRoot: ({ theme }) => ({
|
|
10
|
+
borderRadius: theme.size.borderRadius.r1,
|
|
10
11
|
background: theme.vars.palette.background.default,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
border: `${theme.size.borderStroke.container}`,
|
|
14
|
-
borderColor: theme.vars.palette.border.default
|
|
15
|
-
},
|
|
12
|
+
border: `${theme.size.borderStroke.container}`,
|
|
13
|
+
borderColor: theme.vars.palette.border.default,
|
|
16
14
|
overflow: "hidden",
|
|
17
15
|
width: "100%",
|
|
18
|
-
|
|
19
|
-
flexGrow: 1,
|
|
20
|
-
overflow: "auto",
|
|
21
|
-
display: "flex",
|
|
22
|
-
flexDirection: "column"
|
|
23
|
-
},
|
|
24
|
-
...ownerState?.height === "auto" && {
|
|
25
|
-
height: "auto"
|
|
26
|
-
},
|
|
27
|
-
flexShrink: 0,
|
|
16
|
+
height: "auto",
|
|
28
17
|
container: "container / inline-size"
|
|
29
18
|
}),
|
|
30
19
|
/**
|
|
@@ -43,8 +32,8 @@ const paperFormStyles = {
|
|
|
43
32
|
borderRadius: `${theme.vars.size.borderRadius.r1} ${theme.vars.size.borderRadius.r1} 0 0`,
|
|
44
33
|
background: theme.vars.palette[ownerState?.color ?? "default"].hoverOpacity,
|
|
45
34
|
alignSelf: "stretch",
|
|
46
|
-
...
|
|
47
|
-
theme,
|
|
35
|
+
...getHeightSizeStyles(
|
|
36
|
+
theme.generalSettings.isMobile,
|
|
48
37
|
ownerState?.size || "medium",
|
|
49
38
|
"container"
|
|
50
39
|
)
|
|
@@ -78,14 +67,14 @@ const paperFormStyles = {
|
|
|
78
67
|
*/
|
|
79
68
|
containerContent: ({ theme, ownerState }) => ({
|
|
80
69
|
width: "100%",
|
|
81
|
-
height:
|
|
70
|
+
height: "auto",
|
|
82
71
|
display: "flex",
|
|
83
72
|
flexDirection: ownerState?.isForm ? "row" : "column",
|
|
84
73
|
alignItems: ownerState?.isForm ? "flex-start" : "center",
|
|
85
74
|
justifyContent: ownerState?.isForm ? "flex-start" : "center",
|
|
86
75
|
gap: ownerState?.isForm ? theme.vars.size.baseSpacings.sp3 : theme.vars.size.baseSpacings.sp0,
|
|
87
76
|
flexWrap: ownerState?.isForm ? "wrap" : "nowrap",
|
|
88
|
-
padding:
|
|
77
|
+
padding: theme.vars.size.baseSpacings.sp3,
|
|
89
78
|
background: theme.vars.palette.background.default
|
|
90
79
|
})
|
|
91
80
|
};
|
|
@@ -9,12 +9,11 @@ export interface PaperFormProps {
|
|
|
9
9
|
urlIcon?: string;
|
|
10
10
|
title: string;
|
|
11
11
|
children?: ReactNode | PropertyValueProps[];
|
|
12
|
-
variant?: 'standard'
|
|
12
|
+
variant?: 'standard';
|
|
13
13
|
color?: Extract<ComponentPalletColor, 'default'>;
|
|
14
14
|
size?: Extract<Sizes, 'small' | 'medium'>;
|
|
15
15
|
isForm?: boolean;
|
|
16
16
|
dataTestId?: string;
|
|
17
|
-
height?: 'auto' | 'full';
|
|
18
17
|
}
|
|
19
18
|
/**
|
|
20
19
|
* ***************************************
|
|
@@ -26,7 +25,7 @@ interface CommonsProps {
|
|
|
26
25
|
paperFormVariant?: PaperFormProps['variant'];
|
|
27
26
|
}
|
|
28
27
|
export type HeaderProps = Omit<PaperFormProps, 'children' | 'isForm' | 'variant'> & CommonsProps;
|
|
29
|
-
export type PaperFormOwnerState = Pick<PaperFormProps, 'isForm' | 'color' | 'size'
|
|
28
|
+
export type PaperFormOwnerState = Pick<PaperFormProps, 'isForm' | 'color' | 'size'> & CommonsProps;
|
|
30
29
|
/**
|
|
31
30
|
* ***********************************
|
|
32
31
|
* Slots para los estilos utilizados
|
|
@@ -48,7 +48,6 @@ const propertyValueStyles = {
|
|
|
48
48
|
alignItems: "center",
|
|
49
49
|
gap: theme.vars.size.baseSpacings["sp1"],
|
|
50
50
|
width: ownerState?.semanticWidth ? "auto" : "200px",
|
|
51
|
-
height: ownerState?.valueHeight ? ownerState?.valueHeight : "auto",
|
|
52
51
|
overflow: "hidden",
|
|
53
52
|
color: theme.vars.palette.text.primary,
|
|
54
53
|
paddingTop: !ownerState?.isForm ? theme.vars.size.baseSpacings.sp1 : void 0,
|
|
@@ -441,8 +441,8 @@ const createAreasStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
|
441
441
|
bounds: {
|
|
442
442
|
left: MARGIN_GRIDLAYOUT,
|
|
443
443
|
top: MARGIN_GRIDLAYOUT,
|
|
444
|
-
right: -
|
|
445
|
-
bottom: -
|
|
444
|
+
right: -10,
|
|
445
|
+
bottom: -10
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}
|
|
@@ -65,11 +65,6 @@ const RHFAutocompleteAsyncReducer = (onChangeFilterParms) => (state, action) =>
|
|
|
65
65
|
...state,
|
|
66
66
|
isOpen: false
|
|
67
67
|
};
|
|
68
|
-
// case actionsType.SET_SELECTED_OPTIONS_TO_AUTOCOMPLETE:
|
|
69
|
-
// return {
|
|
70
|
-
// ...state,
|
|
71
|
-
// selectedOptions: action.payload,
|
|
72
|
-
// };
|
|
73
68
|
default:
|
|
74
69
|
return state;
|
|
75
70
|
}
|
package/components/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ export * from './mui_extended';
|
|
|
18
18
|
export * from './formatters';
|
|
19
19
|
export * from './formatters/dictionary';
|
|
20
20
|
export * from './formatters/types';
|
|
21
|
-
export * from './FormContainer';
|
|
22
21
|
export * from './GridLayout';
|
|
23
22
|
export * from './HelmetPage';
|
|
24
23
|
export * from './HelperError';
|
|
@@ -37,7 +36,7 @@ export * from './ImageText';
|
|
|
37
36
|
export * from './NoItemSelected';
|
|
38
37
|
export * from './NoItemPrivileges';
|
|
39
38
|
export * from './ObjectLogs';
|
|
40
|
-
export * from './PaperForm';
|
|
39
|
+
export * from './PaperForm/PaperForm';
|
|
41
40
|
export * from './PDFViewer';
|
|
42
41
|
export * from './popups';
|
|
43
42
|
export * from './PrintingSystem';
|
package/index.js
CHANGED
|
@@ -122,7 +122,6 @@ import { C as C17 } from "./components/formatters/ChipStatusFormatter/ChipStatus
|
|
|
122
122
|
import { g as g17 } from "./components/formatters/DistanceToNowFormatter/dictionary.js";
|
|
123
123
|
import { D as D9 } from "./components/formatters/DistanceToNowFormatter/DistanceToNowFormatter.js";
|
|
124
124
|
import { g as g18 } from "./components/formatters/dictionary.js";
|
|
125
|
-
import { F as F2 } from "./components/FormContainer/FormContainer.js";
|
|
126
125
|
import { G } from "./components/GridLayout/GridLayout.js";
|
|
127
126
|
import { R as R4 } from "./components/GridLayout/subcomponents/Responsive/index.js";
|
|
128
127
|
import { c as c2, e as e2, d as d3 } from "./components/GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
@@ -194,7 +193,7 @@ import { a as a14, g as g28 } from "./components/ModalDialog/dictionary.js";
|
|
|
194
193
|
import { M as M8 } from "./components/ModalDialog/ModalDialog.js";
|
|
195
194
|
import { S as S10 } from "./components/SettingsLayout/SettingsLayout.js";
|
|
196
195
|
import { P as P13 } from "./components/Pager/Pager.js";
|
|
197
|
-
import { F as
|
|
196
|
+
import { F as F2, R as R23, u as u16 } from "./components/hook-form/RHFormContext/index.js";
|
|
198
197
|
import { g as g29 } from "./components/hook-form/RHFormContext/dictionary.js";
|
|
199
198
|
import { u as u17 } from "./contexts/AppearanceComponentContext/useAppearanceComponentStore.js";
|
|
200
199
|
import { A as A16 } from "./contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
@@ -283,8 +282,7 @@ export {
|
|
|
283
282
|
a13 as DynamicMFParmsProvider,
|
|
284
283
|
D5 as DynamicSort,
|
|
285
284
|
F as FixedSizeList,
|
|
286
|
-
F2 as
|
|
287
|
-
F3 as FormProviderCustom,
|
|
285
|
+
F2 as FormProviderCustom,
|
|
288
286
|
G as GridLayout,
|
|
289
287
|
H as HamburgerMenu,
|
|
290
288
|
H2 as HelmetPage,
|
package/package.json
CHANGED
|
@@ -10,6 +10,8 @@ interface DataGridRenderProps<TRow, TSummaryRow, TKey extends RowKey = RowKey> {
|
|
|
10
10
|
visibleRefreshFilterSort?: boolean;
|
|
11
11
|
withExternalSortSettings?: boolean;
|
|
12
12
|
withExternalFilterSettings?: boolean;
|
|
13
|
+
skipSortValidation?: boolean;
|
|
14
|
+
skipFilterValidation?: boolean;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Componente que renderiza el DataGrid para el storybook
|
|
@@ -19,11 +19,6 @@ export declare const WithChildren: Story;
|
|
|
19
19
|
********************************************************/
|
|
20
20
|
export declare const WithPropertyValues: Story;
|
|
21
21
|
export declare const WithSimpleContent: Story;
|
|
22
|
-
/********************************************************
|
|
23
|
-
* PaperForm con variant text
|
|
24
|
-
********************************************************/
|
|
25
|
-
export declare const WithTextVariant: Story;
|
|
26
|
-
export declare const WithFullHeight: Story;
|
|
27
22
|
/**
|
|
28
23
|
* State Skeleton
|
|
29
24
|
*/
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FormContainerProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Componente que contiene un formulario y un grupo de botones.
|
|
4
|
-
* @param props - Propiedades del componente.
|
|
5
|
-
* @returns Componente FormContainer.
|
|
6
|
-
*/
|
|
7
|
-
export declare const FormContainer: (props: FormContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { R as RootStyled, F as FormContainerStyled, B as ButtonGroupStyled } from "./slots/FormContainerSlots.js";
|
|
3
|
-
import { F as FORM_CONTAINER_CLASSES } from "./constants.js";
|
|
4
|
-
const FormContainer = (props) => {
|
|
5
|
-
const { children, buttonGroup } = props;
|
|
6
|
-
return /* @__PURE__ */ jsxs(
|
|
7
|
-
RootStyled,
|
|
8
|
-
{
|
|
9
|
-
role: "region",
|
|
10
|
-
"aria-label": "formContainer",
|
|
11
|
-
className: FORM_CONTAINER_CLASSES.root,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ jsx(FormContainerStyled, { children }),
|
|
14
|
-
buttonGroup && /* @__PURE__ */ jsx(ButtonGroupStyled, { children: buttonGroup })
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
FormContainer as F
|
|
21
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const formContainerStyles = {
|
|
2
|
-
/**
|
|
3
|
-
* Estilos para el contenedor principal.
|
|
4
|
-
*/
|
|
5
|
-
root: () => ({
|
|
6
|
-
display: "flex",
|
|
7
|
-
width: "100%",
|
|
8
|
-
height: "100%",
|
|
9
|
-
overflow: "auto",
|
|
10
|
-
flexDirection: "column"
|
|
11
|
-
}),
|
|
12
|
-
/**
|
|
13
|
-
* Estilos para el contenedor del formulario.
|
|
14
|
-
*/
|
|
15
|
-
formContainer: ({ theme }) => ({
|
|
16
|
-
display: "flex",
|
|
17
|
-
width: "100%",
|
|
18
|
-
flexGrow: 1,
|
|
19
|
-
overflow: "auto",
|
|
20
|
-
flexDirection: "column",
|
|
21
|
-
gap: theme.vars.size.baseSpacings.sp4
|
|
22
|
-
}),
|
|
23
|
-
buttonGroup: {}
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
formContainerStyles as f
|
|
27
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { g as getComponentClasses } from "../../utils/getComponentSlotRoot.js";
|
|
2
|
-
import { F as FormContainerSlots } from "./slots/FormContainerEnum.js";
|
|
3
|
-
const FORM_CONTAINER_COMPONENT_KEY = "M4LFormContainer";
|
|
4
|
-
const FORM_CONTAINER_CLASSES = getComponentClasses(FORM_CONTAINER_COMPONENT_KEY, FormContainerSlots);
|
|
5
|
-
export {
|
|
6
|
-
FORM_CONTAINER_CLASSES as F,
|
|
7
|
-
FORM_CONTAINER_COMPONENT_KEY as a
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FormContainer } from './FormContainer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var FormContainerSlots = /* @__PURE__ */ ((FormContainerSlots2) => {
|
|
2
|
-
FormContainerSlots2["root"] = "root";
|
|
3
|
-
FormContainerSlots2["formContainer"] = "formContainer";
|
|
4
|
-
FormContainerSlots2["buttonGroup"] = "buttonGroup";
|
|
5
|
-
return FormContainerSlots2;
|
|
6
|
-
})(FormContainerSlots || {});
|
|
7
|
-
export {
|
|
8
|
-
FormContainerSlots as F
|
|
9
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const RootStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
2
|
-
ownerState?: (Partial<import('../types').FormContainerOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
-
export declare const FormContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
5
|
-
ownerState?: (Partial<import('../types').FormContainerOwnerState> & Record<string, unknown>) | undefined;
|
|
6
|
-
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
-
export declare const ButtonGroupStyled: import('@emotion/styled').StyledComponent<Pick<import('../../CommonActions/components/ActionsContainer').ActionsContainerProps & import('react').RefAttributes<HTMLDivElement>, keyof import('react').RefAttributes<HTMLDivElement> | keyof import('../../CommonActions/components/ActionsContainer').ActionsContainerProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & Record<string, unknown> & {
|
|
8
|
-
ownerState?: (Partial<import('../types').FormContainerOwnerState> & Record<string, unknown>) | undefined;
|
|
9
|
-
}, {}, {}>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { styled } from "@mui/material";
|
|
2
|
-
import { a as FORM_CONTAINER_COMPONENT_KEY } from "../constants.js";
|
|
3
|
-
import { F as FormContainerSlots } from "./FormContainerEnum.js";
|
|
4
|
-
import { f as formContainerStyles } from "../FormContainer.styles.js";
|
|
5
|
-
import { A as ActionsContainer } from "../../CommonActions/components/ActionsContainer/ActionsContainer.js";
|
|
6
|
-
const RootStyled = styled("div", {
|
|
7
|
-
name: FORM_CONTAINER_COMPONENT_KEY,
|
|
8
|
-
slot: FormContainerSlots.root
|
|
9
|
-
})(formContainerStyles?.root);
|
|
10
|
-
const FormContainerStyled = styled("div", {
|
|
11
|
-
name: FORM_CONTAINER_COMPONENT_KEY,
|
|
12
|
-
slot: FormContainerSlots.formContainer
|
|
13
|
-
})(formContainerStyles?.formContainer);
|
|
14
|
-
const ButtonGroupStyled = styled(ActionsContainer, {
|
|
15
|
-
name: FORM_CONTAINER_COMPONENT_KEY,
|
|
16
|
-
slot: FormContainerSlots.buttonGroup
|
|
17
|
-
})(formContainerStyles?.buttonGroup);
|
|
18
|
-
export {
|
|
19
|
-
ButtonGroupStyled as B,
|
|
20
|
-
FormContainerStyled as F,
|
|
21
|
-
RootStyled as R
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { M4LOverridesStyleRules } from '../../@types/augmentations';
|
|
2
|
-
import { FormContainerSlots } from './slots/FormContainerEnum';
|
|
3
|
-
import { FORM_CONTAINER_COMPONENT_KEY } from './constants';
|
|
4
|
-
import { Theme } from '@mui/material/styles';
|
|
5
|
-
export interface FormContainerProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
buttonGroup?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export type FormContainerOwnerState = {};
|
|
10
|
-
export type FormContainerSlotsType = keyof typeof FormContainerSlots;
|
|
11
|
-
export type FormContainerStyles = M4LOverridesStyleRules<FormContainerSlotsType, typeof FORM_CONTAINER_COMPONENT_KEY, Theme>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { FormContainer } from '../../../src/components/FormContainer';
|
|
3
|
-
declare const meta: Meta<typeof FormContainer>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof FormContainer>;
|
|
6
|
-
/**
|
|
7
|
-
* Componente FormContainer por defecto
|
|
8
|
-
*/
|
|
9
|
-
export declare const Default: Story;
|
|
10
|
-
/**
|
|
11
|
-
* Componente FormContainer con skeleton
|
|
12
|
-
*/
|
|
13
|
-
export declare const Skeleton: Story;
|