@m4l/layouts 0.1.5 → 0.1.7
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/index.js +6 -9
- package/layouts/MasterDetailLayout/index.js +1 -1
- package/layouts/ModuleLayout/index.js +1 -1
- package/layouts/NoAuthModuleLayout/ModuleWrapper/styles.d.ts +1 -1
- package/layouts/NoAuthModuleLayout/index.js +2 -4
- package/package.json +1 -1
- package/hooks/useResponsive.d.ts +0 -8
- package/node_modules.js +0 -1
- package/vendor.js +0 -64
package/index.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
export { a as ModuleLayout, d as defaultModuleLayoutDictionary, g as getModuleLayoutComponentsDictionary } from "./layouts/ModuleLayout/index.js";
|
|
2
|
-
export { a as MasterDetailLayout, d as defaultMasterDetailDictionary, g as getMasterDetailLayoutComponentsDictionary } from "./layouts/MasterDetailLayout/index.js";
|
|
3
|
-
export { N as NoAuthModuleLayout, d as defaultNoAuthModuleLayoutDictionary, g as getNoAuthModuleLayoutComponentsDictionary } from "./layouts/NoAuthModuleLayout/index.js";
|
|
4
|
-
export { u as useMasterDetail } from "./hooks/useMasterDetail/index.js";
|
|
5
|
-
export { u as useModule } from "./hooks/useModule/index.js";
|
|
6
2
|
import "@m4l/components";
|
|
7
3
|
import "react";
|
|
8
|
-
import "@mui/material/styles";
|
|
9
4
|
import "@m4l/core";
|
|
5
|
+
export { a as MasterDetailLayout, d as defaultMasterDetailDictionary, g as getMasterDetailLayoutComponentsDictionary } from "./layouts/MasterDetailLayout/index.js";
|
|
6
|
+
import "@m4l/graphics";
|
|
10
7
|
import "@mui/material";
|
|
11
|
-
import "./vendor.js";
|
|
12
|
-
import "@mui/material/useMediaQuery";
|
|
13
8
|
import "react/jsx-runtime";
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
export { N as NoAuthModuleLayout, d as defaultNoAuthModuleLayoutDictionary, g as getNoAuthModuleLayoutComponentsDictionary } from "./layouts/NoAuthModuleLayout/index.js";
|
|
10
|
+
export { u as useMasterDetail } from "./hooks/useMasterDetail/index.js";
|
|
11
|
+
export { u as useModule } from "./hooks/useModule/index.js";
|
|
12
|
+
import "@mui/material/styles";
|
|
@@ -3,7 +3,7 @@ import { voidFunction, useEnvironment } from "@m4l/core";
|
|
|
3
3
|
import { SplitLayout } from "@m4l/components";
|
|
4
4
|
import { g as getModuleLayoutComponentsDictionary, a as ModuleLayout } from "../ModuleLayout/index.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
6
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
7
7
|
import { Button } from "@mui/material";
|
|
8
8
|
import { u as useMasterDetail } from "../../hooks/useMasterDetail/index.js";
|
|
9
9
|
function getMasterDetailLayoutComponentsDictionary() {
|
|
@@ -3,7 +3,7 @@ import { createContext, useState, useMemo, forwardRef, useRef, useImperativeHand
|
|
|
3
3
|
import { styled, useTheme } from "@mui/material/styles";
|
|
4
4
|
import { voidFunction, useModuleDictionary, useFlagsPresent, FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, ModulePrivilegesProvider } from "@m4l/core";
|
|
5
5
|
import { Skeleton, Typography, IconButton } from "@mui/material";
|
|
6
|
-
import {
|
|
6
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import { u as useModule } from "../../hooks/useModule/index.js";
|
|
9
9
|
const WrapperModule = styled("div")(() => ({
|
|
@@ -7,7 +7,7 @@ export declare const SectionStyle: import("@emotion/styled").StyledComponent<Omi
|
|
|
7
7
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
8
8
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
9
9
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, "
|
|
10
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "translate" | "slot" | "title" | "children" | "ref" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "elevation" | "square" | "variant" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
11
|
export declare const ContentStyle: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
12
12
|
export declare const TitleContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
13
|
export declare const ModuleTitleContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useResponsive, useLocales } from "@m4l/graphics";
|
|
1
2
|
import { Page, CompanyLogo, LanguagePopover, Typography, Image } from "@m4l/components";
|
|
2
3
|
import { Card, Container, Stack } from "@mui/material";
|
|
3
4
|
import { styled } from "@mui/material/styles";
|
|
4
5
|
import { useModuleDictionary, useFlagsPresent, FlagsProvider, DomainProvider, ModuleDictionaryProvider, ModuleSkeletonProvider } from "@m4l/core";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { a as useResponsive, b as useLocales } from "../../vendor.js";
|
|
7
7
|
const RootStyle = styled("div")(({
|
|
8
8
|
theme
|
|
9
9
|
}) => ({
|
|
@@ -83,9 +83,7 @@ const ModuleWrapper = (props) => {
|
|
|
83
83
|
children: [/* @__PURE__ */ jsx(CompanyLogo, {
|
|
84
84
|
size: mdUp ? "normal" : "small",
|
|
85
85
|
isSkeleton
|
|
86
|
-
}), /* @__PURE__ */ jsx(LanguagePopover, {
|
|
87
|
-
isSkeleton
|
|
88
|
-
})]
|
|
86
|
+
}), /* @__PURE__ */ jsx(LanguagePopover, {})]
|
|
89
87
|
}), mdUp && /* @__PURE__ */ jsxs(SectionStyle, {
|
|
90
88
|
id: "SectionStyle",
|
|
91
89
|
children: [/* @__PURE__ */ jsx(TitleContainer, {
|
package/package.json
CHANGED
package/hooks/useResponsive.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Breakpoint } from '@mui/material';
|
|
2
|
-
declare type Query = 'up' | 'down' | 'between' | 'only';
|
|
3
|
-
declare type Key = Breakpoint | number;
|
|
4
|
-
declare type Start = Breakpoint | number;
|
|
5
|
-
declare type End = Breakpoint | number;
|
|
6
|
-
export declare function useResponsive(query: Query, key?: Key, start?: Start, end?: End): boolean | undefined;
|
|
7
|
-
export declare function useResponsiveDesktop(): boolean | undefined;
|
|
8
|
-
export {};
|
package/node_modules.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/vendor.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useTheme } from "@mui/material/styles";
|
|
2
|
-
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
3
|
-
import "@mui/material";
|
|
4
|
-
import "react/jsx-runtime";
|
|
5
|
-
import { createContext, useContext } from "react";
|
|
6
|
-
import "@m4l/core";
|
|
7
|
-
import "@mui/x-date-pickers/AdapterDateFns";
|
|
8
|
-
import "@mui/x-date-pickers";
|
|
9
|
-
import "./layouts/ModuleLayout/index.js";
|
|
10
|
-
import "@m4l/components";
|
|
11
|
-
import "./layouts/MasterDetailLayout/index.js";
|
|
12
|
-
import "./layouts/NoAuthModuleLayout/index.js";
|
|
13
|
-
import "./hooks/useMasterDetail/index.js";
|
|
14
|
-
import "./hooks/useModule/index.js";
|
|
15
|
-
function useResponsive$1(query, key, start, end) {
|
|
16
|
-
const theme = useTheme();
|
|
17
|
-
const mediaUp = useMediaQuery(theme.breakpoints.up(key));
|
|
18
|
-
const mediaDown = useMediaQuery(theme.breakpoints.down(key));
|
|
19
|
-
const mediaBetween = useMediaQuery(theme.breakpoints.between(start, end));
|
|
20
|
-
const mediaOnly = useMediaQuery(theme.breakpoints.only(key));
|
|
21
|
-
if (query === "up") {
|
|
22
|
-
return mediaUp;
|
|
23
|
-
}
|
|
24
|
-
if (query === "down") {
|
|
25
|
-
return mediaDown;
|
|
26
|
-
}
|
|
27
|
-
if (query === "between") {
|
|
28
|
-
return mediaBetween;
|
|
29
|
-
}
|
|
30
|
-
if (query === "only") {
|
|
31
|
-
return mediaOnly;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function useResponsiveDesktop() {
|
|
35
|
-
const isDesktop = useResponsive$1("up", "sm");
|
|
36
|
-
return isDesktop;
|
|
37
|
-
}
|
|
38
|
-
const LocalesContext = createContext(null);
|
|
39
|
-
function useResponsive(query, key, start, end) {
|
|
40
|
-
const theme = useTheme();
|
|
41
|
-
const mediaUp = useMediaQuery(theme.breakpoints.up(key));
|
|
42
|
-
const mediaDown = useMediaQuery(theme.breakpoints.down(key));
|
|
43
|
-
const mediaBetween = useMediaQuery(theme.breakpoints.between(start, end));
|
|
44
|
-
const mediaOnly = useMediaQuery(theme.breakpoints.only(key));
|
|
45
|
-
if (query === "up") {
|
|
46
|
-
return mediaUp;
|
|
47
|
-
}
|
|
48
|
-
if (query === "down") {
|
|
49
|
-
return mediaDown;
|
|
50
|
-
}
|
|
51
|
-
if (query === "between") {
|
|
52
|
-
return mediaBetween;
|
|
53
|
-
}
|
|
54
|
-
if (query === "only") {
|
|
55
|
-
return mediaOnly;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const useLocales = () => {
|
|
59
|
-
const context = useContext(LocalesContext);
|
|
60
|
-
if (!context)
|
|
61
|
-
throw new Error("useLocales context must be use inside LocalesProvider");
|
|
62
|
-
return context;
|
|
63
|
-
};
|
|
64
|
-
export { useResponsive as a, useLocales as b, useResponsiveDesktop as u };
|