@plumile/backoffice-react 0.1.162 → 0.1.164

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,3 +1,4 @@
1
+ /* empty css */
1
2
  /* empty css */
2
3
  //#region src/auth/authRefreshNotice.css.ts
3
4
  var e = "txvbqbqhu txvbqbrff txvbqbry7 txvbqbp5g txvbqb13ik txvbqb1auw txvbqblx6 txvbqb13l3 txvbqbdjn txvbqbtxc txvbqbegv";
@@ -1,3 +1,4 @@
1
+ /* empty css */
1
2
  /* empty css */
2
3
  //#region src/auth/login/loginPage.css.ts
3
4
  var e = "txvbqbfpn txvbqbh4x txvbqbheb", t = "txvbqbfpn txvbqbh4x txvbqb19uf", n = "txvbqb1bg3 txvbqb9j txvbqbo7v txvbqbny4", r = "txvbqbey txvbqb1bg3 txvbqbfpn txvbqbhdl txvbqbs00 txvbqbp6j", i = "txvbqb1b9r txvbqbk07 txvbqbfvs txvbqb2wi txvbqb1bk3", a = "txvbqbey txvbqbfpn txvbqbh7g txvbqbhdy txvbqblt7 txvbqbrza", o = "w8yhmy0 txvbqb1b4r txvbqb1tv txvbqb2rt txvbqb1bhb txvbqbv txvbqbhbf txvbqbwvi txvbqb3f txvbqb7h txvbqb76 txvbqb7t txvbqb1etp txvbqb1gct", s = "txvbqb10o0 txvbqb11ll txvbqb12j6 txvbqbxv9 txvbqbc7z txvbqbc27 txvbqbci3 txvbqbce4", c = "txvbqbfpn txvbqbh4x txvbqbheb", l = "txvbqb19uf", u = "txvbqbo7v txvbqbam txvbqbhbs txvbqb1bhb txvbqbmu1", d = "txvbqbrzn", f = "w8yhmy1 txvbqb1f2 txvbqb29r txvbqb2sj txvbqb1bhb txvbqb1b9n txvbqb7h txvbqb75 txvbqb7t";
@@ -1,4 +1,3 @@
1
- /* empty css */
2
1
  /* empty css */
3
2
  //#region src/components/backoffice/detail/backofficeDetailBadgeRow.css.ts
4
3
  var e = "txvbqbfpn txvbqbh7g txvbqbhdl txvbqbey";
@@ -1,4 +1,3 @@
1
- /* empty css */
2
1
  /* empty css */
3
2
  //#region src/components/backoffice/layout/backofficeSidebarActions.css.ts
4
3
  var e = "_1xws1b00 txvbqbfqq txvbqbey txvbqbls4 txvbqb19gc txvbqbjlr txvbqb1tv txvbqb2rt txvbqb2tz txvbqb1b4r txvbqbv txvbqbwvi txvbqb7h txvbqb76 txvbqb7t";
@@ -2,23 +2,54 @@ import { BackofficeErrorBoundary as e } from "../errors/BackofficeErrorBoundary.
2
2
  import { BackofficeContentError as t } from "./BackofficeContentError.js";
3
3
  import { BackofficeContentFallback as n } from "./BackofficeContentFallback.js";
4
4
  import { root as r } from "./backofficeContentBoundary.css.js";
5
- import { Suspense as i } from "react";
6
- import { jsx as a } from "react/jsx-runtime";
5
+ import { Suspense as i, isValidElement as a } from "react";
6
+ import { jsx as o } from "react/jsx-runtime";
7
+ import s from "@plumile/router/routing/useLocation.js";
7
8
  //#region src/components/backoffice/routing/BackofficeContentBoundary.tsx
