kaafil-react-uikit 0.12.0 → 0.13.0
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 +62 -0
- package/dist/admin/index.cjs +363 -381
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +6 -24
- package/dist/admin/index.js.map +1 -1
- package/dist/chunk-5QFW5GL4.cjs +24 -0
- package/dist/chunk-5QFW5GL4.cjs.map +1 -0
- package/dist/{chunk-5ORJRFXZ.cjs → chunk-64AFXHOF.cjs} +6 -4
- package/dist/chunk-64AFXHOF.cjs.map +1 -0
- package/dist/{chunk-YJJ4DI42.js → chunk-AKJLIH5A.js} +6 -4
- package/dist/chunk-AKJLIH5A.js.map +1 -0
- package/dist/{chunk-ZKLX6YRT.js → chunk-BT2ZX3JY.js} +5 -5
- package/dist/{chunk-ZKLX6YRT.js.map → chunk-BT2ZX3JY.js.map} +1 -1
- package/dist/{chunk-U6IE2UYL.js → chunk-CJLQ2Z4Q.js} +3 -3
- package/dist/{chunk-U6IE2UYL.js.map → chunk-CJLQ2Z4Q.js.map} +1 -1
- package/dist/{chunk-F2ENMVT7.js → chunk-DXDSCQLC.js} +3 -3
- package/dist/{chunk-F2ENMVT7.js.map → chunk-DXDSCQLC.js.map} +1 -1
- package/dist/{chunk-ARXY3ZA7.cjs → chunk-GD5UU4G6.cjs} +85 -85
- package/dist/{chunk-ARXY3ZA7.cjs.map → chunk-GD5UU4G6.cjs.map} +1 -1
- package/dist/{chunk-RCWSMWQD.js → chunk-IAKK2CKB.js} +3 -3
- package/dist/{chunk-RCWSMWQD.js.map → chunk-IAKK2CKB.js.map} +1 -1
- package/dist/chunk-JOUTGBUJ.js +22 -0
- package/dist/chunk-JOUTGBUJ.js.map +1 -0
- package/dist/{chunk-KJSQLVBR.cjs → chunk-JY2C4S3J.cjs} +55 -55
- package/dist/{chunk-KJSQLVBR.cjs.map → chunk-JY2C4S3J.cjs.map} +1 -1
- package/dist/chunk-KFOCETDW.cjs +12 -0
- package/dist/{chunk-YKBA4WQJ.cjs.map → chunk-KFOCETDW.cjs.map} +1 -1
- package/dist/{chunk-T5JYKERY.cjs → chunk-LSOV3FJL.cjs} +12 -12
- package/dist/{chunk-T5JYKERY.cjs.map → chunk-LSOV3FJL.cjs.map} +1 -1
- package/dist/{chunk-XGPX7TYV.js → chunk-LW2YB7VC.js} +3 -3
- package/dist/{chunk-XGPX7TYV.js.map → chunk-LW2YB7VC.js.map} +1 -1
- package/dist/{chunk-6QSHORU3.cjs → chunk-MLVS5KS6.cjs} +17 -17
- package/dist/{chunk-6QSHORU3.cjs.map → chunk-MLVS5KS6.cjs.map} +1 -1
- package/dist/{chunk-XWU5MCY3.cjs → chunk-TCVXLZ4H.cjs} +9 -9
- package/dist/{chunk-XWU5MCY3.cjs.map → chunk-TCVXLZ4H.cjs.map} +1 -1
- package/dist/{chunk-LJO2FGFD.js → chunk-TFFHYZMZ.js} +5 -5
- package/dist/{chunk-LJO2FGFD.js.map → chunk-TFFHYZMZ.js.map} +1 -1
- package/dist/{chunk-VHBGE4BY.cjs → chunk-XNZU6ZLX.cjs} +4 -4
- package/dist/{chunk-VHBGE4BY.cjs.map → chunk-XNZU6ZLX.cjs.map} +1 -1
- package/dist/{chunk-LOLQNRIK.js → chunk-YSJXNKCU.js} +3 -3
- package/dist/{chunk-LOLQNRIK.js.map → chunk-YSJXNKCU.js.map} +1 -1
- package/dist/core/index.cjs +107 -107
- package/dist/core/index.js +10 -10
- package/dist/manager/index.cjs +273 -298
- package/dist/manager/index.cjs.map +1 -1
- package/dist/manager/index.d.cts +46 -2
- package/dist/manager/index.d.ts +46 -2
- package/dist/manager/index.js +21 -46
- 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 +14 -14
- package/dist/chunk-5ORJRFXZ.cjs.map +0 -1
- package/dist/chunk-YJJ4DI42.js.map +0 -1
- package/dist/chunk-YKBA4WQJ.cjs +0 -12
package/dist/admin/index.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
|
|
7
|
-
var
|
|
3
|
+
var chunkJY2C4S3J_cjs = require('../chunk-JY2C4S3J.cjs');
|
|
4
|
+
var chunk5QFW5GL4_cjs = require('../chunk-5QFW5GL4.cjs');
|
|
5
|
+
var chunkGD5UU4G6_cjs = require('../chunk-GD5UU4G6.cjs');
|
|
6
|
+
require('../chunk-XNZU6ZLX.cjs');
|
|
7
|
+
var chunkLSOV3FJL_cjs = require('../chunk-LSOV3FJL.cjs');
|
|
8
|
+
var chunk64AFXHOF_cjs = require('../chunk-64AFXHOF.cjs');
|
|
8
9
|
var react = require('react');
|
|
9
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
11
|
|
|
@@ -109,13 +110,13 @@ function CloseIcon(props) {
|
|
|
109
110
|
);
|
|
110
111
|
}
|
|
111
112
|
function StatusPill({ tone, children, style }) {
|
|
112
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style:
|
|
113
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
113
114
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-pill-dot", "aria-hidden": "true" }),
|
|
114
115
|
children
|
|
115
116
|
] });
|
|
116
117
|
}
|
|
117
118
|
function Tag({ tone, children, style }) {
|
|
118
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style:
|
|
119
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style: chunk64AFXHOF_cjs.tokenStyle(style), children });
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
// src/admin/composite/office/AgencySettingsScreen/internal/fieldDisplayValue.ts
|
|
@@ -183,7 +184,7 @@ function SheetDialog({
|
|
|
183
184
|
role: "dialog",
|
|
184
185
|
"aria-modal": "true",
|
|
185
186
|
"aria-labelledby": titleId,
|
|
186
|
-
style:
|
|
187
|
+
style: chunk64AFXHOF_cjs.tokenStyle(style),
|
|
187
188
|
children: [
|
|
188
189
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-sheet-header", children: [
|
|
189
190
|
eyebrow === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-admin-shared-patterns-sheet-eyebrow", children: eyebrow }),
|
|
@@ -479,7 +480,7 @@ function TriStateToggle({ entry, onChange, t }) {
|
|
|
479
480
|
function NoRender() {
|
|
480
481
|
return null;
|
|
481
482
|
}
|
|
482
|
-
var fieldKindRegistry =
|
|
483
|
+
var fieldKindRegistry = chunk64AFXHOF_cjs.createRegistry({
|
|
483
484
|
fallback: { render: NoRender }
|
|
484
485
|
});
|
|
485
486
|
fieldKindRegistry.register("toggle", {
|
|
@@ -629,11 +630,11 @@ function SectionCard({
|
|
|
629
630
|
onDismissError,
|
|
630
631
|
style
|
|
631
632
|
}) {
|
|
632
|
-
const { t } =
|
|
633
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
633
634
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
634
635
|
const setFields = section.fields.filter((field) => stored?.[field.key] !== void 0);
|
|
635
636
|
const isCustomized = setFields.length > 0;
|
|
636
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style:
|
|
637
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
637
638
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-agency-settings-screen__panel-head", children: [
|
|
638
639
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-head-copy", children: [
|
|
639
640
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "kf-agency-settings-screen__panel-eyebrow", children: [
|
|
@@ -811,7 +812,6 @@ var AGENCY_SETTINGS_SECTIONS = [
|
|
|
811
812
|
{ value: "couples", labelKey: `${K}.rooming.strategy.couples` },
|
|
812
813
|
{ value: "parties", labelKey: `${K}.rooming.strategy.parties` },
|
|
813
814
|
{ value: "gender", labelKey: `${K}.rooming.strategy.gender` },
|
|
814
|
-
{ value: "diet", labelKey: `${K}.rooming.strategy.diet` },
|
|
815
815
|
{ value: "spreadSolos", labelKey: `${K}.rooming.strategy.spreadSolos` },
|
|
816
816
|
{ value: "partyGenderPolicy", labelKey: `${K}.rooming.strategy.partyGenderPolicy` },
|
|
817
817
|
{ value: "sameBus", labelKey: `${K}.rooming.strategy.sameBus` }
|
|
@@ -1000,7 +1000,7 @@ function orderSectionsByCustomized(sections, isCustomized) {
|
|
|
1000
1000
|
];
|
|
1001
1001
|
}
|
|
1002
1002
|
function AgencySettingsScreen(props) {
|
|
1003
|
-
const session =
|
|
1003
|
+
const session = chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
1016
|
+
const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } = chunkJY2C4S3J_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 = chunkGD5UU4G6_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
1714
|
+
const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } = chunkJY2C4S3J_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: chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
2314
|
+
const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } = chunkJY2C4S3J_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: chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
2646
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style: chunk64AFXHOF_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 = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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
|
+
} = chunkJY2C4S3J_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: chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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(chunkGD5UU4G6_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
4927
|
+
const { forms, loaded, lastFetchFailed, refresh, createForm } = chunkJY2C4S3J_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: chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
5305
|
+
const directories = chunkJY2C4S3J_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(chunkGD5UU4G6_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 } = chunkJY2C4S3J_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
5694
|
+
const { read, readFailed, refresh } = chunkJY2C4S3J_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: chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
5766
|
+
const directories = chunkJY2C4S3J_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(chunkGD5UU4G6_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
6141
|
+
const directories = chunkJY2C4S3J_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(chunkGD5UU4G6_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 } = chunkJY2C4S3J_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 } = chunk64AFXHOF_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: chunk64AFXHOF_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 = chunk64AFXHOF_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 } = chunk64AFXHOF_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 } = chunk64AFXHOF_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") }),
|
|
@@ -6501,24 +6501,6 @@ function TravellerNotesList({ notes }) {
|
|
|
6501
6501
|
] }, note.id)) })
|
|
6502
6502
|
] });
|
|
6503
6503
|
}
|
|
6504
|
-
|
|
6505
|
-
// src/admin/composite/office/TravellerProfileSection/internal/normalizeDiet.ts
|
|
6506
|
-
function normalizeDiet(raw) {
|
|
6507
|
-
if (raw === null) {
|
|
6508
|
-
return null;
|
|
6509
|
-
}
|
|
6510
|
-
const upper = raw.trim().toUpperCase();
|
|
6511
|
-
if (upper === "V" || upper === "VEG" || upper === "VEGETARIAN") {
|
|
6512
|
-
return "V";
|
|
6513
|
-
}
|
|
6514
|
-
if (upper === "NV" || upper === "NON-VEG" || upper === "NONVEG" || upper === "NON_VEG") {
|
|
6515
|
-
return "NV";
|
|
6516
|
-
}
|
|
6517
|
-
if (upper === "J" || upper === "JAIN") {
|
|
6518
|
-
return "J";
|
|
6519
|
-
}
|
|
6520
|
-
return null;
|
|
6521
|
-
}
|
|
6522
6504
|
function formatDateOfBirth(iso) {
|
|
6523
6505
|
if (iso === null) {
|
|
6524
6506
|
return null;
|
|
@@ -6530,11 +6512,11 @@ function formatDateOfBirth(iso) {
|
|
|
6530
6512
|
});
|
|
6531
6513
|
}
|
|
6532
6514
|
function TravellerPersonalCard({ profile }) {
|
|
6533
|
-
const { t } =
|
|
6515
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
6534
6516
|
const p = profile.profile;
|
|
6535
6517
|
const dob = formatDateOfBirth(p.dateOfBirth);
|
|
6536
6518
|
const email = p.email ?? profile.email;
|
|
6537
|
-
const diet = normalizeDiet(profile.dietary);
|
|
6519
|
+
const diet = chunk5QFW5GL4_cjs.normalizeDiet(profile.dietary);
|
|
6538
6520
|
const dash = t("chrome.travellerProfileSection.personal.none");
|
|
6539
6521
|
const mealValue = p.mealPreference ?? (diet !== null ? t(`chrome.travellerProfileSection.dietary.diet.${diet}`) : null);
|
|
6540
6522
|
const emergency = p.emergencyName === null ? null : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-traveller-profile-section__emergency-value", children: [
|
|
@@ -6645,7 +6627,7 @@ function formatMinor2(minor, currency) {
|
|
|
6645
6627
|
}).format(minor / 100);
|
|
6646
6628
|
}
|
|
6647
6629
|
function TravellerProfileHero({ profile, onBack }) {
|
|
6648
|
-
const { t } =
|
|
6630
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
6649
6631
|
const initials = initialsFromName4(profile.fullName);
|
|
6650
6632
|
const { lifetime } = profile;
|
|
6651
6633
|
const stats = lifetime.currency !== null ? [
|
|
@@ -6736,7 +6718,7 @@ function formatMinor3(minor, currency) {
|
|
|
6736
6718
|
}).format(minor / 100);
|
|
6737
6719
|
}
|
|
6738
6720
|
function TravellerTripHistoryTable({ trips }) {
|
|
6739
|
-
const { t } =
|
|
6721
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
6740
6722
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6741
6723
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
6742
6724
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.trips.title") }),
|
|
@@ -6787,7 +6769,7 @@ function TravellerProfileSection({
|
|
|
6787
6769
|
components,
|
|
6788
6770
|
style
|
|
6789
6771
|
}) {
|
|
6790
|
-
const { t } =
|
|
6772
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
6791
6773
|
const { read, readFailed, refresh } = useAgencyTravellerProfile(travellerRef);
|
|
6792
6774
|
const Hero = components?.Hero ?? TravellerProfileHero;
|
|
6793
6775
|
const PersonalCard = components?.PersonalCard ?? TravellerPersonalCard;
|
|
@@ -6795,7 +6777,7 @@ function TravellerProfileSection({
|
|
|
6795
6777
|
const TripHistoryTable = components?.TripHistoryTable ?? TravellerTripHistoryTable;
|
|
6796
6778
|
const NotesList = components?.NotesList ?? TravellerNotesList;
|
|
6797
6779
|
if (readFailed) {
|
|
6798
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style:
|
|
6780
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__status-block", role: "alert", children: [
|
|
6799
6781
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon9, { className: "kf-traveller-profile-section__status-icon kf-traveller-profile-section__status-icon--danger" }),
|
|
6800
6782
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-title", children: t("chrome.travellerProfileSection.errorTitle") }),
|
|
6801
6783
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-body", children: t("chrome.travellerProfileSection.errorBody") }),
|
|
@@ -6811,9 +6793,9 @@ function TravellerProfileSection({
|
|
|
6811
6793
|
] }) });
|
|
6812
6794
|
}
|
|
6813
6795
|
if (read === void 0) {
|
|
6814
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style:
|
|
6796
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TravellerProfileSkeleton, {}) });
|
|
6815
6797
|
}
|
|
6816
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style:
|
|
6798
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
6817
6799
|
/* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
|
|
6818
6800
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__body", children: [
|
|
6819
6801
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__column", children: [
|
|
@@ -6905,7 +6887,7 @@ function ToggleSwitch({
|
|
|
6905
6887
|
disabled,
|
|
6906
6888
|
className: "kf-admin-shared-patterns-toggle-row",
|
|
6907
6889
|
onClick: () => onChange(!checked),
|
|
6908
|
-
style:
|
|
6890
|
+
style: chunk64AFXHOF_cjs.tokenStyle(style),
|
|
6909
6891
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6910
6892
|
"span",
|
|
6911
6893
|
{
|
|
@@ -7343,7 +7325,7 @@ function TriggerDetailPanel({
|
|
|
7343
7325
|
style
|
|
7344
7326
|
}) {
|
|
7345
7327
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
7346
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style:
|
|
7328
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
7347
7329
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail-head", children: [
|
|
7348
7330
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trigger-template-editor__detail-eyebrow", children: t("chrome.triggerTemplateEditor.selected") }),
|
|
7349
7331
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7427,8 +7409,8 @@ function TriggerTemplateEditor({
|
|
|
7427
7409
|
onTriggerPatched,
|
|
7428
7410
|
style
|
|
7429
7411
|
}) {
|
|
7430
|
-
const { t } =
|
|
7431
|
-
const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } =
|
|
7412
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7413
|
+
const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } = chunkJY2C4S3J_cjs.useAgencyJourneyTriggers();
|
|
7432
7414
|
const [savingId, setSavingId] = react.useState(void 0);
|
|
7433
7415
|
const [selectedId, setSelectedId] = react.useState(void 0);
|
|
7434
7416
|
const filtered = tripModeFilter === void 0 ? triggers : triggers.filter((trigger) => trigger.tripMode === tripModeFilter);
|
|
@@ -7463,7 +7445,7 @@ function TriggerTemplateEditor({
|
|
|
7463
7445
|
setSavingId(void 0);
|
|
7464
7446
|
}
|
|
7465
7447
|
}
|
|
7466
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style:
|
|
7448
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
7467
7449
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__heading", children: [
|
|
7468
7450
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trigger-template-editor__title", children: title }),
|
|
7469
7451
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trigger-template-editor__subtitle", children: subtitle }) : null
|
|
@@ -7611,14 +7593,14 @@ function BookingsSkeleton() {
|
|
|
7611
7593
|
] }, id)) });
|
|
7612
7594
|
}
|
|
7613
7595
|
function BookingsEmpty() {
|
|
7614
|
-
const { t } =
|
|
7596
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7615
7597
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", children: [
|
|
7616
7598
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.emptyTitle") }),
|
|
7617
7599
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.emptyBody") })
|
|
7618
7600
|
] });
|
|
7619
7601
|
}
|
|
7620
7602
|
function BookingsFailed({ onRetry }) {
|
|
7621
|
-
const { t } =
|
|
7603
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7622
7604
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", role: "alert", children: [
|
|
7623
7605
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.failedTitle") }),
|
|
7624
7606
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.failedBody") }),
|
|
@@ -7626,7 +7608,7 @@ function BookingsFailed({ onRetry }) {
|
|
|
7626
7608
|
] });
|
|
7627
7609
|
}
|
|
7628
7610
|
function BookingsDark({ reason }) {
|
|
7629
|
-
const { t } =
|
|
7611
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7630
7612
|
if (reason === "mode") return null;
|
|
7631
7613
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", "data-dark": reason, children: [
|
|
7632
7614
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t(
|
|
@@ -7667,7 +7649,7 @@ function voucherCount(row) {
|
|
|
7667
7649
|
}
|
|
7668
7650
|
var DAY = { day: "numeric", month: "short", year: "numeric" };
|
|
7669
7651
|
function TripBookingsSection(props) {
|
|
7670
|
-
const session =
|
|
7652
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
7671
7653
|
if (session.status !== "authenticated") {
|
|
7672
7654
|
return null;
|
|
7673
7655
|
}
|
|
@@ -7678,8 +7660,8 @@ function ReadyTripBookingsSection({
|
|
|
7678
7660
|
onOpenDocuments,
|
|
7679
7661
|
style
|
|
7680
7662
|
}) {
|
|
7681
|
-
const { t } =
|
|
7682
|
-
const bookings =
|
|
7663
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7664
|
+
const bookings = chunkJY2C4S3J_cjs.useBookings(tripRef);
|
|
7683
7665
|
const ready = bookings.status === "ready" ? bookings : null;
|
|
7684
7666
|
const groups = react.useMemo(
|
|
7685
7667
|
() => ready === null ? [] : groupByKind(liveBookings(ready.bookings)),
|
|
@@ -7689,7 +7671,7 @@ function ReadyTripBookingsSection({
|
|
|
7689
7671
|
const unreadable = ready !== null && ready.syncedAt === void 0;
|
|
7690
7672
|
const refreshLive = ready?.refreshLive;
|
|
7691
7673
|
if (bookings.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(BookingsDark, { reason: bookings.reason });
|
|
7692
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style:
|
|
7674
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
7693
7675
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-bookings-section__head", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__head-text", children: [
|
|
7694
7676
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-bookings-section__title", children: t("chrome.tripBookings.panelLabel") }),
|
|
7695
7677
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__subtitle", children: t("chrome.tripBookings.subtitle").replace("{count}", String(total)) })
|
|
@@ -7761,7 +7743,7 @@ function LockIcon2() {
|
|
|
7761
7743
|
);
|
|
7762
7744
|
}
|
|
7763
7745
|
function CloseoutLockNotice({ whatKey }) {
|
|
7764
|
-
const { t } =
|
|
7746
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7765
7747
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-closeout-lock", role: "status", children: [
|
|
7766
7748
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-closeout-lock__glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon2, {}) }),
|
|
7767
7749
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-closeout-lock__body", children: [
|
|
@@ -7865,7 +7847,7 @@ function ChecklistSkeleton() {
|
|
|
7865
7847
|
] }, column)) });
|
|
7866
7848
|
}
|
|
7867
7849
|
function ChecklistEmpty({ onPull }) {
|
|
7868
|
-
const { t } =
|
|
7850
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7869
7851
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
|
|
7870
7852
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistIcon, {}) }),
|
|
7871
7853
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.emptyTitle") }),
|
|
@@ -7874,7 +7856,7 @@ function ChecklistEmpty({ onPull }) {
|
|
|
7874
7856
|
] });
|
|
7875
7857
|
}
|
|
7876
7858
|
function ChecklistFailed({ onRetry }) {
|
|
7877
|
-
const { t } =
|
|
7859
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7878
7860
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
|
|
7879
7861
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.failedTitle") }),
|
|
7880
7862
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-checklist-section__state-body", children: t("chrome.tripChecklist.failedBody") }),
|
|
@@ -7882,7 +7864,7 @@ function ChecklistFailed({ onRetry }) {
|
|
|
7882
7864
|
] });
|
|
7883
7865
|
}
|
|
7884
7866
|
function ChecklistDark({ reason }) {
|
|
7885
|
-
const { t } =
|
|
7867
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7886
7868
|
if (reason === "mode") return null;
|
|
7887
7869
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", "data-dark": reason, children: [
|
|
7888
7870
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon3, {}) }),
|
|
@@ -7982,7 +7964,7 @@ function ItemDialog({
|
|
|
7982
7964
|
onClose,
|
|
7983
7965
|
onSubmit
|
|
7984
7966
|
}) {
|
|
7985
|
-
const { t } =
|
|
7967
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
7986
7968
|
const titleId = react.useId();
|
|
7987
7969
|
const [values, setValues] = react.useState(initial);
|
|
7988
7970
|
const [sectionChoice, setSectionChoice] = react.useState(
|
|
@@ -8179,7 +8161,7 @@ function ChecklistItemRow({
|
|
|
8179
8161
|
onToggle,
|
|
8180
8162
|
onEdit
|
|
8181
8163
|
}) {
|
|
8182
|
-
const { t } =
|
|
8164
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
8183
8165
|
const complete = item.status === "COMPLETE";
|
|
8184
8166
|
const day = dayOffsetLabel(item.dayOffset);
|
|
8185
8167
|
const actorKey = actorLabelKey(item.performedByKind);
|
|
@@ -8231,7 +8213,7 @@ function SectionCard2({
|
|
|
8231
8213
|
onAddToSection,
|
|
8232
8214
|
ItemRow: ItemRow2 = ChecklistItemRow
|
|
8233
8215
|
}) {
|
|
8234
|
-
const { t } =
|
|
8216
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
8235
8217
|
const openMandatory = items.filter((one) => one.isMandatory && one.status === "OPEN").length;
|
|
8236
8218
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section__section", children: [
|
|
8237
8219
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-checklist-section__section-head", children: [
|
|
@@ -8285,7 +8267,7 @@ function PhasePanel({
|
|
|
8285
8267
|
onAddToPhase,
|
|
8286
8268
|
ItemRow: ItemRow2
|
|
8287
8269
|
}) {
|
|
8288
|
-
const { t } =
|
|
8270
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
8289
8271
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sections.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__phase-empty", children: [
|
|
8290
8272
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("chrome.tripChecklist.phaseEmpty") }),
|
|
8291
8273
|
readOnly ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8321,7 +8303,7 @@ function PhaseSwitcher({
|
|
|
8321
8303
|
value,
|
|
8322
8304
|
onChange
|
|
8323
8305
|
}) {
|
|
8324
|
-
const { t } =
|
|
8306
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
8325
8307
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-checklist-section__segment", children: [
|
|
8326
8308
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripChecklist.phaseLabel") }),
|
|
8327
8309
|
OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8354,7 +8336,7 @@ function TemplatePickerDialog({
|
|
|
8354
8336
|
onClose,
|
|
8355
8337
|
onPull
|
|
8356
8338
|
}) {
|
|
8357
|
-
const { t } =
|
|
8339
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
8358
8340
|
const titleId = react.useId();
|
|
8359
8341
|
const [selectedId, setSelectedId] = react.useState(null);
|
|
8360
8342
|
const [mode, setMode] = react.useState("append");
|
|
@@ -8476,7 +8458,7 @@ function codeOf(error) {
|
|
|
8476
8458
|
return classification?.code ?? "unknown";
|
|
8477
8459
|
}
|
|
8478
8460
|
function TripChecklistSection(props) {
|
|
8479
|
-
const session =
|
|
8461
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
8480
8462
|
if (session.status !== "authenticated") {
|
|
8481
8463
|
return null;
|
|
8482
8464
|
}
|
|
@@ -8490,8 +8472,8 @@ function ReadyTripChecklistSection({
|
|
|
8490
8472
|
components,
|
|
8491
8473
|
style
|
|
8492
8474
|
}) {
|
|
8493
|
-
const { t } =
|
|
8494
|
-
const checklists =
|
|
8475
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
8476
|
+
const checklists = chunkGD5UU4G6_cjs.useChecklists(tripRef);
|
|
8495
8477
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
8496
8478
|
const [pending, setPending] = react.useState(false);
|
|
8497
8479
|
const [busyItemId, setBusyItemId] = react.useState(null);
|
|
@@ -8658,7 +8640,7 @@ function ReadyTripChecklistSection({
|
|
|
8658
8640
|
const inert = readOnly || locked;
|
|
8659
8641
|
const unreadable = aggregate?.lastFetchFailed === true && aggregate.loaded === false;
|
|
8660
8642
|
const percent = overallPercent(aggregate?.progress);
|
|
8661
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style:
|
|
8643
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
8662
8644
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head", children: [
|
|
8663
8645
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head-text", children: [
|
|
8664
8646
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-checklist-section__title", children: t("chrome.tripChecklist.panelLabel") }),
|
|
@@ -9047,7 +9029,7 @@ var STATUS_LABEL_KEY5 = {
|
|
|
9047
9029
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
9048
9030
|
};
|
|
9049
9031
|
function TripRow({ trip, index, onOpen, style }) {
|
|
9050
|
-
const { t } =
|
|
9032
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9051
9033
|
const derived = deriveTripRow(trip, index);
|
|
9052
9034
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9053
9035
|
"tr",
|
|
@@ -9055,7 +9037,7 @@ function TripRow({ trip, index, onOpen, style }) {
|
|
|
9055
9037
|
role: "row",
|
|
9056
9038
|
className: "kf-trip-directory-flow__row",
|
|
9057
9039
|
"data-dimming": derived.dimming === "none" ? void 0 : derived.dimming,
|
|
9058
|
-
style:
|
|
9040
|
+
style: chunk64AFXHOF_cjs.tokenStyle(style),
|
|
9059
9041
|
children: [
|
|
9060
9042
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9061
9043
|
"td",
|
|
@@ -9174,8 +9156,8 @@ function TripResultsListBody({
|
|
|
9174
9156
|
hasActiveFilter,
|
|
9175
9157
|
onRetry
|
|
9176
9158
|
}) {
|
|
9177
|
-
const { t } =
|
|
9178
|
-
const { makeTripsFetch } =
|
|
9159
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9160
|
+
const { makeTripsFetch } = chunkJY2C4S3J_cjs.useAgencyTrips();
|
|
9179
9161
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
9180
9162
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
9181
9163
|
const Row = TripRowComponent ?? TripRow;
|
|
@@ -9186,7 +9168,7 @@ function TripResultsListBody({
|
|
|
9186
9168
|
setErrorCode(void 0);
|
|
9187
9169
|
return page;
|
|
9188
9170
|
} catch (error) {
|
|
9189
|
-
setErrorCode(
|
|
9171
|
+
setErrorCode(chunkGD5UU4G6_cjs.classifyError(error).code ?? "unknown");
|
|
9190
9172
|
return { rows: [], nextCursor: void 0 };
|
|
9191
9173
|
} finally {
|
|
9192
9174
|
setHasSettled(true);
|
|
@@ -9194,7 +9176,7 @@ function TripResultsListBody({
|
|
|
9194
9176
|
},
|
|
9195
9177
|
[makeTripsFetch, filters]
|
|
9196
9178
|
);
|
|
9197
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
9179
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkJY2C4S3J_cjs.usePaginatedList(fetch);
|
|
9198
9180
|
const isLoading = !hasSettled;
|
|
9199
9181
|
const reportedCount = isLoading || errorCode !== void 0 ? void 0 : rows.length;
|
|
9200
9182
|
react.useEffect(() => {
|
|
@@ -9296,7 +9278,7 @@ function TripSearchInput({
|
|
|
9296
9278
|
debounceMs,
|
|
9297
9279
|
onDebouncedChange
|
|
9298
9280
|
}) {
|
|
9299
|
-
const { t } =
|
|
9281
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9300
9282
|
const [value, setValue] = react.useState("");
|
|
9301
9283
|
react.useEffect(() => {
|
|
9302
9284
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -9366,7 +9348,7 @@ function TripDirectoryFlow({
|
|
|
9366
9348
|
components,
|
|
9367
9349
|
style
|
|
9368
9350
|
}) {
|
|
9369
|
-
const { t } =
|
|
9351
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9370
9352
|
const [eventType, setEventType] = react.useState(initialEventType ?? "TRIP");
|
|
9371
9353
|
const [segment, setSegment] = react.useState("all");
|
|
9372
9354
|
const [q, setQ] = react.useState("");
|
|
@@ -9386,7 +9368,7 @@ function TripDirectoryFlow({
|
|
|
9386
9368
|
);
|
|
9387
9369
|
const filterKey = react.useMemo(() => JSON.stringify(filters), [filters]);
|
|
9388
9370
|
const hasActiveFilter = segment !== "all" || q.length > 0 || status !== void 0;
|
|
9389
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style:
|
|
9371
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
9390
9372
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar", children: [
|
|
9391
9373
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar-row", children: [
|
|
9392
9374
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9652,7 +9634,7 @@ function DocumentRow({
|
|
|
9652
9634
|
onWithdraw,
|
|
9653
9635
|
withdrawing = false
|
|
9654
9636
|
}) {
|
|
9655
|
-
const { t } =
|
|
9637
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9656
9638
|
const { file, spend } = row;
|
|
9657
9639
|
const purged = file.status === "purged";
|
|
9658
9640
|
const retention = retentionStateOf(file);
|
|
@@ -9726,7 +9708,7 @@ function DocumentsSkeleton() {
|
|
|
9726
9708
|
] }, id)) });
|
|
9727
9709
|
}
|
|
9728
9710
|
function DocumentsEmpty() {
|
|
9729
|
-
const { t } =
|
|
9711
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9730
9712
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", children: [
|
|
9731
9713
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-documents-section__state-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(EmptyDocumentsIcon, {}) }),
|
|
9732
9714
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.emptyTitle") }),
|
|
@@ -9734,7 +9716,7 @@ function DocumentsEmpty() {
|
|
|
9734
9716
|
] });
|
|
9735
9717
|
}
|
|
9736
9718
|
function DocumentsFailed({ onRetry }) {
|
|
9737
|
-
const { t } =
|
|
9719
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9738
9720
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", role: "alert", children: [
|
|
9739
9721
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.failedTitle") }),
|
|
9740
9722
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__state-body", children: t("chrome.tripDocuments.failedBody") }),
|
|
@@ -9742,7 +9724,7 @@ function DocumentsFailed({ onRetry }) {
|
|
|
9742
9724
|
] });
|
|
9743
9725
|
}
|
|
9744
9726
|
function DocumentsDark({ reason }) {
|
|
9745
|
-
const { t } =
|
|
9727
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9746
9728
|
if (reason === "mode") return null;
|
|
9747
9729
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", "data-dark": reason, children: [
|
|
9748
9730
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t(
|
|
@@ -9765,7 +9747,7 @@ function DocumentViewer({
|
|
|
9765
9747
|
failed,
|
|
9766
9748
|
onClose
|
|
9767
9749
|
}) {
|
|
9768
|
-
const { t } =
|
|
9750
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9769
9751
|
const titleId = react.useId();
|
|
9770
9752
|
const { file } = row;
|
|
9771
9753
|
const classKey = retentionClassLabelKey(file.retentionClass);
|
|
@@ -9846,7 +9828,7 @@ function DocumentViewer({
|
|
|
9846
9828
|
);
|
|
9847
9829
|
}
|
|
9848
9830
|
function PurposeChips({ counts, value, onChange }) {
|
|
9849
|
-
const { t } =
|
|
9831
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9850
9832
|
const options = [
|
|
9851
9833
|
{
|
|
9852
9834
|
key: "all",
|
|
@@ -9916,7 +9898,7 @@ function UploadDialog({
|
|
|
9916
9898
|
onClose,
|
|
9917
9899
|
onSubmit
|
|
9918
9900
|
}) {
|
|
9919
|
-
const { t } =
|
|
9901
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
9920
9902
|
const titleId = react.useId();
|
|
9921
9903
|
const nameId = react.useId();
|
|
9922
9904
|
const fileId = react.useId();
|
|
@@ -10085,7 +10067,7 @@ function WithdrawDialog({
|
|
|
10085
10067
|
onClose,
|
|
10086
10068
|
onConfirm
|
|
10087
10069
|
}) {
|
|
10088
|
-
const { t } =
|
|
10070
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10089
10071
|
const titleId = react.useId();
|
|
10090
10072
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10091
10073
|
SheetDialog,
|
|
@@ -10133,19 +10115,19 @@ function WithdrawDialog({
|
|
|
10133
10115
|
);
|
|
10134
10116
|
}
|
|
10135
10117
|
function TripDocumentsSection(props) {
|
|
10136
|
-
const session =
|
|
10118
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
10137
10119
|
if (session.status !== "authenticated") {
|
|
10138
10120
|
return null;
|
|
10139
10121
|
}
|
|
10140
10122
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripDocumentsSection, { ...props });
|
|
10141
10123
|
}
|
|
10142
10124
|
function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
10143
|
-
const { t } =
|
|
10144
|
-
const files =
|
|
10145
|
-
const expenses =
|
|
10146
|
-
const bookings =
|
|
10147
|
-
const { listTripManifest } =
|
|
10148
|
-
const { statuses, loaded: capabilityLoaded } =
|
|
10125
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10126
|
+
const files = chunkGD5UU4G6_cjs.useFiles({ tripRef });
|
|
10127
|
+
const expenses = chunkGD5UU4G6_cjs.useExpenses(tripRef);
|
|
10128
|
+
const bookings = chunkJY2C4S3J_cjs.useBookings(tripRef);
|
|
10129
|
+
const { listTripManifest } = chunkJY2C4S3J_cjs.useDirectories();
|
|
10130
|
+
const { statuses, loaded: capabilityLoaded } = chunkJY2C4S3J_cjs.useCapabilityStatuses(tripRef);
|
|
10149
10131
|
const capability = statuses.get("files");
|
|
10150
10132
|
const [state, setState] = react.useState({ kind: "loading" });
|
|
10151
10133
|
const [purpose, setPurpose] = react.useState(null);
|
|
@@ -10312,7 +10294,7 @@ function ReadyTripDocumentsSection({ tripRef, style }) {
|
|
|
10312
10294
|
if (capabilityLoaded && capability === "mode-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "mode" });
|
|
10313
10295
|
if (capabilityLoaded && capability === "flag-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "flag" });
|
|
10314
10296
|
if (capabilityLoaded && capability === "data-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "data" });
|
|
10315
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style:
|
|
10297
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
10316
10298
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head", children: [
|
|
10317
10299
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head-text", children: [
|
|
10318
10300
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-documents-section__title", children: t("chrome.tripDocuments.panelLabel") }),
|
|
@@ -10624,7 +10606,7 @@ function ExpensesSkeleton() {
|
|
|
10624
10606
|
] }, id)) });
|
|
10625
10607
|
}
|
|
10626
10608
|
function ExpensesEmpty({ onLog }) {
|
|
10627
|
-
const { t } =
|
|
10609
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10628
10610
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", children: [
|
|
10629
10611
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(WalletIcon, {}) }),
|
|
10630
10612
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.emptyTitle") }),
|
|
@@ -10633,7 +10615,7 @@ function ExpensesEmpty({ onLog }) {
|
|
|
10633
10615
|
] });
|
|
10634
10616
|
}
|
|
10635
10617
|
function ExpensesFailed({ onRetry }) {
|
|
10636
|
-
const { t } =
|
|
10618
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10637
10619
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", role: "alert", children: [
|
|
10638
10620
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.failedTitle") }),
|
|
10639
10621
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-expenses-section__state-body", children: t("chrome.tripExpenses.failedBody") }),
|
|
@@ -10641,7 +10623,7 @@ function ExpensesFailed({ onRetry }) {
|
|
|
10641
10623
|
] });
|
|
10642
10624
|
}
|
|
10643
10625
|
function ExpensesDark({ reason }) {
|
|
10644
|
-
const { t } =
|
|
10626
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10645
10627
|
if (reason === "mode") {
|
|
10646
10628
|
return null;
|
|
10647
10629
|
}
|
|
@@ -10662,7 +10644,7 @@ function ExpensesTable({
|
|
|
10662
10644
|
onVoid,
|
|
10663
10645
|
onViewReceipt
|
|
10664
10646
|
}) {
|
|
10665
|
-
const { t } =
|
|
10647
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10666
10648
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-expenses-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-expenses-section__table", children: [
|
|
10667
10649
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripExpenses.tableCaption") }),
|
|
10668
10650
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -10722,7 +10704,7 @@ function LogExpenseDialog({
|
|
|
10722
10704
|
onClose,
|
|
10723
10705
|
onSubmit
|
|
10724
10706
|
}) {
|
|
10725
|
-
const { t } =
|
|
10707
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10726
10708
|
const titleId = react.useId();
|
|
10727
10709
|
const [category, setCategory] = react.useState("MISC");
|
|
10728
10710
|
const [amount, setAmount] = react.useState("");
|
|
@@ -10885,9 +10867,9 @@ function ReceiptDialog({
|
|
|
10885
10867
|
description,
|
|
10886
10868
|
onClose
|
|
10887
10869
|
}) {
|
|
10888
|
-
const { t } =
|
|
10870
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10889
10871
|
const titleId = react.useId();
|
|
10890
|
-
const files =
|
|
10872
|
+
const files = chunkGD5UU4G6_cjs.useFiles({ tripRef });
|
|
10891
10873
|
const [phase, setPhase] = react.useState({ kind: "loading" });
|
|
10892
10874
|
const [imageBroke, setImageBroke] = react.useState(false);
|
|
10893
10875
|
const readUrl = files.url;
|
|
@@ -10961,7 +10943,7 @@ function VoidExpenseDialog({
|
|
|
10961
10943
|
onClose,
|
|
10962
10944
|
onSubmit
|
|
10963
10945
|
}) {
|
|
10964
|
-
const { t } =
|
|
10946
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
10965
10947
|
const titleId = react.useId();
|
|
10966
10948
|
const [reason, setReason] = react.useState("");
|
|
10967
10949
|
const trimmed = reason.trim();
|
|
@@ -11035,16 +11017,16 @@ function isCloseoutLocked2(error) {
|
|
|
11035
11017
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
11036
11018
|
}
|
|
11037
11019
|
function TripExpensesSection(props) {
|
|
11038
|
-
const session =
|
|
11020
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
11039
11021
|
if (session.status !== "authenticated") {
|
|
11040
11022
|
return null;
|
|
11041
11023
|
}
|
|
11042
11024
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripExpensesSection, { ...props });
|
|
11043
11025
|
}
|
|
11044
11026
|
function ReadyTripExpensesSection({ tripRef, style }) {
|
|
11045
|
-
const { t } =
|
|
11046
|
-
const expenses =
|
|
11047
|
-
const vendors =
|
|
11027
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11028
|
+
const expenses = chunkGD5UU4G6_cjs.useExpenses(tripRef);
|
|
11029
|
+
const vendors = chunkGD5UU4G6_cjs.useVendors(tripRef, "");
|
|
11048
11030
|
const [category, setCategory] = react.useState(null);
|
|
11049
11031
|
const [paymentMode, setPaymentMode] = react.useState(null);
|
|
11050
11032
|
const [missingReceiptOnly, setMissingReceiptOnly] = react.useState(false);
|
|
@@ -11113,7 +11095,7 @@ function ReadyTripExpensesSection({ tripRef, style }) {
|
|
|
11113
11095
|
return /* @__PURE__ */ jsxRuntime.jsx(ExpensesDark, { reason: expenses.reason });
|
|
11114
11096
|
}
|
|
11115
11097
|
const filtered = category !== null || paymentMode !== null || missingReceiptOnly;
|
|
11116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style:
|
|
11098
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
11117
11099
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__toolbar", children: [
|
|
11118
11100
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-title", children: t("chrome.tripExpenses.panelLabel") }),
|
|
11119
11101
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-spacer" }),
|
|
@@ -11393,7 +11375,7 @@ function FloatMovementDialog({
|
|
|
11393
11375
|
onClose,
|
|
11394
11376
|
onSubmit
|
|
11395
11377
|
}) {
|
|
11396
|
-
const { t } =
|
|
11378
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11397
11379
|
const titleId = react.useId();
|
|
11398
11380
|
const [managerId, setManagerId] = react.useState(manager?.managerId ?? null);
|
|
11399
11381
|
const [amount, setAmount] = react.useState(
|
|
@@ -11626,7 +11608,7 @@ function FloatSkeleton() {
|
|
|
11626
11608
|
] }, id)) });
|
|
11627
11609
|
}
|
|
11628
11610
|
function FloatEmpty({ onIssue }) {
|
|
11629
|
-
const { t } =
|
|
11611
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11630
11612
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", children: [
|
|
11631
11613
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(SafeIcon, {}) }),
|
|
11632
11614
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.emptyTitle") }),
|
|
@@ -11635,7 +11617,7 @@ function FloatEmpty({ onIssue }) {
|
|
|
11635
11617
|
] });
|
|
11636
11618
|
}
|
|
11637
11619
|
function FloatFailed({ onRetry }) {
|
|
11638
|
-
const { t } =
|
|
11620
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11639
11621
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", role: "alert", children: [
|
|
11640
11622
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.failedTitle") }),
|
|
11641
11623
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-float-section__state-body", children: t("chrome.tripFloat.failedBody") }),
|
|
@@ -11643,7 +11625,7 @@ function FloatFailed({ onRetry }) {
|
|
|
11643
11625
|
] });
|
|
11644
11626
|
}
|
|
11645
11627
|
function FloatDark({ reason }) {
|
|
11646
|
-
const { t } =
|
|
11628
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11647
11629
|
if (reason === "mode") {
|
|
11648
11630
|
return null;
|
|
11649
11631
|
}
|
|
@@ -11666,7 +11648,7 @@ function ManagerFloatCard({
|
|
|
11666
11648
|
onAdjust,
|
|
11667
11649
|
onSettle
|
|
11668
11650
|
}) {
|
|
11669
|
-
const { t } =
|
|
11651
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11670
11652
|
const bodyId = `kf-float-${row.managerId}`;
|
|
11671
11653
|
const summary = row.summary;
|
|
11672
11654
|
const shares = summary === void 0 ? void 0 : usageShares(summary);
|
|
@@ -11872,16 +11854,16 @@ function refusedBalanceOf(error) {
|
|
|
11872
11854
|
return details?.currentBalanceMinor;
|
|
11873
11855
|
}
|
|
11874
11856
|
function TripFloatSection(props) {
|
|
11875
|
-
const session =
|
|
11857
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
11876
11858
|
if (session.status !== "authenticated") {
|
|
11877
11859
|
return null;
|
|
11878
11860
|
}
|
|
11879
11861
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripFloatSection, { ...props });
|
|
11880
11862
|
}
|
|
11881
11863
|
function ReadyTripFloatSection({ tripRef, style }) {
|
|
11882
|
-
const { t } =
|
|
11883
|
-
const float =
|
|
11884
|
-
const managers =
|
|
11864
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
11865
|
+
const float = chunkGD5UU4G6_cjs.useFloat(tripRef);
|
|
11866
|
+
const managers = chunkGD5UU4G6_cjs.useManagers(tripRef);
|
|
11885
11867
|
const [openManagerId, setOpenManagerId] = react.useState(null);
|
|
11886
11868
|
const [ledgers, setLedgers] = react.useState({});
|
|
11887
11869
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -12007,7 +11989,7 @@ function ReadyTripFloatSection({ tripRef, style }) {
|
|
|
12007
11989
|
if (float.status === "dark") {
|
|
12008
11990
|
return /* @__PURE__ */ jsxRuntime.jsx(FloatDark, { reason: float.reason });
|
|
12009
11991
|
}
|
|
12010
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style:
|
|
11992
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
12011
11993
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__toolbar", children: [
|
|
12012
11994
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-title", children: t("chrome.tripFloat.panelLabel") }),
|
|
12013
11995
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-spacer" }),
|
|
@@ -12122,7 +12104,7 @@ function DispatchDialog({
|
|
|
12122
12104
|
onClose,
|
|
12123
12105
|
onSend
|
|
12124
12106
|
}) {
|
|
12125
|
-
const { t } =
|
|
12107
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12126
12108
|
const titleId = react.useId();
|
|
12127
12109
|
const [everyone, setEveryone] = react.useState(true);
|
|
12128
12110
|
const [picked, setPicked] = react.useState(/* @__PURE__ */ new Set());
|
|
@@ -12270,7 +12252,7 @@ function FormRow2({
|
|
|
12270
12252
|
onExport,
|
|
12271
12253
|
onOpenMissing
|
|
12272
12254
|
}) {
|
|
12273
|
-
const { t } =
|
|
12255
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12274
12256
|
const canSeeMissing = supportsWhoIsMissing(form);
|
|
12275
12257
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", children: [
|
|
12276
12258
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-trip-forms-section__row-body", children: [
|
|
@@ -12323,14 +12305,14 @@ function FormsSkeleton() {
|
|
|
12323
12305
|
] }, id)) });
|
|
12324
12306
|
}
|
|
12325
12307
|
function FormsEmpty() {
|
|
12326
|
-
const { t } =
|
|
12308
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12327
12309
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", children: [
|
|
12328
12310
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.emptyTitle") }),
|
|
12329
12311
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.emptyBody") })
|
|
12330
12312
|
] });
|
|
12331
12313
|
}
|
|
12332
12314
|
function FormsFailed({ onRetry }) {
|
|
12333
|
-
const { t } =
|
|
12315
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12334
12316
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", role: "alert", children: [
|
|
12335
12317
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.failedTitle") }),
|
|
12336
12318
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.failedBody") }),
|
|
@@ -12338,7 +12320,7 @@ function FormsFailed({ onRetry }) {
|
|
|
12338
12320
|
] });
|
|
12339
12321
|
}
|
|
12340
12322
|
function FormsDark({ reason }) {
|
|
12341
|
-
const { t } =
|
|
12323
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12342
12324
|
if (reason === "mode") return null;
|
|
12343
12325
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", "data-dark": reason, children: [
|
|
12344
12326
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t(reason === "flag" ? "chrome.tripForms.flagDarkTitle" : "chrome.tripForms.dataDarkTitle") }),
|
|
@@ -12383,7 +12365,7 @@ function OnBehalfDialog({
|
|
|
12383
12365
|
onClose,
|
|
12384
12366
|
onSubmit
|
|
12385
12367
|
}) {
|
|
12386
|
-
const { t } =
|
|
12368
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12387
12369
|
const titleId = react.useId();
|
|
12388
12370
|
const [values, setValues] = react.useState({});
|
|
12389
12371
|
const answerable = react.useMemo(
|
|
@@ -12521,7 +12503,7 @@ function ParticipantRow({
|
|
|
12521
12503
|
onFillOnBehalf,
|
|
12522
12504
|
onOpenResponse
|
|
12523
12505
|
}) {
|
|
12524
|
-
const { t } =
|
|
12506
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12525
12507
|
const status = row.response?.status;
|
|
12526
12508
|
const submitted = status === "SUBMITTED";
|
|
12527
12509
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", "data-done": submitted ? "true" : void 0, children: [
|
|
@@ -12574,7 +12556,7 @@ function ResponseViewer({
|
|
|
12574
12556
|
failed,
|
|
12575
12557
|
onClose
|
|
12576
12558
|
}) {
|
|
12577
|
-
const { t } =
|
|
12559
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12578
12560
|
const titleId = react.useId();
|
|
12579
12561
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12580
12562
|
SheetDialog,
|
|
@@ -12605,7 +12587,7 @@ function codeOf4(error) {
|
|
|
12605
12587
|
return classification?.code ?? "unknown";
|
|
12606
12588
|
}
|
|
12607
12589
|
function TripFormsSection(props) {
|
|
12608
|
-
const session =
|
|
12590
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
12609
12591
|
if (session.status !== "authenticated") {
|
|
12610
12592
|
return null;
|
|
12611
12593
|
}
|
|
@@ -12617,9 +12599,9 @@ function ReadyTripFormsSection({
|
|
|
12617
12599
|
components,
|
|
12618
12600
|
style
|
|
12619
12601
|
}) {
|
|
12620
|
-
const { t } =
|
|
12621
|
-
const forms =
|
|
12622
|
-
const { listTripManifest } =
|
|
12602
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12603
|
+
const forms = chunkGD5UU4G6_cjs.useForms(tripRef);
|
|
12604
|
+
const { listTripManifest } = chunkJY2C4S3J_cjs.useDirectories();
|
|
12623
12605
|
const [openFormId, setOpenFormId] = react.useState(null);
|
|
12624
12606
|
const [completion, setCompletion] = react.useState(void 0);
|
|
12625
12607
|
const [manifest, setManifest] = react.useState(void 0);
|
|
@@ -12741,7 +12723,7 @@ function ReadyTripFormsSection({
|
|
|
12741
12723
|
if (forms.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(FormsDark, { reason: forms.reason });
|
|
12742
12724
|
const inert = readOnly;
|
|
12743
12725
|
const unreadable = ready !== null && ready.syncedAt === void 0 && rows.length === 0;
|
|
12744
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style:
|
|
12726
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
12745
12727
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head", children: [
|
|
12746
12728
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head-text", children: [
|
|
12747
12729
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-forms-section__title", children: openForm === null ? t("chrome.tripForms.panelLabel") : openForm.title }),
|
|
@@ -12891,7 +12873,7 @@ function ChangeLogDialog({
|
|
|
12891
12873
|
onRetry,
|
|
12892
12874
|
onClose
|
|
12893
12875
|
}) {
|
|
12894
|
-
const { t } =
|
|
12876
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
12895
12877
|
const titleId = react.useId();
|
|
12896
12878
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12897
12879
|
SheetDialog,
|
|
@@ -13238,7 +13220,7 @@ function ItemRow({
|
|
|
13238
13220
|
onMoveBy,
|
|
13239
13221
|
onOpenVendor
|
|
13240
13222
|
}) {
|
|
13241
|
-
const { t } =
|
|
13223
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13242
13224
|
const derived = deriveItineraryItem(item, timeZone, serverTime);
|
|
13243
13225
|
const isDone = item.status === "COMPLETED";
|
|
13244
13226
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13360,7 +13342,7 @@ function DayCard({
|
|
|
13360
13342
|
onSwitchToTimeline,
|
|
13361
13343
|
onOpenVendor
|
|
13362
13344
|
}) {
|
|
13363
|
-
const { t } =
|
|
13345
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13364
13346
|
const { draggingId, overIndex, rowProps, moveBy } = useListReorder({
|
|
13365
13347
|
enabled: canEdit,
|
|
13366
13348
|
onMove: onReorder
|
|
@@ -13411,7 +13393,7 @@ function DayCard({
|
|
|
13411
13393
|
] });
|
|
13412
13394
|
}
|
|
13413
13395
|
function DayPillStrip({ pills, activeIso, onSelect }) {
|
|
13414
|
-
const { t } =
|
|
13396
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13415
13397
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13416
13398
|
"div",
|
|
13417
13399
|
{
|
|
@@ -13488,7 +13470,7 @@ function EditDayDialog({
|
|
|
13488
13470
|
onClose,
|
|
13489
13471
|
onSubmit
|
|
13490
13472
|
}) {
|
|
13491
|
-
const { t } =
|
|
13473
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13492
13474
|
const titleId = react.useId();
|
|
13493
13475
|
const [cardTitle, setCardTitle] = react.useState(group.day.cardTitle);
|
|
13494
13476
|
const [hasSummary, setHasSummary] = react.useState(
|
|
@@ -13631,7 +13613,7 @@ function ItemFormDialog({
|
|
|
13631
13613
|
onSubmit,
|
|
13632
13614
|
onDelete
|
|
13633
13615
|
}) {
|
|
13634
|
-
const { t } =
|
|
13616
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13635
13617
|
const titleId = react.useId();
|
|
13636
13618
|
const isEdit = item !== null;
|
|
13637
13619
|
const [isoDate, setIsoDate] = react.useState(
|
|
@@ -13886,7 +13868,7 @@ function ItinerarySkeleton({ view }) {
|
|
|
13886
13868
|
] });
|
|
13887
13869
|
}
|
|
13888
13870
|
function ItineraryEmpty() {
|
|
13889
|
-
const { t } =
|
|
13871
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13890
13872
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", children: [
|
|
13891
13873
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}) }),
|
|
13892
13874
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.emptyTitle") }),
|
|
@@ -13894,7 +13876,7 @@ function ItineraryEmpty() {
|
|
|
13894
13876
|
] });
|
|
13895
13877
|
}
|
|
13896
13878
|
function ItineraryFailed({ onRetry }) {
|
|
13897
|
-
const { t } =
|
|
13879
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13898
13880
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", role: "alert", children: [
|
|
13899
13881
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.failedTitle") }),
|
|
13900
13882
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-itinerary-section__state-body", children: t("chrome.tripItinerary.failedBody") }),
|
|
@@ -13902,7 +13884,7 @@ function ItineraryFailed({ onRetry }) {
|
|
|
13902
13884
|
] });
|
|
13903
13885
|
}
|
|
13904
13886
|
function TimelineView({ entries, onOpenDay }) {
|
|
13905
|
-
const { t } =
|
|
13887
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13906
13888
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "kf-trip-itinerary-section__timeline", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__timeline-grid", children: [
|
|
13907
13889
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__timeline-line", "aria-hidden": "true" }),
|
|
13908
13890
|
entries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13989,7 +13971,7 @@ var OPTIONS2 = [
|
|
|
13989
13971
|
{ value: "timeline", labelKey: "chrome.tripItinerary.viewTimeline" }
|
|
13990
13972
|
];
|
|
13991
13973
|
function ViewSegment({ value, onChange }) {
|
|
13992
|
-
const { t } =
|
|
13974
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
13993
13975
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-itinerary-section__segment", children: [
|
|
13994
13976
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripItinerary.viewLabel") }),
|
|
13995
13977
|
OPTIONS2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14011,7 +13993,7 @@ function codeOf5(error) {
|
|
|
14011
13993
|
return classification?.code ?? "unknown";
|
|
14012
13994
|
}
|
|
14013
13995
|
function TripItinerarySection(props) {
|
|
14014
|
-
const session =
|
|
13996
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
14015
13997
|
if (session.status !== "authenticated") {
|
|
14016
13998
|
return null;
|
|
14017
13999
|
}
|
|
@@ -14022,8 +14004,8 @@ function ReadyTripItinerarySection({
|
|
|
14022
14004
|
onOpenVendor,
|
|
14023
14005
|
style
|
|
14024
14006
|
}) {
|
|
14025
|
-
const { t } =
|
|
14026
|
-
const itinerary =
|
|
14007
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
14008
|
+
const itinerary = chunkGD5UU4G6_cjs.useItinerary(tripRef);
|
|
14027
14009
|
const [view, setView] = react.useState("days");
|
|
14028
14010
|
const [activeIso, setActiveIso] = react.useState(null);
|
|
14029
14011
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -14196,7 +14178,7 @@ function ReadyTripItinerarySection({
|
|
|
14196
14178
|
setActiveIso(isoDate);
|
|
14197
14179
|
setView("days");
|
|
14198
14180
|
}
|
|
14199
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style:
|
|
14181
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
14200
14182
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__toolbar", children: [
|
|
14201
14183
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSegment, { value: view, onChange: setView }),
|
|
14202
14184
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__toolbar-spacer" }),
|
|
@@ -14381,9 +14363,9 @@ function AddTravellerDialog({
|
|
|
14381
14363
|
onClose,
|
|
14382
14364
|
onAdded
|
|
14383
14365
|
}) {
|
|
14384
|
-
const { t } =
|
|
14366
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
14385
14367
|
const titleId = react.useId();
|
|
14386
|
-
const { makeTravellersFetch, addTraveller, createAgencyTraveller } =
|
|
14368
|
+
const { makeTravellersFetch, addTraveller, createAgencyTraveller } = chunkJY2C4S3J_cjs.useDirectories();
|
|
14387
14369
|
const [mode, setMode] = react.useState("search");
|
|
14388
14370
|
const [term, setTerm] = react.useState("");
|
|
14389
14371
|
const [debounced, setDebounced] = react.useState("");
|
|
@@ -14397,7 +14379,7 @@ function AddTravellerDialog({
|
|
|
14397
14379
|
return () => clearTimeout(timer);
|
|
14398
14380
|
}, [term]);
|
|
14399
14381
|
function reportFailure(error) {
|
|
14400
|
-
setErrorCode(
|
|
14382
|
+
setErrorCode(chunkGD5UU4G6_cjs.classifyError(error).code ?? "unknown");
|
|
14401
14383
|
}
|
|
14402
14384
|
async function addExisting(externalTravellerId, fullName) {
|
|
14403
14385
|
setPending(true);
|
|
@@ -14549,8 +14531,8 @@ function DirectoryResults({
|
|
|
14549
14531
|
pendingId,
|
|
14550
14532
|
onPick
|
|
14551
14533
|
}) {
|
|
14552
|
-
const { t } =
|
|
14553
|
-
const { rows, hasNext, loadNext, settled, error } =
|
|
14534
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
14535
|
+
const { rows, hasNext, loadNext, settled, error } = chunkJY2C4S3J_cjs.usePaginatedList(fetch);
|
|
14554
14536
|
if (!settled) {
|
|
14555
14537
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "aria-live": "polite", children: t("chrome.tripManifest.addSearching") });
|
|
14556
14538
|
}
|
|
@@ -14635,9 +14617,9 @@ function ManageGroupsDialog({
|
|
|
14635
14617
|
onClose,
|
|
14636
14618
|
onSaved
|
|
14637
14619
|
}) {
|
|
14638
|
-
const { t } =
|
|
14620
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
14639
14621
|
const titleId = react.useId();
|
|
14640
|
-
const { createParty, patchParty, deleteParty } =
|
|
14622
|
+
const { createParty, patchParty, deleteParty } = chunkJY2C4S3J_cjs.useDirectories();
|
|
14641
14623
|
const groups = deriveManifestGroups(rows).filter(
|
|
14642
14624
|
(group) => group.id !== SOLO_GROUP_ID && group.party !== null
|
|
14643
14625
|
);
|
|
@@ -14865,7 +14847,7 @@ function ManageGroupsDialog({
|
|
|
14865
14847
|
}
|
|
14866
14848
|
var DIET_BUCKET_CAP = 4;
|
|
14867
14849
|
function ManifestFacetTiles({ facets, filtered }) {
|
|
14868
|
-
const { t } =
|
|
14850
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
14869
14851
|
const dietEntries = Object.entries(facets.dietCounts).filter(([, count]) => count > 0).sort((a, b) => b[1] - a[1]);
|
|
14870
14852
|
const shown = dietEntries.slice(0, DIET_BUCKET_CAP);
|
|
14871
14853
|
const hiddenCount = dietEntries.length - shown.length;
|
|
@@ -14947,7 +14929,7 @@ function ManifestFiltersPopover({
|
|
|
14947
14929
|
value,
|
|
14948
14930
|
onChange
|
|
14949
14931
|
}) {
|
|
14950
|
-
const { t } =
|
|
14932
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
14951
14933
|
const [open, setOpen] = react.useState(false);
|
|
14952
14934
|
const rootRef = react.useRef(null);
|
|
14953
14935
|
const triggerRef = react.useRef(null);
|
|
@@ -15087,7 +15069,7 @@ var KIND_LABEL_KEY2 = {
|
|
|
15087
15069
|
OTHER: "chrome.tripManifest.partyKind.other"
|
|
15088
15070
|
};
|
|
15089
15071
|
function ManifestGroupCard({ group, onEdit, children }) {
|
|
15090
|
-
const { t } =
|
|
15072
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15091
15073
|
const party = group.party;
|
|
15092
15074
|
const isSolo = party === null;
|
|
15093
15075
|
const heading = isSolo ? t("chrome.tripManifest.soloHeading") : party.label ?? t(KIND_LABEL_KEY2[party.kind] ?? "chrome.tripManifest.partyKind.other");
|
|
@@ -15175,7 +15157,7 @@ function ManifestRowKebab({
|
|
|
15175
15157
|
onShareLink,
|
|
15176
15158
|
onOpenProfile
|
|
15177
15159
|
}) {
|
|
15178
|
-
const { t } =
|
|
15160
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15179
15161
|
const [open, setOpen] = react.useState(false);
|
|
15180
15162
|
const rootRef = react.useRef(null);
|
|
15181
15163
|
const triggerRef = react.useRef(null);
|
|
@@ -15274,10 +15256,10 @@ function ManifestRow({
|
|
|
15274
15256
|
onOpenProfile,
|
|
15275
15257
|
style
|
|
15276
15258
|
}) {
|
|
15277
|
-
const { t } =
|
|
15259
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15278
15260
|
const derived = deriveManifestRow(row, index, serverTime);
|
|
15279
15261
|
const traveller = row.traveller;
|
|
15280
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style:
|
|
15262
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
15281
15263
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15282
15264
|
"td",
|
|
15283
15265
|
{
|
|
@@ -15351,7 +15333,7 @@ function ManifestTable({
|
|
|
15351
15333
|
onOpenProfile,
|
|
15352
15334
|
RowComponent
|
|
15353
15335
|
}) {
|
|
15354
|
-
const { t } =
|
|
15336
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15355
15337
|
const Row = RowComponent ?? ManifestRow;
|
|
15356
15338
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-manifest-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { role: "table", className: "kf-trip-manifest-section__table", children: [
|
|
15357
15339
|
showHead ? /* @__PURE__ */ jsxRuntime.jsx("thead", { role: "rowgroup", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__head-row", children: [
|
|
@@ -15398,8 +15380,8 @@ function ManifestResultsBody({
|
|
|
15398
15380
|
RowComponent,
|
|
15399
15381
|
onRetry
|
|
15400
15382
|
}) {
|
|
15401
|
-
const { t } =
|
|
15402
|
-
const { makeManifestFetch, facets, groupedPageSize } =
|
|
15383
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15384
|
+
const { makeManifestFetch, facets, groupedPageSize } = chunkJY2C4S3J_cjs.useAgencyTripManifest(tripRef);
|
|
15403
15385
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
15404
15386
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
15405
15387
|
const [serverTime, setServerTime] = react.useState(void 0);
|
|
@@ -15416,7 +15398,7 @@ function ManifestResultsBody({
|
|
|
15416
15398
|
if (meta?.serverTime !== void 0) setServerTime(meta.serverTime);
|
|
15417
15399
|
return page;
|
|
15418
15400
|
} catch (error) {
|
|
15419
|
-
setErrorCode(
|
|
15401
|
+
setErrorCode(chunkGD5UU4G6_cjs.classifyError(error).code ?? "unknown");
|
|
15420
15402
|
return { rows: [], nextCursor: void 0 };
|
|
15421
15403
|
} finally {
|
|
15422
15404
|
setHasSettled(true);
|
|
@@ -15424,7 +15406,7 @@ function ManifestResultsBody({
|
|
|
15424
15406
|
},
|
|
15425
15407
|
[makeManifestFetch, filters, grouped, groupedPageSize]
|
|
15426
15408
|
);
|
|
15427
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
15409
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkJY2C4S3J_cjs.usePaginatedList(fetch, {
|
|
15428
15410
|
accumulate: grouped
|
|
15429
15411
|
});
|
|
15430
15412
|
react.useEffect(() => {
|
|
@@ -15585,7 +15567,7 @@ function ManifestSearchInput({
|
|
|
15585
15567
|
debounceMs,
|
|
15586
15568
|
onDebouncedChange
|
|
15587
15569
|
}) {
|
|
15588
|
-
const { t } =
|
|
15570
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15589
15571
|
const [value, setValue] = react.useState("");
|
|
15590
15572
|
react.useEffect(() => {
|
|
15591
15573
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -15612,8 +15594,8 @@ function RemoveTravellerDialog({
|
|
|
15612
15594
|
onClose,
|
|
15613
15595
|
onRemoved
|
|
15614
15596
|
}) {
|
|
15615
|
-
const { t } =
|
|
15616
|
-
const { removeFromManifest } =
|
|
15597
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15598
|
+
const { removeFromManifest } = chunkJY2C4S3J_cjs.useDirectories();
|
|
15617
15599
|
const titleId = react.useId();
|
|
15618
15600
|
const [pending, setPending] = react.useState(false);
|
|
15619
15601
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -15700,7 +15682,7 @@ function shareAddress(build, token) {
|
|
|
15700
15682
|
}
|
|
15701
15683
|
var warnedNoShareUrl = false;
|
|
15702
15684
|
function warnMissingShareUrl() {
|
|
15703
|
-
if (warnedNoShareUrl || !
|
|
15685
|
+
if (warnedNoShareUrl || !chunk64AFXHOF_cjs.isDevelopment()) return;
|
|
15704
15686
|
warnedNoShareUrl = true;
|
|
15705
15687
|
console.warn(
|
|
15706
15688
|
"[kaafil-react-uikit] No `buildShareUrl` on <KaafilUIKitProvider>, so the share dialog is showing operators a bare token instead of a sendable address. Kaafil returns a token, never a URL \u2014 the traveller page is on your domain. Fix: buildShareUrl={(token) => `${window.location.origin}/share/${token}`}"
|
|
@@ -15712,14 +15694,14 @@ function ShareLinkDialog({
|
|
|
15712
15694
|
travellerName,
|
|
15713
15695
|
onClose
|
|
15714
15696
|
}) {
|
|
15715
|
-
const { t } =
|
|
15697
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
15716
15698
|
const titleId = react.useId();
|
|
15717
|
-
const buildShareUrl =
|
|
15699
|
+
const buildShareUrl = chunkJY2C4S3J_cjs.useBuildShareUrl();
|
|
15718
15700
|
const showsBareToken = buildShareUrl === null;
|
|
15719
15701
|
if (showsBareToken) warnMissingShareUrl();
|
|
15720
15702
|
const isFamily = travellerRef === null;
|
|
15721
|
-
const offerable =
|
|
15722
|
-
const { links, readFailed, mint, revoke, regenerate, reveal } =
|
|
15703
|
+
const offerable = chunkJY2C4S3J_cjs.familySafeSections(isFamily);
|
|
15704
|
+
const { links, readFailed, mint, revoke, regenerate, reveal } = chunkJY2C4S3J_cjs.useShareLinks(
|
|
15723
15705
|
tripRef,
|
|
15724
15706
|
travellerRef
|
|
15725
15707
|
);
|
|
@@ -16058,7 +16040,7 @@ function SideDrawer({
|
|
|
16058
16040
|
"aria-modal": "true",
|
|
16059
16041
|
"aria-labelledby": titleId,
|
|
16060
16042
|
tabIndex: -1,
|
|
16061
|
-
style:
|
|
16043
|
+
style: chunk64AFXHOF_cjs.tokenStyle(style),
|
|
16062
16044
|
children: [
|
|
16063
16045
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-admin-side-drawer__header", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__header-row", children: [
|
|
16064
16046
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__identity", children: [
|
|
@@ -16126,11 +16108,11 @@ function TravellerDetailDialog({
|
|
|
16126
16108
|
onClose,
|
|
16127
16109
|
onRemove
|
|
16128
16110
|
}) {
|
|
16129
|
-
const { t } =
|
|
16111
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16130
16112
|
const titleId = react.useId();
|
|
16131
|
-
const { read, readFailed, refresh } =
|
|
16132
|
-
const forms =
|
|
16133
|
-
const { addTravellerNote } =
|
|
16113
|
+
const { read, readFailed, refresh } = chunkGD5UU4G6_cjs.useTravellerProfile(tripRef, travellerRef);
|
|
16114
|
+
const forms = chunkJY2C4S3J_cjs.useTravellerFormResponses(tripRef, travellerRef);
|
|
16115
|
+
const { addTravellerNote } = chunkJY2C4S3J_cjs.useDirectories();
|
|
16134
16116
|
const [noteDraft, setNoteDraft] = react.useState("");
|
|
16135
16117
|
const [notePending, setNotePending] = react.useState(false);
|
|
16136
16118
|
const [noteFailed, setNoteFailed] = react.useState(false);
|
|
@@ -16359,7 +16341,7 @@ function DetailRow({
|
|
|
16359
16341
|
absentLabel,
|
|
16360
16342
|
meta
|
|
16361
16343
|
}) {
|
|
16362
|
-
const { t } =
|
|
16344
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16363
16345
|
const has = value !== null && value !== void 0 && value.length > 0;
|
|
16364
16346
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__detail-row", children: [
|
|
16365
16347
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-manifest-section__detail-label", children: label }),
|
|
@@ -16382,7 +16364,7 @@ function TripManifestSection({
|
|
|
16382
16364
|
components,
|
|
16383
16365
|
style
|
|
16384
16366
|
}) {
|
|
16385
|
-
const { t } =
|
|
16367
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16386
16368
|
const [q, setQ] = react.useState("");
|
|
16387
16369
|
const [groupBy, setGroupBy] = react.useState("booking_group");
|
|
16388
16370
|
const [filters, setFilters] = react.useState({});
|
|
@@ -16411,7 +16393,7 @@ function TripManifestSection({
|
|
|
16411
16393
|
[groupBy, writeToken, wireFilters]
|
|
16412
16394
|
);
|
|
16413
16395
|
const hasActiveFilter = q.length > 0 || Object.keys(filters).length > 0;
|
|
16414
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style:
|
|
16396
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
16415
16397
|
facets === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ManifestFacetTiles, { facets, filtered: hasActiveFilter }),
|
|
16416
16398
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__toolbar", children: [
|
|
16417
16399
|
/* @__PURE__ */ jsxRuntime.jsx(ManifestSearchInput, { debounceMs: DEBOUNCE_MS, onDebouncedChange: setQ }),
|
|
@@ -16630,7 +16612,7 @@ function PaymentsSkeleton() {
|
|
|
16630
16612
|
] }, id)) });
|
|
16631
16613
|
}
|
|
16632
16614
|
function PaymentsEmpty({ onRecord }) {
|
|
16633
|
-
const { t } =
|
|
16615
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16634
16616
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", children: [
|
|
16635
16617
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ReceiptIcon, {}) }),
|
|
16636
16618
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.emptyTitle") }),
|
|
@@ -16639,7 +16621,7 @@ function PaymentsEmpty({ onRecord }) {
|
|
|
16639
16621
|
] });
|
|
16640
16622
|
}
|
|
16641
16623
|
function PaymentsFailed({ onRetry }) {
|
|
16642
|
-
const { t } =
|
|
16624
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16643
16625
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", role: "alert", children: [
|
|
16644
16626
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.failedTitle") }),
|
|
16645
16627
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-payments-section__state-body", children: t("chrome.tripPayments.failedBody") }),
|
|
@@ -16647,7 +16629,7 @@ function PaymentsFailed({ onRetry }) {
|
|
|
16647
16629
|
] });
|
|
16648
16630
|
}
|
|
16649
16631
|
function PaymentsDark({ reason }) {
|
|
16650
|
-
const { t } =
|
|
16632
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16651
16633
|
if (reason === "mode") {
|
|
16652
16634
|
return null;
|
|
16653
16635
|
}
|
|
@@ -16668,7 +16650,7 @@ function PaymentsTable({
|
|
|
16668
16650
|
locked,
|
|
16669
16651
|
onVoid
|
|
16670
16652
|
}) {
|
|
16671
|
-
const { t } =
|
|
16653
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16672
16654
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-payments-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-payments-section__table", children: [
|
|
16673
16655
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripPayments.tableCaption") }),
|
|
16674
16656
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -16727,7 +16709,7 @@ function RecordPaymentDialog({
|
|
|
16727
16709
|
onClose,
|
|
16728
16710
|
onSubmit
|
|
16729
16711
|
}) {
|
|
16730
|
-
const { t } =
|
|
16712
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16731
16713
|
const titleId = react.useId();
|
|
16732
16714
|
const [travellerId, setTravellerId] = react.useState(null);
|
|
16733
16715
|
const [amount, setAmount] = react.useState("");
|
|
@@ -16902,7 +16884,7 @@ function VoidPaymentDialog({
|
|
|
16902
16884
|
onClose,
|
|
16903
16885
|
onSubmit
|
|
16904
16886
|
}) {
|
|
16905
|
-
const { t } =
|
|
16887
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16906
16888
|
const titleId = react.useId();
|
|
16907
16889
|
const [reason, setReason] = react.useState("");
|
|
16908
16890
|
const trimmed = reason.trim();
|
|
@@ -16976,7 +16958,7 @@ function isCloseoutLocked4(error) {
|
|
|
16976
16958
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
16977
16959
|
}
|
|
16978
16960
|
function TripPaymentsSection(props) {
|
|
16979
|
-
const session =
|
|
16961
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
16980
16962
|
if (session.status !== "authenticated") {
|
|
16981
16963
|
return null;
|
|
16982
16964
|
}
|
|
@@ -16987,9 +16969,9 @@ function ReadyTripPaymentsSection({
|
|
|
16987
16969
|
balance,
|
|
16988
16970
|
style
|
|
16989
16971
|
}) {
|
|
16990
|
-
const { t } =
|
|
16991
|
-
const collections =
|
|
16992
|
-
const parties =
|
|
16972
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
16973
|
+
const collections = chunkGD5UU4G6_cjs.useCollections(tripRef);
|
|
16974
|
+
const parties = chunkGD5UU4G6_cjs.useParties(tripRef);
|
|
16993
16975
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
16994
16976
|
const [pending, setPending] = react.useState(false);
|
|
16995
16977
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -17069,7 +17051,7 @@ function ReadyTripPaymentsSection({
|
|
|
17069
17051
|
}
|
|
17070
17052
|
const currency = balance?.currency ?? rows[0]?.currency ?? "INR";
|
|
17071
17053
|
const owingCount = eligibleRows.filter((row) => row.outstandingMinor > 0).length;
|
|
17072
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style:
|
|
17054
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
17073
17055
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__toolbar", children: [
|
|
17074
17056
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-title", children: t("chrome.tripPayments.panelLabel") }),
|
|
17075
17057
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-spacer" }),
|
|
@@ -17210,7 +17192,7 @@ function AssignTravellerDialog({
|
|
|
17210
17192
|
onSubmit,
|
|
17211
17193
|
onClose
|
|
17212
17194
|
}) {
|
|
17213
|
-
const { t } =
|
|
17195
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17214
17196
|
const titleId = react.useId();
|
|
17215
17197
|
const [pointId, setPointId] = react.useState(stops[0]?.id ?? "");
|
|
17216
17198
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17281,7 +17263,7 @@ function BoardingRoster({
|
|
|
17281
17263
|
onRetry,
|
|
17282
17264
|
stops
|
|
17283
17265
|
}) {
|
|
17284
|
-
const { t } =
|
|
17266
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17285
17267
|
if (failed) {
|
|
17286
17268
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17287
17269
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.boardingFailedTitle") }),
|
|
@@ -17341,7 +17323,7 @@ function TravellerBoardRow({
|
|
|
17341
17323
|
busy,
|
|
17342
17324
|
onCorrect
|
|
17343
17325
|
}) {
|
|
17344
|
-
const { t } =
|
|
17326
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17345
17327
|
const correctable = occupant.status !== "PENDING";
|
|
17346
17328
|
const next = occupant.status === "BOARDED" ? "NO_SHOW" : "BOARDED";
|
|
17347
17329
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-pickups-section__roster-row", children: [
|
|
@@ -17379,7 +17361,7 @@ function DeleteStopDialog({
|
|
|
17379
17361
|
onDelete,
|
|
17380
17362
|
onClose
|
|
17381
17363
|
}) {
|
|
17382
|
-
const { t } =
|
|
17364
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17383
17365
|
const titleId = react.useId();
|
|
17384
17366
|
const [target, setTarget] = react.useState(siblings[0]?.id ?? "");
|
|
17385
17367
|
const occupied = stop.expectedCount > 0;
|
|
@@ -17633,7 +17615,7 @@ function PickupsEmpty({
|
|
|
17633
17615
|
kindLabel,
|
|
17634
17616
|
onAdd
|
|
17635
17617
|
}) {
|
|
17636
|
-
const { t } =
|
|
17618
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17637
17619
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", children: [
|
|
17638
17620
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-pickups-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon, {}) }),
|
|
17639
17621
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.emptyTitle").replace("{kind}", kindLabel) }),
|
|
@@ -17642,7 +17624,7 @@ function PickupsEmpty({
|
|
|
17642
17624
|
] });
|
|
17643
17625
|
}
|
|
17644
17626
|
function PickupsFailed({ onRetry }) {
|
|
17645
|
-
const { t } =
|
|
17627
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17646
17628
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17647
17629
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.failedTitle") }),
|
|
17648
17630
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-pickups-section__state-body", children: t("chrome.tripPickups.failedBody") }),
|
|
@@ -17650,7 +17632,7 @@ function PickupsFailed({ onRetry }) {
|
|
|
17650
17632
|
] });
|
|
17651
17633
|
}
|
|
17652
17634
|
function PickupsDark({ reason }) {
|
|
17653
|
-
const { t } =
|
|
17635
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17654
17636
|
if (reason === "mode") {
|
|
17655
17637
|
return null;
|
|
17656
17638
|
}
|
|
@@ -17684,7 +17666,7 @@ function StopFormDialog({
|
|
|
17684
17666
|
onClose,
|
|
17685
17667
|
onSubmit
|
|
17686
17668
|
}) {
|
|
17687
|
-
const { t } =
|
|
17669
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17688
17670
|
const titleId = react.useId();
|
|
17689
17671
|
const isEdit = stop !== null;
|
|
17690
17672
|
const [kind, setKind] = react.useState(stop?.kind ?? defaultKind);
|
|
@@ -17831,7 +17813,7 @@ function StopFormDialog({
|
|
|
17831
17813
|
);
|
|
17832
17814
|
}
|
|
17833
17815
|
function StopKebab({ stopName, onEdit, onDelete }) {
|
|
17834
|
-
const { t } =
|
|
17816
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17835
17817
|
const [open, setOpen] = react.useState(false);
|
|
17836
17818
|
const rootRef = react.useRef(null);
|
|
17837
17819
|
const triggerRef = react.useRef(null);
|
|
@@ -17908,7 +17890,7 @@ function StopCard({
|
|
|
17908
17890
|
onDelete,
|
|
17909
17891
|
onMoveBy
|
|
17910
17892
|
}) {
|
|
17911
|
-
const { t } =
|
|
17893
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
17912
17894
|
const isClosed = stop.status === "CLOSED";
|
|
17913
17895
|
const canReorder = !isClosed;
|
|
17914
17896
|
const percent = boardedPercent(stop);
|
|
@@ -18056,7 +18038,7 @@ function Segment({
|
|
|
18056
18038
|
value,
|
|
18057
18039
|
onChange
|
|
18058
18040
|
}) {
|
|
18059
|
-
const { t } =
|
|
18041
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18060
18042
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-pickups-section__segment", children: [
|
|
18061
18043
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t(legendKey) }),
|
|
18062
18044
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -18114,7 +18096,7 @@ function codeOf7(error) {
|
|
|
18114
18096
|
return classification?.code ?? "unknown";
|
|
18115
18097
|
}
|
|
18116
18098
|
function TripPickupsSection(props) {
|
|
18117
|
-
const session =
|
|
18099
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
18118
18100
|
if (session.status !== "authenticated") {
|
|
18119
18101
|
return null;
|
|
18120
18102
|
}
|
|
@@ -18126,8 +18108,8 @@ function ReadyTripPickupsSection({
|
|
|
18126
18108
|
tripStartIso,
|
|
18127
18109
|
style
|
|
18128
18110
|
}) {
|
|
18129
|
-
const { t } =
|
|
18130
|
-
const pickups =
|
|
18111
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18112
|
+
const pickups = chunkGD5UU4G6_cjs.usePickups(tripRef);
|
|
18131
18113
|
const [kind, setKind] = react.useState("PICKUP");
|
|
18132
18114
|
const [view, setView] = react.useState("stops");
|
|
18133
18115
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -18287,7 +18269,7 @@ function ReadyTripPickupsSection({
|
|
|
18287
18269
|
const kindLabel = t(
|
|
18288
18270
|
kind === "PICKUP" ? "chrome.tripPickups.kindPickupOne" : "chrome.tripPickups.kindDropOne"
|
|
18289
18271
|
);
|
|
18290
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style:
|
|
18272
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
18291
18273
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__toolbar", children: [
|
|
18292
18274
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSwitcher, { value: view, onChange: setView }),
|
|
18293
18275
|
/* @__PURE__ */ jsxRuntime.jsx(KindSwitcher, { value: kind, onChange: setKind }),
|
|
@@ -18510,7 +18492,7 @@ function AutoAssignDialog({
|
|
|
18510
18492
|
onApply,
|
|
18511
18493
|
onClose
|
|
18512
18494
|
}) {
|
|
18513
|
-
const { t } =
|
|
18495
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18514
18496
|
const titleId = react.useId();
|
|
18515
18497
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
18516
18498
|
const roomCodeById = new Map(group.rooms.map((room) => [room.id, room.code]));
|
|
@@ -18605,7 +18587,7 @@ function AutoAssignDialog({
|
|
|
18605
18587
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section__plan", children: [
|
|
18606
18588
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__plan-title", children: t("chrome.tripRooming.rulesTitle") }),
|
|
18607
18589
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "kf-trip-rooming-section__rule-list", children: preview.perRule.map((entry) => {
|
|
18608
|
-
const severity =
|
|
18590
|
+
const severity = chunkGD5UU4G6_cjs.roomingHeuristicSeverity(entry.rule);
|
|
18609
18591
|
const relaxed = entry.outcome === "relaxed";
|
|
18610
18592
|
const violation = relaxed && severity === "never";
|
|
18611
18593
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18651,7 +18633,7 @@ function DeleteShell({
|
|
|
18651
18633
|
onConfirm,
|
|
18652
18634
|
onClose
|
|
18653
18635
|
}) {
|
|
18654
|
-
const { t } =
|
|
18636
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18655
18637
|
const titleId = react.useId();
|
|
18656
18638
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18657
18639
|
SheetDialog,
|
|
@@ -18697,7 +18679,7 @@ function DeleteRoomDialog({
|
|
|
18697
18679
|
onConfirm,
|
|
18698
18680
|
onClose
|
|
18699
18681
|
}) {
|
|
18700
|
-
const { t } =
|
|
18682
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18701
18683
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
18702
18684
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18703
18685
|
DeleteShell,
|
|
@@ -18723,7 +18705,7 @@ function DeleteWindowDialog({
|
|
|
18723
18705
|
onConfirm,
|
|
18724
18706
|
onClose
|
|
18725
18707
|
}) {
|
|
18726
|
-
const { t } =
|
|
18708
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18727
18709
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18728
18710
|
DeleteShell,
|
|
18729
18711
|
{
|
|
@@ -18821,15 +18803,15 @@ function roomTypeLabelKey(roomType) {
|
|
|
18821
18803
|
return ROOM_TYPE_LABEL_KEY[roomType] ?? "chrome.tripRooming.roomType.shared";
|
|
18822
18804
|
}
|
|
18823
18805
|
function toneAttrs(tone) {
|
|
18824
|
-
const parsed =
|
|
18806
|
+
const parsed = chunkGD5UU4G6_cjs.parseRoomingTone(tone);
|
|
18825
18807
|
if (parsed === void 0) {
|
|
18826
|
-
return { family:
|
|
18808
|
+
return { family: chunkGD5UU4G6_cjs.TONE_FAMILIES.UNKNOWN, shade: 0 };
|
|
18827
18809
|
}
|
|
18828
|
-
const shade = parsed.shade <
|
|
18810
|
+
const shade = parsed.shade < chunkGD5UU4G6_cjs.SHADES_PER_FAMILY ? parsed.shade : parsed.shade % chunkGD5UU4G6_cjs.SHADES_PER_FAMILY;
|
|
18829
18811
|
return { family: parsed.family, shade };
|
|
18830
18812
|
}
|
|
18831
18813
|
function glyphOf(occupant) {
|
|
18832
|
-
return occupant.glyph === "" ?
|
|
18814
|
+
return occupant.glyph === "" ? chunkGD5UU4G6_cjs.FALLBACK_GLYPH : occupant.glyph;
|
|
18833
18815
|
}
|
|
18834
18816
|
function TravellerGlyph({
|
|
18835
18817
|
occupant,
|
|
@@ -18867,7 +18849,7 @@ var COLLAPSED_COUNT = 10;
|
|
|
18867
18849
|
function IdentityLegend({
|
|
18868
18850
|
occupants
|
|
18869
18851
|
}) {
|
|
18870
|
-
const { t } =
|
|
18852
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18871
18853
|
const [open, setOpen] = react.useState(false);
|
|
18872
18854
|
if (occupants.length === 0) {
|
|
18873
18855
|
return null;
|
|
@@ -18994,7 +18976,7 @@ function RoomFormDialog({
|
|
|
18994
18976
|
onClose,
|
|
18995
18977
|
onSubmit
|
|
18996
18978
|
}) {
|
|
18997
|
-
const { t } =
|
|
18979
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
18998
18980
|
const titleId = react.useId();
|
|
18999
18981
|
const isEdit = room !== null;
|
|
19000
18982
|
const [code, setCode] = react.useState(room?.code ?? "");
|
|
@@ -19118,7 +19100,7 @@ function RoomingSkeleton() {
|
|
|
19118
19100
|
] }, id)) });
|
|
19119
19101
|
}
|
|
19120
19102
|
function RoomingEmpty({ onAddWindow }) {
|
|
19121
|
-
const { t } =
|
|
19103
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19122
19104
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", children: [
|
|
19123
19105
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BedIcon, {}) }),
|
|
19124
19106
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.emptyTitle") }),
|
|
@@ -19127,7 +19109,7 @@ function RoomingEmpty({ onAddWindow }) {
|
|
|
19127
19109
|
] });
|
|
19128
19110
|
}
|
|
19129
19111
|
function RoomingFailed({ onRetry }) {
|
|
19130
|
-
const { t } =
|
|
19112
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19131
19113
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", role: "alert", children: [
|
|
19132
19114
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.failedTitle") }),
|
|
19133
19115
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-rooming-section__state-body", children: t("chrome.tripRooming.failedBody") }),
|
|
@@ -19135,7 +19117,7 @@ function RoomingFailed({ onRetry }) {
|
|
|
19135
19117
|
] });
|
|
19136
19118
|
}
|
|
19137
19119
|
function RoomingDark({ reason }) {
|
|
19138
|
-
const { t } =
|
|
19120
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19139
19121
|
if (reason === "mode") {
|
|
19140
19122
|
return null;
|
|
19141
19123
|
}
|
|
@@ -19150,7 +19132,7 @@ function RoomingDark({ reason }) {
|
|
|
19150
19132
|
] });
|
|
19151
19133
|
}
|
|
19152
19134
|
function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
19153
|
-
const { t } =
|
|
19135
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19154
19136
|
const [open, setOpen] = react.useState(false);
|
|
19155
19137
|
const rootRef = react.useRef(null);
|
|
19156
19138
|
const triggerRef = react.useRef(null);
|
|
@@ -19215,7 +19197,7 @@ function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
|
19215
19197
|
] });
|
|
19216
19198
|
}
|
|
19217
19199
|
function RoomCard({ room, drag, busy, onEdit, onDelete }) {
|
|
19218
|
-
const { t } =
|
|
19200
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19219
19201
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
19220
19202
|
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "kf-trip-rooming-section__room", "data-busy": busy ? "true" : void 0, children: [
|
|
19221
19203
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-rooming-section__room-head", children: [
|
|
@@ -19265,7 +19247,7 @@ function UnassignedStrip({
|
|
|
19265
19247
|
drag,
|
|
19266
19248
|
busy
|
|
19267
19249
|
}) {
|
|
19268
|
-
const { t } =
|
|
19250
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19269
19251
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19270
19252
|
"div",
|
|
19271
19253
|
{
|
|
@@ -19339,7 +19321,7 @@ function WindowAccordion({
|
|
|
19339
19321
|
onEditRoom,
|
|
19340
19322
|
onDeleteRoom
|
|
19341
19323
|
}) {
|
|
19342
|
-
const { t } =
|
|
19324
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19343
19325
|
const percent = fillPercent(group);
|
|
19344
19326
|
const bodyId = `kf-rooming-window-${group.window.id}`;
|
|
19345
19327
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -19489,7 +19471,7 @@ function WindowFormDialog({
|
|
|
19489
19471
|
onClose,
|
|
19490
19472
|
onSubmit
|
|
19491
19473
|
}) {
|
|
19492
|
-
const { t } =
|
|
19474
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19493
19475
|
const titleId = react.useId();
|
|
19494
19476
|
const isEdit = window !== null;
|
|
19495
19477
|
const [label, setLabel] = react.useState(window?.label ?? "");
|
|
@@ -19596,7 +19578,7 @@ function codeOf8(error) {
|
|
|
19596
19578
|
return classification?.code ?? "unknown";
|
|
19597
19579
|
}
|
|
19598
19580
|
function TripRoomingSection(props) {
|
|
19599
|
-
const session =
|
|
19581
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
19600
19582
|
if (session.status !== "authenticated") {
|
|
19601
19583
|
return null;
|
|
19602
19584
|
}
|
|
@@ -19609,8 +19591,8 @@ function ReadyTripRoomingSection({
|
|
|
19609
19591
|
tripEndIso,
|
|
19610
19592
|
style
|
|
19611
19593
|
}) {
|
|
19612
|
-
const { t } =
|
|
19613
|
-
const rooming =
|
|
19594
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19595
|
+
const rooming = chunkGD5UU4G6_cjs.useRooming(tripRef);
|
|
19614
19596
|
const [openWindowId, setOpenWindowId] = react.useState(null);
|
|
19615
19597
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
19616
19598
|
const [pending, setPending] = react.useState(false);
|
|
@@ -19748,7 +19730,7 @@ function ReadyTripRoomingSection({
|
|
|
19748
19730
|
return /* @__PURE__ */ jsxRuntime.jsx(RoomingDark, { reason: rooming.reason });
|
|
19749
19731
|
}
|
|
19750
19732
|
const pool = ready?.unassignedPool;
|
|
19751
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style:
|
|
19733
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
19752
19734
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__toolbar", children: [
|
|
19753
19735
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-title", children: t("chrome.tripRooming.panelLabel") }),
|
|
19754
19736
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-spacer" }),
|
|
@@ -19982,7 +19964,7 @@ function isAgencyAuthored(vendor) {
|
|
|
19982
19964
|
return vendor.externalId.startsWith("kf-");
|
|
19983
19965
|
}
|
|
19984
19966
|
function CategoryTabs({ selected, counts, total, onSelect }) {
|
|
19985
|
-
const { t } =
|
|
19967
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
19986
19968
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__chips", children: [
|
|
19987
19969
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19988
19970
|
"button",
|
|
@@ -20025,7 +20007,7 @@ function DeleteSupplierDialog({
|
|
|
20025
20007
|
onConfirm,
|
|
20026
20008
|
onClose
|
|
20027
20009
|
}) {
|
|
20028
|
-
const { t } =
|
|
20010
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20029
20011
|
const titleId = react.useId();
|
|
20030
20012
|
const blockers = deleteBlockers(usage);
|
|
20031
20013
|
const blockedLocally = blockers !== void 0 && blockers.vehicles + blockers.expenses > 0;
|
|
@@ -20178,7 +20160,7 @@ function SupplierFormDialog({
|
|
|
20178
20160
|
onClose,
|
|
20179
20161
|
onSubmit
|
|
20180
20162
|
}) {
|
|
20181
|
-
const { t } =
|
|
20163
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20182
20164
|
const titleId = react.useId();
|
|
20183
20165
|
const isEdit = supplier !== null;
|
|
20184
20166
|
const [name, setName] = react.useState(supplier?.name ?? "");
|
|
@@ -20300,7 +20282,7 @@ function SuppliersSkeleton() {
|
|
|
20300
20282
|
] }, id)) });
|
|
20301
20283
|
}
|
|
20302
20284
|
function SuppliersEmpty({ onAdd }) {
|
|
20303
|
-
const { t } =
|
|
20285
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20304
20286
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20305
20287
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(StorefrontIcon, {}) }),
|
|
20306
20288
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.emptyTitle") }),
|
|
@@ -20309,7 +20291,7 @@ function SuppliersEmpty({ onAdd }) {
|
|
|
20309
20291
|
] });
|
|
20310
20292
|
}
|
|
20311
20293
|
function SuppliersNoMatch({ onClear }) {
|
|
20312
|
-
const { t } =
|
|
20294
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20313
20295
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20314
20296
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.noMatchTitle") }),
|
|
20315
20297
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.noMatchBody") }),
|
|
@@ -20317,7 +20299,7 @@ function SuppliersNoMatch({ onClear }) {
|
|
|
20317
20299
|
] });
|
|
20318
20300
|
}
|
|
20319
20301
|
function SuppliersFailed({ onRetry }) {
|
|
20320
|
-
const { t } =
|
|
20302
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20321
20303
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", role: "alert", children: [
|
|
20322
20304
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.failedTitle") }),
|
|
20323
20305
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.failedBody") }),
|
|
@@ -20325,7 +20307,7 @@ function SuppliersFailed({ onRetry }) {
|
|
|
20325
20307
|
] });
|
|
20326
20308
|
}
|
|
20327
20309
|
function SuppliersDark({ reason }) {
|
|
20328
|
-
const { t } =
|
|
20310
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20329
20311
|
if (reason === "mode") {
|
|
20330
20312
|
return null;
|
|
20331
20313
|
}
|
|
@@ -20340,7 +20322,7 @@ function SuppliersDark({ reason }) {
|
|
|
20340
20322
|
] });
|
|
20341
20323
|
}
|
|
20342
20324
|
function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
20343
|
-
const { t } =
|
|
20325
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20344
20326
|
const [open, setOpen] = react.useState(false);
|
|
20345
20327
|
const rootRef = react.useRef(null);
|
|
20346
20328
|
const triggerRef = react.useRef(null);
|
|
@@ -20407,7 +20389,7 @@ function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
|
20407
20389
|
] });
|
|
20408
20390
|
}
|
|
20409
20391
|
function SupplierUsageCell({ usage }) {
|
|
20410
|
-
const { t } =
|
|
20392
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20411
20393
|
const parts = [];
|
|
20412
20394
|
if (usage.vehicles !== void 0 && usage.vehicles > 0) {
|
|
20413
20395
|
parts.push(
|
|
@@ -20451,7 +20433,7 @@ function SupplierTable({
|
|
|
20451
20433
|
onEdit,
|
|
20452
20434
|
onDelete
|
|
20453
20435
|
}) {
|
|
20454
|
-
const { t } =
|
|
20436
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20455
20437
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-suppliers-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-suppliers-section__table", children: [
|
|
20456
20438
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripSuppliers.tableCaption") }),
|
|
20457
20439
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -20519,18 +20501,18 @@ function serverBlockOf(error) {
|
|
|
20519
20501
|
return { vehicles: details.vehicleCount ?? 0, expenses: details.expenseCount ?? 0 };
|
|
20520
20502
|
}
|
|
20521
20503
|
function TripSuppliersSection(props) {
|
|
20522
|
-
const session =
|
|
20504
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
20523
20505
|
if (session.status !== "authenticated") {
|
|
20524
20506
|
return null;
|
|
20525
20507
|
}
|
|
20526
20508
|
return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripSuppliersSection, { ...props });
|
|
20527
20509
|
}
|
|
20528
20510
|
function ReadyTripSuppliersSection({ tripRef, style }) {
|
|
20529
|
-
const { t } =
|
|
20530
|
-
const vendors =
|
|
20531
|
-
const seating =
|
|
20532
|
-
const itinerary =
|
|
20533
|
-
const expenses =
|
|
20511
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20512
|
+
const vendors = chunkGD5UU4G6_cjs.useVendors(tripRef, "");
|
|
20513
|
+
const seating = chunkGD5UU4G6_cjs.useSeating(tripRef);
|
|
20514
|
+
const itinerary = chunkGD5UU4G6_cjs.useItinerary(tripRef);
|
|
20515
|
+
const expenses = chunkGD5UU4G6_cjs.useExpenses(tripRef);
|
|
20534
20516
|
const [category, setCategory] = react.useState(null);
|
|
20535
20517
|
const [query, setQuery] = react.useState("");
|
|
20536
20518
|
const [sortKey, setSortKey] = react.useState("name");
|
|
@@ -20613,7 +20595,7 @@ function ReadyTripSuppliersSection({ tripRef, style }) {
|
|
|
20613
20595
|
return /* @__PURE__ */ jsxRuntime.jsx(SuppliersDark, { reason: vendors.reason });
|
|
20614
20596
|
}
|
|
20615
20597
|
const filtered = category !== null || query.trim() !== "";
|
|
20616
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style:
|
|
20598
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
20617
20599
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__toolbar", children: [
|
|
20618
20600
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-title", children: t("chrome.tripSuppliers.panelLabel") }),
|
|
20619
20601
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-spacer" }),
|
|
@@ -20752,7 +20734,7 @@ function AutoAssignDialog2({
|
|
|
20752
20734
|
onApply,
|
|
20753
20735
|
onClose
|
|
20754
20736
|
}) {
|
|
20755
|
-
const { t } =
|
|
20737
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20756
20738
|
const titleId = react.useId();
|
|
20757
20739
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
20758
20740
|
const [genderAdjacency, setGenderAdjacency] = react.useState("AVOID_UNRELATED");
|
|
@@ -20914,7 +20896,7 @@ function DayFilter({
|
|
|
20914
20896
|
countByDay,
|
|
20915
20897
|
onSelect
|
|
20916
20898
|
}) {
|
|
20917
|
-
const { t } =
|
|
20899
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
20918
20900
|
const days = Array.from({ length: durationDays }, (_unused, index) => index);
|
|
20919
20901
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__days", children: [
|
|
20920
20902
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__days-label", children: t("chrome.tripVehicles.showDay") }),
|
|
@@ -21047,7 +21029,7 @@ function DeleteVehicleDialog({
|
|
|
21047
21029
|
onConfirm,
|
|
21048
21030
|
onClose
|
|
21049
21031
|
}) {
|
|
21050
|
-
const { t } =
|
|
21032
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21051
21033
|
const titleId = react.useId();
|
|
21052
21034
|
const released = occupantsOf(vehicle).length;
|
|
21053
21035
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21224,7 +21206,7 @@ function ManagerLinkDialog({
|
|
|
21224
21206
|
onClose,
|
|
21225
21207
|
onSubmit
|
|
21226
21208
|
}) {
|
|
21227
|
-
const { t } =
|
|
21209
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21228
21210
|
const titleId = react.useId();
|
|
21229
21211
|
const [chosen, setChosen] = react.useState(null);
|
|
21230
21212
|
const demotedFrom = chosen === null ? void 0 : managerVehicleByRef.get(chosen);
|
|
@@ -21301,7 +21283,7 @@ function UnassignedStrip2({
|
|
|
21301
21283
|
drag,
|
|
21302
21284
|
busy
|
|
21303
21285
|
}) {
|
|
21304
|
-
const { t } =
|
|
21286
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21305
21287
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21306
21288
|
"div",
|
|
21307
21289
|
{
|
|
@@ -21368,7 +21350,7 @@ function OccupantRoster({
|
|
|
21368
21350
|
variant,
|
|
21369
21351
|
emptyKey
|
|
21370
21352
|
}) {
|
|
21371
|
-
const { t } =
|
|
21353
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21372
21354
|
const target = { containerId: vehicleId, slotLabel: "" };
|
|
21373
21355
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === vehicleId && drag.overSlot.slotLabel === "";
|
|
21374
21356
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21412,7 +21394,7 @@ function OccupantRoster({
|
|
|
21412
21394
|
);
|
|
21413
21395
|
}
|
|
21414
21396
|
function SeatTile({ seat, vehicleId, drag, busy }) {
|
|
21415
|
-
const { t } =
|
|
21397
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21416
21398
|
const target = { containerId: vehicleId, slotLabel: seat.seatLabel };
|
|
21417
21399
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === target.containerId && drag.overSlot.slotLabel === target.slotLabel;
|
|
21418
21400
|
const occupant = seat.occupant;
|
|
@@ -21475,7 +21457,7 @@ function VehicleKebab({
|
|
|
21475
21457
|
onUnlinkManager,
|
|
21476
21458
|
onDelete
|
|
21477
21459
|
}) {
|
|
21478
|
-
const { t } =
|
|
21460
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21479
21461
|
const [open, setOpen] = react.useState(false);
|
|
21480
21462
|
const rootRef = react.useRef(null);
|
|
21481
21463
|
const triggerRef = react.useRef(null);
|
|
@@ -21585,7 +21567,7 @@ function VehicleCard({
|
|
|
21585
21567
|
onUnlinkManager,
|
|
21586
21568
|
onDelete
|
|
21587
21569
|
}) {
|
|
21588
|
-
const { t } =
|
|
21570
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21589
21571
|
const percent = fillPercent2(vehicle);
|
|
21590
21572
|
const days = daysLabel(vehicle.days);
|
|
21591
21573
|
const bodyId = `kf-vehicle-${vehicle.id}`;
|
|
@@ -21720,7 +21702,7 @@ function VehicleDaysDialog({
|
|
|
21720
21702
|
onClose,
|
|
21721
21703
|
onSubmit
|
|
21722
21704
|
}) {
|
|
21723
|
-
const { t } =
|
|
21705
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21724
21706
|
const titleId = react.useId();
|
|
21725
21707
|
const [selected, setSelected] = react.useState(vehicle.days);
|
|
21726
21708
|
const wholeTrip = selected.length === 0;
|
|
@@ -21819,7 +21801,7 @@ function VehicleFormDialog({
|
|
|
21819
21801
|
onClose,
|
|
21820
21802
|
onSubmit
|
|
21821
21803
|
}) {
|
|
21822
|
-
const { t } =
|
|
21804
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
21823
21805
|
const titleId = react.useId();
|
|
21824
21806
|
const isEdit = vehicle !== null;
|
|
21825
21807
|
const [regNo, setRegNo] = react.useState(vehicle?.regNo ?? "");
|
|
@@ -22014,7 +21996,7 @@ function VehiclesSkeleton() {
|
|
|
22014
21996
|
] }, id)) });
|
|
22015
21997
|
}
|
|
22016
21998
|
function VehiclesEmpty({ onAddVehicle }) {
|
|
22017
|
-
const { t } =
|
|
21999
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22018
22000
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", children: [
|
|
22019
22001
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon2, {}) }),
|
|
22020
22002
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.emptyTitle") }),
|
|
@@ -22023,7 +22005,7 @@ function VehiclesEmpty({ onAddVehicle }) {
|
|
|
22023
22005
|
] });
|
|
22024
22006
|
}
|
|
22025
22007
|
function VehiclesFailed({ onRetry }) {
|
|
22026
|
-
const { t } =
|
|
22008
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22027
22009
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", role: "alert", children: [
|
|
22028
22010
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.failedTitle") }),
|
|
22029
22011
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-vehicles-section__state-body", children: t("chrome.tripVehicles.failedBody") }),
|
|
@@ -22031,7 +22013,7 @@ function VehiclesFailed({ onRetry }) {
|
|
|
22031
22013
|
] });
|
|
22032
22014
|
}
|
|
22033
22015
|
function VehiclesDark({ reason }) {
|
|
22034
|
-
const { t } =
|
|
22016
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22035
22017
|
if (reason === "mode") {
|
|
22036
22018
|
return null;
|
|
22037
22019
|
}
|
|
@@ -22050,7 +22032,7 @@ function codeOf10(error) {
|
|
|
22050
22032
|
return classification?.code ?? "unknown";
|
|
22051
22033
|
}
|
|
22052
22034
|
function TripVehiclesSection(props) {
|
|
22053
|
-
const session =
|
|
22035
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
22054
22036
|
if (session.status !== "authenticated") {
|
|
22055
22037
|
return null;
|
|
22056
22038
|
}
|
|
@@ -22061,9 +22043,9 @@ function ReadyTripVehiclesSection({
|
|
|
22061
22043
|
durationDays,
|
|
22062
22044
|
style
|
|
22063
22045
|
}) {
|
|
22064
|
-
const { t } =
|
|
22065
|
-
const seating =
|
|
22066
|
-
const managers =
|
|
22046
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22047
|
+
const seating = chunkGD5UU4G6_cjs.useSeating(tripRef);
|
|
22048
|
+
const managers = chunkGD5UU4G6_cjs.useManagers(tripRef);
|
|
22067
22049
|
const [openVehicleId, setOpenVehicleId] = react.useState(null);
|
|
22068
22050
|
const [day, setDay] = react.useState(null);
|
|
22069
22051
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -22197,7 +22179,7 @@ function ReadyTripVehiclesSection({
|
|
|
22197
22179
|
return /* @__PURE__ */ jsxRuntime.jsx(VehiclesDark, { reason: seating.reason });
|
|
22198
22180
|
}
|
|
22199
22181
|
const pool = ready?.unassignedPool;
|
|
22200
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style:
|
|
22182
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
22201
22183
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__toolbar", children: [
|
|
22202
22184
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-title", children: t("chrome.tripVehicles.panelLabel") }),
|
|
22203
22185
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-spacer" }),
|
|
@@ -22490,7 +22472,7 @@ function WarningIcon13(props) {
|
|
|
22490
22472
|
|
|
22491
22473
|
// src/admin/composite/office/TripWorkspace/internal/panels/deriveCloseout.ts
|
|
22492
22474
|
function tabForBlocker(row) {
|
|
22493
|
-
return
|
|
22475
|
+
return chunkJY2C4S3J_cjs.resolveBlockerDeepLink({ actionKey: row.actionKey })?.tab;
|
|
22494
22476
|
}
|
|
22495
22477
|
function orderedBlockers(rows) {
|
|
22496
22478
|
return [...rows].sort((a, b) => {
|
|
@@ -22530,8 +22512,8 @@ function codeOf11(error) {
|
|
|
22530
22512
|
return classification?.code ?? "unknown";
|
|
22531
22513
|
}
|
|
22532
22514
|
function CloseoutCard({ tripRef, onOpenTab, litTabs }) {
|
|
22533
|
-
const { t } =
|
|
22534
|
-
const closeout =
|
|
22515
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22516
|
+
const closeout = chunkGD5UU4G6_cjs.useCloseout(tripRef);
|
|
22535
22517
|
const [note, setNote] = react.useState(null);
|
|
22536
22518
|
const [pending, setPending] = react.useState(void 0);
|
|
22537
22519
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -22738,7 +22720,7 @@ function AssignManagerDialog({
|
|
|
22738
22720
|
onClose,
|
|
22739
22721
|
onAssign
|
|
22740
22722
|
}) {
|
|
22741
|
-
const { t } =
|
|
22723
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22742
22724
|
const titleId = react.useId();
|
|
22743
22725
|
const [query, setQuery] = react.useState("");
|
|
22744
22726
|
const [selected, setSelected] = react.useState(null);
|
|
@@ -22870,8 +22852,8 @@ var ROLE_LABEL_KEY = {
|
|
|
22870
22852
|
COORDINATOR: "chrome.tripWorkspace.managers.roleCoordinator"
|
|
22871
22853
|
};
|
|
22872
22854
|
function OverviewManagersCard({ trip, onChanged }) {
|
|
22873
|
-
const { t } =
|
|
22874
|
-
const { promoteManager, assignManager, unassignManager, makeManagersFetch } =
|
|
22855
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
22856
|
+
const { promoteManager, assignManager, unassignManager, makeManagersFetch } = chunkJY2C4S3J_cjs.useDirectories();
|
|
22875
22857
|
const [pendingId, setPendingId] = react.useState(void 0);
|
|
22876
22858
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
22877
22859
|
const [assignOpen, setAssignOpen] = react.useState(false);
|
|
@@ -23032,13 +23014,13 @@ function TripOverviewPanel({
|
|
|
23032
23014
|
onOpenTab,
|
|
23033
23015
|
onTripChanged
|
|
23034
23016
|
}) {
|
|
23035
|
-
const { t } =
|
|
23036
|
-
const today =
|
|
23037
|
-
const expenses =
|
|
23017
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23018
|
+
const today = chunkGD5UU4G6_cjs.useManagerToday(trip.ref);
|
|
23019
|
+
const expenses = chunkGD5UU4G6_cjs.useExpenses(trip.ref);
|
|
23038
23020
|
const spendTotalMinor = expenses.status === "ready" && expenses.totals.loaded && !expenses.totals.lastFetchFailed ? expenses.totals.spendTotalMinor : void 0;
|
|
23039
23021
|
const finance = deriveFinance(trip, spendTotalMinor);
|
|
23040
23022
|
const quickActions = QUICK_ACTION_TABS.filter((key) => litTabs.has(key));
|
|
23041
|
-
const closeoutProbe =
|
|
23023
|
+
const closeoutProbe = chunkGD5UU4G6_cjs.useCloseout(trip.ref);
|
|
23042
23024
|
const closeoutStage = closeoutProbe.status === "ready" && hasReturned(closeoutProbe.aggregate) ? closeoutProbe.aggregate?.stage ?? null : null;
|
|
23043
23025
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview", children: [
|
|
23044
23026
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview-main", children: [
|
|
@@ -23077,7 +23059,7 @@ function TripOverviewPanel({
|
|
|
23077
23059
|
function TodayCard({
|
|
23078
23060
|
today
|
|
23079
23061
|
}) {
|
|
23080
|
-
const { t } =
|
|
23062
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23081
23063
|
if (today.kind === "idle") return null;
|
|
23082
23064
|
const openChecklist = today.checklist ?? [];
|
|
23083
23065
|
const itinerary = today.itinerary ?? [];
|
|
@@ -23101,7 +23083,7 @@ function TodayCard({
|
|
|
23101
23083
|
function FinanceCard({
|
|
23102
23084
|
finance
|
|
23103
23085
|
}) {
|
|
23104
|
-
const { t } =
|
|
23086
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23105
23087
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-workspace__card", children: [
|
|
23106
23088
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__card-head", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-workspace__card-title", children: t("chrome.tripWorkspace.overview.financeTitle") }) }),
|
|
23107
23089
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__finance-body", children: [
|
|
@@ -23364,7 +23346,7 @@ var BLOCKER_BODY_KEY = {
|
|
|
23364
23346
|
capabilityDark: "chrome.tripWorkspace.blocker.capabilityDarkBody"
|
|
23365
23347
|
};
|
|
23366
23348
|
function TripTabPlaceholder({ tabKey, blocker }) {
|
|
23367
|
-
const { t } =
|
|
23349
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23368
23350
|
const label = t(TAB_LABEL_KEY[tabKey]);
|
|
23369
23351
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__placeholder", children: [
|
|
23370
23352
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-workspace__placeholder-glyph", children: blocker === "deferred" ? /* @__PURE__ */ jsxRuntime.jsx(ClockIcon2, {}) : /* @__PURE__ */ jsxRuntime.jsx(LockIcon11, {}) }),
|
|
@@ -23374,7 +23356,7 @@ function TripTabPlaceholder({ tabKey, blocker }) {
|
|
|
23374
23356
|
] });
|
|
23375
23357
|
}
|
|
23376
23358
|
function TripKpiStrip({ cells }) {
|
|
23377
|
-
const { t } =
|
|
23359
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23378
23360
|
if (cells.length === 0) return null;
|
|
23379
23361
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-strip", "data-columns": cells.length, children: cells.map((cell) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__kpi-card", children: [
|
|
23380
23362
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-label", children: t(cell.labelKey) }),
|
|
@@ -23383,7 +23365,7 @@ function TripKpiStrip({ cells }) {
|
|
|
23383
23365
|
] }, cell.key)) });
|
|
23384
23366
|
}
|
|
23385
23367
|
function TripTabRail({ tabs, activeKey, onSelect }) {
|
|
23386
|
-
const { t } =
|
|
23368
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23387
23369
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23388
23370
|
"div",
|
|
23389
23371
|
{
|
|
@@ -23417,7 +23399,7 @@ var STATUS_LABEL_KEY9 = {
|
|
|
23417
23399
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
23418
23400
|
};
|
|
23419
23401
|
function TripWorkspaceHead({ trip, onBack, style }) {
|
|
23420
|
-
const { t } =
|
|
23402
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23421
23403
|
const head = deriveTripHead(trip);
|
|
23422
23404
|
const subLabelParts = [
|
|
23423
23405
|
head.dateRangeLabel,
|
|
@@ -23428,7 +23410,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23428
23410
|
trip.manifestCount === 1 ? "chrome.tripWorkspace.travellerCountOne" : "chrome.tripWorkspace.travellerCount"
|
|
23429
23411
|
).replace("{count}", String(trip.manifestCount))
|
|
23430
23412
|
];
|
|
23431
|
-
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style:
|
|
23413
|
+
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style: chunk64AFXHOF_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__head-identity", children: [
|
|
23432
23414
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__eyebrow", children: [
|
|
23433
23415
|
onBack === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
23434
23416
|
"button",
|
|
@@ -23460,7 +23442,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23460
23442
|
] }) });
|
|
23461
23443
|
}
|
|
23462
23444
|
function TripWorkspace(props) {
|
|
23463
|
-
const session =
|
|
23445
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
23464
23446
|
if (session.status !== "authenticated") {
|
|
23465
23447
|
return /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {});
|
|
23466
23448
|
}
|
|
@@ -23475,10 +23457,10 @@ function ReadyTripWorkspace({
|
|
|
23475
23457
|
components,
|
|
23476
23458
|
style
|
|
23477
23459
|
}) {
|
|
23478
|
-
const { t } =
|
|
23479
|
-
const { read, readFailed, refresh } =
|
|
23460
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23461
|
+
const { read, readFailed, refresh } = chunkJY2C4S3J_cjs.useAgencyTrip(tripRef);
|
|
23480
23462
|
if (readFailed) {
|
|
23481
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style:
|
|
23463
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunk64AFXHOF_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__status-block", role: "alert", children: [
|
|
23482
23464
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon13, { className: "kf-trip-workspace__status-icon" }),
|
|
23483
23465
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-title", children: t("chrome.tripWorkspace.errorTitle") }),
|
|
23484
23466
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-body", children: t("chrome.tripWorkspace.errorBody") }),
|
|
@@ -23494,7 +23476,7 @@ function ReadyTripWorkspace({
|
|
|
23494
23476
|
] }) });
|
|
23495
23477
|
}
|
|
23496
23478
|
if (read === void 0) {
|
|
23497
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style:
|
|
23479
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunk64AFXHOF_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {}) });
|
|
23498
23480
|
}
|
|
23499
23481
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23500
23482
|
TripWorkspaceBody,
|
|
@@ -23522,7 +23504,7 @@ function TripWorkspaceBody({
|
|
|
23522
23504
|
components,
|
|
23523
23505
|
style
|
|
23524
23506
|
}) {
|
|
23525
|
-
const { statuses, loaded } =
|
|
23507
|
+
const { statuses, loaded } = chunkJY2C4S3J_cjs.useCapabilityStatuses(tripRef);
|
|
23526
23508
|
const Head = components?.TripWorkspaceHead ?? TripWorkspaceHead;
|
|
23527
23509
|
const tabs = react.useMemo(() => resolveTripTabs(trip.eventType, statuses), [trip.eventType, statuses]);
|
|
23528
23510
|
const [requestedTab, setRequestedTab] = react.useState(initialTab ?? "overview");
|
|
@@ -23606,7 +23588,7 @@ function TripWorkspaceBody({
|
|
|
23606
23588
|
}),
|
|
23607
23589
|
[trip, litTabs, tripRef, onTripChanged, onOpenTravellerProfile]
|
|
23608
23590
|
);
|
|
23609
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style:
|
|
23591
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
23610
23592
|
/* @__PURE__ */ jsxRuntime.jsx(Head, { trip, ...onBack !== void 0 ? { onBack } : {} }),
|
|
23611
23593
|
/* @__PURE__ */ jsxRuntime.jsx(TripKpiStrip, { cells: kpis }),
|
|
23612
23594
|
loaded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -23803,7 +23785,7 @@ function AdminShell({
|
|
|
23803
23785
|
function renderNavIcon(iconKey) {
|
|
23804
23786
|
return NavIcon !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavIcon, { iconKey }) : navIcon(iconKey);
|
|
23805
23787
|
}
|
|
23806
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style:
|
|
23788
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style: chunk64AFXHOF_cjs.tokenStyle(style), children: [
|
|
23807
23789
|
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "kf-admin-shell__sidebar", children: [
|
|
23808
23790
|
brand !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell__brand", children: [
|
|
23809
23791
|
brand.logo !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shell__brand-logo", children: brand.logo }) : null,
|
|
@@ -23907,7 +23889,7 @@ function AdminShell({
|
|
|
23907
23889
|
] });
|
|
23908
23890
|
}
|
|
23909
23891
|
function KaafilAgencyWorkspace(props) {
|
|
23910
|
-
const session =
|
|
23892
|
+
const session = chunk64AFXHOF_cjs.useSession();
|
|
23911
23893
|
if (session.status !== "authenticated") {
|
|
23912
23894
|
return null;
|
|
23913
23895
|
}
|
|
@@ -23932,8 +23914,8 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
23932
23914
|
components,
|
|
23933
23915
|
style
|
|
23934
23916
|
} = props;
|
|
23935
|
-
const { t } =
|
|
23936
|
-
const agencyAdminMe =
|
|
23917
|
+
const { t } = chunk64AFXHOF_cjs.useKaafilChrome();
|
|
23918
|
+
const agencyAdminMe = chunkJY2C4S3J_cjs.useAgencyAdminMe();
|
|
23937
23919
|
const [internalPane, setInternalPane] = react.useState(
|
|
23938
23920
|
initialPane ?? "trips"
|
|
23939
23921
|
);
|
|
@@ -24194,27 +24176,27 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
24194
24176
|
|
|
24195
24177
|
Object.defineProperty(exports, "BootErrorScreen", {
|
|
24196
24178
|
enumerable: true,
|
|
24197
|
-
get: function () { return
|
|
24179
|
+
get: function () { return chunkLSOV3FJL_cjs.BootErrorScreen; }
|
|
24198
24180
|
});
|
|
24199
24181
|
Object.defineProperty(exports, "LockedTripScreen", {
|
|
24200
24182
|
enumerable: true,
|
|
24201
|
-
get: function () { return
|
|
24183
|
+
get: function () { return chunkLSOV3FJL_cjs.LockedTripScreen; }
|
|
24202
24184
|
});
|
|
24203
24185
|
Object.defineProperty(exports, "NotFoundScreen", {
|
|
24204
24186
|
enumerable: true,
|
|
24205
|
-
get: function () { return
|
|
24187
|
+
get: function () { return chunkLSOV3FJL_cjs.NotFoundScreen; }
|
|
24206
24188
|
});
|
|
24207
24189
|
Object.defineProperty(exports, "OfflineFallbackScreen", {
|
|
24208
24190
|
enumerable: true,
|
|
24209
|
-
get: function () { return
|
|
24191
|
+
get: function () { return chunkLSOV3FJL_cjs.OfflineFallbackScreen; }
|
|
24210
24192
|
});
|
|
24211
24193
|
Object.defineProperty(exports, "PlanLockedScreen", {
|
|
24212
24194
|
enumerable: true,
|
|
24213
|
-
get: function () { return
|
|
24195
|
+
get: function () { return chunkLSOV3FJL_cjs.PlanLockedScreen; }
|
|
24214
24196
|
});
|
|
24215
24197
|
Object.defineProperty(exports, "SessionExpiredScreen", {
|
|
24216
24198
|
enumerable: true,
|
|
24217
|
-
get: function () { return
|
|
24199
|
+
get: function () { return chunkLSOV3FJL_cjs.SessionExpiredScreen; }
|
|
24218
24200
|
});
|
|
24219
24201
|
exports.AdminShell = AdminShell;
|
|
24220
24202
|
exports.AgencySettingsScreen = AgencySettingsScreen;
|