@m4l/components 9.4.32 → 9.4.33-beta-feature-662-nestedformatter-link-icon-image.0
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/ObjectLogs/hooks/useObjectLogsColumns.js +27 -2
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +27 -2
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +27 -2
- package/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.d.ts +7 -8
- package/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.d.ts.map +1 -1
- package/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.js +70 -14
- package/components/datagrids/formatters/ColumnNestedValueFormatter/formatter.d.ts +3 -0
- package/components/datagrids/formatters/ColumnNestedValueFormatter/formatter.d.ts.map +1 -1
- package/components/datagrids/formatters/ColumnNestedValueFormatter/formatter.js +70 -13
- package/components/datagrids/formatters/ColumnNestedValueFormatter/types.d.ts +15 -0
- package/components/datagrids/formatters/ColumnNestedValueFormatter/types.d.ts.map +1 -1
- package/components/datagrids/tests/helpers/getRows.d.ts.map +1 -1
- package/components/datagrids/tests/helpers/types.d.ts +8 -0
- package/components/datagrids/tests/helpers/types.d.ts.map +1 -1
- package/components/datagrids/tests/helpers/useColumns.d.ts.map +1 -1
- package/components/datagrids/views/CardsView/subcomponents/Settings/subcomponents/ColumnsConfig/ColumnsConfig.js +71 -42
- package/components/datagrids/views/TableView/subcomponents/Settings/subcomponents/ColumnsConfig/ColumnsConfig.js +87 -57
- package/package.json +6 -6
|
@@ -84,10 +84,35 @@ import "../../formatters/IconsFormatter/constants.js";
|
|
|
84
84
|
import "../../formatters/IconsFormatter/slots/IconsFormatterSlots.js";
|
|
85
85
|
import { useColumnIcon as a } from "../../datagrids/formatters/ColumnIconFormatter/useColumnIcon.js";
|
|
86
86
|
import "../../extended/mui/CheckBox/CheckBox.js";
|
|
87
|
+
import "../../extended/mui/Accordion/Accordion.js";
|
|
88
|
+
import "../../extended/mui/Avatar/Avatar.js";
|
|
89
|
+
import "react-router-dom";
|
|
90
|
+
import "../../extended/mui/Button/Button.js";
|
|
91
|
+
import "../../extended/mui/Radio/Radio.js";
|
|
92
|
+
import "../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
93
|
+
import "../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
94
|
+
import "../../Image/subcomponents/IntersectComponent/index.js";
|
|
95
|
+
import "../../Image/slots/ImageSlots.js";
|
|
96
|
+
import "../../Image/constant.js";
|
|
97
|
+
import "../../extended/mui/ImageButton/styles.js";
|
|
98
|
+
import "../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
99
|
+
import "../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
100
|
+
import "../../extended/mui/Stack/Stack.js";
|
|
101
|
+
import "../../extended/mui/Tab/Slots/TabSlots.js";
|
|
102
|
+
import "../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
103
|
+
import "../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
104
|
+
import "../../extended/mui/Typography/Typography.js";
|
|
105
|
+
import "../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
106
|
+
import "../../extended/mui/NavLink/slots/NavLinkSlots.js";
|
|
107
|
+
import "../../extended/mui/NavLink/constants.js";
|
|
108
|
+
import "../../extended/mui/Dialog/Dialog.js";
|
|
109
|
+
import "../../extended/mui/Divider/slots/DividerSlots.js";
|
|
110
|
+
import "../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
111
|
+
import "../../extended/mui/DatePicker/constants.js";
|
|
87
112
|
import "../../datagrids/views/adapters/CheckboxCellAdapter/CheckboxCellAdapter.js";
|
|
88
113
|
import { DICTIONARY as o } from "../dictionary.js";
|
|
89
114
|
import { useDetailFormatter as c } from "./useDetailFormatter.js";
|
|
90
|
-
const
|
|
115
|
+
const yo = (m) => {
|
|
91
116
|
const { getLabel: t } = n(), r = s({
|
|
92
117
|
presentationType: "datetime",
|
|
93
118
|
fieldValue: "createdAt"
|
|
@@ -140,5 +165,5 @@ const Ht = (m) => {
|
|
|
140
165
|
);
|
|
141
166
|
};
|
|
142
167
|
export {
|
|
143
|
-
|
|
168
|
+
yo as useObjectLogsColumns
|
|
144
169
|
};
|
|
@@ -82,13 +82,38 @@ import "../../../formatters/ImageFormatter/constants.js";
|
|
|
82
82
|
import "../../../formatters/IconsFormatter/constants.js";
|
|
83
83
|
import "../../../formatters/IconsFormatter/slots/IconsFormatterSlots.js";
|
|
84
84
|
import "../../../extended/mui/CheckBox/CheckBox.js";
|
|
85
|
+
import "../../../extended/mui/Accordion/Accordion.js";
|
|
86
|
+
import "../../../extended/mui/Avatar/Avatar.js";
|
|
87
|
+
import "react-router-dom";
|
|
88
|
+
import "../../../extended/mui/Button/Button.js";
|
|
89
|
+
import "../../../extended/mui/Radio/Radio.js";
|
|
90
|
+
import "../../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
91
|
+
import "../../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
92
|
+
import "../../../Image/subcomponents/IntersectComponent/index.js";
|
|
93
|
+
import "../../../Image/slots/ImageSlots.js";
|
|
94
|
+
import "../../../Image/constant.js";
|
|
95
|
+
import "../../../extended/mui/ImageButton/styles.js";
|
|
96
|
+
import "../../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
97
|
+
import "../../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
98
|
+
import "../../../extended/mui/Stack/Stack.js";
|
|
99
|
+
import "../../../extended/mui/Tab/Slots/TabSlots.js";
|
|
100
|
+
import "../../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
101
|
+
import "../../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
102
|
+
import "../../../extended/mui/Typography/Typography.js";
|
|
103
|
+
import "../../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
104
|
+
import "../../../extended/mui/NavLink/slots/NavLinkSlots.js";
|
|
105
|
+
import "../../../extended/mui/NavLink/constants.js";
|
|
106
|
+
import "../../../extended/mui/Dialog/Dialog.js";
|
|
107
|
+
import "../../../extended/mui/Divider/slots/DividerSlots.js";
|
|
108
|
+
import "../../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
109
|
+
import "../../../extended/mui/DatePicker/constants.js";
|
|
85
110
|
import "../../../datagrids/views/adapters/CheckboxCellAdapter/CheckboxCellAdapter.js";
|
|
86
111
|
import { ContainerWrapperStyled as T, GridWrapperStyled as E } from "../../slots/ObjectLogsSlots.js";
|
|
87
112
|
import { useObjectLogsColumns as L } from "../../hooks/useObjectLogsColumns.js";
|
|
88
113
|
import { OBJECT_LOGS_M4L_END_POINT as j, OBJECT_LOGS_KEY_COMPONENT as y } from "../../constants.js";
|
|
89
114
|
import { ObjectLogsSlots as I } from "../../slots/ObjectLogsEnum.js";
|
|
90
115
|
import { useFilterAndSort as N } from "../../hooks/useFilterAndSort.js";
|
|
91
|
-
function
|
|
116
|
+
function Mo(s) {
|
|
92
117
|
const { resourceId: r, objectId: o, dataTestId: t = "" } = s, [a, p] = O(() => ({ resource_id: r, object_id: o })), n = L("m4l"), { pagerState: i, rows: e, onPageChange: c, onRowsPerPageChange: d, clearRows: l, Refresh: u } = w({
|
|
93
118
|
endPoint: j,
|
|
94
119
|
fireOnFirstLoad: !1,
|
|
@@ -145,5 +170,5 @@ function go(s) {
|
|
|
145
170
|
);
|
|
146
171
|
}
|
|
147
172
|
export {
|
|
148
|
-
|
|
173
|
+
Mo as ObjectLogsByM4L
|
|
149
174
|
};
|
|
@@ -82,13 +82,38 @@ import "../../../formatters/ImageFormatter/constants.js";
|
|
|
82
82
|
import "../../../formatters/IconsFormatter/constants.js";
|
|
83
83
|
import "../../../formatters/IconsFormatter/slots/IconsFormatterSlots.js";
|
|
84
84
|
import "../../../extended/mui/CheckBox/CheckBox.js";
|
|
85
|
+
import "../../../extended/mui/Accordion/Accordion.js";
|
|
86
|
+
import "../../../extended/mui/Avatar/Avatar.js";
|
|
87
|
+
import "react-router-dom";
|
|
88
|
+
import "../../../extended/mui/Button/Button.js";
|
|
89
|
+
import "../../../extended/mui/Radio/Radio.js";
|
|
90
|
+
import "../../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
91
|
+
import "../../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
92
|
+
import "../../../Image/subcomponents/IntersectComponent/index.js";
|
|
93
|
+
import "../../../Image/slots/ImageSlots.js";
|
|
94
|
+
import "../../../Image/constant.js";
|
|
95
|
+
import "../../../extended/mui/ImageButton/styles.js";
|
|
96
|
+
import "../../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
97
|
+
import "../../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
98
|
+
import "../../../extended/mui/Stack/Stack.js";
|
|
99
|
+
import "../../../extended/mui/Tab/Slots/TabSlots.js";
|
|
100
|
+
import "../../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
101
|
+
import "../../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
102
|
+
import "../../../extended/mui/Typography/Typography.js";
|
|
103
|
+
import "../../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
104
|
+
import "../../../extended/mui/NavLink/slots/NavLinkSlots.js";
|
|
105
|
+
import "../../../extended/mui/NavLink/constants.js";
|
|
106
|
+
import "../../../extended/mui/Dialog/Dialog.js";
|
|
107
|
+
import "../../../extended/mui/Divider/slots/DividerSlots.js";
|
|
108
|
+
import "../../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
109
|
+
import "../../../extended/mui/DatePicker/constants.js";
|
|
85
110
|
import "../../../datagrids/views/adapters/CheckboxCellAdapter/CheckboxCellAdapter.js";
|
|
86
111
|
import { ContainerWrapperStyled as C, GridWrapperStyled as S } from "../../slots/ObjectLogsSlots.js";
|
|
87
112
|
import { useObjectLogsColumns as E } from "../../hooks/useObjectLogsColumns.js";
|
|
88
113
|
import { OBJECT_LOGS_OTHERS_END_POINT as y, OBJECT_LOGS_KEY_COMPONENT as b } from "../../constants.js";
|
|
89
114
|
import { ObjectLogsSlots as w } from "../../slots/ObjectLogsEnum.js";
|
|
90
115
|
import { useFilterAndSort as L } from "../../hooks/useFilterAndSort.js";
|
|
91
|
-
function
|
|
116
|
+
function Ho(m) {
|
|
92
117
|
const { dataTestId: r = "", resourceSerialId: t, resourceTypeId: i } = m, [p, e] = O({}), s = E("other"), { rows: a, clearRows: n, refresh: l } = g({
|
|
93
118
|
endPoint: y,
|
|
94
119
|
fireOnFirstLoad: !1,
|
|
@@ -136,5 +161,5 @@ function lo(m) {
|
|
|
136
161
|
);
|
|
137
162
|
}
|
|
138
163
|
export {
|
|
139
|
-
|
|
164
|
+
Ho as ObjectLogsByOthers
|
|
140
165
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { ColumnNestedValueFormatterProps } from './types';
|
|
2
2
|
import { RenderGroupCellProps } from 'react-data-grid';
|
|
3
3
|
/**
|
|
4
|
-
* Formatter
|
|
4
|
+
* Formatter to display nested values in group rows (TreeDataGrid).
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @returns Función que recibe RenderGroupCellProps y retorna el valor formateado
|
|
6
|
+
* Used when TreeDataGrid groups rows and needs to show a nested value in the
|
|
7
|
+
* group header. Uses the first row in the group (childRows[0]) as the data source.
|
|
8
|
+
* When getLinkHref is provided and returns a URL for the representative row,
|
|
9
|
+
* the value is rendered as a link.
|
|
10
|
+
* @param props - Formatter props including fieldValue, Component, getLinkHref, linkTarget
|
|
11
|
+
* @returns Function that receives RenderGroupCellProps and returns the formatted value
|
|
13
12
|
*/
|
|
14
13
|
export declare function ColumnNestedValueGroupFormatter<TRow>(props: ColumnNestedValueFormatterProps<TRow>): (groupProps: RenderGroupCellProps<TRow>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
14
|
//# sourceMappingURL=ColumnNestedValueGroupFormatter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnNestedValueGroupFormatter.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ColumnNestedValueGroupFormatter.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnNestedValueFormatter/ColumnNestedValueGroupFormatter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAClD,KAAK,EAAE,+BAA+B,CAAC,IAAI,CAAC,IASpC,YAAY,oBAAoB,CAAC,IAAI,CAAC,sDAiC/C"}
|
|
@@ -1,19 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, Fragment as g } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import u from "react";
|
|
3
|
-
import { getPropertyByString as
|
|
4
|
-
import { getNullGuard as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
import { getPropertyByString as d } from "@m4l/core";
|
|
4
|
+
import { getNullGuard as h } from "../../../../utils/getNullGuard.js";
|
|
5
|
+
import "../../../extended/mui/Accordion/Accordion.js";
|
|
6
|
+
import "../../../extended/mui/Tooltip/slots/TooltipSlots.js";
|
|
7
|
+
import "../../../../contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
8
|
+
import "zustand";
|
|
9
|
+
import "zustand/shallow";
|
|
10
|
+
import "zustand/middleware";
|
|
11
|
+
import "zustand/middleware/immer";
|
|
12
|
+
import "@m4l/styles";
|
|
13
|
+
import "../../../extended/mui/Tooltip/constants.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "../../../extended/mui/IconButton/IconButton.js";
|
|
16
|
+
import "../../../extended/mui/Avatar/Avatar.js";
|
|
17
|
+
import "@mui/material";
|
|
18
|
+
import "react-router-dom";
|
|
19
|
+
import "../../../extended/mui/Button/Button.js";
|
|
20
|
+
import "../../../extended/mui/CheckBox/CheckBox.js";
|
|
21
|
+
import "../../../extended/mui/Radio/Radio.js";
|
|
22
|
+
import "../../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
23
|
+
import "../../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
24
|
+
import "../../../Image/subcomponents/IntersectComponent/index.js";
|
|
25
|
+
import "../../../Image/slots/ImageSlots.js";
|
|
26
|
+
import "../../../Image/constant.js";
|
|
27
|
+
import "../../../extended/mui/ImageButton/styles.js";
|
|
28
|
+
import "../../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
29
|
+
import "../../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
30
|
+
import "../../../extended/mui/Popover/slots/PopoverSlots.js";
|
|
31
|
+
import "../../../extended/mui/Select/Select.js";
|
|
32
|
+
import "../../../extended/mui/Skeleton/Slots/skeletonSlots.js";
|
|
33
|
+
import "../../../extended/mui/Stack/Stack.js";
|
|
34
|
+
import "../../../extended/mui/Tab/Slots/TabSlots.js";
|
|
35
|
+
import "../../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
36
|
+
import "@m4l/icons";
|
|
37
|
+
import "../../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
38
|
+
import "../../../extended/mui/TabContext/index.js";
|
|
39
|
+
import "../../../extended/mui/Typography/Typography.js";
|
|
40
|
+
import "../../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
41
|
+
import "../../../extended/mui/ToggleIconButton/slots/ToggleIconButtonSlots.js";
|
|
42
|
+
import { NavLink as k } from "../../../extended/mui/NavLink/NavLink.js";
|
|
43
|
+
import "../../../extended/mui/Dialog/Dialog.js";
|
|
44
|
+
import "../../../extended/mui/Divider/slots/DividerSlots.js";
|
|
45
|
+
import "../../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
46
|
+
import "@m4l/graphics";
|
|
47
|
+
import "../../../extended/mui/DatePicker/constants.js";
|
|
48
|
+
function at(n) {
|
|
49
|
+
const {
|
|
50
|
+
fieldValue: s,
|
|
51
|
+
Component: f = u.Fragment,
|
|
52
|
+
getLinkHref: l,
|
|
53
|
+
linkTarget: i = "_self"
|
|
54
|
+
} = n;
|
|
55
|
+
return (c) => {
|
|
56
|
+
const { childRows: m } = c;
|
|
57
|
+
if (m.length === 0)
|
|
58
|
+
return /* @__PURE__ */ o(g, { children: "-" });
|
|
59
|
+
const p = m[0], t = h(
|
|
60
|
+
d(p, s)
|
|
61
|
+
), e = typeof t == "object" ? JSON.stringify(t) : t, a = /* @__PURE__ */ o(f, { children: e }), r = l?.(p);
|
|
62
|
+
return typeof r == "string" && r.length > 0 ? /* @__PURE__ */ o(
|
|
63
|
+
k,
|
|
64
|
+
{
|
|
65
|
+
to: r,
|
|
66
|
+
text: String(e),
|
|
67
|
+
target: i,
|
|
68
|
+
rel: i === "_blank" ? "noopener noreferrer" : void 0
|
|
69
|
+
}
|
|
70
|
+
) : a;
|
|
15
71
|
};
|
|
16
72
|
}
|
|
17
73
|
export {
|
|
18
|
-
|
|
74
|
+
at as ColumnNestedValueGroupFormatter
|
|
19
75
|
};
|
|
@@ -6,10 +6,13 @@ import { RenderCellProps } from 'react-data-grid';
|
|
|
6
6
|
* Este formatter permite acceder a propiedades dentro de objetos anidados usando
|
|
7
7
|
* "dot notation" (notación de punto). Es útil cuando los datos tienen estructuras
|
|
8
8
|
* complejas y necesitas mostrar un valor específico dentro de un objeto.
|
|
9
|
+
* Si se pasa getLinkHref y retorna una URL, el valor se renderiza como enlace (interno o externo); si no, como texto.
|
|
9
10
|
* @param props - Configuración del formatter
|
|
10
11
|
* @param props.fieldValue - Ruta a la propiedad usando dot notation (ej: 'user.profile.name')
|
|
11
12
|
* @param props.Component - Componente opcional para envolver el valor (default: React.Fragment)
|
|
12
13
|
* @param props.defaultValue - Valor a mostrar si es null/undefined (default: '-')
|
|
14
|
+
* @param props.getLinkHref - Handler opcional (row) => url para renderizar la celda como enlace
|
|
15
|
+
* @param props.linkTarget - Target del enlace cuando se usa getLinkHref ('_self' | '_blank')
|
|
13
16
|
* @returns Función formatter compatible con react-data-grid
|
|
14
17
|
* @example
|
|
15
18
|
* // Filas de ejemplo:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnNestedValueFormatter/formatter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnNestedValueFormatter/formatter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAC7C,KAAK,EAAE,+BAA+B,CAAC,IAAI,CAAC,IAUpC,gBAAgB,eAAe,CAAC,IAAI,CAAC,sDA0B9C"}
|
|
@@ -1,17 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getPropertyByString as
|
|
3
|
-
import
|
|
4
|
-
import { getNullGuard as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as p } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { getPropertyByString as g } from "@m4l/core";
|
|
3
|
+
import s from "react";
|
|
4
|
+
import { getNullGuard as d } from "../../../../utils/getNullGuard.js";
|
|
5
|
+
import "../../../extended/mui/Accordion/Accordion.js";
|
|
6
|
+
import "../../../extended/mui/Tooltip/slots/TooltipSlots.js";
|
|
7
|
+
import "../../../../contexts/AppearanceComponentContext/AppearanceComponentContext.js";
|
|
8
|
+
import "zustand";
|
|
9
|
+
import "zustand/shallow";
|
|
10
|
+
import "zustand/middleware";
|
|
11
|
+
import "zustand/middleware/immer";
|
|
12
|
+
import "@m4l/styles";
|
|
13
|
+
import "../../../extended/mui/Tooltip/constants.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "../../../extended/mui/IconButton/IconButton.js";
|
|
16
|
+
import "../../../extended/mui/Avatar/Avatar.js";
|
|
17
|
+
import "@mui/material";
|
|
18
|
+
import "react-router-dom";
|
|
19
|
+
import "../../../extended/mui/Button/Button.js";
|
|
20
|
+
import "../../../extended/mui/CheckBox/CheckBox.js";
|
|
21
|
+
import "../../../extended/mui/Radio/Radio.js";
|
|
22
|
+
import "../../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
23
|
+
import "../../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
24
|
+
import "../../../Image/subcomponents/IntersectComponent/index.js";
|
|
25
|
+
import "../../../Image/slots/ImageSlots.js";
|
|
26
|
+
import "../../../Image/constant.js";
|
|
27
|
+
import "../../../extended/mui/ImageButton/styles.js";
|
|
28
|
+
import "../../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
29
|
+
import "../../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
30
|
+
import "../../../extended/mui/Popover/slots/PopoverSlots.js";
|
|
31
|
+
import "../../../extended/mui/Select/Select.js";
|
|
32
|
+
import "../../../extended/mui/Skeleton/Slots/skeletonSlots.js";
|
|
33
|
+
import "../../../extended/mui/Stack/Stack.js";
|
|
34
|
+
import "../../../extended/mui/Tab/Slots/TabSlots.js";
|
|
35
|
+
import "../../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
36
|
+
import "@m4l/icons";
|
|
37
|
+
import "../../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
38
|
+
import "../../../extended/mui/TabContext/index.js";
|
|
39
|
+
import "../../../extended/mui/Typography/Typography.js";
|
|
40
|
+
import "../../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
41
|
+
import "../../../extended/mui/ToggleIconButton/slots/ToggleIconButtonSlots.js";
|
|
42
|
+
import { NavLink as y } from "../../../extended/mui/NavLink/NavLink.js";
|
|
43
|
+
import "../../../extended/mui/Dialog/Dialog.js";
|
|
44
|
+
import "../../../extended/mui/Divider/slots/DividerSlots.js";
|
|
45
|
+
import "../../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
46
|
+
import "@m4l/graphics";
|
|
47
|
+
import "../../../extended/mui/DatePicker/constants.js";
|
|
48
|
+
function at(e) {
|
|
49
|
+
const {
|
|
50
|
+
fieldValue: n,
|
|
51
|
+
Component: f = s.Fragment,
|
|
52
|
+
defaultValue: l = "-",
|
|
53
|
+
getLinkHref: a,
|
|
54
|
+
linkTarget: o = "_self"
|
|
55
|
+
} = e;
|
|
56
|
+
return (i) => {
|
|
57
|
+
const t = d(
|
|
58
|
+
g(i.row, n),
|
|
59
|
+
l
|
|
60
|
+
), m = typeof t == "object" ? JSON.stringify(t) : t, r = a?.(i.row), u = typeof r == "string" && r.length > 0, c = /* @__PURE__ */ p(f, { children: m });
|
|
61
|
+
return u ? /* @__PURE__ */ p(
|
|
62
|
+
y,
|
|
63
|
+
{
|
|
64
|
+
to: r,
|
|
65
|
+
text: String(m),
|
|
66
|
+
target: o,
|
|
67
|
+
rel: o === "_blank" ? "noopener noreferrer" : void 0
|
|
68
|
+
}
|
|
69
|
+
) : c;
|
|
13
70
|
};
|
|
14
71
|
}
|
|
15
72
|
export {
|
|
16
|
-
|
|
73
|
+
at as ColumnNestedValueFormatter
|
|
17
74
|
};
|
|
@@ -20,5 +20,20 @@ export interface ColumnNestedValueFormatterProps<TRow> {
|
|
|
20
20
|
* Por defecto es '-'.
|
|
21
21
|
*/
|
|
22
22
|
defaultValue?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional handler that receives the row and returns a URL string.
|
|
25
|
+
* When provided and returning a non-empty string, the cell content is rendered
|
|
26
|
+
* as a link (internal or external). When undefined or empty string, the value
|
|
27
|
+
* is rendered as plain text.
|
|
28
|
+
* @example
|
|
29
|
+
* // Internal route: getLinkHref: (row) => `/users/${row.id}`
|
|
30
|
+
* // External URL: getLinkHref: (row) => row.externalUrl ?? undefined
|
|
31
|
+
*/
|
|
32
|
+
getLinkHref?: (row: TRow) => string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Target for the link when getLinkHref is used.
|
|
35
|
+
* Use '_blank' for external links (opens in new tab). Defaults to '_self'.
|
|
36
|
+
*/
|
|
37
|
+
linkTarget?: '_self' | '_blank';
|
|
23
38
|
}
|
|
24
39
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnNestedValueFormatter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,+BAA+B,CAAC,IAAI;IACnD;;;;;;OAMG;IACH,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IAE5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/formatters/ColumnNestedValueFormatter/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,+BAA+B,CAAC,IAAI;IACnD;;;;;;OAMG;IACH,UAAU,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IAE5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,MAAM,GAAG,SAAS,CAAC;IAEhD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRows.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/tests/helpers/getRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAyC7C;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,SAAS,
|
|
1
|
+
{"version":3,"file":"getRows.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/tests/helpers/getRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAyC7C;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,SAAS,cAoIvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,SAAS,cAmJnD,CAAC"}
|
|
@@ -22,6 +22,14 @@ export interface SeedProps {
|
|
|
22
22
|
* y usa un defaultValue personalizado ('N/A')
|
|
23
23
|
*/
|
|
24
24
|
withNestedValueCustomDefaultValue?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Si es true, añade columna NestedValue con getLinkHref (enlaces internos).
|
|
27
|
+
*/
|
|
28
|
+
withNestedValueInternalLinks?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Si es true, añade columna NestedValue con getLinkHref y linkTarget _blank (enlaces externos).
|
|
31
|
+
*/
|
|
32
|
+
withNestedValueExternalLinks?: boolean;
|
|
25
33
|
withPoints?: boolean;
|
|
26
34
|
withPrice?: boolean;
|
|
27
35
|
withUncertainty?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/tests/helpers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAC5C,UAAU,CAA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IAAI,EAAE,WAAW;IACvC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAC5C,qBAAqB,CAAC,IAAI,EAAE,WAAW,CAAC,CACzC,CAAC;IACF,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACrD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,MAAM,CAAC;CAC3C"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/tests/helpers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B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ACf,CAAC;CACH;AACD,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,MAAM,CAAC,IAAI,EAAE,WAAW;IACvC,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,OAAO,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAC5C,qBAAqB,CAAC,IAAI,EAAE,WAAW,CAAC,CACzC,CAAC;IACF,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACrD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,MAAM,CAAC;CAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useColumns.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/tests/helpers/useColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAcnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"useColumns.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/components/src/components/datagrids/tests/helpers/useColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAcnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAgBzC;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,OAAO,eAAe,KACrB,SAAS,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,EAyiBnC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as h, jsx as r } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as $, useRef as x, useState as I, useImperativeHandle as q, useMemo as _, useEffect as J } from "react";
|
|
3
3
|
import { useModuleDictionary as Q } from "@m4l/core";
|
|
4
4
|
import X from "react-data-grid";
|
|
5
|
-
import { IconButton as
|
|
5
|
+
import { IconButton as a } from "../../../../../../../extended/mui/IconButton/IconButton.js";
|
|
6
6
|
import "clsx";
|
|
7
7
|
import "../../../../../../../formatters/BooleanFormatter/slots/BooleanFormatterSlots.js";
|
|
8
8
|
import "../../../../../../../formatters/ChipStatusFormatter/slots/ChipStatusFormatterSlots.js";
|
|
@@ -60,11 +60,40 @@ import "../../../../../../../formatters/ImageFormatter/constants.js";
|
|
|
60
60
|
import "../../../../../../../formatters/IconsFormatter/constants.js";
|
|
61
61
|
import "../../../../../../../formatters/IconsFormatter/slots/IconsFormatterSlots.js";
|
|
62
62
|
import { ColumnInteractiveCheckFormatter as E } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
63
|
+
import "../../../../../../../extended/mui/Accordion/Accordion.js";
|
|
64
|
+
import "../../../../../../../extended/mui/Avatar/Avatar.js";
|
|
65
|
+
import "react-router-dom";
|
|
66
|
+
import "../../../../../../../extended/mui/Button/Button.js";
|
|
67
|
+
import "../../../../../../../extended/mui/CheckBox/CheckBox.js";
|
|
68
|
+
import "../../../../../../../extended/mui/Radio/Radio.js";
|
|
69
|
+
import "../../../../../../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
70
|
+
import "../../../../../../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
71
|
+
import "../../../../../../../Image/subcomponents/IntersectComponent/index.js";
|
|
72
|
+
import "../../../../../../../Image/slots/ImageSlots.js";
|
|
73
|
+
import "../../../../../../../Image/constant.js";
|
|
74
|
+
import "../../../../../../../extended/mui/ImageButton/styles.js";
|
|
75
|
+
import "../../../../../../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
76
|
+
import "../../../../../../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
77
|
+
import "../../../../../../../extended/mui/Popover/slots/PopoverSlots.js";
|
|
78
|
+
import "../../../../../../../extended/mui/Select/Select.js";
|
|
79
|
+
import "../../../../../../../extended/mui/Skeleton/Slots/skeletonSlots.js";
|
|
80
|
+
import "../../../../../../../extended/mui/Stack/Stack.js";
|
|
81
|
+
import "../../../../../../../extended/mui/Tab/Slots/TabSlots.js";
|
|
82
|
+
import "../../../../../../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
83
|
+
import { ArrowChevronUpOutlined as Z, ArrowChevronMdUpOutlined as ee, ArrowChevronDownOutlined as te, ArrowChevronMdDownOutlined as oe, ActionsMultiCheckOutlined as ie, ActionsCheckIndeterminateOutlined as re, ArrowRestoreOutlined as ne } from "@m4l/icons";
|
|
84
|
+
import "../../../../../../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
85
|
+
import "../../../../../../../extended/mui/Typography/Typography.js";
|
|
86
|
+
import "../../../../../../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
87
|
+
import "../../../../../../../extended/mui/NavLink/slots/NavLinkSlots.js";
|
|
88
|
+
import "../../../../../../../extended/mui/NavLink/constants.js";
|
|
89
|
+
import "../../../../../../../extended/mui/Dialog/Dialog.js";
|
|
90
|
+
import "../../../../../../../extended/mui/Divider/slots/DividerSlots.js";
|
|
91
|
+
import "../../../../../../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
92
|
+
import "../../../../../../../extended/mui/DatePicker/constants.js";
|
|
63
93
|
import "../../../../../adapters/CheckboxCellAdapter/CheckboxCellAdapter.js";
|
|
64
94
|
import "../../../../../../contexts/DataGridContext/DataGridContext.js";
|
|
65
|
-
import { ColumnsConfigWrapperStyled as
|
|
66
|
-
import { DICTIONARY as
|
|
67
|
-
import { ArrowChevronUpOutlined as re, ArrowChevronMdUpOutlined as ne, ArrowChevronDownOutlined as le, ArrowChevronMdDownOutlined as se, ActionsMultiCheckOutlined as ae, ActionsCheckIndeterminateOutlined as me, ArrowRestoreOutlined as pe } from "@m4l/icons";
|
|
95
|
+
import { ColumnsConfigWrapperStyled as le, ColumnsConfigDataGridStyled as se, ColumnsConfigSelColumnsStyled as me, TableWrapperDataGridStyled as pe, ColumnsConfigActiosStyled as ae } from "../../../../../../slots/DataGridSlot.js";
|
|
96
|
+
import { DICTIONARY as m } from "../../../../../../dictionary.js";
|
|
68
97
|
function R(d, c) {
|
|
69
98
|
return d.filter((n) => !n.hidden).map(
|
|
70
99
|
(n) => ({
|
|
@@ -94,7 +123,7 @@ const f = (d) => {
|
|
|
94
123
|
classes: A,
|
|
95
124
|
size: T,
|
|
96
125
|
columns: k
|
|
97
|
-
} = d, { getLabel: s } = Q(), [M, G] = I(!0), [o,
|
|
126
|
+
} = d, { getLabel: s } = Q(), [M, G] = I(!0), [o, p] = I(
|
|
98
127
|
R(u, k)
|
|
99
128
|
), [w, L] = I(
|
|
100
129
|
() => /* @__PURE__ */ new Set()
|
|
@@ -107,7 +136,7 @@ const f = (d) => {
|
|
|
107
136
|
() => [
|
|
108
137
|
{
|
|
109
138
|
key: "name",
|
|
110
|
-
name: s(
|
|
139
|
+
name: s(m.SETTINGS_COLUMN_NAME),
|
|
111
140
|
width: 220,
|
|
112
141
|
resizable: !0,
|
|
113
142
|
type: "string",
|
|
@@ -115,7 +144,7 @@ const f = (d) => {
|
|
|
115
144
|
},
|
|
116
145
|
{
|
|
117
146
|
key: "visible",
|
|
118
|
-
name: s(
|
|
147
|
+
name: s(m.SETTINGS_COLUMN_VISIBLE),
|
|
119
148
|
width: 80,
|
|
120
149
|
type: "boolean",
|
|
121
150
|
renderCell: E,
|
|
@@ -123,7 +152,7 @@ const f = (d) => {
|
|
|
123
152
|
},
|
|
124
153
|
{
|
|
125
154
|
key: "showTitle",
|
|
126
|
-
name: s(
|
|
155
|
+
name: s(m.SETTINGS_COLUMN_SHOW_TITLE),
|
|
127
156
|
width: 100,
|
|
128
157
|
type: "boolean",
|
|
129
158
|
renderCell: E,
|
|
@@ -132,11 +161,11 @@ const f = (d) => {
|
|
|
132
161
|
],
|
|
133
162
|
[s]
|
|
134
163
|
), V = () => {
|
|
135
|
-
|
|
164
|
+
p(o.map((e) => ({ ...e, visible: !0 })));
|
|
136
165
|
}, U = () => {
|
|
137
|
-
|
|
166
|
+
p(o.map((e) => ({ ...e, visible: !1 })));
|
|
138
167
|
}, F = () => {
|
|
139
|
-
|
|
168
|
+
p(
|
|
140
169
|
o.map((e) => ({
|
|
141
170
|
...e,
|
|
142
171
|
visible: e.originalVisible,
|
|
@@ -146,7 +175,7 @@ const f = (d) => {
|
|
|
146
175
|
);
|
|
147
176
|
};
|
|
148
177
|
J(() => {
|
|
149
|
-
M === !1 &&
|
|
178
|
+
M === !1 && p(R(u, k)), G(!1);
|
|
150
179
|
}, [u]);
|
|
151
180
|
const i = _(() => {
|
|
152
181
|
let e = -1;
|
|
@@ -158,12 +187,12 @@ const f = (d) => {
|
|
|
158
187
|
if (i === -1)
|
|
159
188
|
return -1;
|
|
160
189
|
const e = [...o];
|
|
161
|
-
e.splice(i, 1), e.splice(0, 0, o[i]), n.current?.selectCell({ idx: 0, rowIdx: 0 }),
|
|
190
|
+
e.splice(i, 1), e.splice(0, 0, o[i]), n.current?.selectCell({ idx: 0, rowIdx: 0 }), p(e);
|
|
162
191
|
}, W = () => {
|
|
163
192
|
if (i === -1)
|
|
164
193
|
return -1;
|
|
165
194
|
const e = [...o];
|
|
166
|
-
e.splice(i, 1), e.splice(e.length, 0, o[i]), n.current?.selectCell({ idx: 0, rowIdx: e.length - 1 }),
|
|
195
|
+
e.splice(i, 1), e.splice(e.length, 0, o[i]), n.current?.selectCell({ idx: 0, rowIdx: e.length - 1 }), p(e);
|
|
167
196
|
}, y = (e) => {
|
|
168
197
|
if (i === -1)
|
|
169
198
|
return -1;
|
|
@@ -171,7 +200,7 @@ const f = (d) => {
|
|
|
171
200
|
t.splice(i, 1), t.splice(i + e, 0, l), n.current?.selectCell({
|
|
172
201
|
idx: 0,
|
|
173
202
|
rowIdx: i + e
|
|
174
|
-
}),
|
|
203
|
+
}), p(t);
|
|
175
204
|
}, z = (e) => {
|
|
176
205
|
const t = o.findIndex((l) => l.key === e);
|
|
177
206
|
if (t > -1)
|
|
@@ -200,18 +229,18 @@ const f = (d) => {
|
|
|
200
229
|
N(e), S();
|
|
201
230
|
}, j = () => {
|
|
202
231
|
}, K = (e) => {
|
|
203
|
-
|
|
232
|
+
p(e);
|
|
204
233
|
}, P = ({ row: e }) => {
|
|
205
234
|
if (w.has(e.key))
|
|
206
235
|
return;
|
|
207
236
|
const t = /* @__PURE__ */ new Set([e.key]);
|
|
208
237
|
L(t);
|
|
209
238
|
};
|
|
210
|
-
return /* @__PURE__ */ h(
|
|
211
|
-
/* @__PURE__ */ h(
|
|
212
|
-
/* @__PURE__ */ r(
|
|
239
|
+
return /* @__PURE__ */ h(le, { ownerState: {}, ref: b, children: [
|
|
240
|
+
/* @__PURE__ */ h(se, { ownerState: {}, children: [
|
|
241
|
+
/* @__PURE__ */ r(me, { ownerState: { size: T }, children: s(m.SETTINGS_SEL_COLUMNS) }),
|
|
213
242
|
/* @__PURE__ */ r(
|
|
214
|
-
|
|
243
|
+
pe,
|
|
215
244
|
{
|
|
216
245
|
className: A?.tableWrapperDataGrid,
|
|
217
246
|
ownerState: { size: T },
|
|
@@ -233,72 +262,72 @@ const f = (d) => {
|
|
|
233
262
|
}
|
|
234
263
|
)
|
|
235
264
|
] }),
|
|
236
|
-
/* @__PURE__ */ h(
|
|
265
|
+
/* @__PURE__ */ h(ae, { ownerState: {}, children: [
|
|
237
266
|
/* @__PURE__ */ r(
|
|
238
|
-
|
|
267
|
+
a,
|
|
239
268
|
{
|
|
240
|
-
tooltip: s(
|
|
269
|
+
tooltip: s(m.SETTINGS_MOVE_FIRST),
|
|
241
270
|
onClick: B,
|
|
242
271
|
"aria-label": "move first place",
|
|
243
272
|
disabled: i < 1,
|
|
244
|
-
icon: /* @__PURE__ */ r(
|
|
273
|
+
icon: /* @__PURE__ */ r(Z, {})
|
|
245
274
|
}
|
|
246
275
|
),
|
|
247
276
|
/* @__PURE__ */ r(
|
|
248
|
-
|
|
277
|
+
a,
|
|
249
278
|
{
|
|
250
|
-
tooltip: s(
|
|
279
|
+
tooltip: s(m.SETTINGS_MOVE_UP),
|
|
251
280
|
onClick: () => y(-1),
|
|
252
281
|
"aria-label": "move up place",
|
|
253
282
|
disabled: i < 1,
|
|
254
|
-
icon: /* @__PURE__ */ r(
|
|
283
|
+
icon: /* @__PURE__ */ r(ee, {})
|
|
255
284
|
}
|
|
256
285
|
),
|
|
257
286
|
/* @__PURE__ */ r(
|
|
258
|
-
|
|
287
|
+
a,
|
|
259
288
|
{
|
|
260
|
-
tooltip: s(
|
|
289
|
+
tooltip: s(m.SETTINGS_MOVE_LAST),
|
|
261
290
|
onClick: W,
|
|
262
291
|
"aria-label": "move last place",
|
|
263
292
|
disabled: i === o.length - 1 || i === -1,
|
|
264
|
-
icon: /* @__PURE__ */ r(
|
|
293
|
+
icon: /* @__PURE__ */ r(te, {})
|
|
265
294
|
}
|
|
266
295
|
),
|
|
267
296
|
/* @__PURE__ */ r(
|
|
268
|
-
|
|
297
|
+
a,
|
|
269
298
|
{
|
|
270
|
-
tooltip: s(
|
|
299
|
+
tooltip: s(m.SETTINGS_MOVE_DOWN),
|
|
271
300
|
onClick: () => y(1),
|
|
272
301
|
"aria-label": "move down place",
|
|
273
302
|
disabled: i === o.length - 1 || i === -1,
|
|
274
|
-
icon: /* @__PURE__ */ r(
|
|
303
|
+
icon: /* @__PURE__ */ r(oe, {})
|
|
275
304
|
}
|
|
276
305
|
),
|
|
277
306
|
/* @__PURE__ */ r(
|
|
278
|
-
|
|
307
|
+
a,
|
|
279
308
|
{
|
|
280
|
-
tooltip: s(
|
|
309
|
+
tooltip: s(m.SETTINGS_VISIBLE_ALL),
|
|
281
310
|
onClick: V,
|
|
282
311
|
"aria-label": "check visible all",
|
|
283
|
-
icon: /* @__PURE__ */ r(
|
|
312
|
+
icon: /* @__PURE__ */ r(ie, {})
|
|
284
313
|
}
|
|
285
314
|
),
|
|
286
315
|
/* @__PURE__ */ r(
|
|
287
|
-
|
|
316
|
+
a,
|
|
288
317
|
{
|
|
289
|
-
tooltip: s(
|
|
318
|
+
tooltip: s(m.SETTINGS_NO_VISIBLE_ALL),
|
|
290
319
|
onClick: U,
|
|
291
320
|
"aria-label": "un check all",
|
|
292
|
-
icon: /* @__PURE__ */ r(
|
|
321
|
+
icon: /* @__PURE__ */ r(re, {})
|
|
293
322
|
}
|
|
294
323
|
),
|
|
295
324
|
/* @__PURE__ */ r(
|
|
296
|
-
|
|
325
|
+
a,
|
|
297
326
|
{
|
|
298
|
-
tooltip: s(
|
|
327
|
+
tooltip: s(m.SETTINGS_RESTORE),
|
|
299
328
|
onClick: F,
|
|
300
329
|
"aria-label": "Restore columns",
|
|
301
|
-
icon: /* @__PURE__ */ r(
|
|
330
|
+
icon: /* @__PURE__ */ r(ne, {})
|
|
302
331
|
}
|
|
303
332
|
)
|
|
304
333
|
] })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as x, jsx as
|
|
1
|
+
import { jsxs as x, jsx as m } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as ee, useRef as z, useState as _, useImperativeHandle as oe, useMemo as M, useEffect as te } from "react";
|
|
3
|
-
import { useModuleDictionary as re, useEnvironment as
|
|
4
|
-
import
|
|
3
|
+
import { useModuleDictionary as re, useEnvironment as ie } from "@m4l/core";
|
|
4
|
+
import ne from "react-data-grid";
|
|
5
5
|
import { IconButton as S } from "../../../../../../../extended/mui/IconButton/IconButton.js";
|
|
6
6
|
import "clsx";
|
|
7
7
|
import "../../../../../../../formatters/BooleanFormatter/slots/BooleanFormatterSlots.js";
|
|
@@ -60,10 +60,40 @@ import "../../../../../../../formatters/ImageFormatter/constants.js";
|
|
|
60
60
|
import "../../../../../../../formatters/IconsFormatter/constants.js";
|
|
61
61
|
import "../../../../../../../formatters/IconsFormatter/slots/IconsFormatterSlots.js";
|
|
62
62
|
import { ColumnInteractiveCheckFormatter as N } from "../../../../../../formatters/ColumnInteractiveCheckFormatter/formatter.js";
|
|
63
|
+
import "../../../../../../../extended/mui/Accordion/Accordion.js";
|
|
64
|
+
import "../../../../../../../extended/mui/Avatar/Avatar.js";
|
|
65
|
+
import "react-router-dom";
|
|
66
|
+
import "../../../../../../../extended/mui/Button/Button.js";
|
|
67
|
+
import "../../../../../../../extended/mui/CheckBox/CheckBox.js";
|
|
68
|
+
import "../../../../../../../extended/mui/Radio/Radio.js";
|
|
69
|
+
import "../../../../../../../extended/mui/CircularProgress/slots/CircularProgressSlots.js";
|
|
70
|
+
import "../../../../../../../extended/mui/Badge/slots/BadgeSlots.js";
|
|
71
|
+
import "../../../../../../../Image/subcomponents/IntersectComponent/index.js";
|
|
72
|
+
import "../../../../../../../Image/slots/ImageSlots.js";
|
|
73
|
+
import "../../../../../../../Image/constant.js";
|
|
74
|
+
import "../../../../../../../extended/mui/ImageButton/styles.js";
|
|
75
|
+
import "../../../../../../../extended/mui/ImageButton/utils/Clases/index.js";
|
|
76
|
+
import "../../../../../../../extended/mui/LoadingButton/slots/LoadingButtonSlots.js";
|
|
77
|
+
import "../../../../../../../extended/mui/Popover/slots/PopoverSlots.js";
|
|
78
|
+
import "../../../../../../../extended/mui/Select/Select.js";
|
|
79
|
+
import "../../../../../../../extended/mui/Skeleton/Slots/skeletonSlots.js";
|
|
80
|
+
import "../../../../../../../extended/mui/Stack/Stack.js";
|
|
81
|
+
import "../../../../../../../extended/mui/Tab/Slots/TabSlots.js";
|
|
82
|
+
import "../../../../../../../extended/mui/Tabs/slots/TabsSlots.js";
|
|
83
|
+
import "@m4l/icons";
|
|
84
|
+
import "../../../../../../../extended/mui/TabContent/slots/TabContentSlots.js";
|
|
85
|
+
import "../../../../../../../extended/mui/Typography/Typography.js";
|
|
86
|
+
import "../../../../../../../extended/mui/ToggleButton/slots/ToggleButtonSlots.js";
|
|
87
|
+
import "../../../../../../../extended/mui/NavLink/slots/NavLinkSlots.js";
|
|
88
|
+
import "../../../../../../../extended/mui/NavLink/constants.js";
|
|
89
|
+
import "../../../../../../../extended/mui/Dialog/Dialog.js";
|
|
90
|
+
import "../../../../../../../extended/mui/Divider/slots/DividerSlots.js";
|
|
91
|
+
import "../../../../../../../extended/mui/DatePicker/slots/DatePickerSlots.js";
|
|
92
|
+
import "../../../../../../../extended/mui/DatePicker/constants.js";
|
|
63
93
|
import "../../../../../adapters/CheckboxCellAdapter/CheckboxCellAdapter.js";
|
|
64
94
|
import "../../../../../../contexts/DataGridContext/DataGridContext.js";
|
|
65
95
|
import { pathIcons as I } from "../../../../../../icons.js";
|
|
66
|
-
import { ColumnsConfigWrapperStyled as le, ColumnsConfigDataGridStyled as se, ColumnsConfigSelColumnsStyled as
|
|
96
|
+
import { ColumnsConfigWrapperStyled as le, ColumnsConfigDataGridStyled as se, ColumnsConfigSelColumnsStyled as pe, TableWrapperDataGridStyled as me, ColumnsConfigActiosStyled as ae } from "../../../../../../slots/DataGridSlot.js";
|
|
67
97
|
import { DICTIONARY as s } from "../../../../../../dictionary.js";
|
|
68
98
|
function A(C, d) {
|
|
69
99
|
return C.filter((r) => !r.hidden).map((r) => {
|
|
@@ -99,9 +129,9 @@ const w = (C) => {
|
|
|
99
129
|
classes: F,
|
|
100
130
|
size: G,
|
|
101
131
|
columns: k
|
|
102
|
-
} = C, { getLabel: l } = re(), [U, V] = _(!0), [t,
|
|
132
|
+
} = C, { getLabel: l } = re(), [U, V] = _(!0), [t, a] = _(
|
|
103
133
|
A(c, k)
|
|
104
|
-
), [y, D] = _(() => /* @__PURE__ */ new Set()), R = z(null), { host_static_assets: u, environment_assets: f } =
|
|
134
|
+
), [y, D] = _(() => /* @__PURE__ */ new Set()), R = z(null), { host_static_assets: u, environment_assets: f } = ie();
|
|
105
135
|
oe(d, () => ({
|
|
106
136
|
onClickIntro: Z,
|
|
107
137
|
current: R.current
|
|
@@ -153,102 +183,102 @@ const w = (C) => {
|
|
|
153
183
|
...w("center")
|
|
154
184
|
}), e;
|
|
155
185
|
}, [l, k]), B = () => {
|
|
156
|
-
|
|
186
|
+
a(t.map((e) => ({ ...e, visible: !0 })));
|
|
157
187
|
}, W = () => {
|
|
158
|
-
|
|
188
|
+
a(t.map((e) => ({ ...e, visible: !1 })));
|
|
159
189
|
}, K = () => {
|
|
160
|
-
|
|
190
|
+
a(
|
|
161
191
|
t.map((e) => ({
|
|
162
192
|
...e,
|
|
163
193
|
visible: e.originalVisible,
|
|
164
194
|
frozen: e.originalFrozen,
|
|
165
195
|
grouped: e.originalGrouped,
|
|
166
196
|
index: e.originalIndex
|
|
167
|
-
})).sort((e,
|
|
197
|
+
})).sort((e, i) => e.index - i.index)
|
|
168
198
|
);
|
|
169
199
|
};
|
|
170
200
|
te(() => {
|
|
171
|
-
U === !1 &&
|
|
201
|
+
U === !1 && a(
|
|
172
202
|
A(c, k)
|
|
173
203
|
), V(!1);
|
|
174
204
|
}, [c]);
|
|
175
|
-
const
|
|
205
|
+
const n = M(() => {
|
|
176
206
|
let e = -1;
|
|
177
207
|
if (y.size !== 1)
|
|
178
208
|
return e;
|
|
179
209
|
const o = y.entries().next().value?.[1];
|
|
180
|
-
return e = t.findIndex((
|
|
210
|
+
return e = t.findIndex((p) => p.key === o), e;
|
|
181
211
|
}, [t, y]), j = () => {
|
|
182
|
-
if (
|
|
212
|
+
if (n === -1)
|
|
183
213
|
return -1;
|
|
184
214
|
const e = [...t];
|
|
185
|
-
e.splice(
|
|
215
|
+
e.splice(n, 1), e.splice(0, 0, t[n]), r.current?.selectCell({ idx: 0, rowIdx: 0 }), a(e);
|
|
186
216
|
}, H = () => {
|
|
187
|
-
if (
|
|
217
|
+
if (n === -1)
|
|
188
218
|
return -1;
|
|
189
219
|
const e = [...t];
|
|
190
|
-
e.splice(
|
|
220
|
+
e.splice(n, 1), e.splice(e.length, 0, t[n]), r.current?.selectCell({ idx: 0, rowIdx: e.length - 1 }), a(e);
|
|
191
221
|
}, $ = (e) => {
|
|
192
|
-
if (
|
|
222
|
+
if (n === -1)
|
|
193
223
|
return -1;
|
|
194
|
-
const
|
|
195
|
-
|
|
224
|
+
const i = [...t], o = i[n];
|
|
225
|
+
i.splice(n, 1), i.splice(n + e, 0, o), r.current?.selectCell({
|
|
196
226
|
idx: 0,
|
|
197
|
-
rowIdx:
|
|
198
|
-
}),
|
|
227
|
+
rowIdx: n + e
|
|
228
|
+
}), a(i);
|
|
199
229
|
}, Y = (e) => {
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
230
|
+
const i = t.findIndex((o) => o.key === e);
|
|
231
|
+
if (i > -1)
|
|
202
232
|
return {
|
|
203
|
-
visible: t[
|
|
204
|
-
frozen: t[
|
|
233
|
+
visible: t[i].visible,
|
|
234
|
+
frozen: t[i].frozen
|
|
205
235
|
};
|
|
206
236
|
}, O = (e) => {
|
|
207
|
-
const
|
|
208
|
-
return
|
|
237
|
+
const i = t.findIndex((o) => o.key === e.key);
|
|
238
|
+
return i > -1 ? i : c.findIndex(
|
|
209
239
|
(o) => o.key === e.key
|
|
210
240
|
);
|
|
211
241
|
}, Z = () => {
|
|
212
|
-
const e = t.filter((o) => o.grouped),
|
|
213
|
-
const
|
|
242
|
+
const e = t.filter((o) => o.grouped), i = c.map((o) => {
|
|
243
|
+
const p = { ...o };
|
|
214
244
|
if (!o.hidden) {
|
|
215
245
|
const v = Y(o.key);
|
|
216
|
-
v && (
|
|
246
|
+
v && (p.visible = v.visible, p.frozen = v.frozen);
|
|
217
247
|
const T = t.findIndex(
|
|
218
248
|
(g) => g.key === o.key
|
|
219
249
|
);
|
|
220
|
-
T > -1 && (
|
|
250
|
+
T > -1 && (p.index = T);
|
|
221
251
|
const L = t.find((g) => g.key === o.key);
|
|
222
252
|
if (L) {
|
|
223
|
-
|
|
253
|
+
p.grouped = L.grouped;
|
|
224
254
|
const g = e.findIndex(
|
|
225
255
|
(X) => X.key === o.key
|
|
226
256
|
);
|
|
227
|
-
|
|
257
|
+
p.groupOrder = g > -1 ? g : T;
|
|
228
258
|
}
|
|
229
259
|
}
|
|
230
|
-
return
|
|
231
|
-
}).sort((o,
|
|
232
|
-
h(
|
|
260
|
+
return p;
|
|
261
|
+
}).sort((o, p) => O(o) - O(p));
|
|
262
|
+
h(i), E();
|
|
233
263
|
}, q = () => {
|
|
234
264
|
}, J = (e) => {
|
|
235
|
-
|
|
265
|
+
a(e);
|
|
236
266
|
}, Q = ({ row: e }) => {
|
|
237
267
|
if (y.has(e.key))
|
|
238
268
|
return;
|
|
239
|
-
const
|
|
240
|
-
D(
|
|
269
|
+
const i = /* @__PURE__ */ new Set([e.key]);
|
|
270
|
+
D(i);
|
|
241
271
|
};
|
|
242
272
|
return /* @__PURE__ */ x(le, { ownerState: {}, ref: R, children: [
|
|
243
273
|
/* @__PURE__ */ x(se, { ownerState: {}, children: [
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
|
|
274
|
+
/* @__PURE__ */ m(pe, { ownerState: { size: G }, children: l(s.SETTINGS_SEL_COLUMNS) }),
|
|
275
|
+
/* @__PURE__ */ m(
|
|
276
|
+
me,
|
|
247
277
|
{
|
|
248
278
|
className: F?.tableWrapperDataGrid,
|
|
249
279
|
ownerState: { size: G },
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
-
|
|
280
|
+
children: /* @__PURE__ */ m(
|
|
281
|
+
ne,
|
|
252
282
|
{
|
|
253
283
|
ref: r,
|
|
254
284
|
rowHeight: b,
|
|
@@ -265,48 +295,48 @@ const w = (C) => {
|
|
|
265
295
|
}
|
|
266
296
|
)
|
|
267
297
|
] }),
|
|
268
|
-
/* @__PURE__ */ x(
|
|
269
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ x(ae, { ownerState: {}, children: [
|
|
299
|
+
/* @__PURE__ */ m(
|
|
270
300
|
S,
|
|
271
301
|
{
|
|
272
302
|
tooltip: l(s.SETTINGS_MOVE_FIRST),
|
|
273
303
|
onClick: j,
|
|
274
304
|
"aria-label": "move first place",
|
|
275
|
-
disabled:
|
|
305
|
+
disabled: n < 1,
|
|
276
306
|
icon: `${u}/${f}/${I.moveFirstPlace}`
|
|
277
307
|
}
|
|
278
308
|
),
|
|
279
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ m(
|
|
280
310
|
S,
|
|
281
311
|
{
|
|
282
312
|
tooltip: l(s.SETTINGS_MOVE_UP),
|
|
283
313
|
onClick: () => $(-1),
|
|
284
314
|
"aria-label": "move up place",
|
|
285
|
-
disabled:
|
|
315
|
+
disabled: n < 1,
|
|
286
316
|
icon: `${u}/${f}/${I.moveUpPlace}`
|
|
287
317
|
}
|
|
288
318
|
),
|
|
289
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ m(
|
|
290
320
|
S,
|
|
291
321
|
{
|
|
292
322
|
tooltip: l(s.SETTINGS_MOVE_LAST),
|
|
293
323
|
onClick: H,
|
|
294
324
|
"aria-label": "move last place",
|
|
295
|
-
disabled:
|
|
325
|
+
disabled: n === t.length - 1 || n === -1,
|
|
296
326
|
icon: `${u}/${f}/${I.moveLastPlace}`
|
|
297
327
|
}
|
|
298
328
|
),
|
|
299
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ m(
|
|
300
330
|
S,
|
|
301
331
|
{
|
|
302
332
|
tooltip: l(s.SETTINGS_MOVE_DOWN),
|
|
303
333
|
onClick: () => $(1),
|
|
304
334
|
"aria-label": "move down place",
|
|
305
|
-
disabled:
|
|
335
|
+
disabled: n === t.length - 1 || n === -1,
|
|
306
336
|
icon: `${u}/${f}/${I.moveDownPlace}`
|
|
307
337
|
}
|
|
308
338
|
),
|
|
309
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ m(
|
|
310
340
|
S,
|
|
311
341
|
{
|
|
312
342
|
tooltip: l(s.SETTINGS_VISIBLE_ALL),
|
|
@@ -315,7 +345,7 @@ const w = (C) => {
|
|
|
315
345
|
icon: `${u}/${f}/${I.checkAll}`
|
|
316
346
|
}
|
|
317
347
|
),
|
|
318
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ m(
|
|
319
349
|
S,
|
|
320
350
|
{
|
|
321
351
|
tooltip: l(s.SETTINGS_NO_VISIBLE_ALL),
|
|
@@ -324,7 +354,7 @@ const w = (C) => {
|
|
|
324
354
|
icon: `${u}/${f}/${I.uncheckAll}`
|
|
325
355
|
}
|
|
326
356
|
),
|
|
327
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ m(
|
|
328
358
|
S,
|
|
329
359
|
{
|
|
330
360
|
tooltip: l(s.SETTINGS_RESTORE),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.33-beta-feature-662-nestedformatter-link-icon-image.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
"react-toastify": "10.0.5",
|
|
53
53
|
"date-fns": "^2.30.0",
|
|
54
54
|
"react-transition-group": "^4.4.5",
|
|
55
|
-
"react-rnd": "^10.5.2",
|
|
56
55
|
"react-color": "^2.19.3",
|
|
57
56
|
"@mui/x-date-pickers": "6.20.2",
|
|
58
|
-
"react-
|
|
57
|
+
"react-rnd": "^10.5.2",
|
|
59
58
|
"react-data-grid": "7.0.0-beta.47",
|
|
60
59
|
"react-dnd": "^16.0.1",
|
|
61
60
|
"react-dnd-html5-backend": "^16.0.1",
|
|
61
|
+
"react-draggable": "^4.4.5",
|
|
62
62
|
"react-spinners": "^0.13.8",
|
|
63
|
-
"react-resizable": "^3.0.4",
|
|
64
63
|
"chart.js": "^4.4.0",
|
|
65
64
|
"chartjs-chart-error-bars": "^4.3.3",
|
|
66
65
|
"qrcode.react": "^3.1.0",
|
|
67
|
-
"
|
|
68
|
-
"react-resizable-panels": "^2.1.8"
|
|
66
|
+
"react-resizable": "^3.0.4",
|
|
67
|
+
"react-resizable-panels": "^2.1.8",
|
|
68
|
+
"simplebar-react": "3.2.6"
|
|
69
69
|
}
|
|
70
70
|
}
|