@burdenoff/fe-libs 2026.722.2 → 2026.723.1
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/chrome/NavCustomizeDialog.d.ts.map +1 -1
- package/dist/chrome/NavCustomizeDialog.js +56 -121
- package/dist/chrome/PersonaSurfaceControls.d.ts +9 -6
- package/dist/chrome/PersonaSurfaceControls.d.ts.map +1 -1
- package/dist/chrome/PersonaSurfaceControls.js +172 -72
- package/dist/chrome/ProductSideNav.d.ts.map +1 -1
- package/dist/chrome/ProductSideNav.js +5 -5
- package/dist/chrome/sideNavigation/useSideNavigationState.d.ts.map +1 -1
- package/dist/chrome/sideNavigation/useSideNavigationState.js +26 -25
- package/dist/chrome.js +19 -19
- package/dist/shared/providers/shell/PersonaSurfaceProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/PersonaSurfaceProvider.js +15 -11
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavCustomizeDialog.d.ts","sourceRoot":"","sources":["../../src/chrome/NavCustomizeDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwBH,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6DD,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,UAAU,EACV,eAA8B,GAC/B,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"NavCustomizeDialog.d.ts","sourceRoot":"","sources":["../../src/chrome/NavCustomizeDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwBH,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6DD,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,UAAU,EACV,eAA8B,GAC/B,EAAE,uBAAuB,kDAmIzB"}
|
|
@@ -55,131 +55,66 @@ function g({ groupLabels: o, groupOrder: f, everythingLabel: g = "Everything" })
|
|
|
55
55
|
o
|
|
56
56
|
]);
|
|
57
57
|
if (!_) return null;
|
|
58
|
-
let {
|
|
59
|
-
let r = u(e, t,
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
id: e,
|
|
63
|
-
label: e === "everything" ? g : w.find((t) => t.id === e)?.label ?? e
|
|
64
|
-
}));
|
|
58
|
+
let { activeSurfaceId: w, activeSurface: T, overrides: E, setItemOverride: D, resetOverrides: O, customizeOpen: k, setCustomizeOpen: A, simulation: j } = _, M = T ? T.visibleItems : null, N = (e, t, n) => {
|
|
59
|
+
let r = u(e, t, M, {});
|
|
60
|
+
D(e.id, n === r ? null : n ? "shown" : "hidden");
|
|
61
|
+
}, P = Object.keys(E).length, F = w === "everything" ? g : T?.label ?? w;
|
|
65
62
|
return /* @__PURE__ */ p(e, {
|
|
66
|
-
open:
|
|
67
|
-
onOpenChange:
|
|
63
|
+
open: k,
|
|
64
|
+
onOpenChange: A,
|
|
68
65
|
children: /* @__PURE__ */ m(t, {
|
|
69
66
|
className: "max-h-[85vh] overflow-y-auto sm:max-w-lg",
|
|
70
|
-
children: [/* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(i, { children: "Customize menu" }), /* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(i, { children: "Customize menu" }), /* @__PURE__ */ m(n, { children: [
|
|
68
|
+
"Choose which pages appear in the",
|
|
69
|
+
" ",
|
|
70
|
+
/* @__PURE__ */ p("span", {
|
|
71
|
+
className: "font-medium text-text-primary",
|
|
72
|
+
children: F
|
|
73
|
+
}),
|
|
74
|
+
" view. Hidden pages stay one click away under “more” and in search — nothing is removed."
|
|
75
|
+
] })] }), /* @__PURE__ */ p("div", {
|
|
71
76
|
className: "space-y-5",
|
|
72
|
-
children:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/* @__PURE__ */ m("select", {
|
|
114
|
-
value: I?.roleId ?? "",
|
|
115
|
-
onFocus: V,
|
|
116
|
-
onChange: (e) => {
|
|
117
|
-
let t = e.target.value;
|
|
118
|
-
if (!t) {
|
|
119
|
-
R();
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
let n = z.find((e) => e.id === t);
|
|
123
|
-
n && L(n);
|
|
124
|
-
},
|
|
125
|
-
className: "w-full rounded-button border border-border-subtle bg-bg-canvas px-3 py-2 text-body-sm text-text-primary",
|
|
126
|
-
"data-testid": "persona-dialog-simulate-select",
|
|
127
|
-
children: [/* @__PURE__ */ p("option", {
|
|
128
|
-
value: "",
|
|
129
|
-
children: B ? "Loading roles…" : "Not simulating"
|
|
130
|
-
}), z.map((e) => /* @__PURE__ */ p("option", {
|
|
131
|
-
value: e.id,
|
|
132
|
-
children: e.name
|
|
133
|
-
}, e.id))]
|
|
134
|
-
}),
|
|
135
|
-
/* @__PURE__ */ p("p", {
|
|
136
|
-
className: "text-body-sm text-text-muted",
|
|
137
|
-
children: "Preview the menu another role sees. Your own access is unchanged."
|
|
138
|
-
})
|
|
139
|
-
]
|
|
140
|
-
}),
|
|
141
|
-
/* @__PURE__ */ m("section", {
|
|
142
|
-
className: "space-y-1",
|
|
143
|
-
"data-testid": "persona-dialog-items",
|
|
144
|
-
children: [/* @__PURE__ */ m("div", {
|
|
145
|
-
className: "flex items-center justify-between",
|
|
146
|
-
children: [/* @__PURE__ */ p("h3", {
|
|
147
|
-
className: "text-[11px] font-medium uppercase tracking-wider text-text-muted",
|
|
148
|
-
children: "Menu items"
|
|
149
|
-
}), W > 0 && /* @__PURE__ */ m("button", {
|
|
150
|
-
type: "button",
|
|
151
|
-
onClick: M,
|
|
152
|
-
className: "text-body-sm text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
|
|
153
|
-
"data-testid": "persona-dialog-reset-overrides",
|
|
154
|
-
children: [
|
|
155
|
-
"Reset ",
|
|
156
|
-
W,
|
|
157
|
-
" change",
|
|
158
|
-
W === 1 ? "" : "s"
|
|
159
|
-
]
|
|
160
|
-
})]
|
|
161
|
-
}), I ? /* @__PURE__ */ p("p", {
|
|
162
|
-
className: "py-2 text-body-sm text-text-muted",
|
|
163
|
-
children: "Exit role simulation to customize your own menu."
|
|
164
|
-
}) : C.map((e) => /* @__PURE__ */ m("div", {
|
|
165
|
-
className: "pt-2",
|
|
166
|
-
children: [e.label && /* @__PURE__ */ p("p", {
|
|
167
|
-
className: "pb-1 text-[11px] font-medium uppercase tracking-wider text-text-muted",
|
|
168
|
-
children: e.label
|
|
169
|
-
}), /* @__PURE__ */ p("div", {
|
|
170
|
-
className: "divide-y divide-border-subtle",
|
|
171
|
-
children: e.items.map((e) => /* @__PURE__ */ p(h, {
|
|
172
|
-
item: e,
|
|
173
|
-
depth: 0,
|
|
174
|
-
parentShown: !1,
|
|
175
|
-
surfaceVisibleItems: H,
|
|
176
|
-
overrides: A,
|
|
177
|
-
onToggle: U
|
|
178
|
-
}, e.id))
|
|
179
|
-
})]
|
|
180
|
-
}, e.key))]
|
|
181
|
-
})
|
|
182
|
-
]
|
|
77
|
+
children: /* @__PURE__ */ m("section", {
|
|
78
|
+
className: "space-y-1",
|
|
79
|
+
"data-testid": "persona-dialog-items",
|
|
80
|
+
children: [/* @__PURE__ */ m("div", {
|
|
81
|
+
className: "flex items-center justify-between",
|
|
82
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
83
|
+
className: "text-[11px] font-medium uppercase tracking-wider text-text-muted",
|
|
84
|
+
children: "Menu items"
|
|
85
|
+
}), P > 0 && /* @__PURE__ */ m("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
onClick: O,
|
|
88
|
+
className: "text-body-sm text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
|
|
89
|
+
"data-testid": "persona-dialog-reset-overrides",
|
|
90
|
+
children: [
|
|
91
|
+
"Reset ",
|
|
92
|
+
P,
|
|
93
|
+
" change",
|
|
94
|
+
P === 1 ? "" : "s"
|
|
95
|
+
]
|
|
96
|
+
})]
|
|
97
|
+
}), j ? /* @__PURE__ */ p("p", {
|
|
98
|
+
className: "py-2 text-body-sm text-text-muted",
|
|
99
|
+
children: "Exit role simulation to customize your own menu."
|
|
100
|
+
}) : C.map((e) => /* @__PURE__ */ m("div", {
|
|
101
|
+
className: "pt-2",
|
|
102
|
+
children: [e.label && /* @__PURE__ */ p("p", {
|
|
103
|
+
className: "pb-1 text-[11px] font-medium uppercase tracking-wider text-text-muted",
|
|
104
|
+
children: e.label
|
|
105
|
+
}), /* @__PURE__ */ p("div", {
|
|
106
|
+
className: "divide-y divide-border-subtle",
|
|
107
|
+
children: e.items.map((e) => /* @__PURE__ */ p(h, {
|
|
108
|
+
item: e,
|
|
109
|
+
depth: 0,
|
|
110
|
+
parentShown: !1,
|
|
111
|
+
surfaceVisibleItems: M,
|
|
112
|
+
overrides: E,
|
|
113
|
+
onToggle: N
|
|
114
|
+
}, e.id))
|
|
115
|
+
})]
|
|
116
|
+
}, e.key))]
|
|
117
|
+
})
|
|
183
118
|
})]
|
|
184
119
|
})
|
|
185
120
|
});
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
* PersonaSurfaceControls — sidebar-footer widget for persona surfaces.
|
|
3
3
|
*
|
|
4
4
|
* Rendered automatically by ProductSideNav when a PersonaSurfaceProvider is
|
|
5
|
-
* mounted.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* mounted. One compact row: a searchable VIEW DROPDOWN (the user's surfaces —
|
|
6
|
+
* their own role preselected and marked — plus Everything, and, for workspace
|
|
7
|
+
* admins / super admins, a "Preview a role" section) and a Customize button
|
|
8
|
+
* that opens the per-item visibility dialog. The dropdown panel renders
|
|
9
|
+
* inline above the footer (no portal), so inside the mobile drawer it needs
|
|
10
|
+
* no overlay and never covers the nav. During role preview the trigger tints
|
|
11
|
+
* amber and an "Exit preview" row appears; a viewport-fixed pill (rendered by
|
|
12
|
+
* ProductSideNav OUTSIDE the aside — its backdrop-filter would trap fixed
|
|
13
|
+
* positioning) mirrors the state on all breakpoints.
|
|
11
14
|
*/
|
|
12
15
|
export interface PersonaSurfaceControlsProps {
|
|
13
16
|
/** Label for the built-in uncurated surface. @default "Everything" */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaSurfaceControls.d.ts","sourceRoot":"","sources":["../../src/chrome/PersonaSurfaceControls.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PersonaSurfaceControls.d.ts","sourceRoot":"","sources":["../../src/chrome/PersonaSurfaceControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiBH,MAAM,WAAW,2BAA2B;IAC1C,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA8OD,wBAAgB,sBAAsB,CAAC,EACrC,eAA8B,EAC9B,cAAiC,GAClC,EAAE,2BAA2B,kDA6C7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,mDAyBpC"}
|
|
@@ -1,102 +1,202 @@
|
|
|
1
1
|
import { useShellUi as e } from "../shared/providers/shell/ShellUiProvider.js";
|
|
2
2
|
import { useSafePersonaSurface as t } from "../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
4
|
+
import { Check as o, ChevronsUpDown as s, Eye as c, Search as l, SlidersHorizontal as u, X as d } from "lucide-react";
|
|
5
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
5
6
|
//#region src/chrome/PersonaSurfaceControls.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
function h(e, t) {
|
|
8
|
+
let { surfaces: n, availableSurfaceIds: r, resolvedSurfaceId: i } = e, a = (e) => e === "everything" ? t : n.find((t) => t.id === e)?.label ?? e, o = [...r];
|
|
9
|
+
return o.sort((e, t) => {
|
|
10
|
+
let n = (e) => e === i ? 0 : e === "everything" ? 2 : 1;
|
|
11
|
+
return n(e) - n(t);
|
|
12
|
+
}), o.map((e) => ({
|
|
13
|
+
id: e,
|
|
14
|
+
label: a(e),
|
|
15
|
+
isResolved: e === i
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function g({ everythingLabel: e }) {
|
|
19
|
+
let u = t(), [g, _] = a(!1), [v, y] = a(""), b = i(null), x = i(null), S = n(() => {
|
|
20
|
+
_(!1), y("");
|
|
21
|
+
}, []);
|
|
22
|
+
if (r(() => {
|
|
23
|
+
if (!g) return;
|
|
24
|
+
let e = (e) => {
|
|
25
|
+
b.current?.contains(e.target) || S();
|
|
26
|
+
};
|
|
27
|
+
return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
|
|
28
|
+
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
29
|
+
};
|
|
30
|
+
}, [g, S]), r(() => {
|
|
31
|
+
g && x.current?.focus();
|
|
32
|
+
}, [g]), !u) return null;
|
|
33
|
+
let { activeSurfaceId: C, surfaces: w, resolvedSurfaceId: T, setSurfaceId: E, canSimulate: D, simulation: O, startSimulation: k, stopSimulation: A, simulatableRoles: j, simulatableRolesLoading: M, loadSimulatableRoles: N } = u, P = h(u, e), F = v.trim().toLowerCase(), I = F ? P.filter((e) => e.label.toLowerCase().includes(F)) : P, L = F ? j.filter((e) => e.name.toLowerCase().includes(F)) : j, R = O ? O.roleName : P.find((e) => e.id === C)?.label ?? w.find((e) => e.id === C)?.label ?? e, z = () => {
|
|
34
|
+
if (g) {
|
|
35
|
+
S();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
D && N(), _(!0);
|
|
39
|
+
}, B = (e) => {
|
|
40
|
+
e.key === "Escape" && g && (e.preventDefault(), e.stopPropagation(), S());
|
|
41
|
+
}, V = (e) => {
|
|
42
|
+
O && A(), E(e === T ? null : e), S();
|
|
43
|
+
}, H = "flex w-full min-h-9 items-center gap-2 rounded-button px-2.5 py-1.5 text-left text-body-sm text-text-primary hover:bg-bg-sunken transition-colors", U = "px-2.5 pb-1 pt-2.5 text-[11px] font-medium uppercase tracking-wider text-text-muted";
|
|
44
|
+
return /* @__PURE__ */ m("div", {
|
|
45
|
+
ref: b,
|
|
46
|
+
className: "relative min-w-0 flex-1",
|
|
47
|
+
onKeyDown: B,
|
|
48
|
+
children: [g && /* @__PURE__ */ m("div", {
|
|
49
|
+
className: "absolute inset-x-0 bottom-full z-20 mb-2 flex max-h-80 flex-col overflow-hidden rounded-card border border-border-subtle bg-bg-canvas shadow-lg",
|
|
50
|
+
role: "listbox",
|
|
51
|
+
"data-testid": "persona-view-panel",
|
|
52
|
+
children: [/* @__PURE__ */ m("div", {
|
|
53
|
+
className: "flex items-center gap-2 border-b border-border-subtle px-2.5 py-2",
|
|
54
|
+
children: [/* @__PURE__ */ p(l, { className: "size-4 flex-shrink-0 text-text-muted" }), /* @__PURE__ */ p("input", {
|
|
55
|
+
ref: x,
|
|
56
|
+
value: v,
|
|
57
|
+
onChange: (e) => y(e.target.value),
|
|
58
|
+
placeholder: "Search views & roles",
|
|
59
|
+
className: "w-full bg-transparent text-body-sm text-text-primary outline-none placeholder:text-text-muted",
|
|
60
|
+
"data-testid": "persona-view-search"
|
|
61
|
+
})]
|
|
62
|
+
}), /* @__PURE__ */ m("div", {
|
|
63
|
+
className: "overflow-y-auto py-1",
|
|
64
|
+
children: [
|
|
65
|
+
I.length > 0 && /* @__PURE__ */ p("p", {
|
|
66
|
+
className: U,
|
|
67
|
+
children: "Views"
|
|
68
|
+
}),
|
|
69
|
+
I.map((e) => {
|
|
70
|
+
let t = !O && e.id === C;
|
|
71
|
+
return /* @__PURE__ */ m("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: () => V(e.id),
|
|
74
|
+
className: H,
|
|
75
|
+
"data-testid": `persona-view-${e.id}`,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ p(o, { className: `size-4 flex-shrink-0 ${t ? "text-text-primary" : "invisible"}` }),
|
|
78
|
+
/* @__PURE__ */ p("span", {
|
|
79
|
+
className: "truncate",
|
|
80
|
+
children: e.label
|
|
81
|
+
}),
|
|
82
|
+
e.isResolved && /* @__PURE__ */ p("span", {
|
|
83
|
+
className: "ml-auto flex-shrink-0 rounded-full bg-bg-sunken px-2 py-0.5 text-[11px] text-text-secondary",
|
|
84
|
+
children: "Your role"
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}, e.id);
|
|
88
|
+
}),
|
|
89
|
+
D && /* @__PURE__ */ m(f, { children: [
|
|
90
|
+
/* @__PURE__ */ p("p", {
|
|
91
|
+
className: U,
|
|
92
|
+
children: "Preview a role"
|
|
93
|
+
}),
|
|
94
|
+
O && /* @__PURE__ */ m("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
onClick: () => {
|
|
97
|
+
A(), S();
|
|
98
|
+
},
|
|
99
|
+
className: `${H} text-status-warning-text`,
|
|
100
|
+
"data-testid": "persona-view-exit-preview",
|
|
101
|
+
children: [/* @__PURE__ */ p(d, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ p("span", { children: "Exit preview" })]
|
|
102
|
+
}),
|
|
103
|
+
M && /* @__PURE__ */ p("p", {
|
|
104
|
+
className: "px-2.5 py-1.5 text-body-sm text-text-muted",
|
|
105
|
+
children: "Loading roles…"
|
|
106
|
+
}),
|
|
107
|
+
L.map((e) => {
|
|
108
|
+
let t = O?.roleId === e.id;
|
|
109
|
+
return /* @__PURE__ */ m("button", {
|
|
110
|
+
type: "button",
|
|
111
|
+
onClick: () => {
|
|
112
|
+
k(e), S();
|
|
113
|
+
},
|
|
114
|
+
className: H,
|
|
115
|
+
"data-testid": `persona-preview-${e.id}`,
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ p(c, { className: `size-4 flex-shrink-0 ${t ? "text-status-warning-text" : "text-text-muted"}` }),
|
|
118
|
+
/* @__PURE__ */ p("span", {
|
|
119
|
+
className: "truncate",
|
|
120
|
+
children: e.name
|
|
121
|
+
}),
|
|
122
|
+
t && /* @__PURE__ */ p(o, { className: "ml-auto size-4 flex-shrink-0" })
|
|
123
|
+
]
|
|
124
|
+
}, e.id);
|
|
125
|
+
}),
|
|
126
|
+
!M && L.length === 0 && F && /* @__PURE__ */ p("p", {
|
|
127
|
+
className: "px-2.5 py-1.5 text-body-sm text-text-muted",
|
|
128
|
+
children: "No matching roles"
|
|
129
|
+
})
|
|
130
|
+
] }),
|
|
131
|
+
I.length === 0 && (!D || L.length === 0) && F && /* @__PURE__ */ p("p", {
|
|
132
|
+
className: "px-2.5 py-1.5 text-body-sm text-text-muted",
|
|
133
|
+
children: "No matches"
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
})]
|
|
137
|
+
}), /* @__PURE__ */ m("button", {
|
|
138
|
+
type: "button",
|
|
139
|
+
onClick: z,
|
|
140
|
+
"aria-expanded": g,
|
|
141
|
+
"aria-haspopup": "listbox",
|
|
142
|
+
className: `flex w-full min-h-9 items-center gap-2 rounded-button border px-2.5 py-1.5 text-body-sm transition-colors ${O ? "border-status-warning-text/40 bg-status-warning-bg-subtle text-text-primary" : "border-border-subtle bg-bg-canvas text-text-primary hover:bg-bg-sunken"}`,
|
|
143
|
+
"data-testid": "persona-view-trigger",
|
|
144
|
+
children: [
|
|
145
|
+
O ? /* @__PURE__ */ p(c, { className: "size-4 flex-shrink-0 text-status-warning-text" }) : /* @__PURE__ */ p(o, { className: "size-4 flex-shrink-0 text-text-muted" }),
|
|
146
|
+
/* @__PURE__ */ p("span", {
|
|
147
|
+
className: "min-w-0 flex-1 truncate text-left",
|
|
148
|
+
children: O ? `Preview: ${R}` : R
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ p(s, { className: "size-4 flex-shrink-0 text-text-muted" })
|
|
151
|
+
]
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function _({ everythingLabel: n = "Everything", customizeLabel: r = "Customize menu" }) {
|
|
156
|
+
let i = t(), { sidebarCollapsed: a, toggleSidebar: o } = e();
|
|
157
|
+
if (!i) return null;
|
|
158
|
+
let { setCustomizeOpen: s } = i, c = /* @__PURE__ */ p("button", {
|
|
10
159
|
type: "button",
|
|
11
|
-
onClick: () =>
|
|
160
|
+
onClick: () => {
|
|
161
|
+
typeof window < "u" && window.innerWidth < 768 && !a && o(), s(!0);
|
|
162
|
+
},
|
|
12
163
|
className: "p-2 rounded-button text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors flex-shrink-0",
|
|
13
|
-
"aria-label":
|
|
14
|
-
title:
|
|
164
|
+
"aria-label": r,
|
|
165
|
+
title: r,
|
|
15
166
|
"data-testid": "persona-customize-trigger",
|
|
16
|
-
children: /* @__PURE__ */
|
|
167
|
+
children: /* @__PURE__ */ p(u, { className: "size-4" })
|
|
17
168
|
});
|
|
18
|
-
|
|
169
|
+
return a ? /* @__PURE__ */ p("div", {
|
|
19
170
|
className: "hidden md:flex justify-center",
|
|
20
171
|
"data-testid": "persona-controls-collapsed",
|
|
21
|
-
children:
|
|
22
|
-
})
|
|
23
|
-
if (_) return /* @__PURE__ */ o("div", {
|
|
24
|
-
className: "flex items-center gap-2 rounded-button bg-status-warning-bg-subtle px-2 py-1.5",
|
|
25
|
-
"data-testid": "persona-simulation-footer",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ a(n, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
|
|
28
|
-
/* @__PURE__ */ o("div", {
|
|
29
|
-
className: "min-w-0 flex-1",
|
|
30
|
-
children: [/* @__PURE__ */ a("p", {
|
|
31
|
-
className: "text-[11px] uppercase tracking-wider text-status-warning-text",
|
|
32
|
-
children: "Simulating"
|
|
33
|
-
}), /* @__PURE__ */ a("p", {
|
|
34
|
-
className: "truncate text-body-sm font-medium text-text-primary",
|
|
35
|
-
children: _.roleName
|
|
36
|
-
})]
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ a("button", {
|
|
39
|
-
type: "button",
|
|
40
|
-
onClick: v,
|
|
41
|
-
className: "p-1.5 rounded-button text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
42
|
-
"aria-label": "Exit role simulation",
|
|
43
|
-
"data-testid": "persona-simulation-exit",
|
|
44
|
-
children: /* @__PURE__ */ a(i, { className: "size-4" })
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
let b = m.map((e) => ({
|
|
49
|
-
id: e,
|
|
50
|
-
label: e === "everything" ? s : d.find((t) => t.id === e)?.label ?? e
|
|
51
|
-
}));
|
|
52
|
-
return /* @__PURE__ */ o("div", {
|
|
172
|
+
children: c
|
|
173
|
+
}) : /* @__PURE__ */ m("div", {
|
|
53
174
|
className: "flex items-center gap-1",
|
|
54
175
|
"data-testid": "persona-controls",
|
|
55
|
-
children: [/* @__PURE__ */
|
|
56
|
-
className: "min-w-0 flex-1",
|
|
57
|
-
children: [/* @__PURE__ */ a("span", {
|
|
58
|
-
className: "sr-only",
|
|
59
|
-
children: "Menu view"
|
|
60
|
-
}), /* @__PURE__ */ o("select", {
|
|
61
|
-
value: f,
|
|
62
|
-
onChange: (e) => {
|
|
63
|
-
let t = e.target.value;
|
|
64
|
-
h(t === p ? null : t);
|
|
65
|
-
},
|
|
66
|
-
className: "w-full truncate rounded-button border border-border-subtle bg-bg-canvas px-2 py-1.5 text-body-sm text-text-primary hover:bg-bg-sunken transition-colors",
|
|
67
|
-
"data-testid": "persona-surface-select",
|
|
68
|
-
children: [b.map((e) => /* @__PURE__ */ a("option", {
|
|
69
|
-
value: e.id,
|
|
70
|
-
children: e.label
|
|
71
|
-
}, e.id)), !b.some((e) => e.id === f) && /* @__PURE__ */ a("option", {
|
|
72
|
-
value: f,
|
|
73
|
-
children: d.find((e) => e.id === f)?.label ?? f
|
|
74
|
-
})]
|
|
75
|
-
})]
|
|
76
|
-
}), y]
|
|
176
|
+
children: [/* @__PURE__ */ p(g, { everythingLabel: n }), c]
|
|
77
177
|
});
|
|
78
178
|
}
|
|
79
|
-
function
|
|
179
|
+
function v() {
|
|
80
180
|
let e = t();
|
|
81
|
-
return e?.simulation ? /* @__PURE__ */
|
|
181
|
+
return e?.simulation ? /* @__PURE__ */ m("div", {
|
|
82
182
|
className: "fixed bottom-4 left-1/2 z-[120] -translate-x-1/2 flex max-w-[calc(100vw-2rem)] items-center gap-2 rounded-full border border-border-subtle bg-bg-canvas px-4 py-2 shadow-lg",
|
|
83
183
|
style: { marginBottom: "env(safe-area-inset-bottom)" },
|
|
84
184
|
role: "status",
|
|
85
185
|
"data-testid": "persona-simulation-pill",
|
|
86
186
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ p(c, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
|
|
188
|
+
/* @__PURE__ */ m("span", {
|
|
89
189
|
className: "truncate text-body-sm text-text-primary",
|
|
90
190
|
children: [
|
|
91
191
|
"Viewing as ",
|
|
92
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ p("span", {
|
|
93
193
|
className: "font-semibold",
|
|
94
194
|
children: e.simulation.roleName
|
|
95
195
|
}),
|
|
96
196
|
" (simulated)"
|
|
97
197
|
]
|
|
98
198
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ p("button", {
|
|
100
200
|
type: "button",
|
|
101
201
|
onClick: e.stopSimulation,
|
|
102
202
|
className: "rounded-full px-2 py-0.5 text-body-sm font-medium text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
@@ -107,4 +207,4 @@ function c() {
|
|
|
107
207
|
}) : null;
|
|
108
208
|
}
|
|
109
209
|
//#endregion
|
|
110
|
-
export {
|
|
210
|
+
export { v as PersonaSimulationPill, _ as PersonaSurfaceControls };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSideNav.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSideNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAiC,EACjC,aAA0B,GAC3B,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ProductSideNav.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSideNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAiC,EACjC,aAA0B,GAC3B,EAAE,mBAAmB,2CA+GrB"}
|
|
@@ -3,8 +3,8 @@ import { hasMatchingPermission as t, useSafePermissions as n } from "../shared/p
|
|
|
3
3
|
import { useShellUi as r } from "../shared/providers/shell/ShellUiProvider.js";
|
|
4
4
|
import { useSafePersonaSurface as i } from "../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
5
5
|
import { appendContextToPath as a, useCurrentContextSearchParams as o } from "../shared/hooks/useCurrentContextSearchParams.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { applyNavVisibility as s } from "./sideNavigation/navVisibility.js";
|
|
7
|
+
import { SideNavigation as c } from "./SideNavigation.js";
|
|
8
8
|
import { NavCustomizeDialog as l } from "./NavCustomizeDialog.js";
|
|
9
9
|
import { PersonaSimulationPill as u, PersonaSurfaceControls as d } from "./PersonaSurfaceControls.js";
|
|
10
10
|
import { useMemo as f } from "react";
|
|
@@ -23,7 +23,7 @@ function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions:
|
|
|
23
23
|
I,
|
|
24
24
|
F
|
|
25
25
|
]), R = N?.activeSurface ?? null, z = N?.overrides, B = f(() => {
|
|
26
|
-
let { items: e } =
|
|
26
|
+
let { items: e } = s(j.filter((e) => e.visible !== !1).sort((e, t) => (e.order ?? 999) - (t.order ?? 999)), {
|
|
27
27
|
hasPermission: L,
|
|
28
28
|
surfaceVisibleItems: R ? R.visibleItems : null,
|
|
29
29
|
labelOverrides: R?.labelOverrides,
|
|
@@ -66,7 +66,7 @@ function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions:
|
|
|
66
66
|
return /* @__PURE__ */ h("div", {
|
|
67
67
|
"data-tour": "sidenav",
|
|
68
68
|
className: "h-full",
|
|
69
|
-
children: [/* @__PURE__ */ m(
|
|
69
|
+
children: [/* @__PURE__ */ m(c, {
|
|
70
70
|
items: B,
|
|
71
71
|
currentPath: D.pathname,
|
|
72
72
|
collapsed: O,
|
|
@@ -79,7 +79,7 @@ function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions:
|
|
|
79
79
|
header: C ?? U,
|
|
80
80
|
footer: N ? /* @__PURE__ */ m(d, {}) : void 0,
|
|
81
81
|
contextSearchParams: A
|
|
82
|
-
}), N && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(l, {
|
|
82
|
+
}, N ? `${R?.id ?? "everything"}:${P?.roleId ?? ""}` : void 0), N && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(l, {
|
|
83
83
|
groupLabels: x,
|
|
84
84
|
groupOrder: b
|
|
85
85
|
}), /* @__PURE__ */ m(u, {})] })]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSideNavigationState.d.ts","sourceRoot":"","sources":["../../../src/chrome/sideNavigation/useSideNavigationState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useSideNavigationState.d.ts","sourceRoot":"","sources":["../../../src/chrome/sideNavigation/useSideNavigationState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,UAAU,0BAA0B;IAClC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,UAAU,4BAA4B;IACpC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,GACjB,EAAE,0BAA0B,GAAG,4BAA4B,CAkF3D"}
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { findAncestorIds as e } from "./helpers.js";
|
|
2
|
-
import {
|
|
2
|
+
import { NAV_MORE_ID_PREFIX as t } from "./navVisibility.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
3
4
|
//#region src/chrome/sideNavigation/useSideNavigationState.ts
|
|
4
|
-
function
|
|
5
|
-
let [
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
}, [
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
}), r ?
|
|
5
|
+
function o({ items: o, currentPath: s, collapsed: c, onToggleCollapse: l }) {
|
|
6
|
+
let [u, d] = a(/* @__PURE__ */ new Set()), f = i(c);
|
|
7
|
+
return r(() => {
|
|
8
|
+
f.current = c;
|
|
9
|
+
}, [c]), r(() => {
|
|
10
|
+
let n = new Set([...e(o, s)].filter((e) => !e.startsWith(t)));
|
|
11
|
+
n.size > 0 && d((e) => {
|
|
12
|
+
let t = new Set(e), r = !1;
|
|
13
|
+
return n.forEach((e) => {
|
|
14
|
+
t.has(e) || (t.add(e), r = !0);
|
|
15
|
+
}), r ? t : e;
|
|
15
16
|
});
|
|
16
|
-
}, [
|
|
17
|
-
if (typeof window > "u" || !
|
|
17
|
+
}, [s, o]), r(() => {
|
|
18
|
+
if (typeof window > "u" || !l) return;
|
|
18
19
|
let e = window.innerWidth < 768, t = () => {
|
|
19
20
|
let t = window.innerWidth < 768;
|
|
20
|
-
t && (!e || !
|
|
21
|
+
t && (!e || !f.current) && l(), e = t;
|
|
21
22
|
};
|
|
22
23
|
return t(), window.addEventListener("resize", t), () => {
|
|
23
24
|
window.removeEventListener("resize", t);
|
|
24
25
|
};
|
|
25
|
-
}, [
|
|
26
|
-
if (
|
|
26
|
+
}, [l]), r(() => {
|
|
27
|
+
if (c) return;
|
|
27
28
|
let e = (e) => {
|
|
28
|
-
e.key === "Escape" &&
|
|
29
|
+
e.key === "Escape" && !e.defaultPrevented && l && l();
|
|
29
30
|
};
|
|
30
31
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
31
|
-
}, [
|
|
32
|
-
expandedItems:
|
|
33
|
-
toggleExpand:
|
|
34
|
-
|
|
32
|
+
}, [c, l]), {
|
|
33
|
+
expandedItems: u,
|
|
34
|
+
toggleExpand: n((e) => {
|
|
35
|
+
d((t) => {
|
|
35
36
|
let n = new Set(t);
|
|
36
37
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
37
38
|
});
|
|
38
39
|
}, []),
|
|
39
|
-
collapseAll:
|
|
40
|
-
|
|
40
|
+
collapseAll: n(() => {
|
|
41
|
+
d(/* @__PURE__ */ new Set());
|
|
41
42
|
}, [])
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
//#endregion
|
|
45
|
-
export {
|
|
46
|
+
export { o as useSideNavigationState };
|
package/dist/chrome.js
CHANGED
|
@@ -5,24 +5,24 @@ import { HeaderBar as r } from "./chrome/HeaderBar.js";
|
|
|
5
5
|
import { FooterBar as i } from "./chrome/FooterBar.js";
|
|
6
6
|
import { PluginFooterStrip as a } from "./chrome/PluginFooterStrip.js";
|
|
7
7
|
import { DEFAULT_FOOTER_COLUMNS as o, DEFAULT_SOCIAL_LINKS as s, Footer as c } from "./chrome/Footer.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
8
|
+
import { NAV_MORE_ID_PREFIX as l, applyNavVisibility as u, applyPermissionFilter as d, applySurfaceVisibility as f, isItemEffectivelyShown as p } from "./chrome/sideNavigation/navVisibility.js";
|
|
9
|
+
import { SideNavigation as m } from "./chrome/SideNavigation.js";
|
|
10
|
+
import { GlobalSearch as h } from "./chrome/GlobalSearch.js";
|
|
11
|
+
import { CommandPalette as g } from "./chrome/CommandPalette.js";
|
|
12
|
+
import { Breadcrumbs as _ } from "./chrome/Breadcrumbs.js";
|
|
13
|
+
import { NavLink as v } from "./chrome/NavLink.js";
|
|
14
|
+
import { Tabs as y } from "./chrome/Tabs.js";
|
|
15
|
+
import { Sidebar as b } from "./chrome/Sidebar.js";
|
|
16
|
+
import { ProfileSwitcher as x } from "./chrome/ProfileSwitcher.js";
|
|
17
|
+
import { ProductSwitcher as S } from "./chrome/ProductSwitcher.js";
|
|
18
|
+
import { LanguageSwitcher as C } from "./chrome/LanguageSwitcher.js";
|
|
19
|
+
import { ContextSwitcher as w } from "./chrome/ContextSwitcher.js";
|
|
20
|
+
import { GeographySwitcher as T } from "./chrome/GeographySwitcher.js";
|
|
21
|
+
import { NotificationCenter as E } from "./chrome/NotificationCenter.js";
|
|
22
|
+
import { LanguagePickerSheet as D } from "./chrome/LanguagePickerSheet.js";
|
|
23
|
+
import { ProductPickerSheet as O } from "./chrome/ProductPickerSheet.js";
|
|
24
|
+
import { AccountSwitcher as k } from "./chrome/AccountSwitcher.js";
|
|
25
|
+
import { AutoBreadcrumbs as A, registerBreadcrumbName as j, unregisterBreadcrumbName as M } from "./chrome/AutoBreadcrumbs.js";
|
|
26
26
|
import { NavCustomizeDialog as N } from "./chrome/NavCustomizeDialog.js";
|
|
27
27
|
import { PersonaSimulationPill as P, PersonaSurfaceControls as F } from "./chrome/PersonaSurfaceControls.js";
|
|
28
28
|
import { ProductSideNav as I } from "./chrome/ProductSideNav.js";
|
|
@@ -37,4 +37,4 @@ import { PluginToolbar as W } from "./chrome/PluginToolbar.js";
|
|
|
37
37
|
import { PluginWidgetGrid as G } from "./chrome/PluginWidgetGrid.js";
|
|
38
38
|
import { PluginContextMenuTarget as K } from "./chrome/PluginContextMenuTarget.js";
|
|
39
39
|
import { ThemePreferences as q } from "./chrome/ThemePreferences.js";
|
|
40
|
-
export {
|
|
40
|
+
export { k as AccountSwitcher, t as AppShellLayout, A as AutoBreadcrumbs, L as BrandMark, _ as Breadcrumbs, g as CommandPalette, w as ContextSwitcher, o as DEFAULT_FOOTER_COLUMNS, s as DEFAULT_SOCIAL_LINKS, R as DynamicFooter, c as Footer, i as FooterBar, T as GeographySwitcher, h as GlobalSearch, r as HeaderBar, D as LanguagePickerSheet, C as LanguageSwitcher, l as NAV_MORE_ID_PREFIX, N as NavCustomizeDialog, v as NavLink, E as NotificationCenter, n as PageHeader, B as PanelContainer, z as PanelTabs, P as PersonaSimulationPill, F as PersonaSurfaceControls, K as PluginContextMenuTarget, a as PluginFooterStrip, H as PluginRoutes, U as PluginSettingsPage, W as PluginToolbar, G as PluginWidgetGrid, O as ProductPickerSheet, I as ProductSideNav, S as ProductSwitcher, x as ProfileSwitcher, e as ShortcutHelpDialog, m as SideNavigation, b as Sidebar, V as StatusBar, y as Tabs, q as ThemePreferences, u as applyNavVisibility, d as applyPermissionFilter, f as applySurfaceVisibility, p as isItemEffectivelyShown, j as registerBreadcrumbName, M as unregisterBreadcrumbName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaSurfaceProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/PersonaSurfaceProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gFAAgF;IAChF,cA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;IAC9E,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,qEAAqE;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,oDAAoD;IACpD,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,eAAe,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACjD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,uBAAuB,EAAE,OAAO,CAAC;IACjC,yEAAyE;IACzE,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AA8BD,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,EAAE,CAcpF;AAMD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAAE,EACpC,SAAS,EAAE,MAAM,EAAE,GAClB,MAAM,CASR;
|
|
1
|
+
{"version":3,"file":"PersonaSurfaceProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/PersonaSurfaceProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,EAAE,CA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eof window > "u")) try {
|
|
70
|
-
|
|
70
|
+
let n = Object.values(t.overridesBySurface ?? {}).some((e) => Object.keys(e).length > 0);
|
|
71
|
+
!t.surfaceId && !n ? window.localStorage.removeItem(e) : window.localStorage.setItem(e, JSON.stringify(t));
|
|
71
72
|
} catch {}
|
|
72
73
|
}
|
|
73
74
|
var b = "\n query NavSimulatableRoles($scopeId: String!, $filter: RoleFilterInput, $pagination: PaginationInput) {\n roles(scopeId: $scopeId, filter: $filter, pagination: $pagination) {\n id\n name\n templateKey\n priority\n defaultPermissions {\n resourceType\n level\n }\n }\n }\n";
|
|
@@ -143,20 +144,23 @@ function x({ children: n, surfaces: r, productKey: f, gateway: p = "workspace" }
|
|
|
143
144
|
...t,
|
|
144
145
|
surfaceId: e ?? void 0
|
|
145
146
|
}));
|
|
146
|
-
}, [E]), U = o(() => w.
|
|
147
|
+
}, [E]), U = o(() => w.overridesBySurface?.[z] ?? {}, [w.overridesBySurface, z]), W = i((e, t) => {
|
|
147
148
|
E((n) => {
|
|
148
|
-
let r = { ...n.
|
|
149
|
-
return t === null ? delete
|
|
149
|
+
let r = { ...n.overridesBySurface ?? {} }, i = { ...r[z] ?? {} };
|
|
150
|
+
return t === null ? delete i[e] : i[e] = t, Object.keys(i).length === 0 ? delete r[z] : r[z] = i, {
|
|
150
151
|
...n,
|
|
151
|
-
|
|
152
|
+
overridesBySurface: r
|
|
152
153
|
};
|
|
153
154
|
});
|
|
154
|
-
}, [E]), G = i(() => {
|
|
155
|
-
E((e) =>
|
|
156
|
-
...e
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
}, [E, z]), G = i(() => {
|
|
156
|
+
E((e) => {
|
|
157
|
+
let t = { ...e.overridesBySurface ?? {} };
|
|
158
|
+
return delete t[z], {
|
|
159
|
+
...e,
|
|
160
|
+
overridesBySurface: t
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
}, [E, z]), [K, q] = s(!1), J = o(() => ({
|
|
160
164
|
surfaces: r,
|
|
161
165
|
activeSurfaceId: z,
|
|
162
166
|
activeSurface: B,
|