kaafil-react-uikit 0.11.5 → 0.11.7

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXWU5MCY3_cjs = require('../chunk-XWU5MCY3.cjs');
4
- var chunkUSKVWPJD_cjs = require('../chunk-USKVWPJD.cjs');
4
+ var chunkARXY3ZA7_cjs = require('../chunk-ARXY3ZA7.cjs');
5
5
  var chunkYKBA4WQJ_cjs = require('../chunk-YKBA4WQJ.cjs');
6
6
  var chunkT5JYKERY_cjs = require('../chunk-T5JYKERY.cjs');
7
7
  var chunk5ORJRFXZ_cjs = require('../chunk-5ORJRFXZ.cjs');
@@ -800,8 +800,8 @@ function ReadyManagerChecklistSection({
800
800
  style
801
801
  }) {
802
802
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
803
- const checklist = chunkUSKVWPJD_cjs.useChecklists(tripRef);
804
- const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
803
+ const checklist = chunkARXY3ZA7_cjs.useChecklists(tripRef);
804
+ const managers = chunkARXY3ZA7_cjs.useManagers(tripRef);
805
805
  const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
806
806
  const ProgressCardUI = components?.ProgressCard ?? ProgressCard;
807
807
  const SectionCardUI = components?.SectionCard ?? SectionCard;
@@ -1367,7 +1367,7 @@ function ReadyManagerCloseoutSection({
1367
1367
  style
1368
1368
  }) {
1369
1369
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
1370
- const closeout = chunkUSKVWPJD_cjs.useCloseout(tripRef);
1370
+ const closeout = chunkARXY3ZA7_cjs.useCloseout(tripRef);
1371
1371
  const BlockerRowUI = components?.BlockerRow ?? BlockerRow;
1372
1372
  const [lockSheetOpen, setLockSheetOpen] = react.useState(false);
1373
1373
  const [lockPending, setLockPending] = react.useState(false);
@@ -1829,7 +1829,7 @@ function ManagerDocumentsSection(props) {
1829
1829
  }
1830
1830
  function ReadyManagerDocumentsSection({ tripRef, style }) {
1831
1831
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
1832
- const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
1832
+ const files = chunkARXY3ZA7_cjs.useFiles({ tripRef });
1833
1833
  const [state, setState] = react.useState({ status: "loading" });
1834
1834
  const [viewerFile, setViewerFile] = react.useState(void 0);
1835
1835
  react.useEffect(() => {
@@ -2025,7 +2025,7 @@ function ReadyManagerFloatLedgerSection({
2025
2025
  style
2026
2026
  }) {
2027
2027
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
2028
- const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
2028
+ const float = chunkARXY3ZA7_cjs.useFloat(tripRef);
2029
2029
  if (float.status === "loading") {
2030
2030
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-float-ledger__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
2031
2031
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-float-ledger__skeleton-block" }),
@@ -2577,7 +2577,7 @@ fieldRegistry.register("MULTISELECT", {
2577
2577
  },
2578
2578
  preview: ({ value }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-preview", children: Array.isArray(value) ? value.join(", ") : "" })
2579
2579
  });
2580
- fieldRegistry.register(chunkUSKVWPJD_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN, {
2580
+ fieldRegistry.register(chunkARXY3ZA7_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN, {
2581
2581
  editor: ({ field, value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(ToggleSwitch, { checked: value === true, label: field.label, onChange }),
2582
2582
  preview: ({ value, t }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-forms__field-preview", children: value === true ? t("chrome.managerTrip.forms.field.yes") : t("chrome.managerTrip.forms.field.no") })
2583
2583
  });
@@ -2649,7 +2649,7 @@ function FormFillRenderer({
2649
2649
  (fieldsBySection.get(section.id) ?? []).map((field) => {
2650
2650
  const handler = fieldRegistry.resolve(field.kind);
2651
2651
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-forms__fill-field", children: [
2652
- field.kind !== "HEADING" && field.kind !== "INFO_BLOCK" && field.kind !== chunkUSKVWPJD_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN && field.kind !== "CONSENT" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-manager-forms__fill-field-label", htmlFor: field.id, children: [
2652
+ field.kind !== "HEADING" && field.kind !== "INFO_BLOCK" && field.kind !== chunkARXY3ZA7_cjs.FORM_FIELD_KIND_SINGLE_BOOLEAN && field.kind !== "CONSENT" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "kf-manager-forms__fill-field-label", htmlFor: field.id, children: [
2653
2653
  field.label,
2654
2654
  field.required ? " *" : ""
2655
2655
  ] }) : null,
@@ -2957,9 +2957,9 @@ function ReadyManagerFormsSection({
2957
2957
  style
2958
2958
  }) {
2959
2959
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
2960
- const forms = chunkUSKVWPJD_cjs.useForms(tripRef);
2960
+ const forms = chunkARXY3ZA7_cjs.useForms(tripRef);
2961
2961
  const conflicts = chunkXWU5MCY3_cjs.useConflicts(tripRef);
2962
- const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
2962
+ const parties = chunkARXY3ZA7_cjs.useParties(tripRef);
2963
2963
  const TripFormsPanelUI = components?.TripFormsPanel ?? TripFormsPanel;
2964
2964
  const FormFillRendererUI = components?.FormFillRenderer ?? FormFillRenderer;
2965
2965
  const [travellerRows, setTravellerRows] = react.useState([]);
@@ -3953,8 +3953,8 @@ function ReadyManagerItinerarySection({
3953
3953
  style
3954
3954
  }) {
3955
3955
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
3956
- const itinerary = chunkUSKVWPJD_cjs.useItinerary(tripRef);
3957
- const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
3956
+ const itinerary = chunkARXY3ZA7_cjs.useItinerary(tripRef);
3957
+ const vendors = chunkARXY3ZA7_cjs.useVendors(tripRef, "");
3958
3958
  const DayStripComponent = components?.DayStrip ?? DayStrip;
3959
3959
  const ItemCardComponent = components?.ItemCard ?? ItemCard;
3960
3960
  const [selectedDayIndex, setSelectedDayIndex] = react.useState(void 0);
@@ -4614,7 +4614,7 @@ function ReadyManagerManifestSection({
4614
4614
  const Stats = components?.Stats ?? TripManifestStats;
4615
4615
  const BookingGroupCard = components?.BookingGroupCard ?? TripBookingGroupCard;
4616
4616
  const TravellerRow = components?.TravellerRow ?? TripTravellerRow;
4617
- const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
4617
+ const parties = chunkARXY3ZA7_cjs.useParties(tripRef);
4618
4618
  const [query, setQuery] = react.useState("");
4619
4619
  const [filters, setFilters] = react.useState(EMPTY_MANIFEST_FILTERS);
4620
4620
  const [filterSheetOpen, setFilterSheetOpen] = react.useState(false);
@@ -5197,7 +5197,7 @@ function LogExpenseSheet({
5197
5197
  onClose
5198
5198
  }) {
5199
5199
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
5200
- const files = chunkUSKVWPJD_cjs.useFiles({ tripRef });
5200
+ const files = chunkARXY3ZA7_cjs.useFiles({ tripRef });
5201
5201
  const receiptInputId = react.useId();
5202
5202
  const [amount, setAmount] = react.useState("");
5203
5203
  const [category, setCategory] = react.useState("MISC");
@@ -6002,10 +6002,10 @@ function ReadyManagerMoneySection({
6002
6002
  style
6003
6003
  }) {
6004
6004
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
6005
- const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
6006
- const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
6007
- const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
6008
- const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
6005
+ const float = chunkARXY3ZA7_cjs.useFloat(tripRef);
6006
+ const expenses = chunkARXY3ZA7_cjs.useExpenses(tripRef);
6007
+ const collections = chunkARXY3ZA7_cjs.useCollections(tripRef);
6008
+ const parties = chunkARXY3ZA7_cjs.useParties(tripRef);
6009
6009
  const StatsComponent = components?.Stats ?? MoneyStats;
6010
6010
  const RecentExpensesComponent = components?.RecentExpenses ?? RecentExpensesSection;
6011
6011
  const BalancesDueComponent = components?.BalancesDue ?? BalancesDueSection;
@@ -6851,13 +6851,13 @@ function ReadyManagerNowSection({
6851
6851
  const [sheetOpen, setSheetOpen] = react.useState(false);
6852
6852
  const [activeMoneySheet, setActiveMoneySheet] = react.useState(void 0);
6853
6853
  const managerMe = chunkXWU5MCY3_cjs.useManagerMe();
6854
- const today = chunkUSKVWPJD_cjs.useManagerToday(tripRef);
6855
- const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
6856
- const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
6857
- const float = chunkUSKVWPJD_cjs.useFloat(tripRef);
6858
- const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
6859
- const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
6860
- const closeout = chunkUSKVWPJD_cjs.useCloseout(tripRef);
6854
+ const today = chunkARXY3ZA7_cjs.useManagerToday(tripRef);
6855
+ const expenses = chunkARXY3ZA7_cjs.useExpenses(tripRef);
6856
+ const collections = chunkARXY3ZA7_cjs.useCollections(tripRef);
6857
+ const float = chunkARXY3ZA7_cjs.useFloat(tripRef);
6858
+ const parties = chunkARXY3ZA7_cjs.useParties(tripRef);
6859
+ const managers = chunkARXY3ZA7_cjs.useManagers(tripRef);
6860
+ const closeout = chunkARXY3ZA7_cjs.useCloseout(tripRef);
6861
6861
  if (today.status === "loading" || managerMe.status === "loading") {
6862
6862
  return /* @__PURE__ */ jsxRuntime.jsx(ManagerNowSkeleton, { style });
6863
6863
  }
@@ -7314,8 +7314,8 @@ function ManagerOverviewSection(props) {
7314
7314
  }
7315
7315
  function ReadyManagerOverviewSection({ tripRef, style }) {
7316
7316
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
7317
- const today = chunkUSKVWPJD_cjs.useManagerToday(tripRef);
7318
- const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
7317
+ const today = chunkARXY3ZA7_cjs.useManagerToday(tripRef);
7318
+ const managers = chunkARXY3ZA7_cjs.useManagers(tripRef);
7319
7319
  if (today.status === "loading") {
7320
7320
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-overview__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
7321
7321
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-overview__skeleton-line" }),
@@ -7349,8 +7349,8 @@ function CheckIcon5(props) {
7349
7349
  return /* @__PURE__ */ jsxRuntime.jsx(
7350
7350
  "svg",
7351
7351
  {
7352
- width: "16",
7353
- height: "16",
7352
+ width: "20",
7353
+ height: "20",
7354
7354
  viewBox: "0 0 24 24",
7355
7355
  fill: "none",
7356
7356
  stroke: "currentColor",
@@ -8003,7 +8003,7 @@ function ReadyManagerPickupsSection({
8003
8003
  components,
8004
8004
  style
8005
8005
  }) {
8006
- const pickups = chunkUSKVWPJD_cjs.usePickups(tripRef);
8006
+ const pickups = chunkARXY3ZA7_cjs.usePickups(tripRef);
8007
8007
  const StopListUI = components?.StopList ?? StopList;
8008
8008
  const BoardingViewUI = components?.BoardingView ?? BoardingView;
8009
8009
  const [kind, setKind] = react.useState("PICKUP");
@@ -8027,6 +8027,13 @@ function ReadyManagerPickupsSection({
8027
8027
  cancelled = true;
8028
8028
  };
8029
8029
  }, [ready, selectedStopId, kind]);
8030
+ chunk5ORJRFXZ_cjs.useOfflineEvent("sync.drained", () => {
8031
+ if (pickups.status !== "ready" || selectedStopId === void 0) {
8032
+ return;
8033
+ }
8034
+ void pickups.manifestByPickup({ kind }).then(setManifest);
8035
+ void pickups.refreshLive();
8036
+ });
8030
8037
  if (pickups.status === "loading") {
8031
8038
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-pickups__skeleton", style: chunk5ORJRFXZ_cjs.tokenStyle(style), children: [
8032
8039
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-pickups__skeleton-line" }),
@@ -9209,7 +9216,7 @@ function ReadyManagerRoomingSection({
9209
9216
  style
9210
9217
  }) {
9211
9218
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
9212
- const rooming = chunkUSKVWPJD_cjs.useRooming(tripRef);
9219
+ const rooming = chunkARXY3ZA7_cjs.useRooming(tripRef);
9213
9220
  const Stats = components?.Stats ?? RoomingStats;
9214
9221
  const RoomCardComponent = components?.RoomCard ?? RoomCard;
9215
9222
  const UnassignedPool = components?.UnassignedPool ?? UnassignedPoolSection;
@@ -9564,7 +9571,7 @@ function ReadyManagerRosterSection({
9564
9571
  style
9565
9572
  }) {
9566
9573
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
9567
- const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
9574
+ const parties = chunkARXY3ZA7_cjs.useParties(tripRef);
9568
9575
  const [query, setQuery] = react.useState("");
9569
9576
  const rows = react.useMemo(
9570
9577
  () => parties.status === "ready" ? parties.tripRoster.rows : [],
@@ -10550,9 +10557,9 @@ function ReadyManagerTravellerProfileSection({
10550
10557
  style
10551
10558
  }) {
10552
10559
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
10553
- const profile = chunkUSKVWPJD_cjs.useTravellerProfile(tripRef, travellerRef);
10554
- const parties = chunkUSKVWPJD_cjs.useParties(tripRef);
10555
- const collections = chunkUSKVWPJD_cjs.useCollections(tripRef);
10560
+ const profile = chunkARXY3ZA7_cjs.useTravellerProfile(tripRef, travellerRef);
10561
+ const parties = chunkARXY3ZA7_cjs.useParties(tripRef);
10562
+ const collections = chunkARXY3ZA7_cjs.useCollections(tripRef);
10556
10563
  const [sheetOpen, setSheetOpen] = react.useState(false);
10557
10564
  const partyLabel = react.useMemo(() => {
10558
10565
  if (profile.read === void 0 || profile.read.partyId === null) {
@@ -12052,8 +12059,8 @@ function ReadyManagerVehiclesSection({
12052
12059
  style
12053
12060
  }) {
12054
12061
  const { t } = chunk5ORJRFXZ_cjs.useKaafilChrome();
12055
- const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
12056
- const managers = chunkUSKVWPJD_cjs.useManagers(tripRef);
12062
+ const seating = chunkARXY3ZA7_cjs.useSeating(tripRef);
12063
+ const managers = chunkARXY3ZA7_cjs.useManagers(tripRef);
12057
12064
  const Stats = components?.Stats ?? VehicleStats;
12058
12065
  const VehicleCardComponent = components?.VehicleCard ?? VehicleCard;
12059
12066
  const UnassignedPool = components?.UnassignedPool ?? UnassignedPoolSection2;
@@ -12570,9 +12577,9 @@ function ReadyManagerVendorsSection({
12570
12577
  components,
12571
12578
  style
12572
12579
  }) {
12573
- const vendors = chunkUSKVWPJD_cjs.useVendors(tripRef, "");
12574
- const expenses = chunkUSKVWPJD_cjs.useExpenses(tripRef);
12575
- const seating = chunkUSKVWPJD_cjs.useSeating(tripRef);
12580
+ const vendors = chunkARXY3ZA7_cjs.useVendors(tripRef, "");
12581
+ const expenses = chunkARXY3ZA7_cjs.useExpenses(tripRef);
12582
+ const seating = chunkARXY3ZA7_cjs.useSeating(tripRef);
12576
12583
  const [selectedVendorId, setSelectedVendorId] = react.useState(void 0);
12577
12584
  const VendorListUI = components?.VendorListUI ?? VendorListSection;
12578
12585
  if (vendors.status === "loading") {