@m4l/layouts 0.0.31 → 0.0.32
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.
|
@@ -66,7 +66,8 @@ function MasterDetailLayout(props) {
|
|
|
66
66
|
masterComponent,
|
|
67
67
|
componentsDictionary,
|
|
68
68
|
breadcrumbLinks,
|
|
69
|
-
privileges
|
|
69
|
+
privileges,
|
|
70
|
+
skeletonFlags
|
|
70
71
|
} = props;
|
|
71
72
|
const {
|
|
72
73
|
host_static_assets,
|
|
@@ -117,7 +118,7 @@ function MasterDetailLayout(props) {
|
|
|
117
118
|
initialWidth: 500,
|
|
118
119
|
initialHeigth: 680,
|
|
119
120
|
contentComponent: detailComponent,
|
|
120
|
-
|
|
121
|
+
actions: void 0
|
|
121
122
|
});
|
|
122
123
|
}, [detailComponent]);
|
|
123
124
|
const viewDetailAction = useMemo(() => {
|
|
@@ -147,6 +148,7 @@ function MasterDetailLayout(props) {
|
|
|
147
148
|
urlIcon,
|
|
148
149
|
moduleActions: finalModuleActions,
|
|
149
150
|
privileges,
|
|
151
|
+
skeletonFlags,
|
|
150
152
|
componentsDictionary: finalComponentsDictionary,
|
|
151
153
|
breadcrumbLinks,
|
|
152
154
|
children: /* @__PURE__ */ jsx(SplitLayout, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoxIcon, Breadcrumbs as Breadcrumbs$1, MenuActions, useModal, ModalProvider, getModalDialogComponentsDictionary } from "@m4l/components";
|
|
2
2
|
import { createContext, useState, useMemo, forwardRef, useRef, useImperativeHandle } from "react";
|
|
3
3
|
import { styled, useTheme } from "@mui/material/styles";
|
|
4
|
-
import { voidFunction, useModuleDictionary, useFlagsPresent, FlagsProvider, ModuleDictionaryProvider, ModulePrivilegesProvider } from "@m4l/core";
|
|
4
|
+
import { voidFunction, useModuleDictionary, useFlagsPresent, FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, ModulePrivilegesProvider } from "@m4l/core";
|
|
5
5
|
import { Skeleton, Typography, IconButton } from "@mui/material";
|
|
6
6
|
import { u as useResponsiveDesktop } from "../../vendor.js";
|
|
7
7
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
@@ -341,7 +341,8 @@ const ModuleLayout = forwardRef((props, ref) => {
|
|
|
341
341
|
children,
|
|
342
342
|
componentsDictionary,
|
|
343
343
|
breadcrumbLinks,
|
|
344
|
-
privileges
|
|
344
|
+
privileges,
|
|
345
|
+
skeletonFlags
|
|
345
346
|
} = props;
|
|
346
347
|
const moduleRef = useRef(null);
|
|
347
348
|
const openModal = (modalOpenProps) => {
|
|
@@ -355,18 +356,21 @@ const ModuleLayout = forwardRef((props, ref) => {
|
|
|
355
356
|
children: /* @__PURE__ */ jsx(ModuleDictionaryProvider, {
|
|
356
357
|
moduleId,
|
|
357
358
|
componentsDictionary,
|
|
358
|
-
children: /* @__PURE__ */ jsx(
|
|
359
|
-
|
|
360
|
-
children: /* @__PURE__ */ jsx(
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
children
|
|
359
|
+
children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, {
|
|
360
|
+
flags: skeletonFlags,
|
|
361
|
+
children: /* @__PURE__ */ jsx(ModulePrivilegesProvider, {
|
|
362
|
+
queryPrivileges: privileges,
|
|
363
|
+
children: /* @__PURE__ */ jsx(ModuleProvider, {
|
|
364
|
+
moduleId,
|
|
365
|
+
urlIcon,
|
|
366
|
+
moduleNameField,
|
|
367
|
+
initialModuleActions,
|
|
368
|
+
breadcrumbLinks,
|
|
369
|
+
children: /* @__PURE__ */ jsx(ModalProvider, {
|
|
370
|
+
children: /* @__PURE__ */ jsx(Module, {
|
|
371
|
+
ref: moduleRef,
|
|
372
|
+
children
|
|
373
|
+
})
|
|
370
374
|
})
|
|
371
375
|
})
|
|
372
376
|
})
|
|
@@ -18,6 +18,7 @@ export interface ModuleAction extends MenuAction {
|
|
|
18
18
|
export interface ModuleLayoutProps extends HeaderProps {
|
|
19
19
|
moduleId: string;
|
|
20
20
|
urlIcon: string;
|
|
21
|
+
skeletonFlags: string[];
|
|
21
22
|
moduleNameField?: string;
|
|
22
23
|
privileges: string[];
|
|
23
24
|
breadcrumbLinks: TLink[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompanyLogo, LanguagePopover, Typography, Image } from "@m4l/components";
|
|
2
2
|
import { Card, Container, Stack } from "@mui/material";
|
|
3
3
|
import { styled } from "@mui/material/styles";
|
|
4
|
-
import { useModuleDictionary, useFlagsPresent, getLocalStorage, useNetwork, useEnvironment, useFlags, FlagsProvider, ModuleDictionaryProvider } from "@m4l/core";
|
|
4
|
+
import { useModuleDictionary, useFlagsPresent, getLocalStorage, useNetwork, useEnvironment, useFlags, FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider } from "@m4l/core";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { u as useResponsive, P as Page } from "../../node_modules.js";
|
|
7
7
|
import { createContext, useState, useEffect } from "react";
|
|
@@ -215,7 +215,8 @@ const NoAuthModuleLayout = (props) => {
|
|
|
215
215
|
moduleId,
|
|
216
216
|
moduleName,
|
|
217
217
|
children,
|
|
218
|
-
componentsDictionary
|
|
218
|
+
componentsDictionary,
|
|
219
|
+
skeletonFlags
|
|
219
220
|
} = props;
|
|
220
221
|
return /* @__PURE__ */ jsx(FlagsProvider, {
|
|
221
222
|
children: /* @__PURE__ */ jsx(ModuleDictionaryProvider, {
|
|
@@ -223,10 +224,13 @@ const NoAuthModuleLayout = (props) => {
|
|
|
223
224
|
moduleId,
|
|
224
225
|
moduleName,
|
|
225
226
|
componentsDictionary,
|
|
226
|
-
children: /* @__PURE__ */ jsx(
|
|
227
|
-
|
|
228
|
-
children: /* @__PURE__ */ jsx(
|
|
229
|
-
|
|
227
|
+
children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, {
|
|
228
|
+
flags: skeletonFlags,
|
|
229
|
+
children: /* @__PURE__ */ jsx(ModuleProvider, {
|
|
230
|
+
moduleId,
|
|
231
|
+
children: /* @__PURE__ */ jsx(ModuleWrapper, {
|
|
232
|
+
children
|
|
233
|
+
})
|
|
230
234
|
})
|
|
231
235
|
})
|
|
232
236
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/layouts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.32",
|
|
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/components": "^0.0.
|
|
17
|
+
"@m4l/components": "^0.0.48",
|
|
18
18
|
"react": "^17.0.0 || 18.x",
|
|
19
19
|
"react-dom": "^18.0.0"
|
|
20
20
|
},
|