8
- var o = ({ children: o }) => /* @__PURE__ */ a("div", {
9
- className: r,
10
- children: /* @__PURE__ */ a(e, {
11
- fallback: ({ error: e, reset: n }) => /* @__PURE__ */ a(t, {
12
- error: e,
13
- onRetry: n
14
- }),
15
- children: /* @__PURE__ */ a(i, {
16
- fallback: /* @__PURE__ */ a(n, {}),
17
- children: o
18
- })
19
- })
20
- });
9
+ var c = /* @__PURE__ */ new WeakMap(), l = 0, u = (e) => {
10
+ let t = c.get(e);
11
+ return t == null ? (l += 1, c.set(e, l), `object:${l}`) : `object:${t}`;
12
+ }, d = (e) => {
13
+ if (typeof e == "string") return `intrinsic:${e}`;
14
+ if (typeof e == "function") return u(e);
15
+ if (typeof e == "object" && e) {
16
+ let t = e, n = null;
17
+ return "displayName" in t && typeof t.displayName == "string" && (n = t.displayName), n == null ? u(t) : `object:${n}`;
18
+ }
19
+ return `${typeof e}:${String(e)}`;
20
+ }, f = (e) => {
21
+ if (Array.isArray(e)) return e.map(f).join("|");
22
+ if (a(e)) return [
23
+ "element",
24
+ String(e.key),
25
+ d(e.type)
26
+ ].join(":");
27
+ if (typeof e == "object" && e) {
28
+ let t = c.get(e);
29
+ return t == null ? (l += 1, c.set(e, l), `object:${l}`) : `object:${t}`;
30
+ }
31
+ return `${typeof e}:${String(e)}`;
32
+ }, p = (e, t) => JSON.stringify([
33
+ e.pathname,
34
+ e.search,
35
+ f(t)
36
+ ]), m = ({ children: a }) => {
37
+ let c = p(s(), a);
38
+ return /* @__PURE__ */ o("div", {
39
+ className: r,
40
+ children: /* @__PURE__ */ o(e, {
41
+ fallback: ({ error: e, reset: n }) => /* @__PURE__ */ o(t, {
42
+ error: e,
43
+ onRetry: n
44
+ }),
45
+ children: /* @__PURE__ */ o(i, {
46
+ fallback: /* @__PURE__ */ o(n, {}),
47
+ children: a
48
+ })
49
+ }, c)
50
+ });
51
+ };
21
52
  //#endregion
22
- export { o as BackofficeContentBoundary, o as default };
53
+ export { m as BackofficeContentBoundary, m as default, p as buildBackofficeContentBoundaryKey };
23
54
 
24
55
  //# sourceMappingURL=BackofficeContentBoundary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeContentBoundary.js","names":[],"sources":["../../../../../src/components/backoffice/routing/BackofficeContentBoundary.tsx"],"sourcesContent":["import { Suspense, type JSX, type ReactNode } from 'react';\n\nimport { BackofficeErrorBoundary } from '../errors/BackofficeErrorBoundary.js';\n\nimport { BackofficeContentError } from './BackofficeContentError.js';\nimport { BackofficeContentFallback } from './BackofficeContentFallback.js';\nimport * as styles from './backofficeContentBoundary.css.js';\n\nexport type BackofficeContentBoundaryProps = {\n children: ReactNode;\n};\n\nexport const BackofficeContentBoundary = ({\n children,\n}: BackofficeContentBoundaryProps): JSX.Element => {\n return (\n <div className={styles.root}>\n <BackofficeErrorBoundary\n fallback={({ error, reset }) => {\n return <BackofficeContentError error={error} onRetry={reset} />;\n }}\n >\n <Suspense fallback={<BackofficeContentFallback />}>{children}</Suspense>\n </BackofficeErrorBoundary>\n </div>\n );\n};\n\nexport default BackofficeContentBoundary;\n"],"mappings":";;;;;;;AAYA,IAAa,KAA6B,EACxC,kBAGE,kBAAC,OAAD;CAAK,WAAW;WACd,kBAAC,GAAD;EACE,WAAW,EAAE,UAAO,eACX,kBAAC,GAAD;GAA+B;GAAO,SAAS;EAAQ,CAAA;YAGhE,kBAAC,GAAD;GAAU,UAAU,kBAAC,GAAD,CAA4B,CAAA;GAAI;EAAmB,CAAA;CAChD,CAAA;AACtB,CAAA"}
