@m4l/components 0.0.5 → 0.0.8

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.
@@ -1,4 +1,4 @@
1
- import { PagerProps } from '@mui_extended/Pager/types';
1
+ import type { PagerProps } from '../../../mui_extended/Pager/types';
2
2
  import { SettingsProps } from './components/Settings/types';
3
3
  export interface ActionsProps {
4
4
  withSettings?: boolean;
@@ -1,4 +1,4 @@
1
- import { MenuAction } from '@mui_extended/MenuActions/types';
1
+ import { MenuAction } from '../../../mui_extended/MenuActions/types';
2
2
  import { ReactNode } from 'react';
3
3
  import { Column } from 'react-data-grid';
4
4
  import { Maybe } from '@m4l/core';
@@ -0,0 +1,3 @@
1
+ import { Dictionary } from '@m4l/core';
2
+ export declare function getGridComponentsDictionary(): string[];
3
+ export declare const defaultGridDictionary: Dictionary;
@@ -6,12 +6,15 @@ import { HTML5Backend } from "react-dnd-html5-backend";
6
6
  import { SvgIcon, Checkbox, InputBase, Skeleton } from "@mui/material";
7
7
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
8
8
  import { voidFunction, useModuleDictionary, useEnvironment } from "@m4l/core";
9
- import { MenuActions } from "@mui_extended";
10
- import { P as Pager } from "../mui_extended/Pager/index.js";
9
+ import "@mui/material/Box";
10
+ import "../mui_extended/MenuPopover/index.js";
11
+ import "react-router-dom";
12
+ import { M as MenuActions } from "../mui_extended/MenuActions/index.js";
13
+ import { P as Pager, g as getPagerComponentsDictionary, d as defaultPagerDictionary } from "../mui_extended/Pager/index.js";
11
14
  import { I as IconButton } from "../mui_extended/IconButton/index.js";
12
15
  import { u as useModal } from "../../hooks/useModal/index.js";
13
- import { M as MenuActions$1 } from "../mui_extended/MenuActions/index.js";
14
16
  import { u as useResponsiveDesktop } from "../../vendor.js";
17
+ import { g as getModalDialogComponentsDictionary, d as defaultModalDialogDictionary } from "../ModalDialog/index.js";
15
18
  import { format } from "date-fns";
16
19
  const WrapperGrid$1 = styled("div")(() => ({
17
20
  display: "flex",
@@ -1477,7 +1480,7 @@ function Density() {
1477
1480
  }
1478
1481
  return /* @__PURE__ */ jsx(WrapperDensity, {
1479
1482
  id: "WrapperDensity",
1480
- children: /* @__PURE__ */ jsx(MenuActions$1, {
1483
+ children: /* @__PURE__ */ jsx(MenuActions, {
1481
1484
  arrow: "right-top",
1482
1485
  anchorOrigin: {
1483
1486
  vertical: "top",
@@ -1585,6 +1588,38 @@ function DataGrid(props) {
1585
1588
  })
1586
1589
  });
1587
1590
  }
1591
+ function getGridComponentsDictionary() {
1592
+ return ["grid"].concat(getPagerComponentsDictionary()).concat(getModalDialogComponentsDictionary());
1593
+ }
1594
+ const defaultGridDictionary = {
1595
+ grid: {
1596
+ actions: "Actions",
1597
+ settings_tooltip: "Settings",
1598
+ settings_sel_columns: "Select columns",
1599
+ settings_column_name: "Name",
1600
+ settings_column_position: "Position",
1601
+ settings_column_visible: "Visible",
1602
+ settings_column_frozen: "Frozen",
1603
+ settings_move_first: "Move first",
1604
+ settings_move_up: "Move up",
1605
+ settings_move_last: "Move first",
1606
+ settings_move_down: "Move down",
1607
+ settings_visible_all: "Visible all",
1608
+ settings_no_visible_all: "Invisible all",
1609
+ settings_restore: "Restore",
1610
+ density_tooltip: "Density",
1611
+ density_compact: "Compact",
1612
+ density_standard: "Standard",
1613
+ density_confortable: "Confortable",
1614
+ filter_holder: "Filter",
1615
+ filter_show: "Show filters",
1616
+ filter_hide: "Hide filters",
1617
+ rows: "Rows",
1618
+ rows_per_page: "Rows per page"
1619
+ },
1620
+ ...defaultPagerDictionary,
1621
+ ...defaultModalDialogDictionary
1622
+ };
1588
1623
  function DateFormatter(props) {
1589
1624
  const {
1590
1625
  presentationType,
@@ -1620,4 +1655,4 @@ const initialPagerState = {
1620
1655
  rowsPerPage: 25,
1621
1656
  totalRecords: 0
1622
1657
  };
1623
- export { DateFormatter as D, DataGrid as a, initialPagerState as i };
1658
+ export { DateFormatter as D, DataGrid as a, defaultGridDictionary as d, getGridComponentsDictionary as g, initialPagerState as i };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { MenuAction } from '@mui_extended/MenuActions/types';
3
2
  import { Column } from 'react-data-grid';
3
+ import { MenuAction } from '../mui_extended';
4
4
  import { ActionsProps } from './components/Actions/types';
5
5
  export declare type ColumnType = 'text' | 'date' | 'number' | 'boolean' | 'custom';
6
6
  export declare type ColumnAlign = 'left' | 'center' | 'right';
@@ -41,4 +41,10 @@ const FormActions = (props) => {
41
41
  function getActionnsComponentsDictionary() {
42
42
  return ["actions"];
43
43
  }
44
- export { FormActions as F, getActionnsComponentsDictionary as g };
44
+ const defaultActionsDictionary = {
45
+ actions: {
46
+ action_cancel: "Cancel",
47
+ action_accept: "Intro"
48
+ }
49
+ };
50
+ export { FormActions as F, defaultActionsDictionary as d, getActionnsComponentsDictionary as g };
@@ -1,4 +1,4 @@
1
- import { ModalOpenOptions } from "src/contexts/ModalContext/types";
1
+ import { ModalOpenOptions } from "../../contexts/ModalContext/types";
2
2
  declare type ImodalOpt = Pick<ModalOpenOptions, 'actionComponents' | 'standardActions'>;
3
3
  export interface ActionsProps extends ImodalOpt {
4
4
  variant?: string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { VariantModal } from 'src/contexts/ModalContext/types';
2
+ import { VariantModal } from '../../../../contexts/ModalContext/types';
3
3
  export interface HeaderProps {
4
4
  variant?: VariantModal;
5
5
  title: string;
@@ -0,0 +1,3 @@
1
+ import { Dictionary } from '@m4l/core';
2
+ export declare function getNoItemSelectedComponentsDictionary(): string[];
3
+ export declare const defaultNoItemSelectedDictionary: Dictionary;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function NoItemSelected(): JSX.Element;
@@ -0,0 +1,76 @@
1
+ import { useEnvironment, useModuleDictionary } from "@m4l/core";
2
+ import { styled } from "@mui/material/styles";
3
+ import { jsxs, jsx } from "react/jsx-runtime";
4
+ const WrapperNoItemSelected = styled("div")(({
5
+ theme
6
+ }) => ({
7
+ width: "100%",
8
+ height: "100%",
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ alignItems: "center",
12
+ justifyContent: "center",
13
+ overflow: "auto",
14
+ padding: theme.spacing(3)
15
+ }));
16
+ const Image = styled("span", {
17
+ shouldForwardProp: (prop) => prop !== "src"
18
+ })(({
19
+ src,
20
+ theme
21
+ }) => ({
22
+ zIndex: 9,
23
+ top: 0,
24
+ height: "100%",
25
+ width: "100%",
26
+ maxWidth: "500px",
27
+ maxHeight: "200px",
28
+ ".split_horizontal &": {
29
+ bruces: "sss",
30
+ minWidth: "150px"
31
+ },
32
+ ".split_vertical &": {
33
+ bruces: "sss",
34
+ minHeight: "150px"
35
+ },
36
+ padding: `0px ${theme.spacing(1)} ${theme.spacing(1)} ${theme.spacing(1)}`,
37
+ display: "inline-block",
38
+ backgroundColor: theme.palette.divider,
39
+ justifyContent: "center",
40
+ mask: `url(${src}) no-repeat center / contain`,
41
+ WebkitMask: `url(${src}) no-repeat center / contain`
42
+ }));
43
+ const Label = styled("span")(({
44
+ theme
45
+ }) => ({
46
+ ...theme.typography.body2,
47
+ padding: `${theme.spacing(1.5)} ${theme.spacing(1)} ${theme.spacing(1)} ${theme.spacing(1)}`,
48
+ color: theme.palette.text.primary
49
+ }));
50
+ function NoItemSelected() {
51
+ const {
52
+ host_static_assets,
53
+ environment
54
+ } = useEnvironment();
55
+ const {
56
+ getLabel
57
+ } = useModuleDictionary();
58
+ const src = `${host_static_assets}/${environment}/frontend/components/no_item_selected/assets/icons/no_selected.svg`;
59
+ return /* @__PURE__ */ jsxs(WrapperNoItemSelected, {
60
+ id: "Wrapper",
61
+ children: [/* @__PURE__ */ jsx(Image, {
62
+ src
63
+ }), /* @__PURE__ */ jsx(Label, {
64
+ children: getLabel("no_item_selected.message")
65
+ })]
66
+ });
67
+ }
68
+ function getNoItemSelectedComponentsDictionary() {
69
+ return ["no_item_selected"];
70
+ }
71
+ const defaultNoItemSelectedDictionary = {
72
+ no_item_selected: {
73
+ message: "Please select a item to show detail"
74
+ }
75
+ };
76
+ export { NoItemSelected as N, defaultNoItemSelectedDictionary as d, getNoItemSelectedComponentsDictionary as g };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ImageProps } from './types';
3
+ export declare const WrapperNoItemSelected: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
+ export declare const Image: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & ImageProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
5
+ export declare const Label: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -0,0 +1,5 @@
1
+ export interface NoItemSelectedProps {
2
+ }
3
+ export interface ImageProps extends NoItemSelectedProps {
4
+ src: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ import { Dictionary } from '@m4l/core';
2
+ export declare function getObjectLogsComponentsDictionary(): string[];
3
+ export declare const defaultObjectLogDictionary: Dictionary;
@@ -280,4 +280,21 @@ function ObjectLogs(props) {
280
280
  })]
281
281
  });
282
282
  }
283
- export { ObjectLogs as O };
283
+ function getObjectLogsComponentsDictionary() {
284
+ return ["object_logs"];
285
+ }
286
+ const defaultObjectLogDictionary = {
287
+ object_logs: {
288
+ start_date: "Start date",
289
+ end_date: "End date",
290
+ search: "Search",
291
+ date_time: "Date time",
292
+ user: "User",
293
+ module: "Module",
294
+ privilege_name: "Privilege",
295
+ log_resume: "Log",
296
+ log_detail: "Detail",
297
+ ip: "Ip"
298
+ }
299
+ };
300
+ export { ObjectLogs as O, defaultObjectLogDictionary as d, getObjectLogsComponentsDictionary as g };
@@ -1,9 +1,14 @@
1
1
  export * from '../components/mui_extended';
2
2
  export * from '../components/DataGrid';
3
+ export * from '../components/DataGrid/dictionary';
3
4
  export * from '../components/ObjectLogs';
5
+ export * from '../components/ObjectLogs/dictionary';
4
6
  export * from '../components/FormActions';
7
+ export * from '../components/FormActions/dictionary';
5
8
  export * from '../components/ModalDialog';
6
9
  export * from '../components/ModalDialog/dictionary';
10
+ export * from '../components/NoItemSelected';
11
+ export * from '../components/NoItemSelected/dictionary';
7
12
  export * from '../components/Resizeable';
8
13
  export * from '../components/SplitLayout';
9
14
  export type { SplitPosition } from '../components/SplitLayout/types';
@@ -6,7 +6,7 @@ export type { TLink } from './Breadcrumbs/types';
6
6
  export { default as MenuActions } from './MenuActions';
7
7
  export type { MenuAction, ComponentActionProps } from './MenuActions/types';
8
8
  export { default as Pager } from './Pager';
9
- export { getPagerComponentsDictionary, defaultPagerDictionary } from './Pager/dicctionary';
9
+ export * from './Pager/dicctionary';
10
10
  export type { PagerProps } from './Pager/types';
11
11
  declare module '@mui/material/styles/createPalette' {
12
12
  interface TypeBackground {
package/dist/index.js CHANGED
@@ -4,10 +4,11 @@ export { I as IconButton } from "./components/mui_extended/IconButton/index.js";
4
4
  export { B as Breadcrumbs } from "./components/mui_extended/Breadcrumbs/index.js";
5
5
  export { M as MenuActions } from "./components/mui_extended/MenuActions/index.js";
6
6
  export { P as Pager, d as defaultPagerDictionary, g as getPagerComponentsDictionary } from "./components/mui_extended/Pager/index.js";
7
- export { a as DataGrid } from "./components/DataGrid/index.js";
8
- export { O as ObjectLogs } from "./components/ObjectLogs/index.js";
9
- export { F as FormActions } from "./components/FormActions/index.js";
7
+ export { a as DataGrid, d as defaultGridDictionary, g as getGridComponentsDictionary } from "./components/DataGrid/index.js";
8
+ export { O as ObjectLogs, d as defaultObjectLogDictionary, g as getObjectLogsComponentsDictionary } from "./components/ObjectLogs/index.js";
9
+ export { F as FormActions, d as defaultActionsDictionary, g as getActionnsComponentsDictionary } from "./components/FormActions/index.js";
10
10
  export { M as ModalDialog, d as defaultModalDialogDictionary, g as getModalDialogComponentsDictionary } from "./components/ModalDialog/index.js";
11
+ export { N as NoItemSelected, d as defaultNoItemSelectedDictionary, g as getNoItemSelectedComponentsDictionary } from "./components/NoItemSelected/index.js";
11
12
  export { R as Resizeable } from "./components/Resizeable/index.js";
12
13
  export { S as SplitLayout } from "./components/SplitLayout/index.js";
13
14
  export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/index.js";
@@ -23,7 +24,6 @@ import "./react-data-grid.js";
23
24
  import "clsx";
24
25
  import "react-dnd";
25
26
  import "react-dnd-html5-backend";
26
- import "@mui_extended";
27
27
  import "./vendor.js";
28
28
  import "@mui/material/useMediaQuery";
29
29
  import "@mui/x-date-pickers";
package/dist/vendor.js CHANGED
@@ -12,7 +12,6 @@ import useMediaQuery from "@mui/material/useMediaQuery";
12
12
  import { i as initialPagerState } from "./components/DataGrid/index.js";
13
13
  import "react-dnd";
14
14
  import "react-dnd-html5-backend";
15
- import "@mui_extended";
16
15
  import "./contexts/ModalContext/index.js";
17
16
  import "@mui/x-date-pickers";
18
17
  import "@mui/lab/AdapterDateFns";
@@ -23,6 +22,7 @@ import "./components/FormActions/index.js";
23
22
  import "./react-draggable.js";
24
23
  import "./components/ModalDialog/index.js";
25
24
  import "./components/Resizeable/index.js";
25
+ import "./components/NoItemSelected/index.js";
26
26
  import "./react-splitter-layout.js";
27
27
  import "./components/SplitLayout/index.js";
28
28
  import "./components/mui_extended/BoxIcon/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.5",
4
+ "version": "0.0.8",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "dev": "vite",