kaafil-react-uikit 0.8.0 → 0.9.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.
Files changed (56) hide show
  1. package/dist/admin/index.cjs +364 -348
  2. package/dist/admin/index.cjs.map +1 -1
  3. package/dist/admin/index.js +24 -8
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/{chunk-7O3TPYK4.cjs → chunk-2WPNGUX5.cjs} +17 -17
  6. package/dist/{chunk-7O3TPYK4.cjs.map → chunk-2WPNGUX5.cjs.map} +1 -1
  7. package/dist/{chunk-DYOAKTGJ.js → chunk-6PQWLUBA.js} +5 -5
  8. package/dist/{chunk-DYOAKTGJ.js.map → chunk-6PQWLUBA.js.map} +1 -1
  9. package/dist/{chunk-GKR52SVU.js → chunk-CCK3WPMF.js} +3 -3
  10. package/dist/{chunk-GKR52SVU.js.map → chunk-CCK3WPMF.js.map} +1 -1
  11. package/dist/{chunk-7COMKJTM.cjs → chunk-ELJPQSXY.cjs} +9 -9
  12. package/dist/{chunk-7COMKJTM.cjs.map → chunk-ELJPQSXY.cjs.map} +1 -1
  13. package/dist/{chunk-TDFM563X.cjs → chunk-FO5VJJUO.cjs} +12 -12
  14. package/dist/{chunk-TDFM563X.cjs.map → chunk-FO5VJJUO.cjs.map} +1 -1
  15. package/dist/{chunk-VU5BCK2P.js → chunk-FSSB6J3X.js} +3 -3
  16. package/dist/{chunk-VU5BCK2P.js.map → chunk-FSSB6J3X.js.map} +1 -1
  17. package/dist/{chunk-YHGAFRN6.js → chunk-GOSSRXBN.js} +3 -3
  18. package/dist/{chunk-YHGAFRN6.js.map → chunk-GOSSRXBN.js.map} +1 -1
  19. package/dist/{chunk-MP4IMAPF.cjs → chunk-IAXVUR7H.cjs} +55 -55
  20. package/dist/{chunk-MP4IMAPF.cjs.map → chunk-IAXVUR7H.cjs.map} +1 -1
  21. package/dist/{chunk-4R7QBTNL.cjs → chunk-PFTWPEVV.cjs} +4 -4
  22. package/dist/{chunk-4R7QBTNL.cjs.map → chunk-PFTWPEVV.cjs.map} +1 -1
  23. package/dist/chunk-PG7HNBTO.cjs +12 -0
  24. package/dist/{chunk-LBTAK5JA.cjs.map → chunk-PG7HNBTO.cjs.map} +1 -1
  25. package/dist/{chunk-ASFUY3IE.cjs → chunk-SMGXVEN3.cjs} +8 -4
  26. package/dist/chunk-SMGXVEN3.cjs.map +1 -0
  27. package/dist/{chunk-57DYMIWS.js → chunk-SO4F5LTH.js} +5 -5
  28. package/dist/{chunk-57DYMIWS.js.map → chunk-SO4F5LTH.js.map} +1 -1
  29. package/dist/{chunk-ZURCZQQ7.js → chunk-TESIDLJ6.js} +8 -4
  30. package/dist/chunk-TESIDLJ6.js.map +1 -0
  31. package/dist/{chunk-Q4B25EZO.js → chunk-TJGE4ZSX.js} +3 -3
  32. package/dist/{chunk-Q4B25EZO.js.map → chunk-TJGE4ZSX.js.map} +1 -1
  33. package/dist/{chunk-PQJGV3RE.cjs → chunk-TYBIAPPT.cjs} +83 -83
  34. package/dist/{chunk-PQJGV3RE.cjs.map → chunk-TYBIAPPT.cjs.map} +1 -1
  35. package/dist/{chunk-E3KOQYY2.js → chunk-YWMDBY43.js} +3 -3
  36. package/dist/{chunk-E3KOQYY2.js.map → chunk-YWMDBY43.js.map} +1 -1
  37. package/dist/core/index.cjs +107 -107
  38. package/dist/core/index.js +10 -10
  39. package/dist/manager/index.cjs +240 -240
  40. package/dist/manager/index.cjs.map +1 -1
  41. package/dist/manager/index.d.cts +16 -3
  42. package/dist/manager/index.d.ts +16 -3
  43. package/dist/manager/index.js +7 -7
  44. package/dist/manager/index.js.map +1 -1
  45. package/dist/offline/index.cjs +112 -0
  46. package/dist/offline/index.cjs.map +1 -0
  47. package/dist/offline/index.d.cts +129 -0
  48. package/dist/offline/index.d.ts +129 -0
  49. package/dist/offline/index.js +108 -0
  50. package/dist/offline/index.js.map +1 -0
  51. package/dist/traveller/index.cjs +35 -35
  52. package/dist/traveller/index.js +5 -5
  53. package/package.json +6 -1
  54. package/dist/chunk-ASFUY3IE.cjs.map +0 -1
  55. package/dist/chunk-LBTAK5JA.cjs +0 -12
  56. package/dist/chunk-ZURCZQQ7.js.map +0 -1