1
+ {"version":3,"file":"BackofficeContentBoundary.js","names":[],"sources":["../../../../../src/components/backoffice/routing/BackofficeContentBoundary.tsx"],"sourcesContent":["import { isValidElement, Suspense, type JSX, type ReactNode } from 'react';\nimport useLocation from '@plumile/router/routing/useLocation.js';\n\nimport { BackofficeErrorBoundary } from '../errors/BackofficeErrorBoundary.js';\n\nimport { BackofficeContentError } from './BackofficeContentError.js';\nimport { BackofficeContentFallback } from './BackofficeContentFallback.js';\nimport * as styles from './backofficeContentBoundary.css.js';\n\nexport type BackofficeContentBoundaryProps = {\n children: ReactNode;\n};\n\ntype BackofficeContentBoundaryLocation = Pick<Location, 'pathname' | 'search'>;\n\nconst typeIdentityByObject = new WeakMap<object, number>();\nlet nextTypeIdentity = 0;\n\nconst getObjectTypeIdentity = (value: object): string => {\n const cachedIdentity = typeIdentityByObject.get(value);\n if (cachedIdentity != null) {\n return `object:${cachedIdentity}`;\n }\n nextTypeIdentity += 1;\n typeIdentityByObject.set(value, nextTypeIdentity);\n return `object:${nextTypeIdentity}`;\n};\n\nconst getElementTypeIdentity = (value: unknown): string => {\n if (typeof value === 'string') {\n return `intrinsic:${value}`;\n }\n if (typeof value === 'function') {\n return getObjectTypeIdentity(value);\n }\n if (value != null && typeof value === 'object') {\n const objectValue = value;\n let displayName: string | null = null;\n if (\n 'displayName' in objectValue &&\n typeof objectValue.displayName === 'string'\n ) {\n displayName = objectValue.displayName;\n }\n if (displayName != null) {\n return `object:${displayName}`;\n }\n return getObjectTypeIdentity(objectValue);\n }\n\n return `${typeof value}:${String(value)}`;\n};\n\nconst getBackofficeContentIdentity = (value: ReactNode): string => {\n if (Array.isArray(value)) {\n return value.map(getBackofficeContentIdentity).join('|');\n }\n\n if (isValidElement(value)) {\n return [\n 'element',\n String(value.key),\n getElementTypeIdentity(value.type),\n ].join(':');\n }\n\n if (value != null && typeof value === 'object') {\n const cachedIdentity = typeIdentityByObject.get(value);\n if (cachedIdentity != null) {\n return `object:${cachedIdentity}`;\n }\n nextTypeIdentity += 1;\n typeIdentityByObject.set(value, nextTypeIdentity);\n return `object:${nextTypeIdentity}`;\n }\n\n return `${typeof value}:${String(value)}`;\n};\n\nexport const buildBackofficeContentBoundaryKey = (\n location: BackofficeContentBoundaryLocation,\n children: ReactNode,\n): string => {\n return JSON.stringify([\n location.pathname,\n location.search,\n getBackofficeContentIdentity(children),\n ]);\n};\n\nexport const BackofficeContentBoundary = ({\n children,\n}: BackofficeContentBoundaryProps): JSX.Element => {\n const location = useLocation();\n const contentBoundaryKey = buildBackofficeContentBoundaryKey(\n location,\n children,\n );\n\n return (\n <div className={styles.root}>\n <BackofficeErrorBoundary\n key={contentBoundaryKey}\n fallback={({ error, reset }) => {\n return <BackofficeContentError error={error} onRetry={reset} />;\n }}\n >\n <Suspense fallback={<BackofficeContentFallback />}>{children}</Suspense>\n </BackofficeErrorBoundary>\n </div>\n );\n};\n\nexport default BackofficeContentBoundary;\n"],"mappings":";;;;;;;;AAeA,IAAM,oBAAuB,IAAI,QAAwB,GACrD,IAAmB,GAEjB,KAAyB,MAA0B;CACvD,IAAM,IAAiB,EAAqB,IAAI,CAAK;CAMrD,OALI,KAAkB,QAGtB,KAAoB,GACpB,EAAqB,IAAI,GAAO,CAAgB,GACzC,UAAU,OAJR,UAAU;AAKrB,GAEM,KAA0B,MAA2B;CACzD,IAAI,OAAO,KAAU,UACnB,OAAO,aAAa;CAEtB,IAAI,OAAO,KAAU,YACnB,OAAO,EAAsB,CAAK;CAEpC,IAAqB,OAAO,KAAU,YAAlC,GAA4C;EAC9C,IAAM,IAAc,GAChB,IAA6B;EAUjC,OARE,iBAAiB,KACjB,OAAO,EAAY,eAAgB,aAEnC,IAAc,EAAY,cAExB,KAAe,OAGZ,EAAsB,CAAW,IAF/B,UAAU;CAGrB;CAEA,OAAO,GAAG,OAAO,EAAM,GAAG,OAAO,CAAK;AACxC,GAEM,KAAgC,MAA6B;CACjE,IAAI,MAAM,QAAQ,CAAK,GACrB,OAAO,EAAM,IAAI,CAA4B,EAAE,KAAK,GAAG;CAGzD,IAAI,EAAe,CAAK,GACtB,OAAO;EACL;EACA,OAAO,EAAM,GAAG;EAChB,EAAuB,EAAM,IAAI;CACnC,EAAE,KAAK,GAAG;CAGZ,IAAqB,OAAO,KAAU,YAAlC,GAA4C;EAC9C,IAAM,IAAiB,EAAqB,IAAI,CAAK;EAMrD,OALI,KAAkB,QAGtB,KAAoB,GACpB,EAAqB,IAAI,GAAO,CAAgB,GACzC,UAAU,OAJR,UAAU;CAKrB;CAEA,OAAO,GAAG,OAAO,EAAM,GAAG,OAAO,CAAK;AACxC,GAEa,KACX,GACA,MAEO,KAAK,UAAU;CACpB,EAAS;CACT,EAAS;CACT,EAA6B,CAAQ;AACvC,CAAC,GAGU,KAA6B,EACxC,kBACiD;CAEjD,IAAM,IAAqB,EADV,EAEf,GACA,CACF;CAEA,OACE,kBAAC,OAAD;EAAK,WAAW;YACd,kBAAC,GAAD;GAEE,WAAW,EAAE,UAAO,eACX,kBAAC,GAAD;IAA+B;IAAO,SAAS;GAAQ,CAAA;aAGhE,kBAAC,GAAD;IAAU,UAAU,kBAAC,GAAD,CAA4B,CAAA;IAAI;GAAmB,CAAA;EAChD,GANlB,CAMkB;CACtB,CAAA;AAET"}
@@ -17,13 +17,13 @@ import { BACKOFFICE_DATE_TIME_OPTIONS as y } from "@plumile/backoffice-core/cons
17
17
  import b from "@plumile/router/routing/Link.js";
