kaafil-react-uikit 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/admin/index.cjs +363 -381
- package/dist/admin/index.cjs.map +1 -1
- package/dist/admin/index.js +6 -24
- package/dist/admin/index.js.map +1 -1
- package/dist/chunk-5QFW5GL4.cjs +24 -0
- package/dist/chunk-5QFW5GL4.cjs.map +1 -0
- package/dist/{chunk-5ORJRFXZ.cjs → chunk-64AFXHOF.cjs} +6 -4
- package/dist/chunk-64AFXHOF.cjs.map +1 -0
- package/dist/{chunk-YJJ4DI42.js → chunk-AKJLIH5A.js} +6 -4
- package/dist/chunk-AKJLIH5A.js.map +1 -0
- package/dist/{chunk-ZKLX6YRT.js → chunk-BT2ZX3JY.js} +5 -5
- package/dist/{chunk-ZKLX6YRT.js.map → chunk-BT2ZX3JY.js.map} +1 -1
- package/dist/{chunk-U6IE2UYL.js → chunk-CJLQ2Z4Q.js} +3 -3
- package/dist/{chunk-U6IE2UYL.js.map → chunk-CJLQ2Z4Q.js.map} +1 -1
- package/dist/{chunk-F2ENMVT7.js → chunk-DXDSCQLC.js} +3 -3
- package/dist/{chunk-F2ENMVT7.js.map → chunk-DXDSCQLC.js.map} +1 -1
- package/dist/{chunk-ARXY3ZA7.cjs → chunk-GD5UU4G6.cjs} +85 -85
- package/dist/{chunk-ARXY3ZA7.cjs.map → chunk-GD5UU4G6.cjs.map} +1 -1
- package/dist/{chunk-RCWSMWQD.js → chunk-IAKK2CKB.js} +3 -3
- package/dist/{chunk-RCWSMWQD.js.map → chunk-IAKK2CKB.js.map} +1 -1
- package/dist/chunk-JOUTGBUJ.js +22 -0
- package/dist/chunk-JOUTGBUJ.js.map +1 -0
- package/dist/{chunk-KJSQLVBR.cjs → chunk-JY2C4S3J.cjs} +55 -55
- package/dist/{chunk-KJSQLVBR.cjs.map → chunk-JY2C4S3J.cjs.map} +1 -1
- package/dist/chunk-KFOCETDW.cjs +12 -0
- package/dist/{chunk-YKBA4WQJ.cjs.map → chunk-KFOCETDW.cjs.map} +1 -1
- package/dist/{chunk-T5JYKERY.cjs → chunk-LSOV3FJL.cjs} +12 -12
- package/dist/{chunk-T5JYKERY.cjs.map → chunk-LSOV3FJL.cjs.map} +1 -1
- package/dist/{chunk-XGPX7TYV.js → chunk-LW2YB7VC.js} +3 -3
- package/dist/{chunk-XGPX7TYV.js.map → chunk-LW2YB7VC.js.map} +1 -1
- package/dist/{chunk-6QSHORU3.cjs → chunk-MLVS5KS6.cjs} +17 -17
- package/dist/{chunk-6QSHORU3.cjs.map → chunk-MLVS5KS6.cjs.map} +1 -1
- package/dist/{chunk-XWU5MCY3.cjs → chunk-TCVXLZ4H.cjs} +9 -9
- package/dist/{chunk-XWU5MCY3.cjs.map → chunk-TCVXLZ4H.cjs.map} +1 -1
- package/dist/{chunk-LJO2FGFD.js → chunk-TFFHYZMZ.js} +5 -5
- package/dist/{chunk-LJO2FGFD.js.map → chunk-TFFHYZMZ.js.map} +1 -1
- package/dist/{chunk-VHBGE4BY.cjs → chunk-XNZU6ZLX.cjs} +4 -4
- package/dist/{chunk-VHBGE4BY.cjs.map → chunk-XNZU6ZLX.cjs.map} +1 -1
- package/dist/{chunk-LOLQNRIK.js → chunk-YSJXNKCU.js} +3 -3
- package/dist/{chunk-LOLQNRIK.js.map → chunk-YSJXNKCU.js.map} +1 -1
- package/dist/core/index.cjs +107 -107
- package/dist/core/index.js +10 -10
- package/dist/manager/index.cjs +273 -298
- package/dist/manager/index.cjs.map +1 -1
- package/dist/manager/index.d.cts +46 -2
- package/dist/manager/index.d.ts +46 -2
- package/dist/manager/index.js +21 -46
- package/dist/manager/index.js.map +1 -1
- package/dist/traveller/index.cjs +35 -35
- package/dist/traveller/index.js +5 -5
- package/package.json +14 -14
- package/dist/chunk-5ORJRFXZ.cjs.map +0 -1
- package/dist/chunk-YJJ4DI42.js.map +0 -1
- package/dist/chunk-YKBA4WQJ.cjs +0 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk64AFXHOF_cjs = require('./chunk-64AFXHOF.cjs');
|
|
4
4
|
var client = require('kaafil-js/client');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
|
|
@@ -99,8 +99,8 @@ function ensureTripPulled(engine, tripRef) {
|
|
|
99
99
|
|
|
100
100
|
// src/core/hooks/useSnapshotList.ts
|
|
101
101
|
function useSnapshotList(tripRef, listName, options) {
|
|
102
|
-
const engine = react.useContext(
|
|
103
|
-
const client = react.useContext(
|
|
102
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
103
|
+
const client = react.useContext(chunk64AFXHOF_cjs.KaafilClientContext);
|
|
104
104
|
const [rows, setRows] = react.useState(
|
|
105
105
|
() => engine === null ? [] : engine.snapshot.list(tripRef, listName)
|
|
106
106
|
);
|
|
@@ -161,15 +161,15 @@ function useSnapshotList(tripRef, listName, options) {
|
|
|
161
161
|
// src/core/internal/createDomainHook.ts
|
|
162
162
|
function createDomainHook(moduleKey, build) {
|
|
163
163
|
return function useDomainHook(tripRef) {
|
|
164
|
-
const { rows, loaded } =
|
|
164
|
+
const { rows, loaded } = chunk64AFXHOF_cjs.useCapabilityRows(tripRef);
|
|
165
165
|
const ready = build(tripRef);
|
|
166
166
|
if (!loaded) {
|
|
167
167
|
return { status: "loading" };
|
|
168
168
|
}
|
|
169
169
|
const row = rows.find((candidate) => candidate.capability === moduleKey);
|
|
170
|
-
const triple = row === void 0 ?
|
|
170
|
+
const triple = row === void 0 ? chunk64AFXHOF_cjs.UNKNOWN_CAPABILITY_TRIPLE : chunk64AFXHOF_cjs.deriveCapabilityTriple(row);
|
|
171
171
|
if (triple.status !== "lit") {
|
|
172
|
-
const reason =
|
|
172
|
+
const reason = chunk64AFXHOF_cjs.darkReasonFor(triple);
|
|
173
173
|
return { status: "dark", reason };
|
|
174
174
|
}
|
|
175
175
|
return { status: "ready", ...ready };
|
|
@@ -223,8 +223,8 @@ function appendPendingRows(fromAggregate, fromSnapshot) {
|
|
|
223
223
|
return pending.length === 0 ? fromAggregate : [...fromAggregate, ...pending];
|
|
224
224
|
}
|
|
225
225
|
var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
226
|
-
const client$1 =
|
|
227
|
-
const engine = react.useContext(
|
|
226
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
227
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
228
228
|
const { rows: snapshotItems, syncedAt } = useSnapshotList(
|
|
229
229
|
tripRef,
|
|
230
230
|
"checklist"
|
|
@@ -288,7 +288,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
288
288
|
void refreshAggregate();
|
|
289
289
|
});
|
|
290
290
|
}, [engine, refreshAggregate]);
|
|
291
|
-
const addItemMutation =
|
|
291
|
+
const addItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
292
292
|
tripRef,
|
|
293
293
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
294
294
|
tripRef,
|
|
@@ -333,7 +333,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
333
333
|
// lane for exactly that reason.
|
|
334
334
|
direct: (liveClient, input) => liveClient.checklists.items.add({ tripRef, ...input })
|
|
335
335
|
});
|
|
336
|
-
const patchItemMutation =
|
|
336
|
+
const patchItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
337
337
|
tripRef,
|
|
338
338
|
enqueue: (engine2, input) => {
|
|
339
339
|
const { itemId, version, ...body } = input;
|
|
@@ -348,7 +348,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
348
348
|
},
|
|
349
349
|
direct: (liveClient, input) => liveClient.checklists.items.patch({ tripRef, ...input })
|
|
350
350
|
});
|
|
351
|
-
const removeItemMutation =
|
|
351
|
+
const removeItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
352
352
|
tripRef,
|
|
353
353
|
enqueue: (engine2, input) => {
|
|
354
354
|
const { itemId, version } = input;
|
|
@@ -362,7 +362,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
362
362
|
},
|
|
363
363
|
direct: (liveClient, input) => liveClient.checklists.items.remove({ tripRef, ...input })
|
|
364
364
|
});
|
|
365
|
-
const toggleItemMutation =
|
|
365
|
+
const toggleItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
366
366
|
tripRef,
|
|
367
367
|
enqueue: (engine2, input) => {
|
|
368
368
|
const { itemId, ...body } = input;
|
|
@@ -378,7 +378,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
378
378
|
},
|
|
379
379
|
direct: (liveClient, input) => liveClient.checklists.items.toggle({ tripRef, ...input })
|
|
380
380
|
});
|
|
381
|
-
const pullTemplateMutation =
|
|
381
|
+
const pullTemplateMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
382
382
|
tripRef,
|
|
383
383
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
384
384
|
tripRef,
|
|
@@ -485,7 +485,7 @@ function useChecklists(tripRef) {
|
|
|
485
485
|
return useChecklistsInternal(tripRef);
|
|
486
486
|
}
|
|
487
487
|
var useCloseoutInternal = createDomainHook("closing-day", (tripRef) => {
|
|
488
|
-
const client =
|
|
488
|
+
const client = chunk64AFXHOF_cjs.useKaafilClient();
|
|
489
489
|
const [aggregate, setAggregate] = react.useState(void 0);
|
|
490
490
|
const [loaded, setLoaded] = react.useState(false);
|
|
491
491
|
const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
|
|
@@ -585,7 +585,7 @@ function optimisticCollection(input, syncedAt) {
|
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
var useCollectionsInternal = createDomainHook("collections", (tripRef) => {
|
|
588
|
-
const client$1 =
|
|
588
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
589
589
|
const {
|
|
590
590
|
rows: collections,
|
|
591
591
|
syncedAt,
|
|
@@ -622,10 +622,10 @@ var useCollectionsInternal = createDomainHook("collections", (tripRef) => {
|
|
|
622
622
|
react.useEffect(() => {
|
|
623
623
|
void refreshEligible(eligibleStatus);
|
|
624
624
|
}, [refreshEligible, eligibleStatus]);
|
|
625
|
-
|
|
625
|
+
chunk64AFXHOF_cjs.useOfflineEvent("sync.drained", () => {
|
|
626
626
|
void refreshEligible();
|
|
627
627
|
});
|
|
628
|
-
const recordMutation =
|
|
628
|
+
const recordMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
629
629
|
tripRef,
|
|
630
630
|
enqueue: (engine, input) => engine.enqueue({
|
|
631
631
|
tripRef,
|
|
@@ -657,7 +657,7 @@ var useCollectionsInternal = createDomainHook("collections", (tripRef) => {
|
|
|
657
657
|
},
|
|
658
658
|
[recordMutate, refreshEligible]
|
|
659
659
|
);
|
|
660
|
-
const voidMutation =
|
|
660
|
+
const voidMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
661
661
|
tripRef,
|
|
662
662
|
enqueue: (engine, input) => {
|
|
663
663
|
const { collectionId, version, ...body } = input;
|
|
@@ -701,7 +701,7 @@ function useCollections(tripRef) {
|
|
|
701
701
|
return useCollectionsInternal(tripRef);
|
|
702
702
|
}
|
|
703
703
|
var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
704
|
-
const client$1 =
|
|
704
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
705
705
|
const {
|
|
706
706
|
rows: expenses,
|
|
707
707
|
syncedAt,
|
|
@@ -730,7 +730,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
730
730
|
react.useEffect(() => {
|
|
731
731
|
void refreshTotals();
|
|
732
732
|
}, [refreshTotals]);
|
|
733
|
-
const engine = react.useContext(
|
|
733
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
734
734
|
react.useEffect(() => {
|
|
735
735
|
if (engine === null) {
|
|
736
736
|
return;
|
|
@@ -740,7 +740,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
740
740
|
});
|
|
741
741
|
return unsubscribe;
|
|
742
742
|
}, [engine, refreshTotals]);
|
|
743
|
-
const logMutation =
|
|
743
|
+
const logMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
744
744
|
tripRef,
|
|
745
745
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
746
746
|
tripRef,
|
|
@@ -761,7 +761,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
761
761
|
// reimbursement, and an admin has no business standing in for them.
|
|
762
762
|
direct: (liveClient, input) => liveClient.expenses.log({ tripRef, ...input })
|
|
763
763
|
});
|
|
764
|
-
const linkReceiptMutation =
|
|
764
|
+
const linkReceiptMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
765
765
|
tripRef,
|
|
766
766
|
enqueue: (engine2, input) => {
|
|
767
767
|
const { expenseId, ...body } = input;
|
|
@@ -784,7 +784,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
784
784
|
// Widening it would mean either breaking rule #4 or making the key
|
|
785
785
|
// optional on the wire, neither of which belongs in a UIKit pass.
|
|
786
786
|
});
|
|
787
|
-
const voidMutation =
|
|
787
|
+
const voidMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
788
788
|
tripRef,
|
|
789
789
|
enqueue: (engine2, input) => {
|
|
790
790
|
const { expenseId, version, ...body } = input;
|
|
@@ -799,7 +799,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
799
799
|
},
|
|
800
800
|
direct: (liveClient, input) => liveClient.expenses.void({ tripRef, ...input })
|
|
801
801
|
});
|
|
802
|
-
const submitClaimMutation =
|
|
802
|
+
const submitClaimMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
803
803
|
tripRef,
|
|
804
804
|
enqueue: (engine2, input) => {
|
|
805
805
|
const { expenseId } = input;
|
|
@@ -812,7 +812,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
812
812
|
});
|
|
813
813
|
}
|
|
814
814
|
});
|
|
815
|
-
const withdrawClaimMutation =
|
|
815
|
+
const withdrawClaimMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
816
816
|
tripRef,
|
|
817
817
|
enqueue: (engine2, input) => {
|
|
818
818
|
const { expenseId, version } = input;
|
|
@@ -854,7 +854,7 @@ function useExpenses(tripRef) {
|
|
|
854
854
|
}
|
|
855
855
|
var DEFAULT_MAX_ATTEMPTS = 3;
|
|
856
856
|
function useFiles(context) {
|
|
857
|
-
const client =
|
|
857
|
+
const client = chunk64AFXHOF_cjs.useKaafilClient();
|
|
858
858
|
const { tripRef } = context;
|
|
859
859
|
const request = react.useCallback(
|
|
860
860
|
(input) => client.files.request({ ...input, tripRef }),
|
|
@@ -932,7 +932,7 @@ function useFiles(context) {
|
|
|
932
932
|
return { request, confirm, meta, url, list, managerView, upload, remove };
|
|
933
933
|
}
|
|
934
934
|
var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
935
|
-
const client$1 =
|
|
935
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
936
936
|
const { rows: movements, syncedAt } = useSnapshotList(tripRef, "float");
|
|
937
937
|
const [summaryRows, setSummaryRows] = react.useState([]);
|
|
938
938
|
const [summaryLoaded, setSummaryLoaded] = react.useState(false);
|
|
@@ -952,10 +952,10 @@ var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
|
952
952
|
react.useEffect(() => {
|
|
953
953
|
void refreshSummary();
|
|
954
954
|
}, [refreshSummary]);
|
|
955
|
-
|
|
955
|
+
chunk64AFXHOF_cjs.useOfflineEvent("sync.drained", () => {
|
|
956
956
|
void refreshSummary();
|
|
957
957
|
});
|
|
958
|
-
const issueMutation =
|
|
958
|
+
const issueMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
959
959
|
tripRef,
|
|
960
960
|
enqueue: (engine, input) => engine.enqueue({
|
|
961
961
|
tripRef,
|
|
@@ -973,7 +973,7 @@ var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
|
973
973
|
// transport at all.
|
|
974
974
|
direct: (liveClient, input) => liveClient.float.issue({ tripRef, ...input })
|
|
975
975
|
});
|
|
976
|
-
const returnMutation =
|
|
976
|
+
const returnMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
977
977
|
tripRef,
|
|
978
978
|
enqueue: (engine, input) => engine.enqueue({
|
|
979
979
|
tripRef,
|
|
@@ -984,7 +984,7 @@ var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
|
984
984
|
}),
|
|
985
985
|
direct: (liveClient, input) => liveClient.float.return({ tripRef, ...input })
|
|
986
986
|
});
|
|
987
|
-
const adjustMutation =
|
|
987
|
+
const adjustMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
988
988
|
tripRef,
|
|
989
989
|
enqueue: (engine, input) => engine.enqueue({
|
|
990
990
|
tripRef,
|
|
@@ -1047,8 +1047,8 @@ function useFloat(tripRef) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
var FORM_FIELD_KIND_SINGLE_BOOLEAN = "CHECKBOX";
|
|
1049
1049
|
var useFormsInternal = createDomainHook("forms", (tripRef) => {
|
|
1050
|
-
const client$1 =
|
|
1051
|
-
const engine = react.useContext(
|
|
1050
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1051
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
1052
1052
|
const [forms, setForms] = react.useState([]);
|
|
1053
1053
|
const [syncedAt, setSyncedAt] = react.useState(void 0);
|
|
1054
1054
|
const refreshForms = react.useCallback(async () => {
|
|
@@ -1093,7 +1093,7 @@ var useFormsInternal = createDomainHook("forms", (tripRef) => {
|
|
|
1093
1093
|
},
|
|
1094
1094
|
[client$1, tripRef]
|
|
1095
1095
|
);
|
|
1096
|
-
const submitMutation =
|
|
1096
|
+
const submitMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1097
1097
|
tripRef,
|
|
1098
1098
|
enqueue: (engine2, input) => {
|
|
1099
1099
|
const { formId, ...body } = input;
|
|
@@ -1263,7 +1263,7 @@ function isLiveItineraryItem(row) {
|
|
|
1263
1263
|
return !("_tombstone" in row);
|
|
1264
1264
|
}
|
|
1265
1265
|
function useItinerary(tripRef) {
|
|
1266
|
-
const client$1 =
|
|
1266
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1267
1267
|
const [trip, setTrip] = react.useState(void 0);
|
|
1268
1268
|
const [initialDayIso, setInitialDayIso] = react.useState(void 0);
|
|
1269
1269
|
const [canAddItems, setCanAddItems] = react.useState(false);
|
|
@@ -1292,7 +1292,7 @@ function useItinerary(tripRef) {
|
|
|
1292
1292
|
react.useEffect(() => {
|
|
1293
1293
|
void refresh();
|
|
1294
1294
|
}, [refresh]);
|
|
1295
|
-
const engine = react.useContext(
|
|
1295
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
1296
1296
|
const refreshAfterDrain = react.useCallback(() => {
|
|
1297
1297
|
if (engine === null) {
|
|
1298
1298
|
return;
|
|
@@ -1318,7 +1318,7 @@ function useItinerary(tripRef) {
|
|
|
1318
1318
|
},
|
|
1319
1319
|
[client$1, tripRef]
|
|
1320
1320
|
);
|
|
1321
|
-
const patchDayMutation =
|
|
1321
|
+
const patchDayMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1322
1322
|
tripRef,
|
|
1323
1323
|
enqueue: (engine2, input) => {
|
|
1324
1324
|
const { dayIndex, version, ...body } = input;
|
|
@@ -1343,7 +1343,7 @@ function useItinerary(tripRef) {
|
|
|
1343
1343
|
},
|
|
1344
1344
|
[patchDayMutate, refresh, refreshAfterDrain]
|
|
1345
1345
|
);
|
|
1346
|
-
const addItemMutation =
|
|
1346
|
+
const addItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1347
1347
|
tripRef,
|
|
1348
1348
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
1349
1349
|
tripRef,
|
|
@@ -1364,7 +1364,7 @@ function useItinerary(tripRef) {
|
|
|
1364
1364
|
},
|
|
1365
1365
|
[addItemMutate, refresh, refreshAfterDrain]
|
|
1366
1366
|
);
|
|
1367
|
-
const patchItemMutation =
|
|
1367
|
+
const patchItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1368
1368
|
tripRef,
|
|
1369
1369
|
enqueue: (engine2, input) => {
|
|
1370
1370
|
const { itemId, version, ...body } = input;
|
|
@@ -1389,7 +1389,7 @@ function useItinerary(tripRef) {
|
|
|
1389
1389
|
},
|
|
1390
1390
|
[patchItemMutate, refresh, refreshAfterDrain]
|
|
1391
1391
|
);
|
|
1392
|
-
const removeItemMutation =
|
|
1392
|
+
const removeItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1393
1393
|
tripRef,
|
|
1394
1394
|
enqueue: (engine2, input) => {
|
|
1395
1395
|
const { itemId, version } = input;
|
|
@@ -1413,7 +1413,7 @@ function useItinerary(tripRef) {
|
|
|
1413
1413
|
},
|
|
1414
1414
|
[removeItemMutate, refresh, refreshAfterDrain]
|
|
1415
1415
|
);
|
|
1416
|
-
const reorderItemMutation =
|
|
1416
|
+
const reorderItemMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1417
1417
|
tripRef,
|
|
1418
1418
|
enqueue: (engine2, input) => {
|
|
1419
1419
|
const { itemId, ...body } = input;
|
|
@@ -1467,12 +1467,12 @@ function useItinerary(tripRef) {
|
|
|
1467
1467
|
};
|
|
1468
1468
|
}
|
|
1469
1469
|
function useManagers(tripRef) {
|
|
1470
|
-
const client =
|
|
1471
|
-
const persona =
|
|
1470
|
+
const client = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1471
|
+
const persona = chunk64AFXHOF_cjs.usePersona();
|
|
1472
1472
|
const [result, setResult] = react.useState({ status: "loading" });
|
|
1473
1473
|
react.useEffect(() => {
|
|
1474
1474
|
if (persona === "share") {
|
|
1475
|
-
if (
|
|
1475
|
+
if (chunk64AFXHOF_cjs.isDevelopment()) {
|
|
1476
1476
|
throw new Error(
|
|
1477
1477
|
"useManagers() was called from a share session \u2014 it is manager/agencyAdmin only."
|
|
1478
1478
|
);
|
|
@@ -1497,7 +1497,7 @@ function useManagers(tripRef) {
|
|
|
1497
1497
|
return result;
|
|
1498
1498
|
}
|
|
1499
1499
|
function useManagerToday(tripRef) {
|
|
1500
|
-
const client =
|
|
1500
|
+
const client = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1501
1501
|
const [result, setResult] = react.useState({ status: "loading" });
|
|
1502
1502
|
react.useEffect(() => {
|
|
1503
1503
|
let cancelled = false;
|
|
@@ -1523,7 +1523,7 @@ function isLiveParty(row) {
|
|
|
1523
1523
|
return !("_tombstone" in row);
|
|
1524
1524
|
}
|
|
1525
1525
|
function useParties(tripRef) {
|
|
1526
|
-
const client$1 =
|
|
1526
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1527
1527
|
const [rows, setRows] = react.useState([]);
|
|
1528
1528
|
const [listLoaded, setListLoaded] = react.useState(false);
|
|
1529
1529
|
const [listFetchFailed, setListFetchFailed] = react.useState(false);
|
|
@@ -1563,7 +1563,7 @@ function useParties(tripRef) {
|
|
|
1563
1563
|
react.useEffect(() => {
|
|
1564
1564
|
void refreshRoster();
|
|
1565
1565
|
}, [refreshRoster]);
|
|
1566
|
-
const addMutation =
|
|
1566
|
+
const addMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1567
1567
|
tripRef,
|
|
1568
1568
|
enqueue: (engine, input) => engine.enqueue({
|
|
1569
1569
|
tripRef,
|
|
@@ -1573,7 +1573,7 @@ function useParties(tripRef) {
|
|
|
1573
1573
|
body: input
|
|
1574
1574
|
})
|
|
1575
1575
|
});
|
|
1576
|
-
const patchMutation =
|
|
1576
|
+
const patchMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1577
1577
|
tripRef,
|
|
1578
1578
|
enqueue: (engine, input) => {
|
|
1579
1579
|
const { partyId, version, ...body } = input;
|
|
@@ -1587,7 +1587,7 @@ function useParties(tripRef) {
|
|
|
1587
1587
|
});
|
|
1588
1588
|
}
|
|
1589
1589
|
});
|
|
1590
|
-
const removeMutation =
|
|
1590
|
+
const removeMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1591
1591
|
tripRef,
|
|
1592
1592
|
enqueue: (engine, input) => {
|
|
1593
1593
|
const { partyId } = input;
|
|
@@ -1692,7 +1692,7 @@ function optimisticPickupStop(input, syncedAt) {
|
|
|
1692
1692
|
};
|
|
1693
1693
|
}
|
|
1694
1694
|
var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
1695
|
-
const client$1 =
|
|
1695
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1696
1696
|
const {
|
|
1697
1697
|
rows: stops,
|
|
1698
1698
|
syncedAt,
|
|
@@ -1703,7 +1703,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1703
1703
|
return { rows: response, syncedAt: response.meta.serverTime };
|
|
1704
1704
|
}
|
|
1705
1705
|
});
|
|
1706
|
-
const createMutation =
|
|
1706
|
+
const createMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1707
1707
|
tripRef,
|
|
1708
1708
|
enqueue: (engine, input) => engine.enqueue({
|
|
1709
1709
|
tripRef,
|
|
@@ -1729,7 +1729,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1729
1729
|
// before it left the process. See this file's own persona note.
|
|
1730
1730
|
direct: (liveClient, input) => liveClient.pickups.create({ tripRef, ...input })
|
|
1731
1731
|
});
|
|
1732
|
-
const patchMutation =
|
|
1732
|
+
const patchMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1733
1733
|
tripRef,
|
|
1734
1734
|
enqueue: (engine, input) => {
|
|
1735
1735
|
const { pointId, version, ...body } = input;
|
|
@@ -1744,7 +1744,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1744
1744
|
},
|
|
1745
1745
|
direct: (liveClient, input) => liveClient.pickups.patch({ tripRef, ...input })
|
|
1746
1746
|
});
|
|
1747
|
-
const removeMutation =
|
|
1747
|
+
const removeMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1748
1748
|
tripRef,
|
|
1749
1749
|
enqueue: (engine, input) => {
|
|
1750
1750
|
const { pointId, version, force } = input;
|
|
@@ -1759,7 +1759,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1759
1759
|
},
|
|
1760
1760
|
direct: (liveClient, input) => liveClient.pickups.remove({ tripRef, ...input })
|
|
1761
1761
|
});
|
|
1762
|
-
const reorderMutation =
|
|
1762
|
+
const reorderMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1763
1763
|
tripRef,
|
|
1764
1764
|
enqueue: (engine, input) => engine.enqueue({
|
|
1765
1765
|
tripRef,
|
|
@@ -1770,7 +1770,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1770
1770
|
}),
|
|
1771
1771
|
direct: (liveClient, input) => liveClient.pickups.reorder({ tripRef, ...input })
|
|
1772
1772
|
});
|
|
1773
|
-
const assignMutation =
|
|
1773
|
+
const assignMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1774
1774
|
tripRef,
|
|
1775
1775
|
enqueue: (engine, input) => {
|
|
1776
1776
|
const { pointId, ...body } = input;
|
|
@@ -1784,7 +1784,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1784
1784
|
},
|
|
1785
1785
|
direct: (liveClient, input) => liveClient.pickups.assign({ tripRef, ...input })
|
|
1786
1786
|
});
|
|
1787
|
-
const boardMutation =
|
|
1787
|
+
const boardMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1788
1788
|
tripRef,
|
|
1789
1789
|
enqueue: (engine, input) => {
|
|
1790
1790
|
const { pointId, ...body } = input;
|
|
@@ -1797,7 +1797,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1797
1797
|
});
|
|
1798
1798
|
}
|
|
1799
1799
|
});
|
|
1800
|
-
const correctBoardStatusMutation =
|
|
1800
|
+
const correctBoardStatusMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1801
1801
|
tripRef,
|
|
1802
1802
|
enqueue: (engine, input) => {
|
|
1803
1803
|
const { pointId, travellerId, ...body } = input;
|
|
@@ -1814,7 +1814,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1814
1814
|
// still get none, because they are `managerAuth`-only.
|
|
1815
1815
|
direct: (liveClient, input) => liveClient.pickups.correctBoardStatus({ tripRef, ...input })
|
|
1816
1816
|
});
|
|
1817
|
-
const closeMutation =
|
|
1817
|
+
const closeMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1818
1818
|
tripRef,
|
|
1819
1819
|
enqueue: (engine, input) => {
|
|
1820
1820
|
const { pointId, ...body } = input;
|
|
@@ -1827,7 +1827,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1827
1827
|
});
|
|
1828
1828
|
}
|
|
1829
1829
|
});
|
|
1830
|
-
const reopenMutation =
|
|
1830
|
+
const reopenMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1831
1831
|
tripRef,
|
|
1832
1832
|
enqueue: (engine, input) => {
|
|
1833
1833
|
const { pointId } = input;
|
|
@@ -1886,7 +1886,7 @@ function optimisticStayWindow(input, syncedAt) {
|
|
|
1886
1886
|
};
|
|
1887
1887
|
}
|
|
1888
1888
|
var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
1889
|
-
const client$1 =
|
|
1889
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
1890
1890
|
const {
|
|
1891
1891
|
rows: rooms,
|
|
1892
1892
|
syncedAt: roomsSyncedAt,
|
|
@@ -1910,7 +1910,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1910
1910
|
const refreshLive = react.useCallback(async () => {
|
|
1911
1911
|
await Promise.all([refreshRoomsLive(), refreshWindowsLive()]);
|
|
1912
1912
|
}, [refreshRoomsLive, refreshWindowsLive]);
|
|
1913
|
-
const assignMutation =
|
|
1913
|
+
const assignMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1914
1914
|
tripRef,
|
|
1915
1915
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
1916
1916
|
tripRef,
|
|
@@ -1956,7 +1956,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1956
1956
|
react.useEffect(() => {
|
|
1957
1957
|
void refreshUnassignedPool();
|
|
1958
1958
|
}, [refreshUnassignedPool]);
|
|
1959
|
-
const engine = react.useContext(
|
|
1959
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
1960
1960
|
react.useEffect(() => {
|
|
1961
1961
|
if (engine === null) {
|
|
1962
1962
|
return;
|
|
@@ -1975,7 +1975,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1975
1975
|
},
|
|
1976
1976
|
[assignMutate, refreshUnassignedPool]
|
|
1977
1977
|
);
|
|
1978
|
-
const createWindowMutation =
|
|
1978
|
+
const createWindowMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1979
1979
|
tripRef,
|
|
1980
1980
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
1981
1981
|
tripRef,
|
|
@@ -1993,7 +1993,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1993
1993
|
}),
|
|
1994
1994
|
direct: (liveClient, input) => liveClient.rooming.stayWindows.create({ tripRef, ...input })
|
|
1995
1995
|
});
|
|
1996
|
-
const patchWindowMutation =
|
|
1996
|
+
const patchWindowMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
1997
1997
|
tripRef,
|
|
1998
1998
|
enqueue: (engine2, input) => {
|
|
1999
1999
|
const { windowId, version, ...body } = input;
|
|
@@ -2008,7 +2008,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
2008
2008
|
},
|
|
2009
2009
|
direct: (liveClient, input) => liveClient.rooming.stayWindows.patch({ tripRef, ...input })
|
|
2010
2010
|
});
|
|
2011
|
-
const removeWindowMutation =
|
|
2011
|
+
const removeWindowMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2012
2012
|
tripRef,
|
|
2013
2013
|
enqueue: (engine2, input) => {
|
|
2014
2014
|
const { windowId, version, force } = input;
|
|
@@ -2023,7 +2023,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
2023
2023
|
},
|
|
2024
2024
|
direct: (liveClient, input) => liveClient.rooming.stayWindows.remove({ tripRef, ...input })
|
|
2025
2025
|
});
|
|
2026
|
-
const createRoomMutation =
|
|
2026
|
+
const createRoomMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2027
2027
|
tripRef,
|
|
2028
2028
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
2029
2029
|
tripRef,
|
|
@@ -2034,7 +2034,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
2034
2034
|
}),
|
|
2035
2035
|
direct: (liveClient, input) => liveClient.rooming.rooms.create({ tripRef, ...input })
|
|
2036
2036
|
});
|
|
2037
|
-
const patchRoomMutation =
|
|
2037
|
+
const patchRoomMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2038
2038
|
tripRef,
|
|
2039
2039
|
enqueue: (engine2, input) => {
|
|
2040
2040
|
const { roomId, version, ...body } = input;
|
|
@@ -2049,7 +2049,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
2049
2049
|
},
|
|
2050
2050
|
direct: (liveClient, input) => liveClient.rooming.rooms.patch({ tripRef, ...input })
|
|
2051
2051
|
});
|
|
2052
|
-
const removeRoomMutation =
|
|
2052
|
+
const removeRoomMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2053
2053
|
tripRef,
|
|
2054
2054
|
enqueue: (engine2, input) => {
|
|
2055
2055
|
const { roomId, version, force } = input;
|
|
@@ -2095,7 +2095,7 @@ function useRooming(tripRef) {
|
|
|
2095
2095
|
return useRoomingInternal(tripRef);
|
|
2096
2096
|
}
|
|
2097
2097
|
var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
2098
|
-
const client$1 =
|
|
2098
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
2099
2099
|
const {
|
|
2100
2100
|
rows: vehicles,
|
|
2101
2101
|
syncedAt,
|
|
@@ -2106,7 +2106,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2106
2106
|
return { rows: response.vehicles, syncedAt: response.meta.serverTime };
|
|
2107
2107
|
}
|
|
2108
2108
|
});
|
|
2109
|
-
const assignMutation =
|
|
2109
|
+
const assignMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2110
2110
|
tripRef,
|
|
2111
2111
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
2112
2112
|
tripRef,
|
|
@@ -2145,7 +2145,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2145
2145
|
react.useEffect(() => {
|
|
2146
2146
|
void refreshUnassignedPool();
|
|
2147
2147
|
}, [refreshUnassignedPool]);
|
|
2148
|
-
const engine = react.useContext(
|
|
2148
|
+
const engine = react.useContext(chunk64AFXHOF_cjs.OfflineEngineContext);
|
|
2149
2149
|
react.useEffect(() => {
|
|
2150
2150
|
if (engine === null) {
|
|
2151
2151
|
return;
|
|
@@ -2164,7 +2164,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2164
2164
|
},
|
|
2165
2165
|
[assignMutate, refreshUnassignedPool]
|
|
2166
2166
|
);
|
|
2167
|
-
const createVehicleMutation =
|
|
2167
|
+
const createVehicleMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2168
2168
|
tripRef,
|
|
2169
2169
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
2170
2170
|
tripRef,
|
|
@@ -2175,7 +2175,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2175
2175
|
}),
|
|
2176
2176
|
direct: (liveClient, input) => liveClient.seating.vehicles.create({ tripRef, ...input })
|
|
2177
2177
|
});
|
|
2178
|
-
const patchVehicleMutation =
|
|
2178
|
+
const patchVehicleMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2179
2179
|
tripRef,
|
|
2180
2180
|
enqueue: (engine2, input) => {
|
|
2181
2181
|
const { vehicleId, version, ...body } = input;
|
|
@@ -2190,7 +2190,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2190
2190
|
},
|
|
2191
2191
|
direct: (liveClient, input) => liveClient.seating.vehicles.patch({ tripRef, ...input })
|
|
2192
2192
|
});
|
|
2193
|
-
const removeVehicleMutation =
|
|
2193
|
+
const removeVehicleMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2194
2194
|
tripRef,
|
|
2195
2195
|
enqueue: (engine2, input) => {
|
|
2196
2196
|
const { vehicleId, version } = input;
|
|
@@ -2232,7 +2232,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2232
2232
|
},
|
|
2233
2233
|
[patchVehicleMutate, vehicles]
|
|
2234
2234
|
);
|
|
2235
|
-
const linkManagerMutation =
|
|
2235
|
+
const linkManagerMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2236
2236
|
tripRef,
|
|
2237
2237
|
enqueue: (engine2, input) => {
|
|
2238
2238
|
const { vehicleId, ...body } = input;
|
|
@@ -2246,7 +2246,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2246
2246
|
},
|
|
2247
2247
|
direct: (liveClient, input) => liveClient.seating.vehicles.manager.link({ tripRef, ...input })
|
|
2248
2248
|
});
|
|
2249
|
-
const unlinkManagerMutation =
|
|
2249
|
+
const unlinkManagerMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2250
2250
|
tripRef,
|
|
2251
2251
|
enqueue: (engine2, input) => {
|
|
2252
2252
|
const { vehicleId, version } = input;
|
|
@@ -2289,7 +2289,7 @@ function useSeating(tripRef) {
|
|
|
2289
2289
|
return useSeatingInternal(tripRef);
|
|
2290
2290
|
}
|
|
2291
2291
|
function useTravellerProfile(tripRef, travellerRef) {
|
|
2292
|
-
const client$1 =
|
|
2292
|
+
const client$1 = chunk64AFXHOF_cjs.useKaafilClient();
|
|
2293
2293
|
const [read, setRead] = react.useState(void 0);
|
|
2294
2294
|
const [readFailed, setReadFailed] = react.useState(false);
|
|
2295
2295
|
const refresh = react.useCallback(async () => {
|
|
@@ -2304,8 +2304,8 @@ function useTravellerProfile(tripRef, travellerRef) {
|
|
|
2304
2304
|
react.useEffect(() => {
|
|
2305
2305
|
void refresh();
|
|
2306
2306
|
}, [refresh]);
|
|
2307
|
-
|
|
2308
|
-
const noteMutation =
|
|
2307
|
+
chunk64AFXHOF_cjs.useOfflineEvent("sync.drained", refresh);
|
|
2308
|
+
const noteMutation = chunk64AFXHOF_cjs.useOfflineMutation({
|
|
2309
2309
|
tripRef,
|
|
2310
2310
|
enqueue: (engine, input) => engine.enqueue({
|
|
2311
2311
|
tripRef,
|
|
@@ -2327,8 +2327,8 @@ function useTravellerProfile(tripRef, travellerRef) {
|
|
|
2327
2327
|
return { read, readFailed, refresh, addNote };
|
|
2328
2328
|
}
|
|
2329
2329
|
function useVendors(tripRef, agencyRef) {
|
|
2330
|
-
const client =
|
|
2331
|
-
const { rows, loaded: capabilitiesLoaded } =
|
|
2330
|
+
const client = chunk64AFXHOF_cjs.useKaafilClient();
|
|
2331
|
+
const { rows, loaded: capabilitiesLoaded } = chunk64AFXHOF_cjs.useCapabilityRows(tripRef);
|
|
2332
2332
|
const [vendors, setVendors] = react.useState([]);
|
|
2333
2333
|
const [listLoaded, setListLoaded] = react.useState(false);
|
|
2334
2334
|
const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
|
|
@@ -2357,9 +2357,9 @@ function useVendors(tripRef, agencyRef) {
|
|
|
2357
2357
|
return { status: "loading" };
|
|
2358
2358
|
}
|
|
2359
2359
|
const row = rows.find((candidate) => candidate.capability === "vendors");
|
|
2360
|
-
const triple = row === void 0 ?
|
|
2360
|
+
const triple = row === void 0 ? chunk64AFXHOF_cjs.UNKNOWN_CAPABILITY_TRIPLE : chunk64AFXHOF_cjs.deriveCapabilityTriple(row);
|
|
2361
2361
|
if (triple.status !== "lit") {
|
|
2362
|
-
const reason =
|
|
2362
|
+
const reason = chunk64AFXHOF_cjs.darkReasonFor(triple);
|
|
2363
2363
|
return { status: "dark", reason };
|
|
2364
2364
|
}
|
|
2365
2365
|
if (!listLoaded && lastFetchFailed) {
|
|
@@ -2428,5 +2428,5 @@ exports.useSeating = useSeating;
|
|
|
2428
2428
|
exports.useSnapshotList = useSnapshotList;
|
|
2429
2429
|
exports.useTravellerProfile = useTravellerProfile;
|
|
2430
2430
|
exports.useVendors = useVendors;
|
|
2431
|
-
//# sourceMappingURL=chunk-
|
|
2432
|
-
//# sourceMappingURL=chunk-
|
|
2431
|
+
//# sourceMappingURL=chunk-GD5UU4G6.cjs.map
|
|
2432
|
+
//# sourceMappingURL=chunk-GD5UU4G6.cjs.map
|