@m4l/layouts 0.1.13 → 0.1.14

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,5 +1,5 @@
1
1
  import { useContext as t } from "react";
2
- import { M as e } from "../../layouts/MasterDetailLayout/index.932fdce8.js";
2
+ import { M as e } from "../../layouts/MasterDetailLayout/index.71de0dc7.js";
3
3
  const s = () => t(e);
4
4
  export {
5
5
  s as u
package/index.js CHANGED
@@ -2,12 +2,12 @@ import { a as p, d as l, g as y } from "./layouts/ModuleLayout/index.842072c5.js
2
2
  import "@m4l/components";
3
3
  import "react";
4
4
  import "@m4l/core";
5
- import { a as n, d as M, g as D } from "./layouts/MasterDetailLayout/index.932fdce8.js";
5
+ import { a as n, d as M, g as D } from "./layouts/MasterDetailLayout/index.71de0dc7.js";
6
6
  import "@m4l/graphics";
7
7
  import "@mui/material";
8
8
  import "react/jsx-runtime";
9
- import { N as L, d as c, g } from "./layouts/NoAuthModuleLayout/index.798fbe31.js";
10
- import { u as N } from "./hooks/useMasterDetail/index.7d7b413d.js";
9
+ import { N as L, d as c, g } from "./layouts/NoAuthModuleLayout/index.5d1098ef.js";
10
+ import { u as N } from "./hooks/useMasterDetail/index.8e9e900b.js";
11
11
  import { u as A } from "./hooks/useModule/index.096d7d13.js";
12
12
  import "@mui/material/styles";
13
13
  export {
@@ -5,7 +5,7 @@ import { g as V, a as j } from "../ModuleLayout/index.842072c5.js";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
6
  import { useResponsiveDesktop as E } from "@m4l/graphics";
7
7
  import { Button as H } from "@mui/material";
8
- import { u as T } from "../../hooks/useMasterDetail/index.7d7b413d.js";
8
+ import { u as T } from "../../hooks/useMasterDetail/index.8e9e900b.js";
9
9
  function W() {
10
10
  return ["master_detail_layout"].concat(V());
11
11
  }
@@ -54,24 +54,24 @@ function nt(i) {
54
54
  const {
55
55
  moduleId: o,
56
56
  moduleNameField: e,
57
- detailComponent: t,
58
- moduleActions: n,
59
- urlIcon: D,
60
- masterComponent: M,
57
+ masterComponent: t,
58
+ detailComponent: n,
59
+ moduleActions: y,
60
+ urlIcon: M,
61
61
  currentLang: S,
62
- componentsDictionary: y,
62
+ componentsDictionary: f,
63
63
  breadcrumbLinks: b,
64
64
  privileges: k,
65
65
  skeletonFlags: A
66
66
  } = i, {
67
67
  host_static_assets: c,
68
68
  environment_assets: a
69
- } = R(), [w, L] = v("vertical"), d = E(), f = z(null), u = (m) => {
70
- const s = [..._];
69
+ } = R(), [w, L] = v("vertical"), d = E(), _ = z(null), u = (m) => {
70
+ const s = [...g];
71
71
  for (let l = 0; l < s.length; l++)
72
72
  s[l].disabled = !1, s[l].tag === m && (s[l].disabled = !0);
73
73
  $(s), L(m);
74
- }, _ = [{
74
+ }, g = [{
75
75
  urlIcon: `${c}/${a}/frontend/components/masterdetaillayout/assets/icons/split_vertical.svg`,
76
76
  onClick: () => u("vertical"),
77
77
  disabled: !0,
@@ -95,30 +95,30 @@ function nt(i) {
95
95
  dictionaryField: "master_detail_layout.no_split",
96
96
  tag: "none",
97
97
  className: "splitactions"
98
- }], g = N(() => {
99
- f.current?.openModal({
98
+ }], C = N(() => {
99
+ _.current?.openModal({
100
100
  title: "master_detail_layout.view_detail",
101
101
  initialWidth: 500,
102
102
  initialHeigth: 680,
103
- contentComponent: t,
103
+ contentComponent: n,
104
104
  actions: void 0
105
105
  });
106
- }, [t]), C = p(() => ({
106
+ }, [n]), h = p(() => ({
107
107
  urlIcon: `${c}/${a}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
108
- onClick: g,
108
+ onClick: C,
109
109
  disabled: !1,
110
110
  visibility: "allways",
111
111
  dictionaryField: "master_detail_layout.view_detail",
112
112
  tag: "none",
113
113
  className: "",
114
114
  component: K
115
- }), [a, g]), [h, $] = v(_), F = p(() => O(h, n, C, d), [h, n, d, C]), I = p(() => y.concat(W()), [y]);
115
+ }), [a, C]), [D, $] = v(g), F = p(() => O(D, y, h, d), [D, y, d, h]), I = p(() => f.concat(W()), [f]);
116
116
  return /* @__PURE__ */ r(J, {
117
117
  children: /* @__PURE__ */ r(j, {
118
- ref: f,
118
+ ref: _,
119
119
  moduleId: o,
120
120
  moduleNameField: e,
121
- urlIcon: D,
121
+ urlIcon: M,
122
122
  moduleActions: F,
123
123
  privileges: k,
124
124
  skeletonFlags: A,
@@ -127,8 +127,8 @@ function nt(i) {
127
127
  breadcrumbLinks: b,
128
128
  children: /* @__PURE__ */ r(B, {
129
129
  splitPosition: d ? w : "none",
130
- firstPart: M,
131
- secondPart: t
130
+ firstPart: t,
131
+ secondPart: n
132
132
  })
133
133
  })
134
134
  });
@@ -1,6 +1,6 @@
1
1
  import { useResponsive as h, useLocales as N } from "@m4l/graphics";
2
2
  import { Image as p, Typography as u, LanguagePopover as W, HelmetPage as k } from "@m4l/components";
3
- import { useModuleDictionary as m, useBase as g, useEnvironment as b, BaseProvider as I, FlagsProvider as F, ModuleDictionaryProvider as S, ModuleSkeletonProvider as A } from "@m4l/core";
3
+ import { useModuleDictionary as m, useBase as g, useEnvironment as S, BaseProvider as b, FlagsProvider as I, ModuleDictionaryProvider as F, ModuleSkeletonProvider as A } from "@m4l/core";
4
4
  import { styled as t } from "@mui/material/styles";
5
5
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
6
6
  const C = t("div")(({
@@ -160,23 +160,21 @@ const C = t("div")(({
160
160
  } = o, {
161
161
  host_static_assets: s,
162
162
  environment_assets: d
163
- } = b(), {
164
- currentLang: _
165
- } = N(), w = L || `${s}/${d}/frontend/commons/assets/icons/logotipo_m4l.svg`, M = x || `${s}/${d}/frontend/commons/assets/icons/isotipo_m4l.svg`, U = v || `${s}/${d}/frontend/domain/host/commons/assets/img/illustration_noauth.png`, c = f;
166
- return c.findIndex((D) => D === "dictionary_loaded") < 0 && c.push("dictionary_loaded"), /* @__PURE__ */ e(I, {
163
+ } = S(), _ = N().currentLocale?.localeString, w = L || `${s}/${d}/frontend/commons/assets/icons/logotipo_m4l.svg`, M = x || `${s}/${d}/frontend/commons/assets/icons/isotipo_m4l.svg`, U = v || `${s}/${d}/frontend/domain/host/commons/assets/img/illustration_noauth.png`, c = f;
164
+ return c.findIndex((D) => D === "dictionary_loaded") < 0 && c.push("dictionary_loaded"), /* @__PURE__ */ e(b, {
167
165
  value: {
168
166
  subtitle: y,
169
167
  companyLogoSmallUrl: M,
170
168
  companyLogoNormalUrl: w,
171
169
  moduleIlustrationUrl: U
172
170
  },
173
- children: /* @__PURE__ */ e(F, {
174
- children: /* @__PURE__ */ e(S, {
171
+ children: /* @__PURE__ */ e(I, {
172
+ children: /* @__PURE__ */ e(F, {
175
173
  isAuth: !1,
176
174
  moduleId: n,
177
175
  moduleNameField: l,
178
176
  componentsDictionary: a,
179
- currentLang: _.value,
177
+ currentLang: _,
180
178
  children: /* @__PURE__ */ e(A, {
181
179
  flags: c,
182
180
  children: /* @__PURE__ */ e(z, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "license": "UNLICENSED",
5
5
  "dependencies": {
6
6
  "@m4l/components": "*",