@admin-layout/client 12.2.5-alpha.2 → 12.2.5-alpha.22
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/flightCards.d.ts +104 -0
- package/lib/utils/flightCards.d.ts.map +1 -1
- package/lib/utils/flightCards.js +249 -11
- package/lib/utils/flightCards.js.map +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/resultCards.d.ts +241 -0
- package/lib/utils/resultCards.d.ts.map +1 -0
- package/lib/utils/resultCards.js +640 -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,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,kBAAkB,CAAC;AAI1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD;;;GAGG;AACH,UAAU,kCAAkC;IAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,KAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE;IACpC,iBAAiB,EAAE,qBAAqB,EAAE,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,
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandlerCommon.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationErrorHandlerCommon.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,kBAAkB,CAAC;AAI1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD;;;GAGG;AACH,UAAU,kCAAkC;IAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,KAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE;IACpC,iBAAiB,EAAE,qBAAqB,EAAE,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":[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
|
|
1
|
+
{"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,O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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,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{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,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{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
|
|
@@ -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,7 +56,13 @@ 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;
|
|
@@ -57,7 +71,12 @@ export interface FlightSliceView {
|
|
|
57
71
|
/** "+1" when it lands on a later calendar day than it left. */
|
|
58
72
|
dayOffset?: string;
|
|
59
73
|
stops?: string;
|
|
74
|
+
/** Numeric stops for a renderer that draws them on the route line. */
|
|
75
|
+
stopCount?: number;
|
|
60
76
|
duration?: string;
|
|
77
|
+
durationMinutes?: number;
|
|
78
|
+
/** "Sun, Oct 4": the slice's departure date. */
|
|
79
|
+
date?: string;
|
|
61
80
|
/**
|
|
62
81
|
* The small line under the route. One way: the duration only, since the
|
|
63
82
|
* footer already says how it flies ("ANA · Nonstop"). Round trip: duration
|
|
@@ -76,9 +95,37 @@ export interface FlightCardView {
|
|
|
76
95
|
slices: FlightSliceView[];
|
|
77
96
|
/** Footer line, e.g. "ANA · Nonstop". */
|
|
78
97
|
footer: string;
|
|
98
|
+
/**
|
|
99
|
+
* What the fare includes, e.g. "Lufthansa Economy Comfort · 1 checked bag ·
|
|
100
|
+
* One way". Only when the offer says something about its fare (brand,
|
|
101
|
+
* a non-economy cabin, bags, separate tickets); never filled with a guess.
|
|
102
|
+
*/
|
|
103
|
+
fareLine?: string;
|
|
79
104
|
price?: string;
|
|
80
105
|
/** One sentence a screen reader announces for the whole card. */
|
|
81
106
|
accessibleLabel: string;
|
|
107
|
+
/** Marketing airline, e.g. "Airblue". */
|
|
108
|
+
airline?: string;
|
|
109
|
+
/** Two-letter monogram for the airline tile: the IATA prefix of a flight number, else initials. */
|
|
110
|
+
airlineCode: string;
|
|
111
|
+
/** Stable 0..7 palette slot for the monogram, so one airline keeps one colour across cards. */
|
|
112
|
+
airlineTone: number;
|
|
113
|
+
/** "PA 201", or "PA 201 · PA 202" for a round trip. */
|
|
114
|
+
flightNumber?: string;
|
|
115
|
+
seller?: string;
|
|
116
|
+
/** Outbound departure date, "Sun, Oct 4". */
|
|
117
|
+
date?: string;
|
|
118
|
+
/** Humanised cabin, "Business"; omitted for plain economy. */
|
|
119
|
+
cabin?: string;
|
|
120
|
+
roundTrip: boolean;
|
|
121
|
+
/** Separate tickets: listed, never badged while a protected fare is in the set. */
|
|
122
|
+
selfTransfer?: boolean;
|
|
123
|
+
/** Numeric price for ranking; undefined when the offer carries no usable number. */
|
|
124
|
+
priceValue?: number;
|
|
125
|
+
/** Door-to-door minutes across every slice; undefined when any slice lacks one. */
|
|
126
|
+
totalMinutes?: number;
|
|
127
|
+
/** Set by {@link rankFlightCards}: the standouts this card is. */
|
|
128
|
+
badges: FlightBadge[];
|
|
82
129
|
}
|
|
83
130
|
export declare const wallClock: (iso?: string) => string | undefined;
|
|
84
131
|
export declare const dayOffset: (departAt?: string, arriveAt?: string) => string | undefined;
|
|
@@ -87,8 +134,65 @@ export declare const dateLabel: (iso?: string) => string | undefined;
|
|
|
87
134
|
export declare const stopsLabel: (stops?: number) => string | undefined;
|
|
88
135
|
export declare const durationLabel: (minutes?: number) => string | undefined;
|
|
89
136
|
export declare const flightPrice: (item: FlightOfferLike, currency?: string) => string | undefined;
|
|
137
|
+
/** The numeric fare, from `price` or parsed out of the label; undefined when neither is usable. */
|
|
138
|
+
export declare const flightPriceValue: (item: FlightOfferLike) => number | undefined;
|
|
139
|
+
/** "premium_economy" → "Premium economy"; plain economy is the default and reads as nothing. */
|
|
140
|
+
export declare const cabinLabel: (cabinClass?: string) => string | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* "Lufthansa Economy Comfort · 1 checked bag · One way": the airline with its
|
|
143
|
+
* fare brand (or a non-economy cabin), the bags the fare includes, separate
|
|
144
|
+
* tickets when they are, and the trip type. Undefined when the offer says
|
|
145
|
+
* nothing about its fare beyond the trip type, so a card never shows a line
|
|
146
|
+
* of defaults.
|
|
147
|
+
*/
|
|
148
|
+
export declare const fareLineLabel: (flight: TravelFlightDetails, roundTrip: boolean) => string | undefined;
|
|
149
|
+
export declare const flightNumberLabel: (numbers?: string[]) => string | undefined;
|
|
150
|
+
/** The two-letter tile for an airline: its IATA prefix when a flight number carries one, else initials. */
|
|
151
|
+
export declare const airlineCode: (airline?: string, flightNumbers?: string[]) => string;
|
|
152
|
+
/** A stable palette slot for an airline name, so Airblue is the same colour on every card. */
|
|
153
|
+
export declare const airlineTone: (airline?: string, slots?: number) => number;
|
|
90
154
|
/** True when the attachment is a flight result, so the card shows flights, not stays. */
|
|
91
155
|
export declare const isFlightAttachment: (a?: FlightOfferSetLike) => boolean;
|
|
92
156
|
export declare const toFlightCard: (item: FlightOfferLike, index: number, currency?: string) => FlightCardView | null;
|
|
157
|
+
export declare const flightBadgeLabel: (badge: FlightBadge) => string;
|
|
158
|
+
/**
|
|
159
|
+
* Labels the standouts of a result set: the cheapest fare, the shortest trip,
|
|
160
|
+
* and, when it is a third card, the best price-for-time. Needs two priced
|
|
161
|
+
* offers to mean anything; a lone card gets no badge. Cards keep their order.
|
|
162
|
+
* Self-transfer fares only compete when the set has nothing else.
|
|
163
|
+
*/
|
|
164
|
+
export declare const rankFlightCards: (cards: FlightCardView[]) => FlightCardView[];
|
|
165
|
+
/** Every offer as a ranked card; stays and unusable items are skipped. */
|
|
93
166
|
export declare const toFlightCards: (a: FlightOfferSetLike) => FlightCardView[];
|
|
167
|
+
/** A stable ordering of the cards; `recommended` is the order the agent returned them in. */
|
|
168
|
+
export declare const sortFlightCards: (cards: FlightCardView[], sort: FlightSort) => FlightCardView[];
|
|
169
|
+
/** One quick pick in the result header: "Cheapest · $61 · Airblue". */
|
|
170
|
+
export interface FlightPick {
|
|
171
|
+
badge: FlightBadge;
|
|
172
|
+
label: string;
|
|
173
|
+
/** The card it points at. */
|
|
174
|
+
key: string;
|
|
175
|
+
price?: string;
|
|
176
|
+
duration?: string;
|
|
177
|
+
airline?: string;
|
|
178
|
+
}
|
|
179
|
+
/** What a result set is as a whole: the line above the cards and the panel header. */
|
|
180
|
+
export interface FlightResultSummary {
|
|
181
|
+
/** "ISB → KHI", or "ISB ⇄ KHI" for a round trip. */
|
|
182
|
+
route?: string;
|
|
183
|
+
origin?: string;
|
|
184
|
+
destination?: string;
|
|
185
|
+
roundTrip: boolean;
|
|
186
|
+
/** "Sun, Oct 4", or "Sun, Oct 4 – Sun, Oct 11"; unset when the offers span different dates. */
|
|
187
|
+
date?: string;
|
|
188
|
+
/** True when every offer leaves on the same date, so a card need not repeat it. */
|
|
189
|
+
sameDate: boolean;
|
|
190
|
+
count: number;
|
|
191
|
+
/** Lowest fare, formatted. */
|
|
192
|
+
fromPrice?: string;
|
|
193
|
+
/** The seller, when every offer comes from one. */
|
|
194
|
+
seller?: string;
|
|
195
|
+
picks: FlightPick[];
|
|
196
|
+
}
|
|
197
|
+
export declare const flightResultSummary: (a: FlightOfferSetLike, cards?: FlightCardView[]) => FlightResultSummary;
|
|
94
198
|
//# 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,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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"}
|
package/lib/utils/flightCards.js
CHANGED
|
@@ -56,23 +56,126 @@ const durationLabel = (minutes) => {
|
|
|
56
56
|
return `${m}m`;
|
|
57
57
|
return m === 0 ? `${h}h` : `${h}h ${m}m`;
|
|
58
58
|
};
|
|
59
|
-
const
|
|
60
|
-
if (item.priceLabel)
|
|
61
|
-
return item.priceLabel;
|
|
62
|
-
if (typeof item.price !== 'number' || !Number.isFinite(item.price))
|
|
63
|
-
return undefined;
|
|
59
|
+
const formatCurrency = (amount, currency) => {
|
|
64
60
|
try {
|
|
65
|
-
return new Intl.NumberFormat('en-US', {
|
|
61
|
+
return (new Intl.NumberFormat('en-US', {
|
|
66
62
|
style: 'currency',
|
|
67
63
|
currency,
|
|
68
64
|
maximumFractionDigits: 0,
|
|
69
|
-
})
|
|
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, ' '));
|
|
70
69
|
}
|
|
71
70
|
catch {
|
|
72
71
|
// An unknown currency code must not take the whole card down.
|
|
73
|
-
return `${Math.round(
|
|
72
|
+
return `${Math.round(amount)} ${currency}`;
|
|
74
73
|
}
|
|
75
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
|
+
const bagsLabel = (checked, carryOn) => {
|
|
118
|
+
const n = (v) => (typeof v === 'number' && Number.isFinite(v) && v >= 0 ? Math.floor(v) : undefined);
|
|
119
|
+
const bags = n(checked);
|
|
120
|
+
if (bags != null && bags > 0)
|
|
121
|
+
return bags === 1 ? '1 checked bag' : `${bags} checked bags`;
|
|
122
|
+
if (bags === 0)
|
|
123
|
+
return (n(carryOn) ?? 0) > 0 ? 'Carry-on only' : 'No checked bag';
|
|
124
|
+
return undefined;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* "Lufthansa Economy Comfort · 1 checked bag · One way": the airline with its
|
|
128
|
+
* fare brand (or a non-economy cabin), the bags the fare includes, separate
|
|
129
|
+
* tickets when they are, and the trip type. Undefined when the offer says
|
|
130
|
+
* nothing about its fare beyond the trip type, so a card never shows a line
|
|
131
|
+
* of defaults.
|
|
132
|
+
*/
|
|
133
|
+
const fareLineLabel = (flight, roundTrip) => {
|
|
134
|
+
const brand = flight.fareBrand?.trim() || cabinLabel(flight.cabinClass);
|
|
135
|
+
const bags = bagsLabel(flight.checkedBags, flight.carryOnBags);
|
|
136
|
+
const selfTransfer = flight.selfTransfer === true ? 'Self-transfer (separate tickets)' : undefined;
|
|
137
|
+
if (!brand && !bags && !selfTransfer)
|
|
138
|
+
return undefined;
|
|
139
|
+
const fare = [flight.airline?.trim(), brand].filter(Boolean).join(' ') || undefined;
|
|
140
|
+
return [fare, bags, selfTransfer, roundTrip ? 'Round trip' : 'One way'].filter(Boolean).join(' · ');
|
|
141
|
+
};
|
|
142
|
+
/** An IATA (2 chars, at least one letter) or ICAO (3 letters) airline code, then the number. */
|
|
143
|
+
const FLIGHT_NUMBER = /^([A-Z]{2,3}|[A-Z][0-9]|[0-9][A-Z])\s*(\d{1,4}[A-Z]?)$/i;
|
|
144
|
+
/** "PA201" → "PA 201"; anything else is shown as written. */
|
|
145
|
+
const formatFlightNumber = (raw) => {
|
|
146
|
+
const m = FLIGHT_NUMBER.exec(raw.trim());
|
|
147
|
+
return m ? `${m[1].toUpperCase()} ${m[2].toUpperCase()}` : raw.trim();
|
|
148
|
+
};
|
|
149
|
+
const flightNumberLabel = (numbers) => {
|
|
150
|
+
const list = (numbers ?? []).map((n) => n?.trim()).filter(Boolean);
|
|
151
|
+
if (list.length === 0)
|
|
152
|
+
return undefined;
|
|
153
|
+
const shown = list.slice(0, 2).map(formatFlightNumber);
|
|
154
|
+
return list.length > 2 ? `${shown.join(' · ')} +${list.length - 2}` : shown.join(' · ');
|
|
155
|
+
};
|
|
156
|
+
/** The two-letter tile for an airline: its IATA prefix when a flight number carries one, else initials. */
|
|
157
|
+
const airlineCode = (airline, flightNumbers) => {
|
|
158
|
+
const first = flightNumbers?.find((n) => n && FLIGHT_NUMBER.test(n.trim()));
|
|
159
|
+
if (first)
|
|
160
|
+
return FLIGHT_NUMBER.exec(first.trim())[1].toUpperCase().slice(0, 2);
|
|
161
|
+
const words = (airline ?? '')
|
|
162
|
+
.split(/[\s,/&-]+/)
|
|
163
|
+
.map((w) => w.replace(/[^A-Za-z0-9]/g, ''))
|
|
164
|
+
.filter(Boolean);
|
|
165
|
+
if (words.length === 0)
|
|
166
|
+
return '✈';
|
|
167
|
+
if (words.length === 1)
|
|
168
|
+
return words[0].slice(0, 2).toUpperCase();
|
|
169
|
+
return (words[0][0] + words[1][0]).toUpperCase();
|
|
170
|
+
};
|
|
171
|
+
/** A stable palette slot for an airline name, so Airblue is the same colour on every card. */
|
|
172
|
+
const airlineTone = (airline, slots = 8) => {
|
|
173
|
+
const s = (airline ?? '').toLowerCase();
|
|
174
|
+
let h = 0;
|
|
175
|
+
for (let i = 0; i < s.length; i++)
|
|
176
|
+
h = (h * 31 + s.charCodeAt(i)) >>> 0;
|
|
177
|
+
return h % slots;
|
|
178
|
+
};
|
|
76
179
|
const sliceView = (s) => ({
|
|
77
180
|
origin: s.origin,
|
|
78
181
|
destination: s.destination,
|
|
@@ -80,7 +183,12 @@ const sliceView = (s) => ({
|
|
|
80
183
|
arriveTime: wallClock(s.arriveAt),
|
|
81
184
|
dayOffset: dayOffset(s.departAt, s.arriveAt),
|
|
82
185
|
stops: stopsLabel(s.stops),
|
|
186
|
+
stopCount: typeof s.stops === 'number' && Number.isFinite(s.stops) && s.stops >= 0 ? s.stops : undefined,
|
|
83
187
|
duration: durationLabel(s.durationMinutes),
|
|
188
|
+
durationMinutes: typeof s.durationMinutes === 'number' && Number.isFinite(s.durationMinutes) && s.durationMinutes > 0
|
|
189
|
+
? s.durationMinutes
|
|
190
|
+
: undefined,
|
|
191
|
+
date: dateLabel(s.departAt),
|
|
84
192
|
});
|
|
85
193
|
/** True when the attachment is a flight result, so the card shows flights, not stays. */
|
|
86
194
|
const isFlightAttachment = (a) => !!a?.properties?.some((p) => (p.flight?.slices?.length ?? 0) > 0);
|
|
@@ -95,17 +203,21 @@ const toFlightCard = (item, index, currency) => {
|
|
|
95
203
|
if (!flight || slices.length === 0)
|
|
96
204
|
return null;
|
|
97
205
|
const outbound = flight.slices[0];
|
|
98
|
-
const seller = flight.seller?.trim();
|
|
206
|
+
const seller = flight.seller?.trim() || undefined;
|
|
207
|
+
const airline = flight.airline?.trim() || undefined;
|
|
99
208
|
const date = dateLabel(outbound.departAt);
|
|
100
209
|
const header = [seller, date].filter(Boolean).join(' · ') || `${slices[0].origin} to ${slices[0].destination}`;
|
|
101
210
|
// One direction: say how it flies. A round trip already shows stops per
|
|
102
211
|
// row, so the footer names the trip type instead of repeating them.
|
|
103
212
|
const how = roundTrip ? 'Round trip' : slices[0].stops;
|
|
104
|
-
const footer = [
|
|
213
|
+
const footer = [airline || item.title, how].filter(Boolean).join(' · ');
|
|
214
|
+
const fareLine = fareLineLabel(flight, roundTrip);
|
|
105
215
|
const price = flightPrice(item, currency);
|
|
106
216
|
const spoken = slices
|
|
107
217
|
.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()}` : ''}`)
|
|
108
218
|
.join('; returning ');
|
|
219
|
+
const minutes = slices.map((s) => s.durationMinutes);
|
|
220
|
+
const totalMinutes = minutes.every((m) => m != null) ? minutes.reduce((a, b) => a + b, 0) : undefined;
|
|
109
221
|
return {
|
|
110
222
|
key: item.id ?? `flight-${index}`,
|
|
111
223
|
url: item.url,
|
|
@@ -113,16 +225,142 @@ const toFlightCard = (item, index, currency) => {
|
|
|
113
225
|
sellerInitial: seller ? seller.charAt(0).toUpperCase() : undefined,
|
|
114
226
|
slices,
|
|
115
227
|
footer,
|
|
228
|
+
...(fareLine ? { fareLine } : {}),
|
|
116
229
|
price,
|
|
117
230
|
accessibleLabel: [
|
|
118
231
|
flight.airline,
|
|
119
232
|
spoken.replace(/\s+/g, ' ').trim(),
|
|
233
|
+
fareLine,
|
|
120
234
|
price,
|
|
121
235
|
date,
|
|
122
236
|
seller && `sold by ${seller}`,
|
|
123
237
|
]
|
|
124
238
|
.filter(Boolean)
|
|
125
239
|
.join(', '),
|
|
240
|
+
airline,
|
|
241
|
+
airlineCode: airlineCode(airline, flight.flightNumbers),
|
|
242
|
+
airlineTone: airlineTone(airline ?? item.title),
|
|
243
|
+
flightNumber: flightNumberLabel(flight.flightNumbers),
|
|
244
|
+
seller,
|
|
245
|
+
date,
|
|
246
|
+
cabin: cabinLabel(flight.cabinClass),
|
|
247
|
+
roundTrip,
|
|
248
|
+
...(flight.selfTransfer === true ? { selfTransfer: true } : {}),
|
|
249
|
+
priceValue: flightPriceValue(item),
|
|
250
|
+
totalMinutes,
|
|
251
|
+
badges: [],
|
|
126
252
|
};
|
|
127
253
|
};
|
|
128
|
-
const
|
|
254
|
+
const BADGE_WORDS = {
|
|
255
|
+
cheapest: 'cheapest',
|
|
256
|
+
fastest: 'fastest',
|
|
257
|
+
best: 'best value',
|
|
258
|
+
};
|
|
259
|
+
const flightBadgeLabel = (badge) => badge === 'best' ? 'Best value' : badge === 'cheapest' ? 'Cheapest' : 'Fastest';
|
|
260
|
+
/**
|
|
261
|
+
* Labels the standouts of a result set: the cheapest fare, the shortest trip,
|
|
262
|
+
* and, when it is a third card, the best price-for-time. Needs two priced
|
|
263
|
+
* offers to mean anything; a lone card gets no badge. Cards keep their order.
|
|
264
|
+
* Self-transfer fares only compete when the set has nothing else.
|
|
265
|
+
*/
|
|
266
|
+
const rankFlightCards = (cards) => {
|
|
267
|
+
// Separate tickets are never "Cheapest" or "Fastest" while a protected fare
|
|
268
|
+
// is in the set: the badge would sell a trip whose missed connection
|
|
269
|
+
// nobody covers.
|
|
270
|
+
const pricedAll = cards.filter((c) => c.priceValue != null);
|
|
271
|
+
const pricedProtected = pricedAll.filter((c) => !c.selfTransfer);
|
|
272
|
+
const priced = pricedProtected.length ? pricedProtected : pricedAll;
|
|
273
|
+
if (priced.length < 2)
|
|
274
|
+
return cards.map((c) => ({ ...c, badges: [] }));
|
|
275
|
+
const byPrice = (a, b) => a.priceValue - b.priceValue || (a.totalMinutes ?? Infinity) - (b.totalMinutes ?? Infinity);
|
|
276
|
+
const cheapest = [...priced].sort(byPrice)[0];
|
|
277
|
+
const timed = priced.filter((c) => c.totalMinutes != null);
|
|
278
|
+
const fastest = timed.length
|
|
279
|
+
? [...timed].sort((a, b) => a.totalMinutes - b.totalMinutes || a.priceValue - b.priceValue)[0]
|
|
280
|
+
: undefined;
|
|
281
|
+
let best;
|
|
282
|
+
if (fastest && timed.length >= 2) {
|
|
283
|
+
const minPrice = cheapest.priceValue;
|
|
284
|
+
const minMinutes = fastest.totalMinutes;
|
|
285
|
+
const score = (c) => c.priceValue / minPrice + c.totalMinutes / minMinutes;
|
|
286
|
+
best = [...timed].sort((a, b) => score(a) - score(b) || byPrice(a, b))[0];
|
|
287
|
+
}
|
|
288
|
+
return cards.map((c) => {
|
|
289
|
+
const badges = [];
|
|
290
|
+
if (c === cheapest)
|
|
291
|
+
badges.push('cheapest');
|
|
292
|
+
if (fastest && c === fastest)
|
|
293
|
+
badges.push('fastest');
|
|
294
|
+
// "Best value" only when it is a different card: the cheapest or
|
|
295
|
+
// fastest already says more than a derived score would.
|
|
296
|
+
if (best && c === best && c !== cheapest && c !== fastest)
|
|
297
|
+
badges.push('best');
|
|
298
|
+
if (badges.length === 0)
|
|
299
|
+
return { ...c, badges };
|
|
300
|
+
return {
|
|
301
|
+
...c,
|
|
302
|
+
badges,
|
|
303
|
+
accessibleLabel: `${badges.map((b) => BADGE_WORDS[b]).join(' and ')}, ${c.accessibleLabel}`,
|
|
304
|
+
};
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
/** Every offer as a ranked card; stays and unusable items are skipped. */
|
|
308
|
+
const toFlightCards = (a) => rankFlightCards((a.properties ?? [])
|
|
309
|
+
.map((p, i) => toFlightCard(p, i, a.currency))
|
|
310
|
+
.filter((c) => c !== null));
|
|
311
|
+
/** A stable ordering of the cards; `recommended` is the order the agent returned them in. */
|
|
312
|
+
const sortFlightCards = (cards, sort) => {
|
|
313
|
+
if (sort === 'recommended')
|
|
314
|
+
return cards;
|
|
315
|
+
const metric = (c) => {
|
|
316
|
+
if (sort === 'cheapest')
|
|
317
|
+
return c.priceValue ?? Infinity;
|
|
318
|
+
if (sort === 'fastest')
|
|
319
|
+
return c.totalMinutes ?? Infinity;
|
|
320
|
+
return c.slices[0]?.departTime ?? '99:99';
|
|
321
|
+
};
|
|
322
|
+
return cards
|
|
323
|
+
.map((c, index) => ({ c, index, m: metric(c) }))
|
|
324
|
+
.sort((a, b) => (a.m < b.m ? -1 : a.m > b.m ? 1 : 0) || a.index - b.index)
|
|
325
|
+
.map((x) => x.c);
|
|
326
|
+
};
|
|
327
|
+
const flightResultSummary = (a, cards = toFlightCards(a)) => {
|
|
328
|
+
const first = cards[0];
|
|
329
|
+
const out = first?.slices[0];
|
|
330
|
+
const back = first?.roundTrip ? first.slices[first.slices.length - 1] : undefined;
|
|
331
|
+
const roundTrip = !!back;
|
|
332
|
+
const dates = new Set(cards.map((c) => c.date ?? ''));
|
|
333
|
+
const sameDate = dates.size <= 1;
|
|
334
|
+
const outDate = sameDate ? first?.date : undefined;
|
|
335
|
+
const date = outDate ? [outDate, back?.date].filter(Boolean).join(' – ') : undefined;
|
|
336
|
+
const priced = cards.filter((c) => c.priceValue != null);
|
|
337
|
+
const cheapestCard = priced.length ? [...priced].sort((x, y) => x.priceValue - y.priceValue)[0] : undefined;
|
|
338
|
+
const sellers = new Set(cards.map((c) => c.seller ?? ''));
|
|
339
|
+
const seller = sellers.size === 1 ? first?.seller : undefined;
|
|
340
|
+
const picks = [];
|
|
341
|
+
for (const badge of ['cheapest', 'fastest', 'best']) {
|
|
342
|
+
const card = cards.find((c) => c.badges.includes(badge));
|
|
343
|
+
if (!card)
|
|
344
|
+
continue;
|
|
345
|
+
picks.push({
|
|
346
|
+
badge,
|
|
347
|
+
label: flightBadgeLabel(badge),
|
|
348
|
+
key: card.key,
|
|
349
|
+
price: card.price,
|
|
350
|
+
duration: durationLabel(card.totalMinutes),
|
|
351
|
+
airline: card.airline,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
return {
|
|
355
|
+
route: out ? `${out.origin} ${roundTrip ? '⇄' : '→'} ${out.destination}` : undefined,
|
|
356
|
+
origin: out?.origin,
|
|
357
|
+
destination: out?.destination,
|
|
358
|
+
roundTrip,
|
|
359
|
+
date,
|
|
360
|
+
sameDate,
|
|
361
|
+
count: a.totalCount ?? cards.length,
|
|
362
|
+
fromPrice: cheapestCard?.price,
|
|
363
|
+
seller,
|
|
364
|
+
picks,
|
|
365
|
+
};
|
|
366
|
+
};export{airlineCode,airlineTone,cabinLabel,dateLabel,dayOffset,durationLabel,fareLineLabel,flightBadgeLabel,flightNumberLabel,flightPrice,flightPriceValue,flightResultSummary,isFlightAttachment,rankFlightCards,sortFlightCards,stopsLabel,toFlightCard,toFlightCards,wallClock};//# sourceMappingURL=flightCards.js.map
|
|
@@ -1 +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,GAAA,IAAA;IACf,OAAA,CAAA,GAAW,CAAA,OAAQ,CAAC,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,SAAA;;MAEpB,MAAQ,GAAG,CAAA,GAAA,KAAO;IAClB,MAAA,CAAA,GAAS,GAAE,GAAA,aAAO,CAAA,IAAA,CAAA,GAAA,CAAA,GAAA,IAAA;IAClB,OAAA,CAAA,GAAA,IAAA,CAAA,GAAmB,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,SAAA;;AAEnB,MAAA,SAAA,GAAA,CAAA,QAAA,EAAA,QAAA,KAAA;IACA,MAAA,CAAA,GAAA,MAAgB,CAAA,QAAS,CAAA;AAC5B,IAAA,MAAA,CAAA,GAAA,MAAA,CAAA,QAAA,CAAA;AAED,IAAA,aAAiB,IAAA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AAyB,uBAAyB,IAAE,CAAA,EAAA,WAAA,CAAA,CAAA,GAAA,CAAA,SAA2B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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;AAClC,cAAc,eAAe,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;AAC9B,cAAc,eAAe,CAAC"}
|