@m4l/components 0.0.35 → 0.0.38
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/dist/components/CompanyLogo/index.js +2 -3
- package/dist/components/DataGrid/index.js +21 -22
- package/dist/components/DynamicFilter/components/FilterButton/styles.d.ts +0 -1
- package/dist/components/DynamicFilter/components/fieldstypes/BooleanFilter/index.d.ts +4 -0
- package/dist/components/DynamicFilter/components/{PopupEditFilter/components → fieldstypes}/BooleanFilter/styles.d.ts +0 -0
- package/dist/components/DynamicFilter/components/fieldstypes/DateTimeFilter/index.d.ts +4 -0
- package/dist/components/DynamicFilter/components/{PopupEditFilter/components → fieldstypes}/DateTimeFilter/styles.d.ts +0 -0
- package/dist/components/DynamicFilter/components/fieldstypes/NumberFilter/index.d.ts +4 -0
- package/dist/components/DynamicFilter/components/{PopupEditFilter/components/StringFilter → fieldstypes/NumberFilter}/styles.d.ts +0 -0
- package/dist/components/DynamicFilter/components/fieldstypes/StringFilter/index.d.ts +4 -0
- package/dist/components/DynamicFilter/components/fieldstypes/StringFilter/styles.d.ts +3 -0
- package/dist/components/DynamicFilter/components/{PopupEditFilter/components → fieldstypes}/factory.d.ts +2 -2
- package/dist/components/DynamicFilter/components/{PopupEditFilter/components → fieldstypes}/validations.d.ts +1 -1
- package/dist/components/DynamicFilter/index.js +338 -140
- package/dist/components/DynamicFilter/types.d.ts +4 -2
- package/dist/components/Icon/index.js +29 -6
- package/dist/components/ModalDialog/index.js +6 -6
- package/dist/components/NoItemSelected/index.js +2 -3
- package/dist/components/ObjectLogs/index.js +17 -7
- package/dist/components/{DataGrid/formatters → formatters}/BooleanFormatter/index.d.ts +0 -0
- package/dist/components/formatters/BooleanFormatter/index.js +32 -0
- package/dist/components/{DataGrid/formatters → formatters}/BooleanFormatter/types.d.ts +2 -0
- package/dist/components/{DataGrid/formatters → formatters}/DateFormatter/index.d.ts +0 -0
- package/dist/components/formatters/DateFormatter/index.js +55 -0
- package/dist/components/{DataGrid/formatters → formatters}/DateFormatter/types.d.ts +4 -2
- package/dist/components/{DataGrid/formatters → formatters}/index.d.ts +0 -0
- package/dist/components/formatters/types.d.ts +2 -0
- package/dist/components/hook-form/RHFDateTime.js +9 -2
- package/dist/components/hook-form/RHFUpload.js +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/mui_extended/Accordion/index.js +2 -2
- package/dist/components/mui_extended/IconButton/index.d.ts +1 -1
- package/dist/components/mui_extended/IconButton/index.js +4 -2
- package/dist/components/mui_extended/IconButton/types.d.ts +2 -1
- package/dist/components/mui_extended/MenuActions/index.js +3 -3
- package/dist/components/mui_extended/Pager/index.js +5 -5
- package/dist/contexts/ModalContext/index.js +4 -4
- package/dist/index.js +3 -3
- package/dist/vendor.js +3 -3
- package/package.json +2 -5
- package/dist/components/DataGrid/formatters/BooleanFormatter/index.js +0 -26
- package/dist/components/DataGrid/formatters/DateFormatter/index.js +0 -33
- package/dist/components/DynamicFilter/components/PopupEditFilter/components/BooleanFilter/index.d.ts +0 -2
- package/dist/components/DynamicFilter/components/PopupEditFilter/components/DateTimeFilter/index.d.ts +0 -2
- package/dist/components/DynamicFilter/components/PopupEditFilter/components/StringFilter/index.d.ts +0 -2
|
@@ -15,7 +15,6 @@ styled("header")(({
|
|
|
15
15
|
theme
|
|
16
16
|
}) => ({
|
|
17
17
|
top: 0,
|
|
18
|
-
zIndex: 9,
|
|
19
18
|
lineHeight: 0,
|
|
20
19
|
width: "100%",
|
|
21
20
|
display: "flex",
|
|
@@ -59,7 +58,7 @@ const CompanyLogo = (props) => {
|
|
|
59
58
|
const width = size === "small" ? "50px" : "380px";
|
|
60
59
|
const {
|
|
61
60
|
host_static_assets,
|
|
62
|
-
|
|
61
|
+
environment_assets
|
|
63
62
|
} = useEnvironment();
|
|
64
63
|
const mdUp = useResponsive("up", "md");
|
|
65
64
|
if (isSkeleton) {
|
|
@@ -72,7 +71,7 @@ const CompanyLogo = (props) => {
|
|
|
72
71
|
});
|
|
73
72
|
}
|
|
74
73
|
return /* @__PURE__ */ jsx(Image, {
|
|
75
|
-
src: `${host_static_assets}/${
|
|
74
|
+
src: `${host_static_assets}/${environment_assets}/frontend/commons/assets/icons/${size === "small" ? "isotipo_m4l.svg" : "logotipo_m4l.svg"}`,
|
|
76
75
|
effect: "opacity",
|
|
77
76
|
width,
|
|
78
77
|
height,
|
|
@@ -11,7 +11,6 @@ import { P as Pager, g as getPagerComponentsDictionary, d as defaultPagerDiction
|
|
|
11
11
|
import { I as IconButton } from "../mui_extended/IconButton/index.js";
|
|
12
12
|
import { u as useModal } from "../../hooks/useModal/index.js";
|
|
13
13
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
14
|
-
import "date-fns";
|
|
15
14
|
import { g as getModalDialogComponentsDictionary, d as defaultModalDialogDictionary } from "../ModalDialog/index.js";
|
|
16
15
|
const WrapperGrid$1 = styled("div")(() => ({
|
|
17
16
|
display: "flex",
|
|
@@ -968,7 +967,7 @@ function Filter() {
|
|
|
968
967
|
} = useFilters();
|
|
969
968
|
const {
|
|
970
969
|
host_static_assets,
|
|
971
|
-
|
|
970
|
+
environment_assets
|
|
972
971
|
} = useEnvironment();
|
|
973
972
|
const toggleIcon = () => {
|
|
974
973
|
setActiveFilters(!activeFilters);
|
|
@@ -986,7 +985,7 @@ function Filter() {
|
|
|
986
985
|
dictionaryTooltip: activeFilters ? "grid.filter_hide" : "grid.filter_show",
|
|
987
986
|
onClick: toggleIcon,
|
|
988
987
|
"aria-label": "filter",
|
|
989
|
-
src: `${host_static_assets}/${
|
|
988
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/filter.svg`
|
|
990
989
|
});
|
|
991
990
|
}
|
|
992
991
|
const WrapperColumnsConfig = styled("div")(({ theme }) => ({
|
|
@@ -1075,7 +1074,7 @@ const ColumnsConfig = forwardRef((props, ref) => {
|
|
|
1075
1074
|
const divRef = useRef(null);
|
|
1076
1075
|
const {
|
|
1077
1076
|
host_static_assets,
|
|
1078
|
-
|
|
1077
|
+
environment_assets
|
|
1079
1078
|
} = useEnvironment();
|
|
1080
1079
|
useImperativeHandle(ref, () => ({
|
|
1081
1080
|
onClickIntro: handleIntro,
|
|
@@ -1258,40 +1257,40 @@ const ColumnsConfig = forwardRef((props, ref) => {
|
|
|
1258
1257
|
onClick: handleMoveFirst,
|
|
1259
1258
|
"aria-label": "move first place",
|
|
1260
1259
|
disabled: rowSelectedIndex < 1,
|
|
1261
|
-
src: `${host_static_assets}/${
|
|
1260
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/move_first_place.svg`
|
|
1262
1261
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1263
1262
|
dictionaryTooltip: "grid.settings_move_up",
|
|
1264
1263
|
onClick: () => handleMoveUpDownd(-1),
|
|
1265
1264
|
"aria-label": "move up place",
|
|
1266
1265
|
disabled: rowSelectedIndex < 1,
|
|
1267
|
-
src: `${host_static_assets}/${
|
|
1266
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/move_up_place.svg`
|
|
1268
1267
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1269
1268
|
dictionaryTooltip: "grid.settings_move_last",
|
|
1270
1269
|
onClick: handleMoveLast,
|
|
1271
1270
|
"aria-label": "move last place",
|
|
1272
1271
|
disabled: !!(rowSelectedIndex === rows.length - 1 || rowSelectedIndex === -1),
|
|
1273
|
-
src: `${host_static_assets}/${
|
|
1272
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/move_last_place.svg`
|
|
1274
1273
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1275
1274
|
dictionaryTooltip: "grid.settings_move_down",
|
|
1276
1275
|
onClick: () => handleMoveUpDownd(1),
|
|
1277
1276
|
"aria-label": "move down place",
|
|
1278
1277
|
disabled: !!(rowSelectedIndex === rows.length - 1 || rowSelectedIndex === -1),
|
|
1279
|
-
src: `${host_static_assets}/${
|
|
1278
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/move_down_place.svg`
|
|
1280
1279
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1281
1280
|
dictionaryTooltip: "grid.settings_visible_all",
|
|
1282
1281
|
onClick: checkAll,
|
|
1283
1282
|
"aria-label": "check visible all",
|
|
1284
|
-
src: `${host_static_assets}/${
|
|
1283
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/check_all.svg`
|
|
1285
1284
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1286
1285
|
dictionaryTooltip: "grid.settings_no_visible_all",
|
|
1287
1286
|
onClick: unCheckAll,
|
|
1288
1287
|
"aria-label": "un check all",
|
|
1289
|
-
src: `${host_static_assets}/${
|
|
1288
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/uncheck_all.svg`
|
|
1290
1289
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
1291
1290
|
dictionaryTooltip: "grid.settings_restore",
|
|
1292
1291
|
onClick: restoreAll,
|
|
1293
1292
|
"aria-label": "Restore columns",
|
|
1294
|
-
src: `${host_static_assets}/${
|
|
1293
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/restore_columns.svg`
|
|
1295
1294
|
})]
|
|
1296
1295
|
})]
|
|
1297
1296
|
});
|
|
@@ -1319,7 +1318,7 @@ function Settings() {
|
|
|
1319
1318
|
} = useModuleDictionary();
|
|
1320
1319
|
const {
|
|
1321
1320
|
host_static_assets,
|
|
1322
|
-
|
|
1321
|
+
environment_assets
|
|
1323
1322
|
} = useEnvironment();
|
|
1324
1323
|
const ref = useRef(null);
|
|
1325
1324
|
const onCloseSettings = useCallback(() => {
|
|
@@ -1362,7 +1361,7 @@ function Settings() {
|
|
|
1362
1361
|
dictionaryTooltip: "grid.settings_tooltip",
|
|
1363
1362
|
onClick: onClickSettings,
|
|
1364
1363
|
"aria-label": "settings",
|
|
1365
|
-
src: `${host_static_assets}/${
|
|
1364
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/configuration.svg`
|
|
1366
1365
|
});
|
|
1367
1366
|
}
|
|
1368
1367
|
const Container = styled("div")(() => ({
|
|
@@ -1429,7 +1428,7 @@ const SKTWrapperDensity = styled("div")(({ theme }) => ({
|
|
|
1429
1428
|
function Density() {
|
|
1430
1429
|
const {
|
|
1431
1430
|
host_static_assets,
|
|
1432
|
-
|
|
1431
|
+
environment_assets
|
|
1433
1432
|
} = useEnvironment();
|
|
1434
1433
|
const {
|
|
1435
1434
|
rowHeights,
|
|
@@ -1445,31 +1444,31 @@ function Density() {
|
|
|
1445
1444
|
return [];
|
|
1446
1445
|
}
|
|
1447
1446
|
return [{
|
|
1448
|
-
urlIcon: `${host_static_assets}/${
|
|
1447
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/compact.svg`,
|
|
1449
1448
|
onClick: () => setRowHeightVariant("compact"),
|
|
1450
1449
|
disabled: currentRowHeightVariant === "compact",
|
|
1451
1450
|
dictionaryField: "grid.density_compact"
|
|
1452
1451
|
}, {
|
|
1453
|
-
urlIcon: `${host_static_assets}/${
|
|
1452
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/standard.svg`,
|
|
1454
1453
|
onClick: () => setRowHeightVariant("standard"),
|
|
1455
1454
|
disabled: currentRowHeightVariant === "standard",
|
|
1456
1455
|
dictionaryField: "grid.density_standard"
|
|
1457
1456
|
}, {
|
|
1458
|
-
urlIcon: `${host_static_assets}/${
|
|
1457
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/confortable.svg`,
|
|
1459
1458
|
onClick: () => setRowHeightVariant("confortable"),
|
|
1460
1459
|
disabled: currentRowHeightVariant === "confortable",
|
|
1461
1460
|
dictionaryField: "grid.density_confortable"
|
|
1462
1461
|
}];
|
|
1463
|
-
}, [rowHeights, currentRowHeightVariant, setRowHeightVariant, host_static_assets,
|
|
1462
|
+
}, [rowHeights, currentRowHeightVariant, setRowHeightVariant, host_static_assets, environment_assets]);
|
|
1464
1463
|
const currenViewIcon = useMemo(() => {
|
|
1465
1464
|
if (currentRowHeightVariant === "compact") {
|
|
1466
|
-
return `${host_static_assets}/${
|
|
1465
|
+
return `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/compact.svg`;
|
|
1467
1466
|
}
|
|
1468
1467
|
if (currentRowHeightVariant === "standard") {
|
|
1469
|
-
return `${host_static_assets}/${
|
|
1468
|
+
return `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/standard.svg`;
|
|
1470
1469
|
}
|
|
1471
|
-
return `${host_static_assets}/${
|
|
1472
|
-
}, [currentRowHeightVariant, host_static_assets,
|
|
1470
|
+
return `${host_static_assets}/${environment_assets}/frontend/components/grid/assets/icons/confortable.svg`;
|
|
1471
|
+
}, [currentRowHeightVariant, host_static_assets, environment_assets]);
|
|
1473
1472
|
if (menuActions.length === 0) {
|
|
1474
1473
|
return /* @__PURE__ */ jsx(Fragment, {});
|
|
1475
1474
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const SKTWrapperFilterButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
-
export declare const InputFilter: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
3
|
export declare const WrapperFilterButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterFieldApply, Field } from '../../../types';
|
|
3
|
+
export declare const getDefaultBooleanFilter: (field: Field, fixed: boolean, getLabel: (key: string) => string) => FilterFieldApply;
|
|
4
|
+
export declare function BooleanFilter(): JSX.Element;
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterFieldApply, Field } from '../../../types';
|
|
3
|
+
export declare const getDefaultDateTimeFilter: (field: Field, fixed: boolean, getLabel: (key: string) => string) => FilterFieldApply;
|
|
4
|
+
export declare function DateTimeFilter(): JSX.Element;
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterFieldApply, Field } from '../../../types';
|
|
3
|
+
export declare const getDefaultNumberFilter: (field: Field, fixed: boolean, getLabel: (key: string) => string) => FilterFieldApply;
|
|
4
|
+
export declare function NumberFilter(): JSX.Element;
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Field, FilterFieldApply } from '../../../types';
|
|
3
|
+
export declare const getDefaultStringFilter: (field: Field, fixed: boolean, getLabel: (key: string) => string) => FilterFieldApply;
|
|
4
|
+
export declare function StringFilter(): JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WrapperStringFilter: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
+
export declare const WrapperAutoComplete: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FilterFieldApply, Field
|
|
3
|
-
export declare const getDefaultFilterValues: (field: Field, fixed: boolean,
|
|
2
|
+
import type { FilterFieldApply, Field } from '../../types';
|
|
3
|
+
export declare const getDefaultFilterValues: (field: Field, fixed: boolean, getLabel: (key: string) => string) => FilterFieldApply;
|
|
4
4
|
export declare const PopupEditFilterComponent: (props: {
|
|
5
5
|
filter: FilterFieldApply;
|
|
6
6
|
}) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InitialFilterFieldApply } from '
|
|
1
|
+
import { InitialFilterFieldApply } from '../../types';
|
|
2
2
|
export declare function isValidDate(d: any): any;
|
|
3
3
|
export declare const verifyStringFilter: (filter: InitialFilterFieldApply) => boolean;
|
|
4
4
|
export declare const verifyBooleanFilter: (filter: InitialFilterFieldApply) => boolean;
|