@sonic-equipment/ui 0.0.70 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -1
- package/dist/index.js +20 -4
- package/dist/src/index.d.ts +1 -0
- package/dist/src/pages/product-details-page/product-details-page.d.ts +4 -0
- package/dist/src/pages/product-details-page/product-details-page.stories.d.ts +20 -0
- package/dist/src/shared/feature-flags/use-feature-flags.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ interface Request {
|
|
|
121
121
|
declare const request: Request;
|
|
122
122
|
|
|
123
123
|
interface UseFeatureFlagsReturnType {
|
|
124
|
+
pdpV2: boolean;
|
|
124
125
|
plpV2: boolean;
|
|
125
126
|
searchV2: boolean;
|
|
126
127
|
}
|
|
@@ -4631,6 +4632,11 @@ interface PageProps {
|
|
|
4631
4632
|
}
|
|
4632
4633
|
declare function Page({ breadCrumb, children, className, title }: PageProps): react_jsx_runtime.JSX.Element;
|
|
4633
4634
|
|
|
4635
|
+
interface ProductDetailsPageProps {
|
|
4636
|
+
pageUrl: string;
|
|
4637
|
+
}
|
|
4638
|
+
declare function ProductDetailsPage({ pageUrl }: ProductDetailsPageProps): react_jsx_runtime.JSX.Element;
|
|
4639
|
+
|
|
4634
4640
|
interface Filters {
|
|
4635
4641
|
color: {
|
|
4636
4642
|
options: {
|
|
@@ -4992,4 +4998,4 @@ declare function ReactQueryContainer({ children }: {
|
|
|
4992
4998
|
children: ReactNode;
|
|
4993
4999
|
}): react_jsx_runtime.JSX.Element;
|
|
4994
5000
|
|
|
4995
|
-
export { Accordion, type AccountCollectionModel, type AccountModel, type AccountPaymentProfileCollectionModel, type AccountPaymentProfileModel, type AccountSettingsModel, type AccountShipToCollectionModel, type AccountShipToModel, type AccountsReceivableDto$1 as AccountsReceivableDto, type AddProductToCurrentCartParams$1 as AddProductToCurrentCartParams, AddToCartButton, type AddressFieldCollectionModel, type AddressFieldDisplayCollectionModel, type AddressFieldDisplayModel, type AgingBucketDto$1 as AgingBucketDto, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, type AlgoliaInsightsProviderState, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, type AttributeTypeDto, type AttributeTypeFacetModel, type AttributeTypeModel, type AttributeValueDto, type AttributeValueFacetModel, type AttributeValueModel, type AuthenticationResponse$1 as AuthenticationResponse, type AutocompleteItemModel, type AutocompleteModel, type AutocompleteProductCollectionModel, type AutocompleteProductModel, type AvailabilityDto$2 as AvailabilityDto, AvailabilityMessageType$2 as AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, type BadgeModel, BadgeStyleValues, BadgeTypeValues, type BaseAddressModel, type BaseModel$1 as BaseModel, type BillToCollectionModel, type BillToModel$1 as BillToModel, type BrandAlphabetLetterModel, type BrandAlphabetModel, type BrandAutocompleteModel, type BrandCategoryCollectionModel, type BrandCategoryModel, type BrandCollectionModel, type BrandDto$2 as BrandDto, type BrandModel, type BrandProductLineCollectionModel, type BrandProductLineModel, type BreadCrumb, type BreadCrumbModel, Breadcrumb, type BreadcrumbLink$1 as BreadcrumbLink, type BreadcrumbProps, type BreakPriceDto$2 as BreakPriceDto, type BreakPriceRfqModel, type BudgetCalendarCollectionModel, type BudgetCalendarModel, type BudgetCollectionModel, type BudgetLineModel, type BudgetModel, Button, type ButtonProps, type CalculationMethod, type CarrierDto, type CartCollectionModel, type CartLineCollectionModel, type CartLineModel$2 as CartLineModel, type CartModel, CartProvider, type CartSettingsModel, type CatalogPageModel, type Category$1 as Category, CategoryCarousel, type CategoryCarouselProps, type CategoryCollectionModel, type CategoryFacetModel, type CategoryModel, Checkbox, type CheckboxProps$1 as CheckboxProps, type ChildTraitValueModel, ColorCheckbox, type ColorCheckboxProps, type ConfigSectionDto, type ConfigSectionModel, type ConfigSectionOptionDto, type ConfigurationModel, ConnectedAddToCartButton, type ContactUsModel, type ContentModel, type CostCodeDto, type CostCodeModel$1 as CostCodeModel, type CountryCollectionModel, type CountryModel$1 as CountryModel, type CreateSessionRequestBody, type CreditCardBillingAddressDto, type CreditCardDto, type CrossSellCollectionModel, type CurrencyCollectionModel, type CurrencyModel$1 as CurrencyModel, CurrencyPositioningType$1 as CurrencyPositioningType, type CustomerCostCodeDto, type CustomerOrderTaxDto, type CustomerSettingsModel, type CustomerValidationDto$1 as CustomerValidationDto, type DashboardPanelCollectionModel, type DashboardPanelModel, type DealerCollectionModel, type DealerModel, type DetailModel, type DocumentDto, type DocumentModel, type ECheckDto, type Environment, type FacetModel, FavoriteButton, type FavoriteButtonProps, FavoriteProvider, type FetchProductListingPageDataArgs, type FieldScoreDetailedDto, type FieldScoreDetailedModel, type FieldScoreDto, type FieldScoreModel, type FieldValidationDto$1 as FieldValidationDto, type FilterOption, FilterSection, type Filters, ForbiddenRequestError, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, type IconButtonProps, Image, type ImageModel, InternalServerErrorRequest, IntlProvider, type InventoryAvailabilityDto, type InventoryWarehousesDto, type InvoiceCollectionModel, type InvoiceHistoryTaxDto, type InvoiceLineModel, type InvoiceModel, type InvoiceSettingsModel, type JobQuoteCollectionModel, type JobQuoteLineModel, type JobQuoteModel, type LanguageCollectionModel, type LanguageModel$1 as LanguageModel, type LegacyConfigurationDto, Link, type LinkProps, LoadingOverlay, type MessageCollectionModel, type MessageModel, type MobileAppSettingsModel, type MobileContentModel, type MobilePageDto, type MobileWidgetDto, MultiSelect, type MultiSelectProps, type NavigateFn, type NavigateOptions, NotFoundRequestError, NumberField, type NumberFieldSize, type OrderApprovalCollectionModel, type OrderCollectionModel, type OrderHistoryTaxDto, type OrderLineModel, type OrderModel, type OrderPromotionModel, type OrderRequestModel, type OrderSettingsModel, type OrderStatusMappingCollectionModel, type OrderStatusMappingModel, Page, PageContainer, type PageProps, type PaginationModel$1 as PaginationModel, type PaymentMethodDto, type PaymentOptionsDto, type PersonaModel$1 as PersonaModel, type PoRequisitionModel, type PriceFacetModel, type PriceRangeModel, type PricingRfqModel, type ProductAutocompleteItemModel, type ProductAvailabilityModel, ProductCard, type ProductCardProps, type ProductCollectionModel, type ProductDto, type ProductHit$1 as ProductHit, type ProductImageDto, type ProductInventoryDto, type ProductLineDto, type ProductLineModel, ProductListingPage, type ProductListingPageDataResponse, type ProductListingPageProps, type ProductModel, ProductOverviewGrid, type ProductOverviewGridProps, ProductPrice, type ProductPriceDto$2 as ProductPriceDto, type ProductPriceModel, type ProductPriceProps, type ProductSettingsModel, ProductSku, type ProductSkuProps, type ProductSubscriptionDto$2 as ProductSubscriptionDto, type ProductSubscriptionModel, type ProductUnitOfMeasureDto$1 as ProductUnitOfMeasureDto, type ProfileTransactionRequestModel, ProgressCircle, type ProgressCircleProps, type PromoCard$1 as PromoCard, type PromoCards, type PromotionCollectionModel, type PromotionModel, type QuoteCollectionModel, type QuoteLineModel, type QuoteModel, type QuoteSettingsModel, ReactQueryContainer, type RealTimeCartInventoryModel, type RealTimeInventoryModel, type RealTimePricingModel, type RefinementListItem, type RelatedProductDto, RequestError, type RequestHeaders, type RequisitionCollectionModel, type RequisitionLineCollectionModel, type RequisitionLineModel, type RequisitionModel, type RmaLineDto, type RmaModel, RouteButton, RouteLink, RouteProvider, type RouteProviderProps, type SalespersonModel, type ScoreExplanationDto, type ScoreExplanationModel, SearchResultsPage, SearchRoot, type SectionOptionDto$2 as SectionOptionDto, type SectionOptionModel, Select, type SelectProps, type SessionModel$1 as SessionModel, type SessionRequestModel, type SettingsCollectionModel, type SetupRequestModel, type ShareEntityModel, type ShareOrderModel, type ShipToCollectionModel, type ShipToModel$1 as ShipToModel, type ShipViaDto, type ShipmentPackageDto, type ShipmentPackageLineDto, ShowAll, type ShowAllProps, Sidebar, SidebarDetectBreakpoint, type SidebarProps, SidebarProvider, type SiteMessageCollectionModel, type SiteMessageModel, type SortOptionModel$1 as SortOptionModel, type SpecificationDto, type SpecificationModel, type StateCollectionModel, type StateModel$1 as StateModel, type StyleTraitDto, type StyleValueDto, type StyledProductDto, type SuggestionModel, type TellAFriendModel, TextField, TimeoutRequestError, type TraitValueModel, type TranslationDictionaryCollectionModel, type TranslationDictionaryModel, type TranslationId, UnauthorizedRequestError, type UnitOfMeasureModel, UnprocessableContentRequestError, type UpdateCartLineParams, type UpdateGlobalState$1 as UpdateGlobalState, type UpdateWishListLineCollectionModel, type UseAlgoliaEventResult, VariantDisplayTypeValues, type VariantTraitModel, type VmiBinCollectionModel, type VmiBinCountModel, type VmiBinModel, type VmiCountCollectionModel, type VmiCountModel, type VmiLocationCollectionModel, type VmiLocationModel, type VmiNoteCollectionModel, type VmiNoteModel, type VmiUserImportCollectionModel, type VmiUserImportModel, type VmiUserModel, type WarehouseCollectionModel, type WarehouseDto, type WarehouseModel$1 as WarehouseModel, type WebsiteModel, type WebsiteSettingsModel, type WishListCollectionModel$1 as WishListCollectionModel, type WishListEmailScheduleModel$1 as WishListEmailScheduleModel, type WishListLine$1 as WishListLine, type WishListLineCollectionModel$1 as WishListLineCollectionModel, type WishListLineModel$1 as WishListLineModel, type WishListLines$1 as WishListLines, type WishListModel$1 as WishListModel, WishListNameAlreadyExistsError, type WishListSettingsModel, type WishListShareModel$1 as WishListShareModel, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
|
|
5001
|
+
export { Accordion, type AccountCollectionModel, type AccountModel, type AccountPaymentProfileCollectionModel, type AccountPaymentProfileModel, type AccountSettingsModel, type AccountShipToCollectionModel, type AccountShipToModel, type AccountsReceivableDto$1 as AccountsReceivableDto, type AddProductToCurrentCartParams$1 as AddProductToCurrentCartParams, AddToCartButton, type AddressFieldCollectionModel, type AddressFieldDisplayCollectionModel, type AddressFieldDisplayModel, type AgingBucketDto$1 as AgingBucketDto, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, type AlgoliaInsightsProviderState, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, type AttributeTypeDto, type AttributeTypeFacetModel, type AttributeTypeModel, type AttributeValueDto, type AttributeValueFacetModel, type AttributeValueModel, type AuthenticationResponse$1 as AuthenticationResponse, type AutocompleteItemModel, type AutocompleteModel, type AutocompleteProductCollectionModel, type AutocompleteProductModel, type AvailabilityDto$2 as AvailabilityDto, AvailabilityMessageType$2 as AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, type BadgeModel, BadgeStyleValues, BadgeTypeValues, type BaseAddressModel, type BaseModel$1 as BaseModel, type BillToCollectionModel, type BillToModel$1 as BillToModel, type BrandAlphabetLetterModel, type BrandAlphabetModel, type BrandAutocompleteModel, type BrandCategoryCollectionModel, type BrandCategoryModel, type BrandCollectionModel, type BrandDto$2 as BrandDto, type BrandModel, type BrandProductLineCollectionModel, type BrandProductLineModel, type BreadCrumb, type BreadCrumbModel, Breadcrumb, type BreadcrumbLink$1 as BreadcrumbLink, type BreadcrumbProps, type BreakPriceDto$2 as BreakPriceDto, type BreakPriceRfqModel, type BudgetCalendarCollectionModel, type BudgetCalendarModel, type BudgetCollectionModel, type BudgetLineModel, type BudgetModel, Button, type ButtonProps, type CalculationMethod, type CarrierDto, type CartCollectionModel, type CartLineCollectionModel, type CartLineModel$2 as CartLineModel, type CartModel, CartProvider, type CartSettingsModel, type CatalogPageModel, type Category$1 as Category, CategoryCarousel, type CategoryCarouselProps, type CategoryCollectionModel, type CategoryFacetModel, type CategoryModel, Checkbox, type CheckboxProps$1 as CheckboxProps, type ChildTraitValueModel, ColorCheckbox, type ColorCheckboxProps, type ConfigSectionDto, type ConfigSectionModel, type ConfigSectionOptionDto, type ConfigurationModel, ConnectedAddToCartButton, type ContactUsModel, type ContentModel, type CostCodeDto, type CostCodeModel$1 as CostCodeModel, type CountryCollectionModel, type CountryModel$1 as CountryModel, type CreateSessionRequestBody, type CreditCardBillingAddressDto, type CreditCardDto, type CrossSellCollectionModel, type CurrencyCollectionModel, type CurrencyModel$1 as CurrencyModel, CurrencyPositioningType$1 as CurrencyPositioningType, type CustomerCostCodeDto, type CustomerOrderTaxDto, type CustomerSettingsModel, type CustomerValidationDto$1 as CustomerValidationDto, type DashboardPanelCollectionModel, type DashboardPanelModel, type DealerCollectionModel, type DealerModel, type DetailModel, type DocumentDto, type DocumentModel, type ECheckDto, type Environment, type FacetModel, FavoriteButton, type FavoriteButtonProps, FavoriteProvider, type FetchProductListingPageDataArgs, type FieldScoreDetailedDto, type FieldScoreDetailedModel, type FieldScoreDto, type FieldScoreModel, type FieldValidationDto$1 as FieldValidationDto, type FilterOption, FilterSection, type Filters, ForbiddenRequestError, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, type IconButtonProps, Image, type ImageModel, InternalServerErrorRequest, IntlProvider, type InventoryAvailabilityDto, type InventoryWarehousesDto, type InvoiceCollectionModel, type InvoiceHistoryTaxDto, type InvoiceLineModel, type InvoiceModel, type InvoiceSettingsModel, type JobQuoteCollectionModel, type JobQuoteLineModel, type JobQuoteModel, type LanguageCollectionModel, type LanguageModel$1 as LanguageModel, type LegacyConfigurationDto, Link, type LinkProps, LoadingOverlay, type MessageCollectionModel, type MessageModel, type MobileAppSettingsModel, type MobileContentModel, type MobilePageDto, type MobileWidgetDto, MultiSelect, type MultiSelectProps, type NavigateFn, type NavigateOptions, NotFoundRequestError, NumberField, type NumberFieldSize, type OrderApprovalCollectionModel, type OrderCollectionModel, type OrderHistoryTaxDto, type OrderLineModel, type OrderModel, type OrderPromotionModel, type OrderRequestModel, type OrderSettingsModel, type OrderStatusMappingCollectionModel, type OrderStatusMappingModel, Page, PageContainer, type PageProps, type PaginationModel$1 as PaginationModel, type PaymentMethodDto, type PaymentOptionsDto, type PersonaModel$1 as PersonaModel, type PoRequisitionModel, type PriceFacetModel, type PriceRangeModel, type PricingRfqModel, type ProductAutocompleteItemModel, type ProductAvailabilityModel, ProductCard, type ProductCardProps, type ProductCollectionModel, ProductDetailsPage, type ProductDetailsPageProps, type ProductDto, type ProductHit$1 as ProductHit, type ProductImageDto, type ProductInventoryDto, type ProductLineDto, type ProductLineModel, ProductListingPage, type ProductListingPageDataResponse, type ProductListingPageProps, type ProductModel, ProductOverviewGrid, type ProductOverviewGridProps, ProductPrice, type ProductPriceDto$2 as ProductPriceDto, type ProductPriceModel, type ProductPriceProps, type ProductSettingsModel, ProductSku, type ProductSkuProps, type ProductSubscriptionDto$2 as ProductSubscriptionDto, type ProductSubscriptionModel, type ProductUnitOfMeasureDto$1 as ProductUnitOfMeasureDto, type ProfileTransactionRequestModel, ProgressCircle, type ProgressCircleProps, type PromoCard$1 as PromoCard, type PromoCards, type PromotionCollectionModel, type PromotionModel, type QuoteCollectionModel, type QuoteLineModel, type QuoteModel, type QuoteSettingsModel, ReactQueryContainer, type RealTimeCartInventoryModel, type RealTimeInventoryModel, type RealTimePricingModel, type RefinementListItem, type RelatedProductDto, RequestError, type RequestHeaders, type RequisitionCollectionModel, type RequisitionLineCollectionModel, type RequisitionLineModel, type RequisitionModel, type RmaLineDto, type RmaModel, RouteButton, RouteLink, RouteProvider, type RouteProviderProps, type SalespersonModel, type ScoreExplanationDto, type ScoreExplanationModel, SearchResultsPage, SearchRoot, type SectionOptionDto$2 as SectionOptionDto, type SectionOptionModel, Select, type SelectProps, type SessionModel$1 as SessionModel, type SessionRequestModel, type SettingsCollectionModel, type SetupRequestModel, type ShareEntityModel, type ShareOrderModel, type ShipToCollectionModel, type ShipToModel$1 as ShipToModel, type ShipViaDto, type ShipmentPackageDto, type ShipmentPackageLineDto, ShowAll, type ShowAllProps, Sidebar, SidebarDetectBreakpoint, type SidebarProps, SidebarProvider, type SiteMessageCollectionModel, type SiteMessageModel, type SortOptionModel$1 as SortOptionModel, type SpecificationDto, type SpecificationModel, type StateCollectionModel, type StateModel$1 as StateModel, type StyleTraitDto, type StyleValueDto, type StyledProductDto, type SuggestionModel, type TellAFriendModel, TextField, TimeoutRequestError, type TraitValueModel, type TranslationDictionaryCollectionModel, type TranslationDictionaryModel, type TranslationId, UnauthorizedRequestError, type UnitOfMeasureModel, UnprocessableContentRequestError, type UpdateCartLineParams, type UpdateGlobalState$1 as UpdateGlobalState, type UpdateWishListLineCollectionModel, type UseAlgoliaEventResult, VariantDisplayTypeValues, type VariantTraitModel, type VmiBinCollectionModel, type VmiBinCountModel, type VmiBinModel, type VmiCountCollectionModel, type VmiCountModel, type VmiLocationCollectionModel, type VmiLocationModel, type VmiNoteCollectionModel, type VmiNoteModel, type VmiUserImportCollectionModel, type VmiUserImportModel, type VmiUserModel, type WarehouseCollectionModel, type WarehouseDto, type WarehouseModel$1 as WarehouseModel, type WebsiteModel, type WebsiteSettingsModel, type WishListCollectionModel$1 as WishListCollectionModel, type WishListEmailScheduleModel$1 as WishListEmailScheduleModel, type WishListLine$1 as WishListLine, type WishListLineCollectionModel$1 as WishListLineCollectionModel, type WishListLineModel$1 as WishListLineModel, type WishListLines$1 as WishListLines, type WishListModel$1 as WishListModel, WishListNameAlreadyExistsError, type WishListSettingsModel, type WishListShareModel$1 as WishListShareModel, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
|
package/dist/index.js
CHANGED
|
@@ -351,19 +351,23 @@ function useFeatureFlags() {
|
|
|
351
351
|
search: '',
|
|
352
352
|
};
|
|
353
353
|
const queryParams = qs.parse(search);
|
|
354
|
-
const hasNewQueryParam =
|
|
355
|
-
const hasFeaturesQueryParam =
|
|
354
|
+
const hasNewQueryParam = queryParams['new'] !== undefined;
|
|
355
|
+
const hasFeaturesQueryParam = queryParams['features'] !== undefined;
|
|
356
356
|
const showNewPageQueryValue = String(queryParams['new']).toLowerCase() === 'true';
|
|
357
357
|
const features = String(queryParams['features']).toLowerCase().split(',');
|
|
358
358
|
const plpV2QueryStringParam = hasNewQueryParam
|
|
359
359
|
? showNewPageQueryValue
|
|
360
360
|
: features.includes('plp');
|
|
361
|
+
const pdpV2QueryStringParam = hasNewQueryParam
|
|
362
|
+
? showNewPageQueryValue
|
|
363
|
+
: features.includes('pdp');
|
|
361
364
|
const searchV2QueryStringParam = hasNewQueryParam
|
|
362
365
|
? showNewPageQueryValue
|
|
363
366
|
: features.includes('search');
|
|
364
367
|
const hasLocalStorageSupport = typeof localStorage !== 'undefined';
|
|
365
368
|
if (hasLocalStorageSupport && (hasFeaturesQueryParam || hasNewQueryParam)) {
|
|
366
369
|
localStorage.setItem('plpV2', plpV2QueryStringParam.toString());
|
|
370
|
+
localStorage.setItem('pdpV2', pdpV2QueryStringParam.toString());
|
|
367
371
|
localStorage.setItem('searchV2', searchV2QueryStringParam.toString());
|
|
368
372
|
}
|
|
369
373
|
const plpV2 = useMemo(() => hasLocalStorageSupport
|
|
@@ -371,12 +375,17 @@ function useFeatureFlags() {
|
|
|
371
375
|
: plpV2QueryStringParam,
|
|
372
376
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
373
377
|
[plpV2QueryStringParam]);
|
|
378
|
+
const pdpV2 = useMemo(() => hasLocalStorageSupport
|
|
379
|
+
? localStorage.getItem('pdpV2') === 'true'
|
|
380
|
+
: pdpV2QueryStringParam,
|
|
381
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
382
|
+
[pdpV2QueryStringParam]);
|
|
374
383
|
const searchV2 = useMemo(() => hasLocalStorageSupport
|
|
375
384
|
? localStorage.getItem('searchV2') === 'true'
|
|
376
385
|
: searchV2QueryStringParam,
|
|
377
386
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
378
387
|
[searchV2QueryStringParam]);
|
|
379
|
-
return { plpV2, searchV2 };
|
|
388
|
+
return { pdpV2, plpV2, searchV2 };
|
|
380
389
|
}
|
|
381
390
|
|
|
382
391
|
var TIME;
|
|
@@ -7217,6 +7226,13 @@ function Page({ breadCrumb, children, className, title }) {
|
|
|
7217
7226
|
return (jsxs(PageContainer, { className: clsx(styles$q.page, className), children: [jsx("div", { className: styles$q.breadcrumb, children: jsx(Breadcrumb, { links: breadCrumb }) }), title && jsx(PageTitle, { children: title }), children] }));
|
|
7218
7227
|
}
|
|
7219
7228
|
|
|
7229
|
+
function ProductDetailsPage({ pageUrl }) {
|
|
7230
|
+
return (jsxs(Page, { breadCrumb: [
|
|
7231
|
+
{ href: '/', label: 'Home' },
|
|
7232
|
+
{ href: '/', label: 'Products' },
|
|
7233
|
+
], title: "Product Details", children: [jsx("p", { children: "Hello Product Details" }), jsx("p", { children: pageUrl })] }));
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7220
7236
|
const useSidebar = () => {
|
|
7221
7237
|
const isDocked = !getCurrentBreakpoints().xxl;
|
|
7222
7238
|
const [state, setState] = useGlobalState('sidebar-state', {
|
|
@@ -8966,4 +8982,4 @@ function ReactQueryContainer({ children }) {
|
|
|
8966
8982
|
return (jsx(QueryClientProvider, { client: queryClient, children: children }));
|
|
8967
8983
|
}
|
|
8968
8984
|
|
|
8969
|
-
export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, SearchRoot, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
|
|
8985
|
+
export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductDetailsPage, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, SearchRoot, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export * from './loading/progress-circle';
|
|
|
66
66
|
export * from './media/image/image';
|
|
67
67
|
export * from './pages/page-container/page-container';
|
|
68
68
|
export * from './pages/page/page';
|
|
69
|
+
export * from './pages/product-details-page/product-details-page';
|
|
69
70
|
export * from './pages/product-listing-page/product-listing-page';
|
|
70
71
|
export * from './pages/search-result-page/search-results-page';
|
|
71
72
|
export * from './sidebar/sidebar';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { ProductDetailsPage } from './product-details-page';
|
|
4
|
+
type StoryProps = Omit<ComponentProps<typeof ProductDetailsPage>, 'searchClient'> & {
|
|
5
|
+
languageCode: string;
|
|
6
|
+
pageUrl: string;
|
|
7
|
+
};
|
|
8
|
+
declare const meta: {
|
|
9
|
+
args: {
|
|
10
|
+
languageCode: string;
|
|
11
|
+
pageUrl: string;
|
|
12
|
+
};
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: string;
|
|
15
|
+
};
|
|
16
|
+
title: string;
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<StoryProps>;
|
|
20
|
+
export declare const Default: Story;
|