@m4l/components 9.2.50 → 9.2.51-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/types.d.ts +8 -0
- package/components/AccountPopover/slots/AccountPopoverSlots.d.ts +1 -1
- package/components/AppBar/slots/AppBarSlots.d.ts +1 -1
- package/components/Chip/slots/ChipSlots.d.ts +1 -1
- package/components/Color/slots/ColorSlots.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/constants.d.ts +4 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/constants.js +4 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.d.ts +1 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/formatter.js +46 -5
- package/components/DataGrid/formatters/ColumnIconFormatter/tests/ColumnIconFormatter.test.d.ts +1 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/types.d.ts +5 -1
- package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.d.ts +8 -0
- package/components/DataGrid/formatters/ColumnIconFormatter/useColumnIcon.js +19 -0
- package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +2 -2
- package/components/DynamicSort/slots/DynamicSortSlots.d.ts +2 -2
- package/components/Icon/Icon.js +38 -35
- package/components/Icon/types.d.ts +8 -3
- package/components/MenuActions/slots/MenuActionsSlots.d.ts +1 -1
- package/components/NumberInput/slots/NumberInputSlots.d.ts +2 -2
- package/components/ObjectLogs/ObjectLogs.d.ts +4 -3
- package/components/ObjectLogs/ObjectLogs.js +9 -152
- package/components/ObjectLogs/ObjectLogs.styles.d.ts +2 -0
- package/components/ObjectLogs/ObjectLogs.styles.js +74 -0
- package/components/ObjectLogs/ObjectsLogs.test.d.ts +0 -0
- package/components/ObjectLogs/constants.d.ts +3 -0
- package/components/ObjectLogs/constants.js +8 -0
- package/components/ObjectLogs/dictionary.d.ts +14 -3
- package/components/ObjectLogs/dictionary.js +11 -12
- package/components/ObjectLogs/hooks/useDetailFormatter.d.ts +5 -0
- package/components/ObjectLogs/hooks/useDetailFormatter.js +53 -0
- package/components/ObjectLogs/hooks/useObjectLogsColumns.d.ts +6 -0
- package/components/ObjectLogs/hooks/useObjectLogsColumns.js +65 -0
- package/components/ObjectLogs/index.d.ts +2 -0
- package/components/ObjectLogs/index.js +1 -0
- package/components/ObjectLogs/slots/ObjectLogsEnum.d.ts +12 -0
- package/components/ObjectLogs/slots/ObjectLogsEnum.js +16 -0
- package/components/ObjectLogs/slots/ObjectLogsSlots.d.ts +30 -0
- package/components/ObjectLogs/slots/ObjectLogsSlots.js +60 -0
- package/components/ObjectLogs/slots/index.d.ts +2 -0
- package/components/ObjectLogs/slots/index.js +1 -0
- package/components/ObjectLogs/subcomponents/DetailDialog/DetailDialog.test.d.ts +0 -0
- package/components/ObjectLogs/subcomponents/DetailDialog/index.d.ts +6 -0
- package/components/ObjectLogs/{components → subcomponents}/DetailDialog/index.js +10 -6
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.d.ts +11 -0
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +128 -0
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/index.d.ts +1 -0
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.d.ts +10 -0
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +141 -0
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/index.d.ts +1 -0
- package/components/ObjectLogs/types.d.ts +33 -8
- package/components/PaperForm/styles.js +1 -0
- package/components/ToastContainer/slots/toastContainerSlots.d.ts +2 -2
- package/components/ToastContainer/types.d.ts +4 -4
- package/components/areas/components/AreasAdmin/slots/AreasAdminSlots.d.ts +1 -1
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadImage/slots/RHFUploadImageSlots.d.ts +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/slots/RHFUploadSingleFileSlots.d.ts +1 -1
- package/components/index.d.ts +1 -2
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.d.ts +1 -1
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.d.ts +1 -1
- package/components/mui_extended/IconButton/types.d.ts +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.d.ts +1 -1
- package/components/mui_extended/TimePicker/slots/TimePickerSlots.d.ts +1 -1
- package/components/mui_extended/ToggleIconButton/slots/ToggleIconButtonSlots.d.ts +1 -1
- package/index.js +1 -2
- package/package.json +2 -1
- package/storybook/components/ObjectLogs/ObjectLogs.stories.d.ts +7 -0
- package/storybook/components/ObjectLogs/mockData/index.d.ts +4 -0
- package/components/ObjectLogs/components/DetailDialog/index.d.ts +0 -5
- package/components/ObjectLogs/components/DetailDialog/styles.d.ts +0 -2
- package/components/ObjectLogs/components/DetailDialog/types.d.ts +0 -3
- package/components/ObjectLogs/components/DetailFormatter/index.d.ts +0 -5
- package/components/ObjectLogs/components/DetailFormatter/index.js +0 -31
- package/components/ObjectLogs/components/DetailFormatter/types.d.ts +0 -3
- package/components/ObjectLogs/styles.d.ts +0 -3
- package/components/ObjectLogs/styles.js +0 -35
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useModuleDictionary, useEnvironment } from "@m4l/core";
|
|
4
|
+
import { u as useModal } from "../../../hooks/useModal/index.js";
|
|
5
|
+
import { useIsMobile } from "@m4l/graphics";
|
|
6
|
+
import { D as DICTIONARY } from "../dictionary.js";
|
|
7
|
+
import { W as WindowBaseStyled, S as StackStyled, D as DetailDialogComponent } from "../slots/ObjectLogsSlots.js";
|
|
8
|
+
const useDetailFormatter = (type) => {
|
|
9
|
+
const { getLabel } = useModuleDictionary();
|
|
10
|
+
const { openModal, closeModal } = useModal();
|
|
11
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
12
|
+
const isMobile = useIsMobile();
|
|
13
|
+
const getIconProps = useCallback(
|
|
14
|
+
(rowProps) => {
|
|
15
|
+
let logId;
|
|
16
|
+
if (type === "m4l") {
|
|
17
|
+
logId = rowProps.row.id;
|
|
18
|
+
} else {
|
|
19
|
+
logId = rowProps.row.uuid;
|
|
20
|
+
}
|
|
21
|
+
const iconConfig = {
|
|
22
|
+
iconUrl: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/search.svg`,
|
|
23
|
+
tooltip: getLabel(DICTIONARY.LABEL_LOG_DETAIL),
|
|
24
|
+
dataTestId: `log-detail-${logId}`,
|
|
25
|
+
/**
|
|
26
|
+
* Función que se ejecuta al hacer clic en el icono
|
|
27
|
+
*/
|
|
28
|
+
onClick: () => {
|
|
29
|
+
openModal({
|
|
30
|
+
window: /* @__PURE__ */ jsx(
|
|
31
|
+
WindowBaseStyled,
|
|
32
|
+
{
|
|
33
|
+
ownerState: {},
|
|
34
|
+
title: getLabel(`${DICTIONARY.LABEL_LOG_DETAIL}`),
|
|
35
|
+
onClose: closeModal,
|
|
36
|
+
children: /* @__PURE__ */ jsx(StackStyled, { ownerState: {}, direction: "column", flexGrow: 1, children: /* @__PURE__ */ jsx(DetailDialogComponent, { ownerState: {}, logId, type }) })
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
fullScreen: isMobile,
|
|
40
|
+
initialWidth: 800,
|
|
41
|
+
initialHeight: 600
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return iconConfig;
|
|
46
|
+
},
|
|
47
|
+
[type, host_static_assets, environment_assets, getLabel, openModal, closeModal, isMobile]
|
|
48
|
+
);
|
|
49
|
+
return getIconProps;
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
useDetailFormatter as u
|
|
53
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { D as DICTIONARY } from "../dictionary.js";
|
|
4
|
+
import { u as useDetailFormatter } from "./useDetailFormatter.js";
|
|
5
|
+
import { u as useColumnIcon } from "../../DataGrid/formatters/ColumnIconFormatter/useColumnIcon.js";
|
|
6
|
+
import { u as useColumnDate } from "../../DataGrid/formatters/ColumnDateFormatter/useColumnDate.js";
|
|
7
|
+
const useObjectLogsColumns = (type) => {
|
|
8
|
+
const { getLabel } = useModuleDictionary();
|
|
9
|
+
const columnDate = useColumnDate({
|
|
10
|
+
presentationType: "datetime",
|
|
11
|
+
fieldValue: "createdAt"
|
|
12
|
+
});
|
|
13
|
+
const getIconProps = useDetailFormatter(type);
|
|
14
|
+
const columIcon = useColumnIcon(
|
|
15
|
+
{
|
|
16
|
+
getIconProps
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
const columns = useMemo(
|
|
20
|
+
() => [
|
|
21
|
+
{
|
|
22
|
+
key: "createdAt",
|
|
23
|
+
name: getLabel(DICTIONARY.LABEL_CREATED_AT),
|
|
24
|
+
type: "date",
|
|
25
|
+
width: 300,
|
|
26
|
+
...columnDate
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: type === "m4l" ? "email" : "userId",
|
|
30
|
+
name: getLabel(DICTIONARY.LABEL_USER),
|
|
31
|
+
type: "string",
|
|
32
|
+
width: 300
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
key: type === "m4l" ? "resourceName" : "serviceId",
|
|
36
|
+
name: getLabel(type === "m4l" ? DICTIONARY.LABEL_RESOURCE_NAME : DICTIONARY.LABEL_SERVICE_ID),
|
|
37
|
+
type: "string",
|
|
38
|
+
width: 120
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "logPreview",
|
|
42
|
+
name: getLabel(DICTIONARY.LABEL_LOG_PREVIEW),
|
|
43
|
+
type: "string",
|
|
44
|
+
width: 250
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
key: "detail",
|
|
48
|
+
name: getLabel(DICTIONARY.LABEL_LOG_DETAIL),
|
|
49
|
+
type: "custom",
|
|
50
|
+
...columIcon
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "ip",
|
|
54
|
+
name: getLabel(DICTIONARY.LABEL_IP),
|
|
55
|
+
type: "string",
|
|
56
|
+
width: 120
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
[getLabel, columnDate, type, columIcon]
|
|
60
|
+
);
|
|
61
|
+
return columns;
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
useObjectLogsColumns as u
|
|
65
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum ObjectLogsSlots {
|
|
2
|
+
root = "root",
|
|
3
|
+
actionsWrapperStyled = "actionsWrapperStyled",
|
|
4
|
+
gridWrapperStyled = "gridWrapperStyled",
|
|
5
|
+
stackStyled = "stackStyled",
|
|
6
|
+
windowBaseStyled = "windowBaseStyled",
|
|
7
|
+
detailDialogComponent = "detailDialogComponent",
|
|
8
|
+
tooltipStyled = "tooltipStyled",
|
|
9
|
+
iconButtonStyled = "iconButtonStyled",
|
|
10
|
+
iconStyled = "iconStyled",
|
|
11
|
+
reactJsonSlot = "reactJsonSlot"
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var ObjectLogsSlots = /* @__PURE__ */ ((ObjectLogsSlots2) => {
|
|
2
|
+
ObjectLogsSlots2["root"] = "root";
|
|
3
|
+
ObjectLogsSlots2["actionsWrapperStyled"] = "actionsWrapperStyled";
|
|
4
|
+
ObjectLogsSlots2["gridWrapperStyled"] = "gridWrapperStyled";
|
|
5
|
+
ObjectLogsSlots2["stackStyled"] = "stackStyled";
|
|
6
|
+
ObjectLogsSlots2["windowBaseStyled"] = "windowBaseStyled";
|
|
7
|
+
ObjectLogsSlots2["detailDialogComponent"] = "detailDialogComponent";
|
|
8
|
+
ObjectLogsSlots2["tooltipStyled"] = "tooltipStyled";
|
|
9
|
+
ObjectLogsSlots2["iconButtonStyled"] = "iconButtonStyled";
|
|
10
|
+
ObjectLogsSlots2["iconStyled"] = "iconStyled";
|
|
11
|
+
ObjectLogsSlots2["reactJsonSlot"] = "reactJsonSlot";
|
|
12
|
+
return ObjectLogsSlots2;
|
|
13
|
+
})(ObjectLogsSlots || {});
|
|
14
|
+
export {
|
|
15
|
+
ObjectLogsSlots as O
|
|
16
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const ContainerWrapperStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
2
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
|
+
export declare const ActionsWrapperStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
5
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
6
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
7
|
+
export declare const GridWrapperStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
8
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
9
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
10
|
+
export declare const WindowBaseStyled: import('@emotion/styled').StyledComponent<Pick<import('../../WindowBase/types').WindowBaseProps, keyof import('../../WindowBase/types').WindowBaseProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
11
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
export declare const StackStyled: import('@emotion/styled').StyledComponent<Pick<import('../..').StackProps, keyof import('../..').StackProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
14
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
15
|
+
}, {}, {}>;
|
|
16
|
+
export declare const DetailDialogComponent: import('@emotion/styled').StyledComponent<Pick<import('../types').DetailDialogProps, keyof import('../types').DetailDialogProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
17
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
export declare const TooltipStyled: import('@emotion/styled').StyledComponent<Pick<import('../../mui_extended/Tooltip').TooltipProps, keyof import('../../mui_extended/Tooltip').TooltipProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
20
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
21
|
+
}, {}, {}>;
|
|
22
|
+
export declare const IconButtonStyled: import('@emotion/styled').StyledComponent<Pick<Omit<import('../../mui_extended/IconButton/types').IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>, "value" | "size" | "children" | "title" | "component" | "name" | "id" | "type" | "selected" | "disabled" | "action" | "hidden" | "color" | "content" | "style" | "icon" | "tooltip" | "variant" | "translate" | "className" | "classes" | "src" | "sx" | "form" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "instaceDataTestId" | "rotationAngle" | "placement" | "tooltipContent" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "badgeContent" | keyof import('react').RefAttributes<HTMLButtonElement>> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
23
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
24
|
+
}, {}, {}>;
|
|
25
|
+
export declare const IconStyled: import('@emotion/styled').StyledComponent<Pick<import('../../Icon').IconProps, keyof import('../../Icon').IconProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
26
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
27
|
+
}, {}, {}>;
|
|
28
|
+
export declare const ReactJsonSlot: import('@emotion/styled').StyledComponent<Pick<import('@microlink/react-json-view').ReactJsonViewProps, keyof import('@microlink/react-json-view').ReactJsonViewProps> & import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown> & {
|
|
29
|
+
ownerState: Partial<import('../types').ObjectLogsOwnerState> & Record<string, unknown>;
|
|
30
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { O as OBJECT_LOGS_KEY_COMPONENT } from "../constants.js";
|
|
3
|
+
import { o as objectLogsStyles } from "../ObjectLogs.styles.js";
|
|
4
|
+
import { S as Stack } from "../../mui_extended/Stack/Stack.js";
|
|
5
|
+
import { W as WindowBase } from "../../WindowBase/WindowBase.js";
|
|
6
|
+
import { D as DetailDialog } from "../subcomponents/DetailDialog/index.js";
|
|
7
|
+
import ReactJson from "@microlink/react-json-view";
|
|
8
|
+
import { O as ObjectLogsSlots } from "./ObjectLogsEnum.js";
|
|
9
|
+
import { T as Tooltip } from "../../mui_extended/Tooltip/Tooltip.js";
|
|
10
|
+
import { I as IconButton } from "../../mui_extended/IconButton/IconButton.js";
|
|
11
|
+
import { I as Icon } from "../../Icon/Icon.js";
|
|
12
|
+
const ContainerWrapperStyled = styled("div", {
|
|
13
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
14
|
+
slot: ObjectLogsSlots.root
|
|
15
|
+
})(objectLogsStyles?.root);
|
|
16
|
+
const ActionsWrapperStyled = styled("div", {
|
|
17
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
18
|
+
slot: ObjectLogsSlots.actionsWrapperStyled
|
|
19
|
+
})(objectLogsStyles?.actionsWrapperStyled);
|
|
20
|
+
const GridWrapperStyled = styled("div", {
|
|
21
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
22
|
+
slot: ObjectLogsSlots.gridWrapperStyled
|
|
23
|
+
})(objectLogsStyles?.gridWrapperStyled);
|
|
24
|
+
const WindowBaseStyled = styled(WindowBase, {
|
|
25
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
26
|
+
slot: ObjectLogsSlots.windowBaseStyled
|
|
27
|
+
})(objectLogsStyles?.windowBaseStyled);
|
|
28
|
+
const StackStyled = styled(Stack, {
|
|
29
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
30
|
+
slot: ObjectLogsSlots.stackStyled
|
|
31
|
+
})(objectLogsStyles?.stackStyled);
|
|
32
|
+
const DetailDialogComponent = styled(DetailDialog, {
|
|
33
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
34
|
+
slot: ObjectLogsSlots.detailDialogComponent
|
|
35
|
+
})(objectLogsStyles?.detailDialogComponent);
|
|
36
|
+
styled(Tooltip, {
|
|
37
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
38
|
+
slot: ObjectLogsSlots.tooltipStyled
|
|
39
|
+
})(objectLogsStyles?.tooltipStyled);
|
|
40
|
+
styled(IconButton, {
|
|
41
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
42
|
+
slot: ObjectLogsSlots.iconButtonStyled
|
|
43
|
+
})(objectLogsStyles?.iconButtonStyled);
|
|
44
|
+
const IconStyled = styled(Icon, {
|
|
45
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
46
|
+
slot: ObjectLogsSlots.iconStyled
|
|
47
|
+
})(objectLogsStyles?.iconStyled);
|
|
48
|
+
styled(ReactJson, {
|
|
49
|
+
name: OBJECT_LOGS_KEY_COMPONENT,
|
|
50
|
+
slot: ObjectLogsSlots.reactJsonSlot
|
|
51
|
+
})(objectLogsStyles?.reactJsonSlot);
|
|
52
|
+
export {
|
|
53
|
+
ActionsWrapperStyled as A,
|
|
54
|
+
ContainerWrapperStyled as C,
|
|
55
|
+
DetailDialogComponent as D,
|
|
56
|
+
GridWrapperStyled as G,
|
|
57
|
+
IconStyled as I,
|
|
58
|
+
StackStyled as S,
|
|
59
|
+
WindowBaseStyled as W
|
|
60
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DetailDialogProps } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Componente que muestra el detalle de un log en un diálogo.
|
|
4
|
+
* Utiliza ReactJson para mostrar el contenido del log en formato JSON.
|
|
5
|
+
*/
|
|
6
|
+
export declare function DetailDialog(props: DetailDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,9 @@ import { useState, useEffect } from "react";
|
|
|
3
3
|
import { useNetwork } from "@m4l/core";
|
|
4
4
|
import { useHostTheme } from "@m4l/graphics";
|
|
5
5
|
import ReactJson from "@microlink/react-json-view";
|
|
6
|
-
import {
|
|
6
|
+
import { a as OBJECT_LOGS_M4L_END_POINT, b as OBJECT_LOGS_OTHERS_END_POINT } from "../../constants.js";
|
|
7
7
|
function DetailDialog(props) {
|
|
8
|
-
const {
|
|
8
|
+
const { logId, theme, type } = props;
|
|
9
9
|
const { networkOperation } = useNetwork();
|
|
10
10
|
const { hostThemeOptions } = useHostTheme();
|
|
11
11
|
const [detail, setDetail] = useState({});
|
|
@@ -13,7 +13,10 @@ function DetailDialog(props) {
|
|
|
13
13
|
let mounted = true;
|
|
14
14
|
networkOperation({
|
|
15
15
|
method: "GET",
|
|
16
|
-
endPoint:
|
|
16
|
+
endPoint: `${type === "m4l" ? OBJECT_LOGS_M4L_END_POINT : OBJECT_LOGS_OTHERS_END_POINT}/${logId}`
|
|
17
|
+
// data: {
|
|
18
|
+
// ...(createdAt ? { created_at: createdAt } : {}),
|
|
19
|
+
// },
|
|
17
20
|
}).then((response) => {
|
|
18
21
|
if (mounted) {
|
|
19
22
|
const parseData = JSON.parse(String(response.data.log_detail));
|
|
@@ -25,17 +28,18 @@ function DetailDialog(props) {
|
|
|
25
28
|
};
|
|
26
29
|
}, []);
|
|
27
30
|
const modeTheme = hostThemeOptions.palette?.mode;
|
|
28
|
-
|
|
31
|
+
const appliedTheme = theme || (modeTheme === "dark" ? "summerfruit" : "rjv-default");
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
29
33
|
ReactJson,
|
|
30
34
|
{
|
|
31
|
-
theme:
|
|
35
|
+
theme: appliedTheme,
|
|
32
36
|
name: null,
|
|
33
37
|
sortKeys: true,
|
|
34
38
|
displayDataTypes: false,
|
|
35
39
|
quotesOnKeys: false,
|
|
36
40
|
src: detail
|
|
37
41
|
}
|
|
38
|
-
)
|
|
42
|
+
);
|
|
39
43
|
}
|
|
40
44
|
export {
|
|
41
45
|
DetailDialog as D
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ObjectLogsBaseProps } from '../../types';
|
|
2
|
+
import { Maybe } from '@m4l/core';
|
|
3
|
+
export interface ObjectLogsByM4LProps extends Omit<ObjectLogsBaseProps, 'type'> {
|
|
4
|
+
objectId: Maybe<number | string>;
|
|
5
|
+
resourceId: Maybe<number | string>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Es un componente de React que muestra y gestiona registros de logs asociados a un objeto específico.
|
|
9
|
+
* Incluye funcionalidades como paginación, filtrado dinámico y formateo de datos.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ObjectLogsByM4L(props: ObjectLogsByM4LProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { D as DataGrid } from "../../../DataGrid/DataGrid.js";
|
|
4
|
+
import { useEnvironment } from "@m4l/core";
|
|
5
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/DynamicFilter.js";
|
|
6
|
+
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
7
|
+
import { C as ContainerWrapperStyled, A as ActionsWrapperStyled, G as GridWrapperStyled } from "../../slots/ObjectLogsSlots.js";
|
|
8
|
+
import { D as DICTIONARY } from "../../dictionary.js";
|
|
9
|
+
import { usePaginate } from "@m4l/graphics";
|
|
10
|
+
import { u as useObjectLogsColumns } from "../../hooks/useObjectLogsColumns.js";
|
|
11
|
+
import { a as OBJECT_LOGS_M4L_END_POINT, O as OBJECT_LOGS_KEY_COMPONENT } from "../../constants.js";
|
|
12
|
+
import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
13
|
+
import { endOfDay, startOfMonth } from "date-fns";
|
|
14
|
+
import { O as ObjectLogsSlots } from "../../slots/ObjectLogsEnum.js";
|
|
15
|
+
function ObjectLogsByM4L(props) {
|
|
16
|
+
const { resourceId, objectId, dataTestId = "" } = props;
|
|
17
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
18
|
+
const [backendQueryParams, setBackendQueryParams] = useState(() => {
|
|
19
|
+
return { resource_id: resourceId, object_id: objectId };
|
|
20
|
+
});
|
|
21
|
+
const columns = useObjectLogsColumns("m4l");
|
|
22
|
+
const { pagerState, rows, onPageChange, onRowsPerPageChange, clearRows, Refresh } = usePaginate({
|
|
23
|
+
endPoint: OBJECT_LOGS_M4L_END_POINT,
|
|
24
|
+
fireOnFirstLoad: false,
|
|
25
|
+
fireOnChangeParms: false,
|
|
26
|
+
queryParams: backendQueryParams,
|
|
27
|
+
bodyToSnakeCase: true,
|
|
28
|
+
responseToCamelCase: true
|
|
29
|
+
});
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
clearRows();
|
|
32
|
+
setBackendQueryParams({ resource_id: resourceId, object_id: objectId });
|
|
33
|
+
}, [resourceId, objectId]);
|
|
34
|
+
const onChangeFilter = (_initFilters, rawFilters) => {
|
|
35
|
+
setBackendQueryParams((oldParms) => ({ ...oldParms, f: rawFilters }));
|
|
36
|
+
Refresh();
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
ContainerWrapperStyled,
|
|
40
|
+
{
|
|
41
|
+
ownerState: {},
|
|
42
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: `m4ldatagrid-${dataTestId}` } : {},
|
|
43
|
+
...getPropDataTestId(OBJECT_LOGS_KEY_COMPONENT, ObjectLogsSlots.root, dataTestId),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(ActionsWrapperStyled, { id: "objecuser_logstLogsActions", ownerState: {}, children: /* @__PURE__ */ jsx(
|
|
46
|
+
DynamicFilter,
|
|
47
|
+
{
|
|
48
|
+
withAllField: true,
|
|
49
|
+
onChangeFilters: onChangeFilter,
|
|
50
|
+
automatic: false,
|
|
51
|
+
fields: [
|
|
52
|
+
{
|
|
53
|
+
name: "user_logs.created_at",
|
|
54
|
+
dictionaryId: DICTIONARY.LABEL_CREATED_AT,
|
|
55
|
+
type: "datetime",
|
|
56
|
+
multiple: false,
|
|
57
|
+
presence: "fixed",
|
|
58
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`,
|
|
59
|
+
defaultOperand1: startOfMonth(/* @__PURE__ */ new Date()),
|
|
60
|
+
defaultOperand2: endOfDay(/* @__PURE__ */ new Date())
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "users.email",
|
|
64
|
+
dictionaryId: DICTIONARY.LABEL_USER,
|
|
65
|
+
type: "string",
|
|
66
|
+
multiple: true,
|
|
67
|
+
presence: "optional",
|
|
68
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "user_logs.log_preview",
|
|
72
|
+
dictionaryId: DICTIONARY.LABEL_LOG_PREVIEW,
|
|
73
|
+
type: "string",
|
|
74
|
+
multiple: true,
|
|
75
|
+
presence: "optional",
|
|
76
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_preview.svg`
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "user_logs.log_detail",
|
|
80
|
+
dictionaryId: DICTIONARY.LABEL_LOG_DETAIL,
|
|
81
|
+
type: "string",
|
|
82
|
+
multiple: true,
|
|
83
|
+
presence: "optional",
|
|
84
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_detail.svg`
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
initialAppliedFilters: []
|
|
88
|
+
}
|
|
89
|
+
) }),
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
GridWrapperStyled,
|
|
92
|
+
{
|
|
93
|
+
id: "GridWrapper",
|
|
94
|
+
ownerState: {},
|
|
95
|
+
children: /* @__PURE__ */ jsx(
|
|
96
|
+
DataGrid,
|
|
97
|
+
{
|
|
98
|
+
id: "users_logs_list",
|
|
99
|
+
dataTestId,
|
|
100
|
+
columns,
|
|
101
|
+
rows,
|
|
102
|
+
rowKeyGetter: (row) => row.id,
|
|
103
|
+
withActions: true,
|
|
104
|
+
actionsProps: {
|
|
105
|
+
withPager: true,
|
|
106
|
+
withLocalFilters: true,
|
|
107
|
+
pagerOptions: {
|
|
108
|
+
records: rows.length,
|
|
109
|
+
totalRecords: pagerState.totalRecords,
|
|
110
|
+
rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
|
|
111
|
+
page: pagerState.page,
|
|
112
|
+
rowsPerPage: pagerState.rowsPerPage,
|
|
113
|
+
onPageChange,
|
|
114
|
+
onRowsPerPageChange
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"users_list_logs"
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
export {
|
|
127
|
+
ObjectLogsByM4L as O
|
|
128
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ObjectLogsByM4L';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ObjectLogsBaseProps } from '../../types';
|
|
2
|
+
export interface ObjectLogsByOtherProps extends Omit<ObjectLogsBaseProps, 'type'> {
|
|
3
|
+
resourceSerialId: string;
|
|
4
|
+
resourceTypeId: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Es un componente de React que muestra y gestiona registros de logs asociados a un objeto específico.
|
|
8
|
+
* Incluye funcionalidades como paginación, filtrado dinámico y formateo de datos.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ObjectLogsByOthers(props: ObjectLogsByOtherProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { endOfDay, startOfDay } from "date-fns";
|
|
4
|
+
import { D as DataGrid } from "../../../DataGrid/DataGrid.js";
|
|
5
|
+
import { useEnvironment } from "@m4l/core";
|
|
6
|
+
import { D as DynamicFilter } from "../../../DynamicFilter/DynamicFilter.js";
|
|
7
|
+
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.js";
|
|
8
|
+
import { C as ContainerWrapperStyled, A as ActionsWrapperStyled, G as GridWrapperStyled } from "../../slots/ObjectLogsSlots.js";
|
|
9
|
+
import { D as DICTIONARY } from "../../dictionary.js";
|
|
10
|
+
import { useRows } from "@m4l/graphics";
|
|
11
|
+
import { u as useObjectLogsColumns } from "../../hooks/useObjectLogsColumns.js";
|
|
12
|
+
import { b as OBJECT_LOGS_OTHERS_END_POINT, O as OBJECT_LOGS_KEY_COMPONENT } from "../../constants.js";
|
|
13
|
+
import { g as getPropDataTestId } from "../../../../test/getNameDataTestId.js";
|
|
14
|
+
import { g as getRawFiltersForNetwork } from "../../../DynamicFilter/helpers/getRawFiltersForNetwork.js";
|
|
15
|
+
import { g as getRawSortsForNetwork } from "../../../DynamicSort/helpers/getRawSortsForNetwork.js";
|
|
16
|
+
import { O as ObjectLogsSlots } from "../../slots/ObjectLogsEnum.js";
|
|
17
|
+
function ObjectLogsByOthers(props) {
|
|
18
|
+
const { dataTestId = "", resourceSerialId, resourceTypeId } = props;
|
|
19
|
+
const { host_static_assets, environment_assets } = useEnvironment();
|
|
20
|
+
const [backendQueryParams, setBackendQueryParams] = useState({});
|
|
21
|
+
const columns = useObjectLogsColumns("other");
|
|
22
|
+
const { rows, clearRows, refresh } = useRows({
|
|
23
|
+
endPoint: OBJECT_LOGS_OTHERS_END_POINT,
|
|
24
|
+
fireOnFirstLoad: false,
|
|
25
|
+
fireOnChangeParms: false,
|
|
26
|
+
queryParams: backendQueryParams,
|
|
27
|
+
bodyToSnakeCase: true,
|
|
28
|
+
responseToCamelCase: true
|
|
29
|
+
});
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
clearRows();
|
|
32
|
+
}, [resourceSerialId, resourceTypeId]);
|
|
33
|
+
const onChangeFilter = (_initFilters, rawFilters) => {
|
|
34
|
+
const fixedFields = [
|
|
35
|
+
{
|
|
36
|
+
n: "resourceTypeId",
|
|
37
|
+
o: "c",
|
|
38
|
+
o1: resourceTypeId,
|
|
39
|
+
ft: "string"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
n: "resourceSerialId",
|
|
43
|
+
o: "c",
|
|
44
|
+
o1: resourceSerialId,
|
|
45
|
+
ft: "string"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
const sortFields = [
|
|
49
|
+
// {
|
|
50
|
+
// n: 'created_at',
|
|
51
|
+
// o: 'desc',
|
|
52
|
+
// ft: 'string',
|
|
53
|
+
// } ,
|
|
54
|
+
];
|
|
55
|
+
const allFields = [...fixedFields, ...rawFilters];
|
|
56
|
+
const parms = {
|
|
57
|
+
f: getRawFiltersForNetwork(allFields, "snakeCase"),
|
|
58
|
+
s: getRawSortsForNetwork(sortFields, "snakeCase")
|
|
59
|
+
};
|
|
60
|
+
setBackendQueryParams(parms);
|
|
61
|
+
refresh();
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ jsxs(
|
|
64
|
+
ContainerWrapperStyled,
|
|
65
|
+
{
|
|
66
|
+
ownerState: {},
|
|
67
|
+
...process.env.NODE_ENV !== "production" ? { [TEST_PROP_ID]: `m4ldatagrid-${dataTestId}` } : {},
|
|
68
|
+
...getPropDataTestId(OBJECT_LOGS_KEY_COMPONENT, ObjectLogsSlots.root, dataTestId),
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx(ActionsWrapperStyled, { id: "objecuser_logstLogsActions", ownerState: {}, children: /* @__PURE__ */ jsx(
|
|
71
|
+
DynamicFilter,
|
|
72
|
+
{
|
|
73
|
+
withAllField: true,
|
|
74
|
+
onChangeFilters: onChangeFilter,
|
|
75
|
+
automatic: false,
|
|
76
|
+
fields: [
|
|
77
|
+
{
|
|
78
|
+
name: "createdAt",
|
|
79
|
+
dictionaryId: DICTIONARY.LABEL_CREATED_AT,
|
|
80
|
+
type: "datetime",
|
|
81
|
+
multiple: false,
|
|
82
|
+
presence: "initialized",
|
|
83
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`,
|
|
84
|
+
defaultOperand1: startOfDay(/* @__PURE__ */ new Date()),
|
|
85
|
+
defaultOperand2: endOfDay(/* @__PURE__ */ new Date())
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "userId",
|
|
89
|
+
dictionaryId: DICTIONARY.LABEL_USER,
|
|
90
|
+
type: "string",
|
|
91
|
+
multiple: true,
|
|
92
|
+
presence: "optional",
|
|
93
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "logPreview",
|
|
97
|
+
dictionaryId: DICTIONARY.LABEL_LOG_PREVIEW,
|
|
98
|
+
type: "string",
|
|
99
|
+
multiple: true,
|
|
100
|
+
presence: "optional",
|
|
101
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_preview.svg`
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "logDetail",
|
|
105
|
+
dictionaryId: DICTIONARY.LABEL_LOG_DETAIL,
|
|
106
|
+
type: "string",
|
|
107
|
+
multiple: true,
|
|
108
|
+
presence: "optional",
|
|
109
|
+
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_detail.svg`
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
initialAppliedFilters: []
|
|
113
|
+
}
|
|
114
|
+
) }),
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
GridWrapperStyled,
|
|
117
|
+
{
|
|
118
|
+
id: "GridWrapper",
|
|
119
|
+
ownerState: {},
|
|
120
|
+
children: /* @__PURE__ */ jsx(
|
|
121
|
+
DataGrid,
|
|
122
|
+
{
|
|
123
|
+
id: "users_logs_list",
|
|
124
|
+
dataTestId,
|
|
125
|
+
columns,
|
|
126
|
+
rows,
|
|
127
|
+
rowKeyGetter: (row) => row.id,
|
|
128
|
+
withActions: false,
|
|
129
|
+
actionsProps: {}
|
|
130
|
+
},
|
|
131
|
+
"users_list_logs"
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
export {
|
|
140
|
+
ObjectLogsByOthers as O
|
|
141
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ObjectLogsByOthers';
|