18
18
  import { Tag as x } from "@plumile/ui/backoffice/atoms/tag/Tag.js";
19
19
  import { BackofficePageHeader as S } from "@plumile/ui/backoffice/molecules/backoffice_page_header/BackofficePageHeader.js";
20
- import { Tabs as C } from "@plumile/ui/atomic/molecules/tabs/Tabs.js";
21
- import { DetailPageTemplate as w } from "@plumile/ui/backoffice/templates/detail_page_template/DetailPageTemplate.js";
22
- import T from "@plumile/router/routing/useLocation.js";
20
+ import C from "@plumile/router/routing/useLocation.js";
21
+ import { Tabs as w } from "@plumile/ui/atomic/molecules/tabs/Tabs.js";
22
+ import { DetailPageTemplate as T } from "@plumile/ui/backoffice/templates/detail_page_template/DetailPageTemplate.js";
23
23
  import { BackofficeKeyValueList as E } from "@plumile/ui/backoffice/molecules/backoffice_key_value_list/BackofficeKeyValueList.js";
24
24
  //#region src/pages/BackofficeEntityDetailLayoutPage.tsx
25
25
  var { useFragment: D, usePreloadedQuery: O } = _, k = (e) => e.trim().replace(/^\/+|\/+$/g, ""), A = (e, t, n) => [n.pages.mainPage, ...n.pages.subPages ?? []].find((r) => e === n.routes.detailPage(t, r.id))?.path ?? "", j = ({ config: _, prepared: j, children: M }) => {
26
- let { t: N } = g(), { t: P } = e(), { entities: F } = t(), { pathname: I } = T(), L = O(_.layoutPage.query, j.layoutQuery), R = _.layoutPage.resolveNode(L, { id: j.id }), z = D(_.layoutPage.fragment, R);
26
+ let { t: N } = g(), { t: P } = e(), { entities: F } = t(), { pathname: I } = C(), L = O(_.layoutPage.query, j.layoutQuery), R = _.layoutPage.resolveNode(L, { id: j.id }), z = D(_.layoutPage.fragment, R);
27
27
  if (R == null) return /* @__PURE__ */ m(f, { to: _.routes.list });
28
28
  let B = _.layoutPage.toView(z), V = A(I, j.id, _), H = a({
29
29
  mainPage: _.pages.mainPage,
@@ -86,7 +86,7 @@ var { useFragment: D, usePreloadedQuery: O } = _, k = (e) => e.trim().replace(/^
86
86
  meta: q
87
87
  }), J]
88
88
  }), X = null;
