kaafil-react-uikit 0.4.2 → 0.6.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 +28 -0
- package/dist/admin/index.cjs +394 -355
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +55 -16
- package/dist/admin/index.js.map +1 -1
- package/dist/{chunk-762SWUEG.js → chunk-4BPCKBLP.js} +3 -3
- package/dist/{chunk-762SWUEG.js.map → chunk-4BPCKBLP.js.map} +1 -1
- package/dist/{chunk-CK3L6Y43.cjs → chunk-4QMYUKW4.cjs} +10 -2
- package/dist/chunk-4QMYUKW4.cjs.map +1 -0
- package/dist/{chunk-LO3GQFQ6.cjs → chunk-53ITV6GF.cjs} +4 -4
- package/dist/{chunk-LO3GQFQ6.cjs.map → chunk-53ITV6GF.cjs.map} +1 -1
- package/dist/{chunk-V6UQ6GIM.cjs → chunk-77RKNRNH.cjs} +57 -58
- package/dist/chunk-77RKNRNH.cjs.map +1 -0
- package/dist/{chunk-DI77H7ED.cjs → chunk-AWOKWGTB.cjs} +83 -83
- package/dist/{chunk-DI77H7ED.cjs.map → chunk-AWOKWGTB.cjs.map} +1 -1
- package/dist/{chunk-EDLIJSMR.js → chunk-CJMUPBZ7.js} +5 -5
- package/dist/{chunk-EDLIJSMR.js.map → chunk-CJMUPBZ7.js.map} +1 -1
- package/dist/{chunk-ITGVRN2S.js → chunk-F6B4CDUL.js} +3 -3
- package/dist/{chunk-ITGVRN2S.js.map → chunk-F6B4CDUL.js.map} +1 -1
- package/dist/{chunk-XU7GP53M.js → chunk-F6YBM6EE.js} +3 -3
- package/dist/{chunk-XU7GP53M.js.map → chunk-F6YBM6EE.js.map} +1 -1
- package/dist/{chunk-QMUIZHJO.js → chunk-HNENKHHJ.js} +8 -9
- package/dist/chunk-HNENKHHJ.js.map +1 -0
- package/dist/{chunk-RW6TJMRK.js → chunk-JHLPO6LZ.js} +3 -3
- package/dist/{chunk-RW6TJMRK.js.map → chunk-JHLPO6LZ.js.map} +1 -1
- package/dist/{chunk-3RZDHDEY.cjs → chunk-OOHU3ECL.cjs} +17 -17
- package/dist/{chunk-3RZDHDEY.cjs.map → chunk-OOHU3ECL.cjs.map} +1 -1
- package/dist/{chunk-3E2FN5JJ.js → chunk-PWZNUXKT.js} +3 -3
- package/dist/{chunk-3E2FN5JJ.js.map → chunk-PWZNUXKT.js.map} +1 -1
- package/dist/{chunk-6FUVFVYY.js → chunk-SEPFCHBJ.js} +10 -2
- package/dist/chunk-SEPFCHBJ.js.map +1 -0
- package/dist/chunk-V45VFRBI.cjs +12 -0
- package/dist/{chunk-62HCQWZL.cjs.map → chunk-V45VFRBI.cjs.map} +1 -1
- package/dist/{chunk-QD4Z5DRT.cjs → chunk-XPCCR7OH.cjs} +12 -12
- package/dist/{chunk-QD4Z5DRT.cjs.map → chunk-XPCCR7OH.cjs.map} +1 -1
- package/dist/{chunk-XYIOM75D.cjs → chunk-XPF737RG.cjs} +9 -9
- package/dist/{chunk-XYIOM75D.cjs.map → chunk-XPF737RG.cjs.map} +1 -1
- package/dist/core/index.cjs +107 -107
- package/dist/core/index.js +10 -10
- package/dist/manager/index.cjs +239 -239
- package/dist/manager/index.js +6 -6
- package/dist/traveller/index.cjs +35 -35
- package/dist/traveller/index.js +5 -5
- package/package.json +2 -2
- package/dist/chunk-62HCQWZL.cjs +0 -12
- package/dist/chunk-6FUVFVYY.js.map +0 -1
- package/dist/chunk-CK3L6Y43.cjs.map +0 -1
- package/dist/chunk-QMUIZHJO.js.map +0 -1
- package/dist/chunk-V6UQ6GIM.cjs.map +0 -1
package/dist/admin/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunk77RKNRNH_cjs = require('../chunk-77RKNRNH.cjs');
|
|
4
|
+
var chunkAWOKWGTB_cjs = require('../chunk-AWOKWGTB.cjs');
|
|
5
|
+
require('../chunk-53ITV6GF.cjs');
|
|
6
|
+
var chunkXPCCR7OH_cjs = require('../chunk-XPCCR7OH.cjs');
|
|
7
|
+
var chunk4QMYUKW4_cjs = require('../chunk-4QMYUKW4.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
@@ -109,13 +109,13 @@ function CloseIcon(props) {
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
function StatusPill({ tone, children, style }) {
|
|
112
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style:
|
|
112
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
113
113
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-pill-dot", "aria-hidden": "true" }),
|
|
114
114
|
children
|
|
115
115
|
] });
|
|
116
116
|
}
|
|
117
117
|
function Tag({ tone, children, style }) {
|
|
118
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style:
|
|
118
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style: chunk4QMYUKW4_cjs.tokenStyle(style), children });
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
// src/admin/composite/office/AgencySettingsScreen/internal/fieldDisplayValue.ts
|
|
@@ -183,7 +183,7 @@ function SheetDialog({
|
|
|
183
183
|
role: "dialog",
|
|
184
184
|
"aria-modal": "true",
|
|
185
185
|
"aria-labelledby": titleId,
|
|
186
|
-
style:
|
|
186
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
187
187
|
children: [
|
|
188
188
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-sheet-header", children: [
|
|
189
189
|
eyebrow === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-admin-shared-patterns-sheet-eyebrow", children: eyebrow }),
|
|
@@ -479,7 +479,7 @@ function TriStateToggle({ entry, onChange, t }) {
|
|
|
479
479
|
function NoRender() {
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
|
-
var fieldKindRegistry =
|
|
482
|
+
var fieldKindRegistry = chunk4QMYUKW4_cjs.createRegistry({
|
|
483
483
|
fallback: { render: NoRender }
|
|
484
484
|
});
|
|
485
485
|
fieldKindRegistry.register("toggle", {
|
|
@@ -629,11 +629,11 @@ function SectionCard({
|
|
|
629
629
|
onDismissError,
|
|
630
630
|
style
|
|
631
631
|
}) {
|
|
632
|
-
const { t } =
|
|
632
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
633
633
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
634
634
|
const setFields = section.fields.filter((field) => stored?.[field.key] !== void 0);
|
|
635
635
|
const isCustomized = setFields.length > 0;
|
|
636
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style:
|
|
636
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
637
637
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-agency-settings-screen__panel-head", children: [
|
|
638
638
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-head-copy", children: [
|
|
639
639
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "kf-agency-settings-screen__panel-eyebrow", children: [
|
|
@@ -1005,8 +1005,8 @@ function AgencySettingsScreen({
|
|
|
1005
1005
|
components,
|
|
1006
1006
|
style
|
|
1007
1007
|
}) {
|
|
1008
|
-
const { t } =
|
|
1009
|
-
const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } =
|
|
1008
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1009
|
+
const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } = chunk77RKNRNH_cjs.useAgencySettings();
|
|
1010
1010
|
const [selectedSectionId, setSelectedSectionId] = react.useState(AGENCY_SETTINGS_SECTIONS[0]?.id);
|
|
1011
1011
|
const [savingSectionId, setSavingSectionId] = react.useState(void 0);
|
|
1012
1012
|
const [sectionError, setSectionError] = react.useState(void 0);
|
|
@@ -1023,13 +1023,13 @@ function AgencySettingsScreen({
|
|
|
1023
1023
|
try {
|
|
1024
1024
|
await patchSettings({ version: document2.version, [sectionId]: patch });
|
|
1025
1025
|
} catch (error) {
|
|
1026
|
-
const kind =
|
|
1026
|
+
const kind = chunkAWOKWGTB_cjs.classifyError(error).code === "CONFLICT_VERSION" ? "conflict" : "failed";
|
|
1027
1027
|
setSectionError({ sectionId, kind });
|
|
1028
1028
|
} finally {
|
|
1029
1029
|
setSavingSectionId(void 0);
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen", style:
|
|
1032
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
1033
1033
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__heading", children: [
|
|
1034
1034
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-agency-settings-screen__eyebrow", children: t("chrome.agencySettingsScreen.eyebrow") }),
|
|
1035
1035
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "kf-agency-settings-screen__title", children: title }),
|
|
@@ -1146,7 +1146,7 @@ function summaryFor(t, selected, everyLabelKey, optionLabelKey) {
|
|
|
1146
1146
|
return selected.length === 0 ? t(everyLabelKey) : selected.map(optionLabelKey).join(", ");
|
|
1147
1147
|
}
|
|
1148
1148
|
function AutoAttachPanel({ template, saving, onSave }) {
|
|
1149
|
-
const { t } =
|
|
1149
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1150
1150
|
const titleId = react.useId();
|
|
1151
1151
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
1152
1152
|
const [draft, setDraft] = react.useState(() => draftFromTemplate(template));
|
|
@@ -1382,9 +1382,9 @@ function TemplateEditorHeader({
|
|
|
1382
1382
|
onPublish,
|
|
1383
1383
|
style
|
|
1384
1384
|
}) {
|
|
1385
|
-
const { t } =
|
|
1385
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1386
1386
|
const statusLabelKey5 = template.status === "PUBLISHED" ? "chrome.checklistTemplateEditor.status.published" : "chrome.checklistTemplateEditor.status.draft";
|
|
1387
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header", style:
|
|
1387
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
1388
1388
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header-identity", children: [
|
|
1389
1389
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header-top", children: [
|
|
1390
1390
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1453,7 +1453,7 @@ function TemplateItemEditDialog({
|
|
|
1453
1453
|
onRemove,
|
|
1454
1454
|
onClose
|
|
1455
1455
|
}) {
|
|
1456
|
-
const { t } =
|
|
1456
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1457
1457
|
const titleId = react.useId();
|
|
1458
1458
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1459
1459
|
SheetDialog,
|
|
@@ -1603,7 +1603,7 @@ function TemplateItemRow({
|
|
|
1603
1603
|
onReorder,
|
|
1604
1604
|
style
|
|
1605
1605
|
}) {
|
|
1606
|
-
const { t } =
|
|
1606
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1607
1607
|
const dayOffset = item.dayOffset.trim().length > 0 ? Number.parseInt(item.dayOffset, 10) : null;
|
|
1608
1608
|
const dayLabel = dayOffset === null ? "\u2014" : dayOffset > 0 ? `D+${dayOffset}` : `D${dayOffset}`;
|
|
1609
1609
|
return (
|
|
@@ -1631,7 +1631,7 @@ function TemplateItemRow({
|
|
|
1631
1631
|
onReorder(draggedDraftId, item.draftId);
|
|
1632
1632
|
}
|
|
1633
1633
|
},
|
|
1634
|
-
style:
|
|
1634
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
1635
1635
|
children: [
|
|
1636
1636
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__item-drag", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(DragHandleIcon, {}) }),
|
|
1637
1637
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__item-index", children: String(index + 1).padStart(2, "0") }),
|
|
@@ -1703,8 +1703,8 @@ function ChecklistTemplateEditor({
|
|
|
1703
1703
|
components,
|
|
1704
1704
|
style
|
|
1705
1705
|
}) {
|
|
1706
|
-
const { t } =
|
|
1707
|
-
const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } =
|
|
1706
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1707
|
+
const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } = chunk77RKNRNH_cjs.useAgencyChecklistTemplates();
|
|
1708
1708
|
const template = templates.find((candidate) => candidate.id === templateId);
|
|
1709
1709
|
const [title, setTitle] = react.useState("");
|
|
1710
1710
|
const [items, setItems] = react.useState([]);
|
|
@@ -1821,7 +1821,7 @@ function ChecklistTemplateEditor({
|
|
|
1821
1821
|
}
|
|
1822
1822
|
};
|
|
1823
1823
|
if (lastFetchFailed && !loaded) {
|
|
1824
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style:
|
|
1824
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", role: "alert", children: [
|
|
1825
1825
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon2, { className: "kf-checklist-template-editor__status-icon kf-checklist-template-editor__status-icon--danger" }),
|
|
1826
1826
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-editor__status-title", children: t("chrome.checklistTemplateEditor.errorTitle") }),
|
|
1827
1827
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1836,20 +1836,20 @@ function ChecklistTemplateEditor({
|
|
|
1836
1836
|
] }) });
|
|
1837
1837
|
}
|
|
1838
1838
|
if (!loaded) {
|
|
1839
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style:
|
|
1839
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__skeleton", "aria-hidden": "true", children: [
|
|
1840
1840
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" }),
|
|
1841
1841
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" }),
|
|
1842
1842
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" })
|
|
1843
1843
|
] }) });
|
|
1844
1844
|
}
|
|
1845
1845
|
if (template === void 0) {
|
|
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: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", children: [
|
|
1847
1847
|
/* @__PURE__ */ jsxRuntime.jsx(EmptyStateIcon2, { className: "kf-checklist-template-editor__status-icon" }),
|
|
1848
1848
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-editor__status-title", children: t("chrome.checklistTemplateEditor.notFoundTitle") })
|
|
1849
1849
|
] }) });
|
|
1850
1850
|
}
|
|
1851
1851
|
const editingItem = items.find((item) => item.draftId === editingDraftId);
|
|
1852
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor", style:
|
|
1852
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
1853
1853
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1854
1854
|
TemplateEditorHeader2,
|
|
1855
1855
|
{
|
|
@@ -1952,7 +1952,7 @@ var AUDIENCE_HINT_KEY = {
|
|
|
1952
1952
|
EXTERNAL: "chrome.checklistTemplateLibrary.audience.externalHint"
|
|
1953
1953
|
};
|
|
1954
1954
|
function CreateTemplateSheet({ onSubmit, onClose }) {
|
|
1955
|
-
const { t } =
|
|
1955
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
1956
1956
|
const titleId = react.useId();
|
|
1957
1957
|
const [locale, setLocale] = react.useState("en");
|
|
1958
1958
|
const [title, setTitle] = react.useState("");
|
|
@@ -2069,7 +2069,7 @@ function DeleteTemplateConfirmSheet({
|
|
|
2069
2069
|
onConfirm,
|
|
2070
2070
|
onClose
|
|
2071
2071
|
}) {
|
|
2072
|
-
const { t } =
|
|
2072
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
2073
2073
|
const titleId = react.useId();
|
|
2074
2074
|
if (template === void 0) {
|
|
2075
2075
|
return null;
|
|
@@ -2188,7 +2188,7 @@ function TemplateRow({
|
|
|
2188
2188
|
onDelete,
|
|
2189
2189
|
style
|
|
2190
2190
|
}) {
|
|
2191
|
-
const { t } =
|
|
2191
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
2192
2192
|
const statusLabelKey5 = template.status === "PUBLISHED" ? "chrome.checklistTemplateLibrary.status.published" : "chrome.checklistTemplateLibrary.status.draft";
|
|
2193
2193
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2194
2194
|
"tr",
|
|
@@ -2197,7 +2197,7 @@ function TemplateRow({
|
|
|
2197
2197
|
className: "kf-checklist-template-library__table-row",
|
|
2198
2198
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
2199
2199
|
"data-selected": selected === true ? "true" : void 0,
|
|
2200
|
-
style:
|
|
2200
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
2201
2201
|
children: [
|
|
2202
2202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2203
2203
|
"td",
|
|
@@ -2287,7 +2287,7 @@ function TemplateLibrarySkeleton() {
|
|
|
2287
2287
|
] }, rowIndex)) }) }) });
|
|
2288
2288
|
}
|
|
2289
2289
|
function CardHeading({ count }) {
|
|
2290
|
-
const { t } =
|
|
2290
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
2291
2291
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-library__card-title", children: t(
|
|
2292
2292
|
count === 1 ? "chrome.checklistTemplateLibrary.countLabelOne" : "chrome.checklistTemplateLibrary.countLabel"
|
|
2293
2293
|
).replace("{count}", String(count)) });
|
|
@@ -2303,8 +2303,8 @@ function ChecklistTemplateLibrary({
|
|
|
2303
2303
|
components,
|
|
2304
2304
|
style
|
|
2305
2305
|
}) {
|
|
2306
|
-
const { t } =
|
|
2307
|
-
const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } =
|
|
2306
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
2307
|
+
const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } = chunk77RKNRNH_cjs.useAgencyChecklistTemplates();
|
|
2308
2308
|
const isControlled = controlledCreating !== void 0 && onCreatingChange !== void 0;
|
|
2309
2309
|
const [internalCreating, setInternalCreating] = react.useState(false);
|
|
2310
2310
|
const creating = isControlled ? controlledCreating : internalCreating;
|
|
@@ -2340,7 +2340,7 @@ function ChecklistTemplateLibrary({
|
|
|
2340
2340
|
]
|
|
2341
2341
|
}
|
|
2342
2342
|
);
|
|
2343
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library", style:
|
|
2343
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
2344
2344
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library__heading", children: [
|
|
2345
2345
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library__heading-copy", children: [
|
|
2346
2346
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-checklist-template-library__title", children: title }),
|
|
@@ -2635,8 +2635,8 @@ function BuilderHeader({
|
|
|
2635
2635
|
pending,
|
|
2636
2636
|
style
|
|
2637
2637
|
}) {
|
|
2638
|
-
const { t } =
|
|
2639
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style:
|
|
2638
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
2639
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
2640
2640
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header-identity", children: [
|
|
2641
2641
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header-top", children: [
|
|
2642
2642
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2832,7 +2832,7 @@ var fallback = {
|
|
|
2832
2832
|
preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-form-builder__preview-unsupported", children: field.label }),
|
|
2833
2833
|
configFields: NoConfigFields
|
|
2834
2834
|
};
|
|
2835
|
-
var fieldRegistry =
|
|
2835
|
+
var fieldRegistry = chunk4QMYUKW4_cjs.createRegistry({ fallback });
|
|
2836
2836
|
fieldRegistry.register("HEADING", {
|
|
2837
2837
|
preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-form-builder__preview-heading", children: field.label }),
|
|
2838
2838
|
configFields: NoConfigFields
|
|
@@ -3304,7 +3304,7 @@ fieldRegistry.register("ADDRESS", {
|
|
|
3304
3304
|
}
|
|
3305
3305
|
});
|
|
3306
3306
|
function FieldEditDialog(props) {
|
|
3307
|
-
const { t } =
|
|
3307
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
3308
3308
|
const titleId = react.useId();
|
|
3309
3309
|
const { bindings, saving, onClose } = props;
|
|
3310
3310
|
const isEdit = props.mode === "edit";
|
|
@@ -3541,7 +3541,7 @@ function FieldEditDialog(props) {
|
|
|
3541
3541
|
);
|
|
3542
3542
|
}
|
|
3543
3543
|
function LivePreviewPane({ title, sections, fields }) {
|
|
3544
|
-
const { t } =
|
|
3544
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
3545
3545
|
const [frame, setFrame] = react.useState("desktop");
|
|
3546
3546
|
const [answers, setAnswers] = react.useState({});
|
|
3547
3547
|
function setAnswer(fieldId, value) {
|
|
@@ -3630,7 +3630,7 @@ function FieldRow({
|
|
|
3630
3630
|
onDragEnd,
|
|
3631
3631
|
style
|
|
3632
3632
|
}) {
|
|
3633
|
-
const { t } =
|
|
3633
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
3634
3634
|
const hasHelp = field.helpText !== null && field.helpText.length > 0;
|
|
3635
3635
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3636
3636
|
"li",
|
|
@@ -3638,7 +3638,7 @@ function FieldRow({
|
|
|
3638
3638
|
className: "kf-form-builder__field-row",
|
|
3639
3639
|
"data-dragging": dragging ? "true" : void 0,
|
|
3640
3640
|
"data-drag-over": dragOver ? "true" : void 0,
|
|
3641
|
-
style:
|
|
3641
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
3642
3642
|
onDragOver: (event) => {
|
|
3643
3643
|
event.preventDefault();
|
|
3644
3644
|
onDragOverRow();
|
|
@@ -3700,7 +3700,7 @@ function SectionBlock({
|
|
|
3700
3700
|
onOpenField,
|
|
3701
3701
|
onReorderField
|
|
3702
3702
|
}) {
|
|
3703
|
-
const { t } =
|
|
3703
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
3704
3704
|
const [title, setTitle] = react.useState(section.title ?? "");
|
|
3705
3705
|
const [draggedFieldId, setDraggedFieldId] = react.useState(void 0);
|
|
3706
3706
|
const [dragOverFieldId, setDragOverFieldId] = react.useState(void 0);
|
|
@@ -3834,7 +3834,7 @@ function draftFromForm(form) {
|
|
|
3834
3834
|
};
|
|
3835
3835
|
}
|
|
3836
3836
|
function TargetingSummary({ form }) {
|
|
3837
|
-
const { t } =
|
|
3837
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
3838
3838
|
const anchorLabel = (anchor) => t(`chrome.formBuilder.summary.anchor.${anchor}`);
|
|
3839
3839
|
const eventTypes = form.appliesToEventTypes.length === 0 ? t("chrome.formBuilder.summary.everyEventType") : form.appliesToEventTypes.map((type) => t(`chrome.formBuilder.targeting.eventType.${type}`)).join(" \xB7 ");
|
|
3840
3840
|
const tripModes = form.appliesToTripModes.length === 0 ? t("chrome.formBuilder.summary.everyTripMode") : form.appliesToTripModes.map((mode) => t(`chrome.formBuilder.targeting.tripMode.${mode}`)).join(" \xB7 ");
|
|
@@ -3895,7 +3895,7 @@ function TargetingSummary({ form }) {
|
|
|
3895
3895
|
] }, cell.key)) });
|
|
3896
3896
|
}
|
|
3897
3897
|
function TargetingPanel({ form, saving, onSave }) {
|
|
3898
|
-
const { t } =
|
|
3898
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
3899
3899
|
const [editing, setEditing] = react.useState(false);
|
|
3900
3900
|
const [submitted, setSubmitted] = react.useState(false);
|
|
3901
3901
|
const [draft, setDraft] = react.useState(() => draftFromForm(form));
|
|
@@ -4191,7 +4191,7 @@ function buildReorderSections(sections, fieldsBySection) {
|
|
|
4191
4191
|
}));
|
|
4192
4192
|
}
|
|
4193
4193
|
function FormBuilder({ formId, onBack, components, style }) {
|
|
4194
|
-
const { t } =
|
|
4194
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
4195
4195
|
const {
|
|
4196
4196
|
getForm,
|
|
4197
4197
|
patchForm,
|
|
@@ -4209,7 +4209,7 @@ function FormBuilder({ formId, onBack, components, style }) {
|
|
|
4209
4209
|
deleteField,
|
|
4210
4210
|
reorderForm,
|
|
4211
4211
|
listBindings
|
|
4212
|
-
} =
|
|
4212
|
+
} = chunk77RKNRNH_cjs.useAgencyForms();
|
|
4213
4213
|
const [form, setForm] = react.useState(void 0);
|
|
4214
4214
|
const [loadFailed, setLoadFailed] = react.useState(false);
|
|
4215
4215
|
const [bindings, setBindings] = react.useState([]);
|
|
@@ -4420,7 +4420,7 @@ function FormBuilder({ formId, onBack, components, style }) {
|
|
|
4420
4420
|
}
|
|
4421
4421
|
}
|
|
4422
4422
|
if (loadFailed && form === void 0) {
|
|
4423
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style:
|
|
4423
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__status-block", role: "alert", children: [
|
|
4424
4424
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon4, { className: "kf-form-builder__status-icon kf-form-builder__status-icon--danger" }),
|
|
4425
4425
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-form-builder__status-title", children: t("chrome.formBuilder.errorTitle") }),
|
|
4426
4426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4435,13 +4435,13 @@ function FormBuilder({ formId, onBack, components, style }) {
|
|
|
4435
4435
|
] }) });
|
|
4436
4436
|
}
|
|
4437
4437
|
if (form === void 0) {
|
|
4438
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style:
|
|
4438
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__skeleton", "aria-hidden": "true", children: [
|
|
4439
4439
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" }),
|
|
4440
4440
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" }),
|
|
4441
4441
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" })
|
|
4442
4442
|
] }) });
|
|
4443
4443
|
}
|
|
4444
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder", style:
|
|
4444
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
4445
4445
|
onBack !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: onBack, className: "kf-form-builder__back-link", children: [
|
|
4446
4446
|
/* @__PURE__ */ jsxRuntime.jsx(BackIcon, {}),
|
|
4447
4447
|
t("chrome.formBuilder.backToLibrary")
|
|
@@ -4595,7 +4595,7 @@ var AUDIENCE_LABEL_KEY2 = {
|
|
|
4595
4595
|
MANAGER: "chrome.formsLibrary.audience.manager"
|
|
4596
4596
|
};
|
|
4597
4597
|
function CreateFormSheet({ onSubmit, onClose }) {
|
|
4598
|
-
const { t } =
|
|
4598
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
4599
4599
|
const titleId = react.useId();
|
|
4600
4600
|
const [locale, setLocale] = react.useState("en");
|
|
4601
4601
|
const [title, setTitle] = react.useState("");
|
|
@@ -4623,7 +4623,7 @@ function CreateFormSheet({ onSubmit, onClose }) {
|
|
|
4623
4623
|
});
|
|
4624
4624
|
onClose();
|
|
4625
4625
|
} catch (error) {
|
|
4626
|
-
setErrorCode(
|
|
4626
|
+
setErrorCode(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
4627
4627
|
} finally {
|
|
4628
4628
|
setPending(false);
|
|
4629
4629
|
}
|
|
@@ -4811,7 +4811,7 @@ function formatDate2(iso) {
|
|
|
4811
4811
|
});
|
|
4812
4812
|
}
|
|
4813
4813
|
function FormRow({ form, selected, onSelect, style }) {
|
|
4814
|
-
const { t } =
|
|
4814
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
4815
4815
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4816
4816
|
"tr",
|
|
4817
4817
|
{
|
|
@@ -4819,7 +4819,7 @@ function FormRow({ form, selected, onSelect, style }) {
|
|
|
4819
4819
|
className: "kf-forms-library__table-row",
|
|
4820
4820
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
4821
4821
|
"data-selected": selected === true ? "true" : void 0,
|
|
4822
|
-
style:
|
|
4822
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
4823
4823
|
children: [
|
|
4824
4824
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4825
4825
|
"td",
|
|
@@ -4875,7 +4875,7 @@ function FormsLibrarySkeleton() {
|
|
|
4875
4875
|
] }, rowIndex)) }) }) });
|
|
4876
4876
|
}
|
|
4877
4877
|
function CardHeading2({ count }) {
|
|
4878
|
-
const { t } =
|
|
4878
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
4879
4879
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-forms-library__card-title", children: t(
|
|
4880
4880
|
count === 1 ? "chrome.formsLibrary.countLabelOne" : "chrome.formsLibrary.countLabel"
|
|
4881
4881
|
).replace("{count}", String(count)) });
|
|
@@ -4890,7 +4890,7 @@ function StatusFilterBar({
|
|
|
4890
4890
|
active,
|
|
4891
4891
|
onChange
|
|
4892
4892
|
}) {
|
|
4893
|
-
const { t } =
|
|
4893
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
4894
4894
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-forms-library__filter-bar", children: [
|
|
4895
4895
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.formsLibrary.filter.legend") }),
|
|
4896
4896
|
STATUS_FILTERS.map((filter) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4916,8 +4916,8 @@ function FormsLibrary({
|
|
|
4916
4916
|
components,
|
|
4917
4917
|
style
|
|
4918
4918
|
}) {
|
|
4919
|
-
const { t } =
|
|
4920
|
-
const { forms, loaded, lastFetchFailed, refresh, createForm } =
|
|
4919
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
4920
|
+
const { forms, loaded, lastFetchFailed, refresh, createForm } = chunk77RKNRNH_cjs.useAgencyForms();
|
|
4921
4921
|
const isControlled = controlledCreating !== void 0 && onCreatingChange !== void 0;
|
|
4922
4922
|
const [internalCreating, setInternalCreating] = react.useState(false);
|
|
4923
4923
|
const creating = isControlled ? controlledCreating : internalCreating;
|
|
@@ -4928,7 +4928,7 @@ function FormsLibrary({
|
|
|
4928
4928
|
await createForm(input);
|
|
4929
4929
|
};
|
|
4930
4930
|
const visibleForms = statusFilter === "ALL" ? forms : forms.filter((form) => form.status === statusFilter);
|
|
4931
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library", style:
|
|
4931
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
4932
4932
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library__heading", children: [
|
|
4933
4933
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-forms-library__title", children: title }),
|
|
4934
4934
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-forms-library__subtitle", children: subtitle }) : null
|
|
@@ -5004,9 +5004,9 @@ function FormsAuthoringFlow({ initialFormId, style }) {
|
|
|
5004
5004
|
setSelectedFormId(void 0);
|
|
5005
5005
|
}
|
|
5006
5006
|
if (selectedFormId === void 0) {
|
|
5007
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style:
|
|
5007
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormsLibrary, { onSelectForm: handleSelect }) });
|
|
5008
5008
|
}
|
|
5009
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style:
|
|
5009
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormBuilder, { formId: selectedFormId, onBack: handleBack }) });
|
|
5010
5010
|
}
|
|
5011
5011
|
function SearchIcon(props) {
|
|
5012
5012
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5157,7 +5157,7 @@ function AdminAvatar({
|
|
|
5157
5157
|
className: "kf-admin-shared-patterns-avatar",
|
|
5158
5158
|
"data-size": size,
|
|
5159
5159
|
"aria-hidden": "true",
|
|
5160
|
-
style:
|
|
5160
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style, {
|
|
5161
5161
|
"--kf-admin-shared-patterns-avatar-computed-size": SIZE_VAR[size],
|
|
5162
5162
|
"--kf-admin-shared-patterns-avatar-computed-bg": `var(--kf-color-avatar-${step})`
|
|
5163
5163
|
}),
|
|
@@ -5177,7 +5177,7 @@ function ManagerResultRow({
|
|
|
5177
5177
|
onSelect,
|
|
5178
5178
|
style
|
|
5179
5179
|
}) {
|
|
5180
|
-
const { t } =
|
|
5180
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5181
5181
|
const initials = initialsFromName(manager.fullName);
|
|
5182
5182
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5183
5183
|
"tr",
|
|
@@ -5185,7 +5185,7 @@ function ManagerResultRow({
|
|
|
5185
5185
|
role: "row",
|
|
5186
5186
|
className: "kf-manager-directory-flow__table-row",
|
|
5187
5187
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
5188
|
-
style:
|
|
5188
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
5189
5189
|
children: [
|
|
5190
5190
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5191
5191
|
"td",
|
|
@@ -5294,8 +5294,8 @@ function ManagerResultsListBody({
|
|
|
5294
5294
|
onCountChange,
|
|
5295
5295
|
onRetry
|
|
5296
5296
|
}) {
|
|
5297
|
-
const { t } =
|
|
5298
|
-
const directories =
|
|
5297
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5298
|
+
const directories = chunk77RKNRNH_cjs.useDirectories();
|
|
5299
5299
|
const [errorMessage, setErrorMessage] = react.useState(void 0);
|
|
5300
5300
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
5301
5301
|
const ManagerRow = ManagerResultRowComponent ?? ManagerResultRow;
|
|
@@ -5306,7 +5306,7 @@ function ManagerResultsListBody({
|
|
|
5306
5306
|
setErrorMessage(void 0);
|
|
5307
5307
|
return page;
|
|
5308
5308
|
} catch (error) {
|
|
5309
|
-
setErrorMessage(
|
|
5309
|
+
setErrorMessage(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
5310
5310
|
return { rows: [], nextCursor: void 0 };
|
|
5311
5311
|
} finally {
|
|
5312
5312
|
setHasSettled(true);
|
|
@@ -5314,7 +5314,7 @@ function ManagerResultsListBody({
|
|
|
5314
5314
|
},
|
|
5315
5315
|
[directories, filters]
|
|
5316
5316
|
);
|
|
5317
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
5317
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunk77RKNRNH_cjs.usePaginatedList(fetch);
|
|
5318
5318
|
const isLoading = !hasSettled;
|
|
5319
5319
|
const reportedCount = isLoading || errorMessage !== void 0 ? void 0 : rows.length;
|
|
5320
5320
|
react.useEffect(() => {
|
|
@@ -5411,7 +5411,7 @@ function ManagerSearchInput({
|
|
|
5411
5411
|
debounceMs,
|
|
5412
5412
|
onDebouncedChange
|
|
5413
5413
|
}) {
|
|
5414
|
-
const { t } =
|
|
5414
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5415
5415
|
const [value, setValue] = react.useState("");
|
|
5416
5416
|
react.useEffect(() => {
|
|
5417
5417
|
const timer = setTimeout(() => onDebouncedChange(value), debounceMs);
|
|
@@ -5450,12 +5450,12 @@ function ManagerDirectoryFlow({
|
|
|
5450
5450
|
components,
|
|
5451
5451
|
style
|
|
5452
5452
|
}) {
|
|
5453
|
-
const { t } =
|
|
5453
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5454
5454
|
const [query, setQuery] = react.useState("");
|
|
5455
5455
|
const [count, setCount] = react.useState(void 0);
|
|
5456
5456
|
const trimmedQuery = query.trim();
|
|
5457
5457
|
const handleCountChange = react.useCallback((next) => setCount(next), []);
|
|
5458
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow", style:
|
|
5458
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
5459
5459
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow__heading", children: [
|
|
5460
5460
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-manager-directory-flow__title", children: title }),
|
|
5461
5461
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-directory-flow__subtitle", children: subtitle }) : null
|
|
@@ -5527,7 +5527,7 @@ function formatDate3(iso) {
|
|
|
5527
5527
|
return new Date(iso).toLocaleDateString("en-GB", { day: "2-digit", month: "short" });
|
|
5528
5528
|
}
|
|
5529
5529
|
function ManagerAssignmentsCard({ trips }) {
|
|
5530
|
-
const { t } =
|
|
5530
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5531
5531
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-profile-section__card", children: [
|
|
5532
5532
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__card-head", children: [
|
|
5533
5533
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-manager-profile-section__card-title", children: t("chrome.managerProfileSection.trips.title") }),
|
|
@@ -5591,7 +5591,7 @@ function HeroProfileHeader({
|
|
|
5591
5591
|
glowTone,
|
|
5592
5592
|
style
|
|
5593
5593
|
}) {
|
|
5594
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero", "data-glow": glowTone, style:
|
|
5594
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero", "data-glow": glowTone, style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
5595
5595
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-hero-glow", "aria-hidden": "true" }),
|
|
5596
5596
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero-row", children: [
|
|
5597
5597
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-hero-avatar", "aria-hidden": "true", children: avatarInitials }),
|
|
@@ -5624,7 +5624,7 @@ function initialsFromName2(name) {
|
|
|
5624
5624
|
return `${first}${last}`.toUpperCase();
|
|
5625
5625
|
}
|
|
5626
5626
|
function ManagerProfileHero({ profile, onBack }) {
|
|
5627
|
-
const { t } =
|
|
5627
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5628
5628
|
const initials = initialsFromName2(profile.fullName);
|
|
5629
5629
|
const stats = [
|
|
5630
5630
|
{ key: "trips", label: t("chrome.managerProfileSection.hero.trips"), value: profile.tripCount },
|
|
@@ -5683,12 +5683,12 @@ function ManagerProfileSection({
|
|
|
5683
5683
|
components,
|
|
5684
5684
|
style
|
|
5685
5685
|
}) {
|
|
5686
|
-
const { t } =
|
|
5687
|
-
const { read, readFailed, refresh } =
|
|
5686
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5687
|
+
const { read, readFailed, refresh } = chunk77RKNRNH_cjs.useAgencyManagerProfile(managerRef);
|
|
5688
5688
|
const Hero = components?.Hero ?? ManagerProfileHero;
|
|
5689
5689
|
const AssignmentsCard = components?.AssignmentsCard ?? ManagerAssignmentsCard;
|
|
5690
5690
|
if (readFailed) {
|
|
5691
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style:
|
|
5691
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__status-block", role: "alert", children: [
|
|
5692
5692
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon7, { className: "kf-manager-profile-section__status-icon kf-manager-profile-section__status-icon--danger" }),
|
|
5693
5693
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-profile-section__status-title", children: t("chrome.managerProfileSection.errorTitle") }),
|
|
5694
5694
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-profile-section__status-body", children: t("chrome.managerProfileSection.errorBody") }),
|
|
@@ -5704,9 +5704,9 @@ function ManagerProfileSection({
|
|
|
5704
5704
|
] }) });
|
|
5705
5705
|
}
|
|
5706
5706
|
if (read === void 0) {
|
|
5707
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style:
|
|
5707
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ManagerProfileSkeleton, {}) });
|
|
5708
5708
|
}
|
|
5709
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section", style:
|
|
5709
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
5710
5710
|
/* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
|
|
5711
5711
|
/* @__PURE__ */ jsxRuntime.jsx(AssignmentsCard, { trips: read.trips })
|
|
5712
5712
|
] });
|
|
@@ -5733,7 +5733,7 @@ function TemplateAuthoringFlow({
|
|
|
5733
5733
|
initialTemplateId,
|
|
5734
5734
|
style
|
|
5735
5735
|
}) {
|
|
5736
|
-
const { t } =
|
|
5736
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5737
5737
|
const [selectedTemplateId, setSelectedTemplateId] = react.useState(
|
|
5738
5738
|
initialTemplateId
|
|
5739
5739
|
);
|
|
@@ -5744,9 +5744,9 @@ function TemplateAuthoringFlow({
|
|
|
5744
5744
|
setSelectedTemplateId(void 0);
|
|
5745
5745
|
}
|
|
5746
5746
|
if (selectedTemplateId === void 0) {
|
|
5747
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-template-authoring-flow", style:
|
|
5747
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-template-authoring-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistTemplateLibrary, { onSelectTemplate: handleSelect }) });
|
|
5748
5748
|
}
|
|
5749
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-template-authoring-flow", style:
|
|
5749
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-template-authoring-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
5750
5750
|
/* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: handleBack, className: "kf-template-authoring-flow__back-link", children: [
|
|
5751
5751
|
/* @__PURE__ */ jsxRuntime.jsx(BackIcon3, {}),
|
|
5752
5752
|
t("chrome.templateAuthoringFlow.backToLibrary")
|
|
@@ -5755,8 +5755,8 @@ function TemplateAuthoringFlow({
|
|
|
5755
5755
|
] });
|
|
5756
5756
|
}
|
|
5757
5757
|
function AddTravellerModal({ onClose, onCreated }) {
|
|
5758
|
-
const { t } =
|
|
5759
|
-
const directories =
|
|
5758
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5759
|
+
const directories = chunk77RKNRNH_cjs.useDirectories();
|
|
5760
5760
|
const titleId = react.useId();
|
|
5761
5761
|
const [fullName, setFullName] = react.useState("");
|
|
5762
5762
|
const [phone, setPhone] = react.useState("");
|
|
@@ -5780,7 +5780,7 @@ function AddTravellerModal({ onClose, onCreated }) {
|
|
|
5780
5780
|
});
|
|
5781
5781
|
onCreated(created);
|
|
5782
5782
|
} catch (error) {
|
|
5783
|
-
setErrorMessage(
|
|
5783
|
+
setErrorMessage(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
5784
5784
|
} finally {
|
|
5785
5785
|
setIsSubmitting(false);
|
|
5786
5786
|
}
|
|
@@ -5994,7 +5994,7 @@ function TravellerResultRow({
|
|
|
5994
5994
|
onSelect,
|
|
5995
5995
|
style
|
|
5996
5996
|
}) {
|
|
5997
|
-
const { t } =
|
|
5997
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
5998
5998
|
const initials = initialsFromName3(traveller.fullName);
|
|
5999
5999
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6000
6000
|
"tr",
|
|
@@ -6002,7 +6002,7 @@ function TravellerResultRow({
|
|
|
6002
6002
|
role: "row",
|
|
6003
6003
|
className: "kf-traveller-directory__table-row",
|
|
6004
6004
|
"data-selectable": onSelect !== void 0 ? "true" : void 0,
|
|
6005
|
-
style:
|
|
6005
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
6006
6006
|
children: [
|
|
6007
6007
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6008
6008
|
"td",
|
|
@@ -6130,8 +6130,8 @@ function TravellerResultsListBody({
|
|
|
6130
6130
|
onCountChange,
|
|
6131
6131
|
onRetry
|
|
6132
6132
|
}) {
|
|
6133
|
-
const { t } =
|
|
6134
|
-
const directories =
|
|
6133
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6134
|
+
const directories = chunk77RKNRNH_cjs.useDirectories();
|
|
6135
6135
|
const [errorMessage, setErrorMessage] = react.useState(void 0);
|
|
6136
6136
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
6137
6137
|
const fetch = react.useCallback(
|
|
@@ -6142,7 +6142,7 @@ function TravellerResultsListBody({
|
|
|
6142
6142
|
setErrorMessage(void 0);
|
|
6143
6143
|
return page;
|
|
6144
6144
|
} catch (error) {
|
|
6145
|
-
setErrorMessage(
|
|
6145
|
+
setErrorMessage(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
6146
6146
|
return { rows: [], nextCursor: void 0 };
|
|
6147
6147
|
} finally {
|
|
6148
6148
|
setHasSettled(true);
|
|
@@ -6150,7 +6150,7 @@ function TravellerResultsListBody({
|
|
|
6150
6150
|
},
|
|
6151
6151
|
[directories, query]
|
|
6152
6152
|
);
|
|
6153
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
6153
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunk77RKNRNH_cjs.usePaginatedList(fetch);
|
|
6154
6154
|
const isLoading = !hasSettled;
|
|
6155
6155
|
const reportedCount = isLoading || errorMessage !== void 0 ? void 0 : rows.length;
|
|
6156
6156
|
react.useEffect(() => {
|
|
@@ -6245,7 +6245,7 @@ function TravellerSearchInput({
|
|
|
6245
6245
|
debounceMs,
|
|
6246
6246
|
onDebouncedChange
|
|
6247
6247
|
}) {
|
|
6248
|
-
const { t } =
|
|
6248
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6249
6249
|
const [value, setValue] = react.useState("");
|
|
6250
6250
|
react.useEffect(() => {
|
|
6251
6251
|
const timer = setTimeout(() => onDebouncedChange(value), debounceMs);
|
|
@@ -6285,13 +6285,13 @@ function TravellerSearchBox({
|
|
|
6285
6285
|
trailingAction,
|
|
6286
6286
|
style
|
|
6287
6287
|
}) {
|
|
6288
|
-
const { t } =
|
|
6288
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6289
6289
|
const [query, setQuery] = react.useState("");
|
|
6290
6290
|
const [count, setCount] = react.useState(void 0);
|
|
6291
6291
|
const trimmed = query.trim();
|
|
6292
6292
|
const handleCountChange = react.useCallback((next) => setCount(next), []);
|
|
6293
6293
|
const isBelowFloor = minQueryLength > 0 && trimmed.length < minQueryLength;
|
|
6294
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box", style:
|
|
6294
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
6295
6295
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box-input-row", children: [
|
|
6296
6296
|
/* @__PURE__ */ jsxRuntime.jsx(TravellerSearchInput, { debounceMs, onDebouncedChange: setQuery }),
|
|
6297
6297
|
count !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-traveller-directory__count", children: t(
|
|
@@ -6323,7 +6323,7 @@ function TravellerDirectoryFlow({
|
|
|
6323
6323
|
components,
|
|
6324
6324
|
style
|
|
6325
6325
|
}) {
|
|
6326
|
-
const { t } =
|
|
6326
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6327
6327
|
const [uncontrolledOpen, setUncontrolledOpen] = react.useState(false);
|
|
6328
6328
|
const isControlled = adding !== void 0 && onAddingChange !== void 0;
|
|
6329
6329
|
const isAddModalOpen = isControlled ? adding : uncontrolledOpen;
|
|
@@ -6346,7 +6346,7 @@ function TravellerDirectoryFlow({
|
|
|
6346
6346
|
);
|
|
6347
6347
|
const SearchBox = components?.TravellerSearchBox ?? TravellerSearchBox;
|
|
6348
6348
|
const AddModal = components?.AddTravellerModal ?? AddTravellerModal;
|
|
6349
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow", style:
|
|
6349
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
6350
6350
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow__heading", children: [
|
|
6351
6351
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-directory-flow__title", children: title }),
|
|
6352
6352
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-directory-flow__subtitle", children: subtitle }) : null
|
|
@@ -6372,7 +6372,7 @@ function TravellerDirectoryFlow({
|
|
|
6372
6372
|
] });
|
|
6373
6373
|
}
|
|
6374
6374
|
function useAgencyTravellerProfile(travellerRef) {
|
|
6375
|
-
const client =
|
|
6375
|
+
const client = chunk4QMYUKW4_cjs.useKaafilClient();
|
|
6376
6376
|
const [read, setRead] = react.useState(void 0);
|
|
6377
6377
|
const [readFailed, setReadFailed] = react.useState(false);
|
|
6378
6378
|
const refresh = react.useCallback(async () => {
|
|
@@ -6429,7 +6429,7 @@ function formatMinor(minor, currency) {
|
|
|
6429
6429
|
}).format(minor / 100);
|
|
6430
6430
|
}
|
|
6431
6431
|
function TravellerLifetimeCard({ lifetime }) {
|
|
6432
|
-
const { t } =
|
|
6432
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6433
6433
|
if (lifetime.currency === null) {
|
|
6434
6434
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6435
6435
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
@@ -6477,7 +6477,7 @@ function formatTimestamp(iso) {
|
|
|
6477
6477
|
});
|
|
6478
6478
|
}
|
|
6479
6479
|
function TravellerNotesList({ notes }) {
|
|
6480
|
-
const { t } =
|
|
6480
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6481
6481
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6482
6482
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
6483
6483
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.notes.title") }),
|
|
@@ -6523,7 +6523,7 @@ function formatDateOfBirth(iso) {
|
|
|
6523
6523
|
});
|
|
6524
6524
|
}
|
|
6525
6525
|
function TravellerPersonalCard({ profile }) {
|
|
6526
|
-
const { t } =
|
|
6526
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6527
6527
|
const p = profile.profile;
|
|
6528
6528
|
const dob = formatDateOfBirth(p.dateOfBirth);
|
|
6529
6529
|
const email = p.email ?? profile.email;
|
|
@@ -6638,7 +6638,7 @@ function formatMinor2(minor, currency) {
|
|
|
6638
6638
|
}).format(minor / 100);
|
|
6639
6639
|
}
|
|
6640
6640
|
function TravellerProfileHero({ profile, onBack }) {
|
|
6641
|
-
const { t } =
|
|
6641
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6642
6642
|
const initials = initialsFromName4(profile.fullName);
|
|
6643
6643
|
const { lifetime } = profile;
|
|
6644
6644
|
const stats = lifetime.currency !== null ? [
|
|
@@ -6729,7 +6729,7 @@ function formatMinor3(minor, currency) {
|
|
|
6729
6729
|
}).format(minor / 100);
|
|
6730
6730
|
}
|
|
6731
6731
|
function TravellerTripHistoryTable({ trips }) {
|
|
6732
|
-
const { t } =
|
|
6732
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6733
6733
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
|
|
6734
6734
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
|
|
6735
6735
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.trips.title") }),
|
|
@@ -6780,7 +6780,7 @@ function TravellerProfileSection({
|
|
|
6780
6780
|
components,
|
|
6781
6781
|
style
|
|
6782
6782
|
}) {
|
|
6783
|
-
const { t } =
|
|
6783
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
6784
6784
|
const { read, readFailed, refresh } = useAgencyTravellerProfile(travellerRef);
|
|
6785
6785
|
const Hero = components?.Hero ?? TravellerProfileHero;
|
|
6786
6786
|
const PersonalCard = components?.PersonalCard ?? TravellerPersonalCard;
|
|
@@ -6788,7 +6788,7 @@ function TravellerProfileSection({
|
|
|
6788
6788
|
const TripHistoryTable = components?.TripHistoryTable ?? TravellerTripHistoryTable;
|
|
6789
6789
|
const NotesList = components?.NotesList ?? TravellerNotesList;
|
|
6790
6790
|
if (readFailed) {
|
|
6791
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style:
|
|
6791
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__status-block", role: "alert", children: [
|
|
6792
6792
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon9, { className: "kf-traveller-profile-section__status-icon kf-traveller-profile-section__status-icon--danger" }),
|
|
6793
6793
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-title", children: t("chrome.travellerProfileSection.errorTitle") }),
|
|
6794
6794
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-body", children: t("chrome.travellerProfileSection.errorBody") }),
|
|
@@ -6804,9 +6804,9 @@ function TravellerProfileSection({
|
|
|
6804
6804
|
] }) });
|
|
6805
6805
|
}
|
|
6806
6806
|
if (read === void 0) {
|
|
6807
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style:
|
|
6807
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TravellerProfileSkeleton, {}) });
|
|
6808
6808
|
}
|
|
6809
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style:
|
|
6809
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
6810
6810
|
/* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
|
|
6811
6811
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__body", children: [
|
|
6812
6812
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__column", children: [
|
|
@@ -6898,7 +6898,7 @@ function ToggleSwitch({
|
|
|
6898
6898
|
disabled,
|
|
6899
6899
|
className: "kf-admin-shared-patterns-toggle-row",
|
|
6900
6900
|
onClick: () => onChange(!checked),
|
|
6901
|
-
style:
|
|
6901
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
6902
6902
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6903
6903
|
"span",
|
|
6904
6904
|
{
|
|
@@ -7336,7 +7336,7 @@ function TriggerDetailPanel({
|
|
|
7336
7336
|
style
|
|
7337
7337
|
}) {
|
|
7338
7338
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
7339
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style:
|
|
7339
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
7340
7340
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail-head", children: [
|
|
7341
7341
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trigger-template-editor__detail-eyebrow", children: t("chrome.triggerTemplateEditor.selected") }),
|
|
7342
7342
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7420,8 +7420,8 @@ function TriggerTemplateEditor({
|
|
|
7420
7420
|
onTriggerPatched,
|
|
7421
7421
|
style
|
|
7422
7422
|
}) {
|
|
7423
|
-
const { t } =
|
|
7424
|
-
const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } =
|
|
7423
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7424
|
+
const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } = chunk77RKNRNH_cjs.useAgencyJourneyTriggers();
|
|
7425
7425
|
const [savingId, setSavingId] = react.useState(void 0);
|
|
7426
7426
|
const [selectedId, setSelectedId] = react.useState(void 0);
|
|
7427
7427
|
const filtered = tripModeFilter === void 0 ? triggers : triggers.filter((trigger) => trigger.tripMode === tripModeFilter);
|
|
@@ -7456,7 +7456,7 @@ function TriggerTemplateEditor({
|
|
|
7456
7456
|
setSavingId(void 0);
|
|
7457
7457
|
}
|
|
7458
7458
|
}
|
|
7459
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style:
|
|
7459
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
7460
7460
|
title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__heading", children: [
|
|
7461
7461
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trigger-template-editor__title", children: title }),
|
|
7462
7462
|
subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trigger-template-editor__subtitle", children: subtitle }) : null
|
|
@@ -7604,14 +7604,14 @@ function BookingsSkeleton() {
|
|
|
7604
7604
|
] }, id)) });
|
|
7605
7605
|
}
|
|
7606
7606
|
function BookingsEmpty() {
|
|
7607
|
-
const { t } =
|
|
7607
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7608
7608
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", children: [
|
|
7609
7609
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.emptyTitle") }),
|
|
7610
7610
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.emptyBody") })
|
|
7611
7611
|
] });
|
|
7612
7612
|
}
|
|
7613
7613
|
function BookingsFailed({ onRetry }) {
|
|
7614
|
-
const { t } =
|
|
7614
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7615
7615
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", role: "alert", children: [
|
|
7616
7616
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.failedTitle") }),
|
|
7617
7617
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.failedBody") }),
|
|
@@ -7619,7 +7619,7 @@ function BookingsFailed({ onRetry }) {
|
|
|
7619
7619
|
] });
|
|
7620
7620
|
}
|
|
7621
7621
|
function BookingsDark({ reason }) {
|
|
7622
|
-
const { t } =
|
|
7622
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7623
7623
|
if (reason === "mode") return null;
|
|
7624
7624
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", "data-dark": reason, children: [
|
|
7625
7625
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t(
|
|
@@ -7664,8 +7664,8 @@ function TripBookingsSection({
|
|
|
7664
7664
|
onOpenDocuments,
|
|
7665
7665
|
style
|
|
7666
7666
|
}) {
|
|
7667
|
-
const { t } =
|
|
7668
|
-
const bookings =
|
|
7667
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7668
|
+
const bookings = chunk77RKNRNH_cjs.useBookings(tripRef);
|
|
7669
7669
|
const ready = bookings.status === "ready" ? bookings : null;
|
|
7670
7670
|
const groups = react.useMemo(
|
|
7671
7671
|
() => ready === null ? [] : groupByKind(liveBookings(ready.bookings)),
|
|
@@ -7675,7 +7675,7 @@ function TripBookingsSection({
|
|
|
7675
7675
|
const unreadable = ready !== null && ready.syncedAt === void 0;
|
|
7676
7676
|
const refreshLive = ready?.refreshLive;
|
|
7677
7677
|
if (bookings.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(BookingsDark, { reason: bookings.reason });
|
|
7678
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style:
|
|
7678
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
7679
7679
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-bookings-section__head", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__head-text", children: [
|
|
7680
7680
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-bookings-section__title", children: t("chrome.tripBookings.panelLabel") }),
|
|
7681
7681
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__subtitle", children: t("chrome.tripBookings.subtitle").replace("{count}", String(total)) })
|
|
@@ -7747,7 +7747,7 @@ function LockIcon2() {
|
|
|
7747
7747
|
);
|
|
7748
7748
|
}
|
|
7749
7749
|
function CloseoutLockNotice({ whatKey }) {
|
|
7750
|
-
const { t } =
|
|
7750
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7751
7751
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-closeout-lock", role: "status", children: [
|
|
7752
7752
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-closeout-lock__glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon2, {}) }),
|
|
7753
7753
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-closeout-lock__body", children: [
|
|
@@ -7851,7 +7851,7 @@ function ChecklistSkeleton() {
|
|
|
7851
7851
|
] }, column)) });
|
|
7852
7852
|
}
|
|
7853
7853
|
function ChecklistEmpty({ onPull }) {
|
|
7854
|
-
const { t } =
|
|
7854
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7855
7855
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
|
|
7856
7856
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistIcon, {}) }),
|
|
7857
7857
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.emptyTitle") }),
|
|
@@ -7860,7 +7860,7 @@ function ChecklistEmpty({ onPull }) {
|
|
|
7860
7860
|
] });
|
|
7861
7861
|
}
|
|
7862
7862
|
function ChecklistFailed({ onRetry }) {
|
|
7863
|
-
const { t } =
|
|
7863
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7864
7864
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
|
|
7865
7865
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.failedTitle") }),
|
|
7866
7866
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-checklist-section__state-body", children: t("chrome.tripChecklist.failedBody") }),
|
|
@@ -7868,7 +7868,7 @@ function ChecklistFailed({ onRetry }) {
|
|
|
7868
7868
|
] });
|
|
7869
7869
|
}
|
|
7870
7870
|
function ChecklistDark({ reason }) {
|
|
7871
|
-
const { t } =
|
|
7871
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7872
7872
|
if (reason === "mode") return null;
|
|
7873
7873
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", "data-dark": reason, children: [
|
|
7874
7874
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon3, {}) }),
|
|
@@ -7968,7 +7968,7 @@ function ItemDialog({
|
|
|
7968
7968
|
onClose,
|
|
7969
7969
|
onSubmit
|
|
7970
7970
|
}) {
|
|
7971
|
-
const { t } =
|
|
7971
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
7972
7972
|
const titleId = react.useId();
|
|
7973
7973
|
const [values, setValues] = react.useState(initial);
|
|
7974
7974
|
const [sectionChoice, setSectionChoice] = react.useState(
|
|
@@ -8165,7 +8165,7 @@ function ChecklistItemRow({
|
|
|
8165
8165
|
onToggle,
|
|
8166
8166
|
onEdit
|
|
8167
8167
|
}) {
|
|
8168
|
-
const { t } =
|
|
8168
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
8169
8169
|
const complete = item.status === "COMPLETE";
|
|
8170
8170
|
const day = dayOffsetLabel(item.dayOffset);
|
|
8171
8171
|
const actorKey = actorLabelKey(item.performedByKind);
|
|
@@ -8217,7 +8217,7 @@ function SectionCard2({
|
|
|
8217
8217
|
onAddToSection,
|
|
8218
8218
|
ItemRow: ItemRow2 = ChecklistItemRow
|
|
8219
8219
|
}) {
|
|
8220
|
-
const { t } =
|
|
8220
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
8221
8221
|
const openMandatory = items.filter((one) => one.isMandatory && one.status === "OPEN").length;
|
|
8222
8222
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section__section", children: [
|
|
8223
8223
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-checklist-section__section-head", children: [
|
|
@@ -8271,7 +8271,7 @@ function PhasePanel({
|
|
|
8271
8271
|
onAddToPhase,
|
|
8272
8272
|
ItemRow: ItemRow2
|
|
8273
8273
|
}) {
|
|
8274
|
-
const { t } =
|
|
8274
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
8275
8275
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sections.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__phase-empty", children: [
|
|
8276
8276
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: t("chrome.tripChecklist.phaseEmpty") }),
|
|
8277
8277
|
readOnly ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8307,7 +8307,7 @@ function PhaseSwitcher({
|
|
|
8307
8307
|
value,
|
|
8308
8308
|
onChange
|
|
8309
8309
|
}) {
|
|
8310
|
-
const { t } =
|
|
8310
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
8311
8311
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-checklist-section__segment", children: [
|
|
8312
8312
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripChecklist.phaseLabel") }),
|
|
8313
8313
|
OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8340,7 +8340,7 @@ function TemplatePickerDialog({
|
|
|
8340
8340
|
onClose,
|
|
8341
8341
|
onPull
|
|
8342
8342
|
}) {
|
|
8343
|
-
const { t } =
|
|
8343
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
8344
8344
|
const titleId = react.useId();
|
|
8345
8345
|
const [selectedId, setSelectedId] = react.useState(null);
|
|
8346
8346
|
const [mode, setMode] = react.useState("append");
|
|
@@ -8469,8 +8469,8 @@ function TripChecklistSection({
|
|
|
8469
8469
|
components,
|
|
8470
8470
|
style
|
|
8471
8471
|
}) {
|
|
8472
|
-
const { t } =
|
|
8473
|
-
const checklists =
|
|
8472
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
8473
|
+
const checklists = chunkAWOKWGTB_cjs.useChecklists(tripRef);
|
|
8474
8474
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
8475
8475
|
const [pending, setPending] = react.useState(false);
|
|
8476
8476
|
const [busyItemId, setBusyItemId] = react.useState(null);
|
|
@@ -8637,7 +8637,7 @@ function TripChecklistSection({
|
|
|
8637
8637
|
const inert = readOnly || locked;
|
|
8638
8638
|
const unreadable = aggregate?.lastFetchFailed === true && aggregate.loaded === false;
|
|
8639
8639
|
const percent = overallPercent(aggregate?.progress);
|
|
8640
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style:
|
|
8640
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
8641
8641
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head", children: [
|
|
8642
8642
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head-text", children: [
|
|
8643
8643
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-checklist-section__title", children: t("chrome.tripChecklist.panelLabel") }),
|
|
@@ -9026,7 +9026,7 @@ var STATUS_LABEL_KEY5 = {
|
|
|
9026
9026
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
9027
9027
|
};
|
|
9028
9028
|
function TripRow({ trip, index, onOpen, style }) {
|
|
9029
|
-
const { t } =
|
|
9029
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9030
9030
|
const derived = deriveTripRow(trip, index);
|
|
9031
9031
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9032
9032
|
"tr",
|
|
@@ -9034,7 +9034,7 @@ function TripRow({ trip, index, onOpen, style }) {
|
|
|
9034
9034
|
role: "row",
|
|
9035
9035
|
className: "kf-trip-directory-flow__row",
|
|
9036
9036
|
"data-dimming": derived.dimming === "none" ? void 0 : derived.dimming,
|
|
9037
|
-
style:
|
|
9037
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
9038
9038
|
children: [
|
|
9039
9039
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9040
9040
|
"td",
|
|
@@ -9153,8 +9153,8 @@ function TripResultsListBody({
|
|
|
9153
9153
|
hasActiveFilter,
|
|
9154
9154
|
onRetry
|
|
9155
9155
|
}) {
|
|
9156
|
-
const { t } =
|
|
9157
|
-
const { makeTripsFetch } =
|
|
9156
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9157
|
+
const { makeTripsFetch } = chunk77RKNRNH_cjs.useAgencyTrips();
|
|
9158
9158
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
9159
9159
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
9160
9160
|
const Row = TripRowComponent ?? TripRow;
|
|
@@ -9165,7 +9165,7 @@ function TripResultsListBody({
|
|
|
9165
9165
|
setErrorCode(void 0);
|
|
9166
9166
|
return page;
|
|
9167
9167
|
} catch (error) {
|
|
9168
|
-
setErrorCode(
|
|
9168
|
+
setErrorCode(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
9169
9169
|
return { rows: [], nextCursor: void 0 };
|
|
9170
9170
|
} finally {
|
|
9171
9171
|
setHasSettled(true);
|
|
@@ -9173,7 +9173,7 @@ function TripResultsListBody({
|
|
|
9173
9173
|
},
|
|
9174
9174
|
[makeTripsFetch, filters]
|
|
9175
9175
|
);
|
|
9176
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
9176
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunk77RKNRNH_cjs.usePaginatedList(fetch);
|
|
9177
9177
|
const isLoading = !hasSettled;
|
|
9178
9178
|
const reportedCount = isLoading || errorCode !== void 0 ? void 0 : rows.length;
|
|
9179
9179
|
react.useEffect(() => {
|
|
@@ -9275,7 +9275,7 @@ function TripSearchInput({
|
|
|
9275
9275
|
debounceMs,
|
|
9276
9276
|
onDebouncedChange
|
|
9277
9277
|
}) {
|
|
9278
|
-
const { t } =
|
|
9278
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9279
9279
|
const [value, setValue] = react.useState("");
|
|
9280
9280
|
react.useEffect(() => {
|
|
9281
9281
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -9345,7 +9345,7 @@ function TripDirectoryFlow({
|
|
|
9345
9345
|
components,
|
|
9346
9346
|
style
|
|
9347
9347
|
}) {
|
|
9348
|
-
const { t } =
|
|
9348
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9349
9349
|
const [eventType, setEventType] = react.useState(initialEventType ?? "TRIP");
|
|
9350
9350
|
const [segment, setSegment] = react.useState("all");
|
|
9351
9351
|
const [q, setQ] = react.useState("");
|
|
@@ -9365,7 +9365,7 @@ function TripDirectoryFlow({
|
|
|
9365
9365
|
);
|
|
9366
9366
|
const filterKey = react.useMemo(() => JSON.stringify(filters), [filters]);
|
|
9367
9367
|
const hasActiveFilter = segment !== "all" || q.length > 0 || status !== void 0;
|
|
9368
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style:
|
|
9368
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
9369
9369
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar", children: [
|
|
9370
9370
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar-row", children: [
|
|
9371
9371
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9626,7 +9626,7 @@ function KindIcon({
|
|
|
9626
9626
|
return /* @__PURE__ */ jsxRuntime.jsx(GenericFileIcon, {});
|
|
9627
9627
|
}
|
|
9628
9628
|
function DocumentRow({ row, onOpen }) {
|
|
9629
|
-
const { t } =
|
|
9629
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9630
9630
|
const { file, spend } = row;
|
|
9631
9631
|
const purged = file.status === "purged";
|
|
9632
9632
|
const retention = retentionStateOf(file);
|
|
@@ -9687,7 +9687,7 @@ function DocumentsSkeleton() {
|
|
|
9687
9687
|
] }, id)) });
|
|
9688
9688
|
}
|
|
9689
9689
|
function DocumentsEmpty() {
|
|
9690
|
-
const { t } =
|
|
9690
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9691
9691
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", children: [
|
|
9692
9692
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-documents-section__state-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(EmptyDocumentsIcon, {}) }),
|
|
9693
9693
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.emptyTitle") }),
|
|
@@ -9695,7 +9695,7 @@ function DocumentsEmpty() {
|
|
|
9695
9695
|
] });
|
|
9696
9696
|
}
|
|
9697
9697
|
function DocumentsFailed({ onRetry }) {
|
|
9698
|
-
const { t } =
|
|
9698
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9699
9699
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", role: "alert", children: [
|
|
9700
9700
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.failedTitle") }),
|
|
9701
9701
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__state-body", children: t("chrome.tripDocuments.failedBody") }),
|
|
@@ -9703,7 +9703,7 @@ function DocumentsFailed({ onRetry }) {
|
|
|
9703
9703
|
] });
|
|
9704
9704
|
}
|
|
9705
9705
|
function DocumentsDark({ reason }) {
|
|
9706
|
-
const { t } =
|
|
9706
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9707
9707
|
if (reason === "mode") return null;
|
|
9708
9708
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", "data-dark": reason, children: [
|
|
9709
9709
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t(
|
|
@@ -9726,7 +9726,7 @@ function DocumentViewer({
|
|
|
9726
9726
|
failed,
|
|
9727
9727
|
onClose
|
|
9728
9728
|
}) {
|
|
9729
|
-
const { t } =
|
|
9729
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9730
9730
|
const titleId = react.useId();
|
|
9731
9731
|
const { file } = row;
|
|
9732
9732
|
const classKey = retentionClassLabelKey(file.retentionClass);
|
|
@@ -9807,7 +9807,7 @@ function DocumentViewer({
|
|
|
9807
9807
|
);
|
|
9808
9808
|
}
|
|
9809
9809
|
function PurposeChips({ counts, value, onChange }) {
|
|
9810
|
-
const { t } =
|
|
9810
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9811
9811
|
const options = [
|
|
9812
9812
|
{
|
|
9813
9813
|
key: "all",
|
|
@@ -9877,7 +9877,7 @@ function UploadDialog({
|
|
|
9877
9877
|
onClose,
|
|
9878
9878
|
onSubmit
|
|
9879
9879
|
}) {
|
|
9880
|
-
const { t } =
|
|
9880
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
9881
9881
|
const titleId = react.useId();
|
|
9882
9882
|
const nameId = react.useId();
|
|
9883
9883
|
const fileId = react.useId();
|
|
@@ -10039,12 +10039,12 @@ function UploadDialog({
|
|
|
10039
10039
|
);
|
|
10040
10040
|
}
|
|
10041
10041
|
function TripDocumentsSection({ tripRef, style }) {
|
|
10042
|
-
const { t } =
|
|
10043
|
-
const files =
|
|
10044
|
-
const expenses =
|
|
10045
|
-
const bookings =
|
|
10046
|
-
const { listTripManifest } =
|
|
10047
|
-
const { statuses, loaded: capabilityLoaded } =
|
|
10042
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10043
|
+
const files = chunkAWOKWGTB_cjs.useFiles({ tripRef });
|
|
10044
|
+
const expenses = chunkAWOKWGTB_cjs.useExpenses(tripRef);
|
|
10045
|
+
const bookings = chunk77RKNRNH_cjs.useBookings(tripRef);
|
|
10046
|
+
const { listTripManifest } = chunk77RKNRNH_cjs.useDirectories();
|
|
10047
|
+
const { statuses, loaded: capabilityLoaded } = chunk77RKNRNH_cjs.useCapabilityStatuses(tripRef);
|
|
10048
10048
|
const capability = statuses.get("files");
|
|
10049
10049
|
const [state, setState] = react.useState({ kind: "loading" });
|
|
10050
10050
|
const [purpose, setPurpose] = react.useState(null);
|
|
@@ -10191,7 +10191,7 @@ function TripDocumentsSection({ tripRef, style }) {
|
|
|
10191
10191
|
if (capabilityLoaded && capability === "mode-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "mode" });
|
|
10192
10192
|
if (capabilityLoaded && capability === "flag-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "flag" });
|
|
10193
10193
|
if (capabilityLoaded && capability === "data-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "data" });
|
|
10194
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style:
|
|
10194
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
10195
10195
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head", children: [
|
|
10196
10196
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head-text", children: [
|
|
10197
10197
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-documents-section__title", children: t("chrome.tripDocuments.panelLabel") }),
|
|
@@ -10480,7 +10480,7 @@ function ExpensesSkeleton() {
|
|
|
10480
10480
|
] }, id)) });
|
|
10481
10481
|
}
|
|
10482
10482
|
function ExpensesEmpty({ onLog }) {
|
|
10483
|
-
const { t } =
|
|
10483
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10484
10484
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", children: [
|
|
10485
10485
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(WalletIcon, {}) }),
|
|
10486
10486
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.emptyTitle") }),
|
|
@@ -10489,7 +10489,7 @@ function ExpensesEmpty({ onLog }) {
|
|
|
10489
10489
|
] });
|
|
10490
10490
|
}
|
|
10491
10491
|
function ExpensesFailed({ onRetry }) {
|
|
10492
|
-
const { t } =
|
|
10492
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10493
10493
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", role: "alert", children: [
|
|
10494
10494
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.failedTitle") }),
|
|
10495
10495
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-expenses-section__state-body", children: t("chrome.tripExpenses.failedBody") }),
|
|
@@ -10497,7 +10497,7 @@ function ExpensesFailed({ onRetry }) {
|
|
|
10497
10497
|
] });
|
|
10498
10498
|
}
|
|
10499
10499
|
function ExpensesDark({ reason }) {
|
|
10500
|
-
const { t } =
|
|
10500
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10501
10501
|
if (reason === "mode") {
|
|
10502
10502
|
return null;
|
|
10503
10503
|
}
|
|
@@ -10518,7 +10518,7 @@ function ExpensesTable({
|
|
|
10518
10518
|
onVoid,
|
|
10519
10519
|
onViewReceipt
|
|
10520
10520
|
}) {
|
|
10521
|
-
const { t } =
|
|
10521
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10522
10522
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-expenses-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-expenses-section__table", children: [
|
|
10523
10523
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripExpenses.tableCaption") }),
|
|
10524
10524
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -10578,7 +10578,7 @@ function LogExpenseDialog({
|
|
|
10578
10578
|
onClose,
|
|
10579
10579
|
onSubmit
|
|
10580
10580
|
}) {
|
|
10581
|
-
const { t } =
|
|
10581
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10582
10582
|
const titleId = react.useId();
|
|
10583
10583
|
const [category, setCategory] = react.useState("MISC");
|
|
10584
10584
|
const [amount, setAmount] = react.useState("");
|
|
@@ -10741,9 +10741,9 @@ function ReceiptDialog({
|
|
|
10741
10741
|
description,
|
|
10742
10742
|
onClose
|
|
10743
10743
|
}) {
|
|
10744
|
-
const { t } =
|
|
10744
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10745
10745
|
const titleId = react.useId();
|
|
10746
|
-
const files =
|
|
10746
|
+
const files = chunkAWOKWGTB_cjs.useFiles({ tripRef });
|
|
10747
10747
|
const [phase, setPhase] = react.useState({ kind: "loading" });
|
|
10748
10748
|
const [imageBroke, setImageBroke] = react.useState(false);
|
|
10749
10749
|
const readUrl = files.url;
|
|
@@ -10817,7 +10817,7 @@ function VoidExpenseDialog({
|
|
|
10817
10817
|
onClose,
|
|
10818
10818
|
onSubmit
|
|
10819
10819
|
}) {
|
|
10820
|
-
const { t } =
|
|
10820
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10821
10821
|
const titleId = react.useId();
|
|
10822
10822
|
const [reason, setReason] = react.useState("");
|
|
10823
10823
|
const trimmed = reason.trim();
|
|
@@ -10891,9 +10891,9 @@ function isCloseoutLocked2(error) {
|
|
|
10891
10891
|
return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
|
|
10892
10892
|
}
|
|
10893
10893
|
function TripExpensesSection({ tripRef, style }) {
|
|
10894
|
-
const { t } =
|
|
10895
|
-
const expenses =
|
|
10896
|
-
const vendors =
|
|
10894
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
10895
|
+
const expenses = chunkAWOKWGTB_cjs.useExpenses(tripRef);
|
|
10896
|
+
const vendors = chunkAWOKWGTB_cjs.useVendors(tripRef, "");
|
|
10897
10897
|
const [category, setCategory] = react.useState(null);
|
|
10898
10898
|
const [paymentMode, setPaymentMode] = react.useState(null);
|
|
10899
10899
|
const [missingReceiptOnly, setMissingReceiptOnly] = react.useState(false);
|
|
@@ -10962,7 +10962,7 @@ function TripExpensesSection({ tripRef, style }) {
|
|
|
10962
10962
|
return /* @__PURE__ */ jsxRuntime.jsx(ExpensesDark, { reason: expenses.reason });
|
|
10963
10963
|
}
|
|
10964
10964
|
const filtered = category !== null || paymentMode !== null || missingReceiptOnly;
|
|
10965
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style:
|
|
10965
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
10966
10966
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__toolbar", children: [
|
|
10967
10967
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-title", children: t("chrome.tripExpenses.panelLabel") }),
|
|
10968
10968
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-spacer" }),
|
|
@@ -11242,7 +11242,7 @@ function FloatMovementDialog({
|
|
|
11242
11242
|
onClose,
|
|
11243
11243
|
onSubmit
|
|
11244
11244
|
}) {
|
|
11245
|
-
const { t } =
|
|
11245
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11246
11246
|
const titleId = react.useId();
|
|
11247
11247
|
const [managerId, setManagerId] = react.useState(manager?.managerId ?? null);
|
|
11248
11248
|
const [amount, setAmount] = react.useState(
|
|
@@ -11475,7 +11475,7 @@ function FloatSkeleton() {
|
|
|
11475
11475
|
] }, id)) });
|
|
11476
11476
|
}
|
|
11477
11477
|
function FloatEmpty({ onIssue }) {
|
|
11478
|
-
const { t } =
|
|
11478
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11479
11479
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", children: [
|
|
11480
11480
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(SafeIcon, {}) }),
|
|
11481
11481
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.emptyTitle") }),
|
|
@@ -11484,7 +11484,7 @@ function FloatEmpty({ onIssue }) {
|
|
|
11484
11484
|
] });
|
|
11485
11485
|
}
|
|
11486
11486
|
function FloatFailed({ onRetry }) {
|
|
11487
|
-
const { t } =
|
|
11487
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11488
11488
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", role: "alert", children: [
|
|
11489
11489
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.failedTitle") }),
|
|
11490
11490
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-float-section__state-body", children: t("chrome.tripFloat.failedBody") }),
|
|
@@ -11492,7 +11492,7 @@ function FloatFailed({ onRetry }) {
|
|
|
11492
11492
|
] });
|
|
11493
11493
|
}
|
|
11494
11494
|
function FloatDark({ reason }) {
|
|
11495
|
-
const { t } =
|
|
11495
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11496
11496
|
if (reason === "mode") {
|
|
11497
11497
|
return null;
|
|
11498
11498
|
}
|
|
@@ -11515,7 +11515,7 @@ function ManagerFloatCard({
|
|
|
11515
11515
|
onAdjust,
|
|
11516
11516
|
onSettle
|
|
11517
11517
|
}) {
|
|
11518
|
-
const { t } =
|
|
11518
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11519
11519
|
const bodyId = `kf-float-${row.managerId}`;
|
|
11520
11520
|
const summary = row.summary;
|
|
11521
11521
|
const shares = summary === void 0 ? void 0 : usageShares(summary);
|
|
@@ -11721,9 +11721,9 @@ function refusedBalanceOf(error) {
|
|
|
11721
11721
|
return details?.currentBalanceMinor;
|
|
11722
11722
|
}
|
|
11723
11723
|
function TripFloatSection({ tripRef, style }) {
|
|
11724
|
-
const { t } =
|
|
11725
|
-
const float =
|
|
11726
|
-
const managers =
|
|
11724
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11725
|
+
const float = chunkAWOKWGTB_cjs.useFloat(tripRef);
|
|
11726
|
+
const managers = chunkAWOKWGTB_cjs.useManagers(tripRef);
|
|
11727
11727
|
const [openManagerId, setOpenManagerId] = react.useState(null);
|
|
11728
11728
|
const [ledgers, setLedgers] = react.useState({});
|
|
11729
11729
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -11849,7 +11849,7 @@ function TripFloatSection({ tripRef, style }) {
|
|
|
11849
11849
|
if (float.status === "dark") {
|
|
11850
11850
|
return /* @__PURE__ */ jsxRuntime.jsx(FloatDark, { reason: float.reason });
|
|
11851
11851
|
}
|
|
11852
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style:
|
|
11852
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
11853
11853
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__toolbar", children: [
|
|
11854
11854
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-title", children: t("chrome.tripFloat.panelLabel") }),
|
|
11855
11855
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-spacer" }),
|
|
@@ -11964,7 +11964,7 @@ function DispatchDialog({
|
|
|
11964
11964
|
onClose,
|
|
11965
11965
|
onSend
|
|
11966
11966
|
}) {
|
|
11967
|
-
const { t } =
|
|
11967
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
11968
11968
|
const titleId = react.useId();
|
|
11969
11969
|
const [everyone, setEveryone] = react.useState(true);
|
|
11970
11970
|
const [picked, setPicked] = react.useState(/* @__PURE__ */ new Set());
|
|
@@ -12112,7 +12112,7 @@ function FormRow2({
|
|
|
12112
12112
|
onExport,
|
|
12113
12113
|
onOpenMissing
|
|
12114
12114
|
}) {
|
|
12115
|
-
const { t } =
|
|
12115
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12116
12116
|
const canSeeMissing = supportsWhoIsMissing(form);
|
|
12117
12117
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", children: [
|
|
12118
12118
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-trip-forms-section__row-body", children: [
|
|
@@ -12165,14 +12165,14 @@ function FormsSkeleton() {
|
|
|
12165
12165
|
] }, id)) });
|
|
12166
12166
|
}
|
|
12167
12167
|
function FormsEmpty() {
|
|
12168
|
-
const { t } =
|
|
12168
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12169
12169
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", children: [
|
|
12170
12170
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.emptyTitle") }),
|
|
12171
12171
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.emptyBody") })
|
|
12172
12172
|
] });
|
|
12173
12173
|
}
|
|
12174
12174
|
function FormsFailed({ onRetry }) {
|
|
12175
|
-
const { t } =
|
|
12175
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12176
12176
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", role: "alert", children: [
|
|
12177
12177
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.failedTitle") }),
|
|
12178
12178
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.failedBody") }),
|
|
@@ -12180,7 +12180,7 @@ function FormsFailed({ onRetry }) {
|
|
|
12180
12180
|
] });
|
|
12181
12181
|
}
|
|
12182
12182
|
function FormsDark({ reason }) {
|
|
12183
|
-
const { t } =
|
|
12183
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12184
12184
|
if (reason === "mode") return null;
|
|
12185
12185
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", "data-dark": reason, children: [
|
|
12186
12186
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t(reason === "flag" ? "chrome.tripForms.flagDarkTitle" : "chrome.tripForms.dataDarkTitle") }),
|
|
@@ -12225,7 +12225,7 @@ function OnBehalfDialog({
|
|
|
12225
12225
|
onClose,
|
|
12226
12226
|
onSubmit
|
|
12227
12227
|
}) {
|
|
12228
|
-
const { t } =
|
|
12228
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12229
12229
|
const titleId = react.useId();
|
|
12230
12230
|
const [values, setValues] = react.useState({});
|
|
12231
12231
|
const answerable = react.useMemo(
|
|
@@ -12363,7 +12363,7 @@ function ParticipantRow({
|
|
|
12363
12363
|
onFillOnBehalf,
|
|
12364
12364
|
onOpenResponse
|
|
12365
12365
|
}) {
|
|
12366
|
-
const { t } =
|
|
12366
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12367
12367
|
const status = row.response?.status;
|
|
12368
12368
|
const submitted = status === "SUBMITTED";
|
|
12369
12369
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", "data-done": submitted ? "true" : void 0, children: [
|
|
@@ -12416,7 +12416,7 @@ function ResponseViewer({
|
|
|
12416
12416
|
failed,
|
|
12417
12417
|
onClose
|
|
12418
12418
|
}) {
|
|
12419
|
-
const { t } =
|
|
12419
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12420
12420
|
const titleId = react.useId();
|
|
12421
12421
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12422
12422
|
SheetDialog,
|
|
@@ -12452,9 +12452,9 @@ function TripFormsSection({
|
|
|
12452
12452
|
components,
|
|
12453
12453
|
style
|
|
12454
12454
|
}) {
|
|
12455
|
-
const { t } =
|
|
12456
|
-
const forms =
|
|
12457
|
-
const { listTripManifest } =
|
|
12455
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12456
|
+
const forms = chunkAWOKWGTB_cjs.useForms(tripRef);
|
|
12457
|
+
const { listTripManifest } = chunk77RKNRNH_cjs.useDirectories();
|
|
12458
12458
|
const [openFormId, setOpenFormId] = react.useState(null);
|
|
12459
12459
|
const [completion, setCompletion] = react.useState(void 0);
|
|
12460
12460
|
const [manifest, setManifest] = react.useState(void 0);
|
|
@@ -12576,7 +12576,7 @@ function TripFormsSection({
|
|
|
12576
12576
|
if (forms.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(FormsDark, { reason: forms.reason });
|
|
12577
12577
|
const inert = readOnly;
|
|
12578
12578
|
const unreadable = ready !== null && ready.syncedAt === void 0 && rows.length === 0;
|
|
12579
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style:
|
|
12579
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
12580
12580
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head", children: [
|
|
12581
12581
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head-text", children: [
|
|
12582
12582
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-forms-section__title", children: openForm === null ? t("chrome.tripForms.panelLabel") : openForm.title }),
|
|
@@ -12726,7 +12726,7 @@ function ChangeLogDialog({
|
|
|
12726
12726
|
onRetry,
|
|
12727
12727
|
onClose
|
|
12728
12728
|
}) {
|
|
12729
|
-
const { t } =
|
|
12729
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
12730
12730
|
const titleId = react.useId();
|
|
12731
12731
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12732
12732
|
SheetDialog,
|
|
@@ -13073,7 +13073,7 @@ function ItemRow({
|
|
|
13073
13073
|
onMoveBy,
|
|
13074
13074
|
onOpenVendor
|
|
13075
13075
|
}) {
|
|
13076
|
-
const { t } =
|
|
13076
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13077
13077
|
const derived = deriveItineraryItem(item, timeZone, serverTime);
|
|
13078
13078
|
const isDone = item.status === "COMPLETED";
|
|
13079
13079
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -13195,7 +13195,7 @@ function DayCard({
|
|
|
13195
13195
|
onSwitchToTimeline,
|
|
13196
13196
|
onOpenVendor
|
|
13197
13197
|
}) {
|
|
13198
|
-
const { t } =
|
|
13198
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13199
13199
|
const { draggingId, overIndex, rowProps, moveBy } = useListReorder({
|
|
13200
13200
|
enabled: canEdit,
|
|
13201
13201
|
onMove: onReorder
|
|
@@ -13246,7 +13246,7 @@ function DayCard({
|
|
|
13246
13246
|
] });
|
|
13247
13247
|
}
|
|
13248
13248
|
function DayPillStrip({ pills, activeIso, onSelect }) {
|
|
13249
|
-
const { t } =
|
|
13249
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13250
13250
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13251
13251
|
"div",
|
|
13252
13252
|
{
|
|
@@ -13323,7 +13323,7 @@ function EditDayDialog({
|
|
|
13323
13323
|
onClose,
|
|
13324
13324
|
onSubmit
|
|
13325
13325
|
}) {
|
|
13326
|
-
const { t } =
|
|
13326
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13327
13327
|
const titleId = react.useId();
|
|
13328
13328
|
const [cardTitle, setCardTitle] = react.useState(group.day.cardTitle);
|
|
13329
13329
|
const [hasSummary, setHasSummary] = react.useState(
|
|
@@ -13466,7 +13466,7 @@ function ItemFormDialog({
|
|
|
13466
13466
|
onSubmit,
|
|
13467
13467
|
onDelete
|
|
13468
13468
|
}) {
|
|
13469
|
-
const { t } =
|
|
13469
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13470
13470
|
const titleId = react.useId();
|
|
13471
13471
|
const isEdit = item !== null;
|
|
13472
13472
|
const [isoDate, setIsoDate] = react.useState(
|
|
@@ -13721,7 +13721,7 @@ function ItinerarySkeleton({ view }) {
|
|
|
13721
13721
|
] });
|
|
13722
13722
|
}
|
|
13723
13723
|
function ItineraryEmpty() {
|
|
13724
|
-
const { t } =
|
|
13724
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13725
13725
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", children: [
|
|
13726
13726
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}) }),
|
|
13727
13727
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.emptyTitle") }),
|
|
@@ -13729,7 +13729,7 @@ function ItineraryEmpty() {
|
|
|
13729
13729
|
] });
|
|
13730
13730
|
}
|
|
13731
13731
|
function ItineraryFailed({ onRetry }) {
|
|
13732
|
-
const { t } =
|
|
13732
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13733
13733
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", role: "alert", children: [
|
|
13734
13734
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.failedTitle") }),
|
|
13735
13735
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-itinerary-section__state-body", children: t("chrome.tripItinerary.failedBody") }),
|
|
@@ -13737,7 +13737,7 @@ function ItineraryFailed({ onRetry }) {
|
|
|
13737
13737
|
] });
|
|
13738
13738
|
}
|
|
13739
13739
|
function TimelineView({ entries, onOpenDay }) {
|
|
13740
|
-
const { t } =
|
|
13740
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13741
13741
|
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "kf-trip-itinerary-section__timeline", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__timeline-grid", children: [
|
|
13742
13742
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__timeline-line", "aria-hidden": "true" }),
|
|
13743
13743
|
entries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13824,7 +13824,7 @@ var OPTIONS2 = [
|
|
|
13824
13824
|
{ value: "timeline", labelKey: "chrome.tripItinerary.viewTimeline" }
|
|
13825
13825
|
];
|
|
13826
13826
|
function ViewSegment({ value, onChange }) {
|
|
13827
|
-
const { t } =
|
|
13827
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13828
13828
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-itinerary-section__segment", children: [
|
|
13829
13829
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripItinerary.viewLabel") }),
|
|
13830
13830
|
OPTIONS2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13850,8 +13850,8 @@ function TripItinerarySection({
|
|
|
13850
13850
|
onOpenVendor,
|
|
13851
13851
|
style
|
|
13852
13852
|
}) {
|
|
13853
|
-
const { t } =
|
|
13854
|
-
const itinerary =
|
|
13853
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
13854
|
+
const itinerary = chunkAWOKWGTB_cjs.useItinerary(tripRef);
|
|
13855
13855
|
const [view, setView] = react.useState("days");
|
|
13856
13856
|
const [activeIso, setActiveIso] = react.useState(null);
|
|
13857
13857
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -14024,7 +14024,7 @@ function TripItinerarySection({
|
|
|
14024
14024
|
setActiveIso(isoDate);
|
|
14025
14025
|
setView("days");
|
|
14026
14026
|
}
|
|
14027
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style:
|
|
14027
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
14028
14028
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__toolbar", children: [
|
|
14029
14029
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSegment, { value: view, onChange: setView }),
|
|
14030
14030
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__toolbar-spacer" }),
|
|
@@ -14209,9 +14209,9 @@ function AddTravellerDialog({
|
|
|
14209
14209
|
onClose,
|
|
14210
14210
|
onAdded
|
|
14211
14211
|
}) {
|
|
14212
|
-
const { t } =
|
|
14212
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14213
14213
|
const titleId = react.useId();
|
|
14214
|
-
const { makeTravellersFetch, addTraveller, createAgencyTraveller } =
|
|
14214
|
+
const { makeTravellersFetch, addTraveller, createAgencyTraveller } = chunk77RKNRNH_cjs.useDirectories();
|
|
14215
14215
|
const [mode, setMode] = react.useState("search");
|
|
14216
14216
|
const [term, setTerm] = react.useState("");
|
|
14217
14217
|
const [debounced, setDebounced] = react.useState("");
|
|
@@ -14225,7 +14225,7 @@ function AddTravellerDialog({
|
|
|
14225
14225
|
return () => clearTimeout(timer);
|
|
14226
14226
|
}, [term]);
|
|
14227
14227
|
function reportFailure(error) {
|
|
14228
|
-
setErrorCode(
|
|
14228
|
+
setErrorCode(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
14229
14229
|
}
|
|
14230
14230
|
async function addExisting(externalTravellerId, fullName) {
|
|
14231
14231
|
setPending(true);
|
|
@@ -14377,8 +14377,8 @@ function DirectoryResults({
|
|
|
14377
14377
|
pendingId,
|
|
14378
14378
|
onPick
|
|
14379
14379
|
}) {
|
|
14380
|
-
const { t } =
|
|
14381
|
-
const { rows, hasNext, loadNext, settled, error } =
|
|
14380
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14381
|
+
const { rows, hasNext, loadNext, settled, error } = chunk77RKNRNH_cjs.usePaginatedList(fetch);
|
|
14382
14382
|
if (!settled) {
|
|
14383
14383
|
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "aria-live": "polite", children: t("chrome.tripManifest.addSearching") });
|
|
14384
14384
|
}
|
|
@@ -14446,6 +14446,7 @@ function deriveManifestGroups(rows) {
|
|
|
14446
14446
|
}
|
|
14447
14447
|
return groups;
|
|
14448
14448
|
}
|
|
14449
|
+
var MIN_PARTY_MEMBERS = 2;
|
|
14449
14450
|
var PARTY_KINDS = ["FAMILY", "COUPLE", "FRIENDS", "CORPORATE", "OTHER"];
|
|
14450
14451
|
var KIND_LABEL_KEY = {
|
|
14451
14452
|
FAMILY: "chrome.tripManifest.partyKind.family",
|
|
@@ -14461,21 +14462,23 @@ function EditPartyDialog({
|
|
|
14461
14462
|
onClose,
|
|
14462
14463
|
onSaved
|
|
14463
14464
|
}) {
|
|
14464
|
-
const { t } =
|
|
14465
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14465
14466
|
const titleId = react.useId();
|
|
14466
|
-
const { patchParty, deleteParty } =
|
|
14467
|
-
const party = group
|
|
14467
|
+
const { createParty, patchParty, deleteParty } = chunk77RKNRNH_cjs.useDirectories();
|
|
14468
|
+
const party = group?.party ?? null;
|
|
14469
|
+
const creating = group === void 0;
|
|
14468
14470
|
const [kind, setKind] = react.useState(
|
|
14469
14471
|
party?.kind ?? "OTHER"
|
|
14470
14472
|
);
|
|
14471
14473
|
const [label, setLabel] = react.useState(party?.label ?? "");
|
|
14472
14474
|
const [members, setMembers] = react.useState(
|
|
14473
|
-
new Set(group
|
|
14475
|
+
new Set((group?.rows ?? []).map((row) => row.traveller.travellerId))
|
|
14474
14476
|
);
|
|
14475
14477
|
const [pending, setPending] = react.useState(false);
|
|
14476
14478
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
14477
|
-
if (party === null) return null;
|
|
14479
|
+
if (!creating && party === null) return null;
|
|
14478
14480
|
const editing = party;
|
|
14481
|
+
const enoughMembers = members.size >= MIN_PARTY_MEMBERS;
|
|
14479
14482
|
function toggle(travellerId) {
|
|
14480
14483
|
const next = new Set(members);
|
|
14481
14484
|
if (next.has(travellerId)) next.delete(travellerId);
|
|
@@ -14491,6 +14494,16 @@ function EditPartyDialog({
|
|
|
14491
14494
|
setErrorCode(void 0);
|
|
14492
14495
|
try {
|
|
14493
14496
|
const trimmed = label.trim();
|
|
14497
|
+
if (editing === null) {
|
|
14498
|
+
await createParty({
|
|
14499
|
+
tripRef,
|
|
14500
|
+
kind,
|
|
14501
|
+
...trimmed.length === 0 ? {} : { label: trimmed },
|
|
14502
|
+
travellerRefs: [...members]
|
|
14503
|
+
});
|
|
14504
|
+
onSaved();
|
|
14505
|
+
return;
|
|
14506
|
+
}
|
|
14494
14507
|
await patchParty({
|
|
14495
14508
|
tripRef,
|
|
14496
14509
|
partyId: editing.id,
|
|
@@ -14517,6 +14530,7 @@ function EditPartyDialog({
|
|
|
14517
14530
|
setPending(true);
|
|
14518
14531
|
setErrorCode(void 0);
|
|
14519
14532
|
try {
|
|
14533
|
+
if (editing === null) return;
|
|
14520
14534
|
await deleteParty({ tripRef, partyId: editing.id });
|
|
14521
14535
|
onSaved();
|
|
14522
14536
|
} catch (error) {
|
|
@@ -14529,8 +14543,12 @@ function EditPartyDialog({
|
|
|
14529
14543
|
SheetDialog,
|
|
14530
14544
|
{
|
|
14531
14545
|
titleId,
|
|
14532
|
-
title: t(
|
|
14533
|
-
|
|
14546
|
+
title: t(
|
|
14547
|
+
creating ? "chrome.tripManifest.newGroupTitle" : "chrome.tripManifest.editGroupTitle"
|
|
14548
|
+
),
|
|
14549
|
+
description: t(
|
|
14550
|
+
creating ? "chrome.tripManifest.newGroupBody" : "chrome.tripManifest.editGroupBody"
|
|
14551
|
+
),
|
|
14534
14552
|
onClose,
|
|
14535
14553
|
closeLabel: t("chrome.tripManifest.close"),
|
|
14536
14554
|
footer: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -14550,13 +14568,13 @@ function EditPartyDialog({
|
|
|
14550
14568
|
type: "button",
|
|
14551
14569
|
className: "kf-trip-manifest-section__dialog-primary",
|
|
14552
14570
|
onClick: () => void save(),
|
|
14553
|
-
disabled: pending,
|
|
14554
|
-
children: pending ? t("chrome.tripManifest.saving") : t("chrome.tripManifest.save")
|
|
14571
|
+
disabled: pending || creating && !enoughMembers,
|
|
14572
|
+
children: pending ? t("chrome.tripManifest.saving") : t(creating ? "chrome.tripManifest.createGroup" : "chrome.tripManifest.save")
|
|
14555
14573
|
}
|
|
14556
14574
|
)
|
|
14557
14575
|
] }),
|
|
14558
14576
|
children: [
|
|
14559
|
-
editing.source === "DERIVED" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "data-tone": "warn", children: t("chrome.tripManifest.pinNote") }) : null,
|
|
14577
|
+
editing !== null && editing.source === "DERIVED" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "data-tone": "warn", children: t("chrome.tripManifest.pinNote") }) : null,
|
|
14560
14578
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-trip-manifest-section__field", children: [
|
|
14561
14579
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-manifest-section__field-label", children: t("chrome.tripManifest.fieldGroupLabel") }),
|
|
14562
14580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14605,7 +14623,7 @@ function EditPartyDialog({
|
|
|
14605
14623
|
)) }),
|
|
14606
14624
|
members.size < 2 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", children: t("chrome.tripManifest.tooFewMembers") }) : null
|
|
14607
14625
|
] }),
|
|
14608
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-manifest-section__danger-lane", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14626
|
+
creating ? null : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-manifest-section__danger-lane", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14609
14627
|
"button",
|
|
14610
14628
|
{
|
|
14611
14629
|
type: "button",
|
|
@@ -14624,7 +14642,7 @@ function EditPartyDialog({
|
|
|
14624
14642
|
}
|
|
14625
14643
|
var DIET_BUCKET_CAP = 4;
|
|
14626
14644
|
function ManifestFacetTiles({ facets, filtered }) {
|
|
14627
|
-
const { t } =
|
|
14645
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14628
14646
|
const dietEntries = Object.entries(facets.dietCounts).filter(([, count]) => count > 0).sort((a, b) => b[1] - a[1]);
|
|
14629
14647
|
const shown = dietEntries.slice(0, DIET_BUCKET_CAP);
|
|
14630
14648
|
const hiddenCount = dietEntries.length - shown.length;
|
|
@@ -14706,7 +14724,7 @@ function ManifestFiltersPopover({
|
|
|
14706
14724
|
value,
|
|
14707
14725
|
onChange
|
|
14708
14726
|
}) {
|
|
14709
|
-
const { t } =
|
|
14727
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14710
14728
|
const [open, setOpen] = react.useState(false);
|
|
14711
14729
|
const rootRef = react.useRef(null);
|
|
14712
14730
|
const triggerRef = react.useRef(null);
|
|
@@ -14846,7 +14864,7 @@ var KIND_LABEL_KEY2 = {
|
|
|
14846
14864
|
OTHER: "chrome.tripManifest.partyKind.other"
|
|
14847
14865
|
};
|
|
14848
14866
|
function ManifestGroupCard({ group, onEdit, children }) {
|
|
14849
|
-
const { t } =
|
|
14867
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14850
14868
|
const party = group.party;
|
|
14851
14869
|
const isSolo = party === null;
|
|
14852
14870
|
const heading = isSolo ? t("chrome.tripManifest.soloHeading") : party.label ?? t(KIND_LABEL_KEY2[party.kind] ?? "chrome.tripManifest.partyKind.other");
|
|
@@ -14934,7 +14952,7 @@ function ManifestRowKebab({
|
|
|
14934
14952
|
onShareLink,
|
|
14935
14953
|
onOpenProfile
|
|
14936
14954
|
}) {
|
|
14937
|
-
const { t } =
|
|
14955
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
14938
14956
|
const [open, setOpen] = react.useState(false);
|
|
14939
14957
|
const rootRef = react.useRef(null);
|
|
14940
14958
|
const triggerRef = react.useRef(null);
|
|
@@ -15033,10 +15051,10 @@ function ManifestRow({
|
|
|
15033
15051
|
onOpenProfile,
|
|
15034
15052
|
style
|
|
15035
15053
|
}) {
|
|
15036
|
-
const { t } =
|
|
15054
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15037
15055
|
const derived = deriveManifestRow(row, index, serverTime);
|
|
15038
15056
|
const traveller = row.traveller;
|
|
15039
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style:
|
|
15057
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
15040
15058
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15041
15059
|
"td",
|
|
15042
15060
|
{
|
|
@@ -15110,7 +15128,7 @@ function ManifestTable({
|
|
|
15110
15128
|
onOpenProfile,
|
|
15111
15129
|
RowComponent
|
|
15112
15130
|
}) {
|
|
15113
|
-
const { t } =
|
|
15131
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15114
15132
|
const Row = RowComponent ?? ManifestRow;
|
|
15115
15133
|
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: [
|
|
15116
15134
|
showHead ? /* @__PURE__ */ jsxRuntime.jsx("thead", { role: "rowgroup", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__head-row", children: [
|
|
@@ -15157,8 +15175,8 @@ function ManifestResultsBody({
|
|
|
15157
15175
|
RowComponent,
|
|
15158
15176
|
onRetry
|
|
15159
15177
|
}) {
|
|
15160
|
-
const { t } =
|
|
15161
|
-
const { makeManifestFetch, facets, groupedPageSize } =
|
|
15178
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15179
|
+
const { makeManifestFetch, facets, groupedPageSize } = chunk77RKNRNH_cjs.useAgencyTripManifest(tripRef);
|
|
15162
15180
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
15163
15181
|
const [hasSettled, setHasSettled] = react.useState(false);
|
|
15164
15182
|
const [serverTime, setServerTime] = react.useState(void 0);
|
|
@@ -15175,7 +15193,7 @@ function ManifestResultsBody({
|
|
|
15175
15193
|
if (meta?.serverTime !== void 0) setServerTime(meta.serverTime);
|
|
15176
15194
|
return page;
|
|
15177
15195
|
} catch (error) {
|
|
15178
|
-
setErrorCode(
|
|
15196
|
+
setErrorCode(chunkAWOKWGTB_cjs.classifyError(error).code ?? "unknown");
|
|
15179
15197
|
return { rows: [], nextCursor: void 0 };
|
|
15180
15198
|
} finally {
|
|
15181
15199
|
setHasSettled(true);
|
|
@@ -15183,7 +15201,7 @@ function ManifestResultsBody({
|
|
|
15183
15201
|
},
|
|
15184
15202
|
[makeManifestFetch, filters, grouped, groupedPageSize]
|
|
15185
15203
|
);
|
|
15186
|
-
const { rows, hasNext, hasPrev, loadNext, loadPrev } =
|
|
15204
|
+
const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunk77RKNRNH_cjs.usePaginatedList(fetch, {
|
|
15187
15205
|
accumulate: grouped
|
|
15188
15206
|
});
|
|
15189
15207
|
react.useEffect(() => {
|
|
@@ -15344,7 +15362,7 @@ function ManifestSearchInput({
|
|
|
15344
15362
|
debounceMs,
|
|
15345
15363
|
onDebouncedChange
|
|
15346
15364
|
}) {
|
|
15347
|
-
const { t } =
|
|
15365
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15348
15366
|
const [value, setValue] = react.useState("");
|
|
15349
15367
|
react.useEffect(() => {
|
|
15350
15368
|
const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
|
|
@@ -15371,8 +15389,8 @@ function RemoveTravellerDialog({
|
|
|
15371
15389
|
onClose,
|
|
15372
15390
|
onRemoved
|
|
15373
15391
|
}) {
|
|
15374
|
-
const { t } =
|
|
15375
|
-
const { removeFromManifest } =
|
|
15392
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15393
|
+
const { removeFromManifest } = chunk77RKNRNH_cjs.useDirectories();
|
|
15376
15394
|
const titleId = react.useId();
|
|
15377
15395
|
const [pending, setPending] = react.useState(false);
|
|
15378
15396
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -15463,12 +15481,12 @@ function ShareLinkDialog({
|
|
|
15463
15481
|
travellerName,
|
|
15464
15482
|
onClose
|
|
15465
15483
|
}) {
|
|
15466
|
-
const { t } =
|
|
15484
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15467
15485
|
const titleId = react.useId();
|
|
15468
|
-
const buildShareUrl =
|
|
15486
|
+
const buildShareUrl = chunk77RKNRNH_cjs.useBuildShareUrl();
|
|
15469
15487
|
const isFamily = travellerRef === null;
|
|
15470
|
-
const offerable =
|
|
15471
|
-
const { links, readFailed, mint, revoke, regenerate, reveal } =
|
|
15488
|
+
const offerable = chunk77RKNRNH_cjs.familySafeSections(isFamily);
|
|
15489
|
+
const { links, readFailed, mint, revoke, regenerate, reveal } = chunk77RKNRNH_cjs.useShareLinks(
|
|
15472
15490
|
tripRef,
|
|
15473
15491
|
travellerRef
|
|
15474
15492
|
);
|
|
@@ -15801,7 +15819,7 @@ function SideDrawer({
|
|
|
15801
15819
|
"aria-modal": "true",
|
|
15802
15820
|
"aria-labelledby": titleId,
|
|
15803
15821
|
tabIndex: -1,
|
|
15804
|
-
style:
|
|
15822
|
+
style: chunk4QMYUKW4_cjs.tokenStyle(style),
|
|
15805
15823
|
children: [
|
|
15806
15824
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-admin-side-drawer__header", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__header-row", children: [
|
|
15807
15825
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__identity", children: [
|
|
@@ -15869,11 +15887,11 @@ function TravellerDetailDialog({
|
|
|
15869
15887
|
onClose,
|
|
15870
15888
|
onRemove
|
|
15871
15889
|
}) {
|
|
15872
|
-
const { t } =
|
|
15890
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
15873
15891
|
const titleId = react.useId();
|
|
15874
|
-
const { read, readFailed, refresh } =
|
|
15875
|
-
const forms =
|
|
15876
|
-
const { addTravellerNote } =
|
|
15892
|
+
const { read, readFailed, refresh } = chunkAWOKWGTB_cjs.useTravellerProfile(tripRef, travellerRef);
|
|
15893
|
+
const forms = chunk77RKNRNH_cjs.useTravellerFormResponses(tripRef, travellerRef);
|
|
15894
|
+
const { addTravellerNote } = chunk77RKNRNH_cjs.useDirectories();
|
|
15877
15895
|
const [noteDraft, setNoteDraft] = react.useState("");
|
|
15878
15896
|
const [notePending, setNotePending] = react.useState(false);
|
|
15879
15897
|
const [noteFailed, setNoteFailed] = react.useState(false);
|
|
@@ -16102,7 +16120,7 @@ function DetailRow({
|
|
|
16102
16120
|
absentLabel,
|
|
16103
16121
|
meta
|
|
16104
16122
|
}) {
|
|
16105
|
-
const { t } =
|
|
16123
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16106
16124
|
const has = value !== null && value !== void 0 && value.length > 0;
|
|
16107
16125
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__detail-row", children: [
|
|
16108
16126
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-manifest-section__detail-label", children: label }),
|
|
@@ -16125,7 +16143,7 @@ function TripManifestSection({
|
|
|
16125
16143
|
components,
|
|
16126
16144
|
style
|
|
16127
16145
|
}) {
|
|
16128
|
-
const { t } =
|
|
16146
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16129
16147
|
const [q, setQ] = react.useState("");
|
|
16130
16148
|
const [groupBy, setGroupBy] = react.useState("booking_group");
|
|
16131
16149
|
const [filters, setFilters] = react.useState({});
|
|
@@ -16154,7 +16172,7 @@ function TripManifestSection({
|
|
|
16154
16172
|
[groupBy, writeToken, wireFilters]
|
|
16155
16173
|
);
|
|
16156
16174
|
const hasActiveFilter = q.length > 0 || Object.keys(filters).length > 0;
|
|
16157
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style:
|
|
16175
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
16158
16176
|
facets === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ManifestFacetTiles, { facets, filtered: hasActiveFilter }),
|
|
16159
16177
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__toolbar", children: [
|
|
16160
16178
|
/* @__PURE__ */ jsxRuntime.jsx(ManifestSearchInput, { debounceMs: DEBOUNCE_MS, onDebouncedChange: setQ }),
|
|
@@ -16197,7 +16215,19 @@ function TripManifestSection({
|
|
|
16197
16215
|
t("chrome.tripManifest.addTraveller")
|
|
16198
16216
|
]
|
|
16199
16217
|
}
|
|
16200
|
-
)
|
|
16218
|
+
),
|
|
16219
|
+
visibleRows.length >= 2 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16220
|
+
"button",
|
|
16221
|
+
{
|
|
16222
|
+
type: "button",
|
|
16223
|
+
className: "kf-trip-manifest-section__toolbar-button",
|
|
16224
|
+
onClick: () => setOverlay({ kind: "newParty" }),
|
|
16225
|
+
children: [
|
|
16226
|
+
/* @__PURE__ */ jsxRuntime.jsx(PlusIcon7, {}),
|
|
16227
|
+
t("chrome.tripManifest.newGroup")
|
|
16228
|
+
]
|
|
16229
|
+
}
|
|
16230
|
+
) : null
|
|
16201
16231
|
] }),
|
|
16202
16232
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16203
16233
|
ManifestResults,
|
|
@@ -16249,6 +16279,15 @@ function TripManifestSection({
|
|
|
16249
16279
|
onSaved: afterWrite
|
|
16250
16280
|
}
|
|
16251
16281
|
) : null,
|
|
16282
|
+
overlay.kind === "newParty" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16283
|
+
EditPartyDialog,
|
|
16284
|
+
{
|
|
16285
|
+
tripRef,
|
|
16286
|
+
candidates: visibleRows,
|
|
16287
|
+
onClose: closeOverlay,
|
|
16288
|
+
onSaved: afterWrite
|
|
16289
|
+
}
|
|
16290
|
+
) : null,
|
|
16252
16291
|
overlay.kind === "shareFamily" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16253
16292
|
ShareLinkDialog,
|
|
16254
16293
|
{
|
|
@@ -16381,7 +16420,7 @@ function PaymentsSkeleton() {
|
|
|
16381
16420
|
] }, id)) });
|
|
16382
16421
|
}
|
|
16383
16422
|
function PaymentsEmpty({ onRecord }) {
|
|
16384
|
-
const { t } =
|
|
16423
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16385
16424
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", children: [
|
|
16386
16425
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ReceiptIcon, {}) }),
|
|
16387
16426
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.emptyTitle") }),
|
|
@@ -16390,7 +16429,7 @@ function PaymentsEmpty({ onRecord }) {
|
|
|
16390
16429
|
] });
|
|
16391
16430
|
}
|
|
16392
16431
|
function PaymentsFailed({ onRetry }) {
|
|
16393
|
-
const { t } =
|
|
16432
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16394
16433
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", role: "alert", children: [
|
|
16395
16434
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.failedTitle") }),
|
|
16396
16435
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-payments-section__state-body", children: t("chrome.tripPayments.failedBody") }),
|
|
@@ -16398,7 +16437,7 @@ function PaymentsFailed({ onRetry }) {
|
|
|
16398
16437
|
] });
|
|
16399
16438
|
}
|
|
16400
16439
|
function PaymentsDark({ reason }) {
|
|
16401
|
-
const { t } =
|
|
16440
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16402
16441
|
if (reason === "mode") {
|
|
16403
16442
|
return null;
|
|
16404
16443
|
}
|
|
@@ -16419,7 +16458,7 @@ function PaymentsTable({
|
|
|
16419
16458
|
locked,
|
|
16420
16459
|
onVoid
|
|
16421
16460
|
}) {
|
|
16422
|
-
const { t } =
|
|
16461
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16423
16462
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-payments-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-payments-section__table", children: [
|
|
16424
16463
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripPayments.tableCaption") }),
|
|
16425
16464
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -16478,7 +16517,7 @@ function RecordPaymentDialog({
|
|
|
16478
16517
|
onClose,
|
|
16479
16518
|
onSubmit
|
|
16480
16519
|
}) {
|
|
16481
|
-
const { t } =
|
|
16520
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16482
16521
|
const titleId = react.useId();
|
|
16483
16522
|
const [travellerId, setTravellerId] = react.useState(null);
|
|
16484
16523
|
const [amount, setAmount] = react.useState("");
|
|
@@ -16653,7 +16692,7 @@ function VoidPaymentDialog({
|
|
|
16653
16692
|
onClose,
|
|
16654
16693
|
onSubmit
|
|
16655
16694
|
}) {
|
|
16656
|
-
const { t } =
|
|
16695
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16657
16696
|
const titleId = react.useId();
|
|
16658
16697
|
const [reason, setReason] = react.useState("");
|
|
16659
16698
|
const trimmed = reason.trim();
|
|
@@ -16731,9 +16770,9 @@ function TripPaymentsSection({
|
|
|
16731
16770
|
balance,
|
|
16732
16771
|
style
|
|
16733
16772
|
}) {
|
|
16734
|
-
const { t } =
|
|
16735
|
-
const collections =
|
|
16736
|
-
const parties =
|
|
16773
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16774
|
+
const collections = chunkAWOKWGTB_cjs.useCollections(tripRef);
|
|
16775
|
+
const parties = chunkAWOKWGTB_cjs.useParties(tripRef);
|
|
16737
16776
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
16738
16777
|
const [pending, setPending] = react.useState(false);
|
|
16739
16778
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -16813,7 +16852,7 @@ function TripPaymentsSection({
|
|
|
16813
16852
|
}
|
|
16814
16853
|
const currency = balance?.currency ?? rows[0]?.currency ?? "INR";
|
|
16815
16854
|
const owingCount = eligibleRows.filter((row) => row.outstandingMinor > 0).length;
|
|
16816
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style:
|
|
16855
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
16817
16856
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__toolbar", children: [
|
|
16818
16857
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-title", children: t("chrome.tripPayments.panelLabel") }),
|
|
16819
16858
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-spacer" }),
|
|
@@ -16954,7 +16993,7 @@ function AssignTravellerDialog({
|
|
|
16954
16993
|
onSubmit,
|
|
16955
16994
|
onClose
|
|
16956
16995
|
}) {
|
|
16957
|
-
const { t } =
|
|
16996
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
16958
16997
|
const titleId = react.useId();
|
|
16959
16998
|
const [pointId, setPointId] = react.useState(stops[0]?.id ?? "");
|
|
16960
16999
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17025,7 +17064,7 @@ function BoardingRoster({
|
|
|
17025
17064
|
onRetry,
|
|
17026
17065
|
stops
|
|
17027
17066
|
}) {
|
|
17028
|
-
const { t } =
|
|
17067
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17029
17068
|
if (failed) {
|
|
17030
17069
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17031
17070
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.boardingFailedTitle") }),
|
|
@@ -17085,7 +17124,7 @@ function TravellerBoardRow({
|
|
|
17085
17124
|
busy,
|
|
17086
17125
|
onCorrect
|
|
17087
17126
|
}) {
|
|
17088
|
-
const { t } =
|
|
17127
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17089
17128
|
const correctable = occupant.status !== "PENDING";
|
|
17090
17129
|
const next = occupant.status === "BOARDED" ? "NO_SHOW" : "BOARDED";
|
|
17091
17130
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-pickups-section__roster-row", children: [
|
|
@@ -17123,7 +17162,7 @@ function DeleteStopDialog({
|
|
|
17123
17162
|
onDelete,
|
|
17124
17163
|
onClose
|
|
17125
17164
|
}) {
|
|
17126
|
-
const { t } =
|
|
17165
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17127
17166
|
const titleId = react.useId();
|
|
17128
17167
|
const [target, setTarget] = react.useState(siblings[0]?.id ?? "");
|
|
17129
17168
|
const occupied = stop.expectedCount > 0;
|
|
@@ -17377,7 +17416,7 @@ function PickupsEmpty({
|
|
|
17377
17416
|
kindLabel,
|
|
17378
17417
|
onAdd
|
|
17379
17418
|
}) {
|
|
17380
|
-
const { t } =
|
|
17419
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17381
17420
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", children: [
|
|
17382
17421
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-pickups-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon, {}) }),
|
|
17383
17422
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.emptyTitle").replace("{kind}", kindLabel) }),
|
|
@@ -17386,7 +17425,7 @@ function PickupsEmpty({
|
|
|
17386
17425
|
] });
|
|
17387
17426
|
}
|
|
17388
17427
|
function PickupsFailed({ onRetry }) {
|
|
17389
|
-
const { t } =
|
|
17428
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17390
17429
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
|
|
17391
17430
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.failedTitle") }),
|
|
17392
17431
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-pickups-section__state-body", children: t("chrome.tripPickups.failedBody") }),
|
|
@@ -17394,7 +17433,7 @@ function PickupsFailed({ onRetry }) {
|
|
|
17394
17433
|
] });
|
|
17395
17434
|
}
|
|
17396
17435
|
function PickupsDark({ reason }) {
|
|
17397
|
-
const { t } =
|
|
17436
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17398
17437
|
if (reason === "mode") {
|
|
17399
17438
|
return null;
|
|
17400
17439
|
}
|
|
@@ -17428,7 +17467,7 @@ function StopFormDialog({
|
|
|
17428
17467
|
onClose,
|
|
17429
17468
|
onSubmit
|
|
17430
17469
|
}) {
|
|
17431
|
-
const { t } =
|
|
17470
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17432
17471
|
const titleId = react.useId();
|
|
17433
17472
|
const isEdit = stop !== null;
|
|
17434
17473
|
const [kind, setKind] = react.useState(stop?.kind ?? defaultKind);
|
|
@@ -17575,7 +17614,7 @@ function StopFormDialog({
|
|
|
17575
17614
|
);
|
|
17576
17615
|
}
|
|
17577
17616
|
function StopKebab({ stopName, onEdit, onDelete }) {
|
|
17578
|
-
const { t } =
|
|
17617
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17579
17618
|
const [open, setOpen] = react.useState(false);
|
|
17580
17619
|
const rootRef = react.useRef(null);
|
|
17581
17620
|
const triggerRef = react.useRef(null);
|
|
@@ -17652,7 +17691,7 @@ function StopCard({
|
|
|
17652
17691
|
onDelete,
|
|
17653
17692
|
onMoveBy
|
|
17654
17693
|
}) {
|
|
17655
|
-
const { t } =
|
|
17694
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17656
17695
|
const isClosed = stop.status === "CLOSED";
|
|
17657
17696
|
const canReorder = !isClosed;
|
|
17658
17697
|
const percent = boardedPercent(stop);
|
|
@@ -17800,7 +17839,7 @@ function Segment({
|
|
|
17800
17839
|
value,
|
|
17801
17840
|
onChange
|
|
17802
17841
|
}) {
|
|
17803
|
-
const { t } =
|
|
17842
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17804
17843
|
return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-pickups-section__segment", children: [
|
|
17805
17844
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t(legendKey) }),
|
|
17806
17845
|
options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17863,8 +17902,8 @@ function TripPickupsSection({
|
|
|
17863
17902
|
tripStartIso,
|
|
17864
17903
|
style
|
|
17865
17904
|
}) {
|
|
17866
|
-
const { t } =
|
|
17867
|
-
const pickups =
|
|
17905
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
17906
|
+
const pickups = chunkAWOKWGTB_cjs.usePickups(tripRef);
|
|
17868
17907
|
const [kind, setKind] = react.useState("PICKUP");
|
|
17869
17908
|
const [view, setView] = react.useState("stops");
|
|
17870
17909
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -18024,7 +18063,7 @@ function TripPickupsSection({
|
|
|
18024
18063
|
const kindLabel = t(
|
|
18025
18064
|
kind === "PICKUP" ? "chrome.tripPickups.kindPickupOne" : "chrome.tripPickups.kindDropOne"
|
|
18026
18065
|
);
|
|
18027
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style:
|
|
18066
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
18028
18067
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__toolbar", children: [
|
|
18029
18068
|
/* @__PURE__ */ jsxRuntime.jsx(ViewSwitcher, { value: view, onChange: setView }),
|
|
18030
18069
|
/* @__PURE__ */ jsxRuntime.jsx(KindSwitcher, { value: kind, onChange: setKind }),
|
|
@@ -18247,7 +18286,7 @@ function AutoAssignDialog({
|
|
|
18247
18286
|
onApply,
|
|
18248
18287
|
onClose
|
|
18249
18288
|
}) {
|
|
18250
|
-
const { t } =
|
|
18289
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18251
18290
|
const titleId = react.useId();
|
|
18252
18291
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
18253
18292
|
const roomCodeById = new Map(group.rooms.map((room) => [room.id, room.code]));
|
|
@@ -18342,7 +18381,7 @@ function AutoAssignDialog({
|
|
|
18342
18381
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section__plan", children: [
|
|
18343
18382
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__plan-title", children: t("chrome.tripRooming.rulesTitle") }),
|
|
18344
18383
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "kf-trip-rooming-section__rule-list", children: preview.perRule.map((entry) => {
|
|
18345
|
-
const severity =
|
|
18384
|
+
const severity = chunkAWOKWGTB_cjs.roomingHeuristicSeverity(entry.rule);
|
|
18346
18385
|
const relaxed = entry.outcome === "relaxed";
|
|
18347
18386
|
const violation = relaxed && severity === "never";
|
|
18348
18387
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18388,7 +18427,7 @@ function DeleteShell({
|
|
|
18388
18427
|
onConfirm,
|
|
18389
18428
|
onClose
|
|
18390
18429
|
}) {
|
|
18391
|
-
const { t } =
|
|
18430
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18392
18431
|
const titleId = react.useId();
|
|
18393
18432
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18394
18433
|
SheetDialog,
|
|
@@ -18434,7 +18473,7 @@ function DeleteRoomDialog({
|
|
|
18434
18473
|
onConfirm,
|
|
18435
18474
|
onClose
|
|
18436
18475
|
}) {
|
|
18437
|
-
const { t } =
|
|
18476
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18438
18477
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
18439
18478
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18440
18479
|
DeleteShell,
|
|
@@ -18460,7 +18499,7 @@ function DeleteWindowDialog({
|
|
|
18460
18499
|
onConfirm,
|
|
18461
18500
|
onClose
|
|
18462
18501
|
}) {
|
|
18463
|
-
const { t } =
|
|
18502
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18464
18503
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18465
18504
|
DeleteShell,
|
|
18466
18505
|
{
|
|
@@ -18558,15 +18597,15 @@ function roomTypeLabelKey(roomType) {
|
|
|
18558
18597
|
return ROOM_TYPE_LABEL_KEY[roomType] ?? "chrome.tripRooming.roomType.shared";
|
|
18559
18598
|
}
|
|
18560
18599
|
function toneAttrs(tone) {
|
|
18561
|
-
const parsed =
|
|
18600
|
+
const parsed = chunkAWOKWGTB_cjs.parseRoomingTone(tone);
|
|
18562
18601
|
if (parsed === void 0) {
|
|
18563
|
-
return { family:
|
|
18602
|
+
return { family: chunkAWOKWGTB_cjs.TONE_FAMILIES.UNKNOWN, shade: 0 };
|
|
18564
18603
|
}
|
|
18565
|
-
const shade = parsed.shade <
|
|
18604
|
+
const shade = parsed.shade < chunkAWOKWGTB_cjs.SHADES_PER_FAMILY ? parsed.shade : parsed.shade % chunkAWOKWGTB_cjs.SHADES_PER_FAMILY;
|
|
18566
18605
|
return { family: parsed.family, shade };
|
|
18567
18606
|
}
|
|
18568
18607
|
function glyphOf(occupant) {
|
|
18569
|
-
return occupant.glyph === "" ?
|
|
18608
|
+
return occupant.glyph === "" ? chunkAWOKWGTB_cjs.FALLBACK_GLYPH : occupant.glyph;
|
|
18570
18609
|
}
|
|
18571
18610
|
function TravellerGlyph({
|
|
18572
18611
|
occupant,
|
|
@@ -18604,7 +18643,7 @@ var COLLAPSED_COUNT = 10;
|
|
|
18604
18643
|
function IdentityLegend({
|
|
18605
18644
|
occupants
|
|
18606
18645
|
}) {
|
|
18607
|
-
const { t } =
|
|
18646
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18608
18647
|
const [open, setOpen] = react.useState(false);
|
|
18609
18648
|
if (occupants.length === 0) {
|
|
18610
18649
|
return null;
|
|
@@ -18731,7 +18770,7 @@ function RoomFormDialog({
|
|
|
18731
18770
|
onClose,
|
|
18732
18771
|
onSubmit
|
|
18733
18772
|
}) {
|
|
18734
|
-
const { t } =
|
|
18773
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18735
18774
|
const titleId = react.useId();
|
|
18736
18775
|
const isEdit = room !== null;
|
|
18737
18776
|
const [code, setCode] = react.useState(room?.code ?? "");
|
|
@@ -18855,7 +18894,7 @@ function RoomingSkeleton() {
|
|
|
18855
18894
|
] }, id)) });
|
|
18856
18895
|
}
|
|
18857
18896
|
function RoomingEmpty({ onAddWindow }) {
|
|
18858
|
-
const { t } =
|
|
18897
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18859
18898
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", children: [
|
|
18860
18899
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BedIcon, {}) }),
|
|
18861
18900
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.emptyTitle") }),
|
|
@@ -18864,7 +18903,7 @@ function RoomingEmpty({ onAddWindow }) {
|
|
|
18864
18903
|
] });
|
|
18865
18904
|
}
|
|
18866
18905
|
function RoomingFailed({ onRetry }) {
|
|
18867
|
-
const { t } =
|
|
18906
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18868
18907
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", role: "alert", children: [
|
|
18869
18908
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.failedTitle") }),
|
|
18870
18909
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-rooming-section__state-body", children: t("chrome.tripRooming.failedBody") }),
|
|
@@ -18872,7 +18911,7 @@ function RoomingFailed({ onRetry }) {
|
|
|
18872
18911
|
] });
|
|
18873
18912
|
}
|
|
18874
18913
|
function RoomingDark({ reason }) {
|
|
18875
|
-
const { t } =
|
|
18914
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18876
18915
|
if (reason === "mode") {
|
|
18877
18916
|
return null;
|
|
18878
18917
|
}
|
|
@@ -18887,7 +18926,7 @@ function RoomingDark({ reason }) {
|
|
|
18887
18926
|
] });
|
|
18888
18927
|
}
|
|
18889
18928
|
function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
18890
|
-
const { t } =
|
|
18929
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18891
18930
|
const [open, setOpen] = react.useState(false);
|
|
18892
18931
|
const rootRef = react.useRef(null);
|
|
18893
18932
|
const triggerRef = react.useRef(null);
|
|
@@ -18952,7 +18991,7 @@ function RoomKebab({ roomCode, onEdit, onDelete }) {
|
|
|
18952
18991
|
] });
|
|
18953
18992
|
}
|
|
18954
18993
|
function RoomCard({ room, drag, busy, onEdit, onDelete }) {
|
|
18955
|
-
const { t } =
|
|
18994
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
18956
18995
|
const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
|
|
18957
18996
|
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "kf-trip-rooming-section__room", "data-busy": busy ? "true" : void 0, children: [
|
|
18958
18997
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-rooming-section__room-head", children: [
|
|
@@ -19002,7 +19041,7 @@ function UnassignedStrip({
|
|
|
19002
19041
|
drag,
|
|
19003
19042
|
busy
|
|
19004
19043
|
}) {
|
|
19005
|
-
const { t } =
|
|
19044
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19006
19045
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19007
19046
|
"div",
|
|
19008
19047
|
{
|
|
@@ -19076,7 +19115,7 @@ function WindowAccordion({
|
|
|
19076
19115
|
onEditRoom,
|
|
19077
19116
|
onDeleteRoom
|
|
19078
19117
|
}) {
|
|
19079
|
-
const { t } =
|
|
19118
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19080
19119
|
const percent = fillPercent(group);
|
|
19081
19120
|
const bodyId = `kf-rooming-window-${group.window.id}`;
|
|
19082
19121
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -19226,7 +19265,7 @@ function WindowFormDialog({
|
|
|
19226
19265
|
onClose,
|
|
19227
19266
|
onSubmit
|
|
19228
19267
|
}) {
|
|
19229
|
-
const { t } =
|
|
19268
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19230
19269
|
const titleId = react.useId();
|
|
19231
19270
|
const isEdit = window !== null;
|
|
19232
19271
|
const [label, setLabel] = react.useState(window?.label ?? "");
|
|
@@ -19339,8 +19378,8 @@ function TripRoomingSection({
|
|
|
19339
19378
|
tripEndIso,
|
|
19340
19379
|
style
|
|
19341
19380
|
}) {
|
|
19342
|
-
const { t } =
|
|
19343
|
-
const rooming =
|
|
19381
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19382
|
+
const rooming = chunkAWOKWGTB_cjs.useRooming(tripRef);
|
|
19344
19383
|
const [openWindowId, setOpenWindowId] = react.useState(null);
|
|
19345
19384
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
19346
19385
|
const [pending, setPending] = react.useState(false);
|
|
@@ -19478,7 +19517,7 @@ function TripRoomingSection({
|
|
|
19478
19517
|
return /* @__PURE__ */ jsxRuntime.jsx(RoomingDark, { reason: rooming.reason });
|
|
19479
19518
|
}
|
|
19480
19519
|
const pool = ready?.unassignedPool;
|
|
19481
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style:
|
|
19520
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
19482
19521
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__toolbar", children: [
|
|
19483
19522
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-title", children: t("chrome.tripRooming.panelLabel") }),
|
|
19484
19523
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-spacer" }),
|
|
@@ -19712,7 +19751,7 @@ function isAgencyAuthored(vendor) {
|
|
|
19712
19751
|
return vendor.externalId.startsWith("kf-");
|
|
19713
19752
|
}
|
|
19714
19753
|
function CategoryTabs({ selected, counts, total, onSelect }) {
|
|
19715
|
-
const { t } =
|
|
19754
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19716
19755
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__chips", children: [
|
|
19717
19756
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19718
19757
|
"button",
|
|
@@ -19755,7 +19794,7 @@ function DeleteSupplierDialog({
|
|
|
19755
19794
|
onConfirm,
|
|
19756
19795
|
onClose
|
|
19757
19796
|
}) {
|
|
19758
|
-
const { t } =
|
|
19797
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19759
19798
|
const titleId = react.useId();
|
|
19760
19799
|
const blockers = deleteBlockers(usage);
|
|
19761
19800
|
const blockedLocally = blockers !== void 0 && blockers.vehicles + blockers.expenses > 0;
|
|
@@ -19908,7 +19947,7 @@ function SupplierFormDialog({
|
|
|
19908
19947
|
onClose,
|
|
19909
19948
|
onSubmit
|
|
19910
19949
|
}) {
|
|
19911
|
-
const { t } =
|
|
19950
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
19912
19951
|
const titleId = react.useId();
|
|
19913
19952
|
const isEdit = supplier !== null;
|
|
19914
19953
|
const [name, setName] = react.useState(supplier?.name ?? "");
|
|
@@ -20030,7 +20069,7 @@ function SuppliersSkeleton() {
|
|
|
20030
20069
|
] }, id)) });
|
|
20031
20070
|
}
|
|
20032
20071
|
function SuppliersEmpty({ onAdd }) {
|
|
20033
|
-
const { t } =
|
|
20072
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20034
20073
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20035
20074
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(StorefrontIcon, {}) }),
|
|
20036
20075
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.emptyTitle") }),
|
|
@@ -20039,7 +20078,7 @@ function SuppliersEmpty({ onAdd }) {
|
|
|
20039
20078
|
] });
|
|
20040
20079
|
}
|
|
20041
20080
|
function SuppliersNoMatch({ onClear }) {
|
|
20042
|
-
const { t } =
|
|
20081
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20043
20082
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
|
|
20044
20083
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.noMatchTitle") }),
|
|
20045
20084
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.noMatchBody") }),
|
|
@@ -20047,7 +20086,7 @@ function SuppliersNoMatch({ onClear }) {
|
|
|
20047
20086
|
] });
|
|
20048
20087
|
}
|
|
20049
20088
|
function SuppliersFailed({ onRetry }) {
|
|
20050
|
-
const { t } =
|
|
20089
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20051
20090
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", role: "alert", children: [
|
|
20052
20091
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.failedTitle") }),
|
|
20053
20092
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.failedBody") }),
|
|
@@ -20055,7 +20094,7 @@ function SuppliersFailed({ onRetry }) {
|
|
|
20055
20094
|
] });
|
|
20056
20095
|
}
|
|
20057
20096
|
function SuppliersDark({ reason }) {
|
|
20058
|
-
const { t } =
|
|
20097
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20059
20098
|
if (reason === "mode") {
|
|
20060
20099
|
return null;
|
|
20061
20100
|
}
|
|
@@ -20070,7 +20109,7 @@ function SuppliersDark({ reason }) {
|
|
|
20070
20109
|
] });
|
|
20071
20110
|
}
|
|
20072
20111
|
function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
20073
|
-
const { t } =
|
|
20112
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20074
20113
|
const [open, setOpen] = react.useState(false);
|
|
20075
20114
|
const rootRef = react.useRef(null);
|
|
20076
20115
|
const triggerRef = react.useRef(null);
|
|
@@ -20137,7 +20176,7 @@ function SupplierKebab({ name, busy, onEdit, onDelete }) {
|
|
|
20137
20176
|
] });
|
|
20138
20177
|
}
|
|
20139
20178
|
function SupplierUsageCell({ usage }) {
|
|
20140
|
-
const { t } =
|
|
20179
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20141
20180
|
const parts = [];
|
|
20142
20181
|
if (usage.vehicles !== void 0 && usage.vehicles > 0) {
|
|
20143
20182
|
parts.push(
|
|
@@ -20181,7 +20220,7 @@ function SupplierTable({
|
|
|
20181
20220
|
onEdit,
|
|
20182
20221
|
onDelete
|
|
20183
20222
|
}) {
|
|
20184
|
-
const { t } =
|
|
20223
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20185
20224
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-suppliers-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-suppliers-section__table", children: [
|
|
20186
20225
|
/* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripSuppliers.tableCaption") }),
|
|
20187
20226
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
@@ -20249,11 +20288,11 @@ function serverBlockOf(error) {
|
|
|
20249
20288
|
return { vehicles: details.vehicleCount ?? 0, expenses: details.expenseCount ?? 0 };
|
|
20250
20289
|
}
|
|
20251
20290
|
function TripSuppliersSection({ tripRef, style }) {
|
|
20252
|
-
const { t } =
|
|
20253
|
-
const vendors =
|
|
20254
|
-
const seating =
|
|
20255
|
-
const itinerary =
|
|
20256
|
-
const expenses =
|
|
20291
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20292
|
+
const vendors = chunkAWOKWGTB_cjs.useVendors(tripRef, "");
|
|
20293
|
+
const seating = chunkAWOKWGTB_cjs.useSeating(tripRef);
|
|
20294
|
+
const itinerary = chunkAWOKWGTB_cjs.useItinerary(tripRef);
|
|
20295
|
+
const expenses = chunkAWOKWGTB_cjs.useExpenses(tripRef);
|
|
20257
20296
|
const [category, setCategory] = react.useState(null);
|
|
20258
20297
|
const [query, setQuery] = react.useState("");
|
|
20259
20298
|
const [sortKey, setSortKey] = react.useState("name");
|
|
@@ -20336,7 +20375,7 @@ function TripSuppliersSection({ tripRef, style }) {
|
|
|
20336
20375
|
return /* @__PURE__ */ jsxRuntime.jsx(SuppliersDark, { reason: vendors.reason });
|
|
20337
20376
|
}
|
|
20338
20377
|
const filtered = category !== null || query.trim() !== "";
|
|
20339
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style:
|
|
20378
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
20340
20379
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__toolbar", children: [
|
|
20341
20380
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-title", children: t("chrome.tripSuppliers.panelLabel") }),
|
|
20342
20381
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-spacer" }),
|
|
@@ -20475,7 +20514,7 @@ function AutoAssignDialog2({
|
|
|
20475
20514
|
onApply,
|
|
20476
20515
|
onClose
|
|
20477
20516
|
}) {
|
|
20478
|
-
const { t } =
|
|
20517
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20479
20518
|
const titleId = react.useId();
|
|
20480
20519
|
const [reassignAll, setReassignAll] = react.useState(false);
|
|
20481
20520
|
const [genderAdjacency, setGenderAdjacency] = react.useState("AVOID_UNRELATED");
|
|
@@ -20637,7 +20676,7 @@ function DayFilter({
|
|
|
20637
20676
|
countByDay,
|
|
20638
20677
|
onSelect
|
|
20639
20678
|
}) {
|
|
20640
|
-
const { t } =
|
|
20679
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20641
20680
|
const days = Array.from({ length: durationDays }, (_unused, index) => index);
|
|
20642
20681
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__days", children: [
|
|
20643
20682
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__days-label", children: t("chrome.tripVehicles.showDay") }),
|
|
@@ -20770,7 +20809,7 @@ function DeleteVehicleDialog({
|
|
|
20770
20809
|
onConfirm,
|
|
20771
20810
|
onClose
|
|
20772
20811
|
}) {
|
|
20773
|
-
const { t } =
|
|
20812
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20774
20813
|
const titleId = react.useId();
|
|
20775
20814
|
const released = occupantsOf(vehicle).length;
|
|
20776
20815
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -20947,7 +20986,7 @@ function ManagerLinkDialog({
|
|
|
20947
20986
|
onClose,
|
|
20948
20987
|
onSubmit
|
|
20949
20988
|
}) {
|
|
20950
|
-
const { t } =
|
|
20989
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
20951
20990
|
const titleId = react.useId();
|
|
20952
20991
|
const [chosen, setChosen] = react.useState(null);
|
|
20953
20992
|
const demotedFrom = chosen === null ? void 0 : managerVehicleByRef.get(chosen);
|
|
@@ -21024,7 +21063,7 @@ function UnassignedStrip2({
|
|
|
21024
21063
|
drag,
|
|
21025
21064
|
busy
|
|
21026
21065
|
}) {
|
|
21027
|
-
const { t } =
|
|
21066
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21028
21067
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
21029
21068
|
"div",
|
|
21030
21069
|
{
|
|
@@ -21091,7 +21130,7 @@ function OccupantRoster({
|
|
|
21091
21130
|
variant,
|
|
21092
21131
|
emptyKey
|
|
21093
21132
|
}) {
|
|
21094
|
-
const { t } =
|
|
21133
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21095
21134
|
const target = { containerId: vehicleId, slotLabel: "" };
|
|
21096
21135
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === vehicleId && drag.overSlot.slotLabel === "";
|
|
21097
21136
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -21135,7 +21174,7 @@ function OccupantRoster({
|
|
|
21135
21174
|
);
|
|
21136
21175
|
}
|
|
21137
21176
|
function SeatTile({ seat, vehicleId, drag, busy }) {
|
|
21138
|
-
const { t } =
|
|
21177
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21139
21178
|
const target = { containerId: vehicleId, slotLabel: seat.seatLabel };
|
|
21140
21179
|
const isOver = drag.overSlot !== null && drag.overSlot.containerId === target.containerId && drag.overSlot.slotLabel === target.slotLabel;
|
|
21141
21180
|
const occupant = seat.occupant;
|
|
@@ -21198,7 +21237,7 @@ function VehicleKebab({
|
|
|
21198
21237
|
onUnlinkManager,
|
|
21199
21238
|
onDelete
|
|
21200
21239
|
}) {
|
|
21201
|
-
const { t } =
|
|
21240
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21202
21241
|
const [open, setOpen] = react.useState(false);
|
|
21203
21242
|
const rootRef = react.useRef(null);
|
|
21204
21243
|
const triggerRef = react.useRef(null);
|
|
@@ -21308,7 +21347,7 @@ function VehicleCard({
|
|
|
21308
21347
|
onUnlinkManager,
|
|
21309
21348
|
onDelete
|
|
21310
21349
|
}) {
|
|
21311
|
-
const { t } =
|
|
21350
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21312
21351
|
const percent = fillPercent2(vehicle);
|
|
21313
21352
|
const days = daysLabel(vehicle.days);
|
|
21314
21353
|
const bodyId = `kf-vehicle-${vehicle.id}`;
|
|
@@ -21443,7 +21482,7 @@ function VehicleDaysDialog({
|
|
|
21443
21482
|
onClose,
|
|
21444
21483
|
onSubmit
|
|
21445
21484
|
}) {
|
|
21446
|
-
const { t } =
|
|
21485
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21447
21486
|
const titleId = react.useId();
|
|
21448
21487
|
const [selected, setSelected] = react.useState(vehicle.days);
|
|
21449
21488
|
const wholeTrip = selected.length === 0;
|
|
@@ -21542,7 +21581,7 @@ function VehicleFormDialog({
|
|
|
21542
21581
|
onClose,
|
|
21543
21582
|
onSubmit
|
|
21544
21583
|
}) {
|
|
21545
|
-
const { t } =
|
|
21584
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21546
21585
|
const titleId = react.useId();
|
|
21547
21586
|
const isEdit = vehicle !== null;
|
|
21548
21587
|
const [regNo, setRegNo] = react.useState(vehicle?.regNo ?? "");
|
|
@@ -21737,7 +21776,7 @@ function VehiclesSkeleton() {
|
|
|
21737
21776
|
] }, id)) });
|
|
21738
21777
|
}
|
|
21739
21778
|
function VehiclesEmpty({ onAddVehicle }) {
|
|
21740
|
-
const { t } =
|
|
21779
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21741
21780
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", children: [
|
|
21742
21781
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon2, {}) }),
|
|
21743
21782
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.emptyTitle") }),
|
|
@@ -21746,7 +21785,7 @@ function VehiclesEmpty({ onAddVehicle }) {
|
|
|
21746
21785
|
] });
|
|
21747
21786
|
}
|
|
21748
21787
|
function VehiclesFailed({ onRetry }) {
|
|
21749
|
-
const { t } =
|
|
21788
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21750
21789
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", role: "alert", children: [
|
|
21751
21790
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.failedTitle") }),
|
|
21752
21791
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-vehicles-section__state-body", children: t("chrome.tripVehicles.failedBody") }),
|
|
@@ -21754,7 +21793,7 @@ function VehiclesFailed({ onRetry }) {
|
|
|
21754
21793
|
] });
|
|
21755
21794
|
}
|
|
21756
21795
|
function VehiclesDark({ reason }) {
|
|
21757
|
-
const { t } =
|
|
21796
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21758
21797
|
if (reason === "mode") {
|
|
21759
21798
|
return null;
|
|
21760
21799
|
}
|
|
@@ -21777,9 +21816,9 @@ function TripVehiclesSection({
|
|
|
21777
21816
|
durationDays,
|
|
21778
21817
|
style
|
|
21779
21818
|
}) {
|
|
21780
|
-
const { t } =
|
|
21781
|
-
const seating =
|
|
21782
|
-
const managers =
|
|
21819
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
21820
|
+
const seating = chunkAWOKWGTB_cjs.useSeating(tripRef);
|
|
21821
|
+
const managers = chunkAWOKWGTB_cjs.useManagers(tripRef);
|
|
21783
21822
|
const [openVehicleId, setOpenVehicleId] = react.useState(null);
|
|
21784
21823
|
const [day, setDay] = react.useState(null);
|
|
21785
21824
|
const [overlay, setOverlay] = react.useState({ kind: "none" });
|
|
@@ -21913,7 +21952,7 @@ function TripVehiclesSection({
|
|
|
21913
21952
|
return /* @__PURE__ */ jsxRuntime.jsx(VehiclesDark, { reason: seating.reason });
|
|
21914
21953
|
}
|
|
21915
21954
|
const pool = ready?.unassignedPool;
|
|
21916
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style:
|
|
21955
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
21917
21956
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__toolbar", children: [
|
|
21918
21957
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-title", children: t("chrome.tripVehicles.panelLabel") }),
|
|
21919
21958
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-spacer" }),
|
|
@@ -22206,7 +22245,7 @@ function WarningIcon13(props) {
|
|
|
22206
22245
|
|
|
22207
22246
|
// src/admin/composite/office/TripWorkspace/internal/panels/deriveCloseout.ts
|
|
22208
22247
|
function tabForBlocker(row) {
|
|
22209
|
-
return
|
|
22248
|
+
return chunk77RKNRNH_cjs.resolveBlockerDeepLink({ actionKey: row.actionKey })?.tab;
|
|
22210
22249
|
}
|
|
22211
22250
|
function orderedBlockers(rows) {
|
|
22212
22251
|
return [...rows].sort((a, b) => {
|
|
@@ -22246,8 +22285,8 @@ function codeOf11(error) {
|
|
|
22246
22285
|
return classification?.code ?? "unknown";
|
|
22247
22286
|
}
|
|
22248
22287
|
function CloseoutCard({ tripRef, onOpenTab, litTabs }) {
|
|
22249
|
-
const { t } =
|
|
22250
|
-
const closeout =
|
|
22288
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
22289
|
+
const closeout = chunkAWOKWGTB_cjs.useCloseout(tripRef);
|
|
22251
22290
|
const [note, setNote] = react.useState(null);
|
|
22252
22291
|
const [pending, setPending] = react.useState(void 0);
|
|
22253
22292
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
@@ -22454,7 +22493,7 @@ function AssignManagerDialog({
|
|
|
22454
22493
|
onClose,
|
|
22455
22494
|
onAssign
|
|
22456
22495
|
}) {
|
|
22457
|
-
const { t } =
|
|
22496
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
22458
22497
|
const titleId = react.useId();
|
|
22459
22498
|
const [query, setQuery] = react.useState("");
|
|
22460
22499
|
const [selected, setSelected] = react.useState(null);
|
|
@@ -22586,8 +22625,8 @@ var ROLE_LABEL_KEY = {
|
|
|
22586
22625
|
COORDINATOR: "chrome.tripWorkspace.managers.roleCoordinator"
|
|
22587
22626
|
};
|
|
22588
22627
|
function OverviewManagersCard({ trip, onChanged }) {
|
|
22589
|
-
const { t } =
|
|
22590
|
-
const { promoteManager, assignManager, unassignManager, makeManagersFetch } =
|
|
22628
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
22629
|
+
const { promoteManager, assignManager, unassignManager, makeManagersFetch } = chunk77RKNRNH_cjs.useDirectories();
|
|
22591
22630
|
const [pendingId, setPendingId] = react.useState(void 0);
|
|
22592
22631
|
const [errorCode, setErrorCode] = react.useState(void 0);
|
|
22593
22632
|
const [assignOpen, setAssignOpen] = react.useState(false);
|
|
@@ -22748,13 +22787,13 @@ function TripOverviewPanel({
|
|
|
22748
22787
|
onOpenTab,
|
|
22749
22788
|
onTripChanged
|
|
22750
22789
|
}) {
|
|
22751
|
-
const { t } =
|
|
22752
|
-
const today =
|
|
22753
|
-
const expenses =
|
|
22790
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
22791
|
+
const today = chunkAWOKWGTB_cjs.useManagerToday(trip.ref);
|
|
22792
|
+
const expenses = chunkAWOKWGTB_cjs.useExpenses(trip.ref);
|
|
22754
22793
|
const spendTotalMinor = expenses.status === "ready" && expenses.totals.loaded && !expenses.totals.lastFetchFailed ? expenses.totals.spendTotalMinor : void 0;
|
|
22755
22794
|
const finance = deriveFinance(trip, spendTotalMinor);
|
|
22756
22795
|
const quickActions = QUICK_ACTION_TABS.filter((key) => litTabs.has(key));
|
|
22757
|
-
const closeoutProbe =
|
|
22796
|
+
const closeoutProbe = chunkAWOKWGTB_cjs.useCloseout(trip.ref);
|
|
22758
22797
|
const closeoutStage = closeoutProbe.status === "ready" && hasReturned(closeoutProbe.aggregate) ? closeoutProbe.aggregate?.stage ?? null : null;
|
|
22759
22798
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview", children: [
|
|
22760
22799
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview-main", children: [
|
|
@@ -22793,7 +22832,7 @@ function TripOverviewPanel({
|
|
|
22793
22832
|
function TodayCard({
|
|
22794
22833
|
today
|
|
22795
22834
|
}) {
|
|
22796
|
-
const { t } =
|
|
22835
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
22797
22836
|
if (today.kind === "idle") return null;
|
|
22798
22837
|
const openChecklist = today.checklist ?? [];
|
|
22799
22838
|
const itinerary = today.itinerary ?? [];
|
|
@@ -22817,7 +22856,7 @@ function TodayCard({
|
|
|
22817
22856
|
function FinanceCard({
|
|
22818
22857
|
finance
|
|
22819
22858
|
}) {
|
|
22820
|
-
const { t } =
|
|
22859
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
22821
22860
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-workspace__card", children: [
|
|
22822
22861
|
/* @__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") }) }),
|
|
22823
22862
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__finance-body", children: [
|
|
@@ -23080,7 +23119,7 @@ var BLOCKER_BODY_KEY = {
|
|
|
23080
23119
|
capabilityDark: "chrome.tripWorkspace.blocker.capabilityDarkBody"
|
|
23081
23120
|
};
|
|
23082
23121
|
function TripTabPlaceholder({ tabKey, blocker }) {
|
|
23083
|
-
const { t } =
|
|
23122
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
23084
23123
|
const label = t(TAB_LABEL_KEY[tabKey]);
|
|
23085
23124
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__placeholder", children: [
|
|
23086
23125
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-workspace__placeholder-glyph", children: blocker === "deferred" ? /* @__PURE__ */ jsxRuntime.jsx(ClockIcon2, {}) : /* @__PURE__ */ jsxRuntime.jsx(LockIcon11, {}) }),
|
|
@@ -23090,7 +23129,7 @@ function TripTabPlaceholder({ tabKey, blocker }) {
|
|
|
23090
23129
|
] });
|
|
23091
23130
|
}
|
|
23092
23131
|
function TripKpiStrip({ cells }) {
|
|
23093
|
-
const { t } =
|
|
23132
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
23094
23133
|
if (cells.length === 0) return null;
|
|
23095
23134
|
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: [
|
|
23096
23135
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-label", children: t(cell.labelKey) }),
|
|
@@ -23099,7 +23138,7 @@ function TripKpiStrip({ cells }) {
|
|
|
23099
23138
|
] }, cell.key)) });
|
|
23100
23139
|
}
|
|
23101
23140
|
function TripTabRail({ tabs, activeKey, onSelect }) {
|
|
23102
|
-
const { t } =
|
|
23141
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
23103
23142
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23104
23143
|
"div",
|
|
23105
23144
|
{
|
|
@@ -23133,7 +23172,7 @@ var STATUS_LABEL_KEY9 = {
|
|
|
23133
23172
|
CANCELLED: "chrome.tripDirectory.status.cancelled"
|
|
23134
23173
|
};
|
|
23135
23174
|
function TripWorkspaceHead({ trip, onBack, style }) {
|
|
23136
|
-
const { t } =
|
|
23175
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
23137
23176
|
const head = deriveTripHead(trip);
|
|
23138
23177
|
const subLabelParts = [
|
|
23139
23178
|
head.dateRangeLabel,
|
|
@@ -23144,7 +23183,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
|
|
|
23144
23183
|
trip.manifestCount === 1 ? "chrome.tripWorkspace.travellerCountOne" : "chrome.tripWorkspace.travellerCount"
|
|
23145
23184
|
).replace("{count}", String(trip.manifestCount))
|
|
23146
23185
|
];
|
|
23147
|
-
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style:
|
|
23186
|
+
return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__head-identity", children: [
|
|
23148
23187
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__eyebrow", children: [
|
|
23149
23188
|
onBack === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
23150
23189
|
"button",
|
|
@@ -23184,10 +23223,10 @@ function TripWorkspace({
|
|
|
23184
23223
|
components,
|
|
23185
23224
|
style
|
|
23186
23225
|
}) {
|
|
23187
|
-
const { t } =
|
|
23188
|
-
const { read, readFailed, refresh } =
|
|
23226
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
23227
|
+
const { read, readFailed, refresh } = chunk77RKNRNH_cjs.useAgencyTrip(tripRef);
|
|
23189
23228
|
if (readFailed) {
|
|
23190
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style:
|
|
23229
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__status-block", role: "alert", children: [
|
|
23191
23230
|
/* @__PURE__ */ jsxRuntime.jsx(WarningIcon13, { className: "kf-trip-workspace__status-icon" }),
|
|
23192
23231
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-title", children: t("chrome.tripWorkspace.errorTitle") }),
|
|
23193
23232
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-body", children: t("chrome.tripWorkspace.errorBody") }),
|
|
@@ -23203,7 +23242,7 @@ function TripWorkspace({
|
|
|
23203
23242
|
] }) });
|
|
23204
23243
|
}
|
|
23205
23244
|
if (read === void 0) {
|
|
23206
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style:
|
|
23245
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {}) });
|
|
23207
23246
|
}
|
|
23208
23247
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
23209
23248
|
TripWorkspaceBody,
|
|
@@ -23231,7 +23270,7 @@ function TripWorkspaceBody({
|
|
|
23231
23270
|
components,
|
|
23232
23271
|
style
|
|
23233
23272
|
}) {
|
|
23234
|
-
const { statuses, loaded } =
|
|
23273
|
+
const { statuses, loaded } = chunk77RKNRNH_cjs.useCapabilityStatuses(tripRef);
|
|
23235
23274
|
const Head = components?.TripWorkspaceHead ?? TripWorkspaceHead;
|
|
23236
23275
|
const tabs = react.useMemo(() => resolveTripTabs(trip.eventType, statuses), [trip.eventType, statuses]);
|
|
23237
23276
|
const [requestedTab, setRequestedTab] = react.useState(initialTab ?? "overview");
|
|
@@ -23315,7 +23354,7 @@ function TripWorkspaceBody({
|
|
|
23315
23354
|
}),
|
|
23316
23355
|
[trip, litTabs, tripRef, onTripChanged, onOpenTravellerProfile]
|
|
23317
23356
|
);
|
|
23318
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style:
|
|
23357
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
23319
23358
|
/* @__PURE__ */ jsxRuntime.jsx(Head, { trip, ...onBack !== void 0 ? { onBack } : {} }),
|
|
23320
23359
|
/* @__PURE__ */ jsxRuntime.jsx(TripKpiStrip, { cells: kpis }),
|
|
23321
23360
|
loaded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -23512,7 +23551,7 @@ function AdminShell({
|
|
|
23512
23551
|
function renderNavIcon(iconKey) {
|
|
23513
23552
|
return NavIcon !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavIcon, { iconKey }) : navIcon(iconKey);
|
|
23514
23553
|
}
|
|
23515
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style:
|
|
23554
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style: chunk4QMYUKW4_cjs.tokenStyle(style), children: [
|
|
23516
23555
|
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "kf-admin-shell__sidebar", children: [
|
|
23517
23556
|
brand !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell__brand", children: [
|
|
23518
23557
|
brand.logo !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shell__brand-logo", children: brand.logo }) : null,
|
|
@@ -23616,7 +23655,7 @@ function AdminShell({
|
|
|
23616
23655
|
] });
|
|
23617
23656
|
}
|
|
23618
23657
|
function KaafilAgencyWorkspace(props) {
|
|
23619
|
-
const session =
|
|
23658
|
+
const session = chunk4QMYUKW4_cjs.useSession();
|
|
23620
23659
|
if (session.status !== "authenticated") {
|
|
23621
23660
|
return null;
|
|
23622
23661
|
}
|
|
@@ -23641,8 +23680,8 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
23641
23680
|
components,
|
|
23642
23681
|
style
|
|
23643
23682
|
} = props;
|
|
23644
|
-
const { t } =
|
|
23645
|
-
const agencyAdminMe =
|
|
23683
|
+
const { t } = chunk4QMYUKW4_cjs.useKaafilChrome();
|
|
23684
|
+
const agencyAdminMe = chunk77RKNRNH_cjs.useAgencyAdminMe();
|
|
23646
23685
|
const [internalPane, setInternalPane] = react.useState(
|
|
23647
23686
|
initialPane ?? "trips"
|
|
23648
23687
|
);
|
|
@@ -23903,27 +23942,27 @@ function ReadyKaafilAgencyWorkspace(props) {
|
|
|
23903
23942
|
|
|
23904
23943
|
Object.defineProperty(exports, "BootErrorScreen", {
|
|
23905
23944
|
enumerable: true,
|
|
23906
|
-
get: function () { return
|
|
23945
|
+
get: function () { return chunkXPCCR7OH_cjs.BootErrorScreen; }
|
|
23907
23946
|
});
|
|
23908
23947
|
Object.defineProperty(exports, "LockedTripScreen", {
|
|
23909
23948
|
enumerable: true,
|
|
23910
|
-
get: function () { return
|
|
23949
|
+
get: function () { return chunkXPCCR7OH_cjs.LockedTripScreen; }
|
|
23911
23950
|
});
|
|
23912
23951
|
Object.defineProperty(exports, "NotFoundScreen", {
|
|
23913
23952
|
enumerable: true,
|
|
23914
|
-
get: function () { return
|
|
23953
|
+
get: function () { return chunkXPCCR7OH_cjs.NotFoundScreen; }
|
|
23915
23954
|
});
|
|
23916
23955
|
Object.defineProperty(exports, "OfflineFallbackScreen", {
|
|
23917
23956
|
enumerable: true,
|
|
23918
|
-
get: function () { return
|
|
23957
|
+
get: function () { return chunkXPCCR7OH_cjs.OfflineFallbackScreen; }
|
|
23919
23958
|
});
|
|
23920
23959
|
Object.defineProperty(exports, "PlanLockedScreen", {
|
|
23921
23960
|
enumerable: true,
|
|
23922
|
-
get: function () { return
|
|
23961
|
+
get: function () { return chunkXPCCR7OH_cjs.PlanLockedScreen; }
|
|
23923
23962
|
});
|
|
23924
23963
|
Object.defineProperty(exports, "SessionExpiredScreen", {
|
|
23925
23964
|
enumerable: true,
|
|
23926
|
-
get: function () { return
|
|
23965
|
+
get: function () { return chunkXPCCR7OH_cjs.SessionExpiredScreen; }
|
|
23927
23966
|
});
|
|
23928
23967
|
exports.AdminShell = AdminShell;
|
|
23929
23968
|
exports.AgencySettingsScreen = AgencySettingsScreen;
|