kaafil-react-uikit 0.4.1 → 0.4.2
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/CHANGELOG.md +28 -5
- package/dist/admin/index.cjs +355 -353
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +16 -14
- package/dist/admin/index.js.map +1 -1
- package/dist/{chunk-EP4VCID7.js → chunk-3E2FN5JJ.js} +3 -3
- package/dist/{chunk-EP4VCID7.js.map → chunk-3E2FN5JJ.js.map} +1 -1
- package/dist/{chunk-TPBKRXEB.cjs → chunk-3RZDHDEY.cjs} +17 -17
- package/dist/{chunk-TPBKRXEB.cjs.map → chunk-3RZDHDEY.cjs.map} +1 -1
- package/dist/chunk-62HCQWZL.cjs +12 -0
- package/dist/chunk-62HCQWZL.cjs.map +1 -0
- package/dist/{chunk-ABWNV4N4.js → chunk-6FUVFVYY.js} +97 -4
- package/dist/chunk-6FUVFVYY.js.map +1 -0
- package/dist/{chunk-BUE2GJDN.js → chunk-762SWUEG.js} +3 -3
- package/dist/{chunk-BUE2GJDN.js.map → chunk-762SWUEG.js.map} +1 -1
- package/dist/{chunk-CCJ5XNWY.cjs → chunk-CK3L6Y43.cjs} +98 -2
- package/dist/chunk-CK3L6Y43.cjs.map +1 -0
- package/dist/{chunk-XBYLSJOS.cjs → chunk-DI77H7ED.cjs} +83 -83
- package/dist/{chunk-XBYLSJOS.cjs.map → chunk-DI77H7ED.cjs.map} +1 -1
- package/dist/{chunk-5DVTAEQC.js → chunk-EDLIJSMR.js} +5 -5
- package/dist/{chunk-5DVTAEQC.js.map → chunk-EDLIJSMR.js.map} +1 -1
- package/dist/{chunk-DABF4PUI.js → chunk-ITGVRN2S.js} +3 -3
- package/dist/{chunk-DABF4PUI.js.map → chunk-ITGVRN2S.js.map} +1 -1
- package/dist/{chunk-DUZG6A22.cjs → chunk-LO3GQFQ6.cjs} +4 -4
- package/dist/{chunk-DUZG6A22.cjs.map → chunk-LO3GQFQ6.cjs.map} +1 -1
- package/dist/{chunk-4LZXDRAD.cjs → chunk-QD4Z5DRT.cjs} +12 -12
- package/dist/{chunk-4LZXDRAD.cjs.map → chunk-QD4Z5DRT.cjs.map} +1 -1
- package/dist/{chunk-VAJ4D7EF.js → chunk-QMUIZHJO.js} +510 -16
- package/dist/chunk-QMUIZHJO.js.map +1 -0
- package/dist/{chunk-TV5QTT44.js → chunk-RW6TJMRK.js} +3 -3
- package/dist/{chunk-TV5QTT44.js.map → chunk-RW6TJMRK.js.map} +1 -1
- package/dist/{chunk-2D4Y4LOT.cjs → chunk-V6UQ6GIM.cjs} +551 -48
- package/dist/chunk-V6UQ6GIM.cjs.map +1 -0
- package/dist/chunk-XU7GP53M.js +10 -0
- package/dist/chunk-XU7GP53M.js.map +1 -0
- package/dist/{chunk-DDSNXKFN.cjs → chunk-XYIOM75D.cjs} +9 -9
- package/dist/{chunk-DDSNXKFN.cjs.map → chunk-XYIOM75D.cjs.map} +1 -1
- package/dist/core/index.cjs +153 -613
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +36 -1
- package/dist/core/index.d.ts +36 -1
- package/dist/core/index.js +21 -511
- package/dist/core/index.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/manager/index.cjs +239 -239
- package/dist/manager/index.js +6 -6
- package/dist/traveller/index.cjs +35 -35
- package/dist/traveller/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-2D4Y4LOT.cjs.map +0 -1
- package/dist/chunk-2JABR4FF.js +0 -105
- package/dist/chunk-2JABR4FF.js.map +0 -1
- package/dist/chunk-ABWNV4N4.js.map +0 -1
- package/dist/chunk-CCJ5XNWY.cjs.map +0 -1
- package/dist/chunk-KDGBJPPZ.cjs +0 -110
- package/dist/chunk-KDGBJPPZ.cjs.map +0 -1
- package/dist/chunk-VAJ4D7EF.js.map +0 -1
package/dist/core/index.cjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
3
|
+
var chunkXYIOM75D_cjs = require('../chunk-XYIOM75D.cjs');
|
|
4
|
+
var chunkV6UQ6GIM_cjs = require('../chunk-V6UQ6GIM.cjs');
|
|
5
|
+
var chunkDI77H7ED_cjs = require('../chunk-DI77H7ED.cjs');
|
|
6
|
+
var chunk3RZDHDEY_cjs = require('../chunk-3RZDHDEY.cjs');
|
|
7
|
+
var chunk62HCQWZL_cjs = require('../chunk-62HCQWZL.cjs');
|
|
8
|
+
var chunkLO3GQFQ6_cjs = require('../chunk-LO3GQFQ6.cjs');
|
|
9
|
+
var chunkCK3L6Y43_cjs = require('../chunk-CK3L6Y43.cjs');
|
|
10
10
|
var client = require('kaafil-js/client');
|
|
11
11
|
var react = require('react');
|
|
12
|
-
var reactDom = require('react-dom');
|
|
13
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
14
13
|
|
|
15
14
|
var NotImplementedError = class _NotImplementedError extends Error {
|
|
@@ -26,10 +25,10 @@ var NotImplementedError = class _NotImplementedError extends Error {
|
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
function useBlobStatus(blobId) {
|
|
29
|
-
const engine = react.useContext(
|
|
28
|
+
const engine = react.useContext(chunkCK3L6Y43_cjs.OfflineEngineContext);
|
|
30
29
|
const [, forceRefresh] = react.useState(0);
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
chunkCK3L6Y43_cjs.useOfflineEvent("sync.drained", () => forceRefresh((tick) => tick + 1));
|
|
31
|
+
chunkCK3L6Y43_cjs.useOfflineEvent("sync.error", () => forceRefresh((tick) => tick + 1));
|
|
33
32
|
const record = engine?.blobs?.all().find((candidate) => candidate.id === blobId);
|
|
34
33
|
if (record === void 0) {
|
|
35
34
|
return { status: "pending", progress: void 0 };
|
|
@@ -38,7 +37,7 @@ function useBlobStatus(blobId) {
|
|
|
38
37
|
return { status, progress: void 0 };
|
|
39
38
|
}
|
|
40
39
|
function useFeedbackNps(scope) {
|
|
41
|
-
const client$1 =
|
|
40
|
+
const client$1 = chunkCK3L6Y43_cjs.useKaafilClient();
|
|
42
41
|
const [summary, setSummary] = react.useState(void 0);
|
|
43
42
|
const [definitions, setDefinitions] = react.useState([]);
|
|
44
43
|
const [loaded, setLoaded] = react.useState(false);
|
|
@@ -68,7 +67,7 @@ function useFeedbackNps(scope) {
|
|
|
68
67
|
react.useEffect(() => {
|
|
69
68
|
void refresh();
|
|
70
69
|
}, [refresh]);
|
|
71
|
-
const dispatchMutation =
|
|
70
|
+
const dispatchMutation = chunkCK3L6Y43_cjs.useOfflineMutation({
|
|
72
71
|
tripRef: scope.kind === "trip" ? scope.tripRef : "",
|
|
73
72
|
enqueue: (engine, input) => {
|
|
74
73
|
const formId = formIdRef.current;
|
|
@@ -112,14 +111,14 @@ function useFeedbackNps(scope) {
|
|
|
112
111
|
};
|
|
113
112
|
}
|
|
114
113
|
function useJourney(tripRef) {
|
|
115
|
-
const client =
|
|
116
|
-
const persona =
|
|
117
|
-
const { rows } =
|
|
114
|
+
const client = chunkCK3L6Y43_cjs.useKaafilClient();
|
|
115
|
+
const persona = chunkCK3L6Y43_cjs.usePersona();
|
|
116
|
+
const { rows } = chunkCK3L6Y43_cjs.useCapabilityRows(tripRef);
|
|
118
117
|
const [read, setRead] = react.useState(void 0);
|
|
119
118
|
const [liveRows, setLiveRows] = react.useState(void 0);
|
|
120
119
|
react.useEffect(() => {
|
|
121
120
|
if (persona === "share") {
|
|
122
|
-
if (
|
|
121
|
+
if (chunkCK3L6Y43_cjs.isDevelopment()) {
|
|
123
122
|
throw new Error(
|
|
124
123
|
"useJourney() was called from a share session \u2014 it is manager/agencyAdmin only (08-core-hooks.md \xA73.2)."
|
|
125
124
|
);
|
|
@@ -143,7 +142,7 @@ function useJourney(tripRef) {
|
|
|
143
142
|
const effectiveRows = liveRows ?? rows;
|
|
144
143
|
const capabilities = /* @__PURE__ */ new Map();
|
|
145
144
|
for (const row of effectiveRows) {
|
|
146
|
-
capabilities.set(row.capability,
|
|
145
|
+
capabilities.set(row.capability, chunkCK3L6Y43_cjs.deriveCapabilityTriple(row));
|
|
147
146
|
}
|
|
148
147
|
return {
|
|
149
148
|
read,
|
|
@@ -155,9 +154,15 @@ function useJourney(tripRef) {
|
|
|
155
154
|
}
|
|
156
155
|
};
|
|
157
156
|
}
|
|
157
|
+
|
|
158
|
+
// src/core/hooks/useResolvedSetting.ts
|
|
159
|
+
function useResolvedSetting(key) {
|
|
160
|
+
const config = chunkCK3L6Y43_cjs.useRequiredContext(chunkCK3L6Y43_cjs.ConfigContext, "useResolvedSetting", "ConfigShell");
|
|
161
|
+
return config.resolveSetting(key);
|
|
162
|
+
}
|
|
158
163
|
function useSnapshotEntity(tripRef, listName, id) {
|
|
159
|
-
const engine = react.useContext(
|
|
160
|
-
const { rows } =
|
|
164
|
+
const engine = react.useContext(chunkCK3L6Y43_cjs.OfflineEngineContext);
|
|
165
|
+
const { rows } = chunkDI77H7ED_cjs.useSnapshotList(tripRef, listName);
|
|
161
166
|
const row = rows.find((candidate) => candidate.id === id);
|
|
162
167
|
const syncedAt = engine === null ? void 0 : engine.snapshot.syncedAt(tripRef, listName, id);
|
|
163
168
|
return { row, syncedAt };
|
|
@@ -165,9 +170,9 @@ function useSnapshotEntity(tripRef, listName, id) {
|
|
|
165
170
|
|
|
166
171
|
// src/core/hooks/useStaleness.ts
|
|
167
172
|
function useStaleness(tripRef, listName) {
|
|
168
|
-
const { syncedAt } =
|
|
169
|
-
const { now } =
|
|
170
|
-
const thresholdSeconds =
|
|
173
|
+
const { syncedAt } = chunkDI77H7ED_cjs.useSnapshotList(tripRef, listName);
|
|
174
|
+
const { now } = chunkLO3GQFQ6_cjs.useServerTime();
|
|
175
|
+
const thresholdSeconds = useResolvedSetting("stale.thresholdSeconds.default");
|
|
171
176
|
if (syncedAt === void 0) {
|
|
172
177
|
return { syncedAt: void 0, ageSeconds: void 0, isStale: false };
|
|
173
178
|
}
|
|
@@ -181,8 +186,8 @@ function useStaleness(tripRef, listName) {
|
|
|
181
186
|
return { syncedAt, ageSeconds, isStale };
|
|
182
187
|
}
|
|
183
188
|
var WALK_INS_PAGE_SIZE = 25;
|
|
184
|
-
var useTreksInternal =
|
|
185
|
-
const client$1 =
|
|
189
|
+
var useTreksInternal = chunkDI77H7ED_cjs.createDomainHook("treks", (tripRef) => {
|
|
190
|
+
const client$1 = chunkCK3L6Y43_cjs.useKaafilClient();
|
|
186
191
|
const [boardData, setBoardData] = react.useState(void 0);
|
|
187
192
|
const [boardLoaded, setBoardLoaded] = react.useState(false);
|
|
188
193
|
const [boardFetchFailed, setBoardFetchFailed] = react.useState(false);
|
|
@@ -260,7 +265,7 @@ var useTreksInternal = chunkXBYLSJOS_cjs.createDomainHook("treks", (tripRef) =>
|
|
|
260
265
|
react.useEffect(() => {
|
|
261
266
|
void refreshMeta();
|
|
262
267
|
}, [refreshMeta]);
|
|
263
|
-
const createWalkInMutation =
|
|
268
|
+
const createWalkInMutation = chunkCK3L6Y43_cjs.useOfflineMutation({
|
|
264
269
|
tripRef,
|
|
265
270
|
enqueue: (engine, input) => engine.enqueue({
|
|
266
271
|
tripRef,
|
|
@@ -273,7 +278,7 @@ var useTreksInternal = chunkXBYLSJOS_cjs.createDomainHook("treks", (tripRef) =>
|
|
|
273
278
|
body: input
|
|
274
279
|
})
|
|
275
280
|
});
|
|
276
|
-
const postponeMutation =
|
|
281
|
+
const postponeMutation = chunkCK3L6Y43_cjs.useOfflineMutation({
|
|
277
282
|
tripRef,
|
|
278
283
|
enqueue: (engine, input) => engine.enqueue({
|
|
279
284
|
tripRef,
|
|
@@ -283,7 +288,7 @@ var useTreksInternal = chunkXBYLSJOS_cjs.createDomainHook("treks", (tripRef) =>
|
|
|
283
288
|
body: input
|
|
284
289
|
})
|
|
285
290
|
});
|
|
286
|
-
const reconcileMutation =
|
|
291
|
+
const reconcileMutation = chunkCK3L6Y43_cjs.useOfflineMutation({
|
|
287
292
|
tripRef,
|
|
288
293
|
enqueue: (engine, { walkInId, input }) => engine.enqueue({
|
|
289
294
|
tripRef,
|
|
@@ -352,499 +357,6 @@ var useTreksInternal = chunkXBYLSJOS_cjs.createDomainHook("treks", (tripRef) =>
|
|
|
352
357
|
function useTreks(tripRef) {
|
|
353
358
|
return useTreksInternal(tripRef);
|
|
354
359
|
}
|
|
355
|
-
var ThemeAttributesContext = react.createContext(null);
|
|
356
|
-
var FAMILY_DEFAULT_FRAME = {
|
|
357
|
-
admin: "desk",
|
|
358
|
-
manager: "field",
|
|
359
|
-
traveller: "document"
|
|
360
|
-
};
|
|
361
|
-
var DESK_MINIMUM_CONTAINER_WIDTH_PX = 640;
|
|
362
|
-
function ShadowIsolationBoundary({
|
|
363
|
-
className,
|
|
364
|
-
children
|
|
365
|
-
}) {
|
|
366
|
-
const hostRef = react.useRef(null);
|
|
367
|
-
const [shadowContainer, setShadowContainer] = react.useState(null);
|
|
368
|
-
react.useEffect(() => {
|
|
369
|
-
const host = hostRef.current;
|
|
370
|
-
if (host === null) {
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
const shadow = host.shadowRoot ?? host.attachShadow({ mode: "open" });
|
|
374
|
-
let container = shadow.querySelector("div[data-kf-shadow-content]");
|
|
375
|
-
if (container === null) {
|
|
376
|
-
container = document.createElement("div");
|
|
377
|
-
container.setAttribute("data-kf-shadow-content", "");
|
|
378
|
-
shadow.appendChild(container);
|
|
379
|
-
}
|
|
380
|
-
setShadowContainer(container);
|
|
381
|
-
}, []);
|
|
382
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: hostRef, className, "data-kf-isolation": "shadow", children: shadowContainer !== null ? reactDom.createPortal(children, shadowContainer) : null });
|
|
383
|
-
}
|
|
384
|
-
function useDeskMinimumWidthWarning(rootRef, frame) {
|
|
385
|
-
react.useEffect(() => {
|
|
386
|
-
if (frame !== "desk" || !chunkCCJ5XNWY_cjs.isDevelopment() || typeof ResizeObserver === "undefined") {
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
const node = rootRef.current;
|
|
390
|
-
if (node === null) {
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
let warned = false;
|
|
394
|
-
const observer = new ResizeObserver((entries) => {
|
|
395
|
-
const entry = entries[0];
|
|
396
|
-
if (entry === void 0 || warned) {
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
if (entry.contentRect.width < DESK_MINIMUM_CONTAINER_WIDTH_PX) {
|
|
400
|
-
warned = true;
|
|
401
|
-
console.warn(
|
|
402
|
-
`kaafil-react-uikit: the 'desk' frame's .kf-root is narrower than the stated minimum container width (05-theming-and-branding.md \xA74.4). AppShell never auto-swaps frames \u2014 mount the manager family, or pass frame="field" explicitly, for this container.`
|
|
403
|
-
);
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
observer.observe(node);
|
|
407
|
-
return () => observer.disconnect();
|
|
408
|
-
}, [rootRef, frame]);
|
|
409
|
-
}
|
|
410
|
-
function useUnfilledConnectivitySlotWarning(frame, connectivitySlot) {
|
|
411
|
-
react.useEffect(() => {
|
|
412
|
-
if (frame === "field" && connectivitySlot === void 0 && chunkCCJ5XNWY_cjs.isDevelopment()) {
|
|
413
|
-
console.warn(
|
|
414
|
-
`kaafil-react-uikit: AppShell's "field" frame has no connectivitySlot filled \u2014 the permanently-visible connectivity/sync region this frame reserves is empty (01-app-shell.md, briefing \xA727.2).`
|
|
415
|
-
);
|
|
416
|
-
}
|
|
417
|
-
}, [frame, connectivitySlot]);
|
|
418
|
-
}
|
|
419
|
-
function AppShell({
|
|
420
|
-
frame,
|
|
421
|
-
family,
|
|
422
|
-
isolation = "scoped",
|
|
423
|
-
navSlot,
|
|
424
|
-
actionBarSlot,
|
|
425
|
-
connectivitySlot,
|
|
426
|
-
children,
|
|
427
|
-
style
|
|
428
|
-
}) {
|
|
429
|
-
const themeAttributes = react.useContext(ThemeAttributesContext);
|
|
430
|
-
const rootRef = react.useRef(null);
|
|
431
|
-
const resolvedFrame = frame ?? (family !== void 0 ? FAMILY_DEFAULT_FRAME[family] : "document");
|
|
432
|
-
useDeskMinimumWidthWarning(rootRef, resolvedFrame);
|
|
433
|
-
useUnfilledConnectivitySlotWarning(resolvedFrame, connectivitySlot);
|
|
434
|
-
const dataAttributes = {
|
|
435
|
-
"data-kf-frame": resolvedFrame
|
|
436
|
-
};
|
|
437
|
-
if (family !== void 0) {
|
|
438
|
-
dataAttributes["data-kf-family"] = family;
|
|
439
|
-
}
|
|
440
|
-
if (themeAttributes !== null) {
|
|
441
|
-
dataAttributes["data-kf-theme"] = themeAttributes.theme;
|
|
442
|
-
if (themeAttributes.density !== void 0) {
|
|
443
|
-
dataAttributes["data-kf-density"] = themeAttributes.density;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
447
|
-
resolvedFrame === "desk" && navSlot !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-app-shell__nav", children: navSlot }) : null,
|
|
448
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-app-shell__content", children }),
|
|
449
|
-
resolvedFrame === "field" && actionBarSlot !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-app-shell__action-bar", children: actionBarSlot }) : null,
|
|
450
|
-
resolvedFrame === "field" && connectivitySlot !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-app-shell__connectivity", children: connectivitySlot }) : null,
|
|
451
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-app-shell__live-region", role: "status", "aria-live": "polite" })
|
|
452
|
-
] });
|
|
453
|
-
if (isolation === "shadow") {
|
|
454
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
455
|
-
"div",
|
|
456
|
-
{
|
|
457
|
-
ref: rootRef,
|
|
458
|
-
className: "kf-root",
|
|
459
|
-
"data-kf-isolation": "shadow",
|
|
460
|
-
...dataAttributes,
|
|
461
|
-
style: chunkCCJ5XNWY_cjs.tokenStyle(style),
|
|
462
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ShadowIsolationBoundary, { className: "kf-app-shell__shadow-host", children: content })
|
|
463
|
-
}
|
|
464
|
-
);
|
|
465
|
-
}
|
|
466
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
467
|
-
"div",
|
|
468
|
-
{
|
|
469
|
-
ref: rootRef,
|
|
470
|
-
className: "kf-root",
|
|
471
|
-
"data-kf-isolation": "scoped",
|
|
472
|
-
...dataAttributes,
|
|
473
|
-
style: chunkCCJ5XNWY_cjs.tokenStyle(style),
|
|
474
|
-
children: content
|
|
475
|
-
}
|
|
476
|
-
);
|
|
477
|
-
}
|
|
478
|
-
function ConfigShell({ seedConfig = {}, children }) {
|
|
479
|
-
const value = react.useMemo(
|
|
480
|
-
() => ({
|
|
481
|
-
resolveSetting(key) {
|
|
482
|
-
const agencyValue = seedConfig.agency?.[key];
|
|
483
|
-
if (agencyValue !== void 0) {
|
|
484
|
-
return agencyValue;
|
|
485
|
-
}
|
|
486
|
-
const tenantValue = seedConfig.tenant?.[key];
|
|
487
|
-
return tenantValue === void 0 ? void 0 : tenantValue;
|
|
488
|
-
}
|
|
489
|
-
}),
|
|
490
|
-
[seedConfig.agency, seedConfig.tenant]
|
|
491
|
-
);
|
|
492
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkCCJ5XNWY_cjs.ConfigContext.Provider, { value, children });
|
|
493
|
-
}
|
|
494
|
-
function classifyForFallback(error) {
|
|
495
|
-
const classification = chunkXBYLSJOS_cjs.classifyError(error);
|
|
496
|
-
if (classification.code === "RESOURCE_NOT_FOUND") {
|
|
497
|
-
return { classification: "isolation", code: classification.code };
|
|
498
|
-
}
|
|
499
|
-
if (classification.path === "parked" || classification.unsatisfiableScheme) {
|
|
500
|
-
return { classification: "parked", code: classification.code };
|
|
501
|
-
}
|
|
502
|
-
return { classification: "retryable", code: classification.code };
|
|
503
|
-
}
|
|
504
|
-
var FALLBACK_STYLE = {
|
|
505
|
-
fontFamily: "system-ui, sans-serif",
|
|
506
|
-
padding: "1.5rem",
|
|
507
|
-
border: "1px solid #999",
|
|
508
|
-
borderRadius: "4px",
|
|
509
|
-
color: "#1a1a1a",
|
|
510
|
-
background: "#fff"
|
|
511
|
-
};
|
|
512
|
-
function DefaultFallback({
|
|
513
|
-
ctx,
|
|
514
|
-
onRetry
|
|
515
|
-
}) {
|
|
516
|
-
const role = ctx.classification === "retryable" ? "status" : "alert";
|
|
517
|
-
const ariaLive = ctx.classification === "retryable" ? "polite" : "assertive";
|
|
518
|
-
const message = ctx.classification === "isolation" ? "Not found." : ctx.classification === "parked" ? "This action can't be completed right now." : "Something went wrong.";
|
|
519
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: FALLBACK_STYLE, role, "aria-live": ariaLive, children: [
|
|
520
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0 }, children: message }),
|
|
521
|
-
ctx.classification === "retryable" ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onRetry, style: { marginTop: "0.75rem" }, children: "Try again" }) : null
|
|
522
|
-
] });
|
|
523
|
-
}
|
|
524
|
-
var ErrorShell = class extends react.Component {
|
|
525
|
-
state = { caught: null, retryKey: 0 };
|
|
526
|
-
static getDerivedStateFromError(error) {
|
|
527
|
-
return { caught: { error } };
|
|
528
|
-
}
|
|
529
|
-
handleRetry = () => {
|
|
530
|
-
this.setState((current) => ({ caught: null, retryKey: current.retryKey + 1 }));
|
|
531
|
-
};
|
|
532
|
-
render() {
|
|
533
|
-
if (this.state.caught !== null) {
|
|
534
|
-
const ctx = classifyForFallback(this.state.caught.error);
|
|
535
|
-
if (this.props.fallbackSlot !== void 0) {
|
|
536
|
-
return this.props.fallbackSlot(ctx);
|
|
537
|
-
}
|
|
538
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DefaultFallback, { ctx, onRetry: this.handleRetry });
|
|
539
|
-
}
|
|
540
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: this.props.children }, this.state.retryKey);
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
var SessionExpiryBridgeContext = react.createContext(void 0);
|
|
544
|
-
function OfflineShell({
|
|
545
|
-
storage,
|
|
546
|
-
blob,
|
|
547
|
-
conflictResolver,
|
|
548
|
-
readEntity,
|
|
549
|
-
scope,
|
|
550
|
-
children
|
|
551
|
-
}) {
|
|
552
|
-
const client = react.useContext(chunkCCJ5XNWY_cjs.KaafilClientContext);
|
|
553
|
-
const persona = chunkCCJ5XNWY_cjs.usePersona();
|
|
554
|
-
const session = chunkCCJ5XNWY_cjs.useSession();
|
|
555
|
-
const reportExpired = react.useContext(SessionExpiryBridgeContext);
|
|
556
|
-
const [engine, setEngine] = react.useState(null);
|
|
557
|
-
const engineRef = react.useRef(null);
|
|
558
|
-
const derivedScope = scope ?? `${persona}:${session.agencyRef ?? "share"}`;
|
|
559
|
-
react.useEffect(() => {
|
|
560
|
-
if (session.status !== "authenticated" || client === null) {
|
|
561
|
-
return;
|
|
562
|
-
}
|
|
563
|
-
const newEngine = client.openOffline({
|
|
564
|
-
storage,
|
|
565
|
-
scope: derivedScope,
|
|
566
|
-
...readEntity !== void 0 ? { readEntity } : {},
|
|
567
|
-
...conflictResolver !== void 0 ? { conflictResolver } : {},
|
|
568
|
-
...blob !== void 0 ? { blob } : {}
|
|
569
|
-
// GAP flagged in this phase's report: a share session's local
|
|
570
|
-
// `expiresAt` enforcement (`OpenOfflineOptions.share`,
|
|
571
|
-
// `07-offline-and-sync.md §8`) needs an `expiresAt` this shell has no
|
|
572
|
-
// source for yet — it is not on `useSession()`'s derived shape and no
|
|
573
|
-
// prop carries it. Omitted here rather than guessed; a share engine
|
|
574
|
-
// opens without the local expiry/grace/purge enforcement until that
|
|
575
|
-
// value has a wire source.
|
|
576
|
-
});
|
|
577
|
-
engineRef.current = newEngine;
|
|
578
|
-
let opened = false;
|
|
579
|
-
let disposed = false;
|
|
580
|
-
void newEngine.open().then(() => {
|
|
581
|
-
opened = true;
|
|
582
|
-
if (disposed) {
|
|
583
|
-
newEngine.close();
|
|
584
|
-
return;
|
|
585
|
-
}
|
|
586
|
-
if (engineRef.current === newEngine) setEngine(newEngine);
|
|
587
|
-
}).catch(() => {
|
|
588
|
-
if (!disposed && engineRef.current === newEngine) setEngine(null);
|
|
589
|
-
});
|
|
590
|
-
const unsubscribeSessionExpired = persona !== "share" ? newEngine.events.on("session.expired", () => reportExpired?.("session")) : void 0;
|
|
591
|
-
const unsubscribeShareExpired = persona === "share" ? newEngine.events.on("share.expired", () => reportExpired?.("share")) : void 0;
|
|
592
|
-
const unsubscribeShareRevoked = persona === "share" ? newEngine.events.on("share.revoked", () => reportExpired?.("share")) : void 0;
|
|
593
|
-
return () => {
|
|
594
|
-
unsubscribeSessionExpired?.();
|
|
595
|
-
unsubscribeShareExpired?.();
|
|
596
|
-
unsubscribeShareRevoked?.();
|
|
597
|
-
disposed = true;
|
|
598
|
-
if (opened) newEngine.close();
|
|
599
|
-
if (engineRef.current === newEngine) {
|
|
600
|
-
engineRef.current = null;
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
}, [client, derivedScope, session.status, persona, reportExpired]);
|
|
604
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkCCJ5XNWY_cjs.OfflineEngineContext.Provider, { value: engine, children });
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
// src/core/shells/internal/jwtKind.ts
|
|
608
|
-
function base64UrlDecode(segment) {
|
|
609
|
-
const padded = segment.replace(/-/g, "+").replace(/_/g, "/");
|
|
610
|
-
const withPadding = padded + "=".repeat((4 - padded.length % 4) % 4);
|
|
611
|
-
return atob(withPadding);
|
|
612
|
-
}
|
|
613
|
-
function decodeManagerOrAgencyAdminKind(accessToken) {
|
|
614
|
-
const segments = accessToken.split(".");
|
|
615
|
-
const payloadSegment = segments[1];
|
|
616
|
-
if (segments.length !== 3 || payloadSegment === void 0) {
|
|
617
|
-
throw new Error(
|
|
618
|
-
'SessionShell could not parse "accessToken" as a JWT \u2014 it does not have the three dot-separated segments every manager/agencyAdmin session token has.'
|
|
619
|
-
);
|
|
620
|
-
}
|
|
621
|
-
let claim;
|
|
622
|
-
try {
|
|
623
|
-
claim = JSON.parse(base64UrlDecode(payloadSegment));
|
|
624
|
-
} catch {
|
|
625
|
-
throw new Error(
|
|
626
|
-
`SessionShell could not decode "accessToken"'s payload segment as JSON \u2014 the value handed to <KaafilUIKitProvider accessToken> is not a well-formed JWT.`
|
|
627
|
-
);
|
|
628
|
-
}
|
|
629
|
-
const kind = claim.kind;
|
|
630
|
-
if (kind === "agencyAdmin") {
|
|
631
|
-
return "agencyAdmin";
|
|
632
|
-
}
|
|
633
|
-
if (kind === "managerSession" || kind === "manager") {
|
|
634
|
-
return "managerSession";
|
|
635
|
-
}
|
|
636
|
-
throw new Error(
|
|
637
|
-
`SessionShell read an unrecognised "kind" claim ("${String(kind)}") off "accessToken" \u2014 expected the manager or agencyAdmin session JWT shape (00-decisions.md U-003).`
|
|
638
|
-
);
|
|
639
|
-
}
|
|
640
|
-
async function resolveCredential(props) {
|
|
641
|
-
if (props.credentialResolver !== void 0) {
|
|
642
|
-
const resolved = await props.credentialResolver();
|
|
643
|
-
if ("shareToken" in resolved) {
|
|
644
|
-
return { kind: "share", shareToken: resolved.shareToken };
|
|
645
|
-
}
|
|
646
|
-
const kind2 = decodeManagerOrAgencyAdminKind(resolved.accessToken) === "agencyAdmin" ? "agencyAdmin" : "manager";
|
|
647
|
-
return { kind: kind2, ...resolved };
|
|
648
|
-
}
|
|
649
|
-
if (props.shareToken !== void 0) {
|
|
650
|
-
return { kind: "share", shareToken: props.shareToken };
|
|
651
|
-
}
|
|
652
|
-
const kind = decodeManagerOrAgencyAdminKind(props.accessToken) === "agencyAdmin" ? "agencyAdmin" : "manager";
|
|
653
|
-
return {
|
|
654
|
-
kind,
|
|
655
|
-
accessToken: props.accessToken,
|
|
656
|
-
refreshToken: props.refreshToken,
|
|
657
|
-
agencyRef: props.agencyRef
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
function SessionShell(props) {
|
|
661
|
-
const { environment = "live", onRefresh, onSessionExpired, children } = props;
|
|
662
|
-
const [state, setState] = react.useState(null);
|
|
663
|
-
const expiredCallbackFiredRef = react.useRef(false);
|
|
664
|
-
const currentPersonaRef = react.useRef("manager");
|
|
665
|
-
const reportExpired = react.useCallback(() => {
|
|
666
|
-
if (expiredCallbackFiredRef.current) {
|
|
667
|
-
return;
|
|
668
|
-
}
|
|
669
|
-
expiredCallbackFiredRef.current = true;
|
|
670
|
-
onSessionExpired?.(currentPersonaRef.current);
|
|
671
|
-
setState(
|
|
672
|
-
(current) => current === null ? current : { ...current, session: { ...current.session, status: "expired" } }
|
|
673
|
-
);
|
|
674
|
-
}, [onSessionExpired]);
|
|
675
|
-
const accessTokenDep = "accessToken" in props ? props.accessToken : void 0;
|
|
676
|
-
const refreshTokenDep = "refreshToken" in props ? props.refreshToken : void 0;
|
|
677
|
-
const agencyRefDep = "agencyRef" in props ? props.agencyRef : void 0;
|
|
678
|
-
const shareTokenDep = "shareToken" in props ? props.shareToken : void 0;
|
|
679
|
-
react.useEffect(() => {
|
|
680
|
-
let cancelled = false;
|
|
681
|
-
const client$1 = new client.KaafilClient({ environment });
|
|
682
|
-
expiredCallbackFiredRef.current = false;
|
|
683
|
-
async function open() {
|
|
684
|
-
const credential = await resolveCredential(props);
|
|
685
|
-
if (cancelled) {
|
|
686
|
-
return;
|
|
687
|
-
}
|
|
688
|
-
currentPersonaRef.current = credential.kind;
|
|
689
|
-
if (credential.kind === "share") {
|
|
690
|
-
client$1.share.open({ token: credential.shareToken });
|
|
691
|
-
} else if (credential.kind === "agencyAdmin") {
|
|
692
|
-
client$1.admin.open({
|
|
693
|
-
accessToken: credential.accessToken,
|
|
694
|
-
refreshToken: credential.refreshToken,
|
|
695
|
-
agencyRef: credential.agencyRef,
|
|
696
|
-
...onRefresh !== void 0 ? { onRefresh } : {}
|
|
697
|
-
});
|
|
698
|
-
} else {
|
|
699
|
-
client$1.session.open({
|
|
700
|
-
accessToken: credential.accessToken,
|
|
701
|
-
refreshToken: credential.refreshToken,
|
|
702
|
-
agencyRef: credential.agencyRef,
|
|
703
|
-
...onRefresh !== void 0 ? { onRefresh } : {}
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
setState({
|
|
707
|
-
client: client$1,
|
|
708
|
-
session: {
|
|
709
|
-
status: "authenticated",
|
|
710
|
-
persona: credential.kind,
|
|
711
|
-
agencyRef: credential.agencyRef,
|
|
712
|
-
environment
|
|
713
|
-
}
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
void open();
|
|
717
|
-
return () => {
|
|
718
|
-
cancelled = true;
|
|
719
|
-
client$1.close();
|
|
720
|
-
};
|
|
721
|
-
}, [environment, accessTokenDep, refreshTokenDep, agencyRefDep, shareTokenDep]);
|
|
722
|
-
if (state === null) {
|
|
723
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SessionExpiryBridgeContext.Provider, { value: reportExpired, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
724
|
-
chunkCCJ5XNWY_cjs.SessionContext.Provider,
|
|
725
|
-
{
|
|
726
|
-
value: { status: "opening", persona: "manager", agencyRef: void 0, environment },
|
|
727
|
-
children
|
|
728
|
-
}
|
|
729
|
-
) });
|
|
730
|
-
}
|
|
731
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SessionExpiryBridgeContext.Provider, { value: reportExpired, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCCJ5XNWY_cjs.KaafilClientContext.Provider, { value: state.client, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCCJ5XNWY_cjs.SessionContext.Provider, { value: state.session, children }) }) });
|
|
732
|
-
}
|
|
733
|
-
function emit(onEvent, event) {
|
|
734
|
-
if (onEvent === void 0) {
|
|
735
|
-
return;
|
|
736
|
-
}
|
|
737
|
-
try {
|
|
738
|
-
onEvent(event);
|
|
739
|
-
} catch {
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
function TelemetryShell({ onEvent, children }) {
|
|
743
|
-
const session = chunkCCJ5XNWY_cjs.useSession();
|
|
744
|
-
const serverTime = chunkDUZG6A22_cjs.useServerTime();
|
|
745
|
-
const previousStatusRef = react.useRef(void 0);
|
|
746
|
-
react.useEffect(() => {
|
|
747
|
-
const previousStatus = previousStatusRef.current;
|
|
748
|
-
if (serverTime.sinceLastSync !== void 0) {
|
|
749
|
-
if (session.status === "authenticated" && previousStatus !== "authenticated") {
|
|
750
|
-
emit(onEvent, {
|
|
751
|
-
type: "session.opened",
|
|
752
|
-
timestamp: serverTime.now(),
|
|
753
|
-
persona: session.persona
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
if (session.status === "expired" && previousStatus !== "expired") {
|
|
757
|
-
emit(onEvent, {
|
|
758
|
-
type: "session.expired",
|
|
759
|
-
timestamp: serverTime.now(),
|
|
760
|
-
persona: session.persona
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
previousStatusRef.current = session.status;
|
|
765
|
-
}, [session.status, serverTime.sinceLastSync]);
|
|
766
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
767
|
-
}
|
|
768
|
-
function resolveSystemTheme() {
|
|
769
|
-
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
770
|
-
return "light";
|
|
771
|
-
}
|
|
772
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
773
|
-
}
|
|
774
|
-
function ThemeShell({ theme = "system", density, children }) {
|
|
775
|
-
const [systemTheme, setSystemTheme] = react.useState(
|
|
776
|
-
() => theme === "system" ? resolveSystemTheme() : theme
|
|
777
|
-
);
|
|
778
|
-
react.useEffect(() => {
|
|
779
|
-
if (theme !== "system" || typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
780
|
-
return;
|
|
781
|
-
}
|
|
782
|
-
const query = window.matchMedia("(prefers-color-scheme: dark)");
|
|
783
|
-
const listener = (event) => {
|
|
784
|
-
setSystemTheme(event.matches ? "dark" : "light");
|
|
785
|
-
};
|
|
786
|
-
query.addEventListener("change", listener);
|
|
787
|
-
return () => query.removeEventListener("change", listener);
|
|
788
|
-
}, [theme]);
|
|
789
|
-
const resolvedTheme = theme === "system" ? systemTheme : theme;
|
|
790
|
-
const value = react.useMemo(() => ({ theme: resolvedTheme, density }), [resolvedTheme, density]);
|
|
791
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ThemeAttributesContext.Provider, { value, children });
|
|
792
|
-
}
|
|
793
|
-
var DefaultCapabilityViewsContext = react.createContext({});
|
|
794
|
-
function useDefaultCapabilityViews() {
|
|
795
|
-
return react.useContext(DefaultCapabilityViewsContext);
|
|
796
|
-
}
|
|
797
|
-
function KaafilUIKitProvider(props) {
|
|
798
|
-
const {
|
|
799
|
-
environment,
|
|
800
|
-
onSessionExpired,
|
|
801
|
-
density,
|
|
802
|
-
theme,
|
|
803
|
-
brand,
|
|
804
|
-
locale,
|
|
805
|
-
isolation,
|
|
806
|
-
onEvent,
|
|
807
|
-
storage,
|
|
808
|
-
blob,
|
|
809
|
-
conflictResolver,
|
|
810
|
-
readEntity,
|
|
811
|
-
offlineScope,
|
|
812
|
-
seedConfig,
|
|
813
|
-
defaultCapabilityViews,
|
|
814
|
-
children,
|
|
815
|
-
...credential
|
|
816
|
-
} = props;
|
|
817
|
-
const inner = /* @__PURE__ */ jsxRuntime.jsx(DefaultCapabilityViewsContext.Provider, { value: defaultCapabilityViews ?? {}, children: /* @__PURE__ */ jsxRuntime.jsx(ConfigShell, { seedConfig, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
818
|
-
chunkKDGBJPPZ_cjs.BrandShell,
|
|
819
|
-
{
|
|
820
|
-
appName: brand?.appName,
|
|
821
|
-
logo: brand?.logo,
|
|
822
|
-
logoMark: brand?.logoMark,
|
|
823
|
-
favicon: brand?.favicon,
|
|
824
|
-
headStrategy: brand?.headStrategy,
|
|
825
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(TelemetryShell, { onEvent, children })
|
|
826
|
-
}
|
|
827
|
-
) }) });
|
|
828
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ErrorShell, { children: /* @__PURE__ */ jsxRuntime.jsx(ThemeShell, { theme, density, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCCJ5XNWY_cjs.I18nShell, { locale, children: /* @__PURE__ */ jsxRuntime.jsx(AppShell, { isolation, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
829
|
-
SessionShell,
|
|
830
|
-
{
|
|
831
|
-
...credential,
|
|
832
|
-
environment,
|
|
833
|
-
onSessionExpired,
|
|
834
|
-
children: storage !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
835
|
-
OfflineShell,
|
|
836
|
-
{
|
|
837
|
-
storage,
|
|
838
|
-
blob,
|
|
839
|
-
conflictResolver,
|
|
840
|
-
readEntity,
|
|
841
|
-
scope: offlineScope,
|
|
842
|
-
children: inner
|
|
843
|
-
}
|
|
844
|
-
) : inner
|
|
845
|
-
}
|
|
846
|
-
) }) }) }) });
|
|
847
|
-
}
|
|
848
360
|
var HAZARD_LABELS = {
|
|
849
361
|
"global-box-sizing-reset": "A global box-sizing reset escapes this widget's scope.",
|
|
850
362
|
"global-button-input-unset": "A global button/input unset rule is active.",
|
|
@@ -894,20 +406,20 @@ function detectHazards() {
|
|
|
894
406
|
function HostCssCompatibilityProbe({
|
|
895
407
|
style
|
|
896
408
|
} = {}) {
|
|
897
|
-
const chrome =
|
|
409
|
+
const chrome = chunkCK3L6Y43_cjs.useKaafilChrome();
|
|
898
410
|
const [hazards, setHazards] = react.useState(null);
|
|
899
411
|
react.useEffect(() => {
|
|
900
|
-
if (
|
|
412
|
+
if (chunkCK3L6Y43_cjs.isDevelopment()) {
|
|
901
413
|
setHazards(detectHazards());
|
|
902
414
|
}
|
|
903
415
|
}, []);
|
|
904
|
-
if (!
|
|
416
|
+
if (!chunkCK3L6Y43_cjs.isDevelopment() || hazards === null) {
|
|
905
417
|
return null;
|
|
906
418
|
}
|
|
907
419
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
908
420
|
"div",
|
|
909
421
|
{
|
|
910
|
-
style:
|
|
422
|
+
style: chunkCK3L6Y43_cjs.tokenStyle(style, {
|
|
911
423
|
border: "1px solid #999",
|
|
912
424
|
padding: "0.75rem",
|
|
913
425
|
borderRadius: "4px"
|
|
@@ -928,14 +440,14 @@ function KaafilSessionProbe({
|
|
|
928
440
|
expectedEnvironment,
|
|
929
441
|
style
|
|
930
442
|
}) {
|
|
931
|
-
const session =
|
|
932
|
-
const chrome =
|
|
443
|
+
const session = chunkCK3L6Y43_cjs.useSession();
|
|
444
|
+
const chrome = chunkCK3L6Y43_cjs.useKaafilChrome();
|
|
933
445
|
if (session.status === "expired") {
|
|
934
446
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
935
447
|
"div",
|
|
936
448
|
{
|
|
937
449
|
role: "status",
|
|
938
|
-
style:
|
|
450
|
+
style: chunkCK3L6Y43_cjs.tokenStyle(style, {
|
|
939
451
|
border: "1px solid #c00",
|
|
940
452
|
padding: "0.75rem",
|
|
941
453
|
borderRadius: "4px"
|
|
@@ -949,7 +461,7 @@ function KaafilSessionProbe({
|
|
|
949
461
|
"div",
|
|
950
462
|
{
|
|
951
463
|
role: "status",
|
|
952
|
-
style:
|
|
464
|
+
style: chunkCK3L6Y43_cjs.tokenStyle(style, {
|
|
953
465
|
border: "1px solid #c00",
|
|
954
466
|
padding: "0.75rem",
|
|
955
467
|
borderRadius: "4px"
|
|
@@ -966,12 +478,12 @@ function KaafilSessionProbe({
|
|
|
966
478
|
);
|
|
967
479
|
}
|
|
968
480
|
if (session.status === "opening") {
|
|
969
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", style:
|
|
481
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "status", style: chunkCK3L6Y43_cjs.tokenStyle(style), children: chrome.t("chrome.loading") });
|
|
970
482
|
}
|
|
971
483
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
972
484
|
"div",
|
|
973
485
|
{
|
|
974
|
-
style:
|
|
486
|
+
style: chunkCK3L6Y43_cjs.tokenStyle(style, {
|
|
975
487
|
border: "1px solid #0a0",
|
|
976
488
|
padding: "0.75rem",
|
|
977
489
|
borderRadius: "4px"
|
|
@@ -995,267 +507,295 @@ function KaafilSessionProbe({
|
|
|
995
507
|
|
|
996
508
|
Object.defineProperty(exports, "useConflicts", {
|
|
997
509
|
enumerable: true,
|
|
998
|
-
get: function () { return
|
|
510
|
+
get: function () { return chunkXYIOM75D_cjs.useConflicts; }
|
|
999
511
|
});
|
|
1000
512
|
Object.defineProperty(exports, "useManagerMe", {
|
|
1001
513
|
enumerable: true,
|
|
1002
|
-
get: function () { return
|
|
514
|
+
get: function () { return chunkXYIOM75D_cjs.useManagerMe; }
|
|
1003
515
|
});
|
|
1004
516
|
Object.defineProperty(exports, "useNotifications", {
|
|
1005
517
|
enumerable: true,
|
|
1006
|
-
get: function () { return
|
|
518
|
+
get: function () { return chunkXYIOM75D_cjs.useNotifications; }
|
|
519
|
+
});
|
|
520
|
+
Object.defineProperty(exports, "AppShell", {
|
|
521
|
+
enumerable: true,
|
|
522
|
+
get: function () { return chunkV6UQ6GIM_cjs.AppShell; }
|
|
1007
523
|
});
|
|
1008
524
|
Object.defineProperty(exports, "CLOSEOUT_ACTION_TAB", {
|
|
1009
525
|
enumerable: true,
|
|
1010
|
-
get: function () { return
|
|
526
|
+
get: function () { return chunkV6UQ6GIM_cjs.CLOSEOUT_ACTION_TAB; }
|
|
527
|
+
});
|
|
528
|
+
Object.defineProperty(exports, "ConfigShell", {
|
|
529
|
+
enumerable: true,
|
|
530
|
+
get: function () { return chunkV6UQ6GIM_cjs.ConfigShell; }
|
|
531
|
+
});
|
|
532
|
+
Object.defineProperty(exports, "ErrorShell", {
|
|
533
|
+
enumerable: true,
|
|
534
|
+
get: function () { return chunkV6UQ6GIM_cjs.ErrorShell; }
|
|
535
|
+
});
|
|
536
|
+
Object.defineProperty(exports, "KaafilUIKitProvider", {
|
|
537
|
+
enumerable: true,
|
|
538
|
+
get: function () { return chunkV6UQ6GIM_cjs.KaafilUIKitProvider; }
|
|
539
|
+
});
|
|
540
|
+
Object.defineProperty(exports, "OfflineShell", {
|
|
541
|
+
enumerable: true,
|
|
542
|
+
get: function () { return chunkV6UQ6GIM_cjs.OfflineShell; }
|
|
543
|
+
});
|
|
544
|
+
Object.defineProperty(exports, "SessionShell", {
|
|
545
|
+
enumerable: true,
|
|
546
|
+
get: function () { return chunkV6UQ6GIM_cjs.SessionShell; }
|
|
547
|
+
});
|
|
548
|
+
Object.defineProperty(exports, "TelemetryShell", {
|
|
549
|
+
enumerable: true,
|
|
550
|
+
get: function () { return chunkV6UQ6GIM_cjs.TelemetryShell; }
|
|
551
|
+
});
|
|
552
|
+
Object.defineProperty(exports, "ThemeShell", {
|
|
553
|
+
enumerable: true,
|
|
554
|
+
get: function () { return chunkV6UQ6GIM_cjs.ThemeShell; }
|
|
1011
555
|
});
|
|
1012
556
|
Object.defineProperty(exports, "fromSearchParams", {
|
|
1013
557
|
enumerable: true,
|
|
1014
|
-
get: function () { return
|
|
558
|
+
get: function () { return chunkV6UQ6GIM_cjs.fromSearchParams; }
|
|
1015
559
|
});
|
|
1016
560
|
Object.defineProperty(exports, "isTripTabKey", {
|
|
1017
561
|
enumerable: true,
|
|
1018
|
-
get: function () { return
|
|
562
|
+
get: function () { return chunkV6UQ6GIM_cjs.isTripTabKey; }
|
|
1019
563
|
});
|
|
1020
564
|
Object.defineProperty(exports, "resolveBlockerDeepLink", {
|
|
1021
565
|
enumerable: true,
|
|
1022
|
-
get: function () { return
|
|
566
|
+
get: function () { return chunkV6UQ6GIM_cjs.resolveBlockerDeepLink; }
|
|
1023
567
|
});
|
|
1024
568
|
Object.defineProperty(exports, "toSearchParams", {
|
|
1025
569
|
enumerable: true,
|
|
1026
|
-
get: function () { return
|
|
570
|
+
get: function () { return chunkV6UQ6GIM_cjs.toSearchParams; }
|
|
1027
571
|
});
|
|
1028
572
|
Object.defineProperty(exports, "useAgencyAdminMe", {
|
|
1029
573
|
enumerable: true,
|
|
1030
|
-
get: function () { return
|
|
574
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyAdminMe; }
|
|
1031
575
|
});
|
|
1032
576
|
Object.defineProperty(exports, "useAgencyChecklistTemplates", {
|
|
1033
577
|
enumerable: true,
|
|
1034
|
-
get: function () { return
|
|
578
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyChecklistTemplates; }
|
|
1035
579
|
});
|
|
1036
580
|
Object.defineProperty(exports, "useAgencyForms", {
|
|
1037
581
|
enumerable: true,
|
|
1038
|
-
get: function () { return
|
|
582
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyForms; }
|
|
1039
583
|
});
|
|
1040
584
|
Object.defineProperty(exports, "useAgencyJourneyTriggers", {
|
|
1041
585
|
enumerable: true,
|
|
1042
|
-
get: function () { return
|
|
586
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyJourneyTriggers; }
|
|
1043
587
|
});
|
|
1044
588
|
Object.defineProperty(exports, "useAgencyManagerProfile", {
|
|
1045
589
|
enumerable: true,
|
|
1046
|
-
get: function () { return
|
|
590
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyManagerProfile; }
|
|
1047
591
|
});
|
|
1048
592
|
Object.defineProperty(exports, "useAgencySettings", {
|
|
1049
593
|
enumerable: true,
|
|
1050
|
-
get: function () { return
|
|
594
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencySettings; }
|
|
1051
595
|
});
|
|
1052
596
|
Object.defineProperty(exports, "useAgencyTrip", {
|
|
1053
597
|
enumerable: true,
|
|
1054
|
-
get: function () { return
|
|
598
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyTrip; }
|
|
1055
599
|
});
|
|
1056
600
|
Object.defineProperty(exports, "useAgencyTripManifest", {
|
|
1057
601
|
enumerable: true,
|
|
1058
|
-
get: function () { return
|
|
602
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyTripManifest; }
|
|
1059
603
|
});
|
|
1060
604
|
Object.defineProperty(exports, "useAgencyTrips", {
|
|
1061
605
|
enumerable: true,
|
|
1062
|
-
get: function () { return
|
|
606
|
+
get: function () { return chunkV6UQ6GIM_cjs.useAgencyTrips; }
|
|
1063
607
|
});
|
|
1064
608
|
Object.defineProperty(exports, "useBookings", {
|
|
1065
609
|
enumerable: true,
|
|
1066
|
-
get: function () { return
|
|
610
|
+
get: function () { return chunkV6UQ6GIM_cjs.useBookings; }
|
|
611
|
+
});
|
|
612
|
+
Object.defineProperty(exports, "useBuildShareUrl", {
|
|
613
|
+
enumerable: true,
|
|
614
|
+
get: function () { return chunkV6UQ6GIM_cjs.useBuildShareUrl; }
|
|
1067
615
|
});
|
|
1068
616
|
Object.defineProperty(exports, "useCapabilityStatuses", {
|
|
1069
617
|
enumerable: true,
|
|
1070
|
-
get: function () { return
|
|
618
|
+
get: function () { return chunkV6UQ6GIM_cjs.useCapabilityStatuses; }
|
|
1071
619
|
});
|
|
1072
|
-
Object.defineProperty(exports, "
|
|
620
|
+
Object.defineProperty(exports, "useDefaultCapabilityViews", {
|
|
1073
621
|
enumerable: true,
|
|
1074
|
-
get: function () { return
|
|
622
|
+
get: function () { return chunkV6UQ6GIM_cjs.useDefaultCapabilityViews; }
|
|
1075
623
|
});
|
|
1076
|
-
Object.defineProperty(exports, "
|
|
624
|
+
Object.defineProperty(exports, "useDirectories", {
|
|
1077
625
|
enumerable: true,
|
|
1078
|
-
get: function () { return
|
|
626
|
+
get: function () { return chunkV6UQ6GIM_cjs.useDirectories; }
|
|
1079
627
|
});
|
|
1080
|
-
Object.defineProperty(exports, "
|
|
628
|
+
Object.defineProperty(exports, "usePaginatedList", {
|
|
1081
629
|
enumerable: true,
|
|
1082
|
-
get: function () { return
|
|
630
|
+
get: function () { return chunkV6UQ6GIM_cjs.usePaginatedList; }
|
|
1083
631
|
});
|
|
1084
632
|
Object.defineProperty(exports, "useShareLinks", {
|
|
1085
633
|
enumerable: true,
|
|
1086
|
-
get: function () { return
|
|
634
|
+
get: function () { return chunkV6UQ6GIM_cjs.useShareLinks; }
|
|
1087
635
|
});
|
|
1088
636
|
Object.defineProperty(exports, "useTravellerFormResponses", {
|
|
1089
637
|
enumerable: true,
|
|
1090
|
-
get: function () { return
|
|
638
|
+
get: function () { return chunkV6UQ6GIM_cjs.useTravellerFormResponses; }
|
|
1091
639
|
});
|
|
1092
640
|
Object.defineProperty(exports, "ERROR_HANDLING_PATH", {
|
|
1093
641
|
enumerable: true,
|
|
1094
|
-
get: function () { return
|
|
642
|
+
get: function () { return chunkDI77H7ED_cjs.ERROR_HANDLING_PATH; }
|
|
1095
643
|
});
|
|
1096
644
|
Object.defineProperty(exports, "classifyError", {
|
|
1097
645
|
enumerable: true,
|
|
1098
|
-
get: function () { return
|
|
646
|
+
get: function () { return chunkDI77H7ED_cjs.classifyError; }
|
|
1099
647
|
});
|
|
1100
648
|
Object.defineProperty(exports, "useChecklists", {
|
|
1101
649
|
enumerable: true,
|
|
1102
|
-
get: function () { return
|
|
650
|
+
get: function () { return chunkDI77H7ED_cjs.useChecklists; }
|
|
1103
651
|
});
|
|
1104
652
|
Object.defineProperty(exports, "useCloseout", {
|
|
1105
653
|
enumerable: true,
|
|
1106
|
-
get: function () { return
|
|
654
|
+
get: function () { return chunkDI77H7ED_cjs.useCloseout; }
|
|
1107
655
|
});
|
|
1108
656
|
Object.defineProperty(exports, "useCollections", {
|
|
1109
657
|
enumerable: true,
|
|
1110
|
-
get: function () { return
|
|
658
|
+
get: function () { return chunkDI77H7ED_cjs.useCollections; }
|
|
1111
659
|
});
|
|
1112
660
|
Object.defineProperty(exports, "useExpenses", {
|
|
1113
661
|
enumerable: true,
|
|
1114
|
-
get: function () { return
|
|
662
|
+
get: function () { return chunkDI77H7ED_cjs.useExpenses; }
|
|
1115
663
|
});
|
|
1116
664
|
Object.defineProperty(exports, "useFiles", {
|
|
1117
665
|
enumerable: true,
|
|
1118
|
-
get: function () { return
|
|
666
|
+
get: function () { return chunkDI77H7ED_cjs.useFiles; }
|
|
1119
667
|
});
|
|
1120
668
|
Object.defineProperty(exports, "useFloat", {
|
|
1121
669
|
enumerable: true,
|
|
1122
|
-
get: function () { return
|
|
670
|
+
get: function () { return chunkDI77H7ED_cjs.useFloat; }
|
|
1123
671
|
});
|
|
1124
672
|
Object.defineProperty(exports, "useForms", {
|
|
1125
673
|
enumerable: true,
|
|
1126
|
-
get: function () { return
|
|
674
|
+
get: function () { return chunkDI77H7ED_cjs.useForms; }
|
|
1127
675
|
});
|
|
1128
676
|
Object.defineProperty(exports, "useItinerary", {
|
|
1129
677
|
enumerable: true,
|
|
1130
|
-
get: function () { return
|
|
678
|
+
get: function () { return chunkDI77H7ED_cjs.useItinerary; }
|
|
1131
679
|
});
|
|
1132
680
|
Object.defineProperty(exports, "useManagerToday", {
|
|
1133
681
|
enumerable: true,
|
|
1134
|
-
get: function () { return
|
|
682
|
+
get: function () { return chunkDI77H7ED_cjs.useManagerToday; }
|
|
1135
683
|
});
|
|
1136
684
|
Object.defineProperty(exports, "useManagers", {
|
|
1137
685
|
enumerable: true,
|
|
1138
|
-
get: function () { return
|
|
686
|
+
get: function () { return chunkDI77H7ED_cjs.useManagers; }
|
|
1139
687
|
});
|
|
1140
688
|
Object.defineProperty(exports, "useParties", {
|
|
1141
689
|
enumerable: true,
|
|
1142
|
-
get: function () { return
|
|
690
|
+
get: function () { return chunkDI77H7ED_cjs.useParties; }
|
|
1143
691
|
});
|
|
1144
692
|
Object.defineProperty(exports, "usePickups", {
|
|
1145
693
|
enumerable: true,
|
|
1146
|
-
get: function () { return
|
|
694
|
+
get: function () { return chunkDI77H7ED_cjs.usePickups; }
|
|
1147
695
|
});
|
|
1148
696
|
Object.defineProperty(exports, "useRooming", {
|
|
1149
697
|
enumerable: true,
|
|
1150
|
-
get: function () { return
|
|
698
|
+
get: function () { return chunkDI77H7ED_cjs.useRooming; }
|
|
1151
699
|
});
|
|
1152
700
|
Object.defineProperty(exports, "useSeating", {
|
|
1153
701
|
enumerable: true,
|
|
1154
|
-
get: function () { return
|
|
702
|
+
get: function () { return chunkDI77H7ED_cjs.useSeating; }
|
|
1155
703
|
});
|
|
1156
704
|
Object.defineProperty(exports, "useSnapshotList", {
|
|
1157
705
|
enumerable: true,
|
|
1158
|
-
get: function () { return
|
|
706
|
+
get: function () { return chunkDI77H7ED_cjs.useSnapshotList; }
|
|
1159
707
|
});
|
|
1160
708
|
Object.defineProperty(exports, "useTravellerProfile", {
|
|
1161
709
|
enumerable: true,
|
|
1162
|
-
get: function () { return
|
|
710
|
+
get: function () { return chunkDI77H7ED_cjs.useTravellerProfile; }
|
|
1163
711
|
});
|
|
1164
712
|
Object.defineProperty(exports, "useVendors", {
|
|
1165
713
|
enumerable: true,
|
|
1166
|
-
get: function () { return
|
|
714
|
+
get: function () { return chunkDI77H7ED_cjs.useVendors; }
|
|
1167
715
|
});
|
|
1168
716
|
Object.defineProperty(exports, "useShareForms", {
|
|
1169
717
|
enumerable: true,
|
|
1170
|
-
get: function () { return
|
|
718
|
+
get: function () { return chunk3RZDHDEY_cjs.useShareForms; }
|
|
1171
719
|
});
|
|
1172
720
|
Object.defineProperty(exports, "useShareSnapshot", {
|
|
1173
721
|
enumerable: true,
|
|
1174
|
-
get: function () { return
|
|
1175
|
-
});
|
|
1176
|
-
Object.defineProperty(exports, "BrandShell", {
|
|
1177
|
-
enumerable: true,
|
|
1178
|
-
get: function () { return chunkKDGBJPPZ_cjs.BrandShell; }
|
|
1179
|
-
});
|
|
1180
|
-
Object.defineProperty(exports, "useKaafilBrand", {
|
|
1181
|
-
enumerable: true,
|
|
1182
|
-
get: function () { return chunkKDGBJPPZ_cjs.useKaafilBrand; }
|
|
1183
|
-
});
|
|
1184
|
-
Object.defineProperty(exports, "useKaafilShareMeta", {
|
|
1185
|
-
enumerable: true,
|
|
1186
|
-
get: function () { return chunkKDGBJPPZ_cjs.useKaafilShareMeta; }
|
|
722
|
+
get: function () { return chunk3RZDHDEY_cjs.useShareSnapshot; }
|
|
1187
723
|
});
|
|
1188
724
|
Object.defineProperty(exports, "useOfflineEngine", {
|
|
1189
725
|
enumerable: true,
|
|
1190
|
-
get: function () { return
|
|
726
|
+
get: function () { return chunk62HCQWZL_cjs.useOfflineEngine; }
|
|
1191
727
|
});
|
|
1192
728
|
Object.defineProperty(exports, "useServerTime", {
|
|
1193
729
|
enumerable: true,
|
|
1194
|
-
get: function () { return
|
|
730
|
+
get: function () { return chunkLO3GQFQ6_cjs.useServerTime; }
|
|
731
|
+
});
|
|
732
|
+
Object.defineProperty(exports, "BrandShell", {
|
|
733
|
+
enumerable: true,
|
|
734
|
+
get: function () { return chunkCK3L6Y43_cjs.BrandShell; }
|
|
1195
735
|
});
|
|
1196
736
|
Object.defineProperty(exports, "I18nShell", {
|
|
1197
737
|
enumerable: true,
|
|
1198
|
-
get: function () { return
|
|
738
|
+
get: function () { return chunkCK3L6Y43_cjs.I18nShell; }
|
|
1199
739
|
});
|
|
1200
740
|
Object.defineProperty(exports, "createRegistry", {
|
|
1201
741
|
enumerable: true,
|
|
1202
|
-
get: function () { return
|
|
742
|
+
get: function () { return chunkCK3L6Y43_cjs.createRegistry; }
|
|
1203
743
|
});
|
|
1204
744
|
Object.defineProperty(exports, "useCapabilities", {
|
|
1205
745
|
enumerable: true,
|
|
1206
|
-
get: function () { return
|
|
746
|
+
get: function () { return chunkCK3L6Y43_cjs.useCapabilities; }
|
|
1207
747
|
});
|
|
1208
748
|
Object.defineProperty(exports, "useCapability", {
|
|
1209
749
|
enumerable: true,
|
|
1210
|
-
get: function () { return
|
|
750
|
+
get: function () { return chunkCK3L6Y43_cjs.useCapability; }
|
|
751
|
+
});
|
|
752
|
+
Object.defineProperty(exports, "useKaafilBrand", {
|
|
753
|
+
enumerable: true,
|
|
754
|
+
get: function () { return chunkCK3L6Y43_cjs.useKaafilBrand; }
|
|
1211
755
|
});
|
|
1212
756
|
Object.defineProperty(exports, "useKaafilChrome", {
|
|
1213
757
|
enumerable: true,
|
|
1214
|
-
get: function () { return
|
|
758
|
+
get: function () { return chunkCK3L6Y43_cjs.useKaafilChrome; }
|
|
1215
759
|
});
|
|
1216
760
|
Object.defineProperty(exports, "useKaafilClient", {
|
|
1217
761
|
enumerable: true,
|
|
1218
|
-
get: function () { return
|
|
762
|
+
get: function () { return chunkCK3L6Y43_cjs.useKaafilClient; }
|
|
763
|
+
});
|
|
764
|
+
Object.defineProperty(exports, "useKaafilShareMeta", {
|
|
765
|
+
enumerable: true,
|
|
766
|
+
get: function () { return chunkCK3L6Y43_cjs.useKaafilShareMeta; }
|
|
1219
767
|
});
|
|
1220
768
|
Object.defineProperty(exports, "useOfflineEvent", {
|
|
1221
769
|
enumerable: true,
|
|
1222
|
-
get: function () { return
|
|
770
|
+
get: function () { return chunkCK3L6Y43_cjs.useOfflineEvent; }
|
|
1223
771
|
});
|
|
1224
772
|
Object.defineProperty(exports, "useOfflineMutation", {
|
|
1225
773
|
enumerable: true,
|
|
1226
|
-
get: function () { return
|
|
774
|
+
get: function () { return chunkCK3L6Y43_cjs.useOfflineMutation; }
|
|
1227
775
|
});
|
|
1228
776
|
Object.defineProperty(exports, "useOutboxStatus", {
|
|
1229
777
|
enumerable: true,
|
|
1230
|
-
get: function () { return
|
|
778
|
+
get: function () { return chunkCK3L6Y43_cjs.useOutboxStatus; }
|
|
1231
779
|
});
|
|
1232
780
|
Object.defineProperty(exports, "usePersona", {
|
|
1233
781
|
enumerable: true,
|
|
1234
|
-
get: function () { return
|
|
782
|
+
get: function () { return chunkCK3L6Y43_cjs.usePersona; }
|
|
1235
783
|
});
|
|
1236
784
|
Object.defineProperty(exports, "useSession", {
|
|
1237
785
|
enumerable: true,
|
|
1238
|
-
get: function () { return
|
|
786
|
+
get: function () { return chunkCK3L6Y43_cjs.useSession; }
|
|
1239
787
|
});
|
|
1240
788
|
Object.defineProperty(exports, "UnsatisfiableSchemeError", {
|
|
1241
789
|
enumerable: true,
|
|
1242
790
|
get: function () { return client.UnsatisfiableSchemeError; }
|
|
1243
791
|
});
|
|
1244
|
-
exports.AppShell = AppShell;
|
|
1245
|
-
exports.ConfigShell = ConfigShell;
|
|
1246
|
-
exports.ErrorShell = ErrorShell;
|
|
1247
792
|
exports.HostCssCompatibilityProbe = HostCssCompatibilityProbe;
|
|
1248
793
|
exports.KaafilSessionProbe = KaafilSessionProbe;
|
|
1249
|
-
exports.KaafilUIKitProvider = KaafilUIKitProvider;
|
|
1250
794
|
exports.NotImplementedError = NotImplementedError;
|
|
1251
|
-
exports.OfflineShell = OfflineShell;
|
|
1252
|
-
exports.SessionShell = SessionShell;
|
|
1253
|
-
exports.TelemetryShell = TelemetryShell;
|
|
1254
|
-
exports.ThemeShell = ThemeShell;
|
|
1255
795
|
exports.useBlobStatus = useBlobStatus;
|
|
1256
|
-
exports.useDefaultCapabilityViews = useDefaultCapabilityViews;
|
|
1257
796
|
exports.useFeedbackNps = useFeedbackNps;
|
|
1258
797
|
exports.useJourney = useJourney;
|
|
798
|
+
exports.useResolvedSetting = useResolvedSetting;
|
|
1259
799
|
exports.useSnapshotEntity = useSnapshotEntity;
|
|
1260
800
|
exports.useStaleness = useStaleness;
|
|
1261
801
|
exports.useTreks = useTreks;
|