kaafil-react-uikit 0.11.2 → 0.11.4
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 +43 -0
- package/dist/admin/index.cjs +361 -361
- package/dist/admin/index.js +5 -5
- package/dist/{chunk-JK7EGZ6D.js → chunk-4U5VHQDT.js} +5 -5
- package/dist/{chunk-JK7EGZ6D.js.map → chunk-4U5VHQDT.js.map} +1 -1
- package/dist/{chunk-77RL3E4C.cjs → chunk-5ORJRFXZ.cjs} +24 -3
- package/dist/chunk-5ORJRFXZ.cjs.map +1 -0
- package/dist/{chunk-4U5I3QV7.js → chunk-63JQKLMH.js} +3 -3
- package/dist/{chunk-4U5I3QV7.js.map → chunk-63JQKLMH.js.map} +1 -1
- package/dist/{chunk-YCD42AD6.cjs → chunk-6QSHORU3.cjs} +17 -17
- package/dist/{chunk-YCD42AD6.cjs.map → chunk-6QSHORU3.cjs.map} +1 -1
- package/dist/{chunk-GBYQPMJY.js → chunk-F2ENMVT7.js} +3 -3
- package/dist/{chunk-GBYQPMJY.js.map → chunk-F2ENMVT7.js.map} +1 -1
- package/dist/{chunk-T5LU3IUR.js → chunk-LJO2FGFD.js} +5 -5
- package/dist/{chunk-T5LU3IUR.js.map → chunk-LJO2FGFD.js.map} +1 -1
- package/dist/{chunk-BGXB7ST5.js → chunk-LOLQNRIK.js} +3 -3
- package/dist/{chunk-BGXB7ST5.js.map → chunk-LOLQNRIK.js.map} +1 -1
- package/dist/{chunk-63FVHEQV.cjs → chunk-ODH3SYYW.cjs} +55 -55
- package/dist/{chunk-63FVHEQV.cjs.map → chunk-ODH3SYYW.cjs.map} +1 -1
- package/dist/{chunk-IQ4OFIUJ.js → chunk-RCWSMWQD.js} +3 -3
- package/dist/{chunk-IQ4OFIUJ.js.map → chunk-RCWSMWQD.js.map} +1 -1
- package/dist/{chunk-6XUIJCTP.cjs → chunk-T5JYKERY.cjs} +12 -12
- package/dist/{chunk-6XUIJCTP.cjs.map → chunk-T5JYKERY.cjs.map} +1 -1
- package/dist/{chunk-XTNPBDRA.js → chunk-U6IE2UYL.js} +3 -3
- package/dist/{chunk-XTNPBDRA.js.map → chunk-U6IE2UYL.js.map} +1 -1
- package/dist/{chunk-QRDWTJ5F.cjs → chunk-USKVWPJD.cjs} +83 -83
- package/dist/{chunk-QRDWTJ5F.cjs.map → chunk-USKVWPJD.cjs.map} +1 -1
- package/dist/{chunk-I7NTF56J.cjs → chunk-VHBGE4BY.cjs} +4 -4
- package/dist/{chunk-I7NTF56J.cjs.map → chunk-VHBGE4BY.cjs.map} +1 -1
- package/dist/{chunk-SBYLJGAD.cjs → chunk-XWU5MCY3.cjs} +9 -9
- package/dist/{chunk-SBYLJGAD.cjs.map → chunk-XWU5MCY3.cjs.map} +1 -1
- package/dist/{chunk-WYPUA6ZD.js → chunk-YJJ4DI42.js} +24 -3
- package/dist/chunk-YJJ4DI42.js.map +1 -0
- package/dist/chunk-YKBA4WQJ.cjs +12 -0
- package/dist/{chunk-HUJGLKZR.cjs.map → chunk-YKBA4WQJ.cjs.map} +1 -1
- package/dist/core/index.cjs +107 -107
- package/dist/core/index.js +10 -10
- package/dist/manager/index.cjs +262 -260
- package/dist/manager/index.cjs.map +1 -1
- package/dist/manager/index.js +12 -10
- package/dist/manager/index.js.map +1 -1
- package/dist/traveller/index.cjs +35 -35
- package/dist/traveller/index.js +5 -5
- package/package.json +2 -2
- package/dist/chunk-77RL3E4C.cjs.map +0 -1
- package/dist/chunk-HUJGLKZR.cjs +0 -12
- package/dist/chunk-WYPUA6ZD.js.map +0 -1
package/dist/admin/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkODH3SYYW_cjs = require('../chunk-ODH3SYYW.cjs');
|
|
4
|
+
var chunkUSKVWPJD_cjs = require('../chunk-USKVWPJD.cjs');
|
|
5
|
+
require('../chunk-VHBGE4BY.cjs');
|
|
6
|
+
var chunkT5JYKERY_cjs = require('../chunk-T5JYKERY.cjs');
|
|
7
|
+
var chunk5ORJRFXZ_cjs = require('../chunk-5ORJRFXZ.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
@@ -109,13 +109,13 @@ function CloseIcon(props) {
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
function StatusPill({ tone, children, style }) {
|
|
112
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style:
|
|
112
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
113
113
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-pill-dot", "aria-hidden": "true" }),
|
|
114
114
|
children
|
|
115
115
|
] });
|
|
116
116
|
}
|
|
117
117
|
function Tag({ tone, children, style }) {
|
|
118
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style:
|
|
118
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style: chunk5ORJRFXZ_cjs.tokenStyle(style), children });
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// src/admin/composite/office/AgencySettingsScreen/internal/fieldDisplayValue.ts
|
|
@@ -183,7 +183,7 @@ function SheetDialog({
|
|
|
183
183
|
role: "dialog",
|
|
184
184
|
"aria-modal": "true",
|
|
185
185
|
"aria-labelledby": titleId,
|
|
186
|
-
style:
|
|
186
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
187
187
|
children: [
|
|
188
188
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-sheet-header", children: [
|
|
189
189
|
eyebrow === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-admin-shared-patterns-sheet-eyebrow", children: eyebrow }),
|
|
@@ -479,7 +479,7 @@ function TriStateToggle({ entry, onChange, t }) {
|
|
|
479
479
|
function NoRender() {
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
|
-
var fieldKindRegistry =
|
|
482
|
+
var fieldKindRegistry = chunk5ORJRFXZ_cjs.createRegistry({
|
|
483
483
|
fallback: { render: NoRender }
|
|
484
484
|
});
|
|
485
485
|
fieldKindRegistry.register("toggle", {
|
|
@@ -629,11 +629,11 @@ function SectionCard({
|
|
|
629
629
|
onDismissError,
|
|
630
630
|
style
|
|
631
631
|
}) {
|
|
632
|
-
const { t } =
|
|
632
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
633
633
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
634
634
|
const setFields = section.fields.filter((field) => stored?.[field.key] !== void 0);
|
|
635
635
|
const isCustomized = setFields.length > 0;
|
|
636
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style:
|
|
636
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
637
637
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-agency-settings-screen__panel-head", children: [
|
|
638
638
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-head-copy", children: [
|
|
639
639
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "kf-agency-settings-screen__panel-eyebrow", children: [
|
|
@@ -1000,7 +1000,7 @@ function orderSectionsByCustomized(sections, isCustomized) {
|
|
|
1000
1000
|
];
|
|
1001
1001
|
}
|
|
1002
1002
|
function AgencySettingsScreen(props) {
|
|
1003
|
-
const session =
|
|
1003
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
1004
1004
|
if (session.status !== "authenticated") {
|
|
1005
1005
|
return null;
|
|
1006
1006
|
}
|
|
@@ -1012,8 +1012,8 @@ function ReadyAgencySettingsScreen({
|
|
|
1012
1012
|
components,
|
|
1013
1013
|
style
|
|
1014
1014
|
}) {
|
|
1015
|
-
const { t } =
|
|
1016
|
-
const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } =
|
|
1015
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1016
|
+
const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } = chunkODH3SYYW_cjs.useAgencySettings();
|
|
1017
1017
|
const [selectedSectionId, setSelectedSectionId] = react.useState(AGENCY_SETTINGS_SECTIONS[0]?.id);
|
|
1018
1018
|
const [savingSectionId, setSavingSectionId] = react.useState(void 0);
|
|
1019
1019
|
const [sectionError, setSectionError] = react.useState(void 0);
|
|
@@ -1030,13 +1030,13 @@ function ReadyAgencySettingsScreen({
|
|
|
1030
1030
|
try {
|
|
1031
1031
|
await patchSettings({ version: document2.version, [sectionId]: patch });
|
|
1032
1032
|
} catch (error) {
|
|
1033
|
-
const kind =
|
|
1033
|
+
const kind = chunkUSKVWPJD_cjs.classifyError(error).code === "CONFLICT_VERSION" ? "conflict" : "failed";
|
|
1034
1034
|
setSectionError({ sectionId, kind });
|
|
1035
1035
|
} finally {
|
|
1036
1036
|
setSavingSectionId(void 0);
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen", style:
|
|
1039
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1040
1040
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__heading", children: [
|
|
1041
1041
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-agency-settings-screen__eyebrow", children: t("chrome.agencySettingsScreen.eyebrow") }),
|
|
1042
1042
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "kf-agency-settings-screen__title", children: title }),
|
|
@@ -1153,7 +1153,7 @@ function summaryFor(t, selected, everyLabelKey, optionLabelKey) {
|
|
|
1153
1153
|
return selected.length === 0 ? t(everyLabelKey) : selected.map(optionLabelKey).join(", ");
|
|
1154
1154
|
}
|
|
1155
1155
|
function AutoAttachPanel({ template, saving, onSave }) {
|
|
1156
|
-
const { t } =
|
|
1156
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1157
1157
|
const titleId = react.useId();
|
|
1158
1158
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
1159
1159
|
const [draft, setDraft] = react.useState(() => draftFromTemplate(template));
|
|
@@ -1389,9 +1389,9 @@ function TemplateEditorHeader({
|
|
|
1389
1389
|
onPublish,
|
|
1390
1390
|
style
|
|
1391
1391
|
}) {
|
|
1392
|
-
const { t } =
|
|
1392
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1393
1393
|
const statusLabelKey5 = template.status === "PUBLISHED" ? "chrome.checklistTemplateEditor.status.published" : "chrome.checklistTemplateEditor.status.draft";
|
|
1394
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header", style:
|
|
1394
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1395
1395
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header-identity", children: [
|
|
1396
1396
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header-top", children: [
|
|
1397
1397
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1460,7 +1460,7 @@ function TemplateItemEditDialog({
|
|
|
1460
1460
|
onRemove,
|
|
1461
1461
|
onClose
|
|
1462
1462
|
}) {
|
|
1463
|
-
const { t } =
|
|
1463
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1464
1464
|
const titleId = react.useId();
|
|
1465
1465
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1466
1466
|
SheetDialog,
|
|
@@ -1610,7 +1610,7 @@ function TemplateItemRow({
|
|
|
1610
1610
|
onReorder,
|
|
1611
1611
|
style
|
|
1612
1612
|
}) {
|
|
1613
|
-
const { t } =
|
|
1613
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1614
1614
|
const dayOffset = item.dayOffset.trim().length > 0 ? Number.parseInt(item.dayOffset, 10) : null;
|
|
1615
1615
|
const dayLabel = dayOffset === null ? "\u2014" : dayOffset > 0 ? `D+${dayOffset}` : `D${dayOffset}`;
|
|
1616
1616
|
return (
|
|
@@ -1638,7 +1638,7 @@ function TemplateItemRow({
|
|
|
1638
1638
|
onReorder(draggedDraftId, item.draftId);
|
|
1639
1639
|
}
|
|
1640
1640
|
},
|
|
1641
|
-
style:
|
|
1641
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
1642
1642
|
children: [
|
|
1643
1643
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__item-drag", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(DragHandleIcon, {}) }),
|
|
1644
1644
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__item-index", children: String(index + 1).padStart(2, "0") }),
|
|
@@ -1710,8 +1710,8 @@ function ChecklistTemplateEditor({
|
|
|
1710
1710
|
components,
|
|
1711
1711
|
style
|
|
1712
1712
|
}) {
|
|
1713
|
-
const { t } =
|
|
1714
|
-
const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } =
|
|
1713
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1714
|
+
const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } = chunkODH3SYYW_cjs.useAgencyChecklistTemplates();
|
|
1715
1715
|
const template = templates.find((candidate) => candidate.id === templateId);
|
|
1716
1716
|
const [title, setTitle] = react.useState("");
|
|
1717
1717
|
const [items, setItems] = react.useState([]);
|
|
@@ -1828,7 +1828,7 @@ function ChecklistTemplateEditor({
|
|
|
1828
1828
|
}
|
|
1829
1829
|
};
|
|
1830
1830
|
if (lastFetchFailed && !loaded) {
|
|
1831
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style:
|
|
1831
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", role: "alert", children: [
|
|
1832
1832
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon2, { className: "kf-checklist-template-editor__status-icon kf-checklist-template-editor__status-icon--danger" }),
|
|
1833
1833
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-editor__status-title", children: t("chrome.checklistTemplateEditor.errorTitle") }),
|
|
1834
1834
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1843,20 +1843,20 @@ function ChecklistTemplateEditor({
|
|
|
1843
1843
|
] }) });
|
|
1844
1844
|
}
|
|
1845
1845
|
if (!loaded) {
|
|
1846
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style:
|
|
1846
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__skeleton", "aria-hidden": "true", children: [
|
|
1847
1847
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" }),
|
|
1848
1848
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" }),
|
|
1849
1849
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" })
|
|
1850
1850
|
] }) });
|
|
1851
1851
|
}
|
|
1852
1852
|
if (template === void 0) {
|
|
1853
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style:
|
|
1853
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", children: [
|
|
1854
1854
|
/* @__PURE__ */ jsxRuntime.jsx(EmptyStateIcon2, { className: "kf-checklist-template-editor__status-icon" }),
|
|
1855
1855
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-editor__status-title", children: t("chrome.checklistTemplateEditor.notFoundTitle") })
|
|
1856
1856
|
] }) });
|
|
1857
1857
|
}
|
|
1858
1858
|
const editingItem = items.find((item) => item.draftId === editingDraftId);
|
|
1859
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor", style:
|
|
1859
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
1860
1860
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1861
1861
|
TemplateEditorHeader2,
|
|
1862
1862
|
{
|
|
@@ -1959,7 +1959,7 @@ var AUDIENCE_HINT_KEY = {
|
|
|
1959
1959
|
EXTERNAL: "chrome.checklistTemplateLibrary.audience.externalHint"
|
|
1960
1960
|
};
|
|
1961
1961
|
function CreateTemplateSheet({ onSubmit, onClose }) {
|
|
1962
|
-
const { t } =
|
|
1962
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
1963
1963
|
const titleId = react.useId();
|
|
1964
1964
|
const [locale, setLocale] = react.useState("en");
|
|
1965
1965
|
const [title, setTitle] = react.useState("");
|
|
@@ -2076,7 +2076,7 @@ function DeleteTemplateConfirmSheet({
|
|
|
2076
2076
|
onConfirm,
|
|
2077
2077
|
onClose
|
|
2078
2078
|
}) {
|
|
2079
|
-
const { t } =
|
|
2079
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2080
2080
|
const titleId = react.useId();
|
|
2081
2081
|
if (template === void 0) {
|
|
2082
2082
|
return null;
|
|
@@ -2195,7 +2195,7 @@ function TemplateRow({
|
|
|
2195
2195
|
onDelete,
|
|
2196
2196
|
style
|
|
2197
2197
|
}) {
|
|
2198
|
-
const { t } =
|
|
2198
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2199
2199
|
const statusLabelKey5 = template.status === "PUBLISHED" ? "chrome.checklistTemplateLibrary.status.published" : "chrome.checklistTemplateLibrary.status.draft";
|
|
2200
2200
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2201
2201
|
"tr",
|
|
@@ -2204,7 +2204,7 @@ function TemplateRow({
|
|
|
2204
2204
|
className: "kf-checklist-template-library__table-row",
|
|
2205
2205
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
2206
2206
|
"data-selected": selected === true ? "true" : void 0,
|
|
2207
|
-
style:
|
|
2207
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
2208
2208
|
children: [
|
|
2209
2209
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2210
2210
|
"td",
|
|
@@ -2294,7 +2294,7 @@ function TemplateLibrarySkeleton() {
|
|
|
2294
2294
|
] }, rowIndex)) }) }) });
|
|
2295
2295
|
}
|
|
2296
2296
|
function CardHeading({ count }) {
|
|
2297
|
-
const { t } =
|
|
2297
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2298
2298
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-library__card-title", children: t(
|
|
2299
2299
|
count === 1 ? "chrome.checklistTemplateLibrary.countLabelOne" : "chrome.checklistTemplateLibrary.countLabel"
|
|
2300
2300
|
).replace("{count}", String(count)) });
|
|
@@ -2310,8 +2310,8 @@ function ChecklistTemplateLibrary({
|
|
|
2310
2310
|
components,
|
|
2311
2311
|
style
|
|
2312
2312
|
}) {
|
|
2313
|
-
const { t } =
|
|
2314
|
-
const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } =
|
|
2313
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2314
|
+
const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } = chunkODH3SYYW_cjs.useAgencyChecklistTemplates();
|
|
2315
2315
|
const isControlled = controlledCreating !== void 0 && onCreatingChange !== void 0;
|
|
2316
2316
|
const [internalCreating, setInternalCreating] = react.useState(false);
|
|
2317
2317
|
const creating = isControlled ? controlledCreating : internalCreating;
|
|
@@ -2347,7 +2347,7 @@ function ChecklistTemplateLibrary({
|
|
|
2347
2347
|
]
|
|
2348
2348
|
}
|
|
2349
2349
|
);
|
|
2350
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library", style:
|
|
2350
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
2351
2351
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library__heading", children: [
|
|
2352
2352
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library__heading-copy", children: [
|
|
2353
2353
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-checklist-template-library__title", children: title }),
|
|
@@ -2642,8 +2642,8 @@ function BuilderHeader({
|
|
|
2642
2642
|
pending,
|
|
2643
2643
|
style
|
|
2644
2644
|
}) {
|
|
2645
|
-
const { t } =
|
|
2646
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style:
|
|
2645
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
2646
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
2647
2647
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header-identity", children: [
|
|
2648
2648
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header-top", children: [
|
|
2649
2649
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2839,7 +2839,7 @@ var fallback = {
|
|
|
2839
2839
|
preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-form-builder__preview-unsupported", children: field.label }),
|
|
2840
2840
|
configFields: NoConfigFields
|
|
2841
2841
|
};
|
|
2842
|
-
var fieldRegistry =
|
|
2842
|
+
var fieldRegistry = chunk5ORJRFXZ_cjs.createRegistry({ fallback });
|
|
2843
2843
|
fieldRegistry.register("HEADING", {
|
|
2844
2844
|
preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-form-builder__preview-heading", children: field.label }),
|
|
2845
2845
|
configFields: NoConfigFields
|
|
@@ -3311,7 +3311,7 @@ fieldRegistry.register("ADDRESS", {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
});
|
|
3313
3313
|
function FieldEditDialog(props) {
|
|
3314
|
-
const { t } =
|
|
3314
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3315
3315
|
const titleId = react.useId();
|
|
3316
3316
|
const { bindings, saving, onClose } = props;
|
|
3317
3317
|
const isEdit = props.mode === "edit";
|
|
@@ -3548,7 +3548,7 @@ function FieldEditDialog(props) {
|
|
|
3548
3548
|
);
|
|
3549
3549
|
}
|
|
3550
3550
|
function LivePreviewPane({ title, sections, fields }) {
|
|
3551
|
-
const { t } =
|
|
3551
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3552
3552
|
const [frame, setFrame] = react.useState("desktop");
|
|
3553
3553
|
const [answers, setAnswers] = react.useState({});
|
|
3554
3554
|
function setAnswer(fieldId, value) {
|
|
@@ -3637,7 +3637,7 @@ function FieldRow({
|
|
|
3637
3637
|
onDragEnd,
|
|
3638
3638
|
style
|
|
3639
3639
|
}) {
|
|
3640
|
-
const { t } =
|
|
3640
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3641
3641
|
const hasHelp = field.helpText !== null && field.helpText.length > 0;
|
|
3642
3642
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3643
3643
|
"li",
|
|
@@ -3645,7 +3645,7 @@ function FieldRow({
|
|
|
3645
3645
|
className: "kf-form-builder__field-row",
|
|
3646
3646
|
"data-dragging": dragging ? "true" : void 0,
|
|
3647
3647
|
"data-drag-over": dragOver ? "true" : void 0,
|
|
3648
|
-
style:
|
|
3648
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
3649
3649
|
onDragOver: (event) => {
|
|
3650
3650
|
event.preventDefault();
|
|
3651
3651
|
onDragOverRow();
|
|
@@ -3707,7 +3707,7 @@ function SectionBlock({
|
|
|
3707
3707
|
onOpenField,
|
|
3708
3708
|
onReorderField
|
|
3709
3709
|
}) {
|
|
3710
|
-
const { t } =
|
|
3710
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3711
3711
|
const [title, setTitle] = react.useState(section.title ?? "");
|
|
3712
3712
|
const [draggedFieldId, setDraggedFieldId] = react.useState(void 0);
|
|
3713
3713
|
const [dragOverFieldId, setDragOverFieldId] = react.useState(void 0);
|
|
@@ -3841,7 +3841,7 @@ function draftFromForm(form) {
|
|
|
3841
3841
|
};
|
|
3842
3842
|
}
|
|
3843
3843
|
function TargetingSummary({ form }) {
|
|
3844
|
-
const { t } =
|
|
3844
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3845
3845
|
const anchorLabel = (anchor) => t(`chrome.formBuilder.summary.anchor.${anchor}`);
|
|
3846
3846
|
const eventTypes = form.appliesToEventTypes.length === 0 ? t("chrome.formBuilder.summary.everyEventType") : form.appliesToEventTypes.map((type) => t(`chrome.formBuilder.targeting.eventType.${type}`)).join(" \xB7 ");
|
|
3847
3847
|
const tripModes = form.appliesToTripModes.length === 0 ? t("chrome.formBuilder.summary.everyTripMode") : form.appliesToTripModes.map((mode) => t(`chrome.formBuilder.targeting.tripMode.${mode}`)).join(" \xB7 ");
|
|
@@ -3902,7 +3902,7 @@ function TargetingSummary({ form }) {
|
|
|
3902
3902
|
] }, cell.key)) });
|
|
3903
3903
|
}
|
|
3904
3904
|
function TargetingPanel({ form, saving, onSave }) {
|
|
3905
|
-
const { t } =
|
|
3905
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
3906
3906
|
const [editing, setEditing] = react.useState(false);
|
|
3907
3907
|
const [submitted, setSubmitted] = react.useState(false);
|
|
3908
3908
|
const [draft, setDraft] = react.useState(() => draftFromForm(form));
|
|
@@ -4198,7 +4198,7 @@ function buildReorderSections(sections, fieldsBySection) {
|
|
|
4198
4198
|
}));
|
|
4199
4199
|
}
|
|
4200
4200
|
function FormBuilder({ formId, onBack, components, style }) {
|
|
4201
|
-
const { t } =
|
|
4201
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4202
4202
|
const {
|
|
4203
4203
|
getForm,
|
|
4204
4204
|
patchForm,
|
|
@@ -4216,7 +4216,7 @@ function FormBuilder({ formId, onBack, components, style }) {
|
|
|
4216
4216
|
deleteField,
|
|
4217
4217
|
reorderForm,
|
|
4218
4218
|
listBindings
|
|
4219
|
-
} =
|
|
4219
|
+
} = chunkODH3SYYW_cjs.useAgencyForms();
|
|
4220
4220
|
const [form, setForm] = react.useState(void 0);
|
|
4221
4221
|
const [loadFailed, setLoadFailed] = react.useState(false);
|
|
4222
4222
|
const [bindings, setBindings] = react.useState([]);
|
|
@@ -4427,7 +4427,7 @@ function FormBuilder({ formId, onBack, components, style }) {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
}
|
|
4429
4429
|
if (loadFailed && form === void 0) {
|
|
4430
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style:
|
|
4430
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__status-block", role: "alert", children: [
|
|
4431
4431
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon4, { className: "kf-form-builder__status-icon kf-form-builder__status-icon--danger" }),
|
|
4432
4432
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-form-builder__status-title", children: t("chrome.formBuilder.errorTitle") }),
|
|
4433
4433
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4442,13 +4442,13 @@ function FormBuilder({ formId, onBack, components, style }) {
|
|
|
4442
4442
|
] }) });
|
|
4443
4443
|
}
|
|
4444
4444
|
if (form === void 0) {
|
|
4445
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style:
|
|
4445
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__skeleton", "aria-hidden": "true", children: [
|
|
4446
4446
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" }),
|
|
4447
4447
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" }),
|
|
4448
4448
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" })
|
|
4449
4449
|
] }) });
|
|
4450
4450
|
}
|
|
4451
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder", style:
|
|
4451
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
4452
4452
|
onBack !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: onBack, className: "kf-form-builder__back-link", children: [
|
|
4453
4453
|
/* @__PURE__ */ jsxRuntime.jsx(BackIcon, {}),
|
|
4454
4454
|
t("chrome.formBuilder.backToLibrary")
|
|
@@ -4602,7 +4602,7 @@ var AUDIENCE_LABEL_KEY2 = {
|
|
|
4602
4602
|
MANAGER: "chrome.formsLibrary.audience.manager"
|
|
4603
4603
|
};
|
|
4604
4604
|
function CreateFormSheet({ onSubmit, onClose }) {
|
|
4605
|
-
const { t } =
|
|
4605
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4606
4606
|
const titleId = react.useId();
|
|
4607
4607
|
const [locale, setLocale] = react.useState("en");
|
|
4608
4608
|
const [title, setTitle] = react.useState("");
|
|
@@ -4630,7 +4630,7 @@ function CreateFormSheet({ onSubmit, onClose }) {
|
|
|
4630
4630
|
});
|
|
4631
4631
|
onClose();
|
|
4632
4632
|
} catch (error) {
|
|
4633
|
-
setErrorCode(
|
|
4633
|
+
setErrorCode(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
4634
4634
|
} finally {
|
|
4635
4635
|
setPending(false);
|
|
4636
4636
|
}
|
|
@@ -4818,7 +4818,7 @@ function formatDate2(iso) {
|
|
|
4818
4818
|
});
|
|
4819
4819
|
}
|
|
4820
4820
|
function FormRow({ form, selected, onSelect, style }) {
|
|
4821
|
-
const { t } =
|
|
4821
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4822
4822
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4823
4823
|
"tr",
|
|
4824
4824
|
{
|
|
@@ -4826,7 +4826,7 @@ function FormRow({ form, selected, onSelect, style }) {
|
|
|
4826
4826
|
className: "kf-forms-library__table-row",
|
|
4827
4827
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
4828
4828
|
"data-selected": selected === true ? "true" : void 0,
|
|
4829
|
-
style:
|
|
4829
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
4830
4830
|
children: [
|
|
4831
4831
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4832
4832
|
"td",
|
|
@@ -4882,7 +4882,7 @@ function FormsLibrarySkeleton() {
|
|
|
4882
4882
|
] }, rowIndex)) }) }) });
|
|
4883
4883
|
}
|
|
4884
4884
|
function CardHeading2({ count }) {
|
|
4885
|
-
const { t } =
|
|
4885
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4886
4886
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-forms-library__card-title", children: t(
|
|
4887
4887
|
count === 1 ? "chrome.formsLibrary.countLabelOne" : "chrome.formsLibrary.countLabel"
|
|
4888
4888
|
).replace("{count}", String(count)) });
|
|
@@ -4897,7 +4897,7 @@ function StatusFilterBar({
|
|
|
4897
4897
|
active,
|
|
4898
4898
|
onChange
|
|
4899
4899
|
}) {
|
|
4900
|
-
const { t } =
|
|
4900
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4901
4901
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-forms-library__filter-bar", children: [
|
|
4902
4902
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.formsLibrary.filter.legend") }),
|
|
4903
4903
|
STATUS_FILTERS.map((filter) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4923,8 +4923,8 @@ function FormsLibrary({
|
|
|
4923
4923
|
components,
|
|
4924
4924
|
style
|
|
4925
4925
|
}) {
|
|
4926
|
-
const { t } =
|
|
4927
|
-
const { forms, loaded, lastFetchFailed, refresh, createForm } =
|
|
4926
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
4927
|
+
const { forms, loaded, lastFetchFailed, refresh, createForm } = chunkODH3SYYW_cjs.useAgencyForms();
|
|
4928
4928
|
const isControlled = controlledCreating !== void 0 && onCreatingChange !== void 0;
|
|
4929
4929
|
const [internalCreating, setInternalCreating] = react.useState(false);
|
|
4930
4930
|
const creating = isControlled ? controlledCreating : internalCreating;
|
|
@@ -4935,7 +4935,7 @@ function FormsLibrary({
|
|
|
4935
4935
|
await createForm(input);
|
|
4936
4936
|
};
|
|
4937
4937
|
const visibleForms = statusFilter === "ALL" ? forms : forms.filter((form) => form.status === statusFilter);
|
|
4938
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library", style:
|
|
4938
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
4939
4939
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library__heading", children: [
|
|
4940
4940
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-forms-library__title", children: title }),
|
|
4941
4941
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-forms-library__subtitle", children: subtitle }) : null
|
|
@@ -5011,9 +5011,9 @@ function FormsAuthoringFlow({ initialFormId, style }) {
|
|
|
5011
5011
|
setSelectedFormId(void 0);
|
|
5012
5012
|
}
|
|
5013
5013
|
if (selectedFormId === void 0) {
|
|
5014
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style:
|
|
5014
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormsLibrary, { onSelectForm: handleSelect }) });
|
|
5015
5015
|
}
|
|
5016
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style:
|
|
5016
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormBuilder, { formId: selectedFormId, onBack: handleBack }) });
|
|
5017
5017
|
}
|
|
5018
5018
|
function SearchIcon(props) {
|
|
5019
5019
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5164,7 +5164,7 @@ function AdminAvatar({
|
|
|
5164
5164
|
className: "kf-admin-shared-patterns-avatar",
|
|
5165
5165
|
"data-size": size,
|
|
5166
5166
|
"aria-hidden": "true",
|
|
5167
|
-
style:
|
|
5167
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style, {
|
|
5168
5168
|
"--kf-admin-shared-patterns-avatar-computed-size": SIZE_VAR[size],
|
|
5169
5169
|
"--kf-admin-shared-patterns-avatar-computed-bg": `var(--kf-color-avatar-${step})`
|
|
5170
5170
|
}),
|
|
@@ -5184,7 +5184,7 @@ function ManagerResultRow({
|
|
|
5184
5184
|
onSelect,
|
|
5185
5185
|
style
|
|
5186
5186
|
}) {
|
|
5187
|
-
const { t } =
|
|
5187
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5188
5188
|
const initials = initialsFromName(manager.fullName);
|
|
5189
5189
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5190
5190
|
"tr",
|
|
@@ -5192,7 +5192,7 @@ function ManagerResultRow({
|
|
|
5192
5192
|
role: "row",
|
|
5193
5193
|
className: "kf-manager-directory-flow__table-row",
|
|
5194
5194
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
5195
|
-
style:
|
|
5195
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
5196
5196
|
children: [
|
|
5197
5197
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5198
5198
|
"td",
|
|
@@ -5301,8 +5301,8 @@ function ManagerResultsListBody({
|
|
|
5301
5301
|
onCountChange,
|
|
5302
5302
|
onRetry
|
|
5303
5303
|
}) {
|
|
5304
|
-
const { t } =
|
|
5305
|
-
const directories =
|
|
5304
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5305
|
+
const directories = chunkODH3SYYW_cjs.useDirectories();
|
|
5306
5306
|
const [errorMessage, setErrorMessage] = react.useState(void 0);
|
|
5307
5307
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
5308
5308
|
const ManagerRow = ManagerResultRowComponent ?? ManagerResultRow;
|
|
@@ -5313,7 +5313,7 @@ function ManagerResultsListBody({
|
|
|
5313
5313
|
setErrorMessage(void 0);
|
|
5314
5314
|
return page;
|
|
5315
5315
|
} catch (error) {
|
|
5316
|
-
setErrorMessage(
|
|
5316
|
+
setErrorMessage(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
5317
5317
|
return { rows: [], nextCursor: void 0 };
|
|
5318
5318
|
} finally {
|
|
5319
5319
|
setHasSettled(true);
|
|
@@ -5321,7 +5321,7 @@ function ManagerResultsListBody({
|
|
|
5321
5321
|
},
|
|
5322
5322
|
[directories, filters]
|
|
5323
5323
|
);
|
|
5324
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
5324
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkODH3SYYW_cjs.usePaginatedList(fetch);
|
|
5325
5325
|
const isLoading = !hasSettled;
|
|
5326
5326
|
const reportedCount = isLoading || errorMessage !== void 0 ? void 0 : rows.length;
|
|
5327
5327
|
react.useEffect(() => {
|
|
@@ -5418,7 +5418,7 @@ function ManagerSearchInput({
|
|
|
5418
5418
|
debounceMs,
|
|
5419
5419
|
onDebouncedChange
|
|
5420
5420
|
}) {
|
|
5421
|
-
const { t } =
|
|
5421
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5422
5422
|
const [value, setValue] = react.useState("");
|
|
5423
5423
|
react.useEffect(() => {
|
|
5424
5424
|
const timer = setTimeout(() => onDebouncedChange(value), debounceMs);
|
|
@@ -5457,12 +5457,12 @@ function ManagerDirectoryFlow({
|
|
|
5457
5457
|
components,
|
|
5458
5458
|
style
|
|
5459
5459
|
}) {
|
|
5460
|
-
const { t } =
|
|
5460
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5461
5461
|
const [query, setQuery] = react.useState("");
|
|
5462
5462
|
const [count, setCount] = react.useState(void 0);
|
|
5463
5463
|
const trimmedQuery = query.trim();
|
|
5464
5464
|
const handleCountChange = react.useCallback((next) => setCount(next), []);
|
|
5465
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow", style:
|
|
5465
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
5466
5466
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow__heading", children: [
|
|
5467
5467
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-manager-directory-flow__title", children: title }),
|
|
5468
5468
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-directory-flow__subtitle", children: subtitle }) : null
|
|
@@ -5534,7 +5534,7 @@ function formatDate3(iso) {
|
|
|
5534
5534
|
return new Date(iso).toLocaleDateString("en-GB", { day: "2-digit", month: "short" });
|
|
5535
5535
|
}
|
|
5536
5536
|
function ManagerAssignmentsCard({ trips }) {
|
|
5537
|
-
const { t } =
|
|
5537
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5538
5538
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-profile-section__card", children: [
|
|
5539
5539
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__card-head", children: [
|
|
5540
5540
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-manager-profile-section__card-title", children: t("chrome.managerProfileSection.trips.title") }),
|
|
@@ -5598,7 +5598,7 @@ function HeroProfileHeader({
|
|
|
5598
5598
|
glowTone,
|
|
5599
5599
|
style
|
|
5600
5600
|
}) {
|
|
5601
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero", "data-glow": glowTone, style:
|
|
5601
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero", "data-glow": glowTone, style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
5602
5602
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-hero-glow", "aria-hidden": "true" }),
|
|
5603
5603
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero-row", children: [
|
|
5604
5604
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-hero-avatar", "aria-hidden": "true", children: avatarInitials }),
|
|
@@ -5631,7 +5631,7 @@ function initialsFromName2(name) {
|
|
|
5631
5631
|
return `${first}${last}`.toUpperCase();
|
|
5632
5632
|
}
|
|
5633
5633
|
function ManagerProfileHero({ profile, onBack }) {
|
|
5634
|
-
const { t } =
|
|
5634
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5635
5635
|
const initials = initialsFromName2(profile.fullName);
|
|
5636
5636
|
const stats = [
|
|
5637
5637
|
{ key: "trips", label: t("chrome.managerProfileSection.hero.trips"), value: profile.tripCount },
|
|
@@ -5690,12 +5690,12 @@ function ManagerProfileSection({
|
|
|
5690
5690
|
components,
|
|
5691
5691
|
style
|
|
5692
5692
|
}) {
|
|
5693
|
-
const { t } =
|
|
5694
|
-
const { read, readFailed, refresh } =
|
|
5693
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5694
|
+
const { read, readFailed, refresh } = chunkODH3SYYW_cjs.useAgencyManagerProfile(managerRef);
|
|
5695
5695
|
const Hero = components?.Hero ?? ManagerProfileHero;
|
|
5696
5696
|
const AssignmentsCard = components?.AssignmentsCard ?? ManagerAssignmentsCard;
|
|
5697
5697
|
if (readFailed) {
|
|
5698
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style:
|
|
5698
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__status-block", role: "alert", children: [
|
|
5699
5699
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon7, { className: "kf-manager-profile-section__status-icon kf-manager-profile-section__status-icon--danger" }),
|
|
5700
5700
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-profile-section__status-title", children: t("chrome.managerProfileSection.errorTitle") }),
|
|
5701
5701
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-profile-section__status-body", children: t("chrome.managerProfileSection.errorBody") }),
|
|
@@ -5711,9 +5711,9 @@ function ManagerProfileSection({
|
|
|
5711
5711
|
] }) });
|
|
5712
5712
|
}
|
|
5713
5713
|
if (read === void 0) {
|
|
5714
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style:
|
|
5714
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ManagerProfileSkeleton, {}) });
|
|
5715
5715
|
}
|
|
5716
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section", style:
|
|
5716
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
5717
5717
|
/* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
|
|
5718
5718
|
/* @__PURE__ */ jsxRuntime.jsx(AssignmentsCard, { trips: read.trips })
|
|
5719
5719
|
] });
|
|
@@ -5740,7 +5740,7 @@ function TemplateAuthoringFlow({
|
|
|
5740
5740
|
initialTemplateId,
|
|
5741
5741
|
style
|
|
5742
5742
|
}) {
|
|
5743
|
-
const { t } =
|
|
5743
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5744
5744
|
const [selectedTemplateId, setSelectedTemplateId] = react.useState(
|
|
5745
5745
|
initialTemplateId
|
|
5746
5746
|
);
|
|
@@ -5751,9 +5751,9 @@ function TemplateAuthoringFlow({
|
|
|
5751
5751
|
setSelectedTemplateId(void 0);
|
|
5752
5752
|
}
|
|
5753
5753
|
if (selectedTemplateId === void 0) {
|
|
5754
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-template-authoring-flow", style:
|
|
5754
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-template-authoring-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistTemplateLibrary, { onSelectTemplate: handleSelect }) });
|
|
5755
5755
|
}
|
|
5756
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-template-authoring-flow", style:
|
|
5756
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-template-authoring-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
5757
5757
|
/* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: handleBack, className: "kf-template-authoring-flow__back-link", children: [
|
|
5758
5758
|
/* @__PURE__ */ jsxRuntime.jsx(BackIcon3, {}),
|
|
5759
5759
|
t("chrome.templateAuthoringFlow.backToLibrary")
|
|
@@ -5762,8 +5762,8 @@ function TemplateAuthoringFlow({
|
|
|
5762
5762
|
] });
|
|
5763
5763
|
}
|
|
5764
5764
|
function AddTravellerModal({ onClose, onCreated }) {
|
|
5765
|
-
const { t } =
|
|
5766
|
-
const directories =
|
|
5765
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
5766
|
+
const directories = chunkODH3SYYW_cjs.useDirectories();
|
|
5767
5767
|
const titleId = react.useId();
|
|
5768
5768
|
const [fullName, setFullName] = react.useState("");
|
|
5769
5769
|
const [phone, setPhone] = react.useState("");
|
|
@@ -5787,7 +5787,7 @@ function AddTravellerModal({ onClose, onCreated }) {
|
|
|
5787
5787
|
});
|
|
5788
5788
|
onCreated(created);
|
|
5789
5789
|
} catch (error) {
|
|
5790
|
-
setErrorMessage(
|
|
5790
|
+
setErrorMessage(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
5791
5791
|
} finally {
|
|
5792
5792
|
setIsSubmitting(false);
|
|
5793
5793
|
}
|
|
@@ -6001,7 +6001,7 @@ function TravellerResultRow({
|
|
|
6001
6001
|
onSelect,
|
|
6002
6002
|
style
|
|
6003
6003
|
}) {
|
|
6004
|
-
const { t } =
|
|
6004
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6005
6005
|
const initials = initialsFromName3(traveller.fullName);
|
|
6006
6006
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6007
6007
|
"tr",
|
|
@@ -6009,7 +6009,7 @@ function TravellerResultRow({
|
|
|
6009
6009
|
role: "row",
|
|
6010
6010
|
className: "kf-traveller-directory__table-row",
|
|
6011
6011
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
6012
|
-
style:
|
|
6012
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
6013
6013
|
children: [
|
|
6014
6014
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6015
6015
|
"td",
|
|
@@ -6137,8 +6137,8 @@ function TravellerResultsListBody({
|
|
|
6137
6137
|
onCountChange,
|
|
6138
6138
|
onRetry
|
|
6139
6139
|
}) {
|
|
6140
|
-
const { t } =
|
|
6141
|
-
const directories =
|
|
6140
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6141
|
+
const directories = chunkODH3SYYW_cjs.useDirectories();
|
|
6142
6142
|
const [errorMessage, setErrorMessage] = react.useState(void 0);
|
|
6143
6143
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
6144
6144
|
const fetch = react.useCallback(
|
|
@@ -6149,7 +6149,7 @@ function TravellerResultsListBody({
|
|
|
6149
6149
|
setErrorMessage(void 0);
|
|
6150
6150
|
return page;
|
|
6151
6151
|
} catch (error) {
|
|
6152
|
-
setErrorMessage(
|
|
6152
|
+
setErrorMessage(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
6153
6153
|
return { rows: [], nextCursor: void 0 };
|
|
6154
6154
|
} finally {
|
|
6155
6155
|
setHasSettled(true);
|
|
@@ -6157,7 +6157,7 @@ function TravellerResultsListBody({
|
|
|
6157
6157
|
},
|
|
6158
6158
|
[directories, query]
|
|
6159
6159
|
);
|
|
6160
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
6160
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkODH3SYYW_cjs.usePaginatedList(fetch);
|
|
6161
6161
|
const isLoading = !hasSettled;
|
|
6162
6162
|
const reportedCount = isLoading || errorMessage !== void 0 ? void 0 : rows.length;
|
|
6163
6163
|
react.useEffect(() => {
|
|
@@ -6252,7 +6252,7 @@ function TravellerSearchInput({
|
|
|
6252
6252
|
debounceMs,
|
|
6253
6253
|
onDebouncedChange
|
|
6254
6254
|
}) {
|
|
6255
|
-
const { t } =
|
|
6255
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6256
6256
|
const [value, setValue] = react.useState("");
|
|
6257
6257
|
react.useEffect(() => {
|
|
6258
6258
|
const timer = setTimeout(() => onDebouncedChange(value), debounceMs);
|
|
@@ -6292,13 +6292,13 @@ function TravellerSearchBox({
|
|
|
6292
6292
|
trailingAction,
|
|
6293
6293
|
style
|
|
6294
6294
|
}) {
|
|
6295
|
-
const { t } =
|
|
6295
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6296
6296
|
const [query, setQuery] = react.useState("");
|
|
6297
6297
|
const [count, setCount] = react.useState(void 0);
|
|
6298
6298
|
const trimmed = query.trim();
|
|
6299
6299
|
const handleCountChange = react.useCallback((next) => setCount(next), []);
|
|
6300
6300
|
const isBelowFloor = minQueryLength > 0 && trimmed.length < minQueryLength;
|
|
6301
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box", style:
|
|
6301
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6302
6302
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box-input-row", children: [
|
|
6303
6303
|
/* @__PURE__ */ jsxRuntime.jsx(TravellerSearchInput, { debounceMs, onDebouncedChange: setQuery }),
|
|
6304
6304
|
count !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-traveller-directory__count", children: t(
|
|
@@ -6330,7 +6330,7 @@ function TravellerDirectoryFlow({
|
|
|
6330
6330
|
components,
|
|
6331
6331
|
style
|
|
6332
6332
|
}) {
|
|
6333
|
-
const { t } =
|
|
6333
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6334
6334
|
const [uncontrolledOpen, setUncontrolledOpen] = react.useState(false);
|
|
6335
6335
|
const isControlled = adding !== void 0 && onAddingChange !== void 0;
|
|
6336
6336
|
const isAddModalOpen = isControlled ? adding : uncontrolledOpen;
|
|
@@ -6353,7 +6353,7 @@ function TravellerDirectoryFlow({
|
|
|
6353
6353
|
);
|
|
6354
6354
|
const SearchBox = components?.TravellerSearchBox ?? TravellerSearchBox;
|
|
6355
6355
|
const AddModal = components?.AddTravellerModal ?? AddTravellerModal;
|
|
6356
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow", style:
|
|
6356
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6357
6357
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow__heading", children: [
|
|
6358
6358
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-directory-flow__title", children: title }),
|
|
6359
6359
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-directory-flow__subtitle", children: subtitle }) : null
|
|
@@ -6379,7 +6379,7 @@ function TravellerDirectoryFlow({
|
|
|
6379
6379
|
] });
|
|
6380
6380
|
}
|
|
6381
6381
|
function useAgencyTravellerProfile(travellerRef) {
|
|
6382
|
-
const client =
|
|
6382
|
+
const client = chunk5ORJRFXZ_cjs.useKaafilClient();
|
|
6383
6383
|
const [read, setRead] = react.useState(void 0);
|
|
6384
6384
|
const [readFailed, setReadFailed] = react.useState(false);
|
|
6385
6385
|
const refresh = react.useCallback(async () => {
|
|
@@ -6436,7 +6436,7 @@ function formatMinor(minor, currency) {
|
|
|
6436
6436
|
}).format(minor / 100);
|
|
6437
6437
|
}
|
|
6438
6438
|
function TravellerLifetimeCard({ lifetime }) {
|
|
6439
|
-
const { t } =
|
|
6439
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6440
6440
|
if (lifetime.currency === null) {
|
|
6441
6441
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6442
6442
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
@@ -6484,7 +6484,7 @@ function formatTimestamp(iso) {
|
|
|
6484
6484
|
});
|
|
6485
6485
|
}
|
|
6486
6486
|
function TravellerNotesList({ notes }) {
|
|
6487
|
-
const { t } =
|
|
6487
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6488
6488
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6489
6489
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
6490
6490
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.notes.title") }),
|
|
@@ -6530,7 +6530,7 @@ function formatDateOfBirth(iso) {
|
|
|
6530
6530
|
});
|
|
6531
6531
|
}
|
|
6532
6532
|
function TravellerPersonalCard({ profile }) {
|
|
6533
|
-
const { t } =
|
|
6533
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6534
6534
|
const p = profile.profile;
|
|
6535
6535
|
const dob = formatDateOfBirth(p.dateOfBirth);
|
|
6536
6536
|
const email = p.email ?? profile.email;
|
|
@@ -6645,7 +6645,7 @@ function formatMinor2(minor, currency) {
|
|
|
6645
6645
|
}).format(minor / 100);
|
|
6646
6646
|
}
|
|
6647
6647
|
function TravellerProfileHero({ profile, onBack }) {
|
|
6648
|
-
const { t } =
|
|
6648
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6649
6649
|
const initials = initialsFromName4(profile.fullName);
|
|
6650
6650
|
const { lifetime } = profile;
|
|
6651
6651
|
const stats = lifetime.currency !== null ? [
|
|
@@ -6736,7 +6736,7 @@ function formatMinor3(minor, currency) {
|
|
|
6736
6736
|
}).format(minor / 100);
|
|
6737
6737
|
}
|
|
6738
6738
|
function TravellerTripHistoryTable({ trips }) {
|
|
6739
|
-
const { t } =
|
|
6739
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6740
6740
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6741
6741
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
6742
6742
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.trips.title") }),
|
|
@@ -6787,7 +6787,7 @@ function TravellerProfileSection({
|
|
|
6787
6787
|
components,
|
|
6788
6788
|
style
|
|
6789
6789
|
}) {
|
|
6790
|
-
const { t } =
|
|
6790
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
6791
6791
|
const { read, readFailed, refresh } = useAgencyTravellerProfile(travellerRef);
|
|
6792
6792
|
const Hero = components?.Hero ?? TravellerProfileHero;
|
|
6793
6793
|
const PersonalCard = components?.PersonalCard ?? TravellerPersonalCard;
|
|
@@ -6795,7 +6795,7 @@ function TravellerProfileSection({
|
|
|
6795
6795
|
const TripHistoryTable = components?.TripHistoryTable ?? TravellerTripHistoryTable;
|
|
6796
6796
|
const NotesList = components?.NotesList ?? TravellerNotesList;
|
|
6797
6797
|
if (readFailed) {
|
|
6798
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style:
|
|
6798
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__status-block", role: "alert", children: [
|
|
6799
6799
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon9, { className: "kf-traveller-profile-section__status-icon kf-traveller-profile-section__status-icon--danger" }),
|
|
6800
6800
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-title", children: t("chrome.travellerProfileSection.errorTitle") }),
|
|
6801
6801
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-body", children: t("chrome.travellerProfileSection.errorBody") }),
|
|
@@ -6811,9 +6811,9 @@ function TravellerProfileSection({
|
|
|
6811
6811
|
] }) });
|
|
6812
6812
|
}
|
|
6813
6813
|
if (read === void 0) {
|
|
6814
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style:
|
|
6814
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TravellerProfileSkeleton, {}) });
|
|
6815
6815
|
}
|
|
6816
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style:
|
|
6816
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
6817
6817
|
/* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
|
|
6818
6818
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__body", children: [
|
|
6819
6819
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__column", children: [
|
|
@@ -6905,7 +6905,7 @@ function ToggleSwitch({
|
|
|
6905
6905
|
disabled,
|
|
6906
6906
|
className: "kf-admin-shared-patterns-toggle-row",
|
|
6907
6907
|
onClick: () => onChange(!checked),
|
|
6908
|
-
style:
|
|
6908
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
6909
6909
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6910
6910
|
"span",
|
|
6911
6911
|
{
|
|
@@ -7343,7 +7343,7 @@ function TriggerDetailPanel({
|
|
|
7343
7343
|
style
|
|
7344
7344
|
}) {
|
|
7345
7345
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
7346
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style:
|
|
7346
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
7347
7347
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail-head", children: [
|
|
7348
7348
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trigger-template-editor__detail-eyebrow", children: t("chrome.triggerTemplateEditor.selected") }),
|
|
7349
7349
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7427,8 +7427,8 @@ function TriggerTemplateEditor({
|
|
|
7427
7427
|
onTriggerPatched,
|
|
7428
7428
|
style
|
|
7429
7429
|
}) {
|
|
7430
|
-
const { t } =
|
|
7431
|
-
const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } =
|
|
7430
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7431
|
+
const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } = chunkODH3SYYW_cjs.useAgencyJourneyTriggers();
|
|
7432
7432
|
const [savingId, setSavingId] = react.useState(void 0);
|
|
7433
7433
|
const [selectedId, setSelectedId] = react.useState(void 0);
|
|
7434
7434
|
const filtered = tripModeFilter === void 0 ? triggers : triggers.filter((trigger) => trigger.tripMode === tripModeFilter);
|
|
@@ -7463,7 +7463,7 @@ function TriggerTemplateEditor({
|
|
|
7463
7463
|
setSavingId(void 0);
|
|
7464
7464
|
}
|
|
7465
7465
|
}
|
|
7466
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style:
|
|
7466
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
7467
7467
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__heading", children: [
|
|
7468
7468
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trigger-template-editor__title", children: title }),
|
|
7469
7469
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trigger-template-editor__subtitle", children: subtitle }) : null
|
|
@@ -7611,14 +7611,14 @@ function BookingsSkeleton() {
|
|
|
7611
7611
|
] }, id)) });
|
|
7612
7612
|
}
|
|
7613
7613
|
function BookingsEmpty() {
|
|
7614
|
-
const { t } =
|
|
7614
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7615
7615
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", children: [
|
|
7616
7616
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.emptyTitle") }),
|
|
7617
7617
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.emptyBody") })
|
|
7618
7618
|
] });
|
|
7619
7619
|
}
|
|
7620
7620
|
function BookingsFailed({ onRetry }) {
|
|
7621
|
-
const { t } =
|
|
7621
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7622
7622
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", role: "alert", children: [
|
|
7623
7623
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.failedTitle") }),
|
|
7624
7624
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.failedBody") }),
|
|
@@ -7626,7 +7626,7 @@ function BookingsFailed({ onRetry }) {
|
|
|
7626
7626
|
] });
|
|
7627
7627
|
}
|
|
7628
7628
|
function BookingsDark({ reason }) {
|
|
7629
|
-
const { t } =
|
|
7629
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7630
7630
|
if (reason === "mode") return null;
|
|
7631
7631
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", "data-dark": reason, children: [
|
|
7632
7632
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t(
|
|
@@ -7667,7 +7667,7 @@ function voucherCount(row) {
|
|
|
7667
7667
|
}
|
|
7668
7668
|
var DAY = { day: "numeric", month: "short", year: "numeric" };
|
|
7669
7669
|
function TripBookingsSection(props) {
|
|
7670
|
-
const session =
|
|
7670
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
7671
7671
|
if (session.status !== "authenticated") {
|
|
7672
7672
|
return null;
|
|
7673
7673
|
}
|
|
@@ -7678,8 +7678,8 @@ function ReadyTripBookingsSection({
|
|
|
7678
7678
|
onOpenDocuments,
|
|
7679
7679
|
style
|
|
7680
7680
|
}) {
|
|
7681
|
-
const { t } =
|
|
7682
|
-
const bookings =
|
|
7681
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7682
|
+
const bookings = chunkODH3SYYW_cjs.useBookings(tripRef);
|
|
7683
7683
|
const ready = bookings.status === "ready" ? bookings : null;
|
|
7684
7684
|
const groups = react.useMemo(
|
|
7685
7685
|
() => ready === null ? [] : groupByKind(liveBookings(ready.bookings)),
|
|
@@ -7689,7 +7689,7 @@ function ReadyTripBookingsSection({
|
|
|
7689
7689
|
const unreadable = ready !== null && ready.syncedAt === void 0;
|
|
7690
7690
|
const refreshLive = ready?.refreshLive;
|
|
7691
7691
|
if (bookings.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(BookingsDark, { reason: bookings.reason });
|
|
7692
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style:
|
|
7692
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
7693
7693
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-bookings-section__head", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__head-text", children: [
|
|
7694
7694
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-bookings-section__title", children: t("chrome.tripBookings.panelLabel") }),
|
|
7695
7695
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__subtitle", children: t("chrome.tripBookings.subtitle").replace("{count}", String(total)) })
|
|
@@ -7761,7 +7761,7 @@ function LockIcon2() {
|
|
|
7761
7761
|
);
|
|
7762
7762
|
}
|
|
7763
7763
|
function CloseoutLockNotice({ whatKey }) {
|
|
7764
|
-
const { t } =
|
|
7764
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7765
7765
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-closeout-lock", role: "status", children: [
|
|
7766
7766
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-closeout-lock__glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon2, {}) }),
|
|
7767
7767
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-closeout-lock__body", children: [
|
|
@@ -7865,7 +7865,7 @@ function ChecklistSkeleton() {
|
|
|
7865
7865
|
] }, column)) });
|
|
7866
7866
|
}
|
|
7867
7867
|
function ChecklistEmpty({ onPull }) {
|
|
7868
|
-
const { t } =
|
|
7868
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7869
7869
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
|
|
7870
7870
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistIcon, {}) }),
|
|
7871
7871
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.emptyTitle") }),
|
|
@@ -7874,7 +7874,7 @@ function ChecklistEmpty({ onPull }) {
|
|
|
7874
7874
|
] });
|
|
7875
7875
|
}
|
|
7876
7876
|
function ChecklistFailed({ onRetry }) {
|
|
7877
|
-
const { t } =
|
|
7877
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7878
7878
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
|
|
7879
7879
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.failedTitle") }),
|
|
7880
7880
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-checklist-section__state-body", children: t("chrome.tripChecklist.failedBody") }),
|
|
@@ -7882,7 +7882,7 @@ function ChecklistFailed({ onRetry }) {
|
|
|
7882
7882
|
] });
|
|
7883
7883
|
}
|
|
7884
7884
|
function ChecklistDark({ reason }) {
|
|
7885
|
-
const { t } =
|
|
7885
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7886
7886
|
if (reason === "mode") return null;
|
|
7887
7887
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", "data-dark": reason, children: [
|
|
7888
7888
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon3, {}) }),
|
|
@@ -7982,7 +7982,7 @@ function ItemDialog({
|
|
|
7982
7982
|
onClose,
|
|
7983
7983
|
onSubmit
|
|
7984
7984
|
}) {
|
|
7985
|
-
const { t } =
|
|
7985
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
7986
7986
|
const titleId = react.useId();
|
|
7987
7987
|
const [values, setValues] = react.useState(initial);
|
|
7988
7988
|
const [sectionChoice, setSectionChoice] = react.useState(
|
|
@@ -8179,7 +8179,7 @@ function ChecklistItemRow({
|
|
|
8179
8179
|
onToggle,
|
|
8180
8180
|
onEdit
|
|
8181
8181
|
}) {
|
|
8182
|
-
const { t } =
|
|
8182
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8183
8183
|
const complete = item.status === "COMPLETE";
|
|
8184
8184
|
const day = dayOffsetLabel(item.dayOffset);
|
|
8185
8185
|
const actorKey = actorLabelKey(item.performedByKind);
|
|
@@ -8231,7 +8231,7 @@ function SectionCard2({
|
|
|
8231
8231
|
onAddToSection,
|
|
8232
8232
|
ItemRow: ItemRow2 = ChecklistItemRow
|
|
8233
8233
|
}) {
|
|
8234
|
-
const { t } =
|
|
8234
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8235
8235
|
const openMandatory = items.filter((one) => one.isMandatory && one.status === "OPEN").length;
|
|
8236
8236
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section__section", children: [
|
|
8237
8237
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-checklist-section__section-head", children: [
|
|
@@ -8285,7 +8285,7 @@ function PhasePanel({
|
|
|
8285
8285
|
onAddToPhase,
|
|
8286
8286
|
ItemRow: ItemRow2
|
|
8287
8287
|
}) {
|
|
8288
|
-
const { t } =
|
|
8288
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8289
8289
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sections.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__phase-empty", children: [
|
|
8290
8290
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("chrome.tripChecklist.phaseEmpty") }),
|
|
8291
8291
|
readOnly ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8321,7 +8321,7 @@ function PhaseSwitcher({
|
|
|
8321
8321
|
value,
|
|
8322
8322
|
onChange
|
|
8323
8323
|
}) {
|
|
8324
|
-
const { t } =
|
|
8324
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8325
8325
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-checklist-section__segment", children: [
|
|
8326
8326
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripChecklist.phaseLabel") }),
|
|
8327
8327
|
OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8354,7 +8354,7 @@ function TemplatePickerDialog({
|
|
|
8354
8354
|
onClose,
|
|
8355
8355
|
onPull
|
|
8356
8356
|
}) {
|
|
8357
|
-
const { t } =
|
|
8357
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8358
8358
|
const titleId = react.useId();
|
|
8359
8359
|
const [selectedId, setSelectedId] = react.useState(null);
|
|
8360
8360
|
const [mode, setMode] = react.useState("append");
|
|
@@ -8476,7 +8476,7 @@ function codeOf(error) {
|
|
|
8476
8476
|
return classification?.code ?? "unknown";
|
|
8477
8477
|
}
|
|
8478
8478
|
function TripChecklistSection(props) {
|
|
8479
|
-
const session =
|
|
8479
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
8480
8480
|
if (session.status !== "authenticated") {
|
|
8481
8481
|
return null;
|
|
8482
8482
|
}
|
|
@@ -8490,8 +8490,8 @@ function ReadyTripChecklistSection({
|
|
|
8490
8490
|
components,
|
|
8491
8491
|
style
|
|
8492
8492
|
}) {
|
|
8493
|
-
const { t } =
|
|
8494
|
-
const checklists =
|
|
8493
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
8494
|
+
const checklists = chunkUSKVWPJD_cjs.useChecklists(tripRef);
|
|
8495
8495
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
8496
8496
|
const [pending, setPending] = react.useState(false);
|
|
8497
8497
|
const [busyItemId, setBusyItemId] = react.useState(null);
|
|
@@ -8658,7 +8658,7 @@ function ReadyTripChecklistSection({
|
|
|
8658
8658
|
const inert = readOnly || locked;
|
|
8659
8659
|
const unreadable = aggregate?.lastFetchFailed === true && aggregate.loaded === false;
|
|
8660
8660
|
const percent = overallPercent(aggregate?.progress);
|
|
8661
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style:
|
|
8661
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
8662
8662
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head", children: [
|
|
8663
8663
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head-text", children: [
|
|
8664
8664
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-checklist-section__title", children: t("chrome.tripChecklist.panelLabel") }),
|
|
@@ -9047,7 +9047,7 @@ var STATUS_LABEL_KEY5 = {
|
|
|
9047
9047
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
9048
9048
|
};
|
|
9049
9049
|
function TripRow({ trip, index, onOpen, style }) {
|
|
9050
|
-
const { t } =
|
|
9050
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9051
9051
|
const derived = deriveTripRow(trip, index);
|
|
9052
9052
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9053
9053
|
"tr",
|
|
@@ -9055,7 +9055,7 @@ function TripRow({ trip, index, onOpen, style }) {
|
|
|
9055
9055
|
role: "row",
|
|
9056
9056
|
className: "kf-trip-directory-flow__row",
|
|
9057
9057
|
"data-dimming": derived.dimming === "none" ? void 0 : derived.dimming,
|
|
9058
|
-
style:
|
|
9058
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
9059
9059
|
children: [
|
|
9060
9060
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9061
9061
|
"td",
|
|
@@ -9174,8 +9174,8 @@ function TripResultsListBody({
|
|
|
9174
9174
|
hasActiveFilter,
|
|
9175
9175
|
onRetry
|
|
9176
9176
|
}) {
|
|
9177
|
-
const { t } =
|
|
9178
|
-
const { makeTripsFetch } =
|
|
9177
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9178
|
+
const { makeTripsFetch } = chunkODH3SYYW_cjs.useAgencyTrips();
|
|
9179
9179
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
9180
9180
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
9181
9181
|
const Row = TripRowComponent ?? TripRow;
|
|
@@ -9186,7 +9186,7 @@ function TripResultsListBody({
|
|
|
9186
9186
|
setErrorCode(void 0);
|
|
9187
9187
|
return page;
|
|
9188
9188
|
} catch (error) {
|
|
9189
|
-
setErrorCode(
|
|
9189
|
+
setErrorCode(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
9190
9190
|
return { rows: [], nextCursor: void 0 };
|
|
9191
9191
|
} finally {
|
|
9192
9192
|
setHasSettled(true);
|
|
@@ -9194,7 +9194,7 @@ function TripResultsListBody({
|
|
|
9194
9194
|
},
|
|
9195
9195
|
[makeTripsFetch, filters]
|
|
9196
9196
|
);
|
|
9197
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
9197
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkODH3SYYW_cjs.usePaginatedList(fetch);
|
|
9198
9198
|
const isLoading = !hasSettled;
|
|
9199
9199
|
const reportedCount = isLoading || errorCode !== void 0 ? void 0 : rows.length;
|
|
9200
9200
|
react.useEffect(() => {
|
|
@@ -9296,7 +9296,7 @@ function TripSearchInput({
|
|
|
9296
9296
|
debounceMs,
|
|
9297
9297
|
onDebouncedChange
|
|
9298
9298
|
}) {
|
|
9299
|
-
const { t } =
|
|
9299
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9300
9300
|
const [value, setValue] = react.useState("");
|
|
9301
9301
|
react.useEffect(() => {
|
|
9302
9302
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -9366,7 +9366,7 @@ function TripDirectoryFlow({
|
|
|
9366
9366
|
components,
|
|
9367
9367
|
style
|
|
9368
9368
|
}) {
|
|
9369
|
-
const { t } =
|
|
9369
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9370
9370
|
const [eventType, setEventType] = react.useState(initialEventType ?? "TRIP");
|
|
9371
9371
|
const [segment, setSegment] = react.useState("all");
|
|
9372
9372
|
const [q, setQ] = react.useState("");
|
|
@@ -9386,7 +9386,7 @@ function TripDirectoryFlow({
|
|
|
9386
9386
|
);
|
|
9387
9387
|
const filterKey = react.useMemo(() => JSON.stringify(filters), [filters]);
|
|
9388
9388
|
const hasActiveFilter = segment !== "all" || q.length > 0 || status !== void 0;
|
|
9389
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style:
|
|
9389
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
9390
9390
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar", children: [
|
|
9391
9391
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar-row", children: [
|
|
9392
9392
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9652,7 +9652,7 @@ function DocumentRow({
|
|
|
9652
9652
|
onWithdraw,
|
|
9653
9653
|
withdrawing = false
|
|
9654
9654
|
}) {
|
|
9655
|
-
const { t } =
|
|
9655
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9656
9656
|
const { file, spend } = row;
|
|
9657
9657
|
const purged = file.status === "purged";
|
|
9658
9658
|
const retention = retentionStateOf(file);
|
|
@@ -9726,7 +9726,7 @@ function DocumentsSkeleton() {
|
|
|
9726
9726
|
] }, id)) });
|
|
9727
9727
|
}
|
|
9728
9728
|
function DocumentsEmpty() {
|
|
9729
|
-
const { t } =
|
|
9729
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9730
9730
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", children: [
|
|
9731
9731
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-documents-section__state-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(EmptyDocumentsIcon, {}) }),
|
|
9732
9732
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.emptyTitle") }),
|
|
@@ -9734,7 +9734,7 @@ function DocumentsEmpty() {
|
|
|
9734
9734
|
] });
|
|
9735
9735
|
}
|
|
9736
9736
|
function DocumentsFailed({ onRetry }) {
|
|
9737
|
-
const { t } =
|
|
9737
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9738
9738
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", role: "alert", children: [
|
|
9739
9739
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.failedTitle") }),
|
|
9740
9740
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__state-body", children: t("chrome.tripDocuments.failedBody") }),
|
|
@@ -9742,7 +9742,7 @@ function DocumentsFailed({ onRetry }) {
|
|
|
9742
9742
|
] });
|
|
9743
9743
|
}
|
|
9744
9744
|
function DocumentsDark({ reason }) {
|
|
9745
|
-
const { t } =
|
|
9745
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9746
9746
|
if (reason === "mode") return null;
|
|
9747
9747
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", "data-dark": reason, children: [
|
|
9748
9748
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t(
|
|
@@ -9765,7 +9765,7 @@ function DocumentViewer({
|
|
|
9765
9765
|
failed,
|
|
9766
9766
|
onClose
|
|
9767
9767
|
}) {
|
|
9768
|
-
const { t } =
|
|
9768
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9769
9769
|
const titleId = react.useId();
|
|
9770
9770
|
const { file } = row;
|
|
9771
9771
|
const classKey = retentionClassLabelKey(file.retentionClass);
|
|
@@ -9846,7 +9846,7 @@ function DocumentViewer({
|
|
|
9846
9846
|
);
|
|
9847
9847
|
}
|
|
9848
9848
|
function PurposeChips({ counts, value, onChange }) {
|
|
9849
|
-
const { t } =
|
|
9849
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9850
9850
|
const options = [
|
|
9851
9851
|
{
|
|
9852
9852
|
key: "all",
|
|
@@ -9916,7 +9916,7 @@ function UploadDialog({
|
|
|
9916
9916
|
onClose,
|
|
9917
9917
|
onSubmit
|
|
9918
9918
|
}) {
|
|
9919
|
-
const { t } =
|
|
9919
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
9920
9920
|
const titleId = react.useId();
|
|
9921
9921
|
const nameId = react.useId();
|
|
9922
9922
|
const fileId = react.useId();
|
|
@@ -10085,7 +10085,7 @@ function WithdrawDialog({
|
|
|
10085
10085
|
onClose,
|
|
10086
10086
|
onConfirm
|
|
10087
10087
|
}) {
|
|
10088
|
-
const { t } =
|
|
10088
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10089
10089
|
const titleId = react.useId();
|
|
10090
10090
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10091
10091
|
SheetDialog,
|
|
@@ -10133,19 +10133,19 @@ function WithdrawDialog({
|
|
|
10133
10133
|
);
|
|
10134
10134
|
}
|
|
10135
10135
|
function TripDocumentsSection(props) {
|
|
10136
|
-
const session =
|
|
10136
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
10137
10137
|
if (session.status !== "authenticated") {
|
|
10138
10138
|
return null;
|
|
10139
10139
|
}
|
|
10140
10140
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripDocumentsSection, { ...props });
|
|
10141
10141
|
}
|
|
10142
10142
|
function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
10143
|
-
const { t } =
|
|
10144
|
-
const files =
|
|
10145
|
-
const expenses =
|
|
10146
|
-
const bookings =
|
|
10147
|
-
const { listTripManifest } =
|
|
10148
|
-
const { statuses, loaded: capabilityLoaded } =
|
|
10143
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10144
|
+
const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
|
|
10145
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
10146
|
+
const bookings = chunkODH3SYYW_cjs.useBookings(tripRef);
|
|
10147
|
+
const { listTripManifest } = chunkODH3SYYW_cjs.useDirectories();
|
|
10148
|
+
const { statuses, loaded: capabilityLoaded } = chunkODH3SYYW_cjs.useCapabilityStatuses(tripRef);
|
|
10149
10149
|
const capability = statuses.get("files");
|
|
10150
10150
|
const [state, setState] = react.useState({ kind: "loading" });
|
|
10151
10151
|
const [purpose, setPurpose] = react.useState(null);
|
|
@@ -10312,7 +10312,7 @@ function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
|
10312
10312
|
if (capabilityLoaded && capability === "mode-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "mode" });
|
|
10313
10313
|
if (capabilityLoaded && capability === "flag-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "flag" });
|
|
10314
10314
|
if (capabilityLoaded && capability === "data-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "data" });
|
|
10315
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style:
|
|
10315
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
10316
10316
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head", children: [
|
|
10317
10317
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head-text", children: [
|
|
10318
10318
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-documents-section__title", children: t("chrome.tripDocuments.panelLabel") }),
|
|
@@ -10624,7 +10624,7 @@ function ExpensesSkeleton() {
|
|
|
10624
10624
|
] }, id)) });
|
|
10625
10625
|
}
|
|
10626
10626
|
function ExpensesEmpty({ onLog }) {
|
|
10627
|
-
const { t } =
|
|
10627
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10628
10628
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", children: [
|
|
10629
10629
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(WalletIcon, {}) }),
|
|
10630
10630
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.emptyTitle") }),
|
|
@@ -10633,7 +10633,7 @@ function ExpensesEmpty({ onLog }) {
|
|
|
10633
10633
|
] });
|
|
10634
10634
|
}
|
|
10635
10635
|
function ExpensesFailed({ onRetry }) {
|
|
10636
|
-
const { t } =
|
|
10636
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10637
10637
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", role: "alert", children: [
|
|
10638
10638
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.failedTitle") }),
|
|
10639
10639
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-expenses-section__state-body", children: t("chrome.tripExpenses.failedBody") }),
|
|
@@ -10641,7 +10641,7 @@ function ExpensesFailed({ onRetry }) {
|
|
|
10641
10641
|
] });
|
|
10642
10642
|
}
|
|
10643
10643
|
function ExpensesDark({ reason }) {
|
|
10644
|
-
const { t } =
|
|
10644
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10645
10645
|
if (reason === "mode") {
|
|
10646
10646
|
return null;
|
|
10647
10647
|
}
|
|
@@ -10662,7 +10662,7 @@ function ExpensesTable({
|
|
|
10662
10662
|
onVoid,
|
|
10663
10663
|
onViewReceipt
|
|
10664
10664
|
}) {
|
|
10665
|
-
const { t } =
|
|
10665
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10666
10666
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-expenses-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-expenses-section__table", children: [
|
|
10667
10667
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripExpenses.tableCaption") }),
|
|
10668
10668
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -10722,7 +10722,7 @@ function LogExpenseDialog({
|
|
|
10722
10722
|
onClose,
|
|
10723
10723
|
onSubmit
|
|
10724
10724
|
}) {
|
|
10725
|
-
const { t } =
|
|
10725
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10726
10726
|
const titleId = react.useId();
|
|
10727
10727
|
const [category, setCategory] = react.useState("MISC");
|
|
10728
10728
|
const [amount, setAmount] = react.useState("");
|
|
@@ -10885,9 +10885,9 @@ function ReceiptDialog({
|
|
|
10885
10885
|
description,
|
|
10886
10886
|
onClose
|
|
10887
10887
|
}) {
|
|
10888
|
-
const { t } =
|
|
10888
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10889
10889
|
const titleId = react.useId();
|
|
10890
|
-
const files =
|
|
10890
|
+
const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
|
|
10891
10891
|
const [phase, setPhase] = react.useState({ kind: "loading" });
|
|
10892
10892
|
const [imageBroke, setImageBroke] = react.useState(false);
|
|
10893
10893
|
const readUrl = files.url;
|
|
@@ -10961,7 +10961,7 @@ function VoidExpenseDialog({
|
|
|
10961
10961
|
onClose,
|
|
10962
10962
|
onSubmit
|
|
10963
10963
|
}) {
|
|
10964
|
-
const { t } =
|
|
10964
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10965
10965
|
const titleId = react.useId();
|
|
10966
10966
|
const [reason, setReason] = react.useState("");
|
|
10967
10967
|
const trimmed = reason.trim();
|
|
@@ -11035,16 +11035,16 @@ function isCloseoutLocked2(error) {
|
|
|
11035
11035
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
11036
11036
|
}
|
|
11037
11037
|
function TripExpensesSection(props) {
|
|
11038
|
-
const session =
|
|
11038
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
11039
11039
|
if (session.status !== "authenticated") {
|
|
11040
11040
|
return null;
|
|
11041
11041
|
}
|
|
11042
11042
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripExpensesSection, { ...props });
|
|
11043
11043
|
}
|
|
11044
11044
|
function ReadyTripExpensesSection({ tripRef, style }) {
|
|
11045
|
-
const { t } =
|
|
11046
|
-
const expenses =
|
|
11047
|
-
const vendors =
|
|
11045
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11046
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
11047
|
+
const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
|
|
11048
11048
|
const [category, setCategory] = react.useState(null);
|
|
11049
11049
|
const [paymentMode, setPaymentMode] = react.useState(null);
|
|
11050
11050
|
const [missingReceiptOnly, setMissingReceiptOnly] = react.useState(false);
|
|
@@ -11113,7 +11113,7 @@ function ReadyTripExpensesSection({ tripRef, style }) {
|
|
|
11113
11113
|
return /* @__PURE__ */ jsxRuntime.jsx(ExpensesDark, { reason: expenses.reason });
|
|
11114
11114
|
}
|
|
11115
11115
|
const filtered = category !== null || paymentMode !== null || missingReceiptOnly;
|
|
11116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style:
|
|
11116
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
11117
11117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__toolbar", children: [
|
|
11118
11118
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-title", children: t("chrome.tripExpenses.panelLabel") }),
|
|
11119
11119
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-spacer" }),
|
|
@@ -11393,7 +11393,7 @@ function FloatMovementDialog({
|
|
|
11393
11393
|
onClose,
|
|
11394
11394
|
onSubmit
|
|
11395
11395
|
}) {
|
|
11396
|
-
const { t } =
|
|
11396
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11397
11397
|
const titleId = react.useId();
|
|
11398
11398
|
const [managerId, setManagerId] = react.useState(manager?.managerId ?? null);
|
|
11399
11399
|
const [amount, setAmount] = react.useState(
|
|
@@ -11626,7 +11626,7 @@ function FloatSkeleton() {
|
|
|
11626
11626
|
] }, id)) });
|
|
11627
11627
|
}
|
|
11628
11628
|
function FloatEmpty({ onIssue }) {
|
|
11629
|
-
const { t } =
|
|
11629
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11630
11630
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", children: [
|
|
11631
11631
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(SafeIcon, {}) }),
|
|
11632
11632
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.emptyTitle") }),
|
|
@@ -11635,7 +11635,7 @@ function FloatEmpty({ onIssue }) {
|
|
|
11635
11635
|
] });
|
|
11636
11636
|
}
|
|
11637
11637
|
function FloatFailed({ onRetry }) {
|
|
11638
|
-
const { t } =
|
|
11638
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11639
11639
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", role: "alert", children: [
|
|
11640
11640
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.failedTitle") }),
|
|
11641
11641
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-float-section__state-body", children: t("chrome.tripFloat.failedBody") }),
|
|
@@ -11643,7 +11643,7 @@ function FloatFailed({ onRetry }) {
|
|
|
11643
11643
|
] });
|
|
11644
11644
|
}
|
|
11645
11645
|
function FloatDark({ reason }) {
|
|
11646
|
-
const { t } =
|
|
11646
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11647
11647
|
if (reason === "mode") {
|
|
11648
11648
|
return null;
|
|
11649
11649
|
}
|
|
@@ -11666,7 +11666,7 @@ function ManagerFloatCard({
|
|
|
11666
11666
|
onAdjust,
|
|
11667
11667
|
onSettle
|
|
11668
11668
|
}) {
|
|
11669
|
-
const { t } =
|
|
11669
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11670
11670
|
const bodyId = `kf-float-${row.managerId}`;
|
|
11671
11671
|
const summary = row.summary;
|
|
11672
11672
|
const shares = summary === void 0 ? void 0 : usageShares(summary);
|
|
@@ -11872,16 +11872,16 @@ function refusedBalanceOf(error) {
|
|
|
11872
11872
|
return details?.currentBalanceMinor;
|
|
11873
11873
|
}
|
|
11874
11874
|
function TripFloatSection(props) {
|
|
11875
|
-
const session =
|
|
11875
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
11876
11876
|
if (session.status !== "authenticated") {
|
|
11877
11877
|
return null;
|
|
11878
11878
|
}
|
|
11879
11879
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripFloatSection, { ...props });
|
|
11880
11880
|
}
|
|
11881
11881
|
function ReadyTripFloatSection({ tripRef, style }) {
|
|
11882
|
-
const { t } =
|
|
11883
|
-
const float =
|
|
11884
|
-
const managers =
|
|
11882
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11883
|
+
const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
|
|
11884
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
11885
11885
|
const [openManagerId, setOpenManagerId] = react.useState(null);
|
|
11886
11886
|
const [ledgers, setLedgers] = react.useState({});
|
|
11887
11887
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -12007,7 +12007,7 @@ function ReadyTripFloatSection({ tripRef, style }) {
|
|
|
12007
12007
|
if (float.status === "dark") {
|
|
12008
12008
|
return /* @__PURE__ */ jsxRuntime.jsx(FloatDark, { reason: float.reason });
|
|
12009
12009
|
}
|
|
12010
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style:
|
|
12010
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12011
12011
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__toolbar", children: [
|
|
12012
12012
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-title", children: t("chrome.tripFloat.panelLabel") }),
|
|
12013
12013
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-spacer" }),
|
|
@@ -12122,7 +12122,7 @@ function DispatchDialog({
|
|
|
12122
12122
|
onClose,
|
|
12123
12123
|
onSend
|
|
12124
12124
|
}) {
|
|
12125
|
-
const { t } =
|
|
12125
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12126
12126
|
const titleId = react.useId();
|
|
12127
12127
|
const [everyone, setEveryone] = react.useState(true);
|
|
12128
12128
|
const [picked, setPicked] = react.useState(/* @__PURE__ */ new Set());
|
|
@@ -12270,7 +12270,7 @@ function FormRow2({
|
|
|
12270
12270
|
onExport,
|
|
12271
12271
|
onOpenMissing
|
|
12272
12272
|
}) {
|
|
12273
|
-
const { t } =
|
|
12273
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12274
12274
|
const canSeeMissing = supportsWhoIsMissing(form);
|
|
12275
12275
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", children: [
|
|
12276
12276
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-trip-forms-section__row-body", children: [
|
|
@@ -12323,14 +12323,14 @@ function FormsSkeleton() {
|
|
|
12323
12323
|
] }, id)) });
|
|
12324
12324
|
}
|
|
12325
12325
|
function FormsEmpty() {
|
|
12326
|
-
const { t } =
|
|
12326
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12327
12327
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", children: [
|
|
12328
12328
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.emptyTitle") }),
|
|
12329
12329
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.emptyBody") })
|
|
12330
12330
|
] });
|
|
12331
12331
|
}
|
|
12332
12332
|
function FormsFailed({ onRetry }) {
|
|
12333
|
-
const { t } =
|
|
12333
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12334
12334
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", role: "alert", children: [
|
|
12335
12335
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.failedTitle") }),
|
|
12336
12336
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.failedBody") }),
|
|
@@ -12338,7 +12338,7 @@ function FormsFailed({ onRetry }) {
|
|
|
12338
12338
|
] });
|
|
12339
12339
|
}
|
|
12340
12340
|
function FormsDark({ reason }) {
|
|
12341
|
-
const { t } =
|
|
12341
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12342
12342
|
if (reason === "mode") return null;
|
|
12343
12343
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", "data-dark": reason, children: [
|
|
12344
12344
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t(reason === "flag" ? "chrome.tripForms.flagDarkTitle" : "chrome.tripForms.dataDarkTitle") }),
|
|
@@ -12383,7 +12383,7 @@ function OnBehalfDialog({
|
|
|
12383
12383
|
onClose,
|
|
12384
12384
|
onSubmit
|
|
12385
12385
|
}) {
|
|
12386
|
-
const { t } =
|
|
12386
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12387
12387
|
const titleId = react.useId();
|
|
12388
12388
|
const [values, setValues] = react.useState({});
|
|
12389
12389
|
const answerable = react.useMemo(
|
|
@@ -12521,7 +12521,7 @@ function ParticipantRow({
|
|
|
12521
12521
|
onFillOnBehalf,
|
|
12522
12522
|
onOpenResponse
|
|
12523
12523
|
}) {
|
|
12524
|
-
const { t } =
|
|
12524
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12525
12525
|
const status = row.response?.status;
|
|
12526
12526
|
const submitted = status === "SUBMITTED";
|
|
12527
12527
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", "data-done": submitted ? "true" : void 0, children: [
|
|
@@ -12574,7 +12574,7 @@ function ResponseViewer({
|
|
|
12574
12574
|
failed,
|
|
12575
12575
|
onClose
|
|
12576
12576
|
}) {
|
|
12577
|
-
const { t } =
|
|
12577
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12578
12578
|
const titleId = react.useId();
|
|
12579
12579
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12580
12580
|
SheetDialog,
|
|
@@ -12605,7 +12605,7 @@ function codeOf4(error) {
|
|
|
12605
12605
|
return classification?.code ?? "unknown";
|
|
12606
12606
|
}
|
|
12607
12607
|
function TripFormsSection(props) {
|
|
12608
|
-
const session =
|
|
12608
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
12609
12609
|
if (session.status !== "authenticated") {
|
|
12610
12610
|
return null;
|
|
12611
12611
|
}
|
|
@@ -12617,9 +12617,9 @@ function ReadyTripFormsSection({
|
|
|
12617
12617
|
components,
|
|
12618
12618
|
style
|
|
12619
12619
|
}) {
|
|
12620
|
-
const { t } =
|
|
12621
|
-
const forms =
|
|
12622
|
-
const { listTripManifest } =
|
|
12620
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12621
|
+
const forms = chunkUSKVWPJD_cjs.useForms(tripRef);
|
|
12622
|
+
const { listTripManifest } = chunkODH3SYYW_cjs.useDirectories();
|
|
12623
12623
|
const [openFormId, setOpenFormId] = react.useState(null);
|
|
12624
12624
|
const [completion, setCompletion] = react.useState(void 0);
|
|
12625
12625
|
const [manifest, setManifest] = react.useState(void 0);
|
|
@@ -12741,7 +12741,7 @@ function ReadyTripFormsSection({
|
|
|
12741
12741
|
if (forms.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(FormsDark, { reason: forms.reason });
|
|
12742
12742
|
const inert = readOnly;
|
|
12743
12743
|
const unreadable = ready !== null && ready.syncedAt === void 0 && rows.length === 0;
|
|
12744
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style:
|
|
12744
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
12745
12745
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head", children: [
|
|
12746
12746
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head-text", children: [
|
|
12747
12747
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-forms-section__title", children: openForm === null ? t("chrome.tripForms.panelLabel") : openForm.title }),
|
|
@@ -12891,7 +12891,7 @@ function ChangeLogDialog({
|
|
|
12891
12891
|
onRetry,
|
|
12892
12892
|
onClose
|
|
12893
12893
|
}) {
|
|
12894
|
-
const { t } =
|
|
12894
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12895
12895
|
const titleId = react.useId();
|
|
12896
12896
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12897
12897
|
SheetDialog,
|
|
@@ -13238,7 +13238,7 @@ function ItemRow({
|
|
|
13238
13238
|
onMoveBy,
|
|
13239
13239
|
onOpenVendor
|
|
13240
13240
|
}) {
|
|
13241
|
-
const { t } =
|
|
13241
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13242
13242
|
const derived = deriveItineraryItem(item, timeZone, serverTime);
|
|
13243
13243
|
const isDone = item.status === "COMPLETED";
|
|
13244
13244
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13360,7 +13360,7 @@ function DayCard({
|
|
|
13360
13360
|
onSwitchToTimeline,
|
|
13361
13361
|
onOpenVendor
|
|
13362
13362
|
}) {
|
|
13363
|
-
const { t } =
|
|
13363
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13364
13364
|
const { draggingId, overIndex, rowProps, moveBy } = useListReorder({
|
|
13365
13365
|
enabled: canEdit,
|
|
13366
13366
|
onMove: onReorder
|
|
@@ -13411,7 +13411,7 @@ function DayCard({
|
|
|
13411
13411
|
] });
|
|
13412
13412
|
}
|
|
13413
13413
|
function DayPillStrip({ pills, activeIso, onSelect }) {
|
|
13414
|
-
const { t } =
|
|
13414
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13415
13415
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13416
13416
|
"div",
|
|
13417
13417
|
{
|
|
@@ -13488,7 +13488,7 @@ function EditDayDialog({
|
|
|
13488
13488
|
onClose,
|
|
13489
13489
|
onSubmit
|
|
13490
13490
|
}) {
|
|
13491
|
-
const { t } =
|
|
13491
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13492
13492
|
const titleId = react.useId();
|
|
13493
13493
|
const [cardTitle, setCardTitle] = react.useState(group.day.cardTitle);
|
|
13494
13494
|
const [hasSummary, setHasSummary] = react.useState(
|
|
@@ -13631,7 +13631,7 @@ function ItemFormDialog({
|
|
|
13631
13631
|
onSubmit,
|
|
13632
13632
|
onDelete
|
|
13633
13633
|
}) {
|
|
13634
|
-
const { t } =
|
|
13634
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13635
13635
|
const titleId = react.useId();
|
|
13636
13636
|
const isEdit = item !== null;
|
|
13637
13637
|
const [isoDate, setIsoDate] = react.useState(
|
|
@@ -13886,7 +13886,7 @@ function ItinerarySkeleton({ view }) {
|
|
|
13886
13886
|
] });
|
|
13887
13887
|
}
|
|
13888
13888
|
function ItineraryEmpty() {
|
|
13889
|
-
const { t } =
|
|
13889
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13890
13890
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", children: [
|
|
13891
13891
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}) }),
|
|
13892
13892
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.emptyTitle") }),
|
|
@@ -13894,7 +13894,7 @@ function ItineraryEmpty() {
|
|
|
13894
13894
|
] });
|
|
13895
13895
|
}
|
|
13896
13896
|
function ItineraryFailed({ onRetry }) {
|
|
13897
|
-
const { t } =
|
|
13897
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13898
13898
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", role: "alert", children: [
|
|
13899
13899
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.failedTitle") }),
|
|
13900
13900
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-itinerary-section__state-body", children: t("chrome.tripItinerary.failedBody") }),
|
|
@@ -13902,7 +13902,7 @@ function ItineraryFailed({ onRetry }) {
|
|
|
13902
13902
|
] });
|
|
13903
13903
|
}
|
|
13904
13904
|
function TimelineView({ entries, onOpenDay }) {
|
|
13905
|
-
const { t } =
|
|
13905
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13906
13906
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "kf-trip-itinerary-section__timeline", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__timeline-grid", children: [
|
|
13907
13907
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__timeline-line", "aria-hidden": "true" }),
|
|
13908
13908
|
entries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13989,7 +13989,7 @@ var OPTIONS2 = [
|
|
|
13989
13989
|
{ value: "timeline", labelKey: "chrome.tripItinerary.viewTimeline" }
|
|
13990
13990
|
];
|
|
13991
13991
|
function ViewSegment({ value, onChange }) {
|
|
13992
|
-
const { t } =
|
|
13992
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13993
13993
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-itinerary-section__segment", children: [
|
|
13994
13994
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripItinerary.viewLabel") }),
|
|
13995
13995
|
OPTIONS2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14011,7 +14011,7 @@ function codeOf5(error) {
|
|
|
14011
14011
|
return classification?.code ?? "unknown";
|
|
14012
14012
|
}
|
|
14013
14013
|
function TripItinerarySection(props) {
|
|
14014
|
-
const session =
|
|
14014
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
14015
14015
|
if (session.status !== "authenticated") {
|
|
14016
14016
|
return null;
|
|
14017
14017
|
}
|
|
@@ -14022,8 +14022,8 @@ function ReadyTripItinerarySection({
|
|
|
14022
14022
|
onOpenVendor,
|
|
14023
14023
|
style
|
|
14024
14024
|
}) {
|
|
14025
|
-
const { t } =
|
|
14026
|
-
const itinerary =
|
|
14025
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14026
|
+
const itinerary = chunkUSKVWPJD_cjs.useItinerary(tripRef);
|
|
14027
14027
|
const [view, setView] = react.useState("days");
|
|
14028
14028
|
const [activeIso, setActiveIso] = react.useState(null);
|
|
14029
14029
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -14196,7 +14196,7 @@ function ReadyTripItinerarySection({
|
|
|
14196
14196
|
setActiveIso(isoDate);
|
|
14197
14197
|
setView("days");
|
|
14198
14198
|
}
|
|
14199
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style:
|
|
14199
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
14200
14200
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__toolbar", children: [
|
|
14201
14201
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSegment, { value: view, onChange: setView }),
|
|
14202
14202
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__toolbar-spacer" }),
|
|
@@ -14381,9 +14381,9 @@ function AddTravellerDialog({
|
|
|
14381
14381
|
onClose,
|
|
14382
14382
|
onAdded
|
|
14383
14383
|
}) {
|
|
14384
|
-
const { t } =
|
|
14384
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14385
14385
|
const titleId = react.useId();
|
|
14386
|
-
const { makeTravellersFetch, addTraveller, createAgencyTraveller } =
|
|
14386
|
+
const { makeTravellersFetch, addTraveller, createAgencyTraveller } = chunkODH3SYYW_cjs.useDirectories();
|
|
14387
14387
|
const [mode, setMode] = react.useState("search");
|
|
14388
14388
|
const [term, setTerm] = react.useState("");
|
|
14389
14389
|
const [debounced, setDebounced] = react.useState("");
|
|
@@ -14397,7 +14397,7 @@ function AddTravellerDialog({
|
|
|
14397
14397
|
return () => clearTimeout(timer);
|
|
14398
14398
|
}, [term]);
|
|
14399
14399
|
function reportFailure(error) {
|
|
14400
|
-
setErrorCode(
|
|
14400
|
+
setErrorCode(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
14401
14401
|
}
|
|
14402
14402
|
async function addExisting(externalTravellerId, fullName) {
|
|
14403
14403
|
setPending(true);
|
|
@@ -14549,8 +14549,8 @@ function DirectoryResults({
|
|
|
14549
14549
|
pendingId,
|
|
14550
14550
|
onPick
|
|
14551
14551
|
}) {
|
|
14552
|
-
const { t } =
|
|
14553
|
-
const { rows, hasNext, loadNext, settled, error } =
|
|
14552
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14553
|
+
const { rows, hasNext, loadNext, settled, error } = chunkODH3SYYW_cjs.usePaginatedList(fetch);
|
|
14554
14554
|
if (!settled) {
|
|
14555
14555
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "aria-live": "polite", children: t("chrome.tripManifest.addSearching") });
|
|
14556
14556
|
}
|
|
@@ -14635,9 +14635,9 @@ function ManageGroupsDialog({
|
|
|
14635
14635
|
onClose,
|
|
14636
14636
|
onSaved
|
|
14637
14637
|
}) {
|
|
14638
|
-
const { t } =
|
|
14638
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14639
14639
|
const titleId = react.useId();
|
|
14640
|
-
const { createParty, patchParty, deleteParty } =
|
|
14640
|
+
const { createParty, patchParty, deleteParty } = chunkODH3SYYW_cjs.useDirectories();
|
|
14641
14641
|
const groups = deriveManifestGroups(rows).filter(
|
|
14642
14642
|
(group) => group.id !== SOLO_GROUP_ID && group.party !== null
|
|
14643
14643
|
);
|
|
@@ -14865,7 +14865,7 @@ function ManageGroupsDialog({
|
|
|
14865
14865
|
}
|
|
14866
14866
|
var DIET_BUCKET_CAP = 4;
|
|
14867
14867
|
function ManifestFacetTiles({ facets, filtered }) {
|
|
14868
|
-
const { t } =
|
|
14868
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14869
14869
|
const dietEntries = Object.entries(facets.dietCounts).filter(([, count]) => count > 0).sort((a, b) => b[1] - a[1]);
|
|
14870
14870
|
const shown = dietEntries.slice(0, DIET_BUCKET_CAP);
|
|
14871
14871
|
const hiddenCount = dietEntries.length - shown.length;
|
|
@@ -14947,7 +14947,7 @@ function ManifestFiltersPopover({
|
|
|
14947
14947
|
value,
|
|
14948
14948
|
onChange
|
|
14949
14949
|
}) {
|
|
14950
|
-
const { t } =
|
|
14950
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14951
14951
|
const [open, setOpen] = react.useState(false);
|
|
14952
14952
|
const rootRef = react.useRef(null);
|
|
14953
14953
|
const triggerRef = react.useRef(null);
|
|
@@ -15087,7 +15087,7 @@ var KIND_LABEL_KEY2 = {
|
|
|
15087
15087
|
OTHER: "chrome.tripManifest.partyKind.other"
|
|
15088
15088
|
};
|
|
15089
15089
|
function ManifestGroupCard({ group, onEdit, children }) {
|
|
15090
|
-
const { t } =
|
|
15090
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15091
15091
|
const party = group.party;
|
|
15092
15092
|
const isSolo = party === null;
|
|
15093
15093
|
const heading = isSolo ? t("chrome.tripManifest.soloHeading") : party.label ?? t(KIND_LABEL_KEY2[party.kind] ?? "chrome.tripManifest.partyKind.other");
|
|
@@ -15175,7 +15175,7 @@ function ManifestRowKebab({
|
|
|
15175
15175
|
onShareLink,
|
|
15176
15176
|
onOpenProfile
|
|
15177
15177
|
}) {
|
|
15178
|
-
const { t } =
|
|
15178
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15179
15179
|
const [open, setOpen] = react.useState(false);
|
|
15180
15180
|
const rootRef = react.useRef(null);
|
|
15181
15181
|
const triggerRef = react.useRef(null);
|
|
@@ -15274,10 +15274,10 @@ function ManifestRow({
|
|
|
15274
15274
|
onOpenProfile,
|
|
15275
15275
|
style
|
|
15276
15276
|
}) {
|
|
15277
|
-
const { t } =
|
|
15277
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15278
15278
|
const derived = deriveManifestRow(row, index, serverTime);
|
|
15279
15279
|
const traveller = row.traveller;
|
|
15280
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style:
|
|
15280
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
15281
15281
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15282
15282
|
"td",
|
|
15283
15283
|
{
|
|
@@ -15351,7 +15351,7 @@ function ManifestTable({
|
|
|
15351
15351
|
onOpenProfile,
|
|
15352
15352
|
RowComponent
|
|
15353
15353
|
}) {
|
|
15354
|
-
const { t } =
|
|
15354
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15355
15355
|
const Row = RowComponent ?? ManifestRow;
|
|
15356
15356
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-manifest-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { role: "table", className: "kf-trip-manifest-section__table", children: [
|
|
15357
15357
|
showHead ? /* @__PURE__ */ jsxRuntime.jsx("thead", { role: "rowgroup", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__head-row", children: [
|
|
@@ -15398,8 +15398,8 @@ function ManifestResultsBody({
|
|
|
15398
15398
|
RowComponent,
|
|
15399
15399
|
onRetry
|
|
15400
15400
|
}) {
|
|
15401
|
-
const { t } =
|
|
15402
|
-
const { makeManifestFetch, facets, groupedPageSize } =
|
|
15401
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15402
|
+
const { makeManifestFetch, facets, groupedPageSize } = chunkODH3SYYW_cjs.useAgencyTripManifest(tripRef);
|
|
15403
15403
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
15404
15404
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
15405
15405
|
const [serverTime, setServerTime] = react.useState(void 0);
|
|
@@ -15416,7 +15416,7 @@ function ManifestResultsBody({
|
|
|
15416
15416
|
if (meta?.serverTime !== void 0) setServerTime(meta.serverTime);
|
|
15417
15417
|
return page;
|
|
15418
15418
|
} catch (error) {
|
|
15419
|
-
setErrorCode(
|
|
15419
|
+
setErrorCode(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
15420
15420
|
return { rows: [], nextCursor: void 0 };
|
|
15421
15421
|
} finally {
|
|
15422
15422
|
setHasSettled(true);
|
|
@@ -15424,7 +15424,7 @@ function ManifestResultsBody({
|
|
|
15424
15424
|
},
|
|
15425
15425
|
[makeManifestFetch, filters, grouped, groupedPageSize]
|
|
15426
15426
|
);
|
|
15427
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
15427
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkODH3SYYW_cjs.usePaginatedList(fetch, {
|
|
15428
15428
|
accumulate: grouped
|
|
15429
15429
|
});
|
|
15430
15430
|
react.useEffect(() => {
|
|
@@ -15585,7 +15585,7 @@ function ManifestSearchInput({
|
|
|
15585
15585
|
debounceMs,
|
|
15586
15586
|
onDebouncedChange
|
|
15587
15587
|
}) {
|
|
15588
|
-
const { t } =
|
|
15588
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15589
15589
|
const [value, setValue] = react.useState("");
|
|
15590
15590
|
react.useEffect(() => {
|
|
15591
15591
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -15612,8 +15612,8 @@ function RemoveTravellerDialog({
|
|
|
15612
15612
|
onClose,
|
|
15613
15613
|
onRemoved
|
|
15614
15614
|
}) {
|
|
15615
|
-
const { t } =
|
|
15616
|
-
const { removeFromManifest } =
|
|
15615
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15616
|
+
const { removeFromManifest } = chunkODH3SYYW_cjs.useDirectories();
|
|
15617
15617
|
const titleId = react.useId();
|
|
15618
15618
|
const [pending, setPending] = react.useState(false);
|
|
15619
15619
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -15700,7 +15700,7 @@ function shareAddress(build, token) {
|
|
|
15700
15700
|
}
|
|
15701
15701
|
var warnedNoShareUrl = false;
|
|
15702
15702
|
function warnMissingShareUrl() {
|
|
15703
|
-
if (warnedNoShareUrl || !
|
|
15703
|
+
if (warnedNoShareUrl || !chunk5ORJRFXZ_cjs.isDevelopment()) return;
|
|
15704
15704
|
warnedNoShareUrl = true;
|
|
15705
15705
|
console.warn(
|
|
15706
15706
|
"[kaafil-react-uikit] No `buildShareUrl` on <KaafilUIKitProvider>, so the share dialog is showing operators a bare token instead of a sendable address. Kaafil returns a token, never a URL \u2014 the traveller page is on your domain. Fix: buildShareUrl={(token) => `${window.location.origin}/share/${token}`}"
|
|
@@ -15712,14 +15712,14 @@ function ShareLinkDialog({
|
|
|
15712
15712
|
travellerName,
|
|
15713
15713
|
onClose
|
|
15714
15714
|
}) {
|
|
15715
|
-
const { t } =
|
|
15715
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15716
15716
|
const titleId = react.useId();
|
|
15717
|
-
const buildShareUrl =
|
|
15717
|
+
const buildShareUrl = chunkODH3SYYW_cjs.useBuildShareUrl();
|
|
15718
15718
|
const showsBareToken = buildShareUrl === null;
|
|
15719
15719
|
if (showsBareToken) warnMissingShareUrl();
|
|
15720
15720
|
const isFamily = travellerRef === null;
|
|
15721
|
-
const offerable =
|
|
15722
|
-
const { links, readFailed, mint, revoke, regenerate, reveal } =
|
|
15721
|
+
const offerable = chunkODH3SYYW_cjs.familySafeSections(isFamily);
|
|
15722
|
+
const { links, readFailed, mint, revoke, regenerate, reveal } = chunkODH3SYYW_cjs.useShareLinks(
|
|
15723
15723
|
tripRef,
|
|
15724
15724
|
travellerRef
|
|
15725
15725
|
);
|
|
@@ -16058,7 +16058,7 @@ function SideDrawer({
|
|
|
16058
16058
|
"aria-modal": "true",
|
|
16059
16059
|
"aria-labelledby": titleId,
|
|
16060
16060
|
tabIndex: -1,
|
|
16061
|
-
style:
|
|
16061
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
16062
16062
|
children: [
|
|
16063
16063
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-admin-side-drawer__header", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__header-row", children: [
|
|
16064
16064
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__identity", children: [
|
|
@@ -16126,11 +16126,11 @@ function TravellerDetailDialog({
|
|
|
16126
16126
|
onClose,
|
|
16127
16127
|
onRemove
|
|
16128
16128
|
}) {
|
|
16129
|
-
const { t } =
|
|
16129
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16130
16130
|
const titleId = react.useId();
|
|
16131
|
-
const { read, readFailed, refresh } =
|
|
16132
|
-
const forms =
|
|
16133
|
-
const { addTravellerNote } =
|
|
16131
|
+
const { read, readFailed, refresh } = chunkUSKVWPJD_cjs.useTravellerProfile(tripRef, travellerRef);
|
|
16132
|
+
const forms = chunkODH3SYYW_cjs.useTravellerFormResponses(tripRef, travellerRef);
|
|
16133
|
+
const { addTravellerNote } = chunkODH3SYYW_cjs.useDirectories();
|
|
16134
16134
|
const [noteDraft, setNoteDraft] = react.useState("");
|
|
16135
16135
|
const [notePending, setNotePending] = react.useState(false);
|
|
16136
16136
|
const [noteFailed, setNoteFailed] = react.useState(false);
|
|
@@ -16359,7 +16359,7 @@ function DetailRow({
|
|
|
16359
16359
|
absentLabel,
|
|
16360
16360
|
meta
|
|
16361
16361
|
}) {
|
|
16362
|
-
const { t } =
|
|
16362
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16363
16363
|
const has = value !== null && value !== void 0 && value.length > 0;
|
|
16364
16364
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__detail-row", children: [
|
|
16365
16365
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-manifest-section__detail-label", children: label }),
|
|
@@ -16382,7 +16382,7 @@ function TripManifestSection({
|
|
|
16382
16382
|
components,
|
|
16383
16383
|
style
|
|
16384
16384
|
}) {
|
|
16385
|
-
const { t } =
|
|
16385
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16386
16386
|
const [q, setQ] = react.useState("");
|
|
16387
16387
|
const [groupBy, setGroupBy] = react.useState("booking_group");
|
|
16388
16388
|
const [filters, setFilters] = react.useState({});
|
|
@@ -16411,7 +16411,7 @@ function TripManifestSection({
|
|
|
16411
16411
|
[groupBy, writeToken, wireFilters]
|
|
16412
16412
|
);
|
|
16413
16413
|
const hasActiveFilter = q.length > 0 || Object.keys(filters).length > 0;
|
|
16414
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style:
|
|
16414
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
16415
16415
|
facets === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ManifestFacetTiles, { facets, filtered: hasActiveFilter }),
|
|
16416
16416
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__toolbar", children: [
|
|
16417
16417
|
/* @__PURE__ */ jsxRuntime.jsx(ManifestSearchInput, { debounceMs: DEBOUNCE_MS, onDebouncedChange: setQ }),
|
|
@@ -16630,7 +16630,7 @@ function PaymentsSkeleton() {
|
|
|
16630
16630
|
] }, id)) });
|
|
16631
16631
|
}
|
|
16632
16632
|
function PaymentsEmpty({ onRecord }) {
|
|
16633
|
-
const { t } =
|
|
16633
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16634
16634
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", children: [
|
|
16635
16635
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ReceiptIcon, {}) }),
|
|
16636
16636
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.emptyTitle") }),
|
|
@@ -16639,7 +16639,7 @@ function PaymentsEmpty({ onRecord }) {
|
|
|
16639
16639
|
] });
|
|
16640
16640
|
}
|
|
16641
16641
|
function PaymentsFailed({ onRetry }) {
|
|
16642
|
-
const { t } =
|
|
16642
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16643
16643
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", role: "alert", children: [
|
|
16644
16644
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.failedTitle") }),
|
|
16645
16645
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-payments-section__state-body", children: t("chrome.tripPayments.failedBody") }),
|
|
@@ -16647,7 +16647,7 @@ function PaymentsFailed({ onRetry }) {
|
|
|
16647
16647
|
] });
|
|
16648
16648
|
}
|
|
16649
16649
|
function PaymentsDark({ reason }) {
|
|
16650
|
-
const { t } =
|
|
16650
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16651
16651
|
if (reason === "mode") {
|
|
16652
16652
|
return null;
|
|
16653
16653
|
}
|
|
@@ -16668,7 +16668,7 @@ function PaymentsTable({
|
|
|
16668
16668
|
locked,
|
|
16669
16669
|
onVoid
|
|
16670
16670
|
}) {
|
|
16671
|
-
const { t } =
|
|
16671
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16672
16672
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-payments-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-payments-section__table", children: [
|
|
16673
16673
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripPayments.tableCaption") }),
|
|
16674
16674
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -16727,7 +16727,7 @@ function RecordPaymentDialog({
|
|
|
16727
16727
|
onClose,
|
|
16728
16728
|
onSubmit
|
|
16729
16729
|
}) {
|
|
16730
|
-
const { t } =
|
|
16730
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16731
16731
|
const titleId = react.useId();
|
|
16732
16732
|
const [travellerId, setTravellerId] = react.useState(null);
|
|
16733
16733
|
const [amount, setAmount] = react.useState("");
|
|
@@ -16902,7 +16902,7 @@ function VoidPaymentDialog({
|
|
|
16902
16902
|
onClose,
|
|
16903
16903
|
onSubmit
|
|
16904
16904
|
}) {
|
|
16905
|
-
const { t } =
|
|
16905
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16906
16906
|
const titleId = react.useId();
|
|
16907
16907
|
const [reason, setReason] = react.useState("");
|
|
16908
16908
|
const trimmed = reason.trim();
|
|
@@ -16976,7 +16976,7 @@ function isCloseoutLocked4(error) {
|
|
|
16976
16976
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
16977
16977
|
}
|
|
16978
16978
|
function TripPaymentsSection(props) {
|
|
16979
|
-
const session =
|
|
16979
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
16980
16980
|
if (session.status !== "authenticated") {
|
|
16981
16981
|
return null;
|
|
16982
16982
|
}
|
|
@@ -16987,9 +16987,9 @@ function ReadyTripPaymentsSection({
|
|
|
16987
16987
|
balance,
|
|
16988
16988
|
style
|
|
16989
16989
|
}) {
|
|
16990
|
-
const { t } =
|
|
16991
|
-
const collections =
|
|
16992
|
-
const parties =
|
|
16990
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16991
|
+
const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
|
|
16992
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
16993
16993
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
16994
16994
|
const [pending, setPending] = react.useState(false);
|
|
16995
16995
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -17069,7 +17069,7 @@ function ReadyTripPaymentsSection({
|
|
|
17069
17069
|
}
|
|
17070
17070
|
const currency = balance?.currency ?? rows[0]?.currency ?? "INR";
|
|
17071
17071
|
const owingCount = eligibleRows.filter((row) => row.outstandingMinor > 0).length;
|
|
17072
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style:
|
|
17072
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
17073
17073
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__toolbar", children: [
|
|
17074
17074
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-title", children: t("chrome.tripPayments.panelLabel") }),
|
|
17075
17075
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-spacer" }),
|
|
@@ -17210,7 +17210,7 @@ function AssignTravellerDialog({
|
|
|
17210
17210
|
onSubmit,
|
|
17211
17211
|
onClose
|
|
17212
17212
|
}) {
|
|
17213
|
-
const { t } =
|
|
17213
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17214
17214
|
const titleId = react.useId();
|
|
17215
17215
|
const [pointId, setPointId] = react.useState(stops[0]?.id ?? "");
|
|
17216
17216
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17281,7 +17281,7 @@ function BoardingRoster({
|
|
|
17281
17281
|
onRetry,
|
|
17282
17282
|
stops
|
|
17283
17283
|
}) {
|
|
17284
|
-
const { t } =
|
|
17284
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17285
17285
|
if (failed) {
|
|
17286
17286
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17287
17287
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.boardingFailedTitle") }),
|
|
@@ -17341,7 +17341,7 @@ function TravellerBoardRow({
|
|
|
17341
17341
|
busy,
|
|
17342
17342
|
onCorrect
|
|
17343
17343
|
}) {
|
|
17344
|
-
const { t } =
|
|
17344
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17345
17345
|
const correctable = occupant.status !== "PENDING";
|
|
17346
17346
|
const next = occupant.status === "BOARDED" ? "NO_SHOW" : "BOARDED";
|
|
17347
17347
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-pickups-section__roster-row", children: [
|
|
@@ -17379,7 +17379,7 @@ function DeleteStopDialog({
|
|
|
17379
17379
|
onDelete,
|
|
17380
17380
|
onClose
|
|
17381
17381
|
}) {
|
|
17382
|
-
const { t } =
|
|
17382
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17383
17383
|
const titleId = react.useId();
|
|
17384
17384
|
const [target, setTarget] = react.useState(siblings[0]?.id ?? "");
|
|
17385
17385
|
const occupied = stop.expectedCount > 0;
|
|
@@ -17633,7 +17633,7 @@ function PickupsEmpty({
|
|
|
17633
17633
|
kindLabel,
|
|
17634
17634
|
onAdd
|
|
17635
17635
|
}) {
|
|
17636
|
-
const { t } =
|
|
17636
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17637
17637
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", children: [
|
|
17638
17638
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-pickups-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon, {}) }),
|
|
17639
17639
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.emptyTitle").replace("{kind}", kindLabel) }),
|
|
@@ -17642,7 +17642,7 @@ function PickupsEmpty({
|
|
|
17642
17642
|
] });
|
|
17643
17643
|
}
|
|
17644
17644
|
function PickupsFailed({ onRetry }) {
|
|
17645
|
-
const { t } =
|
|
17645
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17646
17646
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17647
17647
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.failedTitle") }),
|
|
17648
17648
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-pickups-section__state-body", children: t("chrome.tripPickups.failedBody") }),
|
|
@@ -17650,7 +17650,7 @@ function PickupsFailed({ onRetry }) {
|
|
|
17650
17650
|
] });
|
|
17651
17651
|
}
|
|
17652
17652
|
function PickupsDark({ reason }) {
|
|
17653
|
-
const { t } =
|
|
17653
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17654
17654
|
if (reason === "mode") {
|
|
17655
17655
|
return null;
|
|
17656
17656
|
}
|
|
@@ -17684,7 +17684,7 @@ function StopFormDialog({
|
|
|
17684
17684
|
onClose,
|
|
17685
17685
|
onSubmit
|
|
17686
17686
|
}) {
|
|
17687
|
-
const { t } =
|
|
17687
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17688
17688
|
const titleId = react.useId();
|
|
17689
17689
|
const isEdit = stop !== null;
|
|
17690
17690
|
const [kind, setKind] = react.useState(stop?.kind ?? defaultKind);
|
|
@@ -17831,7 +17831,7 @@ function StopFormDialog({
|
|
|
17831
17831
|
);
|
|
17832
17832
|
}
|
|
17833
17833
|
function StopKebab({ stopName, onEdit, onDelete }) {
|
|
17834
|
-
const { t } =
|
|
17834
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17835
17835
|
const [open, setOpen] = react.useState(false);
|
|
17836
17836
|
const rootRef = react.useRef(null);
|
|
17837
17837
|
const triggerRef = react.useRef(null);
|
|
@@ -17908,7 +17908,7 @@ function StopCard({
|
|
|
17908
17908
|
onDelete,
|
|
17909
17909
|
onMoveBy
|
|
17910
17910
|
}) {
|
|
17911
|
-
const { t } =
|
|
17911
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17912
17912
|
const isClosed = stop.status === "CLOSED";
|
|
17913
17913
|
const canReorder = !isClosed;
|
|
17914
17914
|
const percent = boardedPercent(stop);
|
|
@@ -18056,7 +18056,7 @@ function Segment({
|
|
|
18056
18056
|
value,
|
|
18057
18057
|
onChange
|
|
18058
18058
|
}) {
|
|
18059
|
-
const { t } =
|
|
18059
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18060
18060
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-pickups-section__segment", children: [
|
|
18061
18061
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t(legendKey) }),
|
|
18062
18062
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -18114,7 +18114,7 @@ function codeOf7(error) {
|
|
|
18114
18114
|
return classification?.code ?? "unknown";
|
|
18115
18115
|
}
|
|
18116
18116
|
function TripPickupsSection(props) {
|
|
18117
|
-
const session =
|
|
18117
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
18118
18118
|
if (session.status !== "authenticated") {
|
|
18119
18119
|
return null;
|
|
18120
18120
|
}
|
|
@@ -18126,8 +18126,8 @@ function ReadyTripPickupsSection({
|
|
|
18126
18126
|
tripStartIso,
|
|
18127
18127
|
style
|
|
18128
18128
|
}) {
|
|
18129
|
-
const { t } =
|
|
18130
|
-
const pickups =
|
|
18129
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18130
|
+
const pickups = chunkUSKVWPJD_cjs.usePickups(tripRef);
|
|
18131
18131
|
const [kind, setKind] = react.useState("PICKUP");
|
|
18132
18132
|
const [view, setView] = react.useState("stops");
|
|
18133
18133
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -18287,7 +18287,7 @@ function ReadyTripPickupsSection({
|
|
|
18287
18287
|
const kindLabel = t(
|
|
18288
18288
|
kind === "PICKUP" ? "chrome.tripPickups.kindPickupOne" : "chrome.tripPickups.kindDropOne"
|
|
18289
18289
|
);
|
|
18290
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style:
|
|
18290
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
18291
18291
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__toolbar", children: [
|
|
18292
18292
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSwitcher, { value: view, onChange: setView }),
|
|
18293
18293
|
/* @__PURE__ */ jsxRuntime.jsx(KindSwitcher, { value: kind, onChange: setKind }),
|
|
@@ -18510,7 +18510,7 @@ function AutoAssignDialog({
|
|
|
18510
18510
|
onApply,
|
|
18511
18511
|
onClose
|
|
18512
18512
|
}) {
|
|
18513
|
-
const { t } =
|
|
18513
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18514
18514
|
const titleId = react.useId();
|
|
18515
18515
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
18516
18516
|
const roomCodeById = new Map(group.rooms.map((room) => [room.id, room.code]));
|
|
@@ -18605,7 +18605,7 @@ function AutoAssignDialog({
|
|
|
18605
18605
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section__plan", children: [
|
|
18606
18606
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__plan-title", children: t("chrome.tripRooming.rulesTitle") }),
|
|
18607
18607
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "kf-trip-rooming-section__rule-list", children: preview.perRule.map((entry) => {
|
|
18608
|
-
const severity =
|
|
18608
|
+
const severity = chunkUSKVWPJD_cjs.roomingHeuristicSeverity(entry.rule);
|
|
18609
18609
|
const relaxed = entry.outcome === "relaxed";
|
|
18610
18610
|
const violation = relaxed && severity === "never";
|
|
18611
18611
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18651,7 +18651,7 @@ function DeleteShell({
|
|
|
18651
18651
|
onConfirm,
|
|
18652
18652
|
onClose
|
|
18653
18653
|
}) {
|
|
18654
|
-
const { t } =
|
|
18654
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18655
18655
|
const titleId = react.useId();
|
|
18656
18656
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18657
18657
|
SheetDialog,
|
|
@@ -18697,7 +18697,7 @@ function DeleteRoomDialog({
|
|
|
18697
18697
|
onConfirm,
|
|
18698
18698
|
onClose
|
|
18699
18699
|
}) {
|
|
18700
|
-
const { t } =
|
|
18700
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18701
18701
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
18702
18702
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18703
18703
|
DeleteShell,
|
|
@@ -18723,7 +18723,7 @@ function DeleteWindowDialog({
|
|
|
18723
18723
|
onConfirm,
|
|
18724
18724
|
onClose
|
|
18725
18725
|
}) {
|
|
18726
|
-
const { t } =
|
|
18726
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18727
18727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18728
18728
|
DeleteShell,
|
|
18729
18729
|
{
|
|
@@ -18821,15 +18821,15 @@ function roomTypeLabelKey(roomType) {
|
|
|
18821
18821
|
return ROOM_TYPE_LABEL_KEY[roomType] ?? "chrome.tripRooming.roomType.shared";
|
|
18822
18822
|
}
|
|
18823
18823
|
function toneAttrs(tone) {
|
|
18824
|
-
const parsed =
|
|
18824
|
+
const parsed = chunkUSKVWPJD_cjs.parseRoomingTone(tone);
|
|
18825
18825
|
if (parsed === void 0) {
|
|
18826
|
-
return { family:
|
|
18826
|
+
return { family: chunkUSKVWPJD_cjs.TONE_FAMILIES.UNKNOWN, shade: 0 };
|
|
18827
18827
|
}
|
|
18828
|
-
const shade = parsed.shade <
|
|
18828
|
+
const shade = parsed.shade < chunkUSKVWPJD_cjs.SHADES_PER_FAMILY ? parsed.shade : parsed.shade % chunkUSKVWPJD_cjs.SHADES_PER_FAMILY;
|
|
18829
18829
|
return { family: parsed.family, shade };
|
|
18830
18830
|
}
|
|
18831
18831
|
function glyphOf(occupant) {
|
|
18832
|
-
return occupant.glyph === "" ?
|
|
18832
|
+
return occupant.glyph === "" ? chunkUSKVWPJD_cjs.FALLBACK_GLYPH : occupant.glyph;
|
|
18833
18833
|
}
|
|
18834
18834
|
function TravellerGlyph({
|
|
18835
18835
|
occupant,
|
|
@@ -18867,7 +18867,7 @@ var COLLAPSED_COUNT = 10;
|
|
|
18867
18867
|
function IdentityLegend({
|
|
18868
18868
|
occupants
|
|
18869
18869
|
}) {
|
|
18870
|
-
const { t } =
|
|
18870
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18871
18871
|
const [open, setOpen] = react.useState(false);
|
|
18872
18872
|
if (occupants.length === 0) {
|
|
18873
18873
|
return null;
|
|
@@ -18994,7 +18994,7 @@ function RoomFormDialog({
|
|
|
18994
18994
|
onClose,
|
|
18995
18995
|
onSubmit
|
|
18996
18996
|
}) {
|
|
18997
|
-
const { t } =
|
|
18997
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18998
18998
|
const titleId = react.useId();
|
|
18999
18999
|
const isEdit = room !== null;
|
|
19000
19000
|
const [code, setCode] = react.useState(room?.code ?? "");
|
|
@@ -19118,7 +19118,7 @@ function RoomingSkeleton() {
|
|
|
19118
19118
|
] }, id)) });
|
|
19119
19119
|
}
|
|
19120
19120
|
function RoomingEmpty({ onAddWindow }) {
|
|
19121
|
-
const { t } =
|
|
19121
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19122
19122
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", children: [
|
|
19123
19123
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BedIcon, {}) }),
|
|
19124
19124
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.emptyTitle") }),
|
|
@@ -19127,7 +19127,7 @@ function RoomingEmpty({ onAddWindow }) {
|
|
|
19127
19127
|
] });
|
|
19128
19128
|
}
|
|
19129
19129
|
function RoomingFailed({ onRetry }) {
|
|
19130
|
-
const { t } =
|
|
19130
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19131
19131
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", role: "alert", children: [
|
|
19132
19132
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.failedTitle") }),
|
|
19133
19133
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-rooming-section__state-body", children: t("chrome.tripRooming.failedBody") }),
|
|
@@ -19135,7 +19135,7 @@ function RoomingFailed({ onRetry }) {
|
|
|
19135
19135
|
] });
|
|
19136
19136
|
}
|
|
19137
19137
|
function RoomingDark({ reason }) {
|
|
19138
|
-
const { t } =
|
|
19138
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19139
19139
|
if (reason === "mode") {
|
|
19140
19140
|
return null;
|
|
19141
19141
|
}
|
|
@@ -19150,7 +19150,7 @@ function RoomingDark({ reason }) {
|
|
|
19150
19150
|
] });
|
|
19151
19151
|
}
|
|
19152
19152
|
function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
19153
|
-
const { t } =
|
|
19153
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19154
19154
|
const [open, setOpen] = react.useState(false);
|
|
19155
19155
|
const rootRef = react.useRef(null);
|
|
19156
19156
|
const triggerRef = react.useRef(null);
|
|
@@ -19215,7 +19215,7 @@ function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
|
19215
19215
|
] });
|
|
19216
19216
|
}
|
|
19217
19217
|
function RoomCard({ room, drag, busy, onEdit, onDelete }) {
|
|
19218
|
-
const { t } =
|
|
19218
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19219
19219
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
19220
19220
|
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "kf-trip-rooming-section__room", "data-busy": busy ? "true" : void 0, children: [
|
|
19221
19221
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-rooming-section__room-head", children: [
|
|
@@ -19265,7 +19265,7 @@ function UnassignedStrip({
|
|
|
19265
19265
|
drag,
|
|
19266
19266
|
busy
|
|
19267
19267
|
}) {
|
|
19268
|
-
const { t } =
|
|
19268
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19269
19269
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19270
19270
|
"div",
|
|
19271
19271
|
{
|
|
@@ -19339,7 +19339,7 @@ function WindowAccordion({
|
|
|
19339
19339
|
onEditRoom,
|
|
19340
19340
|
onDeleteRoom
|
|
19341
19341
|
}) {
|
|
19342
|
-
const { t } =
|
|
19342
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19343
19343
|
const percent = fillPercent(group);
|
|
19344
19344
|
const bodyId = `kf-rooming-window-${group.window.id}`;
|
|
19345
19345
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -19489,7 +19489,7 @@ function WindowFormDialog({
|
|
|
19489
19489
|
onClose,
|
|
19490
19490
|
onSubmit
|
|
19491
19491
|
}) {
|
|
19492
|
-
const { t } =
|
|
19492
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19493
19493
|
const titleId = react.useId();
|
|
19494
19494
|
const isEdit = window !== null;
|
|
19495
19495
|
const [label, setLabel] = react.useState(window?.label ?? "");
|
|
@@ -19596,7 +19596,7 @@ function codeOf8(error) {
|
|
|
19596
19596
|
return classification?.code ?? "unknown";
|
|
19597
19597
|
}
|
|
19598
19598
|
function TripRoomingSection(props) {
|
|
19599
|
-
const session =
|
|
19599
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
19600
19600
|
if (session.status !== "authenticated") {
|
|
19601
19601
|
return null;
|
|
19602
19602
|
}
|
|
@@ -19609,8 +19609,8 @@ function ReadyTripRoomingSection({
|
|
|
19609
19609
|
tripEndIso,
|
|
19610
19610
|
style
|
|
19611
19611
|
}) {
|
|
19612
|
-
const { t } =
|
|
19613
|
-
const rooming =
|
|
19612
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19613
|
+
const rooming = chunkUSKVWPJD_cjs.useRooming(tripRef);
|
|
19614
19614
|
const [openWindowId, setOpenWindowId] = react.useState(null);
|
|
19615
19615
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
19616
19616
|
const [pending, setPending] = react.useState(false);
|
|
@@ -19748,7 +19748,7 @@ function ReadyTripRoomingSection({
|
|
|
19748
19748
|
return /* @__PURE__ */ jsxRuntime.jsx(RoomingDark, { reason: rooming.reason });
|
|
19749
19749
|
}
|
|
19750
19750
|
const pool = ready?.unassignedPool;
|
|
19751
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style:
|
|
19751
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
19752
19752
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__toolbar", children: [
|
|
19753
19753
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-title", children: t("chrome.tripRooming.panelLabel") }),
|
|
19754
19754
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-spacer" }),
|
|
@@ -19982,7 +19982,7 @@ function isAgencyAuthored(vendor) {
|
|
|
19982
19982
|
return vendor.externalId.startsWith("kf-");
|
|
19983
19983
|
}
|
|
19984
19984
|
function CategoryTabs({ selected, counts, total, onSelect }) {
|
|
19985
|
-
const { t } =
|
|
19985
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19986
19986
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__chips", children: [
|
|
19987
19987
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19988
19988
|
"button",
|
|
@@ -20025,7 +20025,7 @@ function DeleteSupplierDialog({
|
|
|
20025
20025
|
onConfirm,
|
|
20026
20026
|
onClose
|
|
20027
20027
|
}) {
|
|
20028
|
-
const { t } =
|
|
20028
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20029
20029
|
const titleId = react.useId();
|
|
20030
20030
|
const blockers = deleteBlockers(usage);
|
|
20031
20031
|
const blockedLocally = blockers !== void 0 && blockers.vehicles + blockers.expenses > 0;
|
|
@@ -20178,7 +20178,7 @@ function SupplierFormDialog({
|
|
|
20178
20178
|
onClose,
|
|
20179
20179
|
onSubmit
|
|
20180
20180
|
}) {
|
|
20181
|
-
const { t } =
|
|
20181
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20182
20182
|
const titleId = react.useId();
|
|
20183
20183
|
const isEdit = supplier !== null;
|
|
20184
20184
|
const [name, setName] = react.useState(supplier?.name ?? "");
|
|
@@ -20300,7 +20300,7 @@ function SuppliersSkeleton() {
|
|
|
20300
20300
|
] }, id)) });
|
|
20301
20301
|
}
|
|
20302
20302
|
function SuppliersEmpty({ onAdd }) {
|
|
20303
|
-
const { t } =
|
|
20303
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20304
20304
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20305
20305
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(StorefrontIcon, {}) }),
|
|
20306
20306
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.emptyTitle") }),
|
|
@@ -20309,7 +20309,7 @@ function SuppliersEmpty({ onAdd }) {
|
|
|
20309
20309
|
] });
|
|
20310
20310
|
}
|
|
20311
20311
|
function SuppliersNoMatch({ onClear }) {
|
|
20312
|
-
const { t } =
|
|
20312
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20313
20313
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20314
20314
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.noMatchTitle") }),
|
|
20315
20315
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.noMatchBody") }),
|
|
@@ -20317,7 +20317,7 @@ function SuppliersNoMatch({ onClear }) {
|
|
|
20317
20317
|
] });
|
|
20318
20318
|
}
|
|
20319
20319
|
function SuppliersFailed({ onRetry }) {
|
|
20320
|
-
const { t } =
|
|
20320
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20321
20321
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", role: "alert", children: [
|
|
20322
20322
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.failedTitle") }),
|
|
20323
20323
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.failedBody") }),
|
|
@@ -20325,7 +20325,7 @@ function SuppliersFailed({ onRetry }) {
|
|
|
20325
20325
|
] });
|
|
20326
20326
|
}
|
|
20327
20327
|
function SuppliersDark({ reason }) {
|
|
20328
|
-
const { t } =
|
|
20328
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20329
20329
|
if (reason === "mode") {
|
|
20330
20330
|
return null;
|
|
20331
20331
|
}
|
|
@@ -20340,7 +20340,7 @@ function SuppliersDark({ reason }) {
|
|
|
20340
20340
|
] });
|
|
20341
20341
|
}
|
|
20342
20342
|
function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
20343
|
-
const { t } =
|
|
20343
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20344
20344
|
const [open, setOpen] = react.useState(false);
|
|
20345
20345
|
const rootRef = react.useRef(null);
|
|
20346
20346
|
const triggerRef = react.useRef(null);
|
|
@@ -20407,7 +20407,7 @@ function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
|
20407
20407
|
] });
|
|
20408
20408
|
}
|
|
20409
20409
|
function SupplierUsageCell({ usage }) {
|
|
20410
|
-
const { t } =
|
|
20410
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20411
20411
|
const parts = [];
|
|
20412
20412
|
if (usage.vehicles !== void 0 && usage.vehicles > 0) {
|
|
20413
20413
|
parts.push(
|
|
@@ -20451,7 +20451,7 @@ function SupplierTable({
|
|
|
20451
20451
|
onEdit,
|
|
20452
20452
|
onDelete
|
|
20453
20453
|
}) {
|
|
20454
|
-
const { t } =
|
|
20454
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20455
20455
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-suppliers-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-suppliers-section__table", children: [
|
|
20456
20456
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripSuppliers.tableCaption") }),
|
|
20457
20457
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -20519,18 +20519,18 @@ function serverBlockOf(error) {
|
|
|
20519
20519
|
return { vehicles: details.vehicleCount ?? 0, expenses: details.expenseCount ?? 0 };
|
|
20520
20520
|
}
|
|
20521
20521
|
function TripSuppliersSection(props) {
|
|
20522
|
-
const session =
|
|
20522
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
20523
20523
|
if (session.status !== "authenticated") {
|
|
20524
20524
|
return null;
|
|
20525
20525
|
}
|
|
20526
20526
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripSuppliersSection, { ...props });
|
|
20527
20527
|
}
|
|
20528
20528
|
function ReadyTripSuppliersSection({ tripRef, style }) {
|
|
20529
|
-
const { t } =
|
|
20530
|
-
const vendors =
|
|
20531
|
-
const seating =
|
|
20532
|
-
const itinerary =
|
|
20533
|
-
const expenses =
|
|
20529
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20530
|
+
const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
|
|
20531
|
+
const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
|
|
20532
|
+
const itinerary = chunkUSKVWPJD_cjs.useItinerary(tripRef);
|
|
20533
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
20534
20534
|
const [category, setCategory] = react.useState(null);
|
|
20535
20535
|
const [query, setQuery] = react.useState("");
|
|
20536
20536
|
const [sortKey, setSortKey] = react.useState("name");
|
|
@@ -20613,7 +20613,7 @@ function ReadyTripSuppliersSection({ tripRef, style }) {
|
|
|
20613
20613
|
return /* @__PURE__ */ jsxRuntime.jsx(SuppliersDark, { reason: vendors.reason });
|
|
20614
20614
|
}
|
|
20615
20615
|
const filtered = category !== null || query.trim() !== "";
|
|
20616
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style:
|
|
20616
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
20617
20617
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__toolbar", children: [
|
|
20618
20618
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-title", children: t("chrome.tripSuppliers.panelLabel") }),
|
|
20619
20619
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-spacer" }),
|
|
@@ -20752,7 +20752,7 @@ function AutoAssignDialog2({
|
|
|
20752
20752
|
onApply,
|
|
20753
20753
|
onClose
|
|
20754
20754
|
}) {
|
|
20755
|
-
const { t } =
|
|
20755
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20756
20756
|
const titleId = react.useId();
|
|
20757
20757
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
20758
20758
|
const [genderAdjacency, setGenderAdjacency] = react.useState("AVOID_UNRELATED");
|
|
@@ -20914,7 +20914,7 @@ function DayFilter({
|
|
|
20914
20914
|
countByDay,
|
|
20915
20915
|
onSelect
|
|
20916
20916
|
}) {
|
|
20917
|
-
const { t } =
|
|
20917
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20918
20918
|
const days = Array.from({ length: durationDays }, (_unused, index) => index);
|
|
20919
20919
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__days", children: [
|
|
20920
20920
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__days-label", children: t("chrome.tripVehicles.showDay") }),
|
|
@@ -21047,7 +21047,7 @@ function DeleteVehicleDialog({
|
|
|
21047
21047
|
onConfirm,
|
|
21048
21048
|
onClose
|
|
21049
21049
|
}) {
|
|
21050
|
-
const { t } =
|
|
21050
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21051
21051
|
const titleId = react.useId();
|
|
21052
21052
|
const released = occupantsOf(vehicle).length;
|
|
21053
21053
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21224,7 +21224,7 @@ function ManagerLinkDialog({
|
|
|
21224
21224
|
onClose,
|
|
21225
21225
|
onSubmit
|
|
21226
21226
|
}) {
|
|
21227
|
-
const { t } =
|
|
21227
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21228
21228
|
const titleId = react.useId();
|
|
21229
21229
|
const [chosen, setChosen] = react.useState(null);
|
|
21230
21230
|
const demotedFrom = chosen === null ? void 0 : managerVehicleByRef.get(chosen);
|
|
@@ -21301,7 +21301,7 @@ function UnassignedStrip2({
|
|
|
21301
21301
|
drag,
|
|
21302
21302
|
busy
|
|
21303
21303
|
}) {
|
|
21304
|
-
const { t } =
|
|
21304
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21305
21305
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21306
21306
|
"div",
|
|
21307
21307
|
{
|
|
@@ -21368,7 +21368,7 @@ function OccupantRoster({
|
|
|
21368
21368
|
variant,
|
|
21369
21369
|
emptyKey
|
|
21370
21370
|
}) {
|
|
21371
|
-
const { t } =
|
|
21371
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21372
21372
|
const target = { containerId: vehicleId, slotLabel: "" };
|
|
21373
21373
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === vehicleId && drag.overSlot.slotLabel === "";
|
|
21374
21374
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21412,7 +21412,7 @@ function OccupantRoster({
|
|
|
21412
21412
|
);
|
|
21413
21413
|
}
|
|
21414
21414
|
function SeatTile({ seat, vehicleId, drag, busy }) {
|
|
21415
|
-
const { t } =
|
|
21415
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21416
21416
|
const target = { containerId: vehicleId, slotLabel: seat.seatLabel };
|
|
21417
21417
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === target.containerId && drag.overSlot.slotLabel === target.slotLabel;
|
|
21418
21418
|
const occupant = seat.occupant;
|
|
@@ -21475,7 +21475,7 @@ function VehicleKebab({
|
|
|
21475
21475
|
onUnlinkManager,
|
|
21476
21476
|
onDelete
|
|
21477
21477
|
}) {
|
|
21478
|
-
const { t } =
|
|
21478
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21479
21479
|
const [open, setOpen] = react.useState(false);
|
|
21480
21480
|
const rootRef = react.useRef(null);
|
|
21481
21481
|
const triggerRef = react.useRef(null);
|
|
@@ -21585,7 +21585,7 @@ function VehicleCard({
|
|
|
21585
21585
|
onUnlinkManager,
|
|
21586
21586
|
onDelete
|
|
21587
21587
|
}) {
|
|
21588
|
-
const { t } =
|
|
21588
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21589
21589
|
const percent = fillPercent2(vehicle);
|
|
21590
21590
|
const days = daysLabel(vehicle.days);
|
|
21591
21591
|
const bodyId = `kf-vehicle-${vehicle.id}`;
|
|
@@ -21720,7 +21720,7 @@ function VehicleDaysDialog({
|
|
|
21720
21720
|
onClose,
|
|
21721
21721
|
onSubmit
|
|
21722
21722
|
}) {
|
|
21723
|
-
const { t } =
|
|
21723
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21724
21724
|
const titleId = react.useId();
|
|
21725
21725
|
const [selected, setSelected] = react.useState(vehicle.days);
|
|
21726
21726
|
const wholeTrip = selected.length === 0;
|
|
@@ -21819,7 +21819,7 @@ function VehicleFormDialog({
|
|
|
21819
21819
|
onClose,
|
|
21820
21820
|
onSubmit
|
|
21821
21821
|
}) {
|
|
21822
|
-
const { t } =
|
|
21822
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21823
21823
|
const titleId = react.useId();
|
|
21824
21824
|
const isEdit = vehicle !== null;
|
|
21825
21825
|
const [regNo, setRegNo] = react.useState(vehicle?.regNo ?? "");
|
|
@@ -22014,7 +22014,7 @@ function VehiclesSkeleton() {
|
|
|
22014
22014
|
] }, id)) });
|
|
22015
22015
|
}
|
|
22016
22016
|
function VehiclesEmpty({ onAddVehicle }) {
|
|
22017
|
-
const { t } =
|
|
22017
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22018
22018
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", children: [
|
|
22019
22019
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon2, {}) }),
|
|
22020
22020
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.emptyTitle") }),
|
|
@@ -22023,7 +22023,7 @@ function VehiclesEmpty({ onAddVehicle }) {
|
|
|
22023
22023
|
] });
|
|
22024
22024
|
}
|
|
22025
22025
|
function VehiclesFailed({ onRetry }) {
|
|
22026
|
-
const { t } =
|
|
22026
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22027
22027
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", role: "alert", children: [
|
|
22028
22028
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.failedTitle") }),
|
|
22029
22029
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-vehicles-section__state-body", children: t("chrome.tripVehicles.failedBody") }),
|
|
@@ -22031,7 +22031,7 @@ function VehiclesFailed({ onRetry }) {
|
|
|
22031
22031
|
] });
|
|
22032
22032
|
}
|
|
22033
22033
|
function VehiclesDark({ reason }) {
|
|
22034
|
-
const { t } =
|
|
22034
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22035
22035
|
if (reason === "mode") {
|
|
22036
22036
|
return null;
|
|
22037
22037
|
}
|
|
@@ -22050,7 +22050,7 @@ function codeOf10(error) {
|
|
|
22050
22050
|
return classification?.code ?? "unknown";
|
|
22051
22051
|
}
|
|
22052
22052
|
function TripVehiclesSection(props) {
|
|
22053
|
-
const session =
|
|
22053
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
22054
22054
|
if (session.status !== "authenticated") {
|
|
22055
22055
|
return null;
|
|
22056
22056
|
}
|
|
@@ -22061,9 +22061,9 @@ function ReadyTripVehiclesSection({
|
|
|
22061
22061
|
durationDays,
|
|
22062
22062
|
style
|
|
22063
22063
|
}) {
|
|
22064
|
-
const { t } =
|
|
22065
|
-
const seating =
|
|
22066
|
-
const managers =
|
|
22064
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22065
|
+
const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
|
|
22066
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
22067
22067
|
const [openVehicleId, setOpenVehicleId] = react.useState(null);
|
|
22068
22068
|
const [day, setDay] = react.useState(null);
|
|
22069
22069
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -22197,7 +22197,7 @@ function ReadyTripVehiclesSection({
|
|
|
22197
22197
|
return /* @__PURE__ */ jsxRuntime.jsx(VehiclesDark, { reason: seating.reason });
|
|
22198
22198
|
}
|
|
22199
22199
|
const pool = ready?.unassignedPool;
|
|
22200
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style:
|
|
22200
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
22201
22201
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__toolbar", children: [
|
|
22202
22202
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-title", children: t("chrome.tripVehicles.panelLabel") }),
|
|
22203
22203
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-spacer" }),
|
|
@@ -22490,7 +22490,7 @@ function WarningIcon13(props) {
|
|
|
22490
22490
|
|
|
22491
22491
|
// src/admin/composite/office/TripWorkspace/internal/panels/deriveCloseout.ts
|
|
22492
22492
|
function tabForBlocker(row) {
|
|
22493
|
-
return
|
|
22493
|
+
return chunkODH3SYYW_cjs.resolveBlockerDeepLink({ actionKey: row.actionKey })?.tab;
|
|
22494
22494
|
}
|
|
22495
22495
|
function orderedBlockers(rows) {
|
|
22496
22496
|
return [...rows].sort((a, b) => {
|
|
@@ -22530,8 +22530,8 @@ function codeOf11(error) {
|
|
|
22530
22530
|
return classification?.code ?? "unknown";
|
|
22531
22531
|
}
|
|
22532
22532
|
function CloseoutCard({ tripRef, onOpenTab, litTabs }) {
|
|
22533
|
-
const { t } =
|
|
22534
|
-
const closeout =
|
|
22533
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22534
|
+
const closeout = chunkUSKVWPJD_cjs.useCloseout(tripRef);
|
|
22535
22535
|
const [note, setNote] = react.useState(null);
|
|
22536
22536
|
const [pending, setPending] = react.useState(void 0);
|
|
22537
22537
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -22738,7 +22738,7 @@ function AssignManagerDialog({
|
|
|
22738
22738
|
onClose,
|
|
22739
22739
|
onAssign
|
|
22740
22740
|
}) {
|
|
22741
|
-
const { t } =
|
|
22741
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22742
22742
|
const titleId = react.useId();
|
|
22743
22743
|
const [query, setQuery] = react.useState("");
|
|
22744
22744
|
const [selected, setSelected] = react.useState(null);
|
|
@@ -22870,8 +22870,8 @@ var ROLE_LABEL_KEY = {
|
|
|
22870
22870
|
COORDINATOR: "chrome.tripWorkspace.managers.roleCoordinator"
|
|
22871
22871
|
};
|
|
22872
22872
|
function OverviewManagersCard({ trip, onChanged }) {
|
|
22873
|
-
const { t } =
|
|
22874
|
-
const { promoteManager, assignManager, unassignManager, makeManagersFetch } =
|
|
22873
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22874
|
+
const { promoteManager, assignManager, unassignManager, makeManagersFetch } = chunkODH3SYYW_cjs.useDirectories();
|
|
22875
22875
|
const [pendingId, setPendingId] = react.useState(void 0);
|
|
22876
22876
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
22877
22877
|
const [assignOpen, setAssignOpen] = react.useState(false);
|
|
@@ -23032,13 +23032,13 @@ function TripOverviewPanel({
|
|
|
23032
23032
|
onOpenTab,
|
|
23033
23033
|
onTripChanged
|
|
23034
23034
|
}) {
|
|
23035
|
-
const { t } =
|
|
23036
|
-
const today =
|
|
23037
|
-
const expenses =
|
|
23035
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23036
|
+
const today = chunkUSKVWPJD_cjs.useManagerToday(trip.ref);
|
|
23037
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(trip.ref);
|
|
23038
23038
|
const spendTotalMinor = expenses.status === "ready" && expenses.totals.loaded && !expenses.totals.lastFetchFailed ? expenses.totals.spendTotalMinor : void 0;
|
|
23039
23039
|
const finance = deriveFinance(trip, spendTotalMinor);
|
|
23040
23040
|
const quickActions = QUICK_ACTION_TABS.filter((key) => litTabs.has(key));
|
|
23041
|
-
const closeoutProbe =
|
|
23041
|
+
const closeoutProbe = chunkUSKVWPJD_cjs.useCloseout(trip.ref);
|
|
23042
23042
|
const closeoutStage = closeoutProbe.status === "ready" && hasReturned(closeoutProbe.aggregate) ? closeoutProbe.aggregate?.stage ?? null : null;
|
|
23043
23043
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview", children: [
|
|
23044
23044
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview-main", children: [
|
|
@@ -23077,7 +23077,7 @@ function TripOverviewPanel({
|
|
|
23077
23077
|
function TodayCard({
|
|
23078
23078
|
today
|
|
23079
23079
|
}) {
|
|
23080
|
-
const { t } =
|
|
23080
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23081
23081
|
if (today.kind === "idle") return null;
|
|
23082
23082
|
const openChecklist = today.checklist ?? [];
|
|
23083
23083
|
const itinerary = today.itinerary ?? [];
|
|
@@ -23101,7 +23101,7 @@ function TodayCard({
|
|
|
23101
23101
|
function FinanceCard({
|
|
23102
23102
|
finance
|
|
23103
23103
|
}) {
|
|
23104
|
-
const { t } =
|
|
23104
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23105
23105
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-workspace__card", children: [
|
|
23106
23106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__card-head", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-workspace__card-title", children: t("chrome.tripWorkspace.overview.financeTitle") }) }),
|
|
23107
23107
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__finance-body", children: [
|
|
@@ -23364,7 +23364,7 @@ var BLOCKER_BODY_KEY = {
|
|
|
23364
23364
|
capabilityDark: "chrome.tripWorkspace.blocker.capabilityDarkBody"
|
|
23365
23365
|
};
|
|
23366
23366
|
function TripTabPlaceholder({ tabKey, blocker }) {
|
|
23367
|
-
const { t } =
|
|
23367
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23368
23368
|
const label = t(TAB_LABEL_KEY[tabKey]);
|
|
23369
23369
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__placeholder", children: [
|
|
23370
23370
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-workspace__placeholder-glyph", children: blocker === "deferred" ? /* @__PURE__ */ jsxRuntime.jsx(ClockIcon2, {}) : /* @__PURE__ */ jsxRuntime.jsx(LockIcon11, {}) }),
|
|
@@ -23374,7 +23374,7 @@ function TripTabPlaceholder({ tabKey, blocker }) {
|
|
|
23374
23374
|
] });
|
|
23375
23375
|
}
|
|
23376
23376
|
function TripKpiStrip({ cells }) {
|
|
23377
|
-
const { t } =
|
|
23377
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23378
23378
|
if (cells.length === 0) return null;
|
|
23379
23379
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-strip", "data-columns": cells.length, children: cells.map((cell) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__kpi-card", children: [
|
|
23380
23380
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-label", children: t(cell.labelKey) }),
|
|
@@ -23383,7 +23383,7 @@ function TripKpiStrip({ cells }) {
|
|
|
23383
23383
|
] }, cell.key)) });
|
|
23384
23384
|
}
|
|
23385
23385
|
function TripTabRail({ tabs, activeKey, onSelect }) {
|
|
23386
|
-
const { t } =
|
|
23386
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23387
23387
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23388
23388
|
"div",
|
|
23389
23389
|
{
|
|
@@ -23417,7 +23417,7 @@ var STATUS_LABEL_KEY9 = {
|
|
|
23417
23417
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
23418
23418
|
};
|
|
23419
23419
|
function TripWorkspaceHead({ trip, onBack, style }) {
|
|
23420
|
-
const { t } =
|
|
23420
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23421
23421
|
const head = deriveTripHead(trip);
|
|
23422
23422
|
const subLabelParts = [
|
|
23423
23423
|
head.dateRangeLabel,
|
|
@@ -23428,7 +23428,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23428
23428
|
trip.manifestCount === 1 ? "chrome.tripWorkspace.travellerCountOne" : "chrome.tripWorkspace.travellerCount"
|
|
23429
23429
|
).replace("{count}", String(trip.manifestCount))
|
|
23430
23430
|
];
|
|
23431
|
-
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style:
|
|
23431
|
+
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__head-identity", children: [
|
|
23432
23432
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__eyebrow", children: [
|
|
23433
23433
|
onBack === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
23434
23434
|
"button",
|
|
@@ -23460,7 +23460,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23460
23460
|
] }) });
|
|
23461
23461
|
}
|
|
23462
23462
|
function TripWorkspace(props) {
|
|
23463
|
-
const session =
|
|
23463
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
23464
23464
|
if (session.status !== "authenticated") {
|
|
23465
23465
|
return /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {});
|
|
23466
23466
|
}
|
|
@@ -23475,10 +23475,10 @@ function ReadyTripWorkspace({
|
|
|
23475
23475
|
components,
|
|
23476
23476
|
style
|
|
23477
23477
|
}) {
|
|
23478
|
-
const { t } =
|
|
23479
|
-
const { read, readFailed, refresh } =
|
|
23478
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23479
|
+
const { read, readFailed, refresh } = chunkODH3SYYW_cjs.useAgencyTrip(tripRef);
|
|
23480
23480
|
if (readFailed) {
|
|
23481
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style:
|
|
23481
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__status-block", role: "alert", children: [
|
|
23482
23482
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon13, { className: "kf-trip-workspace__status-icon" }),
|
|
23483
23483
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-title", children: t("chrome.tripWorkspace.errorTitle") }),
|
|
23484
23484
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-body", children: t("chrome.tripWorkspace.errorBody") }),
|
|
@@ -23494,7 +23494,7 @@ function ReadyTripWorkspace({
|
|
|
23494
23494
|
] }) });
|
|
23495
23495
|
}
|
|
23496
23496
|
if (read === void 0) {
|
|
23497
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style:
|
|
23497
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {}) });
|
|
23498
23498
|
}
|
|
23499
23499
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23500
23500
|
TripWorkspaceBody,
|
|
@@ -23522,7 +23522,7 @@ function TripWorkspaceBody({
|
|
|
23522
23522
|
components,
|
|
23523
23523
|
style
|
|
23524
23524
|
}) {
|
|
23525
|
-
const { statuses, loaded } =
|
|
23525
|
+
const { statuses, loaded } = chunkODH3SYYW_cjs.useCapabilityStatuses(tripRef);
|
|
23526
23526
|
const Head = components?.TripWorkspaceHead ?? TripWorkspaceHead;
|
|
23527
23527
|
const tabs = react.useMemo(() => resolveTripTabs(trip.eventType, statuses), [trip.eventType, statuses]);
|
|
23528
23528
|
const [requestedTab, setRequestedTab] = react.useState(initialTab ?? "overview");
|
|
@@ -23606,7 +23606,7 @@ function TripWorkspaceBody({
|
|
|
23606
23606
|
}),
|
|
23607
23607
|
[trip, litTabs, tripRef, onTripChanged, onOpenTravellerProfile]
|
|
23608
23608
|
);
|
|
23609
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style:
|
|
23609
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
23610
23610
|
/* @__PURE__ */ jsxRuntime.jsx(Head, { trip, ...onBack !== void 0 ? { onBack } : {} }),
|
|
23611
23611
|
/* @__PURE__ */ jsxRuntime.jsx(TripKpiStrip, { cells: kpis }),
|
|
23612
23612
|
loaded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -23803,7 +23803,7 @@ function AdminShell({
|
|
|
23803
23803
|
function renderNavIcon(iconKey) {
|
|
23804
23804
|
return NavIcon !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavIcon, { iconKey }) : navIcon(iconKey);
|
|
23805
23805
|
}
|
|
23806
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style:
|
|
23806
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
|
|
23807
23807
|
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "kf-admin-shell__sidebar", children: [
|
|
23808
23808
|
brand !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell__brand", children: [
|
|
23809
23809
|
brand.logo !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shell__brand-logo", children: brand.logo }) : null,
|
|
@@ -23907,7 +23907,7 @@ function AdminShell({
|
|
|
23907
23907
|
] });
|
|
23908
23908
|
}
|
|
23909
23909
|
function KaafilAgencyWorkspace(props) {
|
|
23910
|
-
const session =
|
|
23910
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
23911
23911
|
if (session.status !== "authenticated") {
|
|
23912
23912
|
return null;
|
|
23913
23913
|
}
|
|
@@ -23932,8 +23932,8 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
23932
23932
|
components,
|
|
23933
23933
|
style
|
|
23934
23934
|
} = props;
|
|
23935
|
-
const { t } =
|
|
23936
|
-
const agencyAdminMe =
|
|
23935
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23936
|
+
const agencyAdminMe = chunkODH3SYYW_cjs.useAgencyAdminMe();
|
|
23937
23937
|
const [internalPane, setInternalPane] = react.useState(
|
|
23938
23938
|
initialPane ?? "trips"
|
|
23939
23939
|
);
|
|
@@ -24194,27 +24194,27 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
24194
24194
|
|
|
24195
24195
|
Object.defineProperty(exports, "BootErrorScreen", {
|
|
24196
24196
|
enumerable: true,
|
|
24197
|
-
get: function () { return
|
|
24197
|
+
get: function () { return chunkT5JYKERY_cjs.BootErrorScreen; }
|
|
24198
24198
|
});
|
|
24199
24199
|
Object.defineProperty(exports, "LockedTripScreen", {
|
|
24200
24200
|
enumerable: true,
|
|
24201
|
-
get: function () { return
|
|
24201
|
+
get: function () { return chunkT5JYKERY_cjs.LockedTripScreen; }
|
|
24202
24202
|
});
|
|
24203
24203
|
Object.defineProperty(exports, "NotFoundScreen", {
|
|
24204
24204
|
enumerable: true,
|
|
24205
|
-
get: function () { return
|
|
24205
|
+
get: function () { return chunkT5JYKERY_cjs.NotFoundScreen; }
|
|
24206
24206
|
});
|
|
24207
24207
|
Object.defineProperty(exports, "OfflineFallbackScreen", {
|
|
24208
24208
|
enumerable: true,
|
|
24209
|
-
get: function () { return
|
|
24209
|
+
get: function () { return chunkT5JYKERY_cjs.OfflineFallbackScreen; }
|
|
24210
24210
|
});
|
|
24211
24211
|
Object.defineProperty(exports, "PlanLockedScreen", {
|
|
24212
24212
|
enumerable: true,
|
|
24213
|
-
get: function () { return
|
|
24213
|
+
get: function () { return chunkT5JYKERY_cjs.PlanLockedScreen; }
|
|
24214
24214
|
});
|
|
24215
24215
|
Object.defineProperty(exports, "SessionExpiredScreen", {
|
|
24216
24216
|
enumerable: true,
|
|
24217
|
-
get: function () { return
|
|
24217
|
+
get: function () { return chunkT5JYKERY_cjs.SessionExpiredScreen; }
|
|
24218
24218
|
});
|
|
24219
24219
|
exports.AdminShell = AdminShell;
|
|
24220
24220
|
exports.AgencySettingsScreen = AgencySettingsScreen;
|