@plumile/backoffice-react 0.1.163 → 0.1.165
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/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js +2 -1
- package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js.map +1 -1
- package/lib/esm/components/backoffice/list/RowFlagsCell.css.js +0 -1
- package/lib/esm/components/backoffice/routing/BackofficeContentBoundary.js +47 -16
- package/lib/esm/components/backoffice/routing/BackofficeContentBoundary.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailLayoutPage.js +6 -6
- package/lib/esm/pages/BackofficeEntityListPage.helpers.js +8 -8
- package/lib/esm/pages/BackofficeEntityListPage.helpers.js.map +1 -1
- package/lib/types/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.d.ts.map +1 -1
- package/lib/types/components/backoffice/routing/BackofficeContentBoundary.d.ts +2 -0
- package/lib/types/components/backoffice/routing/BackofficeContentBoundary.d.ts.map +1 -1
- package/package.json +12 -12
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* empty css */
|
|
1
2
|
/* empty css */
|
|
2
3
|
/* empty css */
|
|
3
4
|
//#region src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts
|
|
4
|
-
var e = "
|
|
5
|
+
var e = "txvbqbfpn txvbqbey txvbqb19uf txvbqbv7x txvbqbu4k", t = "txvbqbfpn txvbqbey txvbqbhdl txvbqbo7v txvbqbwvi txvbqbo6s txvbqbh7g txvbqbv7x txvbqbu4k", n = "txvbqbfqq txvbqbey txvbqbhdl txvbqbv7x", r = "txvbqb1bg3 txvbqb9j txvbqbo5p", i = "_80s44h0 qbwcuej qbwcueh txvbqbfqq txvbqbey txvbqbls4 txvbqb1tv txvbqb2rt txvbqb2tz txvbqb1b4r txvbqb1bg3 txvbqbv txvbqbwvi txvbqb7h txvbqb76 txvbqb7t qbwcuei txvbqb1cta txvbqb1eom qbwcue4 txvbqb1f7o txvbqb1fe4 qbwcue0 txvbqb1ffs txvbqb1ga0 qbwcuex qbwcuer txvbqbh6d txvbqbo4m qbwcue11 qbwcuev txvbqb19h2 txvbqbjmh txvbqbvat txvbqbub2 txvbqb3f", a = "_80s44h1 _80s44h0 qbwcuej qbwcueh txvbqbfqq txvbqbey txvbqbls4 txvbqb1tv txvbqb2rt txvbqb2tz txvbqb1b4r txvbqb1bg3 txvbqbv txvbqbwvi txvbqb7h txvbqb76 txvbqb7t qbwcuei txvbqb1cta txvbqb1eom qbwcue4 txvbqb1f7o txvbqb1fe4 qbwcue0 txvbqb1ffs txvbqb1ga0 qbwcuex qbwcuer txvbqbh6d txvbqbo4m qbwcue11 qbwcuev txvbqb19h2 txvbqbjmh txvbqbvat txvbqbub2 txvbqb3f txvbqb1b83 txvbqb1bg1", o = "_4k5f060 txvbqb1tv txvbqb2rt txvbqb1j txvbqbk07 txvbqbonr txvbqbwr6 txvbqbwvi txvbqb13hu txvbqb18f5 txvbqblvq txvbqb19us", s = "_80s44h2 qbwcuep qbwcuen txvbqbfqq txvbqbey txvbqbhd8 txvbqb1bg1 txvbqb3f txvbqb7h txvbqb75 txvbqb7t qbwcueo txvbqb1gct qbwcue0 txvbqb1ffs txvbqb1ga0 txvbqb1bg3 txvbqb9j txvbqbo5p txvbqbv7x txvbqbu4k txvbqbws9", c = "txvbqb1bg1 txvbqb9j txvbqbo5p txvbqbhbf txvbqbv7x txvbqbu4k txvbqbws9";
|
|
5
6
|
//#endregion
|
|
6
7
|
export { c as current, a as homeCurrent, o as homeLabel, i as homeLink, n as item, s as link, t as list, e as nav, r as separator };
|
|
7
8
|
|
package/lib/esm/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backofficeTopbarBreadcrumb.css.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { sprinkles } from '@plumile/ui/theme/sprinkles.css.js';\nimport {\n entityReferenceLink,\n ghostIconButton,\n iconBox,\n} from '@plumile/ui/theme/styleRecipes.css.js';\nimport { visuallyHidden } from '@plumile/ui/theme/accessibility.css.js';\n\nconst INLINE_FLEX = 'inline-flex' as const;\n\nexport const nav = sprinkles({\n display:
|
|
1
|
+
{"version":3,"file":"backofficeTopbarBreadcrumb.css.js","names":[],"sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { sprinkles } from '@plumile/ui/theme/sprinkles.css.js';\nimport {\n entityReferenceLink,\n ghostIconButton,\n iconBox,\n} from '@plumile/ui/theme/styleRecipes.css.js';\nimport { visuallyHidden } from '@plumile/ui/theme/accessibility.css.js';\n\nconst INLINE_FLEX = 'inline-flex' as const;\n\nexport const nav = sprinkles({\n display: 'flex',\n alignItems: 'center',\n width: 'full',\n minWidth: 0,\n maxWidth: 'full',\n});\n\nexport const list = sprinkles({\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n margin: 0,\n padding: 0,\n listStyleType: 'none',\n flexWrap: 'wrap',\n minWidth: 0,\n maxWidth: 'full',\n});\n\nexport const item = sprinkles({\n display: INLINE_FLEX,\n alignItems: 'center',\n gap: 2,\n minWidth: 0,\n});\n\nexport const separator = sprinkles({\n color: 'textSecondary',\n fontSize: 'sm',\n lineHeight: 'normal',\n});\n\nconst homeBase = style([\n ghostIconButton,\n iconBox({ size: 'lg' }),\n sprinkles({\n textDecoration: 'none',\n }),\n]);\n\nexport const homeLink = homeBase;\n\nexport const homeCurrent = style([\n homeBase,\n sprinkles({\n backgroundColor: 'surfaceMuted',\n color: 'text',\n }),\n]);\n\nexport const homeLabel = visuallyHidden;\n\nexport const link = style([\n entityReferenceLink,\n sprinkles({\n color: 'textSecondary',\n fontSize: 'sm',\n lineHeight: 'normal',\n minWidth: 0,\n maxWidth: 'full',\n overflowWrap: 'anywhere',\n }),\n]);\n\nexport const current = sprinkles({\n color: 'text',\n fontSize: 'sm',\n lineHeight: 'normal',\n fontWeight: 'semibold',\n minWidth: 0,\n maxWidth: 'full',\n overflowWrap: 'anywhere',\n});\n"],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* empty css */
|
|
2
1
|
/* empty css */
|
|
3
2
|
//#region src/components/backoffice/list/RowFlagsCell.css.ts
|
|
4
3
|
var e = "txvbqb10m7 txvbqb11js txvbqb12h0 txvbqbxt3 txvbqbls4", t = "txvbqbfqq txvbqbey txvbqbls4 txvbqbi8n txvbqb19uf", n = "qbwcuex qbwcuer txvbqbfqq txvbqbey txvbqbls4 txvbqbh6d txvbqbo4m qbwcue11 qbwcuev txvbqb19h2 txvbqbjmh txvbqbvat txvbqbub2";
|
|
@@ -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
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 {
|
|
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":"
|
|
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
|
|
21
|
-
import {
|
|
22
|
-
import T from "@plumile/
|
|
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 } =
|
|
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(
|
|
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(
|
|
104
|
+
children: /* @__PURE__ */ m(T, {
|
|
105
105
|
headerNode: Y,
|
|
106
106
|
tabsNode: X,
|
|
107
107
|
headerDensity: "compact",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
//#region src/pages/BackofficeEntityListPage.helpers.tsx
|
|
2
2
|
var e = 24, t = 6, n = 4, r = 32, i = 8, a = {
|
|
3
|
-
xs: "minmax(
|
|
4
|
-
s: "minmax(
|
|
5
|
-
statusAction: "minmax(
|
|
6
|
-
m: "minmax(
|
|
7
|
-
l: "minmax(
|
|
8
|
-
xl: "minmax(
|
|
9
|
-
fluid: "minmax(
|
|
10
|
-
}, o = (r) => r <= 0 ? 0 : n * 2 + e * r + t * Math.max(0, r - 1), s = (e) => e <= 0 ? 0 : 28 + r * e + i * Math.max(0, e - 1), c = (e, t) => e.mobileRole === "action" ? "60px" : e.isPrimary === !0 ? "minmax(
|
|
3
|
+
xs: "minmax(3.5rem, 7rem)",
|
|
4
|
+
s: "minmax(5rem, 10rem)",
|
|
5
|
+
statusAction: "minmax(7rem, 12rem)",
|
|
6
|
+
m: "minmax(7rem, 14rem)",
|
|
7
|
+
l: "minmax(9rem, 18rem)",
|
|
8
|
+
xl: "minmax(11rem, 24rem)",
|
|
9
|
+
fluid: "minmax(0, 1fr)"
|
|
10
|
+
}, o = (r) => r <= 0 ? 0 : n * 2 + e * r + t * Math.max(0, r - 1), s = (e) => e <= 0 ? 0 : 28 + r * e + i * Math.max(0, e - 1), c = (e, t) => e.mobileRole === "action" ? "60px" : e.isPrimary === !0 ? "minmax(0, 1.4fr)" : "size" in e && typeof e.size == "string" ? a[e.size] : t, l = (e) => e.kind === "route", u = (e) => e.kind === "formMutation", d = (e, t) => e ?? (t === 0 ? "primary" : "secondary"), f = (e) => {
|
|
11
11
|
if (typeof e != "object" || !e || !("id" in e)) return null;
|
|
12
12
|
let t = e.id;
|
|
13
13
|
if (typeof t != "string") return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackofficeEntityListPage.helpers.js","names":[],"sources":["../../../src/pages/BackofficeEntityListPage.helpers.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'react';\n\nimport type {\n BackofficeEntityFormMutationActionSpec,\n BackofficeEntityRouteActionSpec,\n BackofficeListActionSpec,\n BackofficeRuntimeConnectionListConfig,\n BackofficeRuntimeResolvedListFacetConfig,\n I18nLabel,\n} from '@plumile/backoffice-core/types.js';\nimport type { Button } from '@plumile/ui/atomic/atoms/button/Button.js';\nimport type { DataTableColumn } from '@plumile/ui/components/data-table/DataTable.js';\nimport type { TFunction } from 'i18next';\n\nimport type { BackofficeSizedDataTableColumn } from '../components/backoffice/columns/buildDataTableColumns.js';\n\ntype ButtonVariant = ComponentProps<typeof Button>['variant'];\n\nconst ROW_FLAGS_SLOT_PX = 24;\nconst ROW_FLAGS_GAP_PX = 6;\nconst ROW_FLAGS_PADDING_X_PX = 4;\n\nconst ACTIONS_SLOT_PX = 32;\nconst ACTIONS_GAP_PX = 8;\nconst ACTIONS_PADDING_X_PX = 12;\nconst ACTIONS_SAFETY_PX = 4;\n\nconst listColumnTrackBySize: Record<\n BackofficeSizedDataTableColumn<unknown>['size'],\n string\n> = {\n xs: 'minmax(
|
|
1
|
+
{"version":3,"file":"BackofficeEntityListPage.helpers.js","names":[],"sources":["../../../src/pages/BackofficeEntityListPage.helpers.tsx"],"sourcesContent":["import type { ComponentProps, JSX } from 'react';\n\nimport type {\n BackofficeEntityFormMutationActionSpec,\n BackofficeEntityRouteActionSpec,\n BackofficeListActionSpec,\n BackofficeRuntimeConnectionListConfig,\n BackofficeRuntimeResolvedListFacetConfig,\n I18nLabel,\n} from '@plumile/backoffice-core/types.js';\nimport type { Button } from '@plumile/ui/atomic/atoms/button/Button.js';\nimport type { DataTableColumn } from '@plumile/ui/components/data-table/DataTable.js';\nimport type { TFunction } from 'i18next';\n\nimport type { BackofficeSizedDataTableColumn } from '../components/backoffice/columns/buildDataTableColumns.js';\n\ntype ButtonVariant = ComponentProps<typeof Button>['variant'];\n\nconst ROW_FLAGS_SLOT_PX = 24;\nconst ROW_FLAGS_GAP_PX = 6;\nconst ROW_FLAGS_PADDING_X_PX = 4;\n\nconst ACTIONS_SLOT_PX = 32;\nconst ACTIONS_GAP_PX = 8;\nconst ACTIONS_PADDING_X_PX = 12;\nconst ACTIONS_SAFETY_PX = 4;\n\nconst listColumnTrackBySize: Record<\n BackofficeSizedDataTableColumn<unknown>['size'],\n string\n> = {\n xs: 'minmax(3.5rem, 7rem)',\n s: 'minmax(5rem, 10rem)',\n statusAction: 'minmax(7rem, 12rem)',\n m: 'minmax(7rem, 14rem)',\n l: 'minmax(9rem, 18rem)',\n xl: 'minmax(11rem, 24rem)',\n fluid: 'minmax(0, 1fr)',\n};\n\nexport const computeRowFlagsColumnWidthPx = (flagCount: number): number => {\n if (flagCount <= 0) {\n return 0;\n }\n return (\n ROW_FLAGS_PADDING_X_PX * 2 +\n ROW_FLAGS_SLOT_PX * flagCount +\n ROW_FLAGS_GAP_PX * Math.max(0, flagCount - 1)\n );\n};\n\nexport const computeActionsColumnWidthPx = (actionCount: number): number => {\n if (actionCount <= 0) {\n return 0;\n }\n return (\n ACTIONS_SAFETY_PX +\n ACTIONS_PADDING_X_PX * 2 +\n ACTIONS_SLOT_PX * actionCount +\n ACTIONS_GAP_PX * Math.max(0, actionCount - 1)\n );\n};\n\nexport const resolveTrackBySize = (\n column: DataTableColumn<unknown>,\n fallback: string,\n): string => {\n if (column.mobileRole === 'action') {\n return '60px';\n }\n if (column.isPrimary === true) {\n return 'minmax(0, 1.4fr)';\n }\n if ('size' in column && typeof column.size === 'string') {\n return listColumnTrackBySize[\n column.size as BackofficeSizedDataTableColumn<unknown>['size']\n ];\n }\n return fallback;\n};\n\nexport const isRouteAction = (\n action: BackofficeListActionSpec,\n): action is BackofficeEntityRouteActionSpec<null> => {\n return action.kind === 'route';\n};\n\nexport const isFormMutationAction = (\n action: BackofficeListActionSpec,\n): action is BackofficeEntityFormMutationActionSpec<null> => {\n return action.kind === 'formMutation';\n};\n\nexport const resolveActionVariant = (\n actionVariant: ButtonVariant | undefined,\n index: number,\n): Exclude<ButtonVariant, undefined> => {\n if (actionVariant != null) {\n return actionVariant;\n }\n if (index === 0) {\n return 'primary';\n }\n return 'secondary';\n};\n\nexport const resolveRowId = (row: unknown): string | null => {\n if (row == null || typeof row !== 'object') {\n return null;\n }\n if (!('id' in row)) {\n return null;\n }\n const value = (row as { id?: unknown }).id;\n if (typeof value !== 'string') {\n return null;\n }\n const trimmed = value.trim();\n if (trimmed === '') {\n return null;\n }\n return trimmed;\n};\n\nexport type ConnectionListConfig = BackofficeRuntimeResolvedListFacetConfig & {\n list: BackofficeRuntimeConnectionListConfig;\n};\n\nexport const resolveLabel = (label: I18nLabel, tApp: TFunction): string => {\n return label(tApp);\n};\n\nexport const buildActionsColumn = (options: {\n ariaLabel: string;\n fallback: string;\n resolveDetailHref: (id: string) => string | null;\n className?: string;\n renderAction: (input: { href: string; ariaLabel: string }) => JSX.Element;\n}): DataTableColumn<unknown> => {\n const { ariaLabel, fallback, resolveDetailHref, className, renderAction } =\n options;\n\n return {\n id: 'actions',\n header: '',\n className,\n mobileRole: 'action',\n cell: (row) => {\n const id = resolveRowId(row);\n if (id == null) {\n return fallback;\n }\n const href = resolveDetailHref(id);\n if (href == null) {\n return fallback;\n }\n return renderAction({ href, ariaLabel });\n },\n };\n};\n"],"mappings":";AAkBA,IAAM,IAAoB,IACpB,IAAmB,GACnB,IAAyB,GAEzB,IAAkB,IAClB,IAAiB,GAIjB,IAGF;CACF,IAAI;CACJ,GAAG;CACH,cAAc;CACd,GAAG;CACH,GAAG;CACH,IAAI;CACJ,OAAO;AACT,GAEa,KAAgC,MACvC,KAAa,IACR,IAGP,IAAyB,IACzB,IAAoB,IACpB,IAAmB,KAAK,IAAI,GAAG,IAAY,CAAC,GAInC,KAA+B,MACtC,KAAe,IACV,IAGP,KAEA,IAAkB,IAClB,IAAiB,KAAK,IAAI,GAAG,IAAc,CAAC,GAInC,KACX,GACA,MAEI,EAAO,eAAe,WACjB,SAEL,EAAO,cAAc,KAChB,qBAEL,UAAU,KAAU,OAAO,EAAO,QAAS,WACtC,EACL,EAAO,QAGJ,GAGI,KACX,MAEO,EAAO,SAAS,SAGZ,KACX,MAEO,EAAO,SAAS,gBAGZ,KACX,GACA,MAEI,MAGA,MAAU,IACL,YAEF,cAGI,KAAgB,MAAgC;CAI3D,IAHmB,OAAO,KAAQ,aAA9B,KAGA,EAAE,QAAQ,IACZ,OAAO;CAET,IAAM,IAAS,EAAyB;CACxC,IAAI,OAAO,KAAU,UACnB,OAAO;CAET,IAAM,IAAU,EAAM,KAAK;CAI3B,OAHI,MAAY,KACP,OAEF;AACT,GAMa,KAAgB,GAAkB,MACtC,EAAM,CAAI,GAGN,KAAsB,MAMH;CAC9B,IAAM,EAAE,cAAW,aAAU,sBAAmB,cAAW,oBACzD;CAEF,OAAO;EACL,IAAI;EACJ,QAAQ;EACR;EACA,YAAY;EACZ,OAAO,MAAQ;GACb,IAAM,IAAK,EAAa,CAAG;GAC3B,IAAI,KAAM,MACR,OAAO;GAET,IAAM,IAAO,EAAkB,CAAE;GAIjC,OAHI,KAAQ,OACH,IAEF,EAAa;IAAE;IAAM;GAAU,CAAC;EACzC;CACF;AACF"}
|
package/lib/types/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backofficeTopbarBreadcrumb.css.d.ts","sourceRoot":"","sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"backofficeTopbarBreadcrumb.css.d.ts","sourceRoot":"","sources":["../../../../../../src/components/backoffice/layout/breadcrumb/backofficeTopbarBreadcrumb.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,GAAG,QAMd,CAAC;AAEH,eAAO,MAAM,IAAI,QAUf,CAAC;AAEH,eAAO,MAAM,IAAI,QAKf,CAAC;AAEH,eAAO,MAAM,SAAS,QAIpB,CAAC;AAUH,eAAO,MAAM,QAAQ,QAAW,CAAC;AAEjC,eAAO,MAAM,WAAW,QAMtB,CAAC;AAEH,eAAO,MAAM,SAAS,QAAiB,CAAC;AAExC,eAAO,MAAM,IAAI,QAUf,CAAC;AAEH,eAAO,MAAM,OAAO,QAQlB,CAAC"}
|
|
@@ -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,
|
|
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.
|
|
3
|
+
"version": "0.1.165",
|
|
4
4
|
"description": "React provider and pages for Kronex backoffice",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -179,12 +179,12 @@
|
|
|
179
179
|
"tslib": "^2.8.1"
|
|
180
180
|
},
|
|
181
181
|
"devDependencies": {
|
|
182
|
-
"@plumile/auth": "^0.1.
|
|
183
|
-
"@plumile/backoffice-core": "^0.1.
|
|
184
|
-
"@plumile/filter-query": "^0.1.
|
|
185
|
-
"@plumile/router": "^0.1.
|
|
186
|
-
"@plumile/ui": "^0.1.
|
|
187
|
-
"@types/react": "19.2.
|
|
182
|
+
"@plumile/auth": "^0.1.165",
|
|
183
|
+
"@plumile/backoffice-core": "^0.1.165",
|
|
184
|
+
"@plumile/filter-query": "^0.1.165",
|
|
185
|
+
"@plumile/router": "^0.1.165",
|
|
186
|
+
"@plumile/ui": "^0.1.165",
|
|
187
|
+
"@types/react": "19.2.17",
|
|
188
188
|
"@types/react-dom": "19.2.3",
|
|
189
189
|
"@types/relay-runtime": "20.1.1",
|
|
190
190
|
"i18next": "26.3.1",
|
|
@@ -196,11 +196,11 @@
|
|
|
196
196
|
"typescript": "6.0.3"
|
|
197
197
|
},
|
|
198
198
|
"peerDependencies": {
|
|
199
|
-
"@plumile/auth": "^0.1.
|
|
200
|
-
"@plumile/backoffice-core": "^0.1.
|
|
201
|
-
"@plumile/filter-query": "^0.1.
|
|
202
|
-
"@plumile/router": "^0.1.
|
|
203
|
-
"@plumile/ui": "^0.1.
|
|
199
|
+
"@plumile/auth": "^0.1.164",
|
|
200
|
+
"@plumile/backoffice-core": "^0.1.164",
|
|
201
|
+
"@plumile/filter-query": "^0.1.164",
|
|
202
|
+
"@plumile/router": "^0.1.164",
|
|
203
|
+
"@plumile/ui": "^0.1.164",
|
|
204
204
|
"i18next": "^26.3.1",
|
|
205
205
|
"react": "^19.2.7",
|
|
206
206
|
"react-dom": "^19.2.7",
|