@pablo2410/shared-ui 0.14.0 → 0.16.0
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/dist/{HealthFooter-9rZjMmqc.d.ts → HealthFooter-BIG3oto5.d.ts} +1 -1
- package/dist/{chunk-7I4ADEJY.js → chunk-EGGUAREC.js} +2 -2
- package/dist/chunk-ETWT3KF5.js +83 -0
- package/dist/chunk-ETWT3KF5.js.map +1 -0
- package/dist/{chunk-PLS7NDDR.js → chunk-G7XJLTNY.js} +2 -2
- package/dist/{chunk-PS4K7FKB.js → chunk-HLMIR5UV.js} +1 -1
- package/dist/{chunk-PS4K7FKB.js.map → chunk-HLMIR5UV.js.map} +1 -1
- package/dist/{chunk-3E3GLIQV.js → chunk-IEBZGU6X.js} +2 -2
- package/dist/{chunk-CYIMXOQW.js → chunk-MZVMN77F.js} +67 -17
- package/dist/chunk-MZVMN77F.js.map +1 -0
- package/dist/{crossNav-Bd8-0qoi.d.ts → crossNav-BwdA3B2h.d.ts} +1 -1
- package/dist/hierarchy/core.d.ts +2 -2
- package/dist/hierarchy/core.js +1 -1
- package/dist/hierarchy/index.d.ts +16 -3
- package/dist/hierarchy/index.js +7 -3
- package/dist/insights/index.d.ts +55 -0
- package/dist/insights/index.js +182 -0
- package/dist/insights/index.js.map +1 -0
- package/dist/layout/index.d.ts +4 -4
- package/dist/layout/index.js +4 -4
- package/dist/{orgHierarchy-BLW4dt8Q.d.ts → orgHierarchy-BVpunsrZ.d.ts} +9 -1
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.js +3 -3
- package/dist/shell/index.d.ts +4 -4
- package/dist/shell/index.js +5 -5
- package/dist/shell/oplytics-shell.css +1 -1
- package/dist/theme/index.js +8 -73
- package/dist/theme/index.js.map +1 -1
- package/package.json +6 -2
- package/dist/chunk-CYIMXOQW.js.map +0 -1
- /package/dist/{chunk-7I4ADEJY.js.map → chunk-EGGUAREC.js.map} +0 -0
- /package/dist/{chunk-PLS7NDDR.js.map → chunk-G7XJLTNY.js.map} +0 -0
- /package/dist/{chunk-3E3GLIQV.js.map → chunk-IEBZGU6X.js.map} +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OPLYTICS_COLORS
|
|
3
|
+
} from "../chunk-ETWT3KF5.js";
|
|
4
|
+
|
|
5
|
+
// src/insights/OpiInsightsShell.tsx
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { Sparkles, ChevronLeft, ChevronRight } from "lucide-react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var defaultSkin = {
|
|
10
|
+
accent: OPLYTICS_COLORS.accentTeal,
|
|
11
|
+
panelBg: "#0e1624",
|
|
12
|
+
panelBorder: "1px solid #1e2738",
|
|
13
|
+
mutedText: "#596475",
|
|
14
|
+
bodyText: "#c0c6d0",
|
|
15
|
+
softText: "#8890a0"
|
|
16
|
+
};
|
|
17
|
+
function severityColor(severity) {
|
|
18
|
+
switch (severity) {
|
|
19
|
+
case "good":
|
|
20
|
+
return { text: "#10b981", bg: "rgba(16,185,129,0.1)", border: "rgba(16,185,129,0.25)" };
|
|
21
|
+
case "watch":
|
|
22
|
+
return { text: "#f59e0b", bg: "rgba(245,158,11,0.1)", border: "rgba(245,158,11,0.25)" };
|
|
23
|
+
case "gap":
|
|
24
|
+
return { text: "#ef4444", bg: "rgba(239,68,68,0.1)", border: "rgba(239,68,68,0.25)" };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function OpiBadgeChip({ skin = defaultSkin }) {
|
|
28
|
+
return /* @__PURE__ */ jsxs(
|
|
29
|
+
"span",
|
|
30
|
+
{
|
|
31
|
+
className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[9px] font-medium uppercase tracking-wide",
|
|
32
|
+
style: { background: "#0b0f1a", color: skin.accent, border: `1px solid ${skin.accent}33` },
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
className: "w-2.5 h-2.5 rounded-full",
|
|
38
|
+
style: { background: `radial-gradient(circle at 30% 30%, ${skin.accent}, #0d5a63 70%)` }
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
"Powered by AI"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function OpiScoreDial({ score, size = 56 }) {
|
|
47
|
+
const radius = (size - 6) / 2;
|
|
48
|
+
const circumference = 2 * Math.PI * radius;
|
|
49
|
+
const offset = circumference - score / 100 * circumference;
|
|
50
|
+
const color = score >= 75 ? "#10b981" : score >= 45 ? "#f59e0b" : "#ef4444";
|
|
51
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative shrink-0", style: { width: size, height: size }, children: [
|
|
52
|
+
/* @__PURE__ */ jsxs("svg", { width: size, height: size, className: "-rotate-90", children: [
|
|
53
|
+
/* @__PURE__ */ jsx("circle", { cx: size / 2, cy: size / 2, r: radius, fill: "none", stroke: "rgba(255,255,255,0.06)", strokeWidth: 4 }),
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
"circle",
|
|
56
|
+
{
|
|
57
|
+
cx: size / 2,
|
|
58
|
+
cy: size / 2,
|
|
59
|
+
r: radius,
|
|
60
|
+
fill: "none",
|
|
61
|
+
stroke: color,
|
|
62
|
+
strokeWidth: 4,
|
|
63
|
+
strokeLinecap: "round",
|
|
64
|
+
strokeDasharray: circumference,
|
|
65
|
+
strokeDashoffset: offset,
|
|
66
|
+
style: { transition: "stroke-dashoffset 0.6s ease-out" }
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-white", children: score }) })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
function OpiSectionHeading({
|
|
74
|
+
icon,
|
|
75
|
+
title,
|
|
76
|
+
skin = defaultSkin
|
|
77
|
+
}) {
|
|
78
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2.5", children: [
|
|
79
|
+
/* @__PURE__ */ jsx("span", { style: { color: skin.accent }, children: icon }),
|
|
80
|
+
/* @__PURE__ */ jsx("h4", { className: "text-[11px] font-bold uppercase tracking-wider", style: { color: skin.softText }, children: title })
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
function OpiInsightsShell({
|
|
84
|
+
children,
|
|
85
|
+
headline,
|
|
86
|
+
footerNote = "Preview build \u2014 coaching logic is mocked pending the real Opi engine.",
|
|
87
|
+
skin = defaultSkin,
|
|
88
|
+
title = "Opi Insights",
|
|
89
|
+
open: openProp,
|
|
90
|
+
onOpenChange
|
|
91
|
+
}) {
|
|
92
|
+
const [openState, setOpenState] = useState(true);
|
|
93
|
+
const open = openProp ?? openState;
|
|
94
|
+
const setOpen = (value) => {
|
|
95
|
+
setOpenState(value);
|
|
96
|
+
onOpenChange?.(value);
|
|
97
|
+
};
|
|
98
|
+
if (!open) {
|
|
99
|
+
return /* @__PURE__ */ jsxs(
|
|
100
|
+
"button",
|
|
101
|
+
{
|
|
102
|
+
onClick: () => setOpen(true),
|
|
103
|
+
className: "flex flex-col items-center gap-2 py-4 px-1.5 rounded-l-lg shrink-0 self-start sticky top-4 transition-colors hover:brightness-110",
|
|
104
|
+
style: { background: skin.panelBg, border: skin.panelBorder, borderRight: "none" },
|
|
105
|
+
title: `Open ${title}`,
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Sparkles, { size: 14, style: { color: skin.accent } }),
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
"span",
|
|
110
|
+
{
|
|
111
|
+
className: "text-[10px] font-semibold uppercase tracking-wider",
|
|
112
|
+
style: { color: skin.accent, writingMode: "vertical-rl" },
|
|
113
|
+
children: title
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ jsx(ChevronLeft, { size: 12, style: { color: skin.mutedText } })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return /* @__PURE__ */ jsxs(
|
|
122
|
+
"aside",
|
|
123
|
+
{
|
|
124
|
+
className: "w-[300px] shrink-0 rounded-lg overflow-hidden self-start sticky top-4 max-h-[calc(100vh-6rem)] flex flex-col",
|
|
125
|
+
style: { background: skin.panelBg, border: skin.panelBorder },
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsxs(
|
|
128
|
+
"div",
|
|
129
|
+
{
|
|
130
|
+
className: "flex items-center justify-between gap-2 px-4 py-3 shrink-0",
|
|
131
|
+
style: { background: "linear-gradient(135deg, #0d5a63 0%, #0b3a40 100%)" },
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
className: "w-6 h-6 rounded-md flex items-center justify-center shrink-0",
|
|
138
|
+
style: { background: `${skin.accent}26` },
|
|
139
|
+
children: /* @__PURE__ */ jsx(Sparkles, { size: 13, style: { color: skin.accent } })
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-white truncate", children: title })
|
|
143
|
+
] }),
|
|
144
|
+
/* @__PURE__ */ jsx(
|
|
145
|
+
"button",
|
|
146
|
+
{
|
|
147
|
+
onClick: () => setOpen(false),
|
|
148
|
+
className: "p-1 rounded hover:bg-white/10 transition-colors shrink-0",
|
|
149
|
+
title: "Collapse",
|
|
150
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14, className: "text-white/70" })
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ jsxs("div", { className: "overflow-y-auto px-4 py-3.5 space-y-5", children: [
|
|
157
|
+
headline && /* @__PURE__ */ jsxs("div", { children: [
|
|
158
|
+
/* @__PURE__ */ jsx("p", { className: "text-[12px] leading-relaxed mb-2", style: { color: skin.bodyText }, children: headline }),
|
|
159
|
+
/* @__PURE__ */ jsx(OpiBadgeChip, { skin })
|
|
160
|
+
] }),
|
|
161
|
+
children
|
|
162
|
+
] }),
|
|
163
|
+
footerNote && /* @__PURE__ */ jsx(
|
|
164
|
+
"div",
|
|
165
|
+
{
|
|
166
|
+
className: "px-4 py-2 text-[9px] text-center shrink-0",
|
|
167
|
+
style: { color: skin.mutedText, borderTop: skin.panelBorder },
|
|
168
|
+
children: footerNote
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
OpiBadgeChip,
|
|
177
|
+
OpiInsightsShell,
|
|
178
|
+
OpiScoreDial,
|
|
179
|
+
OpiSectionHeading,
|
|
180
|
+
severityColor
|
|
181
|
+
};
|
|
182
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/insights/OpiInsightsShell.tsx"],"sourcesContent":["/**\n * OpiInsightsShell — the standard collapsible \"Opi Insights\" AI coaching\n * sidebar chrome, shared by every Oplytics subdomain service.\n *\n * This is deliberately shell-only: it owns the collapsible rail, header,\n * \"Powered by AI\" badge, and the small set of visual primitives every\n * service's AI panel tends to need (score dial, severity styling, section\n * heading, footer note). Each service supplies its OWN domain analysis and\n * renders its own content as children — same pattern as reportingToolbar\n * and hierarchyNavigator. Policy Deployment is the design source (see\n * OpiInsightsPanel there for the first real consumer) and the reference\n * for what a service-specific content tree looks like inside this shell.\n *\n * Services with their own dark-theme skin tokens (panel background, border,\n * text colors) should pass them via `skin` so the panel matches their other\n * views; omit it to fall back to the shared oplytics-theme teal/dark tokens.\n */\nimport { useState, type ReactNode } from \"react\";\nimport { Sparkles, ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { OPLYTICS_COLORS } from \"../theme\";\n\nexport type InsightSeverity = \"good\" | \"watch\" | \"gap\";\n\nexport interface OpiInsightsSkin {\n accent: string;\n panelBg: string;\n panelBorder: string;\n mutedText: string;\n bodyText: string;\n softText: string;\n}\n\nconst defaultSkin: OpiInsightsSkin = {\n accent: OPLYTICS_COLORS.accentTeal,\n panelBg: \"#0e1624\",\n panelBorder: \"1px solid #1e2738\",\n mutedText: \"#596475\",\n bodyText: \"#c0c6d0\",\n softText: \"#8890a0\",\n};\n\nexport function severityColor(severity: InsightSeverity): { text: string; bg: string; border: string } {\n switch (severity) {\n case \"good\":\n return { text: \"#10b981\", bg: \"rgba(16,185,129,0.1)\", border: \"rgba(16,185,129,0.25)\" };\n case \"watch\":\n return { text: \"#f59e0b\", bg: \"rgba(245,158,11,0.1)\", border: \"rgba(245,158,11,0.25)\" };\n case \"gap\":\n return { text: \"#ef4444\", bg: \"rgba(239,68,68,0.1)\", border: \"rgba(239,68,68,0.25)\" };\n }\n}\n\n/** Small \"Powered by AI\" chip — the standard cross-service Opi AI marker. */\nexport function OpiBadgeChip({ skin = defaultSkin }: { skin?: OpiInsightsSkin }) {\n return (\n <span\n className=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[9px] font-medium uppercase tracking-wide\"\n style={{ background: \"#0b0f1a\", color: skin.accent, border: `1px solid ${skin.accent}33` }}\n >\n <span\n className=\"w-2.5 h-2.5 rounded-full\"\n style={{ background: `radial-gradient(circle at 30% 30%, ${skin.accent}, #0d5a63 70%)` }}\n />\n Powered by AI\n </span>\n );\n}\n\n/** Circular 0-100 score dial — green/amber/red by threshold, used for any composite score. */\nexport function OpiScoreDial({ score, size = 56 }: { score: number; size?: number }) {\n const radius = (size - 6) / 2;\n const circumference = 2 * Math.PI * radius;\n const offset = circumference - (score / 100) * circumference;\n const color = score >= 75 ? \"#10b981\" : score >= 45 ? \"#f59e0b\" : \"#ef4444\";\n return (\n <div className=\"relative shrink-0\" style={{ width: size, height: size }}>\n <svg width={size} height={size} className=\"-rotate-90\">\n <circle cx={size / 2} cy={size / 2} r={radius} fill=\"none\" stroke=\"rgba(255,255,255,0.06)\" strokeWidth={4} />\n <circle\n cx={size / 2} cy={size / 2} r={radius} fill=\"none\" stroke={color} strokeWidth={4}\n strokeLinecap=\"round\" strokeDasharray={circumference} strokeDashoffset={offset}\n style={{ transition: \"stroke-dashoffset 0.6s ease-out\" }}\n />\n </svg>\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <span className=\"text-sm font-bold text-white\">{score}</span>\n </div>\n </div>\n );\n}\n\n/** Section label with an icon — used to group the panel's content into named sections. */\nexport function OpiSectionHeading({\n icon,\n title,\n skin = defaultSkin,\n}: {\n icon: ReactNode;\n title: string;\n skin?: OpiInsightsSkin;\n}) {\n return (\n <div className=\"flex items-center gap-2 mb-2.5\">\n <span style={{ color: skin.accent }}>{icon}</span>\n <h4 className=\"text-[11px] font-bold uppercase tracking-wider\" style={{ color: skin.softText }}>\n {title}\n </h4>\n </div>\n );\n}\n\nexport interface OpiInsightsShellProps {\n /** Panel content — build with OpiSectionHeading/OpiScoreDial/severityColor etc. */\n children: ReactNode;\n /** Optional headline shown above the badge (e.g. a one-line AI summary). */\n headline?: ReactNode;\n /** Footer note — defaults to the standard \"mocked pending real engine\" preview notice. */\n footerNote?: ReactNode;\n /** Service-specific dark-theme tokens; falls back to the shared theme's teal/dark defaults. */\n skin?: OpiInsightsSkin;\n /** Panel title in the header. Defaults to \"Opi Insights\". */\n title?: string;\n /** Controlled open state. Omit to let the shell manage its own collapse state. */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\n/**\n * The collapsible teal Opi Insights rail. Renders nothing if collapsed\n * except a slim vertical tab; expanded, it's a fixed-width sticky sidebar\n * with a header, scrollable content area, and footer note.\n */\nexport function OpiInsightsShell({\n children,\n headline,\n footerNote = \"Preview build — coaching logic is mocked pending the real Opi engine.\",\n skin = defaultSkin,\n title = \"Opi Insights\",\n open: openProp,\n onOpenChange,\n}: OpiInsightsShellProps) {\n const [openState, setOpenState] = useState(true);\n const open = openProp ?? openState;\n const setOpen = (value: boolean) => {\n setOpenState(value);\n onOpenChange?.(value);\n };\n\n if (!open) {\n return (\n <button\n onClick={() => setOpen(true)}\n className=\"flex flex-col items-center gap-2 py-4 px-1.5 rounded-l-lg shrink-0 self-start sticky top-4 transition-colors hover:brightness-110\"\n style={{ background: skin.panelBg, border: skin.panelBorder, borderRight: \"none\" }}\n title={`Open ${title}`}\n >\n <Sparkles size={14} style={{ color: skin.accent }} />\n <span\n className=\"text-[10px] font-semibold uppercase tracking-wider\"\n style={{ color: skin.accent, writingMode: \"vertical-rl\" }}\n >\n {title}\n </span>\n <ChevronLeft size={12} style={{ color: skin.mutedText }} />\n </button>\n );\n }\n\n return (\n <aside\n className=\"w-[300px] shrink-0 rounded-lg overflow-hidden self-start sticky top-4 max-h-[calc(100vh-6rem)] flex flex-col\"\n style={{ background: skin.panelBg, border: skin.panelBorder }}\n >\n <div\n className=\"flex items-center justify-between gap-2 px-4 py-3 shrink-0\"\n style={{ background: \"linear-gradient(135deg, #0d5a63 0%, #0b3a40 100%)\" }}\n >\n <div className=\"flex items-center gap-2 min-w-0\">\n <div\n className=\"w-6 h-6 rounded-md flex items-center justify-center shrink-0\"\n style={{ background: `${skin.accent}26` }}\n >\n <Sparkles size={13} style={{ color: skin.accent }} />\n </div>\n <span className=\"text-xs font-bold text-white truncate\">{title}</span>\n </div>\n <button\n onClick={() => setOpen(false)}\n className=\"p-1 rounded hover:bg-white/10 transition-colors shrink-0\"\n title=\"Collapse\"\n >\n <ChevronRight size={14} className=\"text-white/70\" />\n </button>\n </div>\n\n <div className=\"overflow-y-auto px-4 py-3.5 space-y-5\">\n {headline && (\n <div>\n <p className=\"text-[12px] leading-relaxed mb-2\" style={{ color: skin.bodyText }}>\n {headline}\n </p>\n <OpiBadgeChip skin={skin} />\n </div>\n )}\n {children}\n </div>\n\n {footerNote && (\n <div\n className=\"px-4 py-2 text-[9px] text-center shrink-0\"\n style={{ color: skin.mutedText, borderTop: skin.panelBorder }}\n >\n {footerNote}\n </div>\n )}\n </aside>\n );\n}\n"],"mappings":";;;;;AAiBA,SAAS,gBAAgC;AACzC,SAAS,UAAU,aAAa,oBAAoB;AAqChD,SAIE,KAJF;AAvBJ,IAAM,cAA+B;AAAA,EACnC,QAAQ,gBAAgB;AAAA,EACxB,SAAS;AAAA,EACT,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AACZ;AAEO,SAAS,cAAc,UAAyE;AACrG,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,EAAE,MAAM,WAAW,IAAI,wBAAwB,QAAQ,wBAAwB;AAAA,IACxF,KAAK;AACH,aAAO,EAAE,MAAM,WAAW,IAAI,wBAAwB,QAAQ,wBAAwB;AAAA,IACxF,KAAK;AACH,aAAO,EAAE,MAAM,WAAW,IAAI,uBAAuB,QAAQ,uBAAuB;AAAA,EACxF;AACF;AAGO,SAAS,aAAa,EAAE,OAAO,YAAY,GAA+B;AAC/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,YAAY,WAAW,OAAO,KAAK,QAAQ,QAAQ,aAAa,KAAK,MAAM,KAAK;AAAA,MAEzF;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,YAAY,sCAAsC,KAAK,MAAM,iBAAiB;AAAA;AAAA,QACzF;AAAA,QAAE;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAGO,SAAS,aAAa,EAAE,OAAO,OAAO,GAAG,GAAqC;AACnF,QAAM,UAAU,OAAO,KAAK;AAC5B,QAAM,gBAAgB,IAAI,KAAK,KAAK;AACpC,QAAM,SAAS,gBAAiB,QAAQ,MAAO;AAC/C,QAAM,QAAQ,SAAS,KAAK,YAAY,SAAS,KAA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,sBACC,qBAAC,SACC;AAAA,gCAAC,OAAE,WAAU,oCAAmC,OAAO,EAAE,OAAO,KAAK,SAAS,GAC3E,oBACH;AAAA,YACA,oBAAC,gBAAa,MAAY;AAAA,aAC5B;AAAA,UAED;AAAA,WACH;AAAA,QAEC,cACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,OAAO,KAAK,WAAW,WAAW,KAAK,YAAY;AAAA,YAE3D;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as SharedSidebarConfig } from '../HealthFooter-
|
|
2
|
-
export { C as CrossServiceNav, d as CrossServiceNavProps, D as DashboardLayout, a as DashboardLayoutEnterprise, b as DashboardLayoutProps, c as DashboardLayoutUser, H as HealthFooter, e as HealthFooterEnterprise, f as HealthFooterProps, g as HealthFooterUser, M as MenuItem, h as MenuSection, i as SharedSidebarProps, j as getInitials, k as isAdminRole, l as isMenuItemActive, u as useSidebarResize } from '../HealthFooter-
|
|
1
|
+
import { S as SharedSidebarConfig } from '../HealthFooter-BIG3oto5.js';
|
|
2
|
+
export { C as CrossServiceNav, d as CrossServiceNavProps, D as DashboardLayout, a as DashboardLayoutEnterprise, b as DashboardLayoutProps, c as DashboardLayoutUser, H as HealthFooter, e as HealthFooterEnterprise, f as HealthFooterProps, g as HealthFooterUser, M as MenuItem, h as MenuSection, i as SharedSidebarProps, j as getInitials, k as isAdminRole, l as isMenuItemActive, u as useSidebarResize } from '../HealthFooter-BIG3oto5.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
import '../crossNav-
|
|
6
|
-
import '../orgHierarchy-
|
|
5
|
+
import '../crossNav-BwdA3B2h.js';
|
|
6
|
+
import '../orgHierarchy-BVpunsrZ.js';
|
|
7
7
|
|
|
8
8
|
interface DashboardLayoutSkeletonProps {
|
|
9
9
|
className?: string;
|
package/dist/layout/index.js
CHANGED
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
policyDeploymentConfig,
|
|
20
20
|
sqdcpConfig,
|
|
21
21
|
useSidebarResize
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-EGGUAREC.js";
|
|
23
23
|
import "../chunk-4QJMLQSH.js";
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-MZVMN77F.js";
|
|
25
|
+
import "../chunk-IEBZGU6X.js";
|
|
26
26
|
import "../chunk-3G43UG63.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-HLMIR5UV.js";
|
|
28
28
|
import "../chunk-NTFR5ZIF.js";
|
|
29
29
|
import "../chunk-JT3XLKKD.js";
|
|
30
30
|
import "../chunk-R4NOLCSI.js";
|
|
@@ -66,6 +66,14 @@ interface OrgHierarchyContextValue {
|
|
|
66
66
|
sites: OrgHierarchyNode[];
|
|
67
67
|
areas: OrgHierarchyNode[];
|
|
68
68
|
assets: OrgHierarchyNode[];
|
|
69
|
+
/**
|
|
70
|
+
* The unfiltered server-scoped tree, as fetched — the same payload the
|
|
71
|
+
* filtered lists above are derived from. Exposed (rather than only the
|
|
72
|
+
* per-level filtered lists) because computing a hierarchy attribution code
|
|
73
|
+
* (see hierarchyCode.ts) needs full sibling sets at every level, not just
|
|
74
|
+
* the ones matching the current selection. `null` while loading.
|
|
75
|
+
*/
|
|
76
|
+
hierarchyData: OrgHierarchyData | null;
|
|
69
77
|
/** Setters — selecting a level clears all levels below it */
|
|
70
78
|
selectEnterprise: (node: OrgHierarchyNode | null) => void;
|
|
71
79
|
selectBusinessUnit: (node: OrgHierarchyNode | null) => void;
|
|
@@ -87,4 +95,4 @@ type OrgHierarchyLevel = (typeof ORG_HIERARCHY_LEVELS)[number];
|
|
|
87
95
|
/** Human-readable labels for each level */
|
|
88
96
|
declare const ORG_HIERARCHY_LABELS: Record<OrgHierarchyLevel, string>;
|
|
89
97
|
|
|
90
|
-
export { type OrgHierarchySelection as O, type OrgHierarchyData as a, type OrgHierarchyContextValue as b,
|
|
98
|
+
export { type OrgHierarchySelection as O, type OrgHierarchyData as a, type OrgHierarchyContextValue as b, type OrgHierarchyLevel as c, ORG_HIERARCHY_DATA_EMPTY as d, ORG_HIERARCHY_EMPTY as e, ORG_HIERARCHY_LABELS as f, ORG_HIERARCHY_LEVELS as g, type OrgHierarchyArea as h, type OrgHierarchyAsset as i, type OrgHierarchyBusinessUnit as j, type OrgHierarchyEnterprise as k, type OrgHierarchyNode as l, type OrgHierarchySite as m };
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ADMIN_SEE_ALL_ROLES, B as BuildCrossServiceLinksOptions, C as CrossServiceLink, S as SLUG_ALIASES, b as buildCrossServiceLinks, n as normalizeServiceSlug } from '../crossNav-
|
|
2
|
-
import '../orgHierarchy-
|
|
1
|
+
export { A as ADMIN_SEE_ALL_ROLES, B as BuildCrossServiceLinksOptions, C as CrossServiceLink, S as SLUG_ALIASES, b as buildCrossServiceLinks, n as normalizeServiceSlug } from '../crossNav-BwdA3B2h.js';
|
|
2
|
+
import '../orgHierarchy-BVpunsrZ.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Platform domain resolution — single source of truth for building
|
package/dist/services/index.js
CHANGED
|
@@ -11,15 +11,15 @@ import {
|
|
|
11
11
|
inDevServices,
|
|
12
12
|
liveServices,
|
|
13
13
|
normalizeServiceSlug
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-G7XJLTNY.js";
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_PLATFORM_DOMAIN,
|
|
17
17
|
getPlatformDomain,
|
|
18
18
|
platformUrl,
|
|
19
19
|
portalUrl
|
|
20
20
|
} from "../chunk-4QJMLQSH.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-IEBZGU6X.js";
|
|
22
|
+
import "../chunk-HLMIR5UV.js";
|
|
23
23
|
export {
|
|
24
24
|
ADMIN_SEE_ALL_ROLES,
|
|
25
25
|
DEFAULT_PLATFORM_DOMAIN,
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DashboardLayout, a as DashboardLayoutEnterprise, b as DashboardLayoutProps, c as DashboardLayoutUser } from '../HealthFooter-
|
|
2
|
-
export { C as CrossServiceNav, d as CrossServiceNavProps, H as HealthFooter, e as HealthFooterEnterprise, f as HealthFooterProps, g as HealthFooterUser, M as MenuItem, h as MenuSection } from '../HealthFooter-
|
|
3
|
-
export { C as CrossServiceLink, b as buildCrossServiceLinks } from '../crossNav-
|
|
1
|
+
import { D as DashboardLayout, a as DashboardLayoutEnterprise, b as DashboardLayoutProps, c as DashboardLayoutUser } from '../HealthFooter-BIG3oto5.js';
|
|
2
|
+
export { C as CrossServiceNav, d as CrossServiceNavProps, H as HealthFooter, e as HealthFooterEnterprise, f as HealthFooterProps, g as HealthFooterUser, M as MenuItem, h as MenuSection } from '../HealthFooter-BIG3oto5.js';
|
|
3
|
+
export { C as CrossServiceLink, b as buildCrossServiceLinks } from '../crossNav-BwdA3B2h.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../orgHierarchy-
|
|
6
|
+
import '../orgHierarchy-BVpunsrZ.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @pablo2410/shared-ui/shell — Oplytics Service Shell
|
package/dist/shell/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildCrossServiceLinks
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-G7XJLTNY.js";
|
|
4
4
|
import {
|
|
5
5
|
CrossServiceNav,
|
|
6
6
|
DashboardLayout,
|
|
7
7
|
HealthFooter
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-EGGUAREC.js";
|
|
9
9
|
import "../chunk-4QJMLQSH.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-MZVMN77F.js";
|
|
11
|
+
import "../chunk-IEBZGU6X.js";
|
|
12
12
|
import "../chunk-3G43UG63.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-HLMIR5UV.js";
|
|
14
14
|
import "../chunk-NTFR5ZIF.js";
|
|
15
15
|
import "../chunk-JT3XLKKD.js";
|
|
16
16
|
import "../chunk-R4NOLCSI.js";
|