@plumile/backoffice-react 0.1.116 → 0.1.120
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/billing/BackofficeBillingUsageChart.js +60 -0
- package/lib/esm/components/backoffice/billing/BackofficeBillingUsageChart.js.map +1 -0
- package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js +7 -0
- package/lib/esm/components/backoffice/billing/backofficeBillingUsageChart.css.js.map +1 -0
- package/lib/esm/components/backoffice/columns/buildDataTableColumns.js +6 -6
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js +167 -151
- package/lib/esm/components/backoffice/layout/buildSidebarSections.js.map +1 -1
- package/lib/esm/components/backoffice/layout/sidebarUtils.js +24 -21
- package/lib/esm/components/backoffice/layout/sidebarUtils.js.map +1 -1
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js +62 -54
- package/lib/esm/components/backoffice/links/resolveBackofficeLink.js.map +1 -1
- package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js +1 -1
- package/lib/esm/components/backoffice/links/resolveBackofficeTargetIcon.js.map +1 -1
- package/lib/esm/hooks/useBackofficeSidebarPins.js +44 -42
- package/lib/esm/hooks/useBackofficeSidebarPins.js.map +1 -1
- package/lib/esm/index.js +75 -74
- package/lib/esm/pages/BackofficeDashboardPage.helpers.js +1 -0
- package/lib/esm/pages/BackofficeDashboardPage.helpers.js.map +1 -1
- package/lib/esm/pages/BackofficeDashboardPage.js +181 -154
- package/lib/esm/pages/BackofficeDashboardPage.js.map +1 -1
- package/lib/esm/pages/BackofficeEntityDetailPage.js +12 -12
- package/lib/esm/pages/BackofficeLayoutPage.js +133 -129
- package/lib/esm/pages/BackofficeLayoutPage.js.map +1 -1
- package/lib/esm/provider/BackofficeConfigContext.js.map +1 -1
- package/lib/esm/provider/BackofficeProvider.js +126 -121
- package/lib/esm/provider/BackofficeProvider.js.map +1 -1
- package/lib/esm/provider/dashboardRegistrations.js +17 -0
- package/lib/esm/provider/dashboardRegistrations.js.map +1 -0
- package/lib/esm/router/createBackofficeRoutes.js +148 -131
- package/lib/esm/router/createBackofficeRoutes.js.map +1 -1
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.d.ts +25 -0
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.d.ts.map +1 -0
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.stories.d.ts +41 -0
- package/lib/types/components/backoffice/billing/BackofficeBillingUsageChart.stories.d.ts.map +1 -0
- package/lib/types/components/backoffice/billing/backofficeBillingUsageChart.css.d.ts +4 -0
- package/lib/types/components/backoffice/billing/backofficeBillingUsageChart.css.d.ts.map +1 -0
- package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts +2 -1
- package/lib/types/components/backoffice/layout/buildSidebarSections.d.ts.map +1 -1
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts +1 -0
- package/lib/types/components/backoffice/layout/sidebarUtils.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/resolveBackofficeLink.d.ts.map +1 -1
- package/lib/types/components/backoffice/links/types.d.ts +1 -0
- package/lib/types/components/backoffice/links/types.d.ts.map +1 -1
- package/lib/types/hooks/useBackofficeSidebarPins.d.ts +1 -0
- package/lib/types/hooks/useBackofficeSidebarPins.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts +5 -1
- package/lib/types/pages/BackofficeDashboardPage.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.helpers.d.ts.map +1 -1
- package/lib/types/pages/BackofficeDashboardPage.stories.d.ts +9 -0
- package/lib/types/pages/BackofficeDashboardPage.stories.d.ts.map +1 -0
- package/lib/types/pages/BackofficeLayoutPage.d.ts.map +1 -1
- package/lib/types/provider/BackofficeConfigContext.d.ts +2 -1
- package/lib/types/provider/BackofficeConfigContext.d.ts.map +1 -1
- package/lib/types/provider/BackofficeProvider.d.ts.map +1 -1
- package/lib/types/provider/dashboardRegistrations.d.ts +4 -0
- package/lib/types/provider/dashboardRegistrations.d.ts.map +1 -0
- package/lib/types/provider/types.d.ts +8 -1
- package/lib/types/provider/types.d.ts.map +1 -1
- package/lib/types/router/createBackofficeRoutes.d.ts +8 -2
- package/lib/types/router/createBackofficeRoutes.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -15,15 +15,21 @@ var i = "backoffice.sidebar.pins.v1", a = (e) => {
|
|
|
15
15
|
return e.forEach((e) => {
|
|
16
16
|
t.has(e) && (r.has(e) || (r.add(e), n.push(e)));
|
|
17
17
|
}), n;
|
|
18
|
-
}, s = (
|
|
19
|
-
|
|
18
|
+
}, s = (e, t, n) => {
|
|
19
|
+
if (t === n) return e;
|
|
20
|
+
let r = e.indexOf(t), i = e.indexOf(n);
|
|
21
|
+
if (r === -1 || i === -1 || r === i) return e;
|
|
22
|
+
let a = [...e];
|
|
23
|
+
return a.splice(r, 1), a.splice(i, 0, t), a;
|
|
24
|
+
}, c = (c) => {
|
|
25
|
+
let { enabled: l = !0, storageKey: u = i, visibleEntityIds: d } = c, f = n(() => new Set(d), [d]), [p, m] = r(() => l ? o(a(u), f) : []);
|
|
20
26
|
t(() => {
|
|
21
|
-
if (!
|
|
22
|
-
|
|
27
|
+
if (!l) {
|
|
28
|
+
m([]);
|
|
23
29
|
return;
|
|
24
30
|
}
|
|
25
|
-
|
|
26
|
-
let t = o(e,
|
|
31
|
+
m((e) => {
|
|
32
|
+
let t = o(e, f);
|
|
27
33
|
if (t.length === e.length) {
|
|
28
34
|
let n = !0;
|
|
29
35
|
for (let r = 0; r < t.length; r += 1) if (t[r] !== e[r]) {
|
|
@@ -34,56 +40,52 @@ var i = "backoffice.sidebar.pins.v1", a = (e) => {
|
|
|
34
40
|
}
|
|
35
41
|
return t;
|
|
36
42
|
});
|
|
37
|
-
}, [
|
|
38
|
-
if (!
|
|
39
|
-
|
|
43
|
+
}, [l, f]), t(() => {
|
|
44
|
+
if (!l) {
|
|
45
|
+
m([]);
|
|
40
46
|
return;
|
|
41
47
|
}
|
|
42
|
-
|
|
48
|
+
m(o(a(u), f));
|
|
43
49
|
}, [
|
|
44
|
-
c,
|
|
45
50
|
l,
|
|
46
|
-
|
|
51
|
+
u,
|
|
52
|
+
f
|
|
47
53
|
]), t(() => {
|
|
48
|
-
if (!(!
|
|
49
|
-
window.localStorage.setItem(
|
|
54
|
+
if (!(!l || typeof window > "u")) try {
|
|
55
|
+
window.localStorage.setItem(u, JSON.stringify(p));
|
|
50
56
|
} catch {}
|
|
51
57
|
}, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
l,
|
|
59
|
+
p,
|
|
60
|
+
u
|
|
55
61
|
]);
|
|
56
|
-
let
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
+
let h = n(() => new Set(p), [p]), g = e((e) => {
|
|
63
|
+
l && f.has(e) && m((t) => t.includes(e) ? t : [...t, e]);
|
|
64
|
+
}, [l, f]), _ = e((e) => {
|
|
65
|
+
l && m((t) => t.filter((t) => t !== e));
|
|
66
|
+
}, [l]), v = e((e) => {
|
|
67
|
+
h.has(e) ? _(e) : g(e);
|
|
62
68
|
}, [
|
|
69
|
+
g,
|
|
63
70
|
h,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
let r = n.indexOf(e), i = n.indexOf(t);
|
|
69
|
-
if (r === -1 || i === -1 || r === i) return n;
|
|
70
|
-
let a = [...n];
|
|
71
|
-
return a.splice(r, 1), a.splice(i, 0, e), a;
|
|
72
|
-
});
|
|
73
|
-
}, [c]);
|
|
71
|
+
_
|
|
72
|
+
]), y = e((e, t) => {
|
|
73
|
+
l && m((n) => s(n, e, t));
|
|
74
|
+
}, [l]);
|
|
74
75
|
return {
|
|
75
|
-
pins:
|
|
76
|
-
isPinned: e((e) =>
|
|
77
|
-
pin:
|
|
78
|
-
unpin:
|
|
79
|
-
toggle:
|
|
80
|
-
reorder:
|
|
76
|
+
pins: p,
|
|
77
|
+
isPinned: e((e) => h.has(e), [h]),
|
|
78
|
+
pin: g,
|
|
79
|
+
unpin: _,
|
|
80
|
+
toggle: v,
|
|
81
|
+
reorder: y
|
|
81
82
|
};
|
|
82
|
-
},
|
|
83
|
+
}, l = {
|
|
83
84
|
normalizePins: o,
|
|
84
|
-
readPinsFromStorage: a
|
|
85
|
+
readPinsFromStorage: a,
|
|
86
|
+
reorderPins: s
|
|
85
87
|
};
|
|
86
88
|
//#endregion
|
|
87
|
-
export {
|
|
89
|
+
export { l as __test, c as default, c as useBackofficeSidebarPins };
|
|
88
90
|
|
|
89
91
|
//# sourceMappingURL=useBackofficeSidebarPins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBackofficeSidebarPins.js","names":[],"sources":["../../../src/hooks/useBackofficeSidebarPins.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from 'react';\n\nconst DEFAULT_STORAGE_KEY = 'backoffice.sidebar.pins.v1';\n\ntype PinsPayload = unknown;\n\nconst readPinsFromStorage = (storageKey: string): string[] => {\n if (typeof window === 'undefined') {\n return [];\n }\n try {\n const raw = window.localStorage.getItem(storageKey);\n if (raw == null) {\n return [];\n }\n const parsed = JSON.parse(raw) as PinsPayload;\n if (!Array.isArray(parsed)) {\n return [];\n }\n return parsed.filter((entry): entry is string => {\n return typeof entry === 'string';\n });\n } catch {\n return [];\n }\n};\n\nconst normalizePins = (\n pins: readonly string[],\n validIds: Set<string>,\n): string[] => {\n const output: string[] = [];\n const seen = new Set<string>();\n pins.forEach((entry) => {\n if (!validIds.has(entry)) {\n return;\n }\n if (seen.has(entry)) {\n return;\n }\n seen.add(entry);\n output.push(entry);\n });\n return output;\n};\n\nexport type SidebarPinsState = {\n pins: readonly string[];\n isPinned: (id: string) => boolean;\n pin: (id: string) => void;\n unpin: (id: string) => void;\n toggle: (id: string) => void;\n reorder: (fromId: string, toId: string) => void;\n};\n\nexport type UseBackofficeSidebarPinsInput = {\n enabled?: boolean;\n storageKey?: string;\n visibleEntityIds: readonly string[];\n};\n\nexport const useBackofficeSidebarPins = (\n input: UseBackofficeSidebarPinsInput,\n): SidebarPinsState => {\n const {\n enabled = true,\n storageKey = DEFAULT_STORAGE_KEY,\n visibleEntityIds,\n } = input;\n const validIds = useMemo(() => {\n return new Set(visibleEntityIds);\n }, [visibleEntityIds]);\n\n const [pins, setPins] = useState<string[]>(() => {\n if (!enabled) {\n return [];\n }\n const stored = readPinsFromStorage(storageKey);\n return normalizePins(stored, validIds);\n });\n\n useEffect(() => {\n if (!enabled) {\n setPins([]);\n return;\n }\n setPins((prev) => {\n const normalized = normalizePins(prev, validIds);\n if (normalized.length === prev.length) {\n let unchanged = true;\n for (let index = 0; index < normalized.length; index += 1) {\n if (normalized[index] !== prev[index]) {\n unchanged = false;\n break;\n }\n }\n if (unchanged) {\n return prev;\n }\n }\n return normalized;\n });\n }, [enabled, validIds]);\n\n useEffect(() => {\n if (!enabled) {\n setPins([]);\n return;\n }\n const stored = readPinsFromStorage(storageKey);\n setPins(normalizePins(stored, validIds));\n }, [enabled, storageKey, validIds]);\n\n useEffect(() => {\n if (!enabled || typeof window === 'undefined') {\n return;\n }\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(pins));\n } catch {\n // Ignore storage errors in non-browser or restricted environments.\n }\n }, [enabled, pins, storageKey]);\n\n const pinsSet = useMemo(() => {\n return new Set(pins);\n }, [pins]);\n\n const pin = useCallback(\n (id: string) => {\n if (!enabled) {\n return;\n }\n if (!validIds.has(id)) {\n return;\n }\n setPins((prev) => {\n if (prev.includes(id)) {\n return prev;\n }\n return [...prev, id];\n });\n },\n [enabled, validIds],\n );\n\n const unpin = useCallback(\n (id: string) => {\n if (!enabled) {\n return;\n }\n setPins((prev) => {\n return prev.filter((entry) => {\n return entry !== id;\n });\n });\n },\n [enabled],\n );\n\n const toggle = useCallback(\n (id: string) => {\n if (pinsSet.has(id)) {\n unpin(id);\n } else {\n pin(id);\n }\n },\n [pin, pinsSet, unpin],\n );\n\n const reorder = useCallback(\n (fromId: string, toId: string) => {\n if (!enabled) {\n return;\n }\n
|
|
1
|
+
{"version":3,"file":"useBackofficeSidebarPins.js","names":[],"sources":["../../../src/hooks/useBackofficeSidebarPins.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState } from 'react';\n\nconst DEFAULT_STORAGE_KEY = 'backoffice.sidebar.pins.v1';\n\ntype PinsPayload = unknown;\n\nconst readPinsFromStorage = (storageKey: string): string[] => {\n if (typeof window === 'undefined') {\n return [];\n }\n try {\n const raw = window.localStorage.getItem(storageKey);\n if (raw == null) {\n return [];\n }\n const parsed = JSON.parse(raw) as PinsPayload;\n if (!Array.isArray(parsed)) {\n return [];\n }\n return parsed.filter((entry): entry is string => {\n return typeof entry === 'string';\n });\n } catch {\n return [];\n }\n};\n\nconst normalizePins = (\n pins: readonly string[],\n validIds: Set<string>,\n): string[] => {\n const output: string[] = [];\n const seen = new Set<string>();\n pins.forEach((entry) => {\n if (!validIds.has(entry)) {\n return;\n }\n if (seen.has(entry)) {\n return;\n }\n seen.add(entry);\n output.push(entry);\n });\n return output;\n};\n\nconst reorderPins = (\n pins: readonly string[],\n fromId: string,\n toId: string,\n): readonly string[] => {\n if (fromId === toId) {\n return pins;\n }\n const fromIndex = pins.indexOf(fromId);\n const toIndex = pins.indexOf(toId);\n if (fromIndex === -1 || toIndex === -1 || fromIndex === toIndex) {\n return pins;\n }\n const next = [...pins];\n next.splice(fromIndex, 1);\n next.splice(toIndex, 0, fromId);\n return next;\n};\n\nexport type SidebarPinsState = {\n pins: readonly string[];\n isPinned: (id: string) => boolean;\n pin: (id: string) => void;\n unpin: (id: string) => void;\n toggle: (id: string) => void;\n reorder: (fromId: string, toId: string) => void;\n};\n\nexport type UseBackofficeSidebarPinsInput = {\n enabled?: boolean;\n storageKey?: string;\n visibleEntityIds: readonly string[];\n};\n\nexport const useBackofficeSidebarPins = (\n input: UseBackofficeSidebarPinsInput,\n): SidebarPinsState => {\n const {\n enabled = true,\n storageKey = DEFAULT_STORAGE_KEY,\n visibleEntityIds,\n } = input;\n const validIds = useMemo(() => {\n return new Set(visibleEntityIds);\n }, [visibleEntityIds]);\n\n const [pins, setPins] = useState<string[]>(() => {\n if (!enabled) {\n return [];\n }\n const stored = readPinsFromStorage(storageKey);\n return normalizePins(stored, validIds);\n });\n\n useEffect(() => {\n if (!enabled) {\n setPins([]);\n return;\n }\n setPins((prev) => {\n const normalized = normalizePins(prev, validIds);\n if (normalized.length === prev.length) {\n let unchanged = true;\n for (let index = 0; index < normalized.length; index += 1) {\n if (normalized[index] !== prev[index]) {\n unchanged = false;\n break;\n }\n }\n if (unchanged) {\n return prev;\n }\n }\n return normalized;\n });\n }, [enabled, validIds]);\n\n useEffect(() => {\n if (!enabled) {\n setPins([]);\n return;\n }\n const stored = readPinsFromStorage(storageKey);\n setPins(normalizePins(stored, validIds));\n }, [enabled, storageKey, validIds]);\n\n useEffect(() => {\n if (!enabled || typeof window === 'undefined') {\n return;\n }\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(pins));\n } catch {\n // Ignore storage errors in non-browser or restricted environments.\n }\n }, [enabled, pins, storageKey]);\n\n const pinsSet = useMemo(() => {\n return new Set(pins);\n }, [pins]);\n\n const pin = useCallback(\n (id: string) => {\n if (!enabled) {\n return;\n }\n if (!validIds.has(id)) {\n return;\n }\n setPins((prev) => {\n if (prev.includes(id)) {\n return prev;\n }\n return [...prev, id];\n });\n },\n [enabled, validIds],\n );\n\n const unpin = useCallback(\n (id: string) => {\n if (!enabled) {\n return;\n }\n setPins((prev) => {\n return prev.filter((entry) => {\n return entry !== id;\n });\n });\n },\n [enabled],\n );\n\n const toggle = useCallback(\n (id: string) => {\n if (pinsSet.has(id)) {\n unpin(id);\n } else {\n pin(id);\n }\n },\n [pin, pinsSet, unpin],\n );\n\n const reorder = useCallback(\n (fromId: string, toId: string) => {\n if (!enabled) {\n return;\n }\n setPins((prev) => {\n return reorderPins(prev, fromId, toId) as string[];\n });\n },\n [enabled],\n );\n\n const isPinned = useCallback(\n (id: string) => {\n return pinsSet.has(id);\n },\n [pinsSet],\n );\n\n return {\n pins,\n isPinned,\n pin,\n unpin,\n toggle,\n reorder,\n };\n};\n\nexport const __test = {\n normalizePins,\n readPinsFromStorage,\n reorderPins,\n};\n\nexport default useBackofficeSidebarPins;\n"],"mappings":"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"}
|
package/lib/esm/index.js
CHANGED
|
@@ -11,78 +11,79 @@ import { useBackofficeConfig as f } from "./provider/BackofficeConfigContext.js"
|
|
|
11
11
|
import { EntityIdFilterField as p } from "./components/backoffice/filters/EntityIdFilterField.js";
|
|
12
12
|
import { BackofficeErrorBoundary as m } from "./components/backoffice/errors/BackofficeErrorBoundary.js";
|
|
13
13
|
import { EntityIdPickerDialog as h } from "./components/backoffice/pickers/EntityIdPickerDialog.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
14
|
+
import { BackofficeBillingUsageChart as g } from "./components/backoffice/billing/BackofficeBillingUsageChart.js";
|
|
15
|
+
import { resolveBackofficeTargetIcon as _ } from "./components/backoffice/links/resolveBackofficeTargetIcon.js";
|
|
16
|
+
import { resolveBackofficeLink as v } from "./components/backoffice/links/resolveBackofficeLink.js";
|
|
17
|
+
import { useBackofficeLink as y } from "./components/backoffice/links/useBackofficeLink.js";
|
|
18
|
+
import { BackofficeInlineLink as b } from "./components/backoffice/links/BackofficeInlineLink.js";
|
|
19
|
+
import { buildDataTableColumns as x } from "./components/backoffice/columns/buildDataTableColumns.js";
|
|
20
|
+
import { BackofficeDetailField as S } from "./components/backoffice/detail/BackofficeDetailField.js";
|
|
21
|
+
import { BackofficeDetailSection as C } from "./components/backoffice/detail/BackofficeDetailSection.js";
|
|
22
|
+
import { BackofficeReferenceValue as w } from "./components/backoffice/detail/BackofficeReferenceValue.js";
|
|
23
|
+
import { BackofficeAuditMetadataPanel as T } from "./components/backoffice/detail/BackofficeAuditMetadataPanel.js";
|
|
24
|
+
import { BackofficeCopyButton as E } from "./components/backoffice/detail/BackofficeCopyButton.js";
|
|
25
|
+
import { BackofficeDetailActionBar as D } from "./components/backoffice/detail/BackofficeDetailActionBar.js";
|
|
26
|
+
import { BackofficeDetailBadgeRow as O } from "./components/backoffice/detail/BackofficeDetailBadgeRow.js";
|
|
27
|
+
import { BackofficeDetailBlock as k } from "./components/backoffice/detail/BackofficeDetailBlock.js";
|
|
28
|
+
import { formatJsonPayload as A, formatListAsMarkdown as j } from "./components/backoffice/detail/detailPayloadUtils.js";
|
|
29
|
+
import { BackofficeDetailHeader as M } from "./components/backoffice/detail/BackofficeDetailHeader.js";
|
|
30
|
+
import { BackofficeDetailPage as N } from "./components/backoffice/detail/BackofficeDetailPage.js";
|
|
31
|
+
import { BackofficeDetailPayload as P } from "./components/backoffice/detail/BackofficeDetailPayload.js";
|
|
32
|
+
import { EntityFilterValue as F, EntityFilterValueText as I } from "./components/backoffice/filters/EntityFilterValue.js";
|
|
33
|
+
import { BackofficeListToolbar as L } from "./components/backoffice/lists/BackofficeListToolbar.js";
|
|
34
|
+
import { BackofficeDetailTable as R } from "./components/backoffice/detail/BackofficeDetailTable.js";
|
|
35
|
+
import { BackofficeEmptyValue as z } from "./components/backoffice/detail/BackofficeEmptyValue.js";
|
|
36
|
+
import { BackofficeFilterAction as B } from "./components/backoffice/filters/BackofficeFilterAction.js";
|
|
37
|
+
import { BackofficeFilterableCell as V } from "./components/backoffice/shared/BackofficeFilterableCell.js";
|
|
38
|
+
import { BackofficeEntityLink as H } from "./components/backoffice/refs/BackofficeEntityLink.js";
|
|
39
|
+
import { BackofficeEntityRefLink as U } from "./components/backoffice/detail/BackofficeEntityRefLink.js";
|
|
40
|
+
import { BackofficeStatusMetaBadge as W } from "./components/backoffice/detail/BackofficeStatusMetaBadge.js";
|
|
41
|
+
import { BackofficeEntitySummaryHeader as G } from "./components/backoffice/detail/BackofficeEntitySummaryHeader.js";
|
|
42
|
+
import { BackofficeEnumLabel as K } from "./components/backoffice/detail/BackofficeEnumLabel.js";
|
|
43
|
+
import { BackofficeKpiStrip as q } from "./components/backoffice/detail/BackofficeKpiStrip.js";
|
|
44
|
+
import { BackofficeLifecycleTimelineSection as J } from "./components/backoffice/detail/BackofficeLifecycleTimelineSection.js";
|
|
45
|
+
import { BackofficePayloadInspectorSection as Y } from "./components/backoffice/detail/BackofficePayloadInspectorSection.js";
|
|
46
|
+
import { BackofficeRelationsSummaryGrid as X } from "./components/backoffice/detail/BackofficeRelationsSummaryGrid.js";
|
|
47
|
+
import { BackofficeScopeStack as Z } from "./components/backoffice/detail/BackofficeScopeStack.js";
|
|
48
|
+
import { BackofficeStatusGroup as Q } from "./components/backoffice/detail/BackofficeStatusGroup.js";
|
|
48
49
|
import "./components/backoffice/detail/BackofficeTechnicalFacts.js";
|
|
49
|
-
import { BackofficeTokenUsageBreakdown as
|
|
50
|
-
import { BackofficeUsageCostBreakdown as
|
|
51
|
-
import { createBackofficeEntityLinkProps as
|
|
52
|
-
import { BackofficeHubTemplate as
|
|
53
|
-
import { BackofficeLink as
|
|
54
|
-
import { BackofficeLinkLabel as
|
|
55
|
-
import { BackofficeRightPageLayout as
|
|
56
|
-
import { BackofficeOverviewLayout as
|
|
57
|
-
import { BackofficeRelatedCountLink as
|
|
58
|
-
import { BackofficeTabbedDetailShell as
|
|
59
|
-
import { BackofficeFormattedCurrency as
|
|
60
|
-
import { BackofficeFormattedNumber as
|
|
61
|
-
import { BackofficeInlineFilterRow as
|
|
62
|
-
import { BackofficeToolsDocPanel as
|
|
63
|
-
import { BackofficeToolsErrorFallback as
|
|
64
|
-
import { BackofficeToolsJsonForm as
|
|
65
|
-
import { BackofficeToolsQueryBoundary as
|
|
66
|
-
import { parseToolJson as
|
|
67
|
-
import { configureRelayEnvironment as
|
|
68
|
-
import { base64UrlToBuffer as
|
|
69
|
-
import { createUseAuth as
|
|
70
|
-
import { useBackofficeListUrlState as
|
|
71
|
-
import { useConditionalSubscription as
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import { useRefetchNeededReload as
|
|
75
|
-
import { createI18nInstance as
|
|
76
|
-
import { backofficeReactI18nResources as
|
|
77
|
-
import { useReviewStatusLabel as
|
|
78
|
-
import { RelayProvider as
|
|
79
|
-
import { BackofficeProvider as
|
|
80
|
-
import { createBackofficeLazyValue as
|
|
81
|
-
import { decodeBase64ToUtf8 as
|
|
82
|
-
import { formatFileSize as
|
|
83
|
-
import { resolveVisibleDetailPages as
|
|
84
|
-
import { createInlineDataReader as
|
|
85
|
-
import { appendNodeToConnections as
|
|
86
|
-
import { identityView as
|
|
87
|
-
import { useCursorResumableSubscription as
|
|
88
|
-
export { i as AcceptInvitationScreen, ee as AuthRefreshNotice,
|
|
50
|
+
import { BackofficeTokenUsageBreakdown as ne } from "./components/backoffice/detail/BackofficeTokenUsageBreakdown.js";
|
|
51
|
+
import { BackofficeUsageCostBreakdown as re } from "./components/backoffice/detail/BackofficeUsageCostBreakdown.js";
|
|
52
|
+
import { createBackofficeEntityLinkProps as ie } from "./components/backoffice/detail/createBackofficeEntityLinkProps.js";
|
|
53
|
+
import { BackofficeHubTemplate as ae } from "./components/backoffice/hub/BackofficeHubTemplate.js";
|
|
54
|
+
import { BackofficeLink as $ } from "./components/backoffice/links/BackofficeLink.js";
|
|
55
|
+
import { BackofficeLinkLabel as oe } from "./components/backoffice/links/BackofficeLinkLabel.js";
|
|
56
|
+
import { BackofficeRightPageLayout as se } from "./components/backoffice/layout/breadcrumb/BackofficeRightPageLayout.js";
|
|
57
|
+
import { BackofficeOverviewLayout as ce } from "./components/backoffice/overview/BackofficeOverviewLayout.js";
|
|
58
|
+
import { BackofficeRelatedCountLink as le } from "./components/backoffice/refs/BackofficeRelatedCountLink.js";
|
|
59
|
+
import { BackofficeTabbedDetailShell as ue } from "./components/backoffice/scaffolds/BackofficeTabbedDetailShell.js";
|
|
60
|
+
import { BackofficeFormattedCurrency as de } from "./components/backoffice/shared/BackofficeFormattedCurrency.js";
|
|
61
|
+
import { BackofficeFormattedNumber as fe } from "./components/backoffice/shared/BackofficeFormattedNumber.js";
|
|
62
|
+
import { BackofficeInlineFilterRow as pe } from "./components/backoffice/shared/BackofficeInlineFilterRow.js";
|
|
63
|
+
import { BackofficeToolsDocPanel as me } from "./components/backoffice/tools/BackofficeToolsDocPanel.js";
|
|
64
|
+
import { BackofficeToolsErrorFallback as he } from "./components/backoffice/tools/BackofficeToolsErrorFallback.js";
|
|
65
|
+
import { BackofficeToolsJsonForm as ge } from "./components/backoffice/tools/BackofficeToolsJsonForm.js";
|
|
66
|
+
import { BackofficeToolsQueryBoundary as _e } from "./components/backoffice/tools/BackofficeToolsQueryBoundary.js";
|
|
67
|
+
import { parseToolJson as ve } from "./components/backoffice/tools/parseToolJson.js";
|
|
68
|
+
import { configureRelayEnvironment as ye, getEnvironment as be, getNetwork as xe, getRelayTransportSnapshot as Se, reconnectRelayWebSocket as Ce, resetRelayStore as we, subscribeRelayTransport as Te } from "./relay/environment.js";
|
|
69
|
+
import { base64UrlToBuffer as Ee, bufferToBase64Url as De, mapWebAuthnRegistrationError as Oe, parseSignCount as ke } from "./modules/webauthn.js";
|
|
70
|
+
import { createUseAuth as Ae } from "./hooks/useAuth.js";
|
|
71
|
+
import { useBackofficeListUrlState as je } from "./hooks/useBackofficeListUrlState.js";
|
|
72
|
+
import { useConditionalSubscription as Me } from "./hooks/useConditionalSubscription.js";
|
|
73
|
+
import Ne from "./hooks/useCopyToClipboard.js";
|
|
74
|
+
import Pe from "./hooks/useInfiniteConnection.js";
|
|
75
|
+
import { useRefetchNeededReload as Fe } from "./hooks/useRefetchNeededReload.js";
|
|
76
|
+
import { createI18nInstance as Ie } from "./i18n/createI18nInstance.js";
|
|
77
|
+
import { backofficeReactI18nResources as Le, withBackofficeReactI18nResources as Re } from "./i18n/resources.js";
|
|
78
|
+
import { useReviewStatusLabel as ze } from "./i18n/useReviewStatusLabel.js";
|
|
79
|
+
import { RelayProvider as Be } from "./relay/RelayProvider.js";
|
|
80
|
+
import { BackofficeProvider as Ve } from "./provider/BackofficeProvider.js";
|
|
81
|
+
import { createBackofficeLazyValue as He } from "./provider/lazyValue.js";
|
|
82
|
+
import { decodeBase64ToUtf8 as Ue, encodeUtf8ToBase64 as We } from "./modules/base64.js";
|
|
83
|
+
import { formatFileSize as Ge } from "./modules/formatFileSize.js";
|
|
84
|
+
import { resolveVisibleDetailPages as Ke } from "./pages/detail/pageResolution.js";
|
|
85
|
+
import { createInlineDataReader as qe } from "./relay/createInlineReader.js";
|
|
86
|
+
import { appendNodeToConnections as Je } from "./relay/connectionUtils.js";
|
|
87
|
+
import { identityView as Ye } from "./relay/identityView.js";
|
|
88
|
+
import { useCursorResumableSubscription as Xe } from "./subscriptions/useCursorResumableSubscription.js";
|
|
89
|
+
export { i as AcceptInvitationScreen, ee as AuthRefreshNotice, T as BackofficeAuditMetadataPanel, T as BackofficeAuditTrail, g as BackofficeBillingUsageChart, Z as BackofficeContextPanel, E as BackofficeCopyButton, D as BackofficeDetailActionBar, O as BackofficeDetailBadgeRow, k as BackofficeDetailBlock, S as BackofficeDetailField, M as BackofficeDetailHeader, N as BackofficeDetailPage, P as BackofficeDetailPayload, C as BackofficeDetailSection, R as BackofficeDetailTable, z as BackofficeEmptyValue, H as BackofficeEntityLink, U as BackofficeEntityRefLink, G as BackofficeEntitySummaryHeader, K as BackofficeEnumLabel, m as BackofficeErrorBoundary, C as BackofficeFieldSet, B as BackofficeFilterAction, V as BackofficeFilterableCell, de as BackofficeFormattedCurrency, fe as BackofficeFormattedNumber, ae as BackofficeHubTemplate, pe as BackofficeInlineFilterRow, b as BackofficeInlineLink, q as BackofficeKpiStrip, J as BackofficeLifecycleTimelineSection, $ as BackofficeLink, oe as BackofficeLinkLabel, L as BackofficeListToolbar, q as BackofficeMetricGrid, ce as BackofficeOverviewLayout, Y as BackofficePayloadInspectorSection, P as BackofficePayloadViewer, Ve as BackofficeProvider, w as BackofficeReferenceValue, le as BackofficeRelatedCountLink, X as BackofficeRelationGrid, X as BackofficeRelationsSummaryGrid, se as BackofficeRightPageLayout, Z as BackofficeScopeStack, Q as BackofficeStatusGroup, W as BackofficeStatusMetaBadge, ue as BackofficeTabbedDetailShell, C as BackofficeTechnicalFacts, J as BackofficeTimeline, ne as BackofficeTokenUsageBreakdown, me as BackofficeToolsDocPanel, he as BackofficeToolsErrorFallback, ge as BackofficeToolsJsonForm, _e as BackofficeToolsQueryBoundary, re as BackofficeUsageCostBreakdown, F as EntityFilterValue, I as EntityFilterValueText, p as EntityIdFilterField, h as EntityIdPickerDialog, n as LoginFlow, a as PasswordResetCompleteScreen, o as PasswordResetRequestScreen, Be as RelayProvider, e as TotpQrCode, s as VerifyEmailScreen, Je as appendNodeToConnections, Le as backofficeReactI18nResources, Ee as base64UrlToBuffer, De as bufferToBase64Url, x as buildDataTableColumns, t as buildTotpOtpAuthUri, ye as configureRelayEnvironment, ie as createBackofficeEntityLinkProps, He as createBackofficeLazyValue, Ie as createI18nInstance, qe as createInlineDataReader, Ae as createUseAuth, Ue as decodeBase64ToUtf8, We as encodeUtf8ToBase64, Ge as formatFileSize, A as formatJsonPayload, j as formatListAsMarkdown, be as getEnvironment, xe as getNetwork, Se as getRelayTransportSnapshot, Ye as identityView, Oe as mapWebAuthnRegistrationError, ke as parseSignCount, ve as parseToolJson, Ce as reconnectRelayWebSocket, c as requireField, l as requireLinkedRecordId, we as resetRelayStore, u as resolveAgentStartOutcome, v as resolveBackofficeLink, _ as resolveBackofficeTargetIcon, d as resolveMutationOutcome, Ke as resolveVisibleDetailPages, Te as subscribeRelayTransport, r as synchronizeAuthStatusQuery, te as useAuthRefreshStateSnapshot, f as useBackofficeConfig, y as useBackofficeLink, je as useBackofficeListUrlState, Me as useConditionalSubscription, Ne as useCopyToClipboard, Xe as useCursorResumableSubscription, Pe as useInfiniteConnection, Fe as useRefetchNeededReload, ze as useReviewStatusLabel, Re as withBackofficeReactI18nResources };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackofficeDashboardPage.helpers.js","names":[],"sources":["../../../src/pages/BackofficeDashboardPage.helpers.ts"],"sourcesContent":["import type {\n BackofficeDashboardConfig,\n BackofficeDashboardWidget,\n I18nLabel,\n} from '@plumile/backoffice-core/types.js';\nimport type { TFunction } from 'i18next';\nimport type { GraphQLTaggedNode } from 'relay-runtime';\n\nexport const resolveLabel = (label: I18nLabel, tApp: TFunction): string => {\n return label(tApp);\n};\n\nexport const getWidgetLabel = (\n widget: BackofficeDashboardWidget,\n config: BackofficeDashboardConfig,\n): I18nLabel => {\n switch (widget.kind) {\n case 'entityCount':\n case 'shortcut':\n return widget.label;\n case 'tablePreview':\n case 'textBlock':\n return widget.title;\n case 'recentItems':\n case 'metricGroup':\n case 'quickActions':\n case 'statusSummary':\n if (widget.title != null) {\n return widget.title;\n }\n return config.title;\n default:\n return config.title;\n }\n};\n\nexport const hasWidgetQuery = (\n widget: BackofficeDashboardWidget,\n): widget is BackofficeDashboardWidget & { query: GraphQLTaggedNode } => {\n return 'query' in widget && widget.query != null;\n};\n"],"mappings":";AAQA,IAAa,KAAgB,GAAkB,MACtC,EAAM,EAAK,EAGP,KACX,GACA,MACc;CACd,QAAQ,EAAO,MAAf;EACE,KAAK;EACL,KAAK,YACH,OAAO,EAAO;EAChB,KAAK;EACL,KAAK,aACH,OAAO,EAAO;EAChB,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,iBAIH,OAHI,EAAO,SAAS,OAGb,EAAO,QAFL,EAAO;EAGlB,SACE,OAAO,EAAO;;GAIP,KACX,MAEO,WAAW,KAAU,EAAO,SAAS"}
|
|
1
|
+
{"version":3,"file":"BackofficeDashboardPage.helpers.js","names":[],"sources":["../../../src/pages/BackofficeDashboardPage.helpers.ts"],"sourcesContent":["import type {\n BackofficeDashboardConfig,\n BackofficeDashboardWidget,\n I18nLabel,\n} from '@plumile/backoffice-core/types.js';\nimport type { TFunction } from 'i18next';\nimport type { GraphQLTaggedNode } from 'relay-runtime';\n\nexport const resolveLabel = (label: I18nLabel, tApp: TFunction): string => {\n return label(tApp);\n};\n\nexport const getWidgetLabel = (\n widget: BackofficeDashboardWidget,\n config: BackofficeDashboardConfig,\n): I18nLabel => {\n switch (widget.kind) {\n case 'entityCount':\n case 'shortcut':\n return widget.label;\n case 'billingUsageChart':\n case 'tablePreview':\n case 'textBlock':\n return widget.title;\n case 'recentItems':\n case 'metricGroup':\n case 'quickActions':\n case 'statusSummary':\n if (widget.title != null) {\n return widget.title;\n }\n return config.title;\n default:\n return config.title;\n }\n};\n\nexport const hasWidgetQuery = (\n widget: BackofficeDashboardWidget,\n): widget is BackofficeDashboardWidget & { query: GraphQLTaggedNode } => {\n return 'query' in widget && widget.query != null;\n};\n"],"mappings":";AAQA,IAAa,KAAgB,GAAkB,MACtC,EAAM,EAAK,EAGP,KACX,GACA,MACc;CACd,QAAQ,EAAO,MAAf;EACE,KAAK;EACL,KAAK,YACH,OAAO,EAAO;EAChB,KAAK;EACL,KAAK;EACL,KAAK,aACH,OAAO,EAAO;EAChB,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,iBAIH,OAHI,EAAO,SAAS,OAGb,EAAO,QAFL,EAAO;EAGlB,SACE,OAAO,EAAO;;GAIP,KACX,MAEO,WAAW,KAAU,EAAO,SAAS"}
|