kaafil-react-uikit 0.1.0 → 0.2.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/dist/admin/index.cjs +342 -342
- package/dist/admin/index.js +5 -5
- package/dist/{chunk-YHOQRKDJ.cjs → chunk-57SUK3GD.cjs} +7 -7
- package/dist/{chunk-YHOQRKDJ.cjs.map → chunk-57SUK3GD.cjs.map} +1 -1
- package/dist/{chunk-WS2DKREI.cjs → chunk-6WV5VYT2.cjs} +111 -95
- package/dist/chunk-6WV5VYT2.cjs.map +1 -0
- package/dist/{chunk-CURTZGHY.js → chunk-7ISKFGLW.js} +18 -7
- package/dist/chunk-7ISKFGLW.js.map +1 -0
- package/dist/{chunk-W5PG3IUJ.cjs → chunk-7UFX3Y2U.cjs} +4 -4
- package/dist/{chunk-W5PG3IUJ.cjs.map → chunk-7UFX3Y2U.cjs.map} +1 -1
- package/dist/{chunk-2SRBJ4H7.js → chunk-A4Z2YBEF.js} +19 -5
- package/dist/chunk-A4Z2YBEF.js.map +1 -0
- package/dist/{chunk-PYETPKTT.js → chunk-GJ2J3PYN.js} +3 -3
- package/dist/{chunk-PYETPKTT.js.map → chunk-GJ2J3PYN.js.map} +1 -1
- package/dist/{chunk-M2D6CZK2.cjs → chunk-HTIY33UH.cjs} +37 -37
- package/dist/{chunk-M2D6CZK2.cjs.map → chunk-HTIY33UH.cjs.map} +1 -1
- package/dist/{chunk-PDQVVJCS.js → chunk-KW5LH6KV.js} +3 -3
- package/dist/{chunk-PDQVVJCS.js.map → chunk-KW5LH6KV.js.map} +1 -1
- package/dist/{chunk-JMWXQTE3.js → chunk-L3QEMEFM.js} +3 -3
- package/dist/{chunk-JMWXQTE3.js.map → chunk-L3QEMEFM.js.map} +1 -1
- package/dist/{chunk-E42K6UMM.js → chunk-LJJMNZ7B.js} +5 -5
- package/dist/{chunk-E42K6UMM.js.map → chunk-LJJMNZ7B.js.map} +1 -1
- package/dist/{chunk-TF3GCIDK.cjs → chunk-OZJ74DVQ.cjs} +23 -12
- package/dist/chunk-OZJ74DVQ.cjs.map +1 -0
- package/dist/{chunk-2MWTLYVP.cjs → chunk-RG4YDSCN.cjs} +17 -17
- package/dist/{chunk-2MWTLYVP.cjs.map → chunk-RG4YDSCN.cjs.map} +1 -1
- package/dist/{chunk-7WXE5SUS.js → chunk-RSC2ZJUP.js} +35 -19
- package/dist/chunk-RSC2ZJUP.js.map +1 -0
- package/dist/{chunk-FFXGZZGJ.js → chunk-SIAPCJ7G.js} +5 -5
- package/dist/{chunk-FFXGZZGJ.js.map → chunk-SIAPCJ7G.js.map} +1 -1
- package/dist/{chunk-V36WWMTF.cjs → chunk-UALMCHNW.cjs} +19 -5
- package/dist/chunk-UALMCHNW.cjs.map +1 -0
- package/dist/{chunk-PCDEJHWL.cjs → chunk-YNHOPYBK.cjs} +12 -12
- package/dist/{chunk-PCDEJHWL.cjs.map → chunk-YNHOPYBK.cjs.map} +1 -1
- package/dist/core/index.cjs +113 -113
- package/dist/core/index.js +11 -11
- 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-2SRBJ4H7.js.map +0 -1
- package/dist/chunk-7WXE5SUS.js.map +0 -1
- package/dist/chunk-CURTZGHY.js.map +0 -1
- package/dist/chunk-TF3GCIDK.cjs.map +0 -1
- package/dist/chunk-V36WWMTF.cjs.map +0 -1
- package/dist/chunk-WS2DKREI.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUALMCHNW_cjs = require('./chunk-UALMCHNW.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(chunkUALMCHNW_cjs.OfflineEngineContext);
|
|
103
|
+
const client = react.useContext(chunkUALMCHNW_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 } = chunkUALMCHNW_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 ? chunkUALMCHNW_cjs.UNKNOWN_CAPABILITY_TRIPLE : chunkUALMCHNW_cjs.deriveCapabilityTriple(row);
|
|
171
171
|
if (triple.status !== "lit") {
|
|
172
|
-
const reason =
|
|
172
|
+
const reason = chunkUALMCHNW_cjs.darkReasonFor(triple);
|
|
173
173
|
return { status: "dark", reason };
|
|
174
174
|
}
|
|
175
175
|
return { status: "ready", ...ready };
|
|
@@ -178,28 +178,37 @@ function createDomainHook(moduleKey, build) {
|
|
|
178
178
|
|
|
179
179
|
// src/core/hooks/useChecklists.ts
|
|
180
180
|
var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
181
|
-
const client$1 =
|
|
182
|
-
const engine = react.useContext(
|
|
181
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
182
|
+
const engine = react.useContext(chunkUALMCHNW_cjs.OfflineEngineContext);
|
|
183
183
|
const { rows: snapshotItems, syncedAt } = useSnapshotList(
|
|
184
184
|
tripRef,
|
|
185
185
|
"checklist"
|
|
186
186
|
);
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
187
|
+
const aggregateCacheKey = `checklists.read:${tripRef}`;
|
|
188
|
+
const [aggregate, setAggregate] = react.useState(() => {
|
|
189
|
+
const cached = engine?.reads.get(
|
|
190
|
+
aggregateCacheKey
|
|
191
|
+
);
|
|
192
|
+
if (cached !== void 0) {
|
|
193
|
+
return { ...cached.value, loaded: true, lastFetchFailed: false };
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
title: void 0,
|
|
197
|
+
subtitle: void 0,
|
|
198
|
+
progress: void 0,
|
|
199
|
+
hasOpenMandatoryByPhase: void 0,
|
|
200
|
+
sections: [],
|
|
201
|
+
items: [],
|
|
202
|
+
availableTemplates: [],
|
|
203
|
+
loaded: false,
|
|
204
|
+
lastFetchFailed: false,
|
|
205
|
+
fetchedAt: void 0
|
|
206
|
+
};
|
|
198
207
|
});
|
|
199
208
|
const refreshAggregate = react.useCallback(async () => {
|
|
200
209
|
try {
|
|
201
210
|
const response = await client$1.checklists.read({ tripRef });
|
|
202
|
-
|
|
211
|
+
const value = {
|
|
203
212
|
title: response.title,
|
|
204
213
|
subtitle: response.subtitle,
|
|
205
214
|
progress: response.progress,
|
|
@@ -207,14 +216,21 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
207
216
|
sections: response.sections,
|
|
208
217
|
items: response.items,
|
|
209
218
|
availableTemplates: response.availableTemplates,
|
|
210
|
-
loaded: true,
|
|
211
|
-
lastFetchFailed: false,
|
|
212
219
|
fetchedAt: response.meta.serverTime
|
|
220
|
+
};
|
|
221
|
+
void engine?.reads.set(aggregateCacheKey, value, response.meta.serverTime).catch(() => {
|
|
213
222
|
});
|
|
223
|
+
setAggregate({ ...value, loaded: true, lastFetchFailed: false });
|
|
214
224
|
} catch {
|
|
215
|
-
setAggregate((previous) =>
|
|
225
|
+
setAggregate((previous) => {
|
|
226
|
+
if (previous.loaded) {
|
|
227
|
+
return { ...previous, lastFetchFailed: true };
|
|
228
|
+
}
|
|
229
|
+
const cached = engine?.reads.get(aggregateCacheKey);
|
|
230
|
+
return cached === void 0 ? { ...previous, lastFetchFailed: true } : { ...cached.value, loaded: true, lastFetchFailed: true };
|
|
231
|
+
});
|
|
216
232
|
}
|
|
217
|
-
}, [client$1, tripRef]);
|
|
233
|
+
}, [client$1, tripRef, engine, aggregateCacheKey]);
|
|
218
234
|
react.useEffect(() => {
|
|
219
235
|
void refreshAggregate();
|
|
220
236
|
}, [refreshAggregate]);
|
|
@@ -227,7 +243,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
227
243
|
void refreshAggregate();
|
|
228
244
|
});
|
|
229
245
|
}, [engine, refreshAggregate]);
|
|
230
|
-
const addItemMutation =
|
|
246
|
+
const addItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
231
247
|
tripRef,
|
|
232
248
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
233
249
|
tripRef,
|
|
@@ -246,7 +262,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
246
262
|
// lane for exactly that reason.
|
|
247
263
|
direct: (liveClient, input) => liveClient.checklists.items.add({ tripRef, ...input })
|
|
248
264
|
});
|
|
249
|
-
const patchItemMutation =
|
|
265
|
+
const patchItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
250
266
|
tripRef,
|
|
251
267
|
enqueue: (engine2, input) => {
|
|
252
268
|
const { itemId, version, ...body } = input;
|
|
@@ -261,7 +277,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
261
277
|
},
|
|
262
278
|
direct: (liveClient, input) => liveClient.checklists.items.patch({ tripRef, ...input })
|
|
263
279
|
});
|
|
264
|
-
const removeItemMutation =
|
|
280
|
+
const removeItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
265
281
|
tripRef,
|
|
266
282
|
enqueue: (engine2, input) => {
|
|
267
283
|
const { itemId, version } = input;
|
|
@@ -275,7 +291,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
275
291
|
},
|
|
276
292
|
direct: (liveClient, input) => liveClient.checklists.items.remove({ tripRef, ...input })
|
|
277
293
|
});
|
|
278
|
-
const toggleItemMutation =
|
|
294
|
+
const toggleItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
279
295
|
tripRef,
|
|
280
296
|
enqueue: (engine2, input) => {
|
|
281
297
|
const { itemId, ...body } = input;
|
|
@@ -291,7 +307,7 @@ var useChecklistsInternal = createDomainHook("checklists", (tripRef) => {
|
|
|
291
307
|
},
|
|
292
308
|
direct: (liveClient, input) => liveClient.checklists.items.toggle({ tripRef, ...input })
|
|
293
309
|
});
|
|
294
|
-
const pullTemplateMutation =
|
|
310
|
+
const pullTemplateMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
295
311
|
tripRef,
|
|
296
312
|
enqueue: (engine2, input) => engine2.enqueue({
|
|
297
313
|
tripRef,
|
|
@@ -398,7 +414,7 @@ function useChecklists(tripRef) {
|
|
|
398
414
|
return useChecklistsInternal(tripRef);
|
|
399
415
|
}
|
|
400
416
|
var useCloseoutInternal = createDomainHook("closing-day", (tripRef) => {
|
|
401
|
-
const client =
|
|
417
|
+
const client = chunkUALMCHNW_cjs.useKaafilClient();
|
|
402
418
|
const [aggregate, setAggregate] = react.useState(void 0);
|
|
403
419
|
const [loaded, setLoaded] = react.useState(false);
|
|
404
420
|
const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
|
|
@@ -470,7 +486,7 @@ function useCloseout(tripRef) {
|
|
|
470
486
|
return useCloseoutInternal(tripRef);
|
|
471
487
|
}
|
|
472
488
|
var useCollectionsInternal = createDomainHook("collections", (tripRef) => {
|
|
473
|
-
const client$1 =
|
|
489
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
474
490
|
const {
|
|
475
491
|
rows: collections,
|
|
476
492
|
syncedAt,
|
|
@@ -507,7 +523,7 @@ var useCollectionsInternal = createDomainHook("collections", (tripRef) => {
|
|
|
507
523
|
react.useEffect(() => {
|
|
508
524
|
void refreshEligible(eligibleStatus);
|
|
509
525
|
}, [refreshEligible, eligibleStatus]);
|
|
510
|
-
const recordMutation =
|
|
526
|
+
const recordMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
511
527
|
tripRef,
|
|
512
528
|
enqueue: (engine, input) => engine.enqueue({
|
|
513
529
|
tripRef,
|
|
@@ -534,7 +550,7 @@ var useCollectionsInternal = createDomainHook("collections", (tripRef) => {
|
|
|
534
550
|
},
|
|
535
551
|
[recordMutate, refreshEligible]
|
|
536
552
|
);
|
|
537
|
-
const voidMutation =
|
|
553
|
+
const voidMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
538
554
|
tripRef,
|
|
539
555
|
enqueue: (engine, input) => {
|
|
540
556
|
const { collectionId, version, ...body } = input;
|
|
@@ -578,7 +594,7 @@ function useCollections(tripRef) {
|
|
|
578
594
|
return useCollectionsInternal(tripRef);
|
|
579
595
|
}
|
|
580
596
|
var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
581
|
-
const client$1 =
|
|
597
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
582
598
|
const {
|
|
583
599
|
rows: expenses,
|
|
584
600
|
syncedAt,
|
|
@@ -607,7 +623,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
607
623
|
react.useEffect(() => {
|
|
608
624
|
void refreshTotals();
|
|
609
625
|
}, [refreshTotals]);
|
|
610
|
-
const logMutation =
|
|
626
|
+
const logMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
611
627
|
tripRef,
|
|
612
628
|
enqueue: (engine, input) => engine.enqueue({
|
|
613
629
|
tripRef,
|
|
@@ -628,7 +644,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
628
644
|
// reimbursement, and an admin has no business standing in for them.
|
|
629
645
|
direct: (liveClient, input) => liveClient.expenses.log({ tripRef, ...input })
|
|
630
646
|
});
|
|
631
|
-
const linkReceiptMutation =
|
|
647
|
+
const linkReceiptMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
632
648
|
tripRef,
|
|
633
649
|
enqueue: (engine, input) => {
|
|
634
650
|
const { expenseId, ...body } = input;
|
|
@@ -651,7 +667,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
651
667
|
// Widening it would mean either breaking rule #4 or making the key
|
|
652
668
|
// optional on the wire, neither of which belongs in a UIKit pass.
|
|
653
669
|
});
|
|
654
|
-
const voidMutation =
|
|
670
|
+
const voidMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
655
671
|
tripRef,
|
|
656
672
|
enqueue: (engine, input) => {
|
|
657
673
|
const { expenseId, version, ...body } = input;
|
|
@@ -666,7 +682,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
666
682
|
},
|
|
667
683
|
direct: (liveClient, input) => liveClient.expenses.void({ tripRef, ...input })
|
|
668
684
|
});
|
|
669
|
-
const submitClaimMutation =
|
|
685
|
+
const submitClaimMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
670
686
|
tripRef,
|
|
671
687
|
enqueue: (engine, input) => {
|
|
672
688
|
const { expenseId } = input;
|
|
@@ -679,7 +695,7 @@ var useExpensesInternal = createDomainHook("expenses", (tripRef) => {
|
|
|
679
695
|
});
|
|
680
696
|
}
|
|
681
697
|
});
|
|
682
|
-
const withdrawClaimMutation =
|
|
698
|
+
const withdrawClaimMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
683
699
|
tripRef,
|
|
684
700
|
enqueue: (engine, input) => {
|
|
685
701
|
const { expenseId, version } = input;
|
|
@@ -721,7 +737,7 @@ function useExpenses(tripRef) {
|
|
|
721
737
|
}
|
|
722
738
|
var DEFAULT_MAX_ATTEMPTS = 3;
|
|
723
739
|
function useFiles(context) {
|
|
724
|
-
const client =
|
|
740
|
+
const client = chunkUALMCHNW_cjs.useKaafilClient();
|
|
725
741
|
const { tripRef } = context;
|
|
726
742
|
const request = react.useCallback(
|
|
727
743
|
(input) => client.files.request({ ...input, tripRef }),
|
|
@@ -793,7 +809,7 @@ function useFiles(context) {
|
|
|
793
809
|
return { request, confirm, meta, url, list, managerView, upload };
|
|
794
810
|
}
|
|
795
811
|
var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
796
|
-
const client$1 =
|
|
812
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
797
813
|
const { rows: movements, syncedAt } = useSnapshotList(tripRef, "float");
|
|
798
814
|
const [summaryRows, setSummaryRows] = react.useState([]);
|
|
799
815
|
const [summaryLoaded, setSummaryLoaded] = react.useState(false);
|
|
@@ -813,7 +829,7 @@ var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
|
813
829
|
react.useEffect(() => {
|
|
814
830
|
void refreshSummary();
|
|
815
831
|
}, [refreshSummary]);
|
|
816
|
-
const issueMutation =
|
|
832
|
+
const issueMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
817
833
|
tripRef,
|
|
818
834
|
enqueue: (engine, input) => engine.enqueue({
|
|
819
835
|
tripRef,
|
|
@@ -831,7 +847,7 @@ var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
|
831
847
|
// transport at all.
|
|
832
848
|
direct: (liveClient, input) => liveClient.float.issue({ tripRef, ...input })
|
|
833
849
|
});
|
|
834
|
-
const returnMutation =
|
|
850
|
+
const returnMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
835
851
|
tripRef,
|
|
836
852
|
enqueue: (engine, input) => engine.enqueue({
|
|
837
853
|
tripRef,
|
|
@@ -842,7 +858,7 @@ var useFloatInternal = createDomainHook("float", (tripRef) => {
|
|
|
842
858
|
}),
|
|
843
859
|
direct: (liveClient, input) => liveClient.float.return({ tripRef, ...input })
|
|
844
860
|
});
|
|
845
|
-
const adjustMutation =
|
|
861
|
+
const adjustMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
846
862
|
tripRef,
|
|
847
863
|
enqueue: (engine, input) => engine.enqueue({
|
|
848
864
|
tripRef,
|
|
@@ -905,8 +921,8 @@ function useFloat(tripRef) {
|
|
|
905
921
|
}
|
|
906
922
|
var FORM_FIELD_KIND_SINGLE_BOOLEAN = "CHECKBOX";
|
|
907
923
|
var useFormsInternal = createDomainHook("forms", (tripRef) => {
|
|
908
|
-
const client$1 =
|
|
909
|
-
const engine = react.useContext(
|
|
924
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
925
|
+
const engine = react.useContext(chunkUALMCHNW_cjs.OfflineEngineContext);
|
|
910
926
|
const [forms, setForms] = react.useState([]);
|
|
911
927
|
const [syncedAt, setSyncedAt] = react.useState(void 0);
|
|
912
928
|
const refreshForms = react.useCallback(async () => {
|
|
@@ -951,7 +967,7 @@ var useFormsInternal = createDomainHook("forms", (tripRef) => {
|
|
|
951
967
|
},
|
|
952
968
|
[client$1, tripRef]
|
|
953
969
|
);
|
|
954
|
-
const submitMutation =
|
|
970
|
+
const submitMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
955
971
|
tripRef,
|
|
956
972
|
enqueue: (engine2, input) => {
|
|
957
973
|
const { formId, ...body } = input;
|
|
@@ -1121,7 +1137,7 @@ function isLiveItineraryItem(row) {
|
|
|
1121
1137
|
return !("_tombstone" in row);
|
|
1122
1138
|
}
|
|
1123
1139
|
function useItinerary(tripRef) {
|
|
1124
|
-
const client$1 =
|
|
1140
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1125
1141
|
const [trip, setTrip] = react.useState(void 0);
|
|
1126
1142
|
const [initialDayIso, setInitialDayIso] = react.useState(void 0);
|
|
1127
1143
|
const [canAddItems, setCanAddItems] = react.useState(false);
|
|
@@ -1166,7 +1182,7 @@ function useItinerary(tripRef) {
|
|
|
1166
1182
|
},
|
|
1167
1183
|
[client$1, tripRef]
|
|
1168
1184
|
);
|
|
1169
|
-
const patchDayMutation =
|
|
1185
|
+
const patchDayMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1170
1186
|
tripRef,
|
|
1171
1187
|
enqueue: (engine, input) => {
|
|
1172
1188
|
const { dayIndex, version, ...body } = input;
|
|
@@ -1190,7 +1206,7 @@ function useItinerary(tripRef) {
|
|
|
1190
1206
|
},
|
|
1191
1207
|
[patchDayMutate, refresh]
|
|
1192
1208
|
);
|
|
1193
|
-
const addItemMutation =
|
|
1209
|
+
const addItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1194
1210
|
tripRef,
|
|
1195
1211
|
enqueue: (engine, input) => engine.enqueue({
|
|
1196
1212
|
tripRef,
|
|
@@ -1210,7 +1226,7 @@ function useItinerary(tripRef) {
|
|
|
1210
1226
|
},
|
|
1211
1227
|
[addItemMutate, refresh]
|
|
1212
1228
|
);
|
|
1213
|
-
const patchItemMutation =
|
|
1229
|
+
const patchItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1214
1230
|
tripRef,
|
|
1215
1231
|
enqueue: (engine, input) => {
|
|
1216
1232
|
const { itemId, version, ...body } = input;
|
|
@@ -1234,7 +1250,7 @@ function useItinerary(tripRef) {
|
|
|
1234
1250
|
},
|
|
1235
1251
|
[patchItemMutate, refresh]
|
|
1236
1252
|
);
|
|
1237
|
-
const removeItemMutation =
|
|
1253
|
+
const removeItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1238
1254
|
tripRef,
|
|
1239
1255
|
enqueue: (engine, input) => {
|
|
1240
1256
|
const { itemId, version } = input;
|
|
@@ -1257,7 +1273,7 @@ function useItinerary(tripRef) {
|
|
|
1257
1273
|
},
|
|
1258
1274
|
[removeItemMutate, refresh]
|
|
1259
1275
|
);
|
|
1260
|
-
const reorderItemMutation =
|
|
1276
|
+
const reorderItemMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1261
1277
|
tripRef,
|
|
1262
1278
|
enqueue: (engine, input) => {
|
|
1263
1279
|
const { itemId, ...body } = input;
|
|
@@ -1310,12 +1326,12 @@ function useItinerary(tripRef) {
|
|
|
1310
1326
|
};
|
|
1311
1327
|
}
|
|
1312
1328
|
function useManagers(tripRef) {
|
|
1313
|
-
const client =
|
|
1314
|
-
const persona =
|
|
1329
|
+
const client = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1330
|
+
const persona = chunkUALMCHNW_cjs.usePersona();
|
|
1315
1331
|
const [result, setResult] = react.useState({ status: "loading" });
|
|
1316
1332
|
react.useEffect(() => {
|
|
1317
1333
|
if (persona === "share") {
|
|
1318
|
-
if (
|
|
1334
|
+
if (chunkUALMCHNW_cjs.isDevelopment()) {
|
|
1319
1335
|
throw new Error(
|
|
1320
1336
|
"useManagers() was called from a share session \u2014 it is manager/agencyAdmin only."
|
|
1321
1337
|
);
|
|
@@ -1340,7 +1356,7 @@ function useManagers(tripRef) {
|
|
|
1340
1356
|
return result;
|
|
1341
1357
|
}
|
|
1342
1358
|
function useManagerToday(tripRef) {
|
|
1343
|
-
const client =
|
|
1359
|
+
const client = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1344
1360
|
const [result, setResult] = react.useState({ status: "loading" });
|
|
1345
1361
|
react.useEffect(() => {
|
|
1346
1362
|
let cancelled = false;
|
|
@@ -1366,7 +1382,7 @@ function isLiveParty(row) {
|
|
|
1366
1382
|
return !("_tombstone" in row);
|
|
1367
1383
|
}
|
|
1368
1384
|
function useParties(tripRef) {
|
|
1369
|
-
const client$1 =
|
|
1385
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1370
1386
|
const [rows, setRows] = react.useState([]);
|
|
1371
1387
|
const [listLoaded, setListLoaded] = react.useState(false);
|
|
1372
1388
|
const [listFetchFailed, setListFetchFailed] = react.useState(false);
|
|
@@ -1406,7 +1422,7 @@ function useParties(tripRef) {
|
|
|
1406
1422
|
react.useEffect(() => {
|
|
1407
1423
|
void refreshRoster();
|
|
1408
1424
|
}, [refreshRoster]);
|
|
1409
|
-
const addMutation =
|
|
1425
|
+
const addMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1410
1426
|
tripRef,
|
|
1411
1427
|
enqueue: (engine, input) => engine.enqueue({
|
|
1412
1428
|
tripRef,
|
|
@@ -1416,7 +1432,7 @@ function useParties(tripRef) {
|
|
|
1416
1432
|
body: input
|
|
1417
1433
|
})
|
|
1418
1434
|
});
|
|
1419
|
-
const patchMutation =
|
|
1435
|
+
const patchMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1420
1436
|
tripRef,
|
|
1421
1437
|
enqueue: (engine, input) => {
|
|
1422
1438
|
const { partyId, version, ...body } = input;
|
|
@@ -1430,7 +1446,7 @@ function useParties(tripRef) {
|
|
|
1430
1446
|
});
|
|
1431
1447
|
}
|
|
1432
1448
|
});
|
|
1433
|
-
const removeMutation =
|
|
1449
|
+
const removeMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1434
1450
|
tripRef,
|
|
1435
1451
|
enqueue: (engine, input) => {
|
|
1436
1452
|
const { partyId } = input;
|
|
@@ -1507,7 +1523,7 @@ function useParties(tripRef) {
|
|
|
1507
1523
|
};
|
|
1508
1524
|
}
|
|
1509
1525
|
var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
1510
|
-
const client$1 =
|
|
1526
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1511
1527
|
const {
|
|
1512
1528
|
rows: stops,
|
|
1513
1529
|
syncedAt,
|
|
@@ -1518,7 +1534,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1518
1534
|
return { rows: response, syncedAt: response.meta.serverTime };
|
|
1519
1535
|
}
|
|
1520
1536
|
});
|
|
1521
|
-
const createMutation =
|
|
1537
|
+
const createMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1522
1538
|
tripRef,
|
|
1523
1539
|
enqueue: (engine, input) => engine.enqueue({
|
|
1524
1540
|
tripRef,
|
|
@@ -1537,7 +1553,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1537
1553
|
// before it left the process. See this file's own persona note.
|
|
1538
1554
|
direct: (liveClient, input) => liveClient.pickups.create({ tripRef, ...input })
|
|
1539
1555
|
});
|
|
1540
|
-
const patchMutation =
|
|
1556
|
+
const patchMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1541
1557
|
tripRef,
|
|
1542
1558
|
enqueue: (engine, input) => {
|
|
1543
1559
|
const { pointId, version, ...body } = input;
|
|
@@ -1552,7 +1568,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1552
1568
|
},
|
|
1553
1569
|
direct: (liveClient, input) => liveClient.pickups.patch({ tripRef, ...input })
|
|
1554
1570
|
});
|
|
1555
|
-
const removeMutation =
|
|
1571
|
+
const removeMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1556
1572
|
tripRef,
|
|
1557
1573
|
enqueue: (engine, input) => {
|
|
1558
1574
|
const { pointId, version, force } = input;
|
|
@@ -1567,7 +1583,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1567
1583
|
},
|
|
1568
1584
|
direct: (liveClient, input) => liveClient.pickups.remove({ tripRef, ...input })
|
|
1569
1585
|
});
|
|
1570
|
-
const reorderMutation =
|
|
1586
|
+
const reorderMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1571
1587
|
tripRef,
|
|
1572
1588
|
enqueue: (engine, input) => engine.enqueue({
|
|
1573
1589
|
tripRef,
|
|
@@ -1578,7 +1594,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1578
1594
|
}),
|
|
1579
1595
|
direct: (liveClient, input) => liveClient.pickups.reorder({ tripRef, ...input })
|
|
1580
1596
|
});
|
|
1581
|
-
const assignMutation =
|
|
1597
|
+
const assignMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1582
1598
|
tripRef,
|
|
1583
1599
|
enqueue: (engine, input) => {
|
|
1584
1600
|
const { pointId, ...body } = input;
|
|
@@ -1592,7 +1608,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1592
1608
|
},
|
|
1593
1609
|
direct: (liveClient, input) => liveClient.pickups.assign({ tripRef, ...input })
|
|
1594
1610
|
});
|
|
1595
|
-
const boardMutation =
|
|
1611
|
+
const boardMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1596
1612
|
tripRef,
|
|
1597
1613
|
enqueue: (engine, input) => {
|
|
1598
1614
|
const { pointId, ...body } = input;
|
|
@@ -1605,7 +1621,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1605
1621
|
});
|
|
1606
1622
|
}
|
|
1607
1623
|
});
|
|
1608
|
-
const correctBoardStatusMutation =
|
|
1624
|
+
const correctBoardStatusMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1609
1625
|
tripRef,
|
|
1610
1626
|
enqueue: (engine, input) => {
|
|
1611
1627
|
const { pointId, travellerId, ...body } = input;
|
|
@@ -1622,7 +1638,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1622
1638
|
// still get none, because they are `managerAuth`-only.
|
|
1623
1639
|
direct: (liveClient, input) => liveClient.pickups.correctBoardStatus({ tripRef, ...input })
|
|
1624
1640
|
});
|
|
1625
|
-
const closeMutation =
|
|
1641
|
+
const closeMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1626
1642
|
tripRef,
|
|
1627
1643
|
enqueue: (engine, input) => {
|
|
1628
1644
|
const { pointId, ...body } = input;
|
|
@@ -1635,7 +1651,7 @@ var usePickupsInternal = createDomainHook("pickup-points", (tripRef) => {
|
|
|
1635
1651
|
});
|
|
1636
1652
|
}
|
|
1637
1653
|
});
|
|
1638
|
-
const reopenMutation =
|
|
1654
|
+
const reopenMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1639
1655
|
tripRef,
|
|
1640
1656
|
enqueue: (engine, input) => {
|
|
1641
1657
|
const { pointId } = input;
|
|
@@ -1676,7 +1692,7 @@ function usePickups(tripRef) {
|
|
|
1676
1692
|
return usePickupsInternal(tripRef);
|
|
1677
1693
|
}
|
|
1678
1694
|
var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
1679
|
-
const client$1 =
|
|
1695
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1680
1696
|
const {
|
|
1681
1697
|
rows: rooms,
|
|
1682
1698
|
syncedAt: roomsSyncedAt,
|
|
@@ -1700,7 +1716,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1700
1716
|
const refreshLive = react.useCallback(async () => {
|
|
1701
1717
|
await Promise.all([refreshRoomsLive(), refreshWindowsLive()]);
|
|
1702
1718
|
}, [refreshRoomsLive, refreshWindowsLive]);
|
|
1703
|
-
const assignMutation =
|
|
1719
|
+
const assignMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1704
1720
|
tripRef,
|
|
1705
1721
|
enqueue: (engine, input) => engine.enqueue({
|
|
1706
1722
|
tripRef,
|
|
@@ -1755,7 +1771,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1755
1771
|
},
|
|
1756
1772
|
[assignMutate, refreshUnassignedPool]
|
|
1757
1773
|
);
|
|
1758
|
-
const createWindowMutation =
|
|
1774
|
+
const createWindowMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1759
1775
|
tripRef,
|
|
1760
1776
|
enqueue: (engine, input) => engine.enqueue({
|
|
1761
1777
|
tripRef,
|
|
@@ -1766,7 +1782,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1766
1782
|
}),
|
|
1767
1783
|
direct: (liveClient, input) => liveClient.rooming.stayWindows.create({ tripRef, ...input })
|
|
1768
1784
|
});
|
|
1769
|
-
const patchWindowMutation =
|
|
1785
|
+
const patchWindowMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1770
1786
|
tripRef,
|
|
1771
1787
|
enqueue: (engine, input) => {
|
|
1772
1788
|
const { windowId, version, ...body } = input;
|
|
@@ -1781,7 +1797,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1781
1797
|
},
|
|
1782
1798
|
direct: (liveClient, input) => liveClient.rooming.stayWindows.patch({ tripRef, ...input })
|
|
1783
1799
|
});
|
|
1784
|
-
const removeWindowMutation =
|
|
1800
|
+
const removeWindowMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1785
1801
|
tripRef,
|
|
1786
1802
|
enqueue: (engine, input) => {
|
|
1787
1803
|
const { windowId, version, force } = input;
|
|
@@ -1796,7 +1812,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1796
1812
|
},
|
|
1797
1813
|
direct: (liveClient, input) => liveClient.rooming.stayWindows.remove({ tripRef, ...input })
|
|
1798
1814
|
});
|
|
1799
|
-
const createRoomMutation =
|
|
1815
|
+
const createRoomMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1800
1816
|
tripRef,
|
|
1801
1817
|
enqueue: (engine, input) => engine.enqueue({
|
|
1802
1818
|
tripRef,
|
|
@@ -1807,7 +1823,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1807
1823
|
}),
|
|
1808
1824
|
direct: (liveClient, input) => liveClient.rooming.rooms.create({ tripRef, ...input })
|
|
1809
1825
|
});
|
|
1810
|
-
const patchRoomMutation =
|
|
1826
|
+
const patchRoomMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1811
1827
|
tripRef,
|
|
1812
1828
|
enqueue: (engine, input) => {
|
|
1813
1829
|
const { roomId, version, ...body } = input;
|
|
@@ -1822,7 +1838,7 @@ var useRoomingInternal = createDomainHook("rooming", (tripRef) => {
|
|
|
1822
1838
|
},
|
|
1823
1839
|
direct: (liveClient, input) => liveClient.rooming.rooms.patch({ tripRef, ...input })
|
|
1824
1840
|
});
|
|
1825
|
-
const removeRoomMutation =
|
|
1841
|
+
const removeRoomMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1826
1842
|
tripRef,
|
|
1827
1843
|
enqueue: (engine, input) => {
|
|
1828
1844
|
const { roomId, version, force } = input;
|
|
@@ -1868,7 +1884,7 @@ function useRooming(tripRef) {
|
|
|
1868
1884
|
return useRoomingInternal(tripRef);
|
|
1869
1885
|
}
|
|
1870
1886
|
var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
1871
|
-
const client$1 =
|
|
1887
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
1872
1888
|
const {
|
|
1873
1889
|
rows: vehicles,
|
|
1874
1890
|
syncedAt,
|
|
@@ -1879,7 +1895,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
1879
1895
|
return { rows: response.vehicles, syncedAt: response.meta.serverTime };
|
|
1880
1896
|
}
|
|
1881
1897
|
});
|
|
1882
|
-
const assignMutation =
|
|
1898
|
+
const assignMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1883
1899
|
tripRef,
|
|
1884
1900
|
enqueue: (engine, input) => engine.enqueue({
|
|
1885
1901
|
tripRef,
|
|
@@ -1927,7 +1943,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
1927
1943
|
},
|
|
1928
1944
|
[assignMutate, refreshUnassignedPool]
|
|
1929
1945
|
);
|
|
1930
|
-
const createVehicleMutation =
|
|
1946
|
+
const createVehicleMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1931
1947
|
tripRef,
|
|
1932
1948
|
enqueue: (engine, input) => engine.enqueue({
|
|
1933
1949
|
tripRef,
|
|
@@ -1938,7 +1954,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
1938
1954
|
}),
|
|
1939
1955
|
direct: (liveClient, input) => liveClient.seating.vehicles.create({ tripRef, ...input })
|
|
1940
1956
|
});
|
|
1941
|
-
const patchVehicleMutation =
|
|
1957
|
+
const patchVehicleMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1942
1958
|
tripRef,
|
|
1943
1959
|
enqueue: (engine, input) => {
|
|
1944
1960
|
const { vehicleId, version, ...body } = input;
|
|
@@ -1953,7 +1969,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
1953
1969
|
},
|
|
1954
1970
|
direct: (liveClient, input) => liveClient.seating.vehicles.patch({ tripRef, ...input })
|
|
1955
1971
|
});
|
|
1956
|
-
const removeVehicleMutation =
|
|
1972
|
+
const removeVehicleMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1957
1973
|
tripRef,
|
|
1958
1974
|
enqueue: (engine, input) => {
|
|
1959
1975
|
const { vehicleId, version } = input;
|
|
@@ -1995,7 +2011,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
1995
2011
|
},
|
|
1996
2012
|
[patchVehicleMutate, vehicles]
|
|
1997
2013
|
);
|
|
1998
|
-
const linkManagerMutation =
|
|
2014
|
+
const linkManagerMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
1999
2015
|
tripRef,
|
|
2000
2016
|
enqueue: (engine, input) => {
|
|
2001
2017
|
const { vehicleId, ...body } = input;
|
|
@@ -2009,7 +2025,7 @@ var useSeatingInternal = createDomainHook("transport-seating", (tripRef) => {
|
|
|
2009
2025
|
},
|
|
2010
2026
|
direct: (liveClient, input) => liveClient.seating.vehicles.manager.link({ tripRef, ...input })
|
|
2011
2027
|
});
|
|
2012
|
-
const unlinkManagerMutation =
|
|
2028
|
+
const unlinkManagerMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
2013
2029
|
tripRef,
|
|
2014
2030
|
enqueue: (engine, input) => {
|
|
2015
2031
|
const { vehicleId, version } = input;
|
|
@@ -2052,7 +2068,7 @@ function useSeating(tripRef) {
|
|
|
2052
2068
|
return useSeatingInternal(tripRef);
|
|
2053
2069
|
}
|
|
2054
2070
|
function useTravellerProfile(tripRef, travellerRef) {
|
|
2055
|
-
const client$1 =
|
|
2071
|
+
const client$1 = chunkUALMCHNW_cjs.useKaafilClient();
|
|
2056
2072
|
const [read, setRead] = react.useState(void 0);
|
|
2057
2073
|
const [readFailed, setReadFailed] = react.useState(false);
|
|
2058
2074
|
const refresh = react.useCallback(async () => {
|
|
@@ -2067,8 +2083,8 @@ function useTravellerProfile(tripRef, travellerRef) {
|
|
|
2067
2083
|
react.useEffect(() => {
|
|
2068
2084
|
void refresh();
|
|
2069
2085
|
}, [refresh]);
|
|
2070
|
-
|
|
2071
|
-
const noteMutation =
|
|
2086
|
+
chunkUALMCHNW_cjs.useOfflineEvent("sync.drained", refresh);
|
|
2087
|
+
const noteMutation = chunkUALMCHNW_cjs.useOfflineMutation({
|
|
2072
2088
|
tripRef,
|
|
2073
2089
|
enqueue: (engine, input) => engine.enqueue({
|
|
2074
2090
|
tripRef,
|
|
@@ -2090,8 +2106,8 @@ function useTravellerProfile(tripRef, travellerRef) {
|
|
|
2090
2106
|
return { read, readFailed, refresh, addNote };
|
|
2091
2107
|
}
|
|
2092
2108
|
function useVendors(tripRef, agencyRef) {
|
|
2093
|
-
const client =
|
|
2094
|
-
const { rows, loaded: capabilitiesLoaded } =
|
|
2109
|
+
const client = chunkUALMCHNW_cjs.useKaafilClient();
|
|
2110
|
+
const { rows, loaded: capabilitiesLoaded } = chunkUALMCHNW_cjs.useCapabilityRows(tripRef);
|
|
2095
2111
|
const [vendors, setVendors] = react.useState([]);
|
|
2096
2112
|
const [listLoaded, setListLoaded] = react.useState(false);
|
|
2097
2113
|
const [lastFetchFailed, setLastFetchFailed] = react.useState(false);
|
|
@@ -2120,9 +2136,9 @@ function useVendors(tripRef, agencyRef) {
|
|
|
2120
2136
|
return { status: "loading" };
|
|
2121
2137
|
}
|
|
2122
2138
|
const row = rows.find((candidate) => candidate.capability === "vendors");
|
|
2123
|
-
const triple = row === void 0 ?
|
|
2139
|
+
const triple = row === void 0 ? chunkUALMCHNW_cjs.UNKNOWN_CAPABILITY_TRIPLE : chunkUALMCHNW_cjs.deriveCapabilityTriple(row);
|
|
2124
2140
|
if (triple.status !== "lit") {
|
|
2125
|
-
const reason =
|
|
2141
|
+
const reason = chunkUALMCHNW_cjs.darkReasonFor(triple);
|
|
2126
2142
|
return { status: "dark", reason };
|
|
2127
2143
|
}
|
|
2128
2144
|
if (!listLoaded && lastFetchFailed) {
|
|
@@ -2191,5 +2207,5 @@ exports.useSeating = useSeating;
|
|
|
2191
2207
|
exports.useSnapshotList = useSnapshotList;
|
|
2192
2208
|
exports.useTravellerProfile = useTravellerProfile;
|
|
2193
2209
|
exports.useVendors = useVendors;
|
|
2194
|
-
//# sourceMappingURL=chunk-
|
|
2195
|
-
//# sourceMappingURL=chunk-
|
|
2210
|
+
//# sourceMappingURL=chunk-6WV5VYT2.cjs.map
|
|
2211
|
+
//# sourceMappingURL=chunk-6WV5VYT2.cjs.map
|