@m4l/components 0.0.50 → 0.0.51
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/CommonActions/components/ActionFormCancel/index.js +2 -2
- package/dist/components/CommonActions/components/Actions/index.d.ts +2 -2
- package/dist/components/CommonActions/components/Actions/index.js +8 -5
- package/dist/components/CommonActions/components/Actions/types.d.ts +1 -1
- package/dist/components/CommonActions/dictionary.d.ts +2 -2
- package/dist/components/DynamicFilter/index.js +15 -16
- package/dist/components/ModalDialog/index.js +2 -2
- package/dist/components/ObjectLogs/index.js +22 -11
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -36,8 +36,8 @@ function ActionFormCancel(props) {
|
|
|
36
36
|
if (isDirty) {
|
|
37
37
|
openModalConfirm({
|
|
38
38
|
variant: "warning",
|
|
39
|
-
title: getLabel("
|
|
40
|
-
msg: getLabel("
|
|
39
|
+
title: getLabel("common_actions.confirm_quit_title"),
|
|
40
|
+
msg: getLabel("common_actions.confirm_quit_msg"),
|
|
41
41
|
onClickIntro: onConfirmCancel
|
|
42
42
|
});
|
|
43
43
|
} else {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const Actions: (props:
|
|
2
|
+
import type { CommonActionsProps } from './types';
|
|
3
|
+
export declare const Actions: (props: CommonActionsProps) => JSX.Element;
|
|
@@ -839,19 +839,22 @@ function Actions(props) {
|
|
|
839
839
|
children: [withRowsCount && isDesktop && /* @__PURE__ */ jsx(RowsCount, {}), withPager && pagerOptions && /* @__PURE__ */ jsx(Pager, {
|
|
840
840
|
...pagerOptions,
|
|
841
841
|
totalRecords: pagerOptions.totalRecords,
|
|
842
|
-
isSkeleton
|
|
842
|
+
isSkeleton,
|
|
843
|
+
isDesktop
|
|
843
844
|
}), typeof rowHeights !== "number" && /* @__PURE__ */ jsx(Density, {}), withLocalFilters && /* @__PURE__ */ jsx(Filter, {}), withSettings && /* @__PURE__ */ jsx(Settings, {
|
|
844
845
|
...settingsProps
|
|
845
846
|
})]
|
|
846
847
|
});
|
|
847
848
|
}
|
|
848
|
-
function
|
|
849
|
+
function getCommonActionsDictionary() {
|
|
849
850
|
return ["common_actions"];
|
|
850
851
|
}
|
|
851
|
-
const
|
|
852
|
+
const defaultCommonActionsDictionary = {
|
|
852
853
|
common_actions: {
|
|
853
854
|
cancel: "Cancel",
|
|
854
|
-
intro: "Intro"
|
|
855
|
+
intro: "Intro",
|
|
856
|
+
confirm_quit_title: "Confirm",
|
|
857
|
+
confirm_quit_msg: "Are your sure exit?"
|
|
855
858
|
}
|
|
856
859
|
};
|
|
857
|
-
export { ActionsColumn as A, LabelMemuItem as L, MenuActions as M, PagerActions as P, Actions as a, Actions$1 as b,
|
|
860
|
+
export { ActionsColumn as A, LabelMemuItem as L, MenuActions as M, PagerActions as P, Actions as a, Actions$1 as b, defaultCommonActionsDictionary as d, getCommonActionsDictionary as g };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Dictionary } from '@m4l/core';
|
|
2
|
-
export declare function
|
|
3
|
-
export declare const
|
|
2
|
+
export declare function getCommonActionsDictionary(): string[];
|
|
3
|
+
export declare const defaultCommonActionsDictionary: Dictionary;
|
|
@@ -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
|
|
10
|
+
import { 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";
|
|
@@ -20,8 +20,14 @@ import "../hook-form/RHFUpload.js";
|
|
|
20
20
|
import { I as IconButton } from "../mui_extended/IconButton/index.js";
|
|
21
21
|
import { I as Icon } from "../Icon/index.js";
|
|
22
22
|
import "../../simplebar.js";
|
|
23
|
-
import { L as LabelMemuItem } from "../CommonActions/components/Actions/index.js";
|
|
23
|
+
import { L as LabelMemuItem, b as Actions } from "../CommonActions/components/Actions/index.js";
|
|
24
24
|
import { M as MenuPopover } from "../mui_extended/MenuPopover/index.js";
|
|
25
|
+
import { A as ActionCancel } from "../CommonActions/components/ActionCancel/index.js";
|
|
26
|
+
import { A as ActionIntro } from "../CommonActions/components/ActionIntro/index.js";
|
|
27
|
+
import "react-router-dom";
|
|
28
|
+
import "@mui/material/Button";
|
|
29
|
+
import "../../contexts/ModalContext/index.js";
|
|
30
|
+
import "@mui/lab";
|
|
25
31
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
26
32
|
const WrapperApplyedFilters = styled("div")(({
|
|
27
33
|
theme
|
|
@@ -837,7 +843,7 @@ function BaseProvider(props) {
|
|
|
837
843
|
const all_fields = useMemo(() => {
|
|
838
844
|
return {
|
|
839
845
|
...ALL_FIELDS,
|
|
840
|
-
label: getLabel("
|
|
846
|
+
label: getLabel("dynamic_filter.all_fields"),
|
|
841
847
|
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/all_fields.svg`
|
|
842
848
|
};
|
|
843
849
|
}, [getLabel, host_static_assets, environment_assets]);
|
|
@@ -1133,6 +1139,7 @@ function ApplyedFilter(props) {
|
|
|
1133
1139
|
children: labelOperands
|
|
1134
1140
|
})]
|
|
1135
1141
|
}), !fixed && /* @__PURE__ */ jsx(IconButton, {
|
|
1142
|
+
size: "small",
|
|
1136
1143
|
src: `${host_static_assets}/${environment_assets}/frontend/components/dynamic_filter/assets/icons/close_filter.svg`,
|
|
1137
1144
|
onClick: onDelete
|
|
1138
1145
|
})]
|
|
@@ -1428,7 +1435,7 @@ const WrapperPopupEditFilter = styled("div")(({
|
|
|
1428
1435
|
backgroundColor: theme.palette.background.default,
|
|
1429
1436
|
borderRadius: theme.spacing(1)
|
|
1430
1437
|
}));
|
|
1431
|
-
|
|
1438
|
+
styled("div")(({
|
|
1432
1439
|
theme
|
|
1433
1440
|
}) => ({
|
|
1434
1441
|
display: "flex",
|
|
@@ -1524,18 +1531,10 @@ const PopupEditFilter = () => {
|
|
|
1524
1531
|
})]
|
|
1525
1532
|
}), /* @__PURE__ */ jsx(PopupEditFilterComponent, {
|
|
1526
1533
|
filter
|
|
1527
|
-
}), /* @__PURE__ */ jsxs(
|
|
1528
|
-
children: [/* @__PURE__ */ jsx(
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
onClick: onClose,
|
|
1532
|
-
children: getLabel(`dyamic_filter.cancel`)
|
|
1533
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
1534
|
-
variant: "contained",
|
|
1535
|
-
color: "primary",
|
|
1536
|
-
type: "submit",
|
|
1537
|
-
children: getLabel(`dyamic_filter.intro`)
|
|
1538
|
-
})]
|
|
1534
|
+
}), /* @__PURE__ */ jsxs(Actions, {
|
|
1535
|
+
children: [/* @__PURE__ */ jsx(ActionCancel, {
|
|
1536
|
+
onClick: onClose
|
|
1537
|
+
}), /* @__PURE__ */ jsx(ActionIntro, {})]
|
|
1539
1538
|
})]
|
|
1540
1539
|
})
|
|
1541
1540
|
})
|
|
@@ -8,7 +8,7 @@ import { useResponsiveDesktop } from "@m4l/graphics";
|
|
|
8
8
|
import { useEnvironment } from "@m4l/core";
|
|
9
9
|
import { I as Icon } from "../Icon/index.js";
|
|
10
10
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
11
|
-
import { b as Actions, g as
|
|
11
|
+
import { b as Actions, g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.js";
|
|
12
12
|
const WrapperDialog = styled(Dialog)(() => ({}));
|
|
13
13
|
const Container = styled("div")(({ theme }) => ({
|
|
14
14
|
display: "flex",
|
|
@@ -172,7 +172,7 @@ const ModalDialog = () => {
|
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
174
|
function getModalDialogComponentsDictionary() {
|
|
175
|
-
return ["modal_dialog"].concat(
|
|
175
|
+
return ["modal_dialog"].concat(getCommonActionsDictionary());
|
|
176
176
|
}
|
|
177
177
|
const defaultModalDialogDictionary = {
|
|
178
178
|
modal_dialog: {}
|
|
@@ -160,8 +160,8 @@ function ObjectLogs(props) {
|
|
|
160
160
|
name: getLabel("object_logs.resource_name"),
|
|
161
161
|
type: "text"
|
|
162
162
|
}, {
|
|
163
|
-
key: "
|
|
164
|
-
name: getLabel("object_logs.
|
|
163
|
+
key: "log_preview",
|
|
164
|
+
name: getLabel("object_logs.log_preview"),
|
|
165
165
|
type: "text"
|
|
166
166
|
}, {
|
|
167
167
|
key: "Detail",
|
|
@@ -208,16 +208,30 @@ function ObjectLogs(props) {
|
|
|
208
208
|
automatic: false,
|
|
209
209
|
fields: [{
|
|
210
210
|
name: "user_logs.created_at",
|
|
211
|
-
label: getLabel("object_logs.
|
|
211
|
+
label: getLabel("object_logs.created_at"),
|
|
212
212
|
type: "datetime",
|
|
213
213
|
multiple: false,
|
|
214
|
+
presence: "fixed",
|
|
215
|
+
urlIcon: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/icon/assets/icons/default.svg"
|
|
216
|
+
}, {
|
|
217
|
+
name: "users.email",
|
|
218
|
+
label: getLabel("object_logs.email"),
|
|
219
|
+
type: "string",
|
|
220
|
+
multiple: true,
|
|
221
|
+
presence: "optional",
|
|
222
|
+
urlIcon: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/icon/assets/icons/default.svg"
|
|
223
|
+
}, {
|
|
224
|
+
name: "user_logs.log_preview",
|
|
225
|
+
label: getLabel("object_logs.log_preview"),
|
|
226
|
+
type: "string",
|
|
227
|
+
multiple: true,
|
|
214
228
|
presence: "optional",
|
|
215
229
|
urlIcon: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/icon/assets/icons/default.svg"
|
|
216
230
|
}, {
|
|
217
231
|
name: "user_logs.log_detail",
|
|
218
232
|
label: getLabel("object_logs.log_detail"),
|
|
219
233
|
type: "string",
|
|
220
|
-
multiple:
|
|
234
|
+
multiple: true,
|
|
221
235
|
presence: "optional",
|
|
222
236
|
urlIcon: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/icon/assets/icons/default.svg"
|
|
223
237
|
}],
|
|
@@ -254,14 +268,11 @@ function getObjectLogsComponentsDictionary() {
|
|
|
254
268
|
}
|
|
255
269
|
const defaultObjectLogDictionary = {
|
|
256
270
|
object_logs: {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
date_time: "Date time",
|
|
261
|
-
user: "User",
|
|
262
|
-
module: "Module",
|
|
271
|
+
created_at: "Start date",
|
|
272
|
+
user: "User/email",
|
|
273
|
+
resource_name: "Resource",
|
|
263
274
|
privilege_name: "Privilege",
|
|
264
|
-
|
|
275
|
+
log_preview: "Log",
|
|
265
276
|
log_detail: "Detail",
|
|
266
277
|
ip: "Ip"
|
|
267
278
|
}
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { B as BoxIcon } from "./components/mui_extended/BoxIcon/index.js";
|
|
|
20
20
|
export { B as Breadcrumbs } from "./components/mui_extended/Breadcrumbs/index.js";
|
|
21
21
|
export { L as LinkWithRoute } from "./components/mui_extended/LinkWithRoute/index.js";
|
|
22
22
|
export { L as LoadingButton } from "./components/mui_extended/LoadingButton/index.js";
|
|
23
|
-
export { b as Actions, M as MenuActions, d as
|
|
23
|
+
export { b as Actions, M as MenuActions, d as defaultCommonActionsDictionary, g as getCommonActionsDictionary } from "./components/CommonActions/components/Actions/index.js";
|
|
24
24
|
export { M as MenuPopover } from "./components/mui_extended/MenuPopover/index.js";
|
|
25
25
|
export { P as Pager, g as getPagerComponentsDictionary } from "./components/mui_extended/Pager/index.js";
|
|
26
26
|
export { T as Tab } from "./components/mui_extended/Tab/index.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.51",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"format": "npm run prettier:fix && npm run lint:fix"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@m4l/graphics": "^0.0.
|
|
17
|
+
"@m4l/graphics": "^0.0.34",
|
|
18
18
|
"react": "^17.0.0 || 18.x",
|
|
19
19
|
"react-dom": "^18.0.0",
|
|
20
20
|
"react-draggable": "^4.4.5"
|