@nivaro/react 0.3.45 → 0.3.47
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +290 -23
- package/dist/index.js +679 -659
- package/dist/shared/components/BaseMap.js +149 -103
- package/dist/shared/components/CollectionBrowserView.js +813 -826
- package/dist/shared/components/ErrorNotice.js +169 -0
- package/dist/shared/components/ErrorSurface.js +23 -17
- package/dist/shared/components/ListLoadError.js +8 -29
- package/dist/shared/components/LoadErrorNote.js +38 -21
- package/dist/shared/components/QueryErrorState.js +8 -11
- package/dist/shared/components/ReportView.js +1320 -1291
- package/dist/shared/components/chat/ChannelArchive.js +60 -60
- package/dist/shared/components/chat/ChannelExtras.js +74 -74
- package/dist/shared/components/chat/ChatPanel.js +368 -367
- package/dist/shared/components/command-center/CommandCenterView.js +313 -69
- package/dist/shared/components/command-center/Customize.js +353 -0
- package/dist/shared/components/command-center/Header.js +279 -53
- package/dist/shared/components/command-center/KioskLinks.js +198 -0
- package/dist/shared/components/command-center/PeekPanel.js +144 -3
- package/dist/shared/components/command-center/announce.js +13 -0
- package/dist/shared/components/command-center/board-prefs.js +99 -0
- package/dist/shared/components/command-center/freshness.js +29 -0
- package/dist/shared/components/command-center/layout.js +56 -0
- package/dist/shared/components/command-center/panels/AttentionPanel.js +132 -3
- package/dist/shared/components/command-center/panels/Banner.js +75 -0
- package/dist/shared/components/command-center/panels/BoardSettings.js +224 -0
- package/dist/shared/components/command-center/panels/FeedPanel.js +145 -29
- package/dist/shared/components/command-center/panels/FlowPanel.js +154 -56
- package/dist/shared/components/command-center/panels/ForecastPanel.js +244 -3
- package/dist/shared/components/command-center/panels/MapLegend.js +266 -0
- package/dist/shared/components/command-center/panels/MapPanel.js +216 -66
- package/dist/shared/components/command-center/panels/PartnersPanel.js +49 -3
- package/dist/shared/components/command-center/panels/PeoplePanel.js +258 -40
- package/dist/shared/components/command-center/panels/RegionPicker.js +88 -3
- package/dist/shared/components/command-center/panels/SystemPanel.js +158 -38
- package/dist/shared/components/command-center/panels/ThroughputPanel.js +307 -3
- package/dist/shared/components/command-center/panels/TimeBar.js +227 -6
- package/dist/shared/components/command-center/panels/TrafficPanel.js +12 -8
- package/dist/shared/components/command-center/panels/WorkloadPanel.js +82 -3
- package/dist/shared/components/command-center/panels/attention-actions.js +267 -0
- package/dist/shared/components/command-center/panels/map-shared.js +95 -0
- package/dist/shared/components/command-center/panels/registry.js +87 -19
- package/dist/shared/components/command-center/shell-hooks.js +118 -0
- package/dist/shared/components/command-center/shortcuts.js +37 -0
- package/dist/shared/components/command-center/theme.js +39 -21
- package/dist/shared/components/command-center/time.js +52 -0
- package/dist/shared/components/command-center/url-state.js +54 -0
- package/dist/shared/components/command-center/work-links.js +32 -0
- package/dist/shared/components/help-videos/editor/ClipsPanel.js +49 -48
- package/dist/shared/components/help-videos/editor/PublishButton.js +37 -36
- package/dist/shared/components/help-videos/editor/StatsTab.js +45 -44
- package/dist/shared/components/help-videos/editor/VersionsTab.js +29 -28
- package/dist/shared/components/help-videos/library/AuthorRolesButton.js +19 -18
- package/dist/shared/components/help-videos/library/HelpVideoLibrary.js +132 -129
- package/dist/shared/components/help-videos/library/LearningPathsPanel.js +42 -41
- package/dist/shared/components/help-videos/settings/HouseStyleButton.js +21 -20
- package/dist/shared/components/help-videos/settings/RenderSettingsButton.js +22 -21
- package/dist/shared/components/import/DocumentAutofillButton.js +24 -20
- package/dist/shared/components/import/ImportFromFileButton.js +61 -60
- package/dist/shared/components/imports/ImportStalenessControl.js +20 -21
- package/dist/shared/components/imports/NewImportDialog.js +29 -28
- package/dist/shared/components/imports/RunDetailSheet.js +63 -63
- package/dist/shared/components/item-edit/FieldRow.js +329 -329
- package/dist/shared/components/item-edit/InlineTableField.js +898 -898
- package/dist/shared/components/item-edit/PersonalDefaultControl.js +57 -56
- package/dist/shared/components/item-edit/PlanGrid.js +220 -221
- package/dist/shared/components/item-edit/RecordGrantTools.js +49 -48
- package/dist/shared/components/item-edit/placement-behaviour.js +68 -67
- package/dist/shared/components/layout-editor/inspector/ColumnFit.js +24 -23
- package/dist/shared/components/layout-editor/inspector/PickerPreview.js +17 -16
- package/dist/shared/components/layout-editor/matrix/FieldStateMatrix.js +41 -41
- package/dist/shared/components/layout-editor/outputs/output-api.js +33 -31
- package/dist/shared/components/layout-editor/overview/overview-api.js +84 -83
- package/dist/shared/components/layout-editor/useLayoutDraft.js +47 -42
- package/dist/shared/components/monitoring/InactiveUserLinksView.js +10 -9
- package/dist/shared/components/monitoring/TrafficMiniMap.js +111 -70
- package/dist/shared/components/panels/SlaClock.js +35 -36
- package/dist/shared/components/pipeline/PipelineEditorView.js +311 -312
- package/dist/shared/components/pipeline/TeamSuggestions.js +31 -30
- package/dist/shared/components/profile/AgentsPanel.js +73 -72
- package/dist/shared/components/profile/MailSuppressedPill.js +22 -21
- package/dist/shared/components/support/SupportRequestDialog.js +85 -81
- package/dist/shared/components/support/SupportView.js +94 -87
- package/dist/shared/lib/autofill-poll.js +21 -18
- package/dist/shared/lib/error-actions.js +85 -0
- package/dist/shared/lib/error-message.js +223 -82
- package/dist/shared/lib/error-toast.js +71 -13
- package/dist/shared/lib/safe-error.js +136 -38
- package/package.json +1 -1
|
@@ -1,96 +1,340 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as ge } from "@tanstack/react-query";
|
|
3
|
+
import { MapPinned as ve } from "lucide-react";
|
|
4
|
+
import { useState as i, useRef as K, useEffect as B, useMemo as Q, useCallback as J, useContext as xe } from "react";
|
|
5
|
+
import { createPortal as ye } from "react-dom";
|
|
6
|
+
import { useNavigation as we } from "../../context.js";
|
|
7
|
+
import { attentionCount as ke, attentionAnnouncement as be } from "./announce.js";
|
|
8
|
+
import { useCcQuery as Z } from "./api.js";
|
|
9
|
+
import { useCcPrefs as Ce, useKioskInfo as Ne, DEFAULT_PREFS as Ee } from "./board-prefs.js";
|
|
10
|
+
import { CustomizeSheet as _e } from "./Customize.js";
|
|
11
|
+
import { countFailures as Ae } from "./freshness.js";
|
|
12
|
+
import { Header as Pe } from "./Header.js";
|
|
13
|
+
import { effectiveLayout as Te, resolvePanels as Fe, arrangeBoard as Me, boardSizeFor as Oe } from "./layout.js";
|
|
14
|
+
import { PeekPanel as Se } from "./PeekPanel.js";
|
|
15
|
+
import { BoardBanner as De } from "./panels/Banner.js";
|
|
16
|
+
import { CC_PANELS as Ue } from "./panels/registry.js";
|
|
17
|
+
import { useFullscreen as Ie, useWindowWidth as Re, usePeekFocus as $e, useRegionCycle as ze } from "./shell-hooks.js";
|
|
18
|
+
import { shortcutFor as Le, regionForIndex as Ke, FOCUS_REGION_EVENT as Be, REGION_PICKER_ATTR as Qe } from "./shortcuts.js";
|
|
19
|
+
import { EMPTY_FILTERS as He, CcContext as X } from "./state.js";
|
|
20
|
+
import { useAppIsDark as je, boardMode as Ve, MUTED as qe, ccVars as ue, BUTTON as ce, FOCUS as de } from "./theme.js";
|
|
21
|
+
import { EMPTY_URL_STATE as Ge, parseBoardUrl as We, windowUrlAdapter as Ye, writeBoardUrl as Ze } from "./url-state.js";
|
|
22
|
+
function Ct({
|
|
11
23
|
/** Fallback map collections when the instance has no Command Center config yet. */
|
|
12
|
-
geoCollections:
|
|
13
|
-
recordUrl:
|
|
14
|
-
isAdmin:
|
|
15
|
-
kiosk:
|
|
24
|
+
geoCollections: H = ["locations"],
|
|
25
|
+
recordUrl: A,
|
|
26
|
+
isAdmin: C = !1,
|
|
27
|
+
kiosk: s = null,
|
|
28
|
+
urlAdapter: j
|
|
16
29
|
}) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
var L, c;
|
|
31
|
+
const { navigate: U } = we(), P = ge(), d = je(), y = s ? null : j ?? Ye, [f] = i(() => y ? We(y.read()) : Ge), [p, I] = i(f.region), [n, N] = i(f.at), [m, R] = i(f.map), [$, V] = i(He), [E, T] = i(f.peek), [h, q] = i(f.tv || !!s), [F, G] = i(null), [ee, g] = i(!1), v = Ie(), M = Ce(!s), x = s ? null : M.data ?? null, w = Ne(s), a = K(!1);
|
|
32
|
+
B(() => {
|
|
33
|
+
const r = w.data;
|
|
34
|
+
!r || a.current || (a.current = !0, r.region && I(r.region), r.map_collection && R(r.map_collection));
|
|
35
|
+
}, [w.data]), B(() => {
|
|
36
|
+
y && y.replace(Ze(y.read(), { region: p, at: n, map: m, peek: E, tv: h }));
|
|
37
|
+
}, [y, p, n, m, E, h]);
|
|
38
|
+
const O = Q(
|
|
39
|
+
() => A ?? ((r, b) => `/collections/${r}/${b}`),
|
|
40
|
+
[A]
|
|
41
|
+
), z = J(
|
|
42
|
+
(r) => {
|
|
43
|
+
s || U(r);
|
|
44
|
+
},
|
|
45
|
+
[s, U]
|
|
46
|
+
), k = J(
|
|
47
|
+
() => void P.invalidateQueries({ queryKey: ["command-center"] }),
|
|
48
|
+
[P]
|
|
49
|
+
), S = Ve({ appDark: d, theme: x == null ? void 0 : x.theme, tv: h, kiosk: !!s }), W = Q(
|
|
21
50
|
() => ({
|
|
22
|
-
isAdmin:
|
|
23
|
-
kiosk:
|
|
51
|
+
isAdmin: C,
|
|
52
|
+
kiosk: s,
|
|
24
53
|
config: null,
|
|
25
54
|
snapshot: null,
|
|
26
55
|
snapshotError: !1,
|
|
27
56
|
updatedAt: null,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
snapshotLoading: !0,
|
|
58
|
+
snapshotFailures: 0,
|
|
59
|
+
refresh: k,
|
|
60
|
+
prefs: x,
|
|
61
|
+
mode: S,
|
|
62
|
+
region: p,
|
|
63
|
+
setRegion: I,
|
|
64
|
+
at: n,
|
|
65
|
+
setAt: N,
|
|
66
|
+
mapCollection: m,
|
|
67
|
+
setMapCollection: R,
|
|
68
|
+
filters: $,
|
|
69
|
+
setFilters: V,
|
|
70
|
+
peek: E,
|
|
71
|
+
// A wallboard opens no record (the server refuses /peek for a link as well).
|
|
72
|
+
setPeek: s ? Xe : T,
|
|
73
|
+
focusMap: (r) => G({ ...r, nonce: Date.now() }),
|
|
74
|
+
mapFocus: F,
|
|
75
|
+
tv: h,
|
|
76
|
+
setTv: (r) => q(s ? !0 : r),
|
|
77
|
+
fullscreen: v.on,
|
|
78
|
+
toggleFullscreen: v.toggle,
|
|
79
|
+
openCustomize: () => g(!0),
|
|
80
|
+
navigate: z,
|
|
81
|
+
recordUrl: O
|
|
46
82
|
}),
|
|
47
|
-
[
|
|
83
|
+
[
|
|
84
|
+
C,
|
|
85
|
+
s,
|
|
86
|
+
k,
|
|
87
|
+
x,
|
|
88
|
+
S,
|
|
89
|
+
p,
|
|
90
|
+
n,
|
|
91
|
+
m,
|
|
92
|
+
$,
|
|
93
|
+
E,
|
|
94
|
+
F,
|
|
95
|
+
h,
|
|
96
|
+
v.on,
|
|
97
|
+
v.toggle,
|
|
98
|
+
z,
|
|
99
|
+
O
|
|
100
|
+
]
|
|
101
|
+
);
|
|
102
|
+
return s && w.isError ? /* @__PURE__ */ t(et, {}) : /* @__PURE__ */ t(X.Provider, { value: W, children: /* @__PURE__ */ t(
|
|
103
|
+
tt,
|
|
104
|
+
{
|
|
105
|
+
fallbackCollections: H,
|
|
106
|
+
exitFullscreen: v.exit,
|
|
107
|
+
customizeOpen: ee,
|
|
108
|
+
setCustomizeOpen: g,
|
|
109
|
+
kioskLabel: ((L = w.data) == null ? void 0 : L.label) ?? null,
|
|
110
|
+
kioskRegionPinned: !!((c = w.data) != null && c.region)
|
|
111
|
+
}
|
|
112
|
+
) });
|
|
113
|
+
}
|
|
114
|
+
const Je = /* @__PURE__ */ new Set(["feed", "workload"]), Xe = () => {
|
|
115
|
+
};
|
|
116
|
+
function et() {
|
|
117
|
+
return /* @__PURE__ */ u(
|
|
118
|
+
"main",
|
|
119
|
+
{
|
|
120
|
+
className: "flex min-h-screen flex-col items-center justify-center gap-2 bg-[var(--cc-bg)] p-6 text-center",
|
|
121
|
+
style: ue("dark"),
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ t("h1", { className: "text-[18px] font-semibold text-[var(--cc-strong)]", children: "This wallboard link no longer works" }),
|
|
124
|
+
/* @__PURE__ */ t("p", { className: `max-w-md text-[14px] ${qe}`, children: "It may have expired or been turned off. Ask an administrator for a new link." })
|
|
125
|
+
]
|
|
126
|
+
}
|
|
48
127
|
);
|
|
49
|
-
return /* @__PURE__ */ t(g.Provider, { value: w, children: /* @__PURE__ */ t(L, { fallbackCollections: p, appDark: u }) });
|
|
50
128
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
129
|
+
const me = 1.25;
|
|
130
|
+
function tt({
|
|
131
|
+
fallbackCollections: H,
|
|
132
|
+
exitFullscreen: A,
|
|
133
|
+
customizeOpen: C,
|
|
134
|
+
setCustomizeOpen: s,
|
|
135
|
+
kioskLabel: j,
|
|
136
|
+
kioskRegionPinned: U
|
|
54
137
|
}) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
138
|
+
var oe, re, ae, se;
|
|
139
|
+
const P = xe(X);
|
|
140
|
+
if (!P) throw new Error("Command Center board outside its provider");
|
|
141
|
+
const d = Z("/snapshot", void 0, {
|
|
142
|
+
refetchInterval: 2e4,
|
|
143
|
+
retry: 1
|
|
144
|
+
}), f = Z("/config", void 0, {
|
|
58
145
|
staleTime: 5 * 6e4,
|
|
59
146
|
lenses: !1,
|
|
60
147
|
retry: !1
|
|
61
148
|
}).data ?? {
|
|
62
|
-
geo_collections:
|
|
149
|
+
geo_collections: H.map((o) => ({ key: o, label: "" })),
|
|
63
150
|
regions: [],
|
|
64
151
|
region_label: null,
|
|
65
152
|
stuck_days: 7
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
153
|
+
}, p = K({ dataAt: 0, errors: 0 });
|
|
154
|
+
d.dataUpdatedAt !== p.current.dataAt && (p.current = { dataAt: d.dataUpdatedAt, errors: d.errorUpdateCount });
|
|
155
|
+
const I = Ae(d.errorUpdateCount, p.current.errors), n = {
|
|
156
|
+
...P,
|
|
157
|
+
config: f,
|
|
158
|
+
snapshot: d.data ?? null,
|
|
159
|
+
snapshotError: d.isError,
|
|
160
|
+
updatedAt: d.dataUpdatedAt || null,
|
|
161
|
+
snapshotLoading: d.isPending,
|
|
162
|
+
snapshotFailures: I
|
|
163
|
+
}, { tv: N, kiosk: m, peek: R, fullscreen: $, region: V, setRegion: E } = n, [T, h] = i(!1), [q, F] = i(!1), G = Re(), g = Oe(G / (N ? me : 1)), v = J(
|
|
164
|
+
(o) => {
|
|
165
|
+
var e;
|
|
166
|
+
return !(n.kiosk && Je.has(o.key)) && (!o.adminOnly || n.isAdmin || !!((e = n.snapshot) != null && e.health));
|
|
167
|
+
},
|
|
168
|
+
[n.isAdmin, n.kiosk, (oe = n.snapshot) == null ? void 0 : oe.health]
|
|
169
|
+
), M = Q(() => Ue.filter(v), [v]), x = Te((re = n.prefs) == null ? void 0 : re.layout, (ae = n.prefs) == null ? void 0 : ae.role_default), w = Q(() => {
|
|
170
|
+
const o = new Map(M.map((e) => [e.key, e]));
|
|
171
|
+
return Fe(
|
|
172
|
+
M.map((e) => e.key),
|
|
173
|
+
x
|
|
174
|
+
).filter((e) => e.visible).map((e) => o.get(e.key)).filter((e) => !!e);
|
|
175
|
+
}, [M, x]), a = Me(w, g);
|
|
176
|
+
$e(!!R), ze({
|
|
177
|
+
// A wallboard stays on the board its link opens on (the server pins it too).
|
|
178
|
+
enabled: N && !m && !U,
|
|
179
|
+
regionIds: f.regions.map((o) => o.id),
|
|
180
|
+
current: V,
|
|
181
|
+
setRegion: E,
|
|
182
|
+
intervalMs: (((se = n.prefs) == null ? void 0 : se.tv_cycle_seconds) ?? Ee.tv_cycle_seconds ?? 30) * 1e3
|
|
183
|
+
});
|
|
184
|
+
const O = K({ state: n, helpOpen: T, customizeOpen: C });
|
|
185
|
+
O.current = { state: n, helpOpen: T, customizeOpen: C }, B(() => {
|
|
186
|
+
const o = (e) => {
|
|
187
|
+
var le, ie;
|
|
188
|
+
const Y = Le(e);
|
|
189
|
+
if (!Y) return;
|
|
190
|
+
const { state: l, helpOpen: pe, customizeOpen: he } = O.current;
|
|
191
|
+
if (he || pe) return;
|
|
192
|
+
const D = e.target;
|
|
193
|
+
if (!((le = D == null ? void 0 : D.closest) != null && le.call(D, '[role="dialog"]:not([data-cc-peek]), [role="menu"], [role="listbox"]')))
|
|
194
|
+
switch (Y.kind) {
|
|
195
|
+
case "escape":
|
|
196
|
+
l.peek ? (e.preventDefault(), l.setPeek(null)) : l.fullscreen ? A() : l.tv && !l.kiosk && l.setTv(!1);
|
|
197
|
+
return;
|
|
198
|
+
case "fullscreen":
|
|
199
|
+
e.preventDefault(), l.toggleFullscreen();
|
|
200
|
+
return;
|
|
201
|
+
case "tv":
|
|
202
|
+
e.preventDefault(), l.setTv(!l.tv);
|
|
203
|
+
return;
|
|
204
|
+
case "refresh":
|
|
205
|
+
e.preventDefault(), l.refresh();
|
|
206
|
+
return;
|
|
207
|
+
case "focus-region": {
|
|
208
|
+
if (l.kiosk) return;
|
|
209
|
+
e.preventDefault(), window.dispatchEvent(new CustomEvent(Be));
|
|
210
|
+
const _ = document.querySelector(`[${Qe}]`);
|
|
211
|
+
_ && !_.contains(document.activeElement) && _.focus();
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
case "region": {
|
|
215
|
+
if (l.kiosk) return;
|
|
216
|
+
const _ = Ke(((ie = l.config) == null ? void 0 : ie.regions) ?? [], Y.index);
|
|
217
|
+
if (_ === void 0) return;
|
|
218
|
+
e.preventDefault(), l.setRegion(_);
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
case "help":
|
|
222
|
+
e.preventDefault(), h(!0);
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
227
|
+
}, [A]);
|
|
228
|
+
const z = Z("/attention", void 0, { enabled: !1 }), k = ke(z.data), S = K(null), [W, L] = i("");
|
|
229
|
+
B(() => {
|
|
230
|
+
if (k === null) return;
|
|
231
|
+
const o = be(S.current, k);
|
|
232
|
+
S.current = k, o && L(o);
|
|
233
|
+
}, [k]);
|
|
234
|
+
const c = (o) => o.map((e) => /* @__PURE__ */ t("div", { className: "min-w-0", "data-cc-slot": e.key, children: /* @__PURE__ */ t(e.component, {}) }, e.key)), r = (o) => a.main.map(
|
|
235
|
+
(e) => g === "phone" && !q ? /* @__PURE__ */ u(
|
|
236
|
+
"button",
|
|
237
|
+
{
|
|
238
|
+
type: "button",
|
|
239
|
+
"aria-expanded": !1,
|
|
240
|
+
onClick: () => F(!0),
|
|
241
|
+
className: `${ce} flex w-full items-center justify-center gap-2 py-2.5 text-[12.5px] ${de}`,
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ t(ve, { className: "h-4 w-4", "aria-hidden": !0 }),
|
|
244
|
+
"Show map"
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
e.key
|
|
248
|
+
) : /* @__PURE__ */ u(
|
|
249
|
+
"div",
|
|
250
|
+
{
|
|
251
|
+
"data-cc-slot": e.key,
|
|
252
|
+
className: o ? "flex min-h-[420px] min-w-0 flex-1 flex-col [&>*]:flex-1" : "min-w-0",
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ t(e.component, {}),
|
|
255
|
+
g === "phone" && /* @__PURE__ */ t(
|
|
256
|
+
"button",
|
|
257
|
+
{
|
|
258
|
+
type: "button",
|
|
259
|
+
"aria-expanded": !0,
|
|
260
|
+
onClick: () => F(!1),
|
|
261
|
+
className: `${ce} mt-2 w-full ${de}`,
|
|
262
|
+
children: "Hide map"
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
e.key
|
|
268
|
+
)
|
|
269
|
+
);
|
|
270
|
+
let b;
|
|
271
|
+
a.columns === "three" ? b = /* @__PURE__ */ u("div", { className: "grid min-h-0 flex-1 grid-cols-[340px_minmax(0,1fr)_360px] gap-3", children: [
|
|
272
|
+
/* @__PURE__ */ t(
|
|
273
|
+
"section",
|
|
274
|
+
{
|
|
275
|
+
"aria-label": "Needs someone now",
|
|
276
|
+
className: "flex min-h-0 flex-col gap-3 overflow-y-auto",
|
|
277
|
+
children: c(a.lead)
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ u("div", { className: "flex min-h-0 min-w-0 flex-col gap-3", children: [
|
|
281
|
+
r(!0),
|
|
282
|
+
c(a.under)
|
|
283
|
+
] }),
|
|
284
|
+
/* @__PURE__ */ t(
|
|
285
|
+
"aside",
|
|
286
|
+
{
|
|
287
|
+
"aria-label": "More on the board",
|
|
288
|
+
className: "flex min-h-0 flex-col gap-3 overflow-y-auto",
|
|
289
|
+
children: c(a.rail)
|
|
290
|
+
}
|
|
291
|
+
)
|
|
292
|
+
] }) : a.columns === "two" ? b = /* @__PURE__ */ u("div", { className: "grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_380px] gap-3", children: [
|
|
293
|
+
/* @__PURE__ */ u("div", { className: "flex min-h-0 min-w-0 flex-col gap-3", children: [
|
|
294
|
+
r(!0),
|
|
295
|
+
c(a.under)
|
|
296
|
+
] }),
|
|
297
|
+
/* @__PURE__ */ t(
|
|
298
|
+
"aside",
|
|
299
|
+
{
|
|
300
|
+
"aria-label": "More on the board",
|
|
301
|
+
className: "flex min-h-0 flex-col gap-3 overflow-y-auto",
|
|
302
|
+
children: c(a.rail)
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
] }) : b = /* @__PURE__ */ u("div", { className: "flex flex-col gap-3", children: [
|
|
306
|
+
a.lead.length > 0 && /* @__PURE__ */ t("section", { "aria-label": "Needs someone now", className: "flex flex-col gap-3", children: c(a.lead) }),
|
|
307
|
+
r(!1),
|
|
308
|
+
/* @__PURE__ */ t(
|
|
309
|
+
"aside",
|
|
310
|
+
{
|
|
311
|
+
"aria-label": "More on the board",
|
|
312
|
+
className: `grid gap-3 ${g === "medium" ? "grid-cols-2" : "grid-cols-1"}`,
|
|
313
|
+
children: c(a.rail)
|
|
314
|
+
}
|
|
315
|
+
),
|
|
316
|
+
c(a.under)
|
|
317
|
+
] });
|
|
318
|
+
const fe = a.columns !== "one", te = $ && !m, ne = /* @__PURE__ */ t(X.Provider, { value: n, children: /* @__PURE__ */ u(
|
|
77
319
|
"div",
|
|
78
320
|
{
|
|
79
|
-
className:
|
|
80
|
-
style:
|
|
81
|
-
"data-cc-mode":
|
|
321
|
+
className: `relative flex min-w-0 flex-col gap-3 bg-[var(--cc-bg)] p-3 text-[var(--cc-text)] sm:p-4 ${fe ? "h-full min-h-0 flex-1" : "min-h-full flex-1"} ${te ? "fixed inset-0 z-[45] overflow-auto" : ""} ${m ? "min-h-screen" : ""}`,
|
|
322
|
+
style: { ...ue(n.mode), ...N ? { zoom: me } : {} },
|
|
323
|
+
"data-cc-mode": n.mode,
|
|
324
|
+
"data-cc-tv": N ? "1" : void 0,
|
|
325
|
+
"data-cc-size": g,
|
|
82
326
|
children: [
|
|
83
|
-
/* @__PURE__ */ t(T,
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ t(D, {})
|
|
327
|
+
/* @__PURE__ */ t(Pe, { helpOpen: T, onHelpOpenChange: h, kioskLabel: j }),
|
|
328
|
+
/* @__PURE__ */ t(De, {}),
|
|
329
|
+
m ? /* @__PURE__ */ t("main", { className: "flex min-h-0 flex-1 flex-col", children: b }) : /* @__PURE__ */ t("section", { "aria-label": "Command Center board", className: "flex min-h-0 flex-1 flex-col", children: b }),
|
|
330
|
+
/* @__PURE__ */ t(Se, {}),
|
|
331
|
+
/* @__PURE__ */ t("div", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: W }),
|
|
332
|
+
!m && /* @__PURE__ */ t(_e, { open: C, onOpenChange: s })
|
|
90
333
|
]
|
|
91
334
|
}
|
|
92
335
|
) });
|
|
336
|
+
return te && typeof document < "u" ? ye(ne, document.body) : ne;
|
|
93
337
|
}
|
|
94
338
|
export {
|
|
95
|
-
|
|
339
|
+
Ct as CommandCenterView
|
|
96
340
|
};
|