@admin-layout/client 12.2.5-alpha.2 → 12.2.5-alpha.27
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/lib/__tests__/ApplicationErrorHandlerCommon.ssr.test.d.ts +2 -0
- package/lib/__tests__/ApplicationErrorHandlerCommon.ssr.test.d.ts.map +1 -0
- package/lib/components/ApplicationErrorHandlerCommon.d.ts.map +1 -1
- package/lib/components/ApplicationErrorHandlerCommon.js +8 -3
- package/lib/components/ApplicationErrorHandlerCommon.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.native.js +1 -1
- package/lib/utils/bookingCard.d.ts +98 -0
- package/lib/utils/bookingCard.d.ts.map +1 -0
- package/lib/utils/bookingCard.js +166 -0
- package/lib/utils/bookingCard.js.map +1 -0
- package/lib/utils/bookingCard.test.d.ts +2 -0
- package/lib/utils/bookingCard.test.d.ts.map +1 -0
- package/lib/utils/flightCards.d.ts +120 -0
- package/lib/utils/flightCards.d.ts.map +1 -1
- package/lib/utils/flightCards.js +370 -12
- package/lib/utils/flightCards.js.map +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/resultCards.d.ts +246 -0
- package/lib/utils/resultCards.d.ts.map +1 -0
- package/lib/utils/resultCards.js +641 -0
- package/lib/utils/resultCards.js.map +1 -0
- package/lib/utils/resultCards.test.d.ts +2 -0
- package/lib/utils/resultCards.test.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandlerCommon.ssr.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/ApplicationErrorHandlerCommon.ssr.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandlerCommon.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"names":[],"mappings":"AAAA,OAAc,E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AE,CAAC;IAC3C,YAAY,EAAE,qBAAqB,CAAA;CACpC,KAAK,YAAY,CAAC;AAEnB,KAAK,yBAAyB,GAAG,CAC/B,KAAK,EAAE;IACL,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QACT,MAAM,EAAE,OAAO,CAAC;QAChB,iBAAiB,EAAE,qBAAqB,EAAE,CAAA;KAC3C,CAAA;CACF,KACE,YAAY,CAAC;AA6ClB;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,iBAAiB,KAAA,EACjB,oBAAoB,CAAC,EAAE,yBAAyB,EAChD,iBAAiB,CAAC,EAAE,sBAAsB,IAEO,uBAAuB,kCAAkC,KAAG,YAAY,CA6B1H"}
|
|
@@ -32,9 +32,14 @@ function ApplicationErrorHandlerCommon(FallbackComponent, ApplicationErrorSlot,
|
|
|
32
32
|
// In SPA mode, the server renders without providers, so we just render children
|
|
33
33
|
const isSSR = typeof window === 'undefined';
|
|
34
34
|
if (isSSR) {
|
|
35
|
-
// During SSR/build,
|
|
36
|
-
//
|
|
37
|
-
|
|
35
|
+
// During SSR/build, render the children without Redux functionality; hydration brings
|
|
36
|
+
// the rest. Same shape as ApplicationErrorHandlerInner's fragment with nothing to report
|
|
37
|
+
// (the fallback slot, then the children): React numbers useId by tree position, so a
|
|
38
|
+
// bare `<>{children}</>` here put every useId below one fork off the browser's, and
|
|
39
|
+
// each label/aria id pair in the app failed hydration on every page load.
|
|
40
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
41
|
+
null,
|
|
42
|
+
children));
|
|
38
43
|
}
|
|
39
44
|
return (React__default.createElement(ApplicationErrorHandlerInner, { FallbackComponent: FallbackComponent, ApplicationErrorSlot: ApplicationErrorSlot, RendererComponent: RendererComponent, plugins: plugins, children: children }));
|
|
40
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandlerCommon.js","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"sourcesContent":[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
|
+
{"version":3,"file":"ApplicationErrorHandlerCommon.js","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"oRAUG;AACH,SAAA,4BAAU,CAAA,EAAA,iBAAkC,EAAA,oBAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,QAAA,GAAA,EAAA;AAC1C,IAAA,MAAA,iBAAsB,GAAE,WAAK,CAAA,CAAA,KAAA,KAAA,KAAA,EAAA,iBAAA,CAAA;IAC7B,MAAA,0BAAmB,EAAA,MAAA,CAAA,CAAA,KAAA,KAAA,CAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA,MAAA,KAAA,MAAA,CAAA,IAAA,KAAA,KAAA,EAAA,UAAA,CAAA,CAAA;AACpB,IAAA,MAAA,YAAA,GAAA,WAAA,CAAA,oBAAA,CAAA;AAED,IAAA,SAAK,0BAAiC,CAAA,KAAA,EAAA;QACpC,OAAA,CAAA,CAAA,oBAAmB,GAAAA,cAAqB,CAAE,aAAC,CAAA,oBAAA,EAAA,EAAA,GAAA,KAAA,EAAA,CAAA,GAAAA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,GAAA,KAAA,EAAA,CAAA;IAC3C;AACD,IAAA,uBAAkB,EAAA;AAEnB,QAAK,OAAAA,cAAA,CAAA,aACH,CAAA,iBAAO,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,YAAA,EAAA,YAAA,EAAA,CAAA;IACL;AACA,IAAA,QAAAA,cAAW,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA;QACT,CAAA,CAAA,eAAgBA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA,EAAA,KAAA,EAAA,YAAA,EAAA,CAAA,GAAA,IAAA;QAChB,CAAA,CAAA,MAAA,EAAA;cACDA,cAAA,CAAA,aAAA,CAAA,0BAAA,EAAA,EAAA,IAAA,EAAA,2BAAA,EAAA,SAAA,EAAA,EAAA,MAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA;AACF,sBACe,CAAA;AA6ClB;;;;;;;;;;AAUG;AACH;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SearchBarBehavior}from'./interfaces/settings.js';export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{safeLocalStorage}from'./utils/storage.js';export{getStorageMode,isSpaMode,settingsStorage}from'./utils/settingsStorage.js';export{dateLabel,dayOffset,durationLabel,flightPrice,isFlightAttachment,stopsLabel,toFlightCard,toFlightCards,wallClock}from'./utils/flightCards.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';export{config}from'./config/env-config.js';export{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,DEFAULT_SETTINGS,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';export{blue}from'./colors/presets/blue.js';export{brinkPink}from'./colors/presets/brinkPink.js';export{cyan}from'./colors/presets/cyan.js';export{green}from'./colors/presets/green.js';export{lime}from'./colors/presets/lime.js';export{orange}from'./colors/presets/orange.js';export{pink}from'./colors/presets/pink.js';export{purple}from'./colors/presets/purple.js';export{red}from'./colors/presets/red.js';export{skyBlue}from'./colors/presets/skyBlue.js';export{turquoise}from'./colors/presets/turquoise.js';export{yellow}from'./colors/presets/yellow.js';export{white}from'./colors/presets/white.js';export{black}from'./colors/presets/black.js';export{colorList,getThemeColors}from'./colors/colorsList.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
export{SearchBarBehavior}from'./interfaces/settings.js';export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{safeLocalStorage}from'./utils/storage.js';export{getStorageMode,isSpaMode,settingsStorage}from'./utils/settingsStorage.js';export{airlineCode,airlineLogoUrl,airlineTone,cabinLabel,dateLabel,dayOffset,durationLabel,fareLineLabel,flightBadgeLabel,flightNumberLabel,flightPrice,flightPriceValue,flightResultSummary,isFlightAttachment,rankFlightCards,sortFlightCards,stopsLabel,toFlightCard,toFlightCards,wallClock}from'./utils/flightCards.js';export{carSummary,countLabel,daysSince,groundSummary,hostLabel,jobSummary,movieSummary,postedLabel,productSummary,ratingLabel,resultBadgeLabel,sortResultCards,sourceLabelOf,staySummary,toCarCard,toCarCards,toGroundCard,toGroundCards,toJobCard,toJobCards,toMovieCard,toMovieCards,toProductCard,toProductCards,toResumeCard,toStayCard,toStayCards,travelItemKind,travelResultKind,travelResultNoun}from'./utils/resultCards.js';export{FAVICON_SERVICE,faviconUrl,isFallbackFavicon,toBookingView}from'./utils/bookingCard.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';export{config}from'./config/env-config.js';export{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,DEFAULT_SETTINGS,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';export{useLayoutSettings}from'./hooks/useLayoutSettings.js';export{usePermissionAutoFetch,useSetting,useSettingsLoader}from'@adminide-stack/platform-client';export{ClientOnly}from'./hooks/Client-only.js';export{blue}from'./colors/presets/blue.js';export{brinkPink}from'./colors/presets/brinkPink.js';export{cyan}from'./colors/presets/cyan.js';export{green}from'./colors/presets/green.js';export{lime}from'./colors/presets/lime.js';export{orange}from'./colors/presets/orange.js';export{pink}from'./colors/presets/pink.js';export{purple}from'./colors/presets/purple.js';export{red}from'./colors/presets/red.js';export{skyBlue}from'./colors/presets/skyBlue.js';export{turquoise}from'./colors/presets/turquoise.js';export{yellow}from'./colors/presets/yellow.js';export{white}from'./colors/presets/white.js';export{black}from'./colors/presets/black.js';export{colorList,getThemeColors}from'./colors/colorsList.js';//# sourceMappingURL=index.js.map
|
package/lib/index.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SearchBarBehavior}from'./interfaces/settings.js';export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{safeLocalStorage}from'./utils/storage.js';export{getStorageMode,isSpaMode,settingsStorage}from'./utils/settingsStorage.js';export{dateLabel,dayOffset,durationLabel,flightPrice,isFlightAttachment,stopsLabel,toFlightCard,toFlightCards,wallClock}from'./utils/flightCards.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';export{config}from'./config/env-config.js';export{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,DEFAULT_SETTINGS,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';//# sourceMappingURL=index.native.js.map
|
|
1
|
+
export{SearchBarBehavior}from'./interfaces/settings.js';export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{settingsReducer}from'./redux/reducers/settings.js';export{store}from'./redux/store.js';export{useAppDispatch,useAppSelector}from'./redux/hooks.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.js';export{generateMenuPath}from'./utils/generateMenuLink.js';export{compareAndSaveSettingsDifferences}from'./utils/settingsDifference.js';export{safeLocalStorage}from'./utils/storage.js';export{getStorageMode,isSpaMode,settingsStorage}from'./utils/settingsStorage.js';export{airlineCode,airlineLogoUrl,airlineTone,cabinLabel,dateLabel,dayOffset,durationLabel,fareLineLabel,flightBadgeLabel,flightNumberLabel,flightPrice,flightPriceValue,flightResultSummary,isFlightAttachment,rankFlightCards,sortFlightCards,stopsLabel,toFlightCard,toFlightCards,wallClock}from'./utils/flightCards.js';export{carSummary,countLabel,daysSince,groundSummary,hostLabel,jobSummary,movieSummary,postedLabel,productSummary,ratingLabel,resultBadgeLabel,sortResultCards,sourceLabelOf,staySummary,toCarCard,toCarCards,toGroundCard,toGroundCards,toJobCard,toJobCards,toMovieCard,toMovieCards,toProductCard,toProductCards,toResumeCard,toStayCard,toStayCards,travelItemKind,travelResultKind,travelResultNoun}from'./utils/resultCards.js';export{FAVICON_SERVICE,faviconUrl,isFallbackFavicon,toBookingView}from'./utils/bookingCard.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{LayoutCookieProvider}from'./components/LayoutCookieProvider.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';export{config}from'./config/env-config.js';export{AMENITIES,DEFAULT_HEADER,DEFAULT_LAYOUT,DEFAULT_SETTINGS,SEARCH_TYPES,SHARED_VIEW_CONFIG}from'./config/defaultSettings.js';//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export type BookingKind = 'flight' | 'stay' | 'order' | 'other';
|
|
2
|
+
export type BookingStatus = 'review' | 'processing' | 'declined' | 'confirmed' | 'cancelled';
|
|
3
|
+
/** The `booking` widget's attachment, as the agent sends it. */
|
|
4
|
+
export interface BookingAttachmentLike {
|
|
5
|
+
kind?: BookingKind;
|
|
6
|
+
vendor?: string;
|
|
7
|
+
vendorDomain?: string;
|
|
8
|
+
vendorLogo?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
date?: string;
|
|
11
|
+
trip?: {
|
|
12
|
+
origin?: string;
|
|
13
|
+
destination?: string;
|
|
14
|
+
departAt?: string;
|
|
15
|
+
arriveAt?: string;
|
|
16
|
+
stops?: number;
|
|
17
|
+
durationMinutes?: number;
|
|
18
|
+
flightNumber?: string;
|
|
19
|
+
};
|
|
20
|
+
items?: Array<{
|
|
21
|
+
title?: string;
|
|
22
|
+
detail?: string;
|
|
23
|
+
quantity?: number;
|
|
24
|
+
price?: number;
|
|
25
|
+
priceLabel?: string;
|
|
26
|
+
imageUrl?: string;
|
|
27
|
+
}>;
|
|
28
|
+
lines?: Array<{
|
|
29
|
+
label?: string;
|
|
30
|
+
value?: string;
|
|
31
|
+
}>;
|
|
32
|
+
charges?: Array<{
|
|
33
|
+
label?: string;
|
|
34
|
+
amount?: number;
|
|
35
|
+
amountLabel?: string;
|
|
36
|
+
}>;
|
|
37
|
+
total?: number | string;
|
|
38
|
+
totalLabel?: string;
|
|
39
|
+
currency?: string;
|
|
40
|
+
status?: BookingStatus;
|
|
41
|
+
statusNote?: string;
|
|
42
|
+
reference?: string;
|
|
43
|
+
confirmLabel?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface BookingView {
|
|
46
|
+
kind: BookingKind;
|
|
47
|
+
vendor: string;
|
|
48
|
+
/** The vendor's mark: its own https logo, an airline's, else its site's icon. */
|
|
49
|
+
logo?: string;
|
|
50
|
+
monogram: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
date?: string;
|
|
53
|
+
trip?: {
|
|
54
|
+
from?: string;
|
|
55
|
+
to?: string;
|
|
56
|
+
departs?: string;
|
|
57
|
+
arrives?: string;
|
|
58
|
+
arrivesDayOffset?: string;
|
|
59
|
+
duration?: string;
|
|
60
|
+
stops?: string;
|
|
61
|
+
flightNumber?: string;
|
|
62
|
+
};
|
|
63
|
+
items: Array<{
|
|
64
|
+
key: string;
|
|
65
|
+
title: string;
|
|
66
|
+
detail?: string;
|
|
67
|
+
quantity?: number;
|
|
68
|
+
price?: string;
|
|
69
|
+
imageUrl?: string;
|
|
70
|
+
}>;
|
|
71
|
+
lines: Array<{
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
}>;
|
|
75
|
+
charges: Array<{
|
|
76
|
+
label: string;
|
|
77
|
+
amount: string;
|
|
78
|
+
}>;
|
|
79
|
+
total?: string;
|
|
80
|
+
status: BookingStatus;
|
|
81
|
+
/** The banner over the card, for anything but a booking awaiting review. */
|
|
82
|
+
statusLabel?: string;
|
|
83
|
+
reference?: string;
|
|
84
|
+
/** The one button, and the go-ahead it sends, word for word; null when there is nothing to do. */
|
|
85
|
+
action: {
|
|
86
|
+
label: string;
|
|
87
|
+
reply: string;
|
|
88
|
+
} | null;
|
|
89
|
+
}
|
|
90
|
+
/** Google's favicon service: a site's icon by domain. Its 16px globe means it has none. */
|
|
91
|
+
export declare const FAVICON_SERVICE = "https://www.google.com/s2/favicons";
|
|
92
|
+
/** A site's icon, asked for at 64px (a real one comes back at 32px or more). */
|
|
93
|
+
export declare const faviconUrl: (domain: string) => string;
|
|
94
|
+
/** True for the favicon service's stand-in: a 16px globe for a site it has no icon for. */
|
|
95
|
+
export declare const isFallbackFavicon: (image: Pick<HTMLImageElement, "src" | "naturalWidth">) => boolean;
|
|
96
|
+
/** The booking summary as the card draws it, or null when it names neither a vendor nor a total. */
|
|
97
|
+
export declare const toBookingView: (attachment: unknown) => BookingView | null;
|
|
98
|
+
//# sourceMappingURL=bookingCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingCard.d.ts","sourceRoot":"","sources":["../../src/utils/bookingCard.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAK7F,gEAAgE;AAChE,MAAM,WAAW,qBAAqB;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E,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACnD;AAED,2FAA2F;AAC3F,eAAO,MAAM,eAAe,uCAAuC,CAAC;AAiDpE,gFAAgF;AAChF,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM,KAAG,MAAyE,CAAC;AAEtH,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,GAAI,OAAO,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,cAAc,CAAC,KAAG,OACK,CAAC;AAiChG,oGAAoG;AACpG,eAAO,MAAM,aAAa,GAAI,YAAY,OAAO,KAAG,WAAW,GAAG,IAwFjE,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {stopsLabel,durationLabel,dayOffset,wallClock,dateLabel,airlineLogoUrl,airlineCode}from'./flightCards.js';/**
|
|
2
|
+
* The booking summary the agent shows before it books a flight or a stay, or places an order: who,
|
|
3
|
+
* what, the itinerary or items, the charges and the total, and the one go-ahead the person gives.
|
|
4
|
+
* Pure, zero imports beyond the flight helpers, so every chat renderer (web, phone) reads it the same.
|
|
5
|
+
*/
|
|
6
|
+
const BOOKING_KINDS = ['flight', 'stay', 'order', 'other'];
|
|
7
|
+
const BOOKING_STATUSES = ['review', 'processing', 'declined', 'confirmed', 'cancelled'];
|
|
8
|
+
/** Google's favicon service: a site's icon by domain. Its 16px globe means it has none. */
|
|
9
|
+
const FAVICON_SERVICE = 'https://www.google.com/s2/favicons';
|
|
10
|
+
const text = (value) => typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
11
|
+
const num = (value) => typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
12
|
+
/**
|
|
13
|
+
* An exact amount, cents kept: a booking's total is what the person says yes to, never rounded the
|
|
14
|
+
* way a fare quote is ("$42.50", "₹11,161"). An unknown currency code must not take the card down.
|
|
15
|
+
*/
|
|
16
|
+
const money = (value, currency) => {
|
|
17
|
+
const cents = !Number.isInteger(value);
|
|
18
|
+
try {
|
|
19
|
+
return new Intl.NumberFormat('en-US', {
|
|
20
|
+
style: 'currency',
|
|
21
|
+
currency,
|
|
22
|
+
minimumFractionDigits: cents ? 2 : 0,
|
|
23
|
+
maximumFractionDigits: cents ? 2 : 0,
|
|
24
|
+
})
|
|
25
|
+
.format(value)
|
|
26
|
+
.replace(/\u00a0/g, ' ');
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return `${value} ${currency}`;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/** A label that is only an ISO code and an amount: "USD 42.50", "42.50 USD". */
|
|
33
|
+
const CODE_AMOUNT = /^(?:([A-Z]{3})\s*([\d,]+(?:\.\d+)?)|([\d,]+(?:\.\d+)?)\s*([A-Z]{3}))$/;
|
|
34
|
+
/** "$1,204" from a number, or the agent's label ("USD 42.50" reads "$42.50"); undefined when neither. */
|
|
35
|
+
const amount = (value, currency, label) => {
|
|
36
|
+
const given = text(label) ?? (typeof value === 'string' ? text(value) : undefined);
|
|
37
|
+
if (given) {
|
|
38
|
+
const m = CODE_AMOUNT.exec(given);
|
|
39
|
+
const n = m ? Number((m[2] ?? m[3]).replace(/,/g, '')) : NaN;
|
|
40
|
+
return m && Number.isFinite(n) ? money(n, m[1] ?? m[4]) : given;
|
|
41
|
+
}
|
|
42
|
+
const n = num(value);
|
|
43
|
+
return n == null ? undefined : money(n, currency ?? 'USD');
|
|
44
|
+
};
|
|
45
|
+
const cleanDomain = (value) => text(value)
|
|
46
|
+
?.replace(/^https?:\/\//i, '')
|
|
47
|
+
.replace(/\/.*$/, '')
|
|
48
|
+
.toLowerCase() || undefined;
|
|
49
|
+
/** A site's icon, asked for at 64px (a real one comes back at 32px or more). */
|
|
50
|
+
const faviconUrl = (domain) => `${FAVICON_SERVICE}?domain=${encodeURIComponent(domain)}&sz=64`;
|
|
51
|
+
/** True for the favicon service's stand-in: a 16px globe for a site it has no icon for. */
|
|
52
|
+
const isFallbackFavicon = (image) => image.src.startsWith(FAVICON_SERVICE) && image.naturalWidth > 0 && image.naturalWidth <= 16;
|
|
53
|
+
/** The kind the agent named; else a trip means a flight and anything else an order. */
|
|
54
|
+
const bookingKind = (a) => {
|
|
55
|
+
if (BOOKING_KINDS.includes(a.kind))
|
|
56
|
+
return a.kind;
|
|
57
|
+
return a.trip ? 'flight' : 'order';
|
|
58
|
+
};
|
|
59
|
+
/** What the go-ahead says yes to, per kind. */
|
|
60
|
+
const GO_AHEAD = {
|
|
61
|
+
flight: 'book it',
|
|
62
|
+
stay: 'book it',
|
|
63
|
+
order: 'place the order',
|
|
64
|
+
other: 'go ahead',
|
|
65
|
+
};
|
|
66
|
+
const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
67
|
+
/** The banner over the card: what is happening with the booking, in a few words. */
|
|
68
|
+
const statusLabelOf = (status, kind, note, reference) => {
|
|
69
|
+
if (status === 'processing')
|
|
70
|
+
return kind === 'order' ? 'Placing your order…' : 'Booking…';
|
|
71
|
+
if (status === 'declined')
|
|
72
|
+
return note ?? 'Payment declined';
|
|
73
|
+
if (status === 'confirmed')
|
|
74
|
+
return `${kind === 'order' ? 'Order placed' : 'Booked'}${reference ? ` · ${reference}` : ''}`;
|
|
75
|
+
if (status === 'cancelled')
|
|
76
|
+
return note ?? 'Cancelled';
|
|
77
|
+
return note;
|
|
78
|
+
};
|
|
79
|
+
/** The booking summary as the card draws it, or null when it names neither a vendor nor a total. */
|
|
80
|
+
const toBookingView = (attachment) => {
|
|
81
|
+
const a = (attachment ?? {});
|
|
82
|
+
const vendor = text(a.vendor);
|
|
83
|
+
const total = amount(a.total, a.currency, a.totalLabel);
|
|
84
|
+
if (!vendor && !total)
|
|
85
|
+
return null;
|
|
86
|
+
const kind = bookingKind(a);
|
|
87
|
+
const status = BOOKING_STATUSES.includes(a.status)
|
|
88
|
+
? a.status
|
|
89
|
+
: 'review';
|
|
90
|
+
const name = vendor ?? 'Your booking';
|
|
91
|
+
const { trip } = a;
|
|
92
|
+
const flightNumber = text(trip?.flightNumber);
|
|
93
|
+
const tripView = trip
|
|
94
|
+
? {
|
|
95
|
+
...(text(trip.origin) ? { from: text(trip.origin).toUpperCase() } : {}),
|
|
96
|
+
...(text(trip.destination) ? { to: text(trip.destination).toUpperCase() } : {}),
|
|
97
|
+
...(wallClock(trip.departAt) ? { departs: wallClock(trip.departAt) } : {}),
|
|
98
|
+
...(wallClock(trip.arriveAt) ? { arrives: wallClock(trip.arriveAt) } : {}),
|
|
99
|
+
...(dayOffset(trip.departAt, trip.arriveAt)
|
|
100
|
+
? { arrivesDayOffset: dayOffset(trip.departAt, trip.arriveAt) }
|
|
101
|
+
: {}),
|
|
102
|
+
...(durationLabel(trip.durationMinutes) ? { duration: durationLabel(trip.durationMinutes) } : {}),
|
|
103
|
+
...(stopsLabel(trip.stops) ? { stops: stopsLabel(trip.stops) } : {}),
|
|
104
|
+
...(flightNumber ? { flightNumber } : {}),
|
|
105
|
+
}
|
|
106
|
+
: undefined;
|
|
107
|
+
const date = dateLabel(a.date) ?? dateLabel(trip?.departAt) ?? text(a.date);
|
|
108
|
+
const reference = text(a.reference);
|
|
109
|
+
const what = [name, text(a.title), date ? `on ${date}` : undefined].filter(Boolean).join(', ');
|
|
110
|
+
let action = null;
|
|
111
|
+
if (status === 'review') {
|
|
112
|
+
action = {
|
|
113
|
+
// The go-ahead, not the payment: money moves later, on the payment page or card, so the
|
|
114
|
+
// button never says "pay".
|
|
115
|
+
label: text(a.confirmLabel) ?? `${capitalize(GO_AHEAD[kind])}${total ? ` · ${total}` : ''}`,
|
|
116
|
+
reply: `Yes, ${GO_AHEAD[kind]}: ${what}${total ? `, ${total} total` : ''}.`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
else if (status === 'declined') {
|
|
120
|
+
action = {
|
|
121
|
+
label: total ? `Retry ${total}` : 'Retry payment',
|
|
122
|
+
reply: `Retry the payment: ${what}${total ? `, ${total} total` : ''}.`,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const ownLogo = text(a.vendorLogo);
|
|
126
|
+
const domain = cleanDomain(a.vendorDomain);
|
|
127
|
+
const logo = (ownLogo && /^https:\/\//i.test(ownLogo) ? ownLogo : undefined) ??
|
|
128
|
+
(kind === 'flight' ? airlineLogoUrl(vendor, flightNumber ? [flightNumber] : undefined) : undefined) ??
|
|
129
|
+
(domain ? faviconUrl(domain) : undefined);
|
|
130
|
+
const statusLabel = statusLabelOf(status, kind, text(a.statusNote), reference);
|
|
131
|
+
return {
|
|
132
|
+
kind,
|
|
133
|
+
vendor: name,
|
|
134
|
+
...(logo ? { logo } : {}),
|
|
135
|
+
monogram: airlineCode(name, flightNumber ? [flightNumber] : undefined),
|
|
136
|
+
...(text(a.title) ? { title: text(a.title) } : {}),
|
|
137
|
+
...(date ? { date } : {}),
|
|
138
|
+
...(tripView && Object.keys(tripView).length > 0 ? { trip: tripView } : {}),
|
|
139
|
+
items: (Array.isArray(a.items) ? a.items : [])
|
|
140
|
+
.filter((item) => text(item?.title))
|
|
141
|
+
.map((item, index) => {
|
|
142
|
+
const price = amount(item.price, a.currency, item.priceLabel);
|
|
143
|
+
return {
|
|
144
|
+
key: `${text(item.title)}-${index}`,
|
|
145
|
+
title: text(item.title),
|
|
146
|
+
...(text(item.detail) ? { detail: text(item.detail) } : {}),
|
|
147
|
+
...((num(item.quantity) ?? 0) > 1 ? { quantity: item.quantity } : {}),
|
|
148
|
+
...(price ? { price } : {}),
|
|
149
|
+
...(text(item.imageUrl) && /^https?:\/\//i.test(item.imageUrl) ? { imageUrl: item.imageUrl } : {}),
|
|
150
|
+
};
|
|
151
|
+
}),
|
|
152
|
+
lines: (Array.isArray(a.lines) ? a.lines : [])
|
|
153
|
+
.filter((line) => text(line?.label) && text(line?.value))
|
|
154
|
+
.map((line) => ({ label: text(line.label), value: text(line.value) })),
|
|
155
|
+
charges: (Array.isArray(a.charges) ? a.charges : []).flatMap((charge) => {
|
|
156
|
+
const label = text(charge?.label);
|
|
157
|
+
const value = amount(charge?.amount, a.currency, charge?.amountLabel);
|
|
158
|
+
return label && value ? [{ label, amount: value }] : [];
|
|
159
|
+
}),
|
|
160
|
+
...(total ? { total } : {}),
|
|
161
|
+
status,
|
|
162
|
+
...(statusLabel ? { statusLabel } : {}),
|
|
163
|
+
...(reference ? { reference } : {}),
|
|
164
|
+
action,
|
|
165
|
+
};
|
|
166
|
+
};export{FAVICON_SERVICE,faviconUrl,isFallbackFavicon,toBookingView};//# sourceMappingURL=bookingCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingCard.js","sources":["../../src/utils/bookingCard.ts"],"sourcesContent":[null],"names":[],"mappings":"iHAOA;AACA;AAKA;AACA;;MAGI,aAAe,GAAA,CAAA,QAAO,EAAA,MAAA,EAAA,OAAA,EAAA,OAAA,CAAA;MACtB,gBAAa,GAAO,CAAA,QAAA,EAAA,YAAA,EAAA,UAAA,EAAA,WAAA,EAAA,WAAA,CAAA;;AAEb,MAAA,eAAO,GAAA;AACd,MAAA,IAAK,GAAE,CAAA,KAAA,KAAA,OAAA,KAAA,KAAA,QAAA,IAAA,KAAA,CAAA,IAAA,EAAA,GAAA,KAAA,CAAA,IAAA,EAAA,GAAA,SAAA;SACH,GAAA,CAAA,KAAS,KAAM,OAAC,KAAA,KAAA,QAAA,IAAA,MAAA,CAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAA,GAAA,SAAA;;;;;WAKhB,GAAA,CAAA,KAAA,EAAA,QAAkB,KAAO;UACzB,KAAA,GAAA,CAAA,MAAe,CAAA,SAAO,CAAA,KAAA,CAAA;QACxB;QACF,OAAQ,IAAM,IAAA,CAAA,YAAA,CAAA,OAAA,EAAA;YACV,KAAQ,EAAA,UAAO;YACf,QAAS;YACT,qBAAkB,EAAA,KAAA,GAAA,CAAA,GAAA,CAAA;Y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AAA,QAAA,EAAA,CAAA,CAAA,UAAA,CAAA;AACA,IAAA,IAAA,CAAA,MAAQ,IAAA,CAAA,KAAA;QAAE,OAAO;UAAQ,IAAK,cAAQ,CAAA,CAAA,CAAA;AAAE,IAAA,YAAQ,GAAA,gBAAA,CAAA,QAAA,CAAA,CAAA,CAAA,MAAA;AACnD,UAAA,CAAA,CAAA;AAED,UAAA,QAAA;AACA,IAAA,MAAA,IAAA,GAAO,MAAM,IAAA,cAAe;AAiD5B,IAAA,MAAA,EAAA,IAAA,EAAA,GAAA,CAAA;AACA,IAAA,MAAA,YAAa,GAAA,IAAA,CAAA,IAAc,cAAc,CAAA;AAEzC,IAAA,MAAA,QAAA,GAAA;AACA,UAAA;AAkCA,YAAA,IAAA,IAAA,CAAA,IAAA,CAAA,MAAA,CAAA,GAAA,EAAA,IAAA,EAAA,IAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,CAAA;AACA,YAAA,IAAO,IAAA,CAAM,gBAAiB,CAAA,GAAA,EAAA,EAAA,EAAA,SAAmB,CAAA,WAAG,CAAA,CAAA,WAwFlD,EAAA,EAAA,GAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingCard.test.d.ts","sourceRoot":"","sources":["../../src/utils/bookingCard.test.ts"],"names":[],"mappings":""}
|
|
@@ -33,6 +33,14 @@ export interface TravelFlightDetails {
|
|
|
33
33
|
seller?: string;
|
|
34
34
|
/** e.g. "economy", "premium_economy", "business". */
|
|
35
35
|
cabinClass?: string;
|
|
36
|
+
/** The airline's name for the fare, e.g. "Economy Light", "Main Cabin", "Basic". */
|
|
37
|
+
fareBrand?: string;
|
|
38
|
+
/** Checked bags included per passenger; 0 = none included. Omit when unknown. */
|
|
39
|
+
checkedBags?: number;
|
|
40
|
+
/** Carry-on bags included per passenger. Omit when unknown. */
|
|
41
|
+
carryOnBags?: number;
|
|
42
|
+
/** Separate tickets (a self-transfer itinerary): bags re-checked, a missed connection not protected. */
|
|
43
|
+
selfTransfer?: boolean;
|
|
36
44
|
}
|
|
37
45
|
/** The fields of a travel result item the flight card reads. */
|
|
38
46
|
export interface FlightOfferLike {
|
|
@@ -48,16 +56,29 @@ export interface FlightOfferSetLike {
|
|
|
48
56
|
properties?: FlightOfferLike[];
|
|
49
57
|
/** ISO 4217 currency of the `price` values (default "USD"). */
|
|
50
58
|
currency?: string;
|
|
59
|
+
title?: string;
|
|
60
|
+
totalCount?: number;
|
|
51
61
|
}
|
|
62
|
+
/** A standout a card can be labelled with once the result set is ranked. */
|
|
63
|
+
export type FlightBadge = 'cheapest' | 'fastest' | 'best';
|
|
64
|
+
/** Orderings a result list offers. `recommended` keeps the order the agent returned. */
|
|
65
|
+
export type FlightSort = 'recommended' | 'cheapest' | 'fastest' | 'departure';
|
|
52
66
|
export interface FlightSliceView {
|
|
53
67
|
origin: string;
|
|
54
68
|
destination: string;
|
|
55
69
|
departTime?: string;
|
|
56
70
|
arriveTime?: string;
|
|
71
|
+
/** The departure's airport-local wall clock as minutes since 1970: what "by departure" sorts on. */
|
|
72
|
+
departOrder?: number;
|
|
57
73
|
/** "+1" when it lands on a later calendar day than it left. */
|
|
58
74
|
dayOffset?: string;
|
|
59
75
|
stops?: string;
|
|
76
|
+
/** Numeric stops for a renderer that draws them on the route line. */
|
|
77
|
+
stopCount?: number;
|
|
60
78
|
duration?: string;
|
|
79
|
+
durationMinutes?: number;
|
|
80
|
+
/** "Sun, Oct 4": the slice's departure date. */
|
|
81
|
+
date?: string;
|
|
61
82
|
/**
|
|
62
83
|
* The small line under the route. One way: the duration only, since the
|
|
63
84
|
* footer already says how it flies ("ANA · Nonstop"). Round trip: duration
|
|
@@ -76,10 +97,50 @@ export interface FlightCardView {
|
|
|
76
97
|
slices: FlightSliceView[];
|
|
77
98
|
/** Footer line, e.g. "ANA · Nonstop". */
|
|
78
99
|
footer: string;
|
|
100
|
+
/**
|
|
101
|
+
* What the fare includes, e.g. "Lufthansa Economy Comfort · 1 checked bag ·
|
|
102
|
+
* One way". Only when the offer says something about its fare (brand,
|
|
103
|
+
* a non-economy cabin, bags, separate tickets); never filled with a guess.
|
|
104
|
+
*/
|
|
105
|
+
fareLine?: string;
|
|
79
106
|
price?: string;
|
|
80
107
|
/** One sentence a screen reader announces for the whole card. */
|
|
81
108
|
accessibleLabel: string;
|
|
109
|
+
/** Marketing airline, e.g. "Airblue". */
|
|
110
|
+
airline?: string;
|
|
111
|
+
/** Two-letter monogram for the airline tile: the IATA prefix of a flight number, else initials. */
|
|
112
|
+
airlineCode: string;
|
|
113
|
+
/** The airline's own mark, when its IATA code is one the logo service has a real mark for. */
|
|
114
|
+
airlineLogo?: string;
|
|
115
|
+
/**
|
|
116
|
+
* What choosing this flight says to the agent, word for word: "Book the 6:28 PM Frontier flight
|
|
117
|
+
* F9 3458 from ATL to LGA on Fri, Oct 30 ($194)." A host that lets a card answer sends it as the
|
|
118
|
+
* person's next turn, so the agent's own go-ahead rules still apply.
|
|
119
|
+
*/
|
|
120
|
+
bookReply: string;
|
|
121
|
+
/** Stable 0..7 palette slot for the monogram, so one airline keeps one colour across cards. */
|
|
122
|
+
airlineTone: number;
|
|
123
|
+
/** "PA 201", or "PA 201 · PA 202" for a round trip. */
|
|
124
|
+
flightNumber?: string;
|
|
125
|
+
seller?: string;
|
|
126
|
+
/** Outbound departure date, "Sun, Oct 4". */
|
|
127
|
+
date?: string;
|
|
128
|
+
/** Humanised cabin, "Business"; omitted for plain economy. */
|
|
129
|
+
cabin?: string;
|
|
130
|
+
roundTrip: boolean;
|
|
131
|
+
/** Separate tickets: listed, never badged while a protected fare is in the set. */
|
|
132
|
+
selfTransfer?: boolean;
|
|
133
|
+
/** Numeric price for ranking; undefined when the offer carries no usable number. */
|
|
134
|
+
priceValue?: number;
|
|
135
|
+
/** Door-to-door minutes across every slice; undefined when any slice lacks one. */
|
|
136
|
+
totalMinutes?: number;
|
|
137
|
+
/** Set by {@link rankFlightCards}: the standouts this card is. */
|
|
138
|
+
badges: FlightBadge[];
|
|
82
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* "6:28 PM" from the airport-local wall clock in the ISO string, whatever zone the viewer is in.
|
|
142
|
+
* Twelve-hour like `dateLabel`'s en-US, and built by hand so the server and the browser agree.
|
|
143
|
+
*/
|
|
83
144
|
export declare const wallClock: (iso?: string) => string | undefined;
|
|
84
145
|
export declare const dayOffset: (departAt?: string, arriveAt?: string) => string | undefined;
|
|
85
146
|
/** "Thu, Oct 16" from the calendar date in the ISO string. */
|
|
@@ -87,8 +148,67 @@ export declare const dateLabel: (iso?: string) => string | undefined;
|
|
|
87
148
|
export declare const stopsLabel: (stops?: number) => string | undefined;
|
|
88
149
|
export declare const durationLabel: (minutes?: number) => string | undefined;
|
|
89
150
|
export declare const flightPrice: (item: FlightOfferLike, currency?: string) => string | undefined;
|
|
151
|
+
/** The numeric fare, from `price` or parsed out of the label; undefined when neither is usable. */
|
|
152
|
+
export declare const flightPriceValue: (item: FlightOfferLike) => number | undefined;
|
|
153
|
+
/** "premium_economy" → "Premium economy"; plain economy is the default and reads as nothing. */
|
|
154
|
+
export declare const cabinLabel: (cabinClass?: string) => string | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* "Lufthansa Economy Comfort · 1 checked bag · One way": the airline with its
|
|
157
|
+
* fare brand (or a non-economy cabin), the bags the fare includes, separate
|
|
158
|
+
* tickets when they are, and the trip type. Undefined when the offer says
|
|
159
|
+
* nothing about its fare beyond the trip type, so a card never shows a line
|
|
160
|
+
* of defaults.
|
|
161
|
+
*/
|
|
162
|
+
export declare const fareLineLabel: (flight: TravelFlightDetails, roundTrip: boolean) => string | undefined;
|
|
163
|
+
export declare const flightNumberLabel: (numbers?: string[]) => string | undefined;
|
|
164
|
+
/** The two-letter tile for an airline: its IATA prefix when a flight number carries one, else initials. */
|
|
165
|
+
export declare const airlineCode: (airline?: string, flightNumbers?: string[]) => string;
|
|
166
|
+
/** The airline's own mark by IATA code - a flight number's, else the one its name is known by. */
|
|
167
|
+
export declare const airlineLogoUrl: (airline?: string, flightNumbers?: string[]) => string | undefined;
|
|
168
|
+
/** A stable palette slot for an airline name, so Airblue is the same colour on every card. */
|
|
169
|
+
export declare const airlineTone: (airline?: string, slots?: number) => number;
|
|
90
170
|
/** True when the attachment is a flight result, so the card shows flights, not stays. */
|
|
91
171
|
export declare const isFlightAttachment: (a?: FlightOfferSetLike) => boolean;
|
|
92
172
|
export declare const toFlightCard: (item: FlightOfferLike, index: number, currency?: string) => FlightCardView | null;
|
|
173
|
+
export declare const flightBadgeLabel: (badge: FlightBadge) => string;
|
|
174
|
+
/**
|
|
175
|
+
* Labels the standouts of a result set: the cheapest fare, the shortest trip,
|
|
176
|
+
* and, when it is a third card, the best price-for-time. Needs two priced
|
|
177
|
+
* offers to mean anything; a lone card gets no badge. Cards keep their order.
|
|
178
|
+
* Self-transfer fares only compete when the set has nothing else.
|
|
179
|
+
*/
|
|
180
|
+
export declare const rankFlightCards: (cards: FlightCardView[]) => FlightCardView[];
|
|
181
|
+
/** Every offer as a ranked card; stays and unusable items are skipped. */
|
|
93
182
|
export declare const toFlightCards: (a: FlightOfferSetLike) => FlightCardView[];
|
|
183
|
+
/** A stable ordering of the cards; `recommended` is the order the agent returned them in. */
|
|
184
|
+
export declare const sortFlightCards: (cards: FlightCardView[], sort: FlightSort) => FlightCardView[];
|
|
185
|
+
/** One quick pick in the result header: "Cheapest · $61 · Airblue". */
|
|
186
|
+
export interface FlightPick {
|
|
187
|
+
badge: FlightBadge;
|
|
188
|
+
label: string;
|
|
189
|
+
/** The card it points at. */
|
|
190
|
+
key: string;
|
|
191
|
+
price?: string;
|
|
192
|
+
duration?: string;
|
|
193
|
+
airline?: string;
|
|
194
|
+
}
|
|
195
|
+
/** What a result set is as a whole: the line above the cards and the panel header. */
|
|
196
|
+
export interface FlightResultSummary {
|
|
197
|
+
/** "ISB → KHI", or "ISB ⇄ KHI" for a round trip. */
|
|
198
|
+
route?: string;
|
|
199
|
+
origin?: string;
|
|
200
|
+
destination?: string;
|
|
201
|
+
roundTrip: boolean;
|
|
202
|
+
/** "Sun, Oct 4", or "Sun, Oct 4 – Sun, Oct 11"; unset when the offers span different dates. */
|
|
203
|
+
date?: string;
|
|
204
|
+
/** True when every offer leaves on the same date, so a card need not repeat it. */
|
|
205
|
+
sameDate: boolean;
|
|
206
|
+
count: number;
|
|
207
|
+
/** Lowest fare, formatted. */
|
|
208
|
+
fromPrice?: string;
|
|
209
|
+
/** The seller, when every offer comes from one. */
|
|
210
|
+
seller?: string;
|
|
211
|
+
picks: FlightPick[];
|
|
212
|
+
}
|
|
213
|
+
export declare const flightResultSummary: (a: FlightOfferSetLike, cards?: FlightCardView[]) => FlightResultSummary;
|
|
94
214
|
//# sourceMappingURL=flightCards.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flightCards.d.ts","sourceRoot":"","sources":["../../src/utils/flightCards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAC9B,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAChC,wDAAwD;IACxD,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,sFAAsF;IACtF,MAAM,CAAC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