@@ -428,6 +428,13 @@ type ManagerTodayEngaged = Extract<WireOnly<ManagerTodayReady>, {
428
428
  type ManagerTodayIdle = Extract<WireOnly<ManagerTodayReady>, {
429
429
  kind: 'idle';
430
430
  }>;
431
+ /** The module a hero quick-link chip (or the closeout card's "still need
432
+ * closing" row) navigates to. Named rather than inlined because
433
+ * `KaafilManagerApp` maps every member onto a real `ManagerTripTabKey` and
434
+ * needs to refer to the union where its own `onNavigateModule` is optional —
435
+ * `Parameters<typeof onNavigateModule>[0]` cannot narrow through an optional
436
+ * prop. */
437
+ type ManagerModuleKey = 'manifest' | 'rooming' | 'checklist' | 'docs' | 'closing-day';
431
438
  interface ManagerNowSectionProps {
432
439
  /** The trip this section reads `useManagerToday(tripRef)` for — resolved
433
440
  * by the caller, typically off `useManagerMe()`'s own `defaultTripId`. */
@@ -438,7 +445,7 @@ interface ManagerNowSectionProps {
438
445
  * where each key routes to; a module whose composite doesn't exist yet
439
446
  * (`'closing-day'` included — `ClosingDayFlow` is a later wave) still
440
447
  * fires this callback, so the host can no-op it until it does. */
441
- readonly onNavigateModule: (moduleKey: 'manifest' | 'rooming' | 'checklist' | 'docs' | 'closing-day') => void;
448
+ readonly onNavigateModule: (moduleKey: ManagerModuleKey) => void;
442
449
  /** Fired once a Quick Actions "Log an expense" submit REALLY succeeds
443
450
  * (the FAB opens a real `LogExpenseSheet` internally, backed by
444
451
  * `useExpenses(tripRef).log()` — the same sheet `ManagerMoneySection`'s
@@ -883,8 +890,14 @@ interface KaafilManagerAppProps {
883
890
  * deep-linking level below `initialTripRef`/`activeTab` (e.g. landing
884
891
  * directly on the Money tab from a push notification). */
885
892
  readonly initialTripTabKey?: ManagerTripTabKey;
886
- /** `ManagerNowSection.onNavigateModule` (required there). */
887
- readonly onNavigateModule: (moduleKey: 'manifest' | 'rooming' | 'checklist' | 'docs' | 'closing-day') => void;
893
+ /** An analytics/URL-sync MIRROR, not the navigation itself — optional for
894
+ * the same reason `onOpenTraveller` is, and unlike the four required
895
+ * callbacks below. `ManagerNowSection.onNavigateModule` is required there
896
+ * and is satisfied by this Surface's own `handleNavigateModule`, which maps
897
+ * every key onto a real `ManagerTripTabKey` and performs the navigation
898
+ * directly. Omit it and the quick-link chips still work; you lose only the
899
+ * host-side hook. */
900
+ readonly onNavigateModule?: (moduleKey: ManagerModuleKey) => void;
888
901
  /** → `ManagerNowSection.onLogExpense` (required there). */
889
902
  readonly onLogExpense: () => void;
890
903
  /** → `ManagerNowSection.onCollectPayment` (required there). */
@@ -428,6 +428,13 @@ type ManagerTodayEngaged = Extract<WireOnly<ManagerTodayReady>, {
428
428
  type ManagerTodayIdle = Extract<WireOnly<ManagerTodayReady>, {
429
429
  kind: 'idle';
430
430
  }>;
431
+ /** The module a hero quick-link chip (or the closeout card's "still need
432
+ * closing" row) navigates to. Named rather than inlined because
433
+ * `KaafilManagerApp` maps every member onto a real `ManagerTripTabKey` and
434
+ * needs to refer to the union where its own `onNavigateModule` is optional —
435
+ * `Parameters<typeof onNavigateModule>[0]` cannot narrow through an optional
436
+ * prop. */
437
+ type ManagerModuleKey = 'manifest' | 'rooming' | 'checklist' | 'docs' | 'closing-day';
431
438
  interface ManagerNowSectionProps {
432
439
  /** The trip this section reads `useManagerToday(tripRef)` for — resolved
433
440
  * by the caller, typically off `useManagerMe()`'s own `defaultTripId`. */
@@ -438,7 +445,7 @@ interface ManagerNowSectionProps {
438
445
  * where each key routes to; a module whose composite doesn't exist yet
439
446
  * (`'closing-day'` included — `ClosingDayFlow` is a later wave) still
440
447
  * fires this callback, so the host can no-op it until it does. */
441
- readonly onNavigateModule: (moduleKey: 'manifest' | 'rooming' | 'checklist' | 'docs' | 'closing-day') => void;
448
+ readonly onNavigateModule: (moduleKey: ManagerModuleKey) => void;
442
449
  /** Fired once a Quick Actions "Log an expense" submit REALLY succeeds
443
450
  * (the FAB opens a real `LogExpenseSheet` internally, backed by
444
451
  * `useExpenses(tripRef).log()` — the same sheet `ManagerMoneySection`'s
@@ -883,8 +890,14 @@ interface KaafilManagerAppProps {
883
890
  * deep-linking level below `initialTripRef`/`activeTab` (e.g. landing
884
891
  * directly on the Money tab from a push notification). */
885
892
  readonly initialTripTabKey?: ManagerTripTabKey;
886
- /** `ManagerNowSection.onNavigateModule` (required there). */
887
- readonly onNavigateModule: (moduleKey: 'manifest' | 'rooming' | 'checklist' | 'docs' | 'closing-day') => void;
893
+ /** An analytics/URL-sync MIRROR, not the navigation itself — optional for
894
+ * the same reason `onOpenTraveller` is, and unlike the four required
895
+ * callbacks below. `ManagerNowSection.onNavigateModule` is required there
896
+ * and is satisfied by this Surface's own `handleNavigateModule`, which maps
897
+ * every key onto a real `ManagerTripTabKey` and performs the navigation
898
+ * directly. Omit it and the quick-link chips still work; you lose only the
899
+ * host-side hook. */
900
+ readonly onNavigateModule?: (moduleKey: ManagerModuleKey) => void;
888
901
  /** → `ManagerNowSection.onLogExpense` (required there). */
889
902
  readonly onLogExpense: () => void;
890
903
  /** → `ManagerNowSection.onCollectPayment` (required there). */
@@ -1,9 +1,9 @@
1
- import { useManagerMe, useConflicts, useNotifications } from '../chunk-E3KOQYY2.js';
2
- import { FORM_FIELD_KIND_SINGLE_BOOLEAN, useChecklists, useManagers, useCloseout, useFiles, useFloat, useForms, useParties, useItinerary, useVendors, useExpenses, useCollections, useManagerToday, usePickups, useRooming, useTravellerProfile, useSeating } from '../chunk-VU5BCK2P.js';
3
- import { useOfflineEngine } from '../chunk-Q4B25EZO.js';
4
- import { OfflineFallbackScreen } from '../chunk-YHGAFRN6.js';
5
- export { BootErrorScreen, LockedTripScreen, NotFoundScreen, OfflineFallbackScreen, SessionExpiredScreen } from '../chunk-YHGAFRN6.js';
6
- import { createRegistry, useKaafilChrome, tokenStyle, useOutboxStatus, useSession, useKaafilBrand } from '../chunk-ZURCZQQ7.js';
1
+ import { useManagerMe, useConflicts, useNotifications } from '../chunk-YWMDBY43.js';
2
+ import { FORM_FIELD_KIND_SINGLE_BOOLEAN, useChecklists, useManagers, useCloseout, useFiles, useFloat, useForms, useParties, useItinerary, useVendors, useExpenses, useCollections, useManagerToday, usePickups, useRooming, useTravellerProfile, useSeating } from '../chunk-FSSB6J3X.js';
3
+ import { useOfflineEngine } from '../chunk-TJGE4ZSX.js';
4
+ import { OfflineFallbackScreen } from '../chunk-GOSSRXBN.js';
5
+ export { BootErrorScreen, LockedTripScreen, NotFoundScreen, OfflineFallbackScreen, SessionExpiredScreen } from '../chunk-GOSSRXBN.js';
6
+ import { createRegistry, useKaafilChrome, tokenStyle, useOutboxStatus, useSession, useKaafilBrand } from '../chunk-TESIDLJ6.js';
7
7
  import { useState, useRef, useEffect, useMemo, useId } from 'react';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
 
@@ -13321,7 +13321,7 @@ function ReadyKaafilManagerApp(props) {
13321
13321
  const mappedTab = NAVIGATE_MODULE_TAB[moduleKey];
13322
13322
  setTripTabKey(mappedTab);
13323
13323
  onTripTabChange?.(mappedTab);
13324
- onNavigateModule(moduleKey);
13324
+ onNavigateModule?.(moduleKey);
13325
13325
  }
13326
13326
  function handleOpenTraveller(travellerId, fullName) {
13327
13327
  setOpenTraveller({ travellerId, fullName });