89
- return H.pages.length > 1 && (X = /* @__PURE__ */ m(C, {
89
+ return H.pages.length > 1 && (X = /* @__PURE__ */ m(w, {
90
90
  items: W,
91
91
  activeId: U.id,
92
92
  variant: "underline"
@@ -101,7 +101,7 @@ var { useFragment: D, usePreloadedQuery: O } = _, k = (e) => e.trim().replace(/^
101
101
  },
102
102
  children: /* @__PURE__ */ m(r, {
103
103
  breadcrumb: K,
104
- children: /* @__PURE__ */ m(w, {
104
+ children: /* @__PURE__ */ m(T, {
105
105
  headerNode: Y,
106
106
  tabsNode: X,
107
107
  headerDensity: "compact",
@@ -2,6 +2,8 @@ import { type JSX, type ReactNode } from 'react';
2
2
  export type BackofficeContentBoundaryProps = {
3
3
  children: ReactNode;
4
4
  };
5
+ type BackofficeContentBoundaryLocation = Pick<Location, 'pathname' | 'search'>;
6
+ export declare const buildBackofficeContentBoundaryKey: (location: BackofficeContentBoundaryLocation, children: ReactNode) => string;
5
7
  export declare const BackofficeContentBoundary: ({ children, }: BackofficeContentBoundaryProps) => JSX.Element;
6
8
  export default BackofficeContentBoundary;
7
9
  //# sourceMappingURL=BackofficeContentBoundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackofficeContentBoundary.d.ts","sourceRoot":"","sources":["../../../../../src/components/backoffice/routing/BackofficeContentBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ3D,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,eAEvC,8BAA8B,KAAG,GAAG,CAAC,OAYvC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"BackofficeContentBoundary.d.ts","sourceRoot":"","sources":["../../../../../src/components/backoffice/routing/BackofficeContentBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,GAAG,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAS3E,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,KAAK,iCAAiC,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC;AAkE/E,eAAO,MAAM,iCAAiC,GAC5C,UAAU,iCAAiC,EAC3C,UAAU,SAAS,KAClB,MAMF,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,eAEvC,8BAA8B,KAAG,GAAG,CAAC,OAmBvC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumile/backoffice-react",
3
- "version": "0.1.162",
3
+ "version": "0.1.164",
4
4
  "description": "React provider and pages for Kronex backoffice",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -179,11 +179,11 @@
179
179
  "tslib": "^2.8.1"
180
180
  },
181
181
  "devDependencies": {
182
- "@plumile/auth": "^0.1.162",
183
- "@plumile/backoffice-core": "^0.1.162",
184
- "@plumile/filter-query": "^0.1.162",
185
- "@plumile/router": "^0.1.162",
186
- "@plumile/ui": "^0.1.162",
182
+ "@plumile/auth": "^0.1.164",
183
+ "@plumile/backoffice-core": "^0.1.164",
184
+ "@plumile/filter-query": "^0.1.164",
185
+ "@plumile/router": "^0.1.164",
186
+ "@plumile/ui": "^0.1.164",
187
187
  "@types/react": "19.2.16",
188
188
  "@types/react-dom": "19.2.3",
189
189
  "@types/relay-runtime": "20.1.1",
@@ -196,11 +196,11 @@
196
196
  "typescript": "6.0.3"
197
197
  },
198
198
  "peerDependencies": {
199
- "@plumile/auth": "^0.1.161",
200
- "@plumile/backoffice-core": "^0.1.161",
201
- "@plumile/filter-query": "^0.1.161",
202
- "@plumile/router": "^0.1.161",
203
- "@plumile/ui": "^0.1.161",
199
+ "@plumile/auth": "^0.1.163",
200
+ "@plumile/backoffice-core": "^0.1.163",
201
+ "@plumile/filter-query": "^0.1.163",
202
+ "@plumile/router": "^0.1.163",
203
+ "@plumile/ui": "^0.1.163",
204
204
  "i18next": "^26.3.1",
205
205
  "react": "^19.2.7",
206
206
  "react-dom": "^19.2.7",