kaafil-react-uikit 0.11.1 → 0.11.3
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 +55 -0
- package/dist/admin/index.cjs +373 -365
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +17 -9
- package/dist/admin/index.js.map +1 -1
- package/dist/{chunk-4WXIR6FD.js → chunk-4U5VHQDT.js} +5 -5
- package/dist/{chunk-4WXIR6FD.js.map → chunk-4U5VHQDT.js.map} +1 -1
- package/dist/{chunk-4TTDAOOG.cjs → chunk-5ORJRFXZ.cjs} +30 -3
- package/dist/chunk-5ORJRFXZ.cjs.map +1 -0
- package/dist/{chunk-RK3CWJ56.js → chunk-63JQKLMH.js} +3 -3
- package/dist/{chunk-RK3CWJ56.js.map → chunk-63JQKLMH.js.map} +1 -1
- package/dist/{chunk-W63ZEIC2.cjs → chunk-6QSHORU3.cjs} +17 -17
- package/dist/{chunk-W63ZEIC2.cjs.map → chunk-6QSHORU3.cjs.map} +1 -1
- package/dist/{chunk-HC4PLK4E.js → chunk-F2ENMVT7.js} +3 -3
- package/dist/{chunk-HC4PLK4E.js.map → chunk-F2ENMVT7.js.map} +1 -1
- package/dist/{chunk-DTVRWYVN.js → chunk-LJO2FGFD.js} +5 -5
- package/dist/{chunk-DTVRWYVN.js.map → chunk-LJO2FGFD.js.map} +1 -1
- package/dist/{chunk-EGEVXI5K.js → chunk-LOLQNRIK.js} +3 -3
- package/dist/{chunk-EGEVXI5K.js.map → chunk-LOLQNRIK.js.map} +1 -1
- package/dist/{chunk-KY752BBA.cjs → chunk-ODH3SYYW.cjs} +55 -55
- package/dist/{chunk-KY752BBA.cjs.map → chunk-ODH3SYYW.cjs.map} +1 -1
- package/dist/{chunk-VWFNUQDH.js → chunk-RCWSMWQD.js} +3 -3
- package/dist/{chunk-VWFNUQDH.js.map → chunk-RCWSMWQD.js.map} +1 -1
- package/dist/{chunk-UG4Z23IJ.cjs → chunk-T5JYKERY.cjs} +12 -12
- package/dist/{chunk-UG4Z23IJ.cjs.map → chunk-T5JYKERY.cjs.map} +1 -1
- package/dist/{chunk-F6SN6CEC.js → chunk-U6IE2UYL.js} +3 -3
- package/dist/{chunk-F6SN6CEC.js.map → chunk-U6IE2UYL.js.map} +1 -1
- package/dist/{chunk-2JNB5A6Z.cjs → chunk-USKVWPJD.cjs} +83 -83
- package/dist/{chunk-2JNB5A6Z.cjs.map → chunk-USKVWPJD.cjs.map} +1 -1
- package/dist/{chunk-DRUTYOTN.cjs → chunk-VHBGE4BY.cjs} +4 -4
- package/dist/{chunk-DRUTYOTN.cjs.map → chunk-VHBGE4BY.cjs.map} +1 -1
- package/dist/{chunk-6MD4QTZZ.cjs → chunk-XWU5MCY3.cjs} +9 -9
- package/dist/{chunk-6MD4QTZZ.cjs.map → chunk-XWU5MCY3.cjs.map} +1 -1
- package/dist/{chunk-7CLYTDSC.js → chunk-YJJ4DI42.js} +30 -3
- package/dist/chunk-YJJ4DI42.js.map +1 -0
- package/dist/chunk-YKBA4WQJ.cjs +12 -0
- package/dist/{chunk-PMXQQFQN.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 +1 -1
- package/dist/chunk-4TTDAOOG.cjs.map +0 -1
- package/dist/chunk-7CLYTDSC.js.map +0 -1
- package/dist/chunk-PMXQQFQN.cjs +0 -12
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();
|
|
@@ -10079,19 +10079,22 @@ function UploadDialog({
|
|
|
10079
10079
|
}
|
|
10080
10080
|
function WithdrawDialog({
|
|
10081
10081
|
documentName,
|
|
10082
|
+
unconfirmed,
|
|
10082
10083
|
busy,
|
|
10083
10084
|
failed,
|
|
10084
10085
|
onClose,
|
|
10085
10086
|
onConfirm
|
|
10086
10087
|
}) {
|
|
10087
|
-
const { t } =
|
|
10088
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10088
10089
|
const titleId = react.useId();
|
|
10089
10090
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10090
10091
|
SheetDialog,
|
|
10091
10092
|
{
|
|
10092
10093
|
titleId,
|
|
10093
10094
|
eyebrow: t("chrome.tripDocuments.withdraw"),
|
|
10094
|
-
title: t(
|
|
10095
|
+
title: t(
|
|
10096
|
+
unconfirmed ? "chrome.tripDocuments.withdrawTitleUnconfirmed" : "chrome.tripDocuments.withdrawTitle"
|
|
10097
|
+
),
|
|
10095
10098
|
onClose,
|
|
10096
10099
|
closeLabel: t("chrome.tripDocuments.withdrawCancel"),
|
|
10097
10100
|
footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -10113,32 +10116,36 @@ function WithdrawDialog({
|
|
|
10113
10116
|
"data-destructive": "true",
|
|
10114
10117
|
onClick: onConfirm,
|
|
10115
10118
|
disabled: busy,
|
|
10116
|
-
children: t(
|
|
10119
|
+
children: t(
|
|
10120
|
+
busy ? "chrome.tripDocuments.withdrawing" : unconfirmed ? "chrome.tripDocuments.withdrawConfirmUnconfirmed" : "chrome.tripDocuments.withdrawConfirm"
|
|
10121
|
+
)
|
|
10117
10122
|
}
|
|
10118
10123
|
)
|
|
10119
10124
|
] }),
|
|
10120
10125
|
children: [
|
|
10121
10126
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__withdraw-name", children: documentName }),
|
|
10122
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__withdraw-body", children: t(
|
|
10127
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__withdraw-body", children: t(
|
|
10128
|
+
unconfirmed ? "chrome.tripDocuments.withdrawBodyUnconfirmed" : "chrome.tripDocuments.withdrawBody"
|
|
10129
|
+
) }),
|
|
10123
10130
|
failed ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__error", role: "alert", children: t("chrome.tripDocuments.withdrawFailed") }) : null
|
|
10124
10131
|
]
|
|
10125
10132
|
}
|
|
10126
10133
|
);
|
|
10127
10134
|
}
|
|
10128
10135
|
function TripDocumentsSection(props) {
|
|
10129
|
-
const session =
|
|
10136
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
10130
10137
|
if (session.status !== "authenticated") {
|
|
10131
10138
|
return null;
|
|
10132
10139
|
}
|
|
10133
10140
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripDocumentsSection, { ...props });
|
|
10134
10141
|
}
|
|
10135
10142
|
function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
10136
|
-
const { t } =
|
|
10137
|
-
const files =
|
|
10138
|
-
const expenses =
|
|
10139
|
-
const bookings =
|
|
10140
|
-
const { listTripManifest } =
|
|
10141
|
-
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);
|
|
10142
10149
|
const capability = statuses.get("files");
|
|
10143
10150
|
const [state, setState] = react.useState({ kind: "loading" });
|
|
10144
10151
|
const [purpose, setPurpose] = react.useState(null);
|
|
@@ -10305,7 +10312,7 @@ function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
|
10305
10312
|
if (capabilityLoaded && capability === "mode-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "mode" });
|
|
10306
10313
|
if (capabilityLoaded && capability === "flag-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "flag" });
|
|
10307
10314
|
if (capabilityLoaded && capability === "data-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "data" });
|
|
10308
|
-
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: [
|
|
10309
10316
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head", children: [
|
|
10310
10317
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head-text", children: [
|
|
10311
10318
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-documents-section__title", children: t("chrome.tripDocuments.panelLabel") }),
|
|
@@ -10349,7 +10356,7 @@ function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
|
10349
10356
|
{
|
|
10350
10357
|
row,
|
|
10351
10358
|
onOpen: () => setOpen(row),
|
|
10352
|
-
onWithdraw: row.file.purpose === "trip_document"
|
|
10359
|
+
onWithdraw: row.file.status === "purged" ? void 0 : row.file.purpose === "trip_document" || row.file.status === "pending" || row.file.status === "orphaned" ? () => {
|
|
10353
10360
|
setWithdrawFailed(false);
|
|
10354
10361
|
setWithdrawRow(row);
|
|
10355
10362
|
} : void 0,
|
|
@@ -10364,6 +10371,7 @@ function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
|
10364
10371
|
WithdrawDialog,
|
|
10365
10372
|
{
|
|
10366
10373
|
documentName: withdrawRow.file.title !== null && withdrawRow.file.title !== "" ? withdrawRow.file.title : t("chrome.tripDocuments.chipTripDocuments"),
|
|
10374
|
+
unconfirmed: withdrawRow.file.status === "pending" || withdrawRow.file.status === "orphaned",
|
|
10367
10375
|
busy: withdrawingId === withdrawRow.file.id,
|
|
10368
10376
|
failed: withdrawFailed,
|
|
10369
10377
|
onClose: () => setWithdrawRow(null),
|
|
@@ -10616,7 +10624,7 @@ function ExpensesSkeleton() {
|
|
|
10616
10624
|
] }, id)) });
|
|
10617
10625
|
}
|
|
10618
10626
|
function ExpensesEmpty({ onLog }) {
|
|
10619
|
-
const { t } =
|
|
10627
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10620
10628
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", children: [
|
|
10621
10629
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(WalletIcon, {}) }),
|
|
10622
10630
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.emptyTitle") }),
|
|
@@ -10625,7 +10633,7 @@ function ExpensesEmpty({ onLog }) {
|
|
|
10625
10633
|
] });
|
|
10626
10634
|
}
|
|
10627
10635
|
function ExpensesFailed({ onRetry }) {
|
|
10628
|
-
const { t } =
|
|
10636
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10629
10637
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", role: "alert", children: [
|
|
10630
10638
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.failedTitle") }),
|
|
10631
10639
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-expenses-section__state-body", children: t("chrome.tripExpenses.failedBody") }),
|
|
@@ -10633,7 +10641,7 @@ function ExpensesFailed({ onRetry }) {
|
|
|
10633
10641
|
] });
|
|
10634
10642
|
}
|
|
10635
10643
|
function ExpensesDark({ reason }) {
|
|
10636
|
-
const { t } =
|
|
10644
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10637
10645
|
if (reason === "mode") {
|
|
10638
10646
|
return null;
|
|
10639
10647
|
}
|
|
@@ -10654,7 +10662,7 @@ function ExpensesTable({
|
|
|
10654
10662
|
onVoid,
|
|
10655
10663
|
onViewReceipt
|
|
10656
10664
|
}) {
|
|
10657
|
-
const { t } =
|
|
10665
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10658
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: [
|
|
10659
10667
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripExpenses.tableCaption") }),
|
|
10660
10668
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -10714,7 +10722,7 @@ function LogExpenseDialog({
|
|
|
10714
10722
|
onClose,
|
|
10715
10723
|
onSubmit
|
|
10716
10724
|
}) {
|
|
10717
|
-
const { t } =
|
|
10725
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10718
10726
|
const titleId = react.useId();
|
|
10719
10727
|
const [category, setCategory] = react.useState("MISC");
|
|
10720
10728
|
const [amount, setAmount] = react.useState("");
|
|
@@ -10877,9 +10885,9 @@ function ReceiptDialog({
|
|
|
10877
10885
|
description,
|
|
10878
10886
|
onClose
|
|
10879
10887
|
}) {
|
|
10880
|
-
const { t } =
|
|
10888
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10881
10889
|
const titleId = react.useId();
|
|
10882
|
-
const files =
|
|
10890
|
+
const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
|
|
10883
10891
|
const [phase, setPhase] = react.useState({ kind: "loading" });
|
|
10884
10892
|
const [imageBroke, setImageBroke] = react.useState(false);
|
|
10885
10893
|
const readUrl = files.url;
|
|
@@ -10953,7 +10961,7 @@ function VoidExpenseDialog({
|
|
|
10953
10961
|
onClose,
|
|
10954
10962
|
onSubmit
|
|
10955
10963
|
}) {
|
|
10956
|
-
const { t } =
|
|
10964
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
10957
10965
|
const titleId = react.useId();
|
|
10958
10966
|
const [reason, setReason] = react.useState("");
|
|
10959
10967
|
const trimmed = reason.trim();
|
|
@@ -11027,16 +11035,16 @@ function isCloseoutLocked2(error) {
|
|
|
11027
11035
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
11028
11036
|
}
|
|
11029
11037
|
function TripExpensesSection(props) {
|
|
11030
|
-
const session =
|
|
11038
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
11031
11039
|
if (session.status !== "authenticated") {
|
|
11032
11040
|
return null;
|
|
11033
11041
|
}
|
|
11034
11042
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripExpensesSection, { ...props });
|
|
11035
11043
|
}
|
|
11036
11044
|
function ReadyTripExpensesSection({ tripRef, style }) {
|
|
11037
|
-
const { t } =
|
|
11038
|
-
const expenses =
|
|
11039
|
-
const vendors =
|
|
11045
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11046
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
|
|
11047
|
+
const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
|
|
11040
11048
|
const [category, setCategory] = react.useState(null);
|
|
11041
11049
|
const [paymentMode, setPaymentMode] = react.useState(null);
|
|
11042
11050
|
const [missingReceiptOnly, setMissingReceiptOnly] = react.useState(false);
|
|
@@ -11105,7 +11113,7 @@ function ReadyTripExpensesSection({ tripRef, style }) {
|
|
|
11105
11113
|
return /* @__PURE__ */ jsxRuntime.jsx(ExpensesDark, { reason: expenses.reason });
|
|
11106
11114
|
}
|
|
11107
11115
|
const filtered = category !== null || paymentMode !== null || missingReceiptOnly;
|
|
11108
|
-
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: [
|
|
11109
11117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__toolbar", children: [
|
|
11110
11118
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-title", children: t("chrome.tripExpenses.panelLabel") }),
|
|
11111
11119
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-spacer" }),
|
|
@@ -11385,7 +11393,7 @@ function FloatMovementDialog({
|
|
|
11385
11393
|
onClose,
|
|
11386
11394
|
onSubmit
|
|
11387
11395
|
}) {
|
|
11388
|
-
const { t } =
|
|
11396
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11389
11397
|
const titleId = react.useId();
|
|
11390
11398
|
const [managerId, setManagerId] = react.useState(manager?.managerId ?? null);
|
|
11391
11399
|
const [amount, setAmount] = react.useState(
|
|
@@ -11618,7 +11626,7 @@ function FloatSkeleton() {
|
|
|
11618
11626
|
] }, id)) });
|
|
11619
11627
|
}
|
|
11620
11628
|
function FloatEmpty({ onIssue }) {
|
|
11621
|
-
const { t } =
|
|
11629
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11622
11630
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", children: [
|
|
11623
11631
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(SafeIcon, {}) }),
|
|
11624
11632
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.emptyTitle") }),
|
|
@@ -11627,7 +11635,7 @@ function FloatEmpty({ onIssue }) {
|
|
|
11627
11635
|
] });
|
|
11628
11636
|
}
|
|
11629
11637
|
function FloatFailed({ onRetry }) {
|
|
11630
|
-
const { t } =
|
|
11638
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11631
11639
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", role: "alert", children: [
|
|
11632
11640
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.failedTitle") }),
|
|
11633
11641
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-float-section__state-body", children: t("chrome.tripFloat.failedBody") }),
|
|
@@ -11635,7 +11643,7 @@ function FloatFailed({ onRetry }) {
|
|
|
11635
11643
|
] });
|
|
11636
11644
|
}
|
|
11637
11645
|
function FloatDark({ reason }) {
|
|
11638
|
-
const { t } =
|
|
11646
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11639
11647
|
if (reason === "mode") {
|
|
11640
11648
|
return null;
|
|
11641
11649
|
}
|
|
@@ -11658,7 +11666,7 @@ function ManagerFloatCard({
|
|
|
11658
11666
|
onAdjust,
|
|
11659
11667
|
onSettle
|
|
11660
11668
|
}) {
|
|
11661
|
-
const { t } =
|
|
11669
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11662
11670
|
const bodyId = `kf-float-${row.managerId}`;
|
|
11663
11671
|
const summary = row.summary;
|
|
11664
11672
|
const shares = summary === void 0 ? void 0 : usageShares(summary);
|
|
@@ -11864,16 +11872,16 @@ function refusedBalanceOf(error) {
|
|
|
11864
11872
|
return details?.currentBalanceMinor;
|
|
11865
11873
|
}
|
|
11866
11874
|
function TripFloatSection(props) {
|
|
11867
|
-
const session =
|
|
11875
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
11868
11876
|
if (session.status !== "authenticated") {
|
|
11869
11877
|
return null;
|
|
11870
11878
|
}
|
|
11871
11879
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripFloatSection, { ...props });
|
|
11872
11880
|
}
|
|
11873
11881
|
function ReadyTripFloatSection({ tripRef, style }) {
|
|
11874
|
-
const { t } =
|
|
11875
|
-
const float =
|
|
11876
|
-
const managers =
|
|
11882
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
11883
|
+
const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
|
|
11884
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
11877
11885
|
const [openManagerId, setOpenManagerId] = react.useState(null);
|
|
11878
11886
|
const [ledgers, setLedgers] = react.useState({});
|
|
11879
11887
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -11999,7 +12007,7 @@ function ReadyTripFloatSection({ tripRef, style }) {
|
|
|
11999
12007
|
if (float.status === "dark") {
|
|
12000
12008
|
return /* @__PURE__ */ jsxRuntime.jsx(FloatDark, { reason: float.reason });
|
|
12001
12009
|
}
|
|
12002
|
-
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: [
|
|
12003
12011
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__toolbar", children: [
|
|
12004
12012
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-title", children: t("chrome.tripFloat.panelLabel") }),
|
|
12005
12013
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-spacer" }),
|
|
@@ -12114,7 +12122,7 @@ function DispatchDialog({
|
|
|
12114
12122
|
onClose,
|
|
12115
12123
|
onSend
|
|
12116
12124
|
}) {
|
|
12117
|
-
const { t } =
|
|
12125
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12118
12126
|
const titleId = react.useId();
|
|
12119
12127
|
const [everyone, setEveryone] = react.useState(true);
|
|
12120
12128
|
const [picked, setPicked] = react.useState(/* @__PURE__ */ new Set());
|
|
@@ -12262,7 +12270,7 @@ function FormRow2({
|
|
|
12262
12270
|
onExport,
|
|
12263
12271
|
onOpenMissing
|
|
12264
12272
|
}) {
|
|
12265
|
-
const { t } =
|
|
12273
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12266
12274
|
const canSeeMissing = supportsWhoIsMissing(form);
|
|
12267
12275
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", children: [
|
|
12268
12276
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-trip-forms-section__row-body", children: [
|
|
@@ -12315,14 +12323,14 @@ function FormsSkeleton() {
|
|
|
12315
12323
|
] }, id)) });
|
|
12316
12324
|
}
|
|
12317
12325
|
function FormsEmpty() {
|
|
12318
|
-
const { t } =
|
|
12326
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12319
12327
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", children: [
|
|
12320
12328
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.emptyTitle") }),
|
|
12321
12329
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.emptyBody") })
|
|
12322
12330
|
] });
|
|
12323
12331
|
}
|
|
12324
12332
|
function FormsFailed({ onRetry }) {
|
|
12325
|
-
const { t } =
|
|
12333
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12326
12334
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", role: "alert", children: [
|
|
12327
12335
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.failedTitle") }),
|
|
12328
12336
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.failedBody") }),
|
|
@@ -12330,7 +12338,7 @@ function FormsFailed({ onRetry }) {
|
|
|
12330
12338
|
] });
|
|
12331
12339
|
}
|
|
12332
12340
|
function FormsDark({ reason }) {
|
|
12333
|
-
const { t } =
|
|
12341
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12334
12342
|
if (reason === "mode") return null;
|
|
12335
12343
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", "data-dark": reason, children: [
|
|
12336
12344
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t(reason === "flag" ? "chrome.tripForms.flagDarkTitle" : "chrome.tripForms.dataDarkTitle") }),
|
|
@@ -12375,7 +12383,7 @@ function OnBehalfDialog({
|
|
|
12375
12383
|
onClose,
|
|
12376
12384
|
onSubmit
|
|
12377
12385
|
}) {
|
|
12378
|
-
const { t } =
|
|
12386
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12379
12387
|
const titleId = react.useId();
|
|
12380
12388
|
const [values, setValues] = react.useState({});
|
|
12381
12389
|
const answerable = react.useMemo(
|
|
@@ -12513,7 +12521,7 @@ function ParticipantRow({
|
|
|
12513
12521
|
onFillOnBehalf,
|
|
12514
12522
|
onOpenResponse
|
|
12515
12523
|
}) {
|
|
12516
|
-
const { t } =
|
|
12524
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12517
12525
|
const status = row.response?.status;
|
|
12518
12526
|
const submitted = status === "SUBMITTED";
|
|
12519
12527
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", "data-done": submitted ? "true" : void 0, children: [
|
|
@@ -12566,7 +12574,7 @@ function ResponseViewer({
|
|
|
12566
12574
|
failed,
|
|
12567
12575
|
onClose
|
|
12568
12576
|
}) {
|
|
12569
|
-
const { t } =
|
|
12577
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12570
12578
|
const titleId = react.useId();
|
|
12571
12579
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12572
12580
|
SheetDialog,
|
|
@@ -12597,7 +12605,7 @@ function codeOf4(error) {
|
|
|
12597
12605
|
return classification?.code ?? "unknown";
|
|
12598
12606
|
}
|
|
12599
12607
|
function TripFormsSection(props) {
|
|
12600
|
-
const session =
|
|
12608
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
12601
12609
|
if (session.status !== "authenticated") {
|
|
12602
12610
|
return null;
|
|
12603
12611
|
}
|
|
@@ -12609,9 +12617,9 @@ function ReadyTripFormsSection({
|
|
|
12609
12617
|
components,
|
|
12610
12618
|
style
|
|
12611
12619
|
}) {
|
|
12612
|
-
const { t } =
|
|
12613
|
-
const forms =
|
|
12614
|
-
const { listTripManifest } =
|
|
12620
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12621
|
+
const forms = chunkUSKVWPJD_cjs.useForms(tripRef);
|
|
12622
|
+
const { listTripManifest } = chunkODH3SYYW_cjs.useDirectories();
|
|
12615
12623
|
const [openFormId, setOpenFormId] = react.useState(null);
|
|
12616
12624
|
const [completion, setCompletion] = react.useState(void 0);
|
|
12617
12625
|
const [manifest, setManifest] = react.useState(void 0);
|
|
@@ -12733,7 +12741,7 @@ function ReadyTripFormsSection({
|
|
|
12733
12741
|
if (forms.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(FormsDark, { reason: forms.reason });
|
|
12734
12742
|
const inert = readOnly;
|
|
12735
12743
|
const unreadable = ready !== null && ready.syncedAt === void 0 && rows.length === 0;
|
|
12736
|
-
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: [
|
|
12737
12745
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head", children: [
|
|
12738
12746
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head-text", children: [
|
|
12739
12747
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-forms-section__title", children: openForm === null ? t("chrome.tripForms.panelLabel") : openForm.title }),
|
|
@@ -12883,7 +12891,7 @@ function ChangeLogDialog({
|
|
|
12883
12891
|
onRetry,
|
|
12884
12892
|
onClose
|
|
12885
12893
|
}) {
|
|
12886
|
-
const { t } =
|
|
12894
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
12887
12895
|
const titleId = react.useId();
|
|
12888
12896
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12889
12897
|
SheetDialog,
|
|
@@ -13230,7 +13238,7 @@ function ItemRow({
|
|
|
13230
13238
|
onMoveBy,
|
|
13231
13239
|
onOpenVendor
|
|
13232
13240
|
}) {
|
|
13233
|
-
const { t } =
|
|
13241
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13234
13242
|
const derived = deriveItineraryItem(item, timeZone, serverTime);
|
|
13235
13243
|
const isDone = item.status === "COMPLETED";
|
|
13236
13244
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13352,7 +13360,7 @@ function DayCard({
|
|
|
13352
13360
|
onSwitchToTimeline,
|
|
13353
13361
|
onOpenVendor
|
|
13354
13362
|
}) {
|
|
13355
|
-
const { t } =
|
|
13363
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13356
13364
|
const { draggingId, overIndex, rowProps, moveBy } = useListReorder({
|
|
13357
13365
|
enabled: canEdit,
|
|
13358
13366
|
onMove: onReorder
|
|
@@ -13403,7 +13411,7 @@ function DayCard({
|
|
|
13403
13411
|
] });
|
|
13404
13412
|
}
|
|
13405
13413
|
function DayPillStrip({ pills, activeIso, onSelect }) {
|
|
13406
|
-
const { t } =
|
|
13414
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13407
13415
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13408
13416
|
"div",
|
|
13409
13417
|
{
|
|
@@ -13480,7 +13488,7 @@ function EditDayDialog({
|
|
|
13480
13488
|
onClose,
|
|
13481
13489
|
onSubmit
|
|
13482
13490
|
}) {
|
|
13483
|
-
const { t } =
|
|
13491
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13484
13492
|
const titleId = react.useId();
|
|
13485
13493
|
const [cardTitle, setCardTitle] = react.useState(group.day.cardTitle);
|
|
13486
13494
|
const [hasSummary, setHasSummary] = react.useState(
|
|
@@ -13623,7 +13631,7 @@ function ItemFormDialog({
|
|
|
13623
13631
|
onSubmit,
|
|
13624
13632
|
onDelete
|
|
13625
13633
|
}) {
|
|
13626
|
-
const { t } =
|
|
13634
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13627
13635
|
const titleId = react.useId();
|
|
13628
13636
|
const isEdit = item !== null;
|
|
13629
13637
|
const [isoDate, setIsoDate] = react.useState(
|
|
@@ -13878,7 +13886,7 @@ function ItinerarySkeleton({ view }) {
|
|
|
13878
13886
|
] });
|
|
13879
13887
|
}
|
|
13880
13888
|
function ItineraryEmpty() {
|
|
13881
|
-
const { t } =
|
|
13889
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13882
13890
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", children: [
|
|
13883
13891
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}) }),
|
|
13884
13892
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.emptyTitle") }),
|
|
@@ -13886,7 +13894,7 @@ function ItineraryEmpty() {
|
|
|
13886
13894
|
] });
|
|
13887
13895
|
}
|
|
13888
13896
|
function ItineraryFailed({ onRetry }) {
|
|
13889
|
-
const { t } =
|
|
13897
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13890
13898
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", role: "alert", children: [
|
|
13891
13899
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.failedTitle") }),
|
|
13892
13900
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-itinerary-section__state-body", children: t("chrome.tripItinerary.failedBody") }),
|
|
@@ -13894,7 +13902,7 @@ function ItineraryFailed({ onRetry }) {
|
|
|
13894
13902
|
] });
|
|
13895
13903
|
}
|
|
13896
13904
|
function TimelineView({ entries, onOpenDay }) {
|
|
13897
|
-
const { t } =
|
|
13905
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13898
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: [
|
|
13899
13907
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__timeline-line", "aria-hidden": "true" }),
|
|
13900
13908
|
entries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13981,7 +13989,7 @@ var OPTIONS2 = [
|
|
|
13981
13989
|
{ value: "timeline", labelKey: "chrome.tripItinerary.viewTimeline" }
|
|
13982
13990
|
];
|
|
13983
13991
|
function ViewSegment({ value, onChange }) {
|
|
13984
|
-
const { t } =
|
|
13992
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
13985
13993
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-itinerary-section__segment", children: [
|
|
13986
13994
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripItinerary.viewLabel") }),
|
|
13987
13995
|
OPTIONS2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14003,7 +14011,7 @@ function codeOf5(error) {
|
|
|
14003
14011
|
return classification?.code ?? "unknown";
|
|
14004
14012
|
}
|
|
14005
14013
|
function TripItinerarySection(props) {
|
|
14006
|
-
const session =
|
|
14014
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
14007
14015
|
if (session.status !== "authenticated") {
|
|
14008
14016
|
return null;
|
|
14009
14017
|
}
|
|
@@ -14014,8 +14022,8 @@ function ReadyTripItinerarySection({
|
|
|
14014
14022
|
onOpenVendor,
|
|
14015
14023
|
style
|
|
14016
14024
|
}) {
|
|
14017
|
-
const { t } =
|
|
14018
|
-
const itinerary =
|
|
14025
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14026
|
+
const itinerary = chunkUSKVWPJD_cjs.useItinerary(tripRef);
|
|
14019
14027
|
const [view, setView] = react.useState("days");
|
|
14020
14028
|
const [activeIso, setActiveIso] = react.useState(null);
|
|
14021
14029
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -14188,7 +14196,7 @@ function ReadyTripItinerarySection({
|
|
|
14188
14196
|
setActiveIso(isoDate);
|
|
14189
14197
|
setView("days");
|
|
14190
14198
|
}
|
|
14191
|
-
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: [
|
|
14192
14200
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__toolbar", children: [
|
|
14193
14201
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSegment, { value: view, onChange: setView }),
|
|
14194
14202
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__toolbar-spacer" }),
|
|
@@ -14373,9 +14381,9 @@ function AddTravellerDialog({
|
|
|
14373
14381
|
onClose,
|
|
14374
14382
|
onAdded
|
|
14375
14383
|
}) {
|
|
14376
|
-
const { t } =
|
|
14384
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14377
14385
|
const titleId = react.useId();
|
|
14378
|
-
const { makeTravellersFetch, addTraveller, createAgencyTraveller } =
|
|
14386
|
+
const { makeTravellersFetch, addTraveller, createAgencyTraveller } = chunkODH3SYYW_cjs.useDirectories();
|
|
14379
14387
|
const [mode, setMode] = react.useState("search");
|
|
14380
14388
|
const [term, setTerm] = react.useState("");
|
|
14381
14389
|
const [debounced, setDebounced] = react.useState("");
|
|
@@ -14389,7 +14397,7 @@ function AddTravellerDialog({
|
|
|
14389
14397
|
return () => clearTimeout(timer);
|
|
14390
14398
|
}, [term]);
|
|
14391
14399
|
function reportFailure(error) {
|
|
14392
|
-
setErrorCode(
|
|
14400
|
+
setErrorCode(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
14393
14401
|
}
|
|
14394
14402
|
async function addExisting(externalTravellerId, fullName) {
|
|
14395
14403
|
setPending(true);
|
|
@@ -14541,8 +14549,8 @@ function DirectoryResults({
|
|
|
14541
14549
|
pendingId,
|
|
14542
14550
|
onPick
|
|
14543
14551
|
}) {
|
|
14544
|
-
const { t } =
|
|
14545
|
-
const { rows, hasNext, loadNext, settled, error } =
|
|
14552
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14553
|
+
const { rows, hasNext, loadNext, settled, error } = chunkODH3SYYW_cjs.usePaginatedList(fetch);
|
|
14546
14554
|
if (!settled) {
|
|
14547
14555
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "aria-live": "polite", children: t("chrome.tripManifest.addSearching") });
|
|
14548
14556
|
}
|
|
@@ -14627,9 +14635,9 @@ function ManageGroupsDialog({
|
|
|
14627
14635
|
onClose,
|
|
14628
14636
|
onSaved
|
|
14629
14637
|
}) {
|
|
14630
|
-
const { t } =
|
|
14638
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14631
14639
|
const titleId = react.useId();
|
|
14632
|
-
const { createParty, patchParty, deleteParty } =
|
|
14640
|
+
const { createParty, patchParty, deleteParty } = chunkODH3SYYW_cjs.useDirectories();
|
|
14633
14641
|
const groups = deriveManifestGroups(rows).filter(
|
|
14634
14642
|
(group) => group.id !== SOLO_GROUP_ID && group.party !== null
|
|
14635
14643
|
);
|
|
@@ -14857,7 +14865,7 @@ function ManageGroupsDialog({
|
|
|
14857
14865
|
}
|
|
14858
14866
|
var DIET_BUCKET_CAP = 4;
|
|
14859
14867
|
function ManifestFacetTiles({ facets, filtered }) {
|
|
14860
|
-
const { t } =
|
|
14868
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14861
14869
|
const dietEntries = Object.entries(facets.dietCounts).filter(([, count]) => count > 0).sort((a, b) => b[1] - a[1]);
|
|
14862
14870
|
const shown = dietEntries.slice(0, DIET_BUCKET_CAP);
|
|
14863
14871
|
const hiddenCount = dietEntries.length - shown.length;
|
|
@@ -14939,7 +14947,7 @@ function ManifestFiltersPopover({
|
|
|
14939
14947
|
value,
|
|
14940
14948
|
onChange
|
|
14941
14949
|
}) {
|
|
14942
|
-
const { t } =
|
|
14950
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
14943
14951
|
const [open, setOpen] = react.useState(false);
|
|
14944
14952
|
const rootRef = react.useRef(null);
|
|
14945
14953
|
const triggerRef = react.useRef(null);
|
|
@@ -15079,7 +15087,7 @@ var KIND_LABEL_KEY2 = {
|
|
|
15079
15087
|
OTHER: "chrome.tripManifest.partyKind.other"
|
|
15080
15088
|
};
|
|
15081
15089
|
function ManifestGroupCard({ group, onEdit, children }) {
|
|
15082
|
-
const { t } =
|
|
15090
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15083
15091
|
const party = group.party;
|
|
15084
15092
|
const isSolo = party === null;
|
|
15085
15093
|
const heading = isSolo ? t("chrome.tripManifest.soloHeading") : party.label ?? t(KIND_LABEL_KEY2[party.kind] ?? "chrome.tripManifest.partyKind.other");
|
|
@@ -15167,7 +15175,7 @@ function ManifestRowKebab({
|
|
|
15167
15175
|
onShareLink,
|
|
15168
15176
|
onOpenProfile
|
|
15169
15177
|
}) {
|
|
15170
|
-
const { t } =
|
|
15178
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15171
15179
|
const [open, setOpen] = react.useState(false);
|
|
15172
15180
|
const rootRef = react.useRef(null);
|
|
15173
15181
|
const triggerRef = react.useRef(null);
|
|
@@ -15266,10 +15274,10 @@ function ManifestRow({
|
|
|
15266
15274
|
onOpenProfile,
|
|
15267
15275
|
style
|
|
15268
15276
|
}) {
|
|
15269
|
-
const { t } =
|
|
15277
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15270
15278
|
const derived = deriveManifestRow(row, index, serverTime);
|
|
15271
15279
|
const traveller = row.traveller;
|
|
15272
|
-
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: [
|
|
15273
15281
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15274
15282
|
"td",
|
|
15275
15283
|
{
|
|
@@ -15343,7 +15351,7 @@ function ManifestTable({
|
|
|
15343
15351
|
onOpenProfile,
|
|
15344
15352
|
RowComponent
|
|
15345
15353
|
}) {
|
|
15346
|
-
const { t } =
|
|
15354
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15347
15355
|
const Row = RowComponent ?? ManifestRow;
|
|
15348
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: [
|
|
15349
15357
|
showHead ? /* @__PURE__ */ jsxRuntime.jsx("thead", { role: "rowgroup", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__head-row", children: [
|
|
@@ -15390,8 +15398,8 @@ function ManifestResultsBody({
|
|
|
15390
15398
|
RowComponent,
|
|
15391
15399
|
onRetry
|
|
15392
15400
|
}) {
|
|
15393
|
-
const { t } =
|
|
15394
|
-
const { makeManifestFetch, facets, groupedPageSize } =
|
|
15401
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15402
|
+
const { makeManifestFetch, facets, groupedPageSize } = chunkODH3SYYW_cjs.useAgencyTripManifest(tripRef);
|
|
15395
15403
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
15396
15404
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
15397
15405
|
const [serverTime, setServerTime] = react.useState(void 0);
|
|
@@ -15408,7 +15416,7 @@ function ManifestResultsBody({
|
|
|
15408
15416
|
if (meta?.serverTime !== void 0) setServerTime(meta.serverTime);
|
|
15409
15417
|
return page;
|
|
15410
15418
|
} catch (error) {
|
|
15411
|
-
setErrorCode(
|
|
15419
|
+
setErrorCode(chunkUSKVWPJD_cjs.classifyError(error).code ?? "unknown");
|
|
15412
15420
|
return { rows: [], nextCursor: void 0 };
|
|
15413
15421
|
} finally {
|
|
15414
15422
|
setHasSettled(true);
|
|
@@ -15416,7 +15424,7 @@ function ManifestResultsBody({
|
|
|
15416
15424
|
},
|
|
15417
15425
|
[makeManifestFetch, filters, grouped, groupedPageSize]
|
|
15418
15426
|
);
|
|
15419
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
15427
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkODH3SYYW_cjs.usePaginatedList(fetch, {
|
|
15420
15428
|
accumulate: grouped
|
|
15421
15429
|
});
|
|
15422
15430
|
react.useEffect(() => {
|
|
@@ -15577,7 +15585,7 @@ function ManifestSearchInput({
|
|
|
15577
15585
|
debounceMs,
|
|
15578
15586
|
onDebouncedChange
|
|
15579
15587
|
}) {
|
|
15580
|
-
const { t } =
|
|
15588
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15581
15589
|
const [value, setValue] = react.useState("");
|
|
15582
15590
|
react.useEffect(() => {
|
|
15583
15591
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -15604,8 +15612,8 @@ function RemoveTravellerDialog({
|
|
|
15604
15612
|
onClose,
|
|
15605
15613
|
onRemoved
|
|
15606
15614
|
}) {
|
|
15607
|
-
const { t } =
|
|
15608
|
-
const { removeFromManifest } =
|
|
15615
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15616
|
+
const { removeFromManifest } = chunkODH3SYYW_cjs.useDirectories();
|
|
15609
15617
|
const titleId = react.useId();
|
|
15610
15618
|
const [pending, setPending] = react.useState(false);
|
|
15611
15619
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -15692,7 +15700,7 @@ function shareAddress(build, token) {
|
|
|
15692
15700
|
}
|
|
15693
15701
|
var warnedNoShareUrl = false;
|
|
15694
15702
|
function warnMissingShareUrl() {
|
|
15695
|
-
if (warnedNoShareUrl || !
|
|
15703
|
+
if (warnedNoShareUrl || !chunk5ORJRFXZ_cjs.isDevelopment()) return;
|
|
15696
15704
|
warnedNoShareUrl = true;
|
|
15697
15705
|
console.warn(
|
|
15698
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}`}"
|
|
@@ -15704,14 +15712,14 @@ function ShareLinkDialog({
|
|
|
15704
15712
|
travellerName,
|
|
15705
15713
|
onClose
|
|
15706
15714
|
}) {
|
|
15707
|
-
const { t } =
|
|
15715
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
15708
15716
|
const titleId = react.useId();
|
|
15709
|
-
const buildShareUrl =
|
|
15717
|
+
const buildShareUrl = chunkODH3SYYW_cjs.useBuildShareUrl();
|
|
15710
15718
|
const showsBareToken = buildShareUrl === null;
|
|
15711
15719
|
if (showsBareToken) warnMissingShareUrl();
|
|
15712
15720
|
const isFamily = travellerRef === null;
|
|
15713
|
-
const offerable =
|
|
15714
|
-
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(
|
|
15715
15723
|
tripRef,
|
|
15716
15724
|
travellerRef
|
|
15717
15725
|
);
|
|
@@ -16050,7 +16058,7 @@ function SideDrawer({
|
|
|
16050
16058
|
"aria-modal": "true",
|
|
16051
16059
|
"aria-labelledby": titleId,
|
|
16052
16060
|
tabIndex: -1,
|
|
16053
|
-
style:
|
|
16061
|
+
style: chunk5ORJRFXZ_cjs.tokenStyle(style),
|
|
16054
16062
|
children: [
|
|
16055
16063
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-admin-side-drawer__header", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__header-row", children: [
|
|
16056
16064
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__identity", children: [
|
|
@@ -16118,11 +16126,11 @@ function TravellerDetailDialog({
|
|
|
16118
16126
|
onClose,
|
|
16119
16127
|
onRemove
|
|
16120
16128
|
}) {
|
|
16121
|
-
const { t } =
|
|
16129
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16122
16130
|
const titleId = react.useId();
|
|
16123
|
-
const { read, readFailed, refresh } =
|
|
16124
|
-
const forms =
|
|
16125
|
-
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();
|
|
16126
16134
|
const [noteDraft, setNoteDraft] = react.useState("");
|
|
16127
16135
|
const [notePending, setNotePending] = react.useState(false);
|
|
16128
16136
|
const [noteFailed, setNoteFailed] = react.useState(false);
|
|
@@ -16351,7 +16359,7 @@ function DetailRow({
|
|
|
16351
16359
|
absentLabel,
|
|
16352
16360
|
meta
|
|
16353
16361
|
}) {
|
|
16354
|
-
const { t } =
|
|
16362
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16355
16363
|
const has = value !== null && value !== void 0 && value.length > 0;
|
|
16356
16364
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__detail-row", children: [
|
|
16357
16365
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-manifest-section__detail-label", children: label }),
|
|
@@ -16374,7 +16382,7 @@ function TripManifestSection({
|
|
|
16374
16382
|
components,
|
|
16375
16383
|
style
|
|
16376
16384
|
}) {
|
|
16377
|
-
const { t } =
|
|
16385
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16378
16386
|
const [q, setQ] = react.useState("");
|
|
16379
16387
|
const [groupBy, setGroupBy] = react.useState("booking_group");
|
|
16380
16388
|
const [filters, setFilters] = react.useState({});
|
|
@@ -16403,7 +16411,7 @@ function TripManifestSection({
|
|
|
16403
16411
|
[groupBy, writeToken, wireFilters]
|
|
16404
16412
|
);
|
|
16405
16413
|
const hasActiveFilter = q.length > 0 || Object.keys(filters).length > 0;
|
|
16406
|
-
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: [
|
|
16407
16415
|
facets === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ManifestFacetTiles, { facets, filtered: hasActiveFilter }),
|
|
16408
16416
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__toolbar", children: [
|
|
16409
16417
|
/* @__PURE__ */ jsxRuntime.jsx(ManifestSearchInput, { debounceMs: DEBOUNCE_MS, onDebouncedChange: setQ }),
|
|
@@ -16622,7 +16630,7 @@ function PaymentsSkeleton() {
|
|
|
16622
16630
|
] }, id)) });
|
|
16623
16631
|
}
|
|
16624
16632
|
function PaymentsEmpty({ onRecord }) {
|
|
16625
|
-
const { t } =
|
|
16633
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16626
16634
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", children: [
|
|
16627
16635
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ReceiptIcon, {}) }),
|
|
16628
16636
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.emptyTitle") }),
|
|
@@ -16631,7 +16639,7 @@ function PaymentsEmpty({ onRecord }) {
|
|
|
16631
16639
|
] });
|
|
16632
16640
|
}
|
|
16633
16641
|
function PaymentsFailed({ onRetry }) {
|
|
16634
|
-
const { t } =
|
|
16642
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16635
16643
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", role: "alert", children: [
|
|
16636
16644
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.failedTitle") }),
|
|
16637
16645
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-payments-section__state-body", children: t("chrome.tripPayments.failedBody") }),
|
|
@@ -16639,7 +16647,7 @@ function PaymentsFailed({ onRetry }) {
|
|
|
16639
16647
|
] });
|
|
16640
16648
|
}
|
|
16641
16649
|
function PaymentsDark({ reason }) {
|
|
16642
|
-
const { t } =
|
|
16650
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16643
16651
|
if (reason === "mode") {
|
|
16644
16652
|
return null;
|
|
16645
16653
|
}
|
|
@@ -16660,7 +16668,7 @@ function PaymentsTable({
|
|
|
16660
16668
|
locked,
|
|
16661
16669
|
onVoid
|
|
16662
16670
|
}) {
|
|
16663
|
-
const { t } =
|
|
16671
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16664
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: [
|
|
16665
16673
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripPayments.tableCaption") }),
|
|
16666
16674
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -16719,7 +16727,7 @@ function RecordPaymentDialog({
|
|
|
16719
16727
|
onClose,
|
|
16720
16728
|
onSubmit
|
|
16721
16729
|
}) {
|
|
16722
|
-
const { t } =
|
|
16730
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16723
16731
|
const titleId = react.useId();
|
|
16724
16732
|
const [travellerId, setTravellerId] = react.useState(null);
|
|
16725
16733
|
const [amount, setAmount] = react.useState("");
|
|
@@ -16894,7 +16902,7 @@ function VoidPaymentDialog({
|
|
|
16894
16902
|
onClose,
|
|
16895
16903
|
onSubmit
|
|
16896
16904
|
}) {
|
|
16897
|
-
const { t } =
|
|
16905
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16898
16906
|
const titleId = react.useId();
|
|
16899
16907
|
const [reason, setReason] = react.useState("");
|
|
16900
16908
|
const trimmed = reason.trim();
|
|
@@ -16968,7 +16976,7 @@ function isCloseoutLocked4(error) {
|
|
|
16968
16976
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
16969
16977
|
}
|
|
16970
16978
|
function TripPaymentsSection(props) {
|
|
16971
|
-
const session =
|
|
16979
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
16972
16980
|
if (session.status !== "authenticated") {
|
|
16973
16981
|
return null;
|
|
16974
16982
|
}
|
|
@@ -16979,9 +16987,9 @@ function ReadyTripPaymentsSection({
|
|
|
16979
16987
|
balance,
|
|
16980
16988
|
style
|
|
16981
16989
|
}) {
|
|
16982
|
-
const { t } =
|
|
16983
|
-
const collections =
|
|
16984
|
-
const parties =
|
|
16990
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
16991
|
+
const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
|
|
16992
|
+
const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
|
|
16985
16993
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
16986
16994
|
const [pending, setPending] = react.useState(false);
|
|
16987
16995
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -17061,7 +17069,7 @@ function ReadyTripPaymentsSection({
|
|
|
17061
17069
|
}
|
|
17062
17070
|
const currency = balance?.currency ?? rows[0]?.currency ?? "INR";
|
|
17063
17071
|
const owingCount = eligibleRows.filter((row) => row.outstandingMinor > 0).length;
|
|
17064
|
-
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: [
|
|
17065
17073
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__toolbar", children: [
|
|
17066
17074
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-title", children: t("chrome.tripPayments.panelLabel") }),
|
|
17067
17075
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-spacer" }),
|
|
@@ -17202,7 +17210,7 @@ function AssignTravellerDialog({
|
|
|
17202
17210
|
onSubmit,
|
|
17203
17211
|
onClose
|
|
17204
17212
|
}) {
|
|
17205
|
-
const { t } =
|
|
17213
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17206
17214
|
const titleId = react.useId();
|
|
17207
17215
|
const [pointId, setPointId] = react.useState(stops[0]?.id ?? "");
|
|
17208
17216
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17273,7 +17281,7 @@ function BoardingRoster({
|
|
|
17273
17281
|
onRetry,
|
|
17274
17282
|
stops
|
|
17275
17283
|
}) {
|
|
17276
|
-
const { t } =
|
|
17284
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17277
17285
|
if (failed) {
|
|
17278
17286
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17279
17287
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.boardingFailedTitle") }),
|
|
@@ -17333,7 +17341,7 @@ function TravellerBoardRow({
|
|
|
17333
17341
|
busy,
|
|
17334
17342
|
onCorrect
|
|
17335
17343
|
}) {
|
|
17336
|
-
const { t } =
|
|
17344
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17337
17345
|
const correctable = occupant.status !== "PENDING";
|
|
17338
17346
|
const next = occupant.status === "BOARDED" ? "NO_SHOW" : "BOARDED";
|
|
17339
17347
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-pickups-section__roster-row", children: [
|
|
@@ -17371,7 +17379,7 @@ function DeleteStopDialog({
|
|
|
17371
17379
|
onDelete,
|
|
17372
17380
|
onClose
|
|
17373
17381
|
}) {
|
|
17374
|
-
const { t } =
|
|
17382
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17375
17383
|
const titleId = react.useId();
|
|
17376
17384
|
const [target, setTarget] = react.useState(siblings[0]?.id ?? "");
|
|
17377
17385
|
const occupied = stop.expectedCount > 0;
|
|
@@ -17625,7 +17633,7 @@ function PickupsEmpty({
|
|
|
17625
17633
|
kindLabel,
|
|
17626
17634
|
onAdd
|
|
17627
17635
|
}) {
|
|
17628
|
-
const { t } =
|
|
17636
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17629
17637
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", children: [
|
|
17630
17638
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-pickups-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon, {}) }),
|
|
17631
17639
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.emptyTitle").replace("{kind}", kindLabel) }),
|
|
@@ -17634,7 +17642,7 @@ function PickupsEmpty({
|
|
|
17634
17642
|
] });
|
|
17635
17643
|
}
|
|
17636
17644
|
function PickupsFailed({ onRetry }) {
|
|
17637
|
-
const { t } =
|
|
17645
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17638
17646
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17639
17647
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.failedTitle") }),
|
|
17640
17648
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-pickups-section__state-body", children: t("chrome.tripPickups.failedBody") }),
|
|
@@ -17642,7 +17650,7 @@ function PickupsFailed({ onRetry }) {
|
|
|
17642
17650
|
] });
|
|
17643
17651
|
}
|
|
17644
17652
|
function PickupsDark({ reason }) {
|
|
17645
|
-
const { t } =
|
|
17653
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17646
17654
|
if (reason === "mode") {
|
|
17647
17655
|
return null;
|
|
17648
17656
|
}
|
|
@@ -17676,7 +17684,7 @@ function StopFormDialog({
|
|
|
17676
17684
|
onClose,
|
|
17677
17685
|
onSubmit
|
|
17678
17686
|
}) {
|
|
17679
|
-
const { t } =
|
|
17687
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17680
17688
|
const titleId = react.useId();
|
|
17681
17689
|
const isEdit = stop !== null;
|
|
17682
17690
|
const [kind, setKind] = react.useState(stop?.kind ?? defaultKind);
|
|
@@ -17823,7 +17831,7 @@ function StopFormDialog({
|
|
|
17823
17831
|
);
|
|
17824
17832
|
}
|
|
17825
17833
|
function StopKebab({ stopName, onEdit, onDelete }) {
|
|
17826
|
-
const { t } =
|
|
17834
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17827
17835
|
const [open, setOpen] = react.useState(false);
|
|
17828
17836
|
const rootRef = react.useRef(null);
|
|
17829
17837
|
const triggerRef = react.useRef(null);
|
|
@@ -17900,7 +17908,7 @@ function StopCard({
|
|
|
17900
17908
|
onDelete,
|
|
17901
17909
|
onMoveBy
|
|
17902
17910
|
}) {
|
|
17903
|
-
const { t } =
|
|
17911
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
17904
17912
|
const isClosed = stop.status === "CLOSED";
|
|
17905
17913
|
const canReorder = !isClosed;
|
|
17906
17914
|
const percent = boardedPercent(stop);
|
|
@@ -18048,7 +18056,7 @@ function Segment({
|
|
|
18048
18056
|
value,
|
|
18049
18057
|
onChange
|
|
18050
18058
|
}) {
|
|
18051
|
-
const { t } =
|
|
18059
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18052
18060
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-pickups-section__segment", children: [
|
|
18053
18061
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t(legendKey) }),
|
|
18054
18062
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -18106,7 +18114,7 @@ function codeOf7(error) {
|
|
|
18106
18114
|
return classification?.code ?? "unknown";
|
|
18107
18115
|
}
|
|
18108
18116
|
function TripPickupsSection(props) {
|
|
18109
|
-
const session =
|
|
18117
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
18110
18118
|
if (session.status !== "authenticated") {
|
|
18111
18119
|
return null;
|
|
18112
18120
|
}
|
|
@@ -18118,8 +18126,8 @@ function ReadyTripPickupsSection({
|
|
|
18118
18126
|
tripStartIso,
|
|
18119
18127
|
style
|
|
18120
18128
|
}) {
|
|
18121
|
-
const { t } =
|
|
18122
|
-
const pickups =
|
|
18129
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18130
|
+
const pickups = chunkUSKVWPJD_cjs.usePickups(tripRef);
|
|
18123
18131
|
const [kind, setKind] = react.useState("PICKUP");
|
|
18124
18132
|
const [view, setView] = react.useState("stops");
|
|
18125
18133
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -18279,7 +18287,7 @@ function ReadyTripPickupsSection({
|
|
|
18279
18287
|
const kindLabel = t(
|
|
18280
18288
|
kind === "PICKUP" ? "chrome.tripPickups.kindPickupOne" : "chrome.tripPickups.kindDropOne"
|
|
18281
18289
|
);
|
|
18282
|
-
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: [
|
|
18283
18291
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__toolbar", children: [
|
|
18284
18292
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSwitcher, { value: view, onChange: setView }),
|
|
18285
18293
|
/* @__PURE__ */ jsxRuntime.jsx(KindSwitcher, { value: kind, onChange: setKind }),
|
|
@@ -18502,7 +18510,7 @@ function AutoAssignDialog({
|
|
|
18502
18510
|
onApply,
|
|
18503
18511
|
onClose
|
|
18504
18512
|
}) {
|
|
18505
|
-
const { t } =
|
|
18513
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18506
18514
|
const titleId = react.useId();
|
|
18507
18515
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
18508
18516
|
const roomCodeById = new Map(group.rooms.map((room) => [room.id, room.code]));
|
|
@@ -18597,7 +18605,7 @@ function AutoAssignDialog({
|
|
|
18597
18605
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section__plan", children: [
|
|
18598
18606
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__plan-title", children: t("chrome.tripRooming.rulesTitle") }),
|
|
18599
18607
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "kf-trip-rooming-section__rule-list", children: preview.perRule.map((entry) => {
|
|
18600
|
-
const severity =
|
|
18608
|
+
const severity = chunkUSKVWPJD_cjs.roomingHeuristicSeverity(entry.rule);
|
|
18601
18609
|
const relaxed = entry.outcome === "relaxed";
|
|
18602
18610
|
const violation = relaxed && severity === "never";
|
|
18603
18611
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18643,7 +18651,7 @@ function DeleteShell({
|
|
|
18643
18651
|
onConfirm,
|
|
18644
18652
|
onClose
|
|
18645
18653
|
}) {
|
|
18646
|
-
const { t } =
|
|
18654
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18647
18655
|
const titleId = react.useId();
|
|
18648
18656
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18649
18657
|
SheetDialog,
|
|
@@ -18689,7 +18697,7 @@ function DeleteRoomDialog({
|
|
|
18689
18697
|
onConfirm,
|
|
18690
18698
|
onClose
|
|
18691
18699
|
}) {
|
|
18692
|
-
const { t } =
|
|
18700
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18693
18701
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
18694
18702
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18695
18703
|
DeleteShell,
|
|
@@ -18715,7 +18723,7 @@ function DeleteWindowDialog({
|
|
|
18715
18723
|
onConfirm,
|
|
18716
18724
|
onClose
|
|
18717
18725
|
}) {
|
|
18718
|
-
const { t } =
|
|
18726
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18719
18727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18720
18728
|
DeleteShell,
|
|
18721
18729
|
{
|
|
@@ -18813,15 +18821,15 @@ function roomTypeLabelKey(roomType) {
|
|
|
18813
18821
|
return ROOM_TYPE_LABEL_KEY[roomType] ?? "chrome.tripRooming.roomType.shared";
|
|
18814
18822
|
}
|
|
18815
18823
|
function toneAttrs(tone) {
|
|
18816
|
-
const parsed =
|
|
18824
|
+
const parsed = chunkUSKVWPJD_cjs.parseRoomingTone(tone);
|
|
18817
18825
|
if (parsed === void 0) {
|
|
18818
|
-
return { family:
|
|
18826
|
+
return { family: chunkUSKVWPJD_cjs.TONE_FAMILIES.UNKNOWN, shade: 0 };
|
|
18819
18827
|
}
|
|
18820
|
-
const shade = parsed.shade <
|
|
18828
|
+
const shade = parsed.shade < chunkUSKVWPJD_cjs.SHADES_PER_FAMILY ? parsed.shade : parsed.shade % chunkUSKVWPJD_cjs.SHADES_PER_FAMILY;
|
|
18821
18829
|
return { family: parsed.family, shade };
|
|
18822
18830
|
}
|
|
18823
18831
|
function glyphOf(occupant) {
|
|
18824
|
-
return occupant.glyph === "" ?
|
|
18832
|
+
return occupant.glyph === "" ? chunkUSKVWPJD_cjs.FALLBACK_GLYPH : occupant.glyph;
|
|
18825
18833
|
}
|
|
18826
18834
|
function TravellerGlyph({
|
|
18827
18835
|
occupant,
|
|
@@ -18859,7 +18867,7 @@ var COLLAPSED_COUNT = 10;
|
|
|
18859
18867
|
function IdentityLegend({
|
|
18860
18868
|
occupants
|
|
18861
18869
|
}) {
|
|
18862
|
-
const { t } =
|
|
18870
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18863
18871
|
const [open, setOpen] = react.useState(false);
|
|
18864
18872
|
if (occupants.length === 0) {
|
|
18865
18873
|
return null;
|
|
@@ -18986,7 +18994,7 @@ function RoomFormDialog({
|
|
|
18986
18994
|
onClose,
|
|
18987
18995
|
onSubmit
|
|
18988
18996
|
}) {
|
|
18989
|
-
const { t } =
|
|
18997
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
18990
18998
|
const titleId = react.useId();
|
|
18991
18999
|
const isEdit = room !== null;
|
|
18992
19000
|
const [code, setCode] = react.useState(room?.code ?? "");
|
|
@@ -19110,7 +19118,7 @@ function RoomingSkeleton() {
|
|
|
19110
19118
|
] }, id)) });
|
|
19111
19119
|
}
|
|
19112
19120
|
function RoomingEmpty({ onAddWindow }) {
|
|
19113
|
-
const { t } =
|
|
19121
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19114
19122
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", children: [
|
|
19115
19123
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BedIcon, {}) }),
|
|
19116
19124
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.emptyTitle") }),
|
|
@@ -19119,7 +19127,7 @@ function RoomingEmpty({ onAddWindow }) {
|
|
|
19119
19127
|
] });
|
|
19120
19128
|
}
|
|
19121
19129
|
function RoomingFailed({ onRetry }) {
|
|
19122
|
-
const { t } =
|
|
19130
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19123
19131
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", role: "alert", children: [
|
|
19124
19132
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.failedTitle") }),
|
|
19125
19133
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-rooming-section__state-body", children: t("chrome.tripRooming.failedBody") }),
|
|
@@ -19127,7 +19135,7 @@ function RoomingFailed({ onRetry }) {
|
|
|
19127
19135
|
] });
|
|
19128
19136
|
}
|
|
19129
19137
|
function RoomingDark({ reason }) {
|
|
19130
|
-
const { t } =
|
|
19138
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19131
19139
|
if (reason === "mode") {
|
|
19132
19140
|
return null;
|
|
19133
19141
|
}
|
|
@@ -19142,7 +19150,7 @@ function RoomingDark({ reason }) {
|
|
|
19142
19150
|
] });
|
|
19143
19151
|
}
|
|
19144
19152
|
function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
19145
|
-
const { t } =
|
|
19153
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19146
19154
|
const [open, setOpen] = react.useState(false);
|
|
19147
19155
|
const rootRef = react.useRef(null);
|
|
19148
19156
|
const triggerRef = react.useRef(null);
|
|
@@ -19207,7 +19215,7 @@ function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
|
19207
19215
|
] });
|
|
19208
19216
|
}
|
|
19209
19217
|
function RoomCard({ room, drag, busy, onEdit, onDelete }) {
|
|
19210
|
-
const { t } =
|
|
19218
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19211
19219
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
19212
19220
|
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "kf-trip-rooming-section__room", "data-busy": busy ? "true" : void 0, children: [
|
|
19213
19221
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-rooming-section__room-head", children: [
|
|
@@ -19257,7 +19265,7 @@ function UnassignedStrip({
|
|
|
19257
19265
|
drag,
|
|
19258
19266
|
busy
|
|
19259
19267
|
}) {
|
|
19260
|
-
const { t } =
|
|
19268
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19261
19269
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19262
19270
|
"div",
|
|
19263
19271
|
{
|
|
@@ -19331,7 +19339,7 @@ function WindowAccordion({
|
|
|
19331
19339
|
onEditRoom,
|
|
19332
19340
|
onDeleteRoom
|
|
19333
19341
|
}) {
|
|
19334
|
-
const { t } =
|
|
19342
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19335
19343
|
const percent = fillPercent(group);
|
|
19336
19344
|
const bodyId = `kf-rooming-window-${group.window.id}`;
|
|
19337
19345
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -19481,7 +19489,7 @@ function WindowFormDialog({
|
|
|
19481
19489
|
onClose,
|
|
19482
19490
|
onSubmit
|
|
19483
19491
|
}) {
|
|
19484
|
-
const { t } =
|
|
19492
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19485
19493
|
const titleId = react.useId();
|
|
19486
19494
|
const isEdit = window !== null;
|
|
19487
19495
|
const [label, setLabel] = react.useState(window?.label ?? "");
|
|
@@ -19588,7 +19596,7 @@ function codeOf8(error) {
|
|
|
19588
19596
|
return classification?.code ?? "unknown";
|
|
19589
19597
|
}
|
|
19590
19598
|
function TripRoomingSection(props) {
|
|
19591
|
-
const session =
|
|
19599
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
19592
19600
|
if (session.status !== "authenticated") {
|
|
19593
19601
|
return null;
|
|
19594
19602
|
}
|
|
@@ -19601,8 +19609,8 @@ function ReadyTripRoomingSection({
|
|
|
19601
19609
|
tripEndIso,
|
|
19602
19610
|
style
|
|
19603
19611
|
}) {
|
|
19604
|
-
const { t } =
|
|
19605
|
-
const rooming =
|
|
19612
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19613
|
+
const rooming = chunkUSKVWPJD_cjs.useRooming(tripRef);
|
|
19606
19614
|
const [openWindowId, setOpenWindowId] = react.useState(null);
|
|
19607
19615
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
19608
19616
|
const [pending, setPending] = react.useState(false);
|
|
@@ -19740,7 +19748,7 @@ function ReadyTripRoomingSection({
|
|
|
19740
19748
|
return /* @__PURE__ */ jsxRuntime.jsx(RoomingDark, { reason: rooming.reason });
|
|
19741
19749
|
}
|
|
19742
19750
|
const pool = ready?.unassignedPool;
|
|
19743
|
-
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: [
|
|
19744
19752
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__toolbar", children: [
|
|
19745
19753
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-title", children: t("chrome.tripRooming.panelLabel") }),
|
|
19746
19754
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-spacer" }),
|
|
@@ -19974,7 +19982,7 @@ function isAgencyAuthored(vendor) {
|
|
|
19974
19982
|
return vendor.externalId.startsWith("kf-");
|
|
19975
19983
|
}
|
|
19976
19984
|
function CategoryTabs({ selected, counts, total, onSelect }) {
|
|
19977
|
-
const { t } =
|
|
19985
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
19978
19986
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__chips", children: [
|
|
19979
19987
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19980
19988
|
"button",
|
|
@@ -20017,7 +20025,7 @@ function DeleteSupplierDialog({
|
|
|
20017
20025
|
onConfirm,
|
|
20018
20026
|
onClose
|
|
20019
20027
|
}) {
|
|
20020
|
-
const { t } =
|
|
20028
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20021
20029
|
const titleId = react.useId();
|
|
20022
20030
|
const blockers = deleteBlockers(usage);
|
|
20023
20031
|
const blockedLocally = blockers !== void 0 && blockers.vehicles + blockers.expenses > 0;
|
|
@@ -20170,7 +20178,7 @@ function SupplierFormDialog({
|
|
|
20170
20178
|
onClose,
|
|
20171
20179
|
onSubmit
|
|
20172
20180
|
}) {
|
|
20173
|
-
const { t } =
|
|
20181
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20174
20182
|
const titleId = react.useId();
|
|
20175
20183
|
const isEdit = supplier !== null;
|
|
20176
20184
|
const [name, setName] = react.useState(supplier?.name ?? "");
|
|
@@ -20292,7 +20300,7 @@ function SuppliersSkeleton() {
|
|
|
20292
20300
|
] }, id)) });
|
|
20293
20301
|
}
|
|
20294
20302
|
function SuppliersEmpty({ onAdd }) {
|
|
20295
|
-
const { t } =
|
|
20303
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20296
20304
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20297
20305
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(StorefrontIcon, {}) }),
|
|
20298
20306
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.emptyTitle") }),
|
|
@@ -20301,7 +20309,7 @@ function SuppliersEmpty({ onAdd }) {
|
|
|
20301
20309
|
] });
|
|
20302
20310
|
}
|
|
20303
20311
|
function SuppliersNoMatch({ onClear }) {
|
|
20304
|
-
const { t } =
|
|
20312
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20305
20313
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20306
20314
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.noMatchTitle") }),
|
|
20307
20315
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.noMatchBody") }),
|
|
@@ -20309,7 +20317,7 @@ function SuppliersNoMatch({ onClear }) {
|
|
|
20309
20317
|
] });
|
|
20310
20318
|
}
|
|
20311
20319
|
function SuppliersFailed({ onRetry }) {
|
|
20312
|
-
const { t } =
|
|
20320
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20313
20321
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", role: "alert", children: [
|
|
20314
20322
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.failedTitle") }),
|
|
20315
20323
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.failedBody") }),
|
|
@@ -20317,7 +20325,7 @@ function SuppliersFailed({ onRetry }) {
|
|
|
20317
20325
|
] });
|
|
20318
20326
|
}
|
|
20319
20327
|
function SuppliersDark({ reason }) {
|
|
20320
|
-
const { t } =
|
|
20328
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20321
20329
|
if (reason === "mode") {
|
|
20322
20330
|
return null;
|
|
20323
20331
|
}
|
|
@@ -20332,7 +20340,7 @@ function SuppliersDark({ reason }) {
|
|
|
20332
20340
|
] });
|
|
20333
20341
|
}
|
|
20334
20342
|
function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
20335
|
-
const { t } =
|
|
20343
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20336
20344
|
const [open, setOpen] = react.useState(false);
|
|
20337
20345
|
const rootRef = react.useRef(null);
|
|
20338
20346
|
const triggerRef = react.useRef(null);
|
|
@@ -20399,7 +20407,7 @@ function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
|
20399
20407
|
] });
|
|
20400
20408
|
}
|
|
20401
20409
|
function SupplierUsageCell({ usage }) {
|
|
20402
|
-
const { t } =
|
|
20410
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20403
20411
|
const parts = [];
|
|
20404
20412
|
if (usage.vehicles !== void 0 && usage.vehicles > 0) {
|
|
20405
20413
|
parts.push(
|
|
@@ -20443,7 +20451,7 @@ function SupplierTable({
|
|
|
20443
20451
|
onEdit,
|
|
20444
20452
|
onDelete
|
|
20445
20453
|
}) {
|
|
20446
|
-
const { t } =
|
|
20454
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20447
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: [
|
|
20448
20456
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripSuppliers.tableCaption") }),
|
|
20449
20457
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -20511,18 +20519,18 @@ function serverBlockOf(error) {
|
|
|
20511
20519
|
return { vehicles: details.vehicleCount ?? 0, expenses: details.expenseCount ?? 0 };
|
|
20512
20520
|
}
|
|
20513
20521
|
function TripSuppliersSection(props) {
|
|
20514
|
-
const session =
|
|
20522
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
20515
20523
|
if (session.status !== "authenticated") {
|
|
20516
20524
|
return null;
|
|
20517
20525
|
}
|
|
20518
20526
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripSuppliersSection, { ...props });
|
|
20519
20527
|
}
|
|
20520
20528
|
function ReadyTripSuppliersSection({ tripRef, style }) {
|
|
20521
|
-
const { t } =
|
|
20522
|
-
const vendors =
|
|
20523
|
-
const seating =
|
|
20524
|
-
const itinerary =
|
|
20525
|
-
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);
|
|
20526
20534
|
const [category, setCategory] = react.useState(null);
|
|
20527
20535
|
const [query, setQuery] = react.useState("");
|
|
20528
20536
|
const [sortKey, setSortKey] = react.useState("name");
|
|
@@ -20605,7 +20613,7 @@ function ReadyTripSuppliersSection({ tripRef, style }) {
|
|
|
20605
20613
|
return /* @__PURE__ */ jsxRuntime.jsx(SuppliersDark, { reason: vendors.reason });
|
|
20606
20614
|
}
|
|
20607
20615
|
const filtered = category !== null || query.trim() !== "";
|
|
20608
|
-
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: [
|
|
20609
20617
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__toolbar", children: [
|
|
20610
20618
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-title", children: t("chrome.tripSuppliers.panelLabel") }),
|
|
20611
20619
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-spacer" }),
|
|
@@ -20744,7 +20752,7 @@ function AutoAssignDialog2({
|
|
|
20744
20752
|
onApply,
|
|
20745
20753
|
onClose
|
|
20746
20754
|
}) {
|
|
20747
|
-
const { t } =
|
|
20755
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20748
20756
|
const titleId = react.useId();
|
|
20749
20757
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
20750
20758
|
const [genderAdjacency, setGenderAdjacency] = react.useState("AVOID_UNRELATED");
|
|
@@ -20906,7 +20914,7 @@ function DayFilter({
|
|
|
20906
20914
|
countByDay,
|
|
20907
20915
|
onSelect
|
|
20908
20916
|
}) {
|
|
20909
|
-
const { t } =
|
|
20917
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
20910
20918
|
const days = Array.from({ length: durationDays }, (_unused, index) => index);
|
|
20911
20919
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__days", children: [
|
|
20912
20920
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__days-label", children: t("chrome.tripVehicles.showDay") }),
|
|
@@ -21039,7 +21047,7 @@ function DeleteVehicleDialog({
|
|
|
21039
21047
|
onConfirm,
|
|
21040
21048
|
onClose
|
|
21041
21049
|
}) {
|
|
21042
|
-
const { t } =
|
|
21050
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21043
21051
|
const titleId = react.useId();
|
|
21044
21052
|
const released = occupantsOf(vehicle).length;
|
|
21045
21053
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21216,7 +21224,7 @@ function ManagerLinkDialog({
|
|
|
21216
21224
|
onClose,
|
|
21217
21225
|
onSubmit
|
|
21218
21226
|
}) {
|
|
21219
|
-
const { t } =
|
|
21227
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21220
21228
|
const titleId = react.useId();
|
|
21221
21229
|
const [chosen, setChosen] = react.useState(null);
|
|
21222
21230
|
const demotedFrom = chosen === null ? void 0 : managerVehicleByRef.get(chosen);
|
|
@@ -21293,7 +21301,7 @@ function UnassignedStrip2({
|
|
|
21293
21301
|
drag,
|
|
21294
21302
|
busy
|
|
21295
21303
|
}) {
|
|
21296
|
-
const { t } =
|
|
21304
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21297
21305
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21298
21306
|
"div",
|
|
21299
21307
|
{
|
|
@@ -21360,7 +21368,7 @@ function OccupantRoster({
|
|
|
21360
21368
|
variant,
|
|
21361
21369
|
emptyKey
|
|
21362
21370
|
}) {
|
|
21363
|
-
const { t } =
|
|
21371
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21364
21372
|
const target = { containerId: vehicleId, slotLabel: "" };
|
|
21365
21373
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === vehicleId && drag.overSlot.slotLabel === "";
|
|
21366
21374
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21404,7 +21412,7 @@ function OccupantRoster({
|
|
|
21404
21412
|
);
|
|
21405
21413
|
}
|
|
21406
21414
|
function SeatTile({ seat, vehicleId, drag, busy }) {
|
|
21407
|
-
const { t } =
|
|
21415
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21408
21416
|
const target = { containerId: vehicleId, slotLabel: seat.seatLabel };
|
|
21409
21417
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === target.containerId && drag.overSlot.slotLabel === target.slotLabel;
|
|
21410
21418
|
const occupant = seat.occupant;
|
|
@@ -21467,7 +21475,7 @@ function VehicleKebab({
|
|
|
21467
21475
|
onUnlinkManager,
|
|
21468
21476
|
onDelete
|
|
21469
21477
|
}) {
|
|
21470
|
-
const { t } =
|
|
21478
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21471
21479
|
const [open, setOpen] = react.useState(false);
|
|
21472
21480
|
const rootRef = react.useRef(null);
|
|
21473
21481
|
const triggerRef = react.useRef(null);
|
|
@@ -21577,7 +21585,7 @@ function VehicleCard({
|
|
|
21577
21585
|
onUnlinkManager,
|
|
21578
21586
|
onDelete
|
|
21579
21587
|
}) {
|
|
21580
|
-
const { t } =
|
|
21588
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21581
21589
|
const percent = fillPercent2(vehicle);
|
|
21582
21590
|
const days = daysLabel(vehicle.days);
|
|
21583
21591
|
const bodyId = `kf-vehicle-${vehicle.id}`;
|
|
@@ -21712,7 +21720,7 @@ function VehicleDaysDialog({
|
|
|
21712
21720
|
onClose,
|
|
21713
21721
|
onSubmit
|
|
21714
21722
|
}) {
|
|
21715
|
-
const { t } =
|
|
21723
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21716
21724
|
const titleId = react.useId();
|
|
21717
21725
|
const [selected, setSelected] = react.useState(vehicle.days);
|
|
21718
21726
|
const wholeTrip = selected.length === 0;
|
|
@@ -21811,7 +21819,7 @@ function VehicleFormDialog({
|
|
|
21811
21819
|
onClose,
|
|
21812
21820
|
onSubmit
|
|
21813
21821
|
}) {
|
|
21814
|
-
const { t } =
|
|
21822
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
21815
21823
|
const titleId = react.useId();
|
|
21816
21824
|
const isEdit = vehicle !== null;
|
|
21817
21825
|
const [regNo, setRegNo] = react.useState(vehicle?.regNo ?? "");
|
|
@@ -22006,7 +22014,7 @@ function VehiclesSkeleton() {
|
|
|
22006
22014
|
] }, id)) });
|
|
22007
22015
|
}
|
|
22008
22016
|
function VehiclesEmpty({ onAddVehicle }) {
|
|
22009
|
-
const { t } =
|
|
22017
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22010
22018
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", children: [
|
|
22011
22019
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon2, {}) }),
|
|
22012
22020
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.emptyTitle") }),
|
|
@@ -22015,7 +22023,7 @@ function VehiclesEmpty({ onAddVehicle }) {
|
|
|
22015
22023
|
] });
|
|
22016
22024
|
}
|
|
22017
22025
|
function VehiclesFailed({ onRetry }) {
|
|
22018
|
-
const { t } =
|
|
22026
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22019
22027
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", role: "alert", children: [
|
|
22020
22028
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.failedTitle") }),
|
|
22021
22029
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-vehicles-section__state-body", children: t("chrome.tripVehicles.failedBody") }),
|
|
@@ -22023,7 +22031,7 @@ function VehiclesFailed({ onRetry }) {
|
|
|
22023
22031
|
] });
|
|
22024
22032
|
}
|
|
22025
22033
|
function VehiclesDark({ reason }) {
|
|
22026
|
-
const { t } =
|
|
22034
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22027
22035
|
if (reason === "mode") {
|
|
22028
22036
|
return null;
|
|
22029
22037
|
}
|
|
@@ -22042,7 +22050,7 @@ function codeOf10(error) {
|
|
|
22042
22050
|
return classification?.code ?? "unknown";
|
|
22043
22051
|
}
|
|
22044
22052
|
function TripVehiclesSection(props) {
|
|
22045
|
-
const session =
|
|
22053
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
22046
22054
|
if (session.status !== "authenticated") {
|
|
22047
22055
|
return null;
|
|
22048
22056
|
}
|
|
@@ -22053,9 +22061,9 @@ function ReadyTripVehiclesSection({
|
|
|
22053
22061
|
durationDays,
|
|
22054
22062
|
style
|
|
22055
22063
|
}) {
|
|
22056
|
-
const { t } =
|
|
22057
|
-
const seating =
|
|
22058
|
-
const managers =
|
|
22064
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22065
|
+
const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
|
|
22066
|
+
const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
|
|
22059
22067
|
const [openVehicleId, setOpenVehicleId] = react.useState(null);
|
|
22060
22068
|
const [day, setDay] = react.useState(null);
|
|
22061
22069
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -22189,7 +22197,7 @@ function ReadyTripVehiclesSection({
|
|
|
22189
22197
|
return /* @__PURE__ */ jsxRuntime.jsx(VehiclesDark, { reason: seating.reason });
|
|
22190
22198
|
}
|
|
22191
22199
|
const pool = ready?.unassignedPool;
|
|
22192
|
-
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: [
|
|
22193
22201
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__toolbar", children: [
|
|
22194
22202
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-title", children: t("chrome.tripVehicles.panelLabel") }),
|
|
22195
22203
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-spacer" }),
|
|
@@ -22482,7 +22490,7 @@ function WarningIcon13(props) {
|
|
|
22482
22490
|
|
|
22483
22491
|
// src/admin/composite/office/TripWorkspace/internal/panels/deriveCloseout.ts
|
|
22484
22492
|
function tabForBlocker(row) {
|
|
22485
|
-
return
|
|
22493
|
+
return chunkODH3SYYW_cjs.resolveBlockerDeepLink({ actionKey: row.actionKey })?.tab;
|
|
22486
22494
|
}
|
|
22487
22495
|
function orderedBlockers(rows) {
|
|
22488
22496
|
return [...rows].sort((a, b) => {
|
|
@@ -22522,8 +22530,8 @@ function codeOf11(error) {
|
|
|
22522
22530
|
return classification?.code ?? "unknown";
|
|
22523
22531
|
}
|
|
22524
22532
|
function CloseoutCard({ tripRef, onOpenTab, litTabs }) {
|
|
22525
|
-
const { t } =
|
|
22526
|
-
const closeout =
|
|
22533
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22534
|
+
const closeout = chunkUSKVWPJD_cjs.useCloseout(tripRef);
|
|
22527
22535
|
const [note, setNote] = react.useState(null);
|
|
22528
22536
|
const [pending, setPending] = react.useState(void 0);
|
|
22529
22537
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -22730,7 +22738,7 @@ function AssignManagerDialog({
|
|
|
22730
22738
|
onClose,
|
|
22731
22739
|
onAssign
|
|
22732
22740
|
}) {
|
|
22733
|
-
const { t } =
|
|
22741
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22734
22742
|
const titleId = react.useId();
|
|
22735
22743
|
const [query, setQuery] = react.useState("");
|
|
22736
22744
|
const [selected, setSelected] = react.useState(null);
|
|
@@ -22862,8 +22870,8 @@ var ROLE_LABEL_KEY = {
|
|
|
22862
22870
|
COORDINATOR: "chrome.tripWorkspace.managers.roleCoordinator"
|
|
22863
22871
|
};
|
|
22864
22872
|
function OverviewManagersCard({ trip, onChanged }) {
|
|
22865
|
-
const { t } =
|
|
22866
|
-
const { promoteManager, assignManager, unassignManager, makeManagersFetch } =
|
|
22873
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
22874
|
+
const { promoteManager, assignManager, unassignManager, makeManagersFetch } = chunkODH3SYYW_cjs.useDirectories();
|
|
22867
22875
|
const [pendingId, setPendingId] = react.useState(void 0);
|
|
22868
22876
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
22869
22877
|
const [assignOpen, setAssignOpen] = react.useState(false);
|
|
@@ -23024,13 +23032,13 @@ function TripOverviewPanel({
|
|
|
23024
23032
|
onOpenTab,
|
|
23025
23033
|
onTripChanged
|
|
23026
23034
|
}) {
|
|
23027
|
-
const { t } =
|
|
23028
|
-
const today =
|
|
23029
|
-
const expenses =
|
|
23035
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23036
|
+
const today = chunkUSKVWPJD_cjs.useManagerToday(trip.ref);
|
|
23037
|
+
const expenses = chunkUSKVWPJD_cjs.useExpenses(trip.ref);
|
|
23030
23038
|
const spendTotalMinor = expenses.status === "ready" && expenses.totals.loaded && !expenses.totals.lastFetchFailed ? expenses.totals.spendTotalMinor : void 0;
|
|
23031
23039
|
const finance = deriveFinance(trip, spendTotalMinor);
|
|
23032
23040
|
const quickActions = QUICK_ACTION_TABS.filter((key) => litTabs.has(key));
|
|
23033
|
-
const closeoutProbe =
|
|
23041
|
+
const closeoutProbe = chunkUSKVWPJD_cjs.useCloseout(trip.ref);
|
|
23034
23042
|
const closeoutStage = closeoutProbe.status === "ready" && hasReturned(closeoutProbe.aggregate) ? closeoutProbe.aggregate?.stage ?? null : null;
|
|
23035
23043
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview", children: [
|
|
23036
23044
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview-main", children: [
|
|
@@ -23069,7 +23077,7 @@ function TripOverviewPanel({
|
|
|
23069
23077
|
function TodayCard({
|
|
23070
23078
|
today
|
|
23071
23079
|
}) {
|
|
23072
|
-
const { t } =
|
|
23080
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23073
23081
|
if (today.kind === "idle") return null;
|
|
23074
23082
|
const openChecklist = today.checklist ?? [];
|
|
23075
23083
|
const itinerary = today.itinerary ?? [];
|
|
@@ -23093,7 +23101,7 @@ function TodayCard({
|
|
|
23093
23101
|
function FinanceCard({
|
|
23094
23102
|
finance
|
|
23095
23103
|
}) {
|
|
23096
|
-
const { t } =
|
|
23104
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23097
23105
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-workspace__card", children: [
|
|
23098
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") }) }),
|
|
23099
23107
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__finance-body", children: [
|
|
@@ -23356,7 +23364,7 @@ var BLOCKER_BODY_KEY = {
|
|
|
23356
23364
|
capabilityDark: "chrome.tripWorkspace.blocker.capabilityDarkBody"
|
|
23357
23365
|
};
|
|
23358
23366
|
function TripTabPlaceholder({ tabKey, blocker }) {
|
|
23359
|
-
const { t } =
|
|
23367
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23360
23368
|
const label = t(TAB_LABEL_KEY[tabKey]);
|
|
23361
23369
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__placeholder", children: [
|
|
23362
23370
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-workspace__placeholder-glyph", children: blocker === "deferred" ? /* @__PURE__ */ jsxRuntime.jsx(ClockIcon2, {}) : /* @__PURE__ */ jsxRuntime.jsx(LockIcon11, {}) }),
|
|
@@ -23366,7 +23374,7 @@ function TripTabPlaceholder({ tabKey, blocker }) {
|
|
|
23366
23374
|
] });
|
|
23367
23375
|
}
|
|
23368
23376
|
function TripKpiStrip({ cells }) {
|
|
23369
|
-
const { t } =
|
|
23377
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23370
23378
|
if (cells.length === 0) return null;
|
|
23371
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: [
|
|
23372
23380
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-label", children: t(cell.labelKey) }),
|
|
@@ -23375,7 +23383,7 @@ function TripKpiStrip({ cells }) {
|
|
|
23375
23383
|
] }, cell.key)) });
|
|
23376
23384
|
}
|
|
23377
23385
|
function TripTabRail({ tabs, activeKey, onSelect }) {
|
|
23378
|
-
const { t } =
|
|
23386
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23379
23387
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23380
23388
|
"div",
|
|
23381
23389
|
{
|
|
@@ -23409,7 +23417,7 @@ var STATUS_LABEL_KEY9 = {
|
|
|
23409
23417
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
23410
23418
|
};
|
|
23411
23419
|
function TripWorkspaceHead({ trip, onBack, style }) {
|
|
23412
|
-
const { t } =
|
|
23420
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23413
23421
|
const head = deriveTripHead(trip);
|
|
23414
23422
|
const subLabelParts = [
|
|
23415
23423
|
head.dateRangeLabel,
|
|
@@ -23420,7 +23428,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23420
23428
|
trip.manifestCount === 1 ? "chrome.tripWorkspace.travellerCountOne" : "chrome.tripWorkspace.travellerCount"
|
|
23421
23429
|
).replace("{count}", String(trip.manifestCount))
|
|
23422
23430
|
];
|
|
23423
|
-
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: [
|
|
23424
23432
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__eyebrow", children: [
|
|
23425
23433
|
onBack === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
23426
23434
|
"button",
|
|
@@ -23452,7 +23460,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23452
23460
|
] }) });
|
|
23453
23461
|
}
|
|
23454
23462
|
function TripWorkspace(props) {
|
|
23455
|
-
const session =
|
|
23463
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
23456
23464
|
if (session.status !== "authenticated") {
|
|
23457
23465
|
return /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {});
|
|
23458
23466
|
}
|
|
@@ -23467,10 +23475,10 @@ function ReadyTripWorkspace({
|
|
|
23467
23475
|
components,
|
|
23468
23476
|
style
|
|
23469
23477
|
}) {
|
|
23470
|
-
const { t } =
|
|
23471
|
-
const { read, readFailed, refresh } =
|
|
23478
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23479
|
+
const { read, readFailed, refresh } = chunkODH3SYYW_cjs.useAgencyTrip(tripRef);
|
|
23472
23480
|
if (readFailed) {
|
|
23473
|
-
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: [
|
|
23474
23482
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon13, { className: "kf-trip-workspace__status-icon" }),
|
|
23475
23483
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-title", children: t("chrome.tripWorkspace.errorTitle") }),
|
|
23476
23484
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-body", children: t("chrome.tripWorkspace.errorBody") }),
|
|
@@ -23486,7 +23494,7 @@ function ReadyTripWorkspace({
|
|
|
23486
23494
|
] }) });
|
|
23487
23495
|
}
|
|
23488
23496
|
if (read === void 0) {
|
|
23489
|
-
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, {}) });
|
|
23490
23498
|
}
|
|
23491
23499
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23492
23500
|
TripWorkspaceBody,
|
|
@@ -23514,7 +23522,7 @@ function TripWorkspaceBody({
|
|
|
23514
23522
|
components,
|
|
23515
23523
|
style
|
|
23516
23524
|
}) {
|
|
23517
|
-
const { statuses, loaded } =
|
|
23525
|
+
const { statuses, loaded } = chunkODH3SYYW_cjs.useCapabilityStatuses(tripRef);
|
|
23518
23526
|
const Head = components?.TripWorkspaceHead ?? TripWorkspaceHead;
|
|
23519
23527
|
const tabs = react.useMemo(() => resolveTripTabs(trip.eventType, statuses), [trip.eventType, statuses]);
|
|
23520
23528
|
const [requestedTab, setRequestedTab] = react.useState(initialTab ?? "overview");
|
|
@@ -23598,7 +23606,7 @@ function TripWorkspaceBody({
|
|
|
23598
23606
|
}),
|
|
23599
23607
|
[trip, litTabs, tripRef, onTripChanged, onOpenTravellerProfile]
|
|
23600
23608
|
);
|
|
23601
|
-
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: [
|
|
23602
23610
|
/* @__PURE__ */ jsxRuntime.jsx(Head, { trip, ...onBack !== void 0 ? { onBack } : {} }),
|
|
23603
23611
|
/* @__PURE__ */ jsxRuntime.jsx(TripKpiStrip, { cells: kpis }),
|
|
23604
23612
|
loaded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -23795,7 +23803,7 @@ function AdminShell({
|
|
|
23795
23803
|
function renderNavIcon(iconKey) {
|
|
23796
23804
|
return NavIcon !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavIcon, { iconKey }) : navIcon(iconKey);
|
|
23797
23805
|
}
|
|
23798
|
-
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: [
|
|
23799
23807
|
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "kf-admin-shell__sidebar", children: [
|
|
23800
23808
|
brand !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell__brand", children: [
|
|
23801
23809
|
brand.logo !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shell__brand-logo", children: brand.logo }) : null,
|
|
@@ -23899,7 +23907,7 @@ function AdminShell({
|
|
|
23899
23907
|
] });
|
|
23900
23908
|
}
|
|
23901
23909
|
function KaafilAgencyWorkspace(props) {
|
|
23902
|
-
const session =
|
|
23910
|
+
const session = chunk5ORJRFXZ_cjs.useSession();
|
|
23903
23911
|
if (session.status !== "authenticated") {
|
|
23904
23912
|
return null;
|
|
23905
23913
|
}
|
|
@@ -23924,8 +23932,8 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
23924
23932
|
components,
|
|
23925
23933
|
style
|
|
23926
23934
|
} = props;
|
|
23927
|
-
const { t } =
|
|
23928
|
-
const agencyAdminMe =
|
|
23935
|
+
const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
|
|
23936
|
+
const agencyAdminMe = chunkODH3SYYW_cjs.useAgencyAdminMe();
|
|
23929
23937
|
const [internalPane, setInternalPane] = react.useState(
|
|
23930
23938
|
initialPane ?? "trips"
|
|
23931
23939
|
);
|
|
@@ -24186,27 +24194,27 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
24186
24194
|
|
|
24187
24195
|
Object.defineProperty(exports, "BootErrorScreen", {
|
|
24188
24196
|
enumerable: true,
|
|
24189
|
-
get: function () { return
|
|
24197
|
+
get: function () { return chunkT5JYKERY_cjs.BootErrorScreen; }
|
|
24190
24198
|
});
|
|
24191
24199
|
Object.defineProperty(exports, "LockedTripScreen", {
|
|
24192
24200
|
enumerable: true,
|
|
24193
|
-
get: function () { return
|
|
24201
|
+
get: function () { return chunkT5JYKERY_cjs.LockedTripScreen; }
|
|
24194
24202
|
});
|
|
24195
24203
|
Object.defineProperty(exports, "NotFoundScreen", {
|
|
24196
24204
|
enumerable: true,
|
|
24197
|
-
get: function () { return
|
|
24205
|
+
get: function () { return chunkT5JYKERY_cjs.NotFoundScreen; }
|
|
24198
24206
|
});
|
|
24199
24207
|
Object.defineProperty(exports, "OfflineFallbackScreen", {
|
|
24200
24208
|
enumerable: true,
|
|
24201
|
-
get: function () { return
|
|
24209
|
+
get: function () { return chunkT5JYKERY_cjs.OfflineFallbackScreen; }
|
|
24202
24210
|
});
|
|
24203
24211
|
Object.defineProperty(exports, "PlanLockedScreen", {
|
|
24204
24212
|
enumerable: true,
|
|
24205
|
-
get: function () { return
|
|
24213
|
+
get: function () { return chunkT5JYKERY_cjs.PlanLockedScreen; }
|
|
24206
24214
|
});
|
|
24207
24215
|
Object.defineProperty(exports, "SessionExpiredScreen", {
|
|
24208
24216
|
enumerable: true,
|
|
24209
|
-
get: function () { return
|
|
24217
|
+
get: function () { return chunkT5JYKERY_cjs.SessionExpiredScreen; }
|
|
24210
24218
|
});
|
|
24211
24219
|
exports.AdminShell = AdminShell;
|
|
24212
24220
|
exports.AgencySettingsScreen = AgencySettingsScreen;
|