@m4l/components 0.0.61 → 0.0.62
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/DynamicFilter/components/ApplyedFilters/components/ApplyedFilter/styles.d.ts +5 -5
- package/dist/components/DynamicFilter/index.js +21 -18
- package/dist/components/Icon/index.js +5 -2
- package/dist/components/ObjectLogs/index.js +9 -5
- package/dist/components/mui_extended/IconButton/index.js +3 -3
- package/dist/contexts/ModalContext/index.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/vendor.js +5 -1
- package/package.json +1 -1
package/dist/components/DynamicFilter/components/ApplyedFilters/components/ApplyedFilter/styles.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const WrapperApplyedFilter: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
3
|
-
export declare const AplyedFilterStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
4
|
-
export declare const ContainerField: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
5
|
-
export declare const ContainerOperator: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
6
|
-
export declare const ContainerOperands: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material
|
|
2
|
+
export declare const WrapperApplyedFilter: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
3
|
+
export declare const AplyedFilterStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
4
|
+
export declare const ContainerField: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
5
|
+
export declare const ContainerOperator: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
6
|
+
export declare const ContainerOperands: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as ScrollBar } from "../ScrollBar/index.js";
|
|
2
|
-
import { styled, alpha } from "@mui/material/styles";
|
|
2
|
+
import { styled, alpha as alpha$1 } from "@mui/material/styles";
|
|
3
3
|
import require$$0, { useRef, useState, useMemo, useCallback, useEffect, createContext, useContext } from "react";
|
|
4
4
|
import { useModuleDictionary, useHostTools, useEnvironment, voidFunction, useFlagsPresent } from "@m4l/core";
|
|
5
5
|
import * as Yup from "yup";
|
|
@@ -7,7 +7,7 @@ import { useFormContext, useWatch } from "react-hook-form";
|
|
|
7
7
|
import { F as FormProvider } from "../hook-form/FormProvider/index.js";
|
|
8
8
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
9
|
import { R as RHFAutocomplete } from "../../vendor.js";
|
|
10
|
-
import { styled as styled$1, Skeleton, MenuItem, useTheme, Popper } from "@mui/material";
|
|
10
|
+
import { alpha, styled as styled$1, Skeleton, MenuItem, useTheme, Popper } from "@mui/material";
|
|
11
11
|
import "../hook-form/RHFAutocompleteAsync/index.js";
|
|
12
12
|
import "../hook-form/RHFCheckbox/index.js";
|
|
13
13
|
import { R as RHFDateTime } from "../hook-form/RHFDateTime.js";
|
|
@@ -33,8 +33,8 @@ const WrapperApplyedFilters = styled("div")(({
|
|
|
33
33
|
theme
|
|
34
34
|
}) => ({
|
|
35
35
|
width: "100%",
|
|
36
|
-
margin: theme.spacing(0, 1
|
|
37
|
-
paddingLeft: theme.spacing(1
|
|
36
|
+
margin: theme.spacing(0, 1),
|
|
37
|
+
paddingLeft: theme.spacing(1),
|
|
38
38
|
borderLeft: `1px solid ${theme.palette.divider}`
|
|
39
39
|
}));
|
|
40
40
|
const ContainerApplyedFilters = styled("div")(({
|
|
@@ -1047,8 +1047,11 @@ const WrapperApplyedFilter = styled("div")(({
|
|
|
1047
1047
|
alignItems: "center",
|
|
1048
1048
|
height: "100%",
|
|
1049
1049
|
minHeight: theme.spacing(3),
|
|
1050
|
-
|
|
1051
|
-
backgroundColor: theme.palette.
|
|
1050
|
+
paddingLeft: theme.spacing(1),
|
|
1051
|
+
backgroundColor: theme.palette.grid?.sectionHeader,
|
|
1052
|
+
border: "1px solid",
|
|
1053
|
+
borderColor: alpha(`${theme.palette.divider}`, 0.1),
|
|
1054
|
+
overflow: "visible",
|
|
1052
1055
|
borderRadius: theme.spacing(1),
|
|
1053
1056
|
"&.waf_no_setted": {
|
|
1054
1057
|
border: `1px solid ${theme.palette.error.main}`
|
|
@@ -1098,13 +1101,13 @@ function ApplyedFilter(props) {
|
|
|
1098
1101
|
removeFilter,
|
|
1099
1102
|
showPopupForEditFilter,
|
|
1100
1103
|
hidePopupEdit,
|
|
1101
|
-
getFieldByName
|
|
1102
|
-
isSkeleton
|
|
1104
|
+
getFieldByName
|
|
1103
1105
|
} = useBase();
|
|
1104
1106
|
const {
|
|
1105
1107
|
host_static_assets,
|
|
1106
1108
|
environment_assets
|
|
1107
1109
|
} = useEnvironment();
|
|
1110
|
+
useModuleDictionary();
|
|
1108
1111
|
const field = useMemo(() => {
|
|
1109
1112
|
return getFieldByName(fieldName);
|
|
1110
1113
|
}, [getFieldByName]);
|
|
@@ -1143,8 +1146,9 @@ function ApplyedFilter(props) {
|
|
|
1143
1146
|
})]
|
|
1144
1147
|
}), !fixed && /* @__PURE__ */ jsx(IconButton, {
|
|
1145
1148
|
size: "small",
|
|
1146
|
-
src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/
|
|
1147
|
-
onClick: onDelete
|
|
1149
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/clear.svg`,
|
|
1150
|
+
onClick: onDelete,
|
|
1151
|
+
dictionaryTooltip: "dynamic_filter.tooltip_clear_filter"
|
|
1148
1152
|
})]
|
|
1149
1153
|
});
|
|
1150
1154
|
}
|
|
@@ -1208,7 +1212,8 @@ const ClearFilters = () => {
|
|
|
1208
1212
|
return /* @__PURE__ */ jsx(WrapperClearFilters, {
|
|
1209
1213
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
1210
1214
|
src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/clear.svg`,
|
|
1211
|
-
onClick: clearFilters
|
|
1215
|
+
onClick: clearFilters,
|
|
1216
|
+
dictionaryTooltip: "dynamic_filter.tooltip_clear_filters"
|
|
1212
1217
|
})
|
|
1213
1218
|
});
|
|
1214
1219
|
}
|
|
@@ -1222,14 +1227,9 @@ const SKTWrapperFilterButton = styled("div")(({
|
|
|
1222
1227
|
alignItems: "center",
|
|
1223
1228
|
minWidth: theme.spacing(3.75),
|
|
1224
1229
|
height: theme.spacing(3.75),
|
|
1225
|
-
background: alpha(theme.palette.primary.main, 0.3)
|
|
1230
|
+
background: alpha$1(theme.palette.primary.main, 0.3)
|
|
1226
1231
|
}));
|
|
1227
|
-
const WrapperFilterButton = styled("div")(({
|
|
1228
|
-
theme
|
|
1229
|
-
}) => ({
|
|
1230
|
-
paddingRight: theme.spacing(0.75),
|
|
1231
|
-
marginRight: theme.spacing(0.75),
|
|
1232
|
-
borderRight: `1px solid ${theme.palette.divider}`,
|
|
1232
|
+
const WrapperFilterButton = styled("div")(() => ({
|
|
1233
1233
|
"&.isDirty": {
|
|
1234
1234
|
animationName: "dirtyEffect",
|
|
1235
1235
|
animationDuration: "1s",
|
|
@@ -1300,6 +1300,9 @@ const WrapperInputFilter = styled("div")(({
|
|
|
1300
1300
|
alignItems: "center",
|
|
1301
1301
|
width: "100%",
|
|
1302
1302
|
height: theme.spacing(3),
|
|
1303
|
+
borderLeft: `1px solid ${theme.palette.divider}`,
|
|
1304
|
+
paddingLeft: theme.spacing(1),
|
|
1305
|
+
marginLeft: theme.spacing(1),
|
|
1303
1306
|
[theme.breakpoints.up("sm")]: {
|
|
1304
1307
|
width: theme.spacing(25)
|
|
1305
1308
|
}
|
|
@@ -8,6 +8,7 @@ const DivIcon = styled("div", {
|
|
|
8
8
|
})((props) => ({
|
|
9
9
|
maskPosition: "center!important",
|
|
10
10
|
maskRepeat: "no-repeat!important",
|
|
11
|
+
WebkitMaskRepeat: "no-repeat!important",
|
|
11
12
|
width: props.width === void 0 ? "20px" : props.width,
|
|
12
13
|
height: props.height === void 0 ? "20px" : props.height,
|
|
13
14
|
backgroundColor: props.bgColor,
|
|
@@ -28,7 +29,7 @@ function Icon(props) {
|
|
|
28
29
|
src,
|
|
29
30
|
width = "16px",
|
|
30
31
|
height = "16px",
|
|
31
|
-
bgColor = "active"
|
|
32
|
+
bgColor = "action.active"
|
|
32
33
|
} = props;
|
|
33
34
|
const [resource, setResource] = useState(void 0);
|
|
34
35
|
const theme = useTheme();
|
|
@@ -41,9 +42,10 @@ function Icon(props) {
|
|
|
41
42
|
xml = xml.match(/(<svg\b[^>]*\s*(viewBox="(\b[^"]*)").*?>([\s\S]*?)<\/svg>|<svg>([\s\S]*?)<\/svg>)/g)?.toString() || "";
|
|
42
43
|
if (mounted) {
|
|
43
44
|
setResource(window.btoa(xml));
|
|
45
|
+
console.log("value icon set resource", resource);
|
|
44
46
|
}
|
|
45
47
|
}).catch((_err) => {
|
|
46
|
-
console.log("error icon");
|
|
48
|
+
console.log("error icon", _err);
|
|
47
49
|
});
|
|
48
50
|
})();
|
|
49
51
|
return function clenUp() {
|
|
@@ -51,6 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tMC40LTEtMC40LTEuNXMwLjEtMS4xLDAuNC0xLjVsMjMtMzYuNGMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNHMwLjksMC42LDEuMiwxLjEKCQlsMTEuNSwxOC4yYzAuMiwwLjMsMC41LDAuNSwwLjgsMC43czAuNiwwLjMsMSwwLjNjMC4zLDAsMC43LTAuMSwxLTAuM3MwLjYtMC40LDAuOC0wLjdsMy4xLTQuOWMwLjMtMC41LDAuNy0wLjgsMS4yLTEuMQoJCXMxLTAuNCwxLjYtMC40czEuMSwwLjEsMS42LDAuNGMwLjUsMC4zLDAuOSwwLjYsMS4yLDEuMWwxNC42LDIzLjFjMC4zLDAuNSwwLjMsMSwwLjMsMS41UzY4LjcsNjEuNyw2OC40LDYyLjF6Ii8+CjwvZz4KPC9zdmc+Cg==";
|
|
56
|
+
console.log("value for getColor", getPaletteColor(theme.palette, "error.main"));
|
|
54
57
|
return /* @__PURE__ */ jsx(WrapperPlaceHolder, {
|
|
55
58
|
id: "IconReact",
|
|
56
59
|
width,
|
|
@@ -115,7 +115,7 @@ function DetailFormatter(props) {
|
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
118
|
-
title: "
|
|
118
|
+
title: getLabel("object_logs.view_log_detail"),
|
|
119
119
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
120
120
|
onClick: onClickDetail,
|
|
121
121
|
"aria-label": "filter",
|
|
@@ -133,6 +133,10 @@ function ObjectLogs(props) {
|
|
|
133
133
|
const {
|
|
134
134
|
getLabel
|
|
135
135
|
} = useModuleDictionary();
|
|
136
|
+
const {
|
|
137
|
+
host_static_assets,
|
|
138
|
+
environment_assets
|
|
139
|
+
} = useEnvironment();
|
|
136
140
|
const [queryParams, setQueryParams] = useState({
|
|
137
141
|
resource_id,
|
|
138
142
|
object_id
|
|
@@ -212,28 +216,28 @@ function ObjectLogs(props) {
|
|
|
212
216
|
type: "datetime",
|
|
213
217
|
multiple: false,
|
|
214
218
|
presence: "fixed",
|
|
215
|
-
urlIcon:
|
|
219
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`
|
|
216
220
|
}, {
|
|
217
221
|
name: "users.email",
|
|
218
222
|
label: getLabel("object_logs.email"),
|
|
219
223
|
type: "string",
|
|
220
224
|
multiple: true,
|
|
221
225
|
presence: "optional",
|
|
222
|
-
urlIcon:
|
|
226
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`
|
|
223
227
|
}, {
|
|
224
228
|
name: "user_logs.log_preview",
|
|
225
229
|
label: getLabel("object_logs.log_preview"),
|
|
226
230
|
type: "string",
|
|
227
231
|
multiple: true,
|
|
228
232
|
presence: "optional",
|
|
229
|
-
urlIcon:
|
|
233
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_preview.svg`
|
|
230
234
|
}, {
|
|
231
235
|
name: "user_logs.log_detail",
|
|
232
236
|
label: getLabel("object_logs.log_detail"),
|
|
233
237
|
type: "string",
|
|
234
238
|
multiple: true,
|
|
235
239
|
presence: "optional",
|
|
236
|
-
urlIcon:
|
|
240
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_detail.svg`
|
|
237
241
|
}],
|
|
238
242
|
initialFilters: []
|
|
239
243
|
})
|
|
@@ -64,7 +64,7 @@ function IconButton({
|
|
|
64
64
|
tooltip,
|
|
65
65
|
size = "small",
|
|
66
66
|
dictionaryTooltip,
|
|
67
|
-
bgColor = "active",
|
|
67
|
+
bgColor = "primary.active",
|
|
68
68
|
...other
|
|
69
69
|
}) {
|
|
70
70
|
const {
|
|
@@ -92,7 +92,7 @@ function IconButton({
|
|
|
92
92
|
...other,
|
|
93
93
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
94
94
|
src,
|
|
95
|
-
bgColor: other.disabled ? "disabled" : bgColor
|
|
95
|
+
bgColor: other.disabled ? "action.disabled" : bgColor
|
|
96
96
|
})
|
|
97
97
|
})
|
|
98
98
|
})
|
|
@@ -101,7 +101,7 @@ function IconButton({
|
|
|
101
101
|
...other,
|
|
102
102
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
103
103
|
src,
|
|
104
|
-
bgColor: other.disabled ? "disabled" : bgColor
|
|
104
|
+
bgColor: other.disabled ? "action.disabled" : bgColor
|
|
105
105
|
})
|
|
106
106
|
});
|
|
107
107
|
}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Palette, Theme } from '@mui/material/styles';
|
|
2
2
|
import { VariantColor } from './types';
|
|
3
|
-
export declare const getPaletteColor: (palette: Palette, s: string) =>
|
|
3
|
+
export declare const getPaletteColor: (palette: Palette, s: string) => any;
|
|
4
4
|
export declare const getVariantColor: (variant: VariantColor | undefined) => "warning" | "info" | "primary" | "error";
|
|
5
5
|
export declare const getThemeVariantColor: (theme: Theme, variant: VariantColor | undefined) => string;
|
package/dist/vendor.js
CHANGED
|
@@ -204,18 +204,22 @@ function RHFAutocomplete(props) {
|
|
|
204
204
|
}
|
|
205
205
|
const getPaletteColor = function(palette, s) {
|
|
206
206
|
s = s.replace(/\[(\w+)\]/g, ".$1");
|
|
207
|
+
console.log("value of s first", s, palette);
|
|
207
208
|
s = s.replace(/^\./, "");
|
|
209
|
+
console.log("value of s second", s);
|
|
208
210
|
let o = palette;
|
|
209
211
|
const a = s.split(".");
|
|
212
|
+
console.log();
|
|
210
213
|
for (let i = 0, n = a.length; i < n; ++i) {
|
|
211
214
|
const k = a[i];
|
|
212
215
|
if (k in o) {
|
|
213
216
|
o = o[k];
|
|
217
|
+
console.log("value of lenght", o);
|
|
214
218
|
} else {
|
|
215
219
|
return palette.action.active;
|
|
216
220
|
}
|
|
217
221
|
}
|
|
218
|
-
return
|
|
222
|
+
return o;
|
|
219
223
|
};
|
|
220
224
|
const getVariantColor = (variant) => {
|
|
221
225
|
switch (variant) {
|