@admin-layout/client 12.2.4-alpha.85 → 12.2.5-alpha.6
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__/__fixtures__/defaultSettingsExample.d.ts.map +1 -1
- package/lib/config/defaultSettings.d.ts +2 -0
- package/lib/config/defaultSettings.d.ts.map +1 -1
- package/lib/config/defaultSettings.js +4 -0
- package/lib/config/defaultSettings.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.native.js +1 -1
- package/lib/interfaces/settings.d.ts +1 -0
- package/lib/interfaces/settings.d.ts.map +1 -1
- package/lib/utils/flightCards.d.ts +173 -0
- package/lib/utils/flightCards.d.ts.map +1 -0
- package/lib/utils/flightCards.js +331 -0
- package/lib/utils/flightCards.js.map +1 -0
- package/lib/utils/flightCards.test.d.ts +2 -0
- package/lib/utils/flightCards.test.d.ts.map +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultSettingsExample.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/defaultSettingsExample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+D,MAAM,8BAA8B,CAAC;AAEtH,eAAO,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultSettingsExample.d.ts","sourceRoot":"","sources":["../../../src/__tests__/__fixtures__/defaultSettingsExample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+D,MAAM,8BAA8B,CAAC;AAEtH,eAAO,MAAM,eAAe,EAAE,SAgH7B,CAAC"}
|
|
@@ -108,6 +108,7 @@ export declare const DEFAULT_SETTINGS: {
|
|
|
108
108
|
readonly loginFormPosition: "center";
|
|
109
109
|
readonly loginSocials: "{\"Google\":true,\"Apple\":true,\"Facebook\":true}";
|
|
110
110
|
readonly loginBackgroundImage: any;
|
|
111
|
+
readonly loginPasswordlessSms: false;
|
|
111
112
|
readonly verifyFormLayout: "center";
|
|
112
113
|
readonly verifyFormImageUrl: "";
|
|
113
114
|
readonly verifyFormBackgroundStyle: "color";
|
|
@@ -186,6 +187,7 @@ export type ISettings = ProSettings & {
|
|
|
186
187
|
loginFormPosition: string;
|
|
187
188
|
loginSocials: string;
|
|
188
189
|
loginBackgroundImage: string;
|
|
190
|
+
loginPasswordlessSms: boolean;
|
|
189
191
|
verifyFormLayout: string;
|
|
190
192
|
verifyFormImageUrl: string;
|
|
191
193
|
verifyFormBackgroundStyle: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultSettings.d.ts","sourceRoot":"","sources":["../../src/config/defaultSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,eAAO,MAAM,cAAc;kBACE,YAAY;;;;CAIxC,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;CAiB1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAEX,eAAO,MAAM,SAAS,yIAaZ,CAAC;AAGX,eAAO,MAAM,kBAAkB;;wBAGI,cAAc;sBACb,YAAY;;;;sBAnDnB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuExC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"defaultSettings.d.ts","sourceRoot":"","sources":["../../src/config/defaultSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EA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EAAE,OAAO,CAAC;oBAC1B,eAAe,EAAE,MAAM,CAAC;iBAC3B,CAAC;gBACF,UAAU,EAAE;oBACR,IAAI,EAAE,MAAM,CAAC;oBACb,KAAK,EAAE,MAAM,CAAC;oBACd,KAAK,EAAE,MAAM,CAAC;oBACd,KAAK,EAAE,MAAM,CAAC;iBACjB,CAAC;gBACF,MAAM,EAAE;oBACJ,UAAU,EAAE,OAAO,CAAC;iBACvB,CAAC;aACL,CAAC;SACL,CAAC;KACL,CACJ,CAAC;IACF,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC"}
|
|
@@ -100,6 +100,10 @@ const DEFAULT_SETTINGS = {
|
|
|
100
100
|
loginFormPosition: 'center',
|
|
101
101
|
loginSocials: '{"Google":true,"Apple":true,"Facebook":true}',
|
|
102
102
|
loginBackgroundImage: null,
|
|
103
|
+
// "SMS" tab on the login page (passwordless by mobile number). The backend's
|
|
104
|
+
// uilayout.loginPasswordlessSms setting decides per deployment; this is only
|
|
105
|
+
// the fallback when the backend settings cannot be fetched.
|
|
106
|
+
loginPasswordlessSms: false,
|
|
103
107
|
verifyFormLayout: 'center',
|
|
104
108
|
verifyFormImageUrl: '',
|
|
105
109
|
verifyFormBackgroundStyle: 'color',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"0DACA;AACS,MAAA,cAAc;AAGvB,IAAA,qBAAa;qBACgB;;;;AAI3B,MAAA,cAAA,GAAA;AAEF,IAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;AAiBE,MAAA,YAAA,GAAA;AAEF,IAAA,MAAA,EAAA;;;;AAIW,MAAA,SAAA,GAAA;AAEX,IAAA,MAAA;AAgBA,IAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwBE,UAAA,EAAA,IAAA;AAEF,QAAA,QAAA,EAAA,KAAA;;;AAGG,QAAA,cAAA,EAAA,IAAA;AACH,QAAA,gBAAa,EAAA,IAAA
|
|
1
|
+
{"version":3,"file":"defaultSettings.js","sources":["../../src/config/defaultSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"0DACA;AACS,MAAA,cAAc;AAGvB,IAAA,qBAAa;qBACgB;;;;AAI3B,MAAA,cAAA,GAAA;AAEF,IAAA,QAAA,EAAA;;;;;;;;;;;;;;;;;AAiBE,MAAA,YAAA,GAAA;AAEF,IAAA,MAAA,EAAA;;;;AAIW,MAAA,SAAA,GAAA;AAEX,IAAA,MAAA;AAgBA,IAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwBE,UAAA,EAAA,IAAA;AAEF,QAAA,QAAA,EAAA,KAAA;;;AAGG,QAAA,cAAA,EAAA,IAAA;AACH,QAAA,gBAAa,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAsEmB;iCACK;;;;;;;;;;;;;;;"}
|
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{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,airlineTone,cabinLabel,dateLabel,dayOffset,durationLabel,flightBadgeLabel,flightNumberLabel,flightPrice,flightPriceValue,flightResultSummary,isFlightAttachment,rankFlightCards,sortFlightCards,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
|
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{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,airlineTone,cabinLabel,dateLabel,dayOffset,durationLabel,flightBadgeLabel,flightNumberLabel,flightPrice,flightPriceValue,flightResultSummary,isFlightAttachment,rankFlightCards,sortFlightCards,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/interfaces/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAChH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,eAAe,CAAC;AAEtE,oBAAY,iBAAiB;IACzB,SAAS,cAAc;IACvB,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ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AE,GACrC;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,iCAAiC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flight cards: the contract a travel result uses to describe a flight offer,
|
|
3
|
+
* and the pure view model that turns it into the strings a card shows.
|
|
4
|
+
*
|
|
5
|
+
* It lives here, in the platform-neutral client package, because two
|
|
6
|
+
* renderers share it: the tailwind chat card (ai-chat-ext) on the web and the
|
|
7
|
+
* gluestack card on mobile. One model means a flight reads identically on both.
|
|
8
|
+
*
|
|
9
|
+
* Times are the airport's local wall clock, read straight from the ISO string
|
|
10
|
+
* and never passed through `Date` in the viewer's zone: 11:05 in San
|
|
11
|
+
* Francisco must read 11:05 in Tokyo too.
|
|
12
|
+
*/
|
|
13
|
+
/** One direction of a flight offer: the outbound, or the return of a round trip. */
|
|
14
|
+
export interface TravelFlightSlice {
|
|
15
|
+
/** IATA airport codes, e.g. "SFO", "HND". */
|
|
16
|
+
origin: string;
|
|
17
|
+
destination: string;
|
|
18
|
+
/** Local wall-clock date-times at each airport, e.g. "2026-10-16T11:05". */
|
|
19
|
+
departAt?: string;
|
|
20
|
+
arriveAt?: string;
|
|
21
|
+
/** 0 = nonstop. */
|
|
22
|
+
stops?: number;
|
|
23
|
+
/** Door-to-door slice duration in minutes, layovers included. */
|
|
24
|
+
durationMinutes?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface TravelFlightDetails {
|
|
27
|
+
/** Outbound first, then the return for a round trip. */
|
|
28
|
+
slices: TravelFlightSlice[];
|
|
29
|
+
/** Marketing airline(s), e.g. "ANA" or "ANA, United". */
|
|
30
|
+
airline?: string;
|
|
31
|
+
flightNumbers?: string[];
|
|
32
|
+
/** Where it is sold, shown in the card header (e.g. "Trip.com", "Google Flights"). */
|
|
33
|
+
seller?: string;
|
|
34
|
+
/** e.g. "economy", "premium_economy", "business". */
|
|
35
|
+
cabinClass?: string;
|
|
36
|
+
}
|
|
37
|
+
/** The fields of a travel result item the flight card reads. */
|
|
38
|
+
export interface FlightOfferLike {
|
|
39
|
+
id?: string;
|
|
40
|
+
title: string;
|
|
41
|
+
price?: number;
|
|
42
|
+
priceLabel?: string;
|
|
43
|
+
url?: string;
|
|
44
|
+
flight?: TravelFlightDetails;
|
|
45
|
+
}
|
|
46
|
+
/** The fields of a travel result set the flight cards read. */
|
|
47
|
+
export interface FlightOfferSetLike {
|
|
48
|
+
properties?: FlightOfferLike[];
|
|
49
|
+
/** ISO 4217 currency of the `price` values (default "USD"). */
|
|
50
|
+
currency?: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
totalCount?: number;
|
|
53
|
+
}
|
|
54
|
+
/** A standout a card can be labelled with once the result set is ranked. */
|
|
55
|
+
export type FlightBadge = 'cheapest' | 'fastest' | 'best';
|
|
56
|
+
/** Orderings a result list offers. `recommended` keeps the order the agent returned. */
|
|
57
|
+
export type FlightSort = 'recommended' | 'cheapest' | 'fastest' | 'departure';
|
|
58
|
+
export interface FlightSliceView {
|
|
59
|
+
origin: string;
|
|
60
|
+
destination: string;
|
|
61
|
+
departTime?: string;
|
|
62
|
+
arriveTime?: string;
|
|
63
|
+
/** "+1" when it lands on a later calendar day than it left. */
|
|
64
|
+
dayOffset?: string;
|
|
65
|
+
stops?: string;
|
|
66
|
+
/** Numeric stops for a renderer that draws them on the route line. */
|
|
67
|
+
stopCount?: number;
|
|
68
|
+
duration?: string;
|
|
69
|
+
durationMinutes?: number;
|
|
70
|
+
/** "Sun, Oct 4": the slice's departure date. */
|
|
71
|
+
date?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The small line under the route. One way: the duration only, since the
|
|
74
|
+
* footer already says how it flies ("ANA · Nonstop"). Round trip: duration
|
|
75
|
+
* and stops, because each direction can differ and the footer says
|
|
76
|
+
* "Round trip".
|
|
77
|
+
*/
|
|
78
|
+
meta?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface FlightCardView {
|
|
81
|
+
key: string;
|
|
82
|
+
url?: string;
|
|
83
|
+
/** Header line, e.g. "Trip.com · Thu, Oct 16". */
|
|
84
|
+
header: string;
|
|
85
|
+
/** Seller initial for the header badge. */
|
|
86
|
+
sellerInitial?: string;
|
|
87
|
+
slices: FlightSliceView[];
|
|
88
|
+
/** Footer line, e.g. "ANA · Nonstop". */
|
|
89
|
+
footer: string;
|
|
90
|
+
price?: string;
|
|
91
|
+
/** One sentence a screen reader announces for the whole card. */
|
|
92
|
+
accessibleLabel: string;
|
|
93
|
+
/** Marketing airline, e.g. "Airblue". */
|
|
94
|
+
airline?: string;
|
|
95
|
+
/** Two-letter monogram for the airline tile: the IATA prefix of a flight number, else initials. */
|
|
96
|
+
airlineCode: string;
|
|
97
|
+
/** Stable 0..7 palette slot for the monogram, so one airline keeps one colour across cards. */
|
|
98
|
+
airlineTone: number;
|
|
99
|
+
/** "PA 201", or "PA 201 · PA 202" for a round trip. */
|
|
100
|
+
flightNumber?: string;
|
|
101
|
+
seller?: string;
|
|
102
|
+
/** Outbound departure date, "Sun, Oct 4". */
|
|
103
|
+
date?: string;
|
|
104
|
+
/** Humanised cabin, "Business"; omitted for plain economy. */
|
|
105
|
+
cabin?: string;
|
|
106
|
+
roundTrip: boolean;
|
|
107
|
+
/** Numeric price for ranking; undefined when the offer carries no usable number. */
|
|
108
|
+
priceValue?: number;
|
|
109
|
+
/** Door-to-door minutes across every slice; undefined when any slice lacks one. */
|
|
110
|
+
totalMinutes?: number;
|
|
111
|
+
/** Set by {@link rankFlightCards}: the standouts this card is. */
|
|
112
|
+
badges: FlightBadge[];
|
|
113
|
+
}
|
|
114
|
+
export declare const wallClock: (iso?: string) => string | undefined;
|
|
115
|
+
export declare const dayOffset: (departAt?: string, arriveAt?: string) => string | undefined;
|
|
116
|
+
/** "Thu, Oct 16" from the calendar date in the ISO string. */
|
|
117
|
+
export declare const dateLabel: (iso?: string) => string | undefined;
|
|
118
|
+
export declare const stopsLabel: (stops?: number) => string | undefined;
|
|
119
|
+
export declare const durationLabel: (minutes?: number) => string | undefined;
|
|
120
|
+
export declare const flightPrice: (item: FlightOfferLike, currency?: string) => string | undefined;
|
|
121
|
+
/** The numeric fare, from `price` or parsed out of the label; undefined when neither is usable. */
|
|
122
|
+
export declare const flightPriceValue: (item: FlightOfferLike) => number | undefined;
|
|
123
|
+
/** "premium_economy" → "Premium economy"; plain economy is the default and reads as nothing. */
|
|
124
|
+
export declare const cabinLabel: (cabinClass?: string) => string | undefined;
|
|
125
|
+
export declare const flightNumberLabel: (numbers?: string[]) => string | undefined;
|
|
126
|
+
/** The two-letter tile for an airline: its IATA prefix when a flight number carries one, else initials. */
|
|
127
|
+
export declare const airlineCode: (airline?: string, flightNumbers?: string[]) => string;
|
|
128
|
+
/** A stable palette slot for an airline name, so Airblue is the same colour on every card. */
|
|
129
|
+
export declare const airlineTone: (airline?: string, slots?: number) => number;
|
|
130
|
+
/** True when the attachment is a flight result, so the card shows flights, not stays. */
|
|
131
|
+
export declare const isFlightAttachment: (a?: FlightOfferSetLike) => boolean;
|
|
132
|
+
export declare const toFlightCard: (item: FlightOfferLike, index: number, currency?: string) => FlightCardView | null;
|
|
133
|
+
export declare const flightBadgeLabel: (badge: FlightBadge) => string;
|
|
134
|
+
/**
|
|
135
|
+
* Labels the standouts of a result set: the cheapest fare, the shortest trip,
|
|
136
|
+
* and, when it is a third card, the best price-for-time. Needs two priced
|
|
137
|
+
* offers to mean anything; a lone card gets no badge. Cards keep their order.
|
|
138
|
+
*/
|
|
139
|
+
export declare const rankFlightCards: (cards: FlightCardView[]) => FlightCardView[];
|
|
140
|
+
/** Every offer as a ranked card; stays and unusable items are skipped. */
|
|
141
|
+
export declare const toFlightCards: (a: FlightOfferSetLike) => FlightCardView[];
|
|
142
|
+
/** A stable ordering of the cards; `recommended` is the order the agent returned them in. */
|
|
143
|
+
export declare const sortFlightCards: (cards: FlightCardView[], sort: FlightSort) => FlightCardView[];
|
|
144
|
+
/** One quick pick in the result header: "Cheapest · $61 · Airblue". */
|
|
145
|
+
export interface FlightPick {
|
|
146
|
+
badge: FlightBadge;
|
|
147
|
+
label: string;
|
|
148
|
+
/** The card it points at. */
|
|
149
|
+
key: string;
|
|
150
|
+
price?: string;
|
|
151
|
+
duration?: string;
|
|
152
|
+
airline?: string;
|
|
153
|
+
}
|
|
154
|
+
/** What a result set is as a whole: the line above the cards and the panel header. */
|
|
155
|
+
export interface FlightResultSummary {
|
|
156
|
+
/** "ISB → KHI", or "ISB ⇄ KHI" for a round trip. */
|
|
157
|
+
route?: string;
|
|
158
|
+
origin?: string;
|
|
159
|
+
destination?: string;
|
|
160
|
+
roundTrip: boolean;
|
|
161
|
+
/** "Sun, Oct 4", or "Sun, Oct 4 – Sun, Oct 11"; unset when the offers span different dates. */
|
|
162
|
+
date?: string;
|
|
163
|
+
/** True when every offer leaves on the same date, so a card need not repeat it. */
|
|
164
|
+
sameDate: boolean;
|
|
165
|
+
count: number;
|
|
166
|
+
/** Lowest fare, formatted. */
|
|
167
|
+
fromPrice?: string;
|
|
168
|
+
/** The seller, when every offer comes from one. */
|
|
169
|
+
seller?: string;
|
|
170
|
+
picks: FlightPick[];
|
|
171
|
+
}
|
|
172
|
+
export declare const flightResultSummary: (a: FlightOfferSetLike, cards?: FlightCardView[]) => FlightResultSummary;
|
|
173
|
+
//# sourceMappingURL=flightCards.d.ts.map
|
|
@@ -0,0 +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,MA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,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,EAAE,KAAG,cAAc,EAmCvE,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,aAAa,GAAI,GAAG,kBAAkB,KAAG,cAAc,EAK/D,CAAC;AAEN,6FAA6F;AAC7F,eAAO,MAAM,eAAe,GAAI,OAAO,cAAc,EAAE,EAAE,MAAM,UAAU,KAAG,cAAc,EAWzF,CAAC;AAEF,uEAAuE;AACvE,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,sFAAsF;AACtF,MAAM,WAAW,mBAAmB;IAChC,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,GAAI,GAAG,kBAAkB,EAAE,wBAAwB,KAAG,mBAyCrF,CAAC"}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flight cards: the contract a travel result uses to describe a flight offer,
|
|
3
|
+
* and the pure view model that turns it into the strings a card shows.
|
|
4
|
+
*
|
|
5
|
+
* It lives here, in the platform-neutral client package, because two
|
|
6
|
+
* renderers share it: the tailwind chat card (ai-chat-ext) on the web and the
|
|
7
|
+
* gluestack card on mobile. One model means a flight reads identically on both.
|
|
8
|
+
*
|
|
9
|
+
* Times are the airport's local wall clock, read straight from the ISO string
|
|
10
|
+
* and never passed through `Date` in the viewer's zone: 11:05 in San
|
|
11
|
+
* Francisco must read 11:05 in Tokyo too.
|
|
12
|
+
*/
|
|
13
|
+
const WALL_CLOCK = /T(\d{2}):(\d{2})/;
|
|
14
|
+
const CALENDAR_DATE = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
15
|
+
const wallClock = (iso) => {
|
|
16
|
+
const m = iso ? WALL_CLOCK.exec(iso) : null;
|
|
17
|
+
return m ? `${m[1]}:${m[2]}` : undefined;
|
|
18
|
+
};
|
|
19
|
+
const utcDay = (iso) => {
|
|
20
|
+
const m = iso ? CALENDAR_DATE.exec(iso) : null;
|
|
21
|
+
return m ? Date.UTC(Number(m[1]), Number(m[2]) - 1, Number(m[3])) : undefined;
|
|
22
|
+
};
|
|
23
|
+
const dayOffset = (departAt, arriveAt) => {
|
|
24
|
+
const a = utcDay(departAt);
|
|
25
|
+
const b = utcDay(arriveAt);
|
|
26
|
+
if (a == null || b == null)
|
|
27
|
+
return undefined;
|
|
28
|
+
const days = Math.round((b - a) / 86_400_000);
|
|
29
|
+
return days > 0 ? `+${days}` : undefined;
|
|
30
|
+
};
|
|
31
|
+
/** "Thu, Oct 16" from the calendar date in the ISO string. */
|
|
32
|
+
const dateLabel = (iso) => {
|
|
33
|
+
const day = utcDay(iso);
|
|
34
|
+
if (day == null)
|
|
35
|
+
return undefined;
|
|
36
|
+
return new Date(day).toLocaleDateString('en-US', {
|
|
37
|
+
weekday: 'short',
|
|
38
|
+
month: 'short',
|
|
39
|
+
day: 'numeric',
|
|
40
|
+
timeZone: 'UTC',
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const stopsLabel = (stops) => {
|
|
44
|
+
if (typeof stops !== 'number' || !Number.isFinite(stops) || stops < 0)
|
|
45
|
+
return undefined;
|
|
46
|
+
if (stops === 0)
|
|
47
|
+
return 'Nonstop';
|
|
48
|
+
return stops === 1 ? '1 stop' : `${stops} stops`;
|
|
49
|
+
};
|
|
50
|
+
const durationLabel = (minutes) => {
|
|
51
|
+
if (typeof minutes !== 'number' || !Number.isFinite(minutes) || minutes <= 0)
|
|
52
|
+
return undefined;
|
|
53
|
+
const h = Math.floor(minutes / 60);
|
|
54
|
+
const m = Math.round(minutes % 60);
|
|
55
|
+
if (h === 0)
|
|
56
|
+
return `${m}m`;
|
|
57
|
+
return m === 0 ? `${h}h` : `${h}h ${m}m`;
|
|
58
|
+
};
|
|
59
|
+
const formatCurrency = (amount, currency) => {
|
|
60
|
+
try {
|
|
61
|
+
return (new Intl.NumberFormat('en-US', {
|
|
62
|
+
style: 'currency',
|
|
63
|
+
currency,
|
|
64
|
+
maximumFractionDigits: 0,
|
|
65
|
+
})
|
|
66
|
+
.format(amount)
|
|
67
|
+
// Intl pads "PKR 17,500" with a no-break space; a plain one wraps and compares sanely.
|
|
68
|
+
.replace(/\u00a0/g, ' '));
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
// An unknown currency code must not take the whole card down.
|
|
72
|
+
return `${Math.round(amount)} ${currency}`;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
/** A provider label written as "<ISO code> <amount>", e.g. "USD 61.00" or "PKR 17,500". */
|
|
76
|
+
const CODE_AMOUNT = /^([A-Z]{3})\s+([\d,]+(?:\.\d+)?)$/;
|
|
77
|
+
const flightPrice = (item, currency = 'USD') => {
|
|
78
|
+
if (item.priceLabel) {
|
|
79
|
+
// "USD 61.00" reads as "$61": same currency, the way a fare is printed.
|
|
80
|
+
const m = CODE_AMOUNT.exec(item.priceLabel.trim());
|
|
81
|
+
if (m) {
|
|
82
|
+
const amount = Number(m[2].replace(/,/g, ''));
|
|
83
|
+
if (Number.isFinite(amount))
|
|
84
|
+
return formatCurrency(amount, m[1]);
|
|
85
|
+
}
|
|
86
|
+
return item.priceLabel;
|
|
87
|
+
}
|
|
88
|
+
if (typeof item.price !== 'number' || !Number.isFinite(item.price))
|
|
89
|
+
return undefined;
|
|
90
|
+
return formatCurrency(item.price, currency);
|
|
91
|
+
};
|
|
92
|
+
/** The numeric fare, from `price` or parsed out of the label; undefined when neither is usable. */
|
|
93
|
+
const flightPriceValue = (item) => {
|
|
94
|
+
if (typeof item.price === 'number' && Number.isFinite(item.price) && item.price > 0)
|
|
95
|
+
return item.price;
|
|
96
|
+
const digits = item.priceLabel?.replace(/[^\d.]/g, '');
|
|
97
|
+
const parsed = digits ? Number(digits) : NaN;
|
|
98
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined;
|
|
99
|
+
};
|
|
100
|
+
const CABIN_LABELS = {
|
|
101
|
+
economy: 'Economy',
|
|
102
|
+
premium_economy: 'Premium economy',
|
|
103
|
+
premium: 'Premium economy',
|
|
104
|
+
business: 'Business',
|
|
105
|
+
first: 'First',
|
|
106
|
+
};
|
|
107
|
+
/** "premium_economy" → "Premium economy"; plain economy is the default and reads as nothing. */
|
|
108
|
+
const cabinLabel = (cabinClass) => {
|
|
109
|
+
const key = cabinClass
|
|
110
|
+
?.trim()
|
|
111
|
+
.toLowerCase()
|
|
112
|
+
.replace(/[\s-]+/g, '_');
|
|
113
|
+
if (!key || key === 'economy')
|
|
114
|
+
return undefined;
|
|
115
|
+
return CABIN_LABELS[key] ?? key.replace(/_/g, ' ').replace(/^\w/, (c) => c.toUpperCase());
|
|
116
|
+
};
|
|
117
|
+
/** An IATA (2 chars, at least one letter) or ICAO (3 letters) airline code, then the number. */
|
|
118
|
+
const FLIGHT_NUMBER = /^([A-Z]{2,3}|[A-Z][0-9]|[0-9][A-Z])\s*(\d{1,4}[A-Z]?)$/i;
|
|
119
|
+
/** "PA201" → "PA 201"; anything else is shown as written. */
|
|
120
|
+
const formatFlightNumber = (raw) => {
|
|
121
|
+
const m = FLIGHT_NUMBER.exec(raw.trim());
|
|
122
|
+
return m ? `${m[1].toUpperCase()} ${m[2].toUpperCase()}` : raw.trim();
|
|
123
|
+
};
|
|
124
|
+
const flightNumberLabel = (numbers) => {
|
|
125
|
+
const list = (numbers ?? []).map((n) => n?.trim()).filter(Boolean);
|
|
126
|
+
if (list.length === 0)
|
|
127
|
+
return undefined;
|
|
128
|
+
const shown = list.slice(0, 2).map(formatFlightNumber);
|
|
129
|
+
return list.length > 2 ? `${shown.join(' · ')} +${list.length - 2}` : shown.join(' · ');
|
|
130
|
+
};
|
|
131
|
+
/** The two-letter tile for an airline: its IATA prefix when a flight number carries one, else initials. */
|
|
132
|
+
const airlineCode = (airline, flightNumbers) => {
|
|
133
|
+
const first = flightNumbers?.find((n) => n && FLIGHT_NUMBER.test(n.trim()));
|
|
134
|
+
if (first)
|
|
135
|
+
return FLIGHT_NUMBER.exec(first.trim())[1].toUpperCase().slice(0, 2);
|
|
136
|
+
const words = (airline ?? '')
|
|
137
|
+
.split(/[\s,/&-]+/)
|
|
138
|
+
.map((w) => w.replace(/[^A-Za-z0-9]/g, ''))
|
|
139
|
+
.filter(Boolean);
|
|
140
|
+
if (words.length === 0)
|
|
141
|
+
return '✈';
|
|
142
|
+
if (words.length === 1)
|
|
143
|
+
return words[0].slice(0, 2).toUpperCase();
|
|
144
|
+
return (words[0][0] + words[1][0]).toUpperCase();
|
|
145
|
+
};
|
|
146
|
+
/** A stable palette slot for an airline name, so Airblue is the same colour on every card. */
|
|
147
|
+
const airlineTone = (airline, slots = 8) => {
|
|
148
|
+
const s = (airline ?? '').toLowerCase();
|
|
149
|
+
let h = 0;
|
|
150
|
+
for (let i = 0; i < s.length; i++)
|
|
151
|
+
h = (h * 31 + s.charCodeAt(i)) >>> 0;
|
|
152
|
+
return h % slots;
|
|
153
|
+
};
|
|
154
|
+
const sliceView = (s) => ({
|
|
155
|
+
origin: s.origin,
|
|
156
|
+
destination: s.destination,
|
|
157
|
+
departTime: wallClock(s.departAt),
|
|
158
|
+
arriveTime: wallClock(s.arriveAt),
|
|
159
|
+
dayOffset: dayOffset(s.departAt, s.arriveAt),
|
|
160
|
+
stops: stopsLabel(s.stops),
|
|
161
|
+
stopCount: typeof s.stops === 'number' && Number.isFinite(s.stops) && s.stops >= 0 ? s.stops : undefined,
|
|
162
|
+
duration: durationLabel(s.durationMinutes),
|
|
163
|
+
durationMinutes: typeof s.durationMinutes === 'number' && Number.isFinite(s.durationMinutes) && s.durationMinutes > 0
|
|
164
|
+
? s.durationMinutes
|
|
165
|
+
: undefined,
|
|
166
|
+
date: dateLabel(s.departAt),
|
|
167
|
+
});
|
|
168
|
+
/** True when the attachment is a flight result, so the card shows flights, not stays. */
|
|
169
|
+
const isFlightAttachment = (a) => !!a?.properties?.some((p) => (p.flight?.slices?.length ?? 0) > 0);
|
|
170
|
+
const toFlightCard = (item, index, currency) => {
|
|
171
|
+
const flight = item.flight;
|
|
172
|
+
const views = (flight?.slices ?? []).filter((s) => s?.origin && s?.destination).map(sliceView);
|
|
173
|
+
const roundTrip = views.length > 1;
|
|
174
|
+
const slices = views.map((v) => ({
|
|
175
|
+
...v,
|
|
176
|
+
meta: (roundTrip ? [v.duration, v.stops] : [v.duration]).filter(Boolean).join(' · ') || undefined,
|
|
177
|
+
}));
|
|
178
|
+
if (!flight || slices.length === 0)
|
|
179
|
+
return null;
|
|
180
|
+
const outbound = flight.slices[0];
|
|
181
|
+
const seller = flight.seller?.trim() || undefined;
|
|
182
|
+
const airline = flight.airline?.trim() || undefined;
|
|
183
|
+
const date = dateLabel(outbound.departAt);
|
|
184
|
+
const header = [seller, date].filter(Boolean).join(' · ') || `${slices[0].origin} to ${slices[0].destination}`;
|
|
185
|
+
// One direction: say how it flies. A round trip already shows stops per
|
|
186
|
+
// row, so the footer names the trip type instead of repeating them.
|
|
187
|
+
const how = roundTrip ? 'Round trip' : slices[0].stops;
|
|
188
|
+
const footer = [airline || item.title, how].filter(Boolean).join(' · ');
|
|
189
|
+
const price = flightPrice(item, currency);
|
|
190
|
+
const spoken = slices
|
|
191
|
+
.map((s) => `${s.origin} ${s.departTime ?? ''} to ${s.destination} ${s.arriveTime ?? ''}${s.dayOffset === '+1' ? ' next day' : s.dayOffset ? ` ${s.dayOffset.slice(1)} days later` : ''}${s.stops ? `, ${s.stops.toLowerCase()}` : ''}`)
|
|
192
|
+
.join('; returning ');
|
|
193
|
+
const minutes = slices.map((s) => s.durationMinutes);
|
|
194
|
+
const totalMinutes = minutes.every((m) => m != null) ? minutes.reduce((a, b) => a + b, 0) : undefined;
|
|
195
|
+
return {
|
|
196
|
+
key: item.id ?? `flight-${index}`,
|
|
197
|
+
url: item.url,
|
|
198
|
+
header,
|
|
199
|
+
sellerInitial: seller ? seller.charAt(0).toUpperCase() : undefined,
|
|
200
|
+
slices,
|
|
201
|
+
footer,
|
|
202
|
+
price,
|
|
203
|
+
accessibleLabel: [
|
|
204
|
+
flight.airline,
|
|
205
|
+
spoken.replace(/\s+/g, ' ').trim(),
|
|
206
|
+
price,
|
|
207
|
+
date,
|
|
208
|
+
seller && `sold by ${seller}`,
|
|
209
|
+
]
|
|
210
|
+
.filter(Boolean)
|
|
211
|
+
.join(', '),
|
|
212
|
+
airline,
|
|
213
|
+
airlineCode: airlineCode(airline, flight.flightNumbers),
|
|
214
|
+
airlineTone: airlineTone(airline ?? item.title),
|
|
215
|
+
flightNumber: flightNumberLabel(flight.flightNumbers),
|
|
216
|
+
seller,
|
|
217
|
+
date,
|
|
218
|
+
cabin: cabinLabel(flight.cabinClass),
|
|
219
|
+
roundTrip,
|
|
220
|
+
priceValue: flightPriceValue(item),
|
|
221
|
+
totalMinutes,
|
|
222
|
+
badges: [],
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
const BADGE_WORDS = {
|
|
226
|
+
cheapest: 'cheapest',
|
|
227
|
+
fastest: 'fastest',
|
|
228
|
+
best: 'best value',
|
|
229
|
+
};
|
|
230
|
+
const flightBadgeLabel = (badge) => badge === 'best' ? 'Best value' : badge === 'cheapest' ? 'Cheapest' : 'Fastest';
|
|
231
|
+
/**
|
|
232
|
+
* Labels the standouts of a result set: the cheapest fare, the shortest trip,
|
|
233
|
+
* and, when it is a third card, the best price-for-time. Needs two priced
|
|
234
|
+
* offers to mean anything; a lone card gets no badge. Cards keep their order.
|
|
235
|
+
*/
|
|
236
|
+
const rankFlightCards = (cards) => {
|
|
237
|
+
const priced = cards.filter((c) => c.priceValue != null);
|
|
238
|
+
if (priced.length < 2)
|
|
239
|
+
return cards.map((c) => ({ ...c, badges: [] }));
|
|
240
|
+
const byPrice = (a, b) => a.priceValue - b.priceValue || (a.totalMinutes ?? Infinity) - (b.totalMinutes ?? Infinity);
|
|
241
|
+
const cheapest = [...priced].sort(byPrice)[0];
|
|
242
|
+
const timed = priced.filter((c) => c.totalMinutes != null);
|
|
243
|
+
const fastest = timed.length
|
|
244
|
+
? [...timed].sort((a, b) => a.totalMinutes - b.totalMinutes || a.priceValue - b.priceValue)[0]
|
|
245
|
+
: undefined;
|
|
246
|
+
let best;
|
|
247
|
+
if (fastest && timed.length >= 2) {
|
|
248
|
+
const minPrice = cheapest.priceValue;
|
|
249
|
+
const minMinutes = fastest.totalMinutes;
|
|
250
|
+
const score = (c) => c.priceValue / minPrice + c.totalMinutes / minMinutes;
|
|
251
|
+
best = [...timed].sort((a, b) => score(a) - score(b) || byPrice(a, b))[0];
|
|
252
|
+
}
|
|
253
|
+
return cards.map((c) => {
|
|
254
|
+
const badges = [];
|
|
255
|
+
if (c === cheapest)
|
|
256
|
+
badges.push('cheapest');
|
|
257
|
+
if (fastest && c === fastest)
|
|
258
|
+
badges.push('fastest');
|
|
259
|
+
// "Best value" only when it is a different card: the cheapest or
|
|
260
|
+
// fastest already says more than a derived score would.
|
|
261
|
+
if (best && c === best && c !== cheapest && c !== fastest)
|
|
262
|
+
badges.push('best');
|
|
263
|
+
if (badges.length === 0)
|
|
264
|
+
return { ...c, badges };
|
|
265
|
+
return {
|
|
266
|
+
...c,
|
|
267
|
+
badges,
|
|
268
|
+
accessibleLabel: `${badges.map((b) => BADGE_WORDS[b]).join(' and ')}, ${c.accessibleLabel}`,
|
|
269
|
+
};
|
|
270
|
+
});
|
|
271
|
+
};
|
|
272
|
+
/** Every offer as a ranked card; stays and unusable items are skipped. */
|
|
273
|
+
const toFlightCards = (a) => rankFlightCards((a.properties ?? [])
|
|
274
|
+
.map((p, i) => toFlightCard(p, i, a.currency))
|
|
275
|
+
.filter((c) => c !== null));
|
|
276
|
+
/** A stable ordering of the cards; `recommended` is the order the agent returned them in. */
|
|
277
|
+
const sortFlightCards = (cards, sort) => {
|
|
278
|
+
if (sort === 'recommended')
|
|
279
|
+
return cards;
|
|
280
|
+
const metric = (c) => {
|
|
281
|
+
if (sort === 'cheapest')
|
|
282
|
+
return c.priceValue ?? Infinity;
|
|
283
|
+
if (sort === 'fastest')
|
|
284
|
+
return c.totalMinutes ?? Infinity;
|
|
285
|
+
return c.slices[0]?.departTime ?? '99:99';
|
|
286
|
+
};
|
|
287
|
+
return cards
|
|
288
|
+
.map((c, index) => ({ c, index, m: metric(c) }))
|
|
289
|
+
.sort((a, b) => (a.m < b.m ? -1 : a.m > b.m ? 1 : 0) || a.index - b.index)
|
|
290
|
+
.map((x) => x.c);
|
|
291
|
+
};
|
|
292
|
+
const flightResultSummary = (a, cards = toFlightCards(a)) => {
|
|
293
|
+
const first = cards[0];
|
|
294
|
+
const out = first?.slices[0];
|
|
295
|
+
const back = first?.roundTrip ? first.slices[first.slices.length - 1] : undefined;
|
|
296
|
+
const roundTrip = !!back;
|
|
297
|
+
const dates = new Set(cards.map((c) => c.date ?? ''));
|
|
298
|
+
const sameDate = dates.size <= 1;
|
|
299
|
+
const outDate = sameDate ? first?.date : undefined;
|
|
300
|
+
const date = outDate ? [outDate, back?.date].filter(Boolean).join(' – ') : undefined;
|
|
301
|
+
const priced = cards.filter((c) => c.priceValue != null);
|
|
302
|
+
const cheapestCard = priced.length ? [...priced].sort((x, y) => x.priceValue - y.priceValue)[0] : undefined;
|
|
303
|
+
const sellers = new Set(cards.map((c) => c.seller ?? ''));
|
|
304
|
+
const seller = sellers.size === 1 ? first?.seller : undefined;
|
|
305
|
+
const picks = [];
|
|
306
|
+
for (const badge of ['cheapest', 'fastest', 'best']) {
|
|
307
|
+
const card = cards.find((c) => c.badges.includes(badge));
|
|
308
|
+
if (!card)
|
|
309
|
+
continue;
|
|
310
|
+
picks.push({
|
|
311
|
+
badge,
|
|
312
|
+
label: flightBadgeLabel(badge),
|
|
313
|
+
key: card.key,
|
|
314
|
+
price: card.price,
|
|
315
|
+
duration: durationLabel(card.totalMinutes),
|
|
316
|
+
airline: card.airline,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
return {
|
|
320
|
+
route: out ? `${out.origin} ${roundTrip ? '⇄' : '→'} ${out.destination}` : undefined,
|
|
321
|
+
origin: out?.origin,
|
|
322
|
+
destination: out?.destination,
|
|
323
|
+
roundTrip,
|
|
324
|
+
date,
|
|
325
|
+
sameDate,
|
|
326
|
+
count: a.totalCount ?? cards.length,
|
|
327
|
+
fromPrice: cheapestCard?.price,
|
|
328
|
+
seller,
|
|
329
|
+
picks,
|
|
330
|
+
};
|
|
331
|
+
};export{airlineCode,airlineTone,cabinLabel,dateLabel,dayOffset,durationLabel,flightBadgeLabel,flightNumberLabel,flightPrice,flightPriceValue,flightResultSummary,isFlightAttachment,rankFlightCards,sortFlightCards,stopsLabel,toFlightCard,toFlightCards,wallClock};//# sourceMappingURL=flightCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flightCards.js","sources":["../../src/utils/flightCards.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;AAWG;AAEH,MAAA,UAAA,GAAA,kBAAA;AACA,MAAM,aAAW,GAAA,0BAAiB;AAC9B,MAAA,SAAA,GAAA,CAAA,GAAA,KAAA;IACA,MAAM,CAAA,SAAS,UAAA,CAAA,IAAA,CAAA,GAAA,CAAA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|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.5-alpha.6",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"serialize-error": "^8.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"common": "12.2.
|
|
29
|
+
"common": "12.2.5-alpha.2",
|
|
30
30
|
"rc-menu": "^9.16.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "57ad95f9f2fb3faed22f90ac047bde3eca75340f",
|
|
45
44
|
"typescript": {
|
|
46
45
|
"definition": "lib/index.d.ts"
|
|
47
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"gitHead": "39fe142eb31f78df53a5de2963fcae009d3c9fbd"
|
|
48
48
|
}
|