@lana-commerce/core 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +531 -0
- package/cjs/actionLock.js +31 -0
- package/cjs/addEmptyListItem.js +7 -0
- package/cjs/aggregateOptions.js +178 -0
- package/cjs/analytics.js +90 -0
- package/cjs/analyticsProductData.js +33 -0
- package/cjs/arrayToDict.js +12 -0
- package/cjs/asyncModuleWrapper.js +52 -0
- package/cjs/averageReviewScore.js +45 -0
- package/cjs/buildconfig.js +16 -0
- package/cjs/cachedLoader.js +36 -0
- package/cjs/canonicalVariantURL.js +2 -0
- package/cjs/cartOperation.js +132 -0
- package/cjs/categorySEO.js +20 -0
- package/cjs/commonTypes.js +2 -0
- package/cjs/compact.js +8 -0
- package/cjs/configLoader.js +69 -0
- package/cjs/controlledQueue.js +46 -0
- package/cjs/convertImageURL.js +19 -0
- package/cjs/dataLoader.js +185 -0
- package/cjs/defaultVariant.js +30 -0
- package/cjs/effector/clearOnChangeAfterDelay.js +17 -0
- package/cjs/effector/combineEvery.js +8 -0
- package/cjs/effector/combineSome.js +8 -0
- package/cjs/effector/debounced.js +18 -0
- package/cjs/effector/form.js +168 -0
- package/cjs/effector/hideOnChangeAfterDelay.js +17 -0
- package/cjs/effector/requestResponse.js +30 -0
- package/cjs/effector/requestResponseMulti.js +51 -0
- package/cjs/effector/restoreNamed.js +8 -0
- package/cjs/effector/split.js +29 -0
- package/cjs/effector/validator.js +33 -0
- package/cjs/effector/wrapSignInRequired.js +13 -0
- package/cjs/exceptions.js +6 -0
- package/cjs/fetchAllItems.js +56 -0
- package/cjs/file.js +83 -0
- package/cjs/fileWebsocket.js +83 -0
- package/cjs/filterFunc.js +48 -0
- package/cjs/filterFuncBrand.js +12 -0
- package/cjs/filterFuncCategory.js +12 -0
- package/cjs/filterFuncContentBlock.js +19 -0
- package/cjs/filterFuncCustomer.js +161 -0
- package/cjs/filterFuncDataFeed.js +54 -0
- package/cjs/filterFuncOrder.js +334 -0
- package/cjs/filterFuncPreprocess.js +14 -0
- package/cjs/filterFuncProduct.js +70 -0
- package/cjs/filterFuncPurchaseOrder.js +126 -0
- package/cjs/filterFuncSupplier.js +36 -0
- package/cjs/filterFuncTransfer.js +135 -0
- package/cjs/formatAbbrevNumber.js +21 -0
- package/cjs/formatCurrency.js +47 -0
- package/cjs/formatToJSX.js +123 -0
- package/cjs/fulfillmentNumber.js +7 -0
- package/cjs/generateRandomToken.js +12 -0
- package/cjs/generateUUID.js +10 -0
- package/cjs/generated/codes.js +47 -0
- package/cjs/genericFile.js +73 -0
- package/cjs/getSalesChannelID.js +13 -0
- package/cjs/getSessionID.js +13 -0
- package/cjs/getTimezone.js +12 -0
- package/cjs/graphql/fragments/Branding.js +3 -0
- package/cjs/graphql/fragments/BrandingField.js +3 -0
- package/cjs/graphql/fragments/CartCustomItem.js +3 -0
- package/cjs/graphql/fragments/CartOrder.js +3 -0
- package/cjs/graphql/fragments/CartVariant.js +3 -0
- package/cjs/graphql/fragments/CartVariantFull.js +3 -0
- package/cjs/graphql/fragments/Category.js +3 -0
- package/cjs/graphql/fragments/CommonCartVariant.js +3 -0
- package/cjs/graphql/fragments/Currency.js +3 -0
- package/cjs/graphql/fragments/CurrencyPrice.js +3 -0
- package/cjs/graphql/fragments/CustomField.js +3 -0
- package/cjs/graphql/fragments/CustomFieldObjects.js +3 -0
- package/cjs/graphql/fragments/Customer.js +3 -0
- package/cjs/graphql/fragments/CustomerBalance.js +3 -0
- package/cjs/graphql/fragments/CustomerBalanceHistory.js +3 -0
- package/cjs/graphql/fragments/CustomerFavorite.js +3 -0
- package/cjs/graphql/fragments/CustomerFavoriteShort.js +3 -0
- package/cjs/graphql/fragments/CustomerOAuthProvider.js +3 -0
- package/cjs/graphql/fragments/CustomerOrderBrief.js +3 -0
- package/cjs/graphql/fragments/CustomerOrderFulfillment.js +3 -0
- package/cjs/graphql/fragments/CustomerOrderFull.js +3 -0
- package/cjs/graphql/fragments/CustomerPaymentSource.js +3 -0
- package/cjs/graphql/fragments/CustomerReturnBrief.js +3 -0
- package/cjs/graphql/fragments/CustomerReturnFull.js +3 -0
- package/cjs/graphql/fragments/CustomerReturnPolicy.js +3 -0
- package/cjs/graphql/fragments/CustomerSubscriptionBrief.js +3 -0
- package/cjs/graphql/fragments/CustomerSubscriptionFull.js +3 -0
- package/cjs/graphql/fragments/File.js +3 -0
- package/cjs/graphql/fragments/FileForUpload.js +3 -0
- package/cjs/graphql/fragments/FileNoFallback.js +3 -0
- package/cjs/graphql/fragments/FullAddress.js +3 -0
- package/cjs/graphql/fragments/Gateway.js +3 -0
- package/cjs/graphql/fragments/GatewayManual.js +3 -0
- package/cjs/graphql/fragments/GatewayPaypal.js +3 -0
- package/cjs/graphql/fragments/GatewayStripe.js +3 -0
- package/cjs/graphql/fragments/GatewayTest.js +3 -0
- package/cjs/graphql/fragments/IPAndUAInfo.js +3 -0
- package/cjs/graphql/fragments/InfoCountry.js +3 -0
- package/cjs/graphql/fragments/InfoCountryDedupField.js +3 -0
- package/cjs/graphql/fragments/InfoCurrency.js +3 -0
- package/cjs/graphql/fragments/InfoProvince.js +3 -0
- package/cjs/graphql/fragments/KeyValue.js +3 -0
- package/cjs/graphql/fragments/LineItemField.js +3 -0
- package/cjs/graphql/fragments/MediaFile.js +3 -0
- package/cjs/graphql/fragments/MinCurrencyPrice.js +3 -0
- package/cjs/graphql/fragments/ProductField.js +3 -0
- package/cjs/graphql/fragments/ProductFieldSet.js +3 -0
- package/cjs/graphql/fragments/ProductFlat.js +3 -0
- package/cjs/graphql/fragments/ProductQuestion.js +3 -0
- package/cjs/graphql/fragments/ProductQuestionAnswer.js +3 -0
- package/cjs/graphql/fragments/ProductQuestionPage.js +3 -0
- package/cjs/graphql/fragments/ProductReview.js +3 -0
- package/cjs/graphql/fragments/ProductReviewAnswer.js +3 -0
- package/cjs/graphql/fragments/ProductReviewAverageScore.js +3 -0
- package/cjs/graphql/fragments/ProductReviewPage.js +3 -0
- package/cjs/graphql/fragments/ProductReviewScore.js +3 -0
- package/cjs/graphql/fragments/ProductReviewSurveyAnswer.js +3 -0
- package/cjs/graphql/fragments/ProductSearchOptionAgg.js +3 -0
- package/cjs/graphql/fragments/ProductSearchResult.js +3 -0
- package/cjs/graphql/fragments/ReturnReason.js +3 -0
- package/cjs/graphql/fragments/ReviewDimension.js +3 -0
- package/cjs/graphql/fragments/ReviewDimensionSet.js +3 -0
- package/cjs/graphql/fragments/ReviewImagePage.js +3 -0
- package/cjs/graphql/fragments/ReviewQuestionProduct.js +3 -0
- package/cjs/graphql/fragments/ReviewSettings.js +3 -0
- package/cjs/graphql/fragments/SearchProduct.js +3 -0
- package/cjs/graphql/fragments/Shop.js +3 -0
- package/cjs/graphql/fragments/SubscriptionPlan.js +3 -0
- package/cjs/graphql/fragments/SurveyQuestion.js +3 -0
- package/cjs/graphql/fragments/TieredPricing.js +3 -0
- package/cjs/graphql/fragments/TieredPricingTier.js +3 -0
- package/cjs/graphql/fragments/VariantOption.js +3 -0
- package/cjs/graphql/operations/ApplyGiftCardMutation.js +3 -0
- package/cjs/graphql/operations/AuthRequestMutation.js +3 -0
- package/cjs/graphql/operations/CancelOrderMutation.js +3 -0
- package/cjs/graphql/operations/CancelSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/ConnectOAuth2Mutation.js +3 -0
- package/cjs/graphql/operations/CreateCartMutation.js +26 -0
- package/cjs/graphql/operations/CreateFavoriteMutation.js +22 -0
- package/cjs/graphql/operations/CreateFileMutation.js +6 -0
- package/cjs/graphql/operations/CreatePaymentSourceMutation.js +6 -0
- package/cjs/graphql/operations/CreateProductQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/CreateProductQuestionMutation.js +8 -0
- package/cjs/graphql/operations/CreateProductReviewMutation.js +18 -0
- package/cjs/graphql/operations/CreateReturnMutation.js +22 -0
- package/cjs/graphql/operations/DeleteFavoriteMutation.js +3 -0
- package/cjs/graphql/operations/DeletePaymentSourceMutation.js +3 -0
- package/cjs/graphql/operations/DeleteProductQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/DeleteProductQuestionMutation.js +3 -0
- package/cjs/graphql/operations/DeleteProductReviewMutation.js +3 -0
- package/cjs/graphql/operations/DisconnectOAuth2Mutation.js +3 -0
- package/cjs/graphql/operations/EditSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/FileUploadedMutation.js +6 -0
- package/cjs/graphql/operations/FlagQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/FlagQuestionMutation.js +3 -0
- package/cjs/graphql/operations/FlagReviewAnswerMutation.js +3 -0
- package/cjs/graphql/operations/FlagReviewMutation.js +3 -0
- package/cjs/graphql/operations/GetBrandingQuery.js +10 -0
- package/cjs/graphql/operations/GetCartQuery.js +26 -0
- package/cjs/graphql/operations/GetCustomerAddressesPageDataQuery.js +16 -0
- package/cjs/graphql/operations/GetCustomerBalanceHistoryPageQuery.js +6 -0
- package/cjs/graphql/operations/GetCustomerBalanceQuery.js +8 -0
- package/cjs/graphql/operations/GetCustomerInfoQuery.js +10 -0
- package/cjs/graphql/operations/GetCustomerQuery.js +8 -0
- package/cjs/graphql/operations/GetFavoritesQuery.js +22 -0
- package/cjs/graphql/operations/GetFileStatusQuery.js +6 -0
- package/cjs/graphql/operations/GetGatewaysQuery.js +14 -0
- package/cjs/graphql/operations/GetInfoCurrenciesQuery.js +6 -0
- package/cjs/graphql/operations/GetLastCartQuery.js +26 -0
- package/cjs/graphql/operations/GetOrderQuery.js +30 -0
- package/cjs/graphql/operations/GetOrdersPageQuery.js +24 -0
- package/cjs/graphql/operations/GetPaymentMethodsPageDataQuery.js +18 -0
- package/cjs/graphql/operations/GetProductQuestionsPageQuery.js +10 -0
- package/cjs/graphql/operations/GetProductReviewImagesPageQuery.js +8 -0
- package/cjs/graphql/operations/GetProductReviewsPageQuery.js +20 -0
- package/cjs/graphql/operations/GetProvincesQuery.js +6 -0
- package/cjs/graphql/operations/GetQuestionQuery.js +8 -0
- package/cjs/graphql/operations/GetReturnCreationInfoQuery.js +36 -0
- package/cjs/graphql/operations/GetReturnQuery.js +28 -0
- package/cjs/graphql/operations/GetReturnsPageQuery.js +22 -0
- package/cjs/graphql/operations/GetReviewDimensionsQuery.js +6 -0
- package/cjs/graphql/operations/GetReviewQuery.js +18 -0
- package/cjs/graphql/operations/GetReviewSettingsQuery.js +12 -0
- package/cjs/graphql/operations/GetShopCurrenciesQuery.js +6 -0
- package/cjs/graphql/operations/GetShopQuery.js +8 -0
- package/cjs/graphql/operations/GetSubscriptionQuery.js +36 -0
- package/cjs/graphql/operations/GetSubscriptionsPageQuery.js +22 -0
- package/cjs/graphql/operations/GetVariantPageQuery.js +20 -0
- package/cjs/graphql/operations/LoadProductNoCustomerQuery.js +62 -0
- package/cjs/graphql/operations/LoadProductQuery.js +66 -0
- package/cjs/graphql/operations/ModifyCartMutation.js +26 -0
- package/cjs/graphql/operations/ModifyCustomerMutation.js +8 -0
- package/cjs/graphql/operations/ModifyFavoriteMutation.js +22 -0
- package/cjs/graphql/operations/ModifyProductQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/ModifyProductQuestionMutation.js +8 -0
- package/cjs/graphql/operations/ModifyProductReviewMutation.js +18 -0
- package/cjs/graphql/operations/NewPasswordMutation.js +3 -0
- package/cjs/graphql/operations/PauseSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/ResetPasswordMutation.js +3 -0
- package/cjs/graphql/operations/ResumeSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/SearchProductsAdvancedQuery.js +24 -0
- package/cjs/graphql/operations/SearchProductsQuery.js +20 -0
- package/cjs/graphql/operations/SearchQuestionsQuery.js +8 -0
- package/cjs/graphql/operations/SearchReviewsQuery.js +18 -0
- package/cjs/graphql/operations/SignInMutation.js +3 -0
- package/cjs/graphql/operations/SignInViaEmailCompleteMutation.js +3 -0
- package/cjs/graphql/operations/SignInViaEmailInitMutation.js +3 -0
- package/cjs/graphql/operations/SignUpMutation.js +3 -0
- package/cjs/graphql/operations/SkipNextSubscriptionMutation.js +3 -0
- package/cjs/graphql/operations/UploadFileMutation.js +3 -0
- package/cjs/graphql/operations/VerifyCodeMutation.js +3 -0
- package/cjs/graphql/operations/VoteQuestionAnswerMutation.js +3 -0
- package/cjs/graphql/operations/VoteQuestionMutation.js +3 -0
- package/cjs/graphql/operations/VoteReviewAnswerMutation.js +3 -0
- package/cjs/graphql/operations/VoteReviewMutation.js +3 -0
- package/cjs/graphql/types.js +2 -0
- package/cjs/hierarchicalSearchOption.js +42 -0
- package/cjs/idgen.js +8 -0
- package/cjs/ignoreQueue.js +50 -0
- package/cjs/imageAltProps.js +13 -0
- package/cjs/invoiceFormat.js +59 -0
- package/cjs/isShippingRequired.js +20 -0
- package/cjs/isoStripTrailingZeros.js +7 -0
- package/cjs/json/commerce.js +10 -0
- package/cjs/json/commerceFileUpload.js +57 -0
- package/cjs/json/commerceTypes.js +2 -0
- package/cjs/json/common.js +320 -0
- package/cjs/json/fetchAllItems.js +61 -0
- package/cjs/json/mutator.js +957 -0
- package/cjs/json/storefront.js +10 -0
- package/cjs/json/storefrontTypes.js +2 -0
- package/cjs/lastValue.js +17 -0
- package/cjs/lineItemPrice.js +111 -0
- package/cjs/loadJWT.js +25 -0
- package/cjs/mapInvalidInput.js +33 -0
- package/cjs/mapResponseData.js +16 -0
- package/cjs/mapResponseMultiData.js +14 -0
- package/cjs/meanBy.js +15 -0
- package/cjs/media.js +16 -0
- package/cjs/modules/advancedSearch.js +127 -0
- package/cjs/modules/cart.js +708 -0
- package/cjs/modules/config/defaultAdvancedSearchGraphQLConfig.js +8 -0
- package/cjs/modules/config/defaultCartGraphQLConfig.js +14 -0
- package/cjs/modules/config/defaultProductGraphQLConfig.js +48 -0
- package/cjs/modules/config/defaultSearchGraphQLConfig.js +8 -0
- package/cjs/modules/customer.js +2174 -0
- package/cjs/modules/helpers/cartInitOption.js +22 -0
- package/cjs/modules/helpers/cookieConsent.js +33 -0
- package/cjs/modules/helpers/customerOauth2.js +64 -0
- package/cjs/modules/helpers/getOAuth2Hook.js +52 -0
- package/cjs/modules/helpers/hookUpAnalytics.js +49 -0
- package/cjs/modules/helpers/loadJWT.js +23 -0
- package/cjs/modules/helpers/misc.js +58 -0
- package/cjs/modules/imageDialog.js +78 -0
- package/cjs/modules/persist.js +55 -0
- package/cjs/modules/popupMessage.js +21 -0
- package/cjs/modules/product.js +1261 -0
- package/cjs/modules/recentlyVisitedProducts.js +72 -0
- package/cjs/modules/search.js +102 -0
- package/cjs/multiResponseToResponse.js +22 -0
- package/cjs/nonNull.js +10 -0
- package/cjs/oauthState.js +40 -0
- package/cjs/orderShippingAddress.js +7 -0
- package/cjs/package.json +3 -0
- package/cjs/pender.js +16 -0
- package/cjs/percentageOff.js +7 -0
- package/cjs/popupConnectQueue.js +62 -0
- package/cjs/preact/components/SixDigitInput.js +167 -0
- package/cjs/preact/effector.js +74 -0
- package/cjs/preact/transition/CSSTransition.js +55 -0
- package/cjs/preact/transition/Transition.js +104 -0
- package/cjs/preact/translateLocalStatic.js +31 -0
- package/cjs/productFiltering.js +173 -0
- package/cjs/productSEO.js +51 -0
- package/cjs/productSorting.js +93 -0
- package/cjs/promiseAll.js +18 -0
- package/cjs/promiseLimit.js +38 -0
- package/cjs/rdsToInitialScores.js +32 -0
- package/cjs/react/components/Portal.js +7 -0
- package/cjs/react/components/RootCloseWrapper.js +41 -0
- package/cjs/react/components/SixDigitInput.js +167 -0
- package/cjs/react/contains.js +14 -0
- package/cjs/react/popperBinder.js +70 -0
- package/cjs/react/rootClose.js +112 -0
- package/cjs/react/translateLocalStatic.js +32 -0
- package/cjs/react/useAsyncCachedValue.js +14 -0
- package/cjs/refreshTimeout.js +25 -0
- package/cjs/remoteAuth.js +59 -0
- package/cjs/request.js +348 -0
- package/cjs/requestDetails.js +76 -0
- package/cjs/rfc3339Normalize.js +10 -0
- package/cjs/script.js +172 -0
- package/cjs/seo.js +2 -0
- package/cjs/shopDomain.js +8 -0
- package/cjs/shopLinks.js +63 -0
- package/cjs/slate.js +376 -0
- package/cjs/sleep.js +10 -0
- package/cjs/splitBy.js +21 -0
- package/cjs/splitName.js +28 -0
- package/cjs/stripZeros.js +13 -0
- package/cjs/stripeError.js +65 -0
- package/cjs/tailSplit.js +12 -0
- package/cjs/tieredPrice.js +32 -0
- package/cjs/timeIt.js +15 -0
- package/cjs/toMajor.js +8 -0
- package/cjs/toMinor.js +8 -0
- package/cjs/trace.js +37 -0
- package/cjs/translateLocale.js +12 -0
- package/cjs/traverse.js +14 -0
- package/cjs/truncate.js +21 -0
- package/cjs/typedLocalStorage.js +30 -0
- package/cjs/variantImage.js +26 -0
- package/cjs/variantImageURL.js +13 -0
- package/cjs/variantImages.js +19 -0
- package/cjs/variantInventory.js +43 -0
- package/cjs/variantOptions.js +21 -0
- package/cjs/variantPrice.js +96 -0
- package/cjs/variantPriceCommerce.js +29 -0
- package/cjs/variantTitle.js +9 -0
- package/cjs/variantTitleFull.js +11 -0
- package/cjs/variantURL.js +9 -0
- package/cjs/vendor/popper/index.d.ts +160 -0
- package/cjs/vendor/popper/index.js +2657 -0
- package/cjs/vendor/popper/index.js.map +1 -0
- package/cjs/vendor/popper/package.json +3 -0
- package/cjs/websocket.js +179 -0
- package/esm/actionLock.js +24 -0
- package/esm/addEmptyListItem.js +3 -0
- package/esm/aggregateOptions.js +169 -0
- package/esm/analytics.js +91 -0
- package/esm/analyticsProductData.js +28 -0
- package/esm/arrayToDict.js +8 -0
- package/esm/asyncModuleWrapper.js +47 -0
- package/esm/averageReviewScore.js +40 -0
- package/esm/buildconfig.js +13 -0
- package/esm/cachedLoader.js +32 -0
- package/esm/canonicalVariantURL.js +1 -0
- package/esm/cartOperation.js +126 -0
- package/esm/categorySEO.js +16 -0
- package/esm/commonTypes.js +1 -0
- package/esm/compact.js +4 -0
- package/esm/configLoader.js +61 -0
- package/esm/controlledQueue.js +38 -0
- package/esm/convertImageURL.js +15 -0
- package/esm/dataLoader.js +192 -0
- package/esm/defaultVariant.js +25 -0
- package/esm/effector/clearOnChangeAfterDelay.js +13 -0
- package/esm/effector/combineEvery.js +4 -0
- package/esm/effector/combineSome.js +4 -0
- package/esm/effector/debounced.js +14 -0
- package/esm/effector/form.js +166 -0
- package/esm/effector/hideOnChangeAfterDelay.js +13 -0
- package/esm/effector/requestResponse.js +24 -0
- package/esm/effector/requestResponseMulti.js +47 -0
- package/esm/effector/restoreNamed.js +4 -0
- package/esm/effector/split.js +25 -0
- package/esm/effector/validator.js +28 -0
- package/esm/effector/wrapSignInRequired.js +9 -0
- package/esm/exceptions.js +2 -0
- package/esm/fetchAllItems.js +44 -0
- package/esm/file.js +67 -0
- package/esm/fileWebsocket.js +75 -0
- package/esm/filterFunc.js +43 -0
- package/esm/filterFuncBrand.js +9 -0
- package/esm/filterFuncCategory.js +9 -0
- package/esm/filterFuncContentBlock.js +16 -0
- package/esm/filterFuncCustomer.js +153 -0
- package/esm/filterFuncDataFeed.js +50 -0
- package/esm/filterFuncOrder.js +325 -0
- package/esm/filterFuncPreprocess.js +9 -0
- package/esm/filterFuncProduct.js +66 -0
- package/esm/filterFuncPurchaseOrder.js +122 -0
- package/esm/filterFuncSupplier.js +31 -0
- package/esm/filterFuncTransfer.js +130 -0
- package/esm/formatAbbrevNumber.js +16 -0
- package/esm/formatCurrency.js +42 -0
- package/esm/formatToJSX.js +118 -0
- package/esm/fulfillmentNumber.js +3 -0
- package/esm/generateRandomToken.js +8 -0
- package/esm/generateUUID.js +6 -0
- package/esm/generated/codes.js +44 -0
- package/esm/genericFile.js +65 -0
- package/esm/getSalesChannelID.js +9 -0
- package/esm/getSessionID.js +9 -0
- package/esm/getTimezone.js +8 -0
- package/esm/graphql/fragments/Branding.js +1 -0
- package/esm/graphql/fragments/BrandingField.js +1 -0
- package/esm/graphql/fragments/CartCustomItem.js +1 -0
- package/esm/graphql/fragments/CartOrder.js +1 -0
- package/esm/graphql/fragments/CartVariant.js +1 -0
- package/esm/graphql/fragments/CartVariantFull.js +1 -0
- package/esm/graphql/fragments/Category.js +1 -0
- package/esm/graphql/fragments/CommonCartVariant.js +1 -0
- package/esm/graphql/fragments/Currency.js +1 -0
- package/esm/graphql/fragments/CurrencyPrice.js +1 -0
- package/esm/graphql/fragments/CustomField.js +1 -0
- package/esm/graphql/fragments/CustomFieldObjects.js +1 -0
- package/esm/graphql/fragments/Customer.js +1 -0
- package/esm/graphql/fragments/CustomerBalance.js +1 -0
- package/esm/graphql/fragments/CustomerBalanceHistory.js +1 -0
- package/esm/graphql/fragments/CustomerFavorite.js +1 -0
- package/esm/graphql/fragments/CustomerFavoriteShort.js +1 -0
- package/esm/graphql/fragments/CustomerOAuthProvider.js +1 -0
- package/esm/graphql/fragments/CustomerOrderBrief.js +1 -0
- package/esm/graphql/fragments/CustomerOrderFulfillment.js +1 -0
- package/esm/graphql/fragments/CustomerOrderFull.js +1 -0
- package/esm/graphql/fragments/CustomerPaymentSource.js +1 -0
- package/esm/graphql/fragments/CustomerReturnBrief.js +1 -0
- package/esm/graphql/fragments/CustomerReturnFull.js +1 -0
- package/esm/graphql/fragments/CustomerReturnPolicy.js +1 -0
- package/esm/graphql/fragments/CustomerSubscriptionBrief.js +1 -0
- package/esm/graphql/fragments/CustomerSubscriptionFull.js +1 -0
- package/esm/graphql/fragments/File.js +1 -0
- package/esm/graphql/fragments/FileForUpload.js +1 -0
- package/esm/graphql/fragments/FileNoFallback.js +1 -0
- package/esm/graphql/fragments/FullAddress.js +1 -0
- package/esm/graphql/fragments/Gateway.js +1 -0
- package/esm/graphql/fragments/GatewayManual.js +1 -0
- package/esm/graphql/fragments/GatewayPaypal.js +1 -0
- package/esm/graphql/fragments/GatewayStripe.js +1 -0
- package/esm/graphql/fragments/GatewayTest.js +1 -0
- package/esm/graphql/fragments/IPAndUAInfo.js +1 -0
- package/esm/graphql/fragments/InfoCountry.js +1 -0
- package/esm/graphql/fragments/InfoCountryDedupField.js +1 -0
- package/esm/graphql/fragments/InfoCurrency.js +1 -0
- package/esm/graphql/fragments/InfoProvince.js +1 -0
- package/esm/graphql/fragments/KeyValue.js +1 -0
- package/esm/graphql/fragments/LineItemField.js +1 -0
- package/esm/graphql/fragments/MediaFile.js +1 -0
- package/esm/graphql/fragments/MinCurrencyPrice.js +1 -0
- package/esm/graphql/fragments/ProductField.js +1 -0
- package/esm/graphql/fragments/ProductFieldSet.js +1 -0
- package/esm/graphql/fragments/ProductFlat.js +1 -0
- package/esm/graphql/fragments/ProductQuestion.js +1 -0
- package/esm/graphql/fragments/ProductQuestionAnswer.js +1 -0
- package/esm/graphql/fragments/ProductQuestionPage.js +1 -0
- package/esm/graphql/fragments/ProductReview.js +1 -0
- package/esm/graphql/fragments/ProductReviewAnswer.js +1 -0
- package/esm/graphql/fragments/ProductReviewAverageScore.js +1 -0
- package/esm/graphql/fragments/ProductReviewPage.js +1 -0
- package/esm/graphql/fragments/ProductReviewScore.js +1 -0
- package/esm/graphql/fragments/ProductReviewSurveyAnswer.js +1 -0
- package/esm/graphql/fragments/ProductSearchOptionAgg.js +1 -0
- package/esm/graphql/fragments/ProductSearchResult.js +1 -0
- package/esm/graphql/fragments/ReturnReason.js +1 -0
- package/esm/graphql/fragments/ReviewDimension.js +1 -0
- package/esm/graphql/fragments/ReviewDimensionSet.js +1 -0
- package/esm/graphql/fragments/ReviewImagePage.js +1 -0
- package/esm/graphql/fragments/ReviewQuestionProduct.js +1 -0
- package/esm/graphql/fragments/ReviewSettings.js +1 -0
- package/esm/graphql/fragments/SearchProduct.js +1 -0
- package/esm/graphql/fragments/Shop.js +1 -0
- package/esm/graphql/fragments/SubscriptionPlan.js +1 -0
- package/esm/graphql/fragments/SurveyQuestion.js +1 -0
- package/esm/graphql/fragments/TieredPricing.js +1 -0
- package/esm/graphql/fragments/TieredPricingTier.js +1 -0
- package/esm/graphql/fragments/VariantOption.js +1 -0
- package/esm/graphql/operations/ApplyGiftCardMutation.js +1 -0
- package/esm/graphql/operations/AuthRequestMutation.js +1 -0
- package/esm/graphql/operations/CancelOrderMutation.js +1 -0
- package/esm/graphql/operations/CancelSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/ConnectOAuth2Mutation.js +1 -0
- package/esm/graphql/operations/CreateCartMutation.js +23 -0
- package/esm/graphql/operations/CreateFavoriteMutation.js +19 -0
- package/esm/graphql/operations/CreateFileMutation.js +3 -0
- package/esm/graphql/operations/CreatePaymentSourceMutation.js +3 -0
- package/esm/graphql/operations/CreateProductQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/CreateProductQuestionMutation.js +5 -0
- package/esm/graphql/operations/CreateProductReviewMutation.js +15 -0
- package/esm/graphql/operations/CreateReturnMutation.js +19 -0
- package/esm/graphql/operations/DeleteFavoriteMutation.js +1 -0
- package/esm/graphql/operations/DeletePaymentSourceMutation.js +1 -0
- package/esm/graphql/operations/DeleteProductQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/DeleteProductQuestionMutation.js +1 -0
- package/esm/graphql/operations/DeleteProductReviewMutation.js +1 -0
- package/esm/graphql/operations/DisconnectOAuth2Mutation.js +1 -0
- package/esm/graphql/operations/EditSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/FileUploadedMutation.js +3 -0
- package/esm/graphql/operations/FlagQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/FlagQuestionMutation.js +1 -0
- package/esm/graphql/operations/FlagReviewAnswerMutation.js +1 -0
- package/esm/graphql/operations/FlagReviewMutation.js +1 -0
- package/esm/graphql/operations/GetBrandingQuery.js +7 -0
- package/esm/graphql/operations/GetCartQuery.js +23 -0
- package/esm/graphql/operations/GetCustomerAddressesPageDataQuery.js +13 -0
- package/esm/graphql/operations/GetCustomerBalanceHistoryPageQuery.js +3 -0
- package/esm/graphql/operations/GetCustomerBalanceQuery.js +5 -0
- package/esm/graphql/operations/GetCustomerInfoQuery.js +7 -0
- package/esm/graphql/operations/GetCustomerQuery.js +5 -0
- package/esm/graphql/operations/GetFavoritesQuery.js +19 -0
- package/esm/graphql/operations/GetFileStatusQuery.js +3 -0
- package/esm/graphql/operations/GetGatewaysQuery.js +11 -0
- package/esm/graphql/operations/GetInfoCurrenciesQuery.js +3 -0
- package/esm/graphql/operations/GetLastCartQuery.js +23 -0
- package/esm/graphql/operations/GetOrderQuery.js +27 -0
- package/esm/graphql/operations/GetOrdersPageQuery.js +21 -0
- package/esm/graphql/operations/GetPaymentMethodsPageDataQuery.js +15 -0
- package/esm/graphql/operations/GetProductQuestionsPageQuery.js +7 -0
- package/esm/graphql/operations/GetProductReviewImagesPageQuery.js +5 -0
- package/esm/graphql/operations/GetProductReviewsPageQuery.js +17 -0
- package/esm/graphql/operations/GetProvincesQuery.js +3 -0
- package/esm/graphql/operations/GetQuestionQuery.js +5 -0
- package/esm/graphql/operations/GetReturnCreationInfoQuery.js +33 -0
- package/esm/graphql/operations/GetReturnQuery.js +25 -0
- package/esm/graphql/operations/GetReturnsPageQuery.js +19 -0
- package/esm/graphql/operations/GetReviewDimensionsQuery.js +3 -0
- package/esm/graphql/operations/GetReviewQuery.js +15 -0
- package/esm/graphql/operations/GetReviewSettingsQuery.js +9 -0
- package/esm/graphql/operations/GetShopCurrenciesQuery.js +3 -0
- package/esm/graphql/operations/GetShopQuery.js +5 -0
- package/esm/graphql/operations/GetSubscriptionQuery.js +33 -0
- package/esm/graphql/operations/GetSubscriptionsPageQuery.js +19 -0
- package/esm/graphql/operations/GetVariantPageQuery.js +17 -0
- package/esm/graphql/operations/LoadProductNoCustomerQuery.js +59 -0
- package/esm/graphql/operations/LoadProductQuery.js +63 -0
- package/esm/graphql/operations/ModifyCartMutation.js +23 -0
- package/esm/graphql/operations/ModifyCustomerMutation.js +5 -0
- package/esm/graphql/operations/ModifyFavoriteMutation.js +19 -0
- package/esm/graphql/operations/ModifyProductQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/ModifyProductQuestionMutation.js +5 -0
- package/esm/graphql/operations/ModifyProductReviewMutation.js +15 -0
- package/esm/graphql/operations/NewPasswordMutation.js +1 -0
- package/esm/graphql/operations/PauseSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/ResetPasswordMutation.js +1 -0
- package/esm/graphql/operations/ResumeSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/SearchProductsAdvancedQuery.js +21 -0
- package/esm/graphql/operations/SearchProductsQuery.js +17 -0
- package/esm/graphql/operations/SearchQuestionsQuery.js +5 -0
- package/esm/graphql/operations/SearchReviewsQuery.js +15 -0
- package/esm/graphql/operations/SignInMutation.js +1 -0
- package/esm/graphql/operations/SignInViaEmailCompleteMutation.js +1 -0
- package/esm/graphql/operations/SignInViaEmailInitMutation.js +1 -0
- package/esm/graphql/operations/SignUpMutation.js +1 -0
- package/esm/graphql/operations/SkipNextSubscriptionMutation.js +1 -0
- package/esm/graphql/operations/UploadFileMutation.js +1 -0
- package/esm/graphql/operations/VerifyCodeMutation.js +1 -0
- package/esm/graphql/operations/VoteQuestionAnswerMutation.js +1 -0
- package/esm/graphql/operations/VoteQuestionMutation.js +1 -0
- package/esm/graphql/operations/VoteReviewAnswerMutation.js +1 -0
- package/esm/graphql/operations/VoteReviewMutation.js +1 -0
- package/esm/graphql/types.js +1 -0
- package/esm/hierarchicalSearchOption.js +43 -0
- package/esm/idgen.js +4 -0
- package/esm/ignoreQueue.js +45 -0
- package/esm/imageAltProps.js +9 -0
- package/esm/invoiceFormat.js +54 -0
- package/esm/isShippingRequired.js +16 -0
- package/esm/isoStripTrailingZeros.js +3 -0
- package/esm/json/commerce.js +3 -0
- package/esm/json/commerceFileUpload.js +43 -0
- package/esm/json/commerceTypes.js +1 -0
- package/esm/json/common.js +309 -0
- package/esm/json/fetchAllItems.js +51 -0
- package/esm/json/mutator.js +952 -0
- package/esm/json/storefront.js +3 -0
- package/esm/json/storefrontTypes.js +1 -0
- package/esm/lastValue.js +12 -0
- package/esm/lineItemPrice.js +106 -0
- package/esm/loadJWT.js +20 -0
- package/esm/mapInvalidInput.js +27 -0
- package/esm/mapResponseData.js +11 -0
- package/esm/mapResponseMultiData.js +10 -0
- package/esm/meanBy.js +11 -0
- package/esm/media.js +12 -0
- package/esm/modules/advancedSearch.js +132 -0
- package/esm/modules/cart.js +699 -0
- package/esm/modules/config/defaultAdvancedSearchGraphQLConfig.js +4 -0
- package/esm/modules/config/defaultCartGraphQLConfig.js +10 -0
- package/esm/modules/config/defaultProductGraphQLConfig.js +44 -0
- package/esm/modules/config/defaultSearchGraphQLConfig.js +4 -0
- package/esm/modules/customer.js +2198 -0
- package/esm/modules/helpers/cartInitOption.js +18 -0
- package/esm/modules/helpers/cookieConsent.js +29 -0
- package/esm/modules/helpers/customerOauth2.js +53 -0
- package/esm/modules/helpers/getOAuth2Hook.js +48 -0
- package/esm/modules/helpers/hookUpAnalytics.js +44 -0
- package/esm/modules/helpers/loadJWT.js +18 -0
- package/esm/modules/helpers/misc.js +49 -0
- package/esm/modules/imageDialog.js +71 -0
- package/esm/modules/persist.js +49 -0
- package/esm/modules/popupMessage.js +17 -0
- package/esm/modules/product.js +1278 -0
- package/esm/modules/recentlyVisitedProducts.js +70 -0
- package/esm/modules/search.js +103 -0
- package/esm/multiResponseToResponse.js +18 -0
- package/esm/nonNull.js +6 -0
- package/esm/oauthState.js +35 -0
- package/esm/orderShippingAddress.js +3 -0
- package/esm/package.json +3 -0
- package/esm/pender.js +11 -0
- package/esm/percentageOff.js +3 -0
- package/esm/popupConnectQueue.js +55 -0
- package/esm/preact/components/SixDigitInput.js +159 -0
- package/esm/preact/effector.js +69 -0
- package/esm/preact/transition/CSSTransition.js +47 -0
- package/esm/preact/transition/Transition.js +100 -0
- package/esm/preact/translateLocalStatic.js +26 -0
- package/esm/productFiltering.js +164 -0
- package/esm/productSEO.js +46 -0
- package/esm/productSorting.js +89 -0
- package/esm/promiseAll.js +11 -0
- package/esm/promiseLimit.js +32 -0
- package/esm/rdsToInitialScores.js +27 -0
- package/esm/react/components/Portal.js +2 -0
- package/esm/react/components/RootCloseWrapper.js +33 -0
- package/esm/react/components/SixDigitInput.js +158 -0
- package/esm/react/contains.js +10 -0
- package/esm/react/popperBinder.js +71 -0
- package/esm/react/rootClose.js +106 -0
- package/esm/react/translateLocalStatic.js +26 -0
- package/esm/react/useAsyncCachedValue.js +10 -0
- package/esm/refreshTimeout.js +21 -0
- package/esm/remoteAuth.js +52 -0
- package/esm/request.js +323 -0
- package/esm/requestDetails.js +69 -0
- package/esm/rfc3339Normalize.js +6 -0
- package/esm/script.js +157 -0
- package/esm/seo.js +1 -0
- package/esm/shopDomain.js +4 -0
- package/esm/shopLinks.js +47 -0
- package/esm/slate.js +364 -0
- package/esm/sleep.js +3 -0
- package/esm/splitBy.js +17 -0
- package/esm/splitName.js +22 -0
- package/esm/stripZeros.js +9 -0
- package/esm/stripeError.js +53 -0
- package/esm/tailSplit.js +8 -0
- package/esm/tieredPrice.js +28 -0
- package/esm/timeIt.js +8 -0
- package/esm/toMajor.js +4 -0
- package/esm/toMinor.js +4 -0
- package/esm/trace.js +37 -0
- package/esm/translateLocale.js +7 -0
- package/esm/traverse.js +10 -0
- package/esm/truncate.js +17 -0
- package/esm/typedLocalStorage.js +24 -0
- package/esm/variantImage.js +22 -0
- package/esm/variantImageURL.js +9 -0
- package/esm/variantImages.js +15 -0
- package/esm/variantInventory.js +38 -0
- package/esm/variantOptions.js +15 -0
- package/esm/variantPrice.js +92 -0
- package/esm/variantPriceCommerce.js +25 -0
- package/esm/variantTitle.js +5 -0
- package/esm/variantTitleFull.js +7 -0
- package/esm/variantURL.js +5 -0
- package/esm/vendor/popper/index.d.ts +160 -0
- package/esm/vendor/popper/index.js +2657 -0
- package/esm/vendor/popper/index.js.map +1 -0
- package/esm/vendor/popper/package.json +3 -0
- package/esm/websocket.js +169 -0
- package/package.json +92 -0
- package/types/actionLock.d.ts +7 -0
- package/types/addEmptyListItem.d.ts +2 -0
- package/types/aggregateOptions.d.ts +33 -0
- package/types/analytics.d.ts +23 -0
- package/types/analyticsProductData.d.ts +38 -0
- package/types/arrayToDict.d.ts +2 -0
- package/types/asyncModuleWrapper.d.ts +13 -0
- package/types/averageReviewScore.d.ts +28 -0
- package/types/buildconfig.d.ts +13 -0
- package/types/cachedLoader.d.ts +10 -0
- package/types/canonicalVariantURL.d.ts +12 -0
- package/types/cartOperation.d.ts +28 -0
- package/types/categorySEO.d.ts +17 -0
- package/types/commonTypes.d.ts +10 -0
- package/types/compact.d.ts +1 -0
- package/types/configLoader.d.ts +53 -0
- package/types/controlledQueue.d.ts +17 -0
- package/types/convertImageURL.d.ts +9 -0
- package/types/dataLoader.d.ts +301 -0
- package/types/defaultVariant.d.ts +9 -0
- package/types/effector/clearOnChangeAfterDelay.d.ts +2 -0
- package/types/effector/combineEvery.d.ts +2 -0
- package/types/effector/combineSome.d.ts +2 -0
- package/types/effector/debounced.d.ts +2 -0
- package/types/effector/form.d.ts +74 -0
- package/types/effector/hideOnChangeAfterDelay.d.ts +6 -0
- package/types/effector/requestResponse.d.ts +9 -0
- package/types/effector/requestResponseMulti.d.ts +7 -0
- package/types/effector/restoreNamed.d.ts +2 -0
- package/types/effector/split.d.ts +7 -0
- package/types/effector/validator.d.ts +14 -0
- package/types/effector/wrapSignInRequired.d.ts +2 -0
- package/types/exceptions.d.ts +2 -0
- package/types/fetchAllItems.d.ts +25 -0
- package/types/file.d.ts +4 -0
- package/types/fileWebsocket.d.ts +6 -0
- package/types/filterFunc.d.ts +8 -0
- package/types/filterFuncBrand.d.ts +3 -0
- package/types/filterFuncCategory.d.ts +3 -0
- package/types/filterFuncContentBlock.d.ts +3 -0
- package/types/filterFuncCustomer.d.ts +3 -0
- package/types/filterFuncDataFeed.d.ts +8 -0
- package/types/filterFuncOrder.d.ts +3 -0
- package/types/filterFuncPreprocess.d.ts +2 -0
- package/types/filterFuncProduct.d.ts +3 -0
- package/types/filterFuncPurchaseOrder.d.ts +3 -0
- package/types/filterFuncSupplier.d.ts +3 -0
- package/types/filterFuncTransfer.d.ts +3 -0
- package/types/formatAbbrevNumber.d.ts +6 -0
- package/types/formatCurrency.d.ts +44 -0
- package/types/formatToJSX.d.ts +24 -0
- package/types/fulfillmentNumber.d.ts +1 -0
- package/types/generateRandomToken.d.ts +1 -0
- package/types/generateUUID.d.ts +1 -0
- package/types/generated/codes.d.ts +234 -0
- package/types/genericFile.d.ts +57 -0
- package/types/getSalesChannelID.d.ts +1 -0
- package/types/getSessionID.d.ts +1 -0
- package/types/getTimezone.d.ts +1 -0
- package/types/graphql/fragments/Branding.d.ts +2 -0
- package/types/graphql/fragments/BrandingField.d.ts +2 -0
- package/types/graphql/fragments/CartCustomItem.d.ts +2 -0
- package/types/graphql/fragments/CartOrder.d.ts +2 -0
- package/types/graphql/fragments/CartVariant.d.ts +2 -0
- package/types/graphql/fragments/CartVariantFull.d.ts +2 -0
- package/types/graphql/fragments/Category.d.ts +2 -0
- package/types/graphql/fragments/CommonCartVariant.d.ts +2 -0
- package/types/graphql/fragments/Currency.d.ts +2 -0
- package/types/graphql/fragments/CurrencyPrice.d.ts +2 -0
- package/types/graphql/fragments/CustomField.d.ts +2 -0
- package/types/graphql/fragments/CustomFieldObjects.d.ts +2 -0
- package/types/graphql/fragments/Customer.d.ts +2 -0
- package/types/graphql/fragments/CustomerBalance.d.ts +2 -0
- package/types/graphql/fragments/CustomerBalanceHistory.d.ts +2 -0
- package/types/graphql/fragments/CustomerFavorite.d.ts +2 -0
- package/types/graphql/fragments/CustomerFavoriteShort.d.ts +2 -0
- package/types/graphql/fragments/CustomerOAuthProvider.d.ts +2 -0
- package/types/graphql/fragments/CustomerOrderBrief.d.ts +2 -0
- package/types/graphql/fragments/CustomerOrderFulfillment.d.ts +2 -0
- package/types/graphql/fragments/CustomerOrderFull.d.ts +2 -0
- package/types/graphql/fragments/CustomerPaymentSource.d.ts +2 -0
- package/types/graphql/fragments/CustomerReturnBrief.d.ts +2 -0
- package/types/graphql/fragments/CustomerReturnFull.d.ts +2 -0
- package/types/graphql/fragments/CustomerReturnPolicy.d.ts +2 -0
- package/types/graphql/fragments/CustomerSubscriptionBrief.d.ts +2 -0
- package/types/graphql/fragments/CustomerSubscriptionFull.d.ts +2 -0
- package/types/graphql/fragments/File.d.ts +2 -0
- package/types/graphql/fragments/FileForUpload.d.ts +2 -0
- package/types/graphql/fragments/FileNoFallback.d.ts +2 -0
- package/types/graphql/fragments/FullAddress.d.ts +2 -0
- package/types/graphql/fragments/Gateway.d.ts +2 -0
- package/types/graphql/fragments/GatewayManual.d.ts +2 -0
- package/types/graphql/fragments/GatewayPaypal.d.ts +2 -0
- package/types/graphql/fragments/GatewayStripe.d.ts +2 -0
- package/types/graphql/fragments/GatewayTest.d.ts +2 -0
- package/types/graphql/fragments/IPAndUAInfo.d.ts +2 -0
- package/types/graphql/fragments/InfoCountry.d.ts +2 -0
- package/types/graphql/fragments/InfoCountryDedupField.d.ts +2 -0
- package/types/graphql/fragments/InfoCurrency.d.ts +2 -0
- package/types/graphql/fragments/InfoProvince.d.ts +2 -0
- package/types/graphql/fragments/KeyValue.d.ts +2 -0
- package/types/graphql/fragments/LineItemField.d.ts +2 -0
- package/types/graphql/fragments/MediaFile.d.ts +2 -0
- package/types/graphql/fragments/MinCurrencyPrice.d.ts +2 -0
- package/types/graphql/fragments/ProductField.d.ts +2 -0
- package/types/graphql/fragments/ProductFieldSet.d.ts +2 -0
- package/types/graphql/fragments/ProductFlat.d.ts +2 -0
- package/types/graphql/fragments/ProductQuestion.d.ts +2 -0
- package/types/graphql/fragments/ProductQuestionAnswer.d.ts +2 -0
- package/types/graphql/fragments/ProductQuestionPage.d.ts +2 -0
- package/types/graphql/fragments/ProductReview.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewAnswer.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewAverageScore.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewPage.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewScore.d.ts +2 -0
- package/types/graphql/fragments/ProductReviewSurveyAnswer.d.ts +2 -0
- package/types/graphql/fragments/ProductSearchOptionAgg.d.ts +2 -0
- package/types/graphql/fragments/ProductSearchResult.d.ts +2 -0
- package/types/graphql/fragments/ReturnReason.d.ts +2 -0
- package/types/graphql/fragments/ReviewDimension.d.ts +2 -0
- package/types/graphql/fragments/ReviewDimensionSet.d.ts +2 -0
- package/types/graphql/fragments/ReviewImagePage.d.ts +2 -0
- package/types/graphql/fragments/ReviewQuestionProduct.d.ts +2 -0
- package/types/graphql/fragments/ReviewSettings.d.ts +2 -0
- package/types/graphql/fragments/SearchProduct.d.ts +2 -0
- package/types/graphql/fragments/Shop.d.ts +2 -0
- package/types/graphql/fragments/SubscriptionPlan.d.ts +2 -0
- package/types/graphql/fragments/SurveyQuestion.d.ts +2 -0
- package/types/graphql/fragments/TieredPricing.d.ts +2 -0
- package/types/graphql/fragments/TieredPricingTier.d.ts +2 -0
- package/types/graphql/fragments/VariantOption.d.ts +2 -0
- package/types/graphql/operations/ApplyGiftCardMutation.d.ts +3 -0
- package/types/graphql/operations/AuthRequestMutation.d.ts +3 -0
- package/types/graphql/operations/CancelOrderMutation.d.ts +3 -0
- package/types/graphql/operations/CancelSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/ConnectOAuth2Mutation.d.ts +3 -0
- package/types/graphql/operations/CreateCartMutation.d.ts +3 -0
- package/types/graphql/operations/CreateFavoriteMutation.d.ts +3 -0
- package/types/graphql/operations/CreateFileMutation.d.ts +3 -0
- package/types/graphql/operations/CreatePaymentSourceMutation.d.ts +3 -0
- package/types/graphql/operations/CreateProductQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/CreateProductQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/CreateProductReviewMutation.d.ts +3 -0
- package/types/graphql/operations/CreateReturnMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteFavoriteMutation.d.ts +3 -0
- package/types/graphql/operations/DeletePaymentSourceMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteProductQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteProductQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/DeleteProductReviewMutation.d.ts +3 -0
- package/types/graphql/operations/DisconnectOAuth2Mutation.d.ts +3 -0
- package/types/graphql/operations/EditSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/FileUploadedMutation.d.ts +3 -0
- package/types/graphql/operations/FlagQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/FlagQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/FlagReviewAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/FlagReviewMutation.d.ts +3 -0
- package/types/graphql/operations/GetBrandingQuery.d.ts +3 -0
- package/types/graphql/operations/GetCartQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerAddressesPageDataQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerBalanceHistoryPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerBalanceQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerInfoQuery.d.ts +3 -0
- package/types/graphql/operations/GetCustomerQuery.d.ts +3 -0
- package/types/graphql/operations/GetFavoritesQuery.d.ts +3 -0
- package/types/graphql/operations/GetFileStatusQuery.d.ts +3 -0
- package/types/graphql/operations/GetGatewaysQuery.d.ts +3 -0
- package/types/graphql/operations/GetInfoCurrenciesQuery.d.ts +3 -0
- package/types/graphql/operations/GetLastCartQuery.d.ts +3 -0
- package/types/graphql/operations/GetOrderQuery.d.ts +3 -0
- package/types/graphql/operations/GetOrdersPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetPaymentMethodsPageDataQuery.d.ts +3 -0
- package/types/graphql/operations/GetProductQuestionsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetProductReviewImagesPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetProductReviewsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetProvincesQuery.d.ts +3 -0
- package/types/graphql/operations/GetQuestionQuery.d.ts +3 -0
- package/types/graphql/operations/GetReturnCreationInfoQuery.d.ts +3 -0
- package/types/graphql/operations/GetReturnQuery.d.ts +3 -0
- package/types/graphql/operations/GetReturnsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetReviewDimensionsQuery.d.ts +3 -0
- package/types/graphql/operations/GetReviewQuery.d.ts +3 -0
- package/types/graphql/operations/GetReviewSettingsQuery.d.ts +3 -0
- package/types/graphql/operations/GetShopCurrenciesQuery.d.ts +3 -0
- package/types/graphql/operations/GetShopQuery.d.ts +3 -0
- package/types/graphql/operations/GetSubscriptionQuery.d.ts +3 -0
- package/types/graphql/operations/GetSubscriptionsPageQuery.d.ts +3 -0
- package/types/graphql/operations/GetVariantPageQuery.d.ts +3 -0
- package/types/graphql/operations/LoadProductNoCustomerQuery.d.ts +3 -0
- package/types/graphql/operations/LoadProductQuery.d.ts +3 -0
- package/types/graphql/operations/ModifyCartMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyCustomerMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyFavoriteMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyProductQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyProductQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/ModifyProductReviewMutation.d.ts +3 -0
- package/types/graphql/operations/NewPasswordMutation.d.ts +3 -0
- package/types/graphql/operations/PauseSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/ResetPasswordMutation.d.ts +3 -0
- package/types/graphql/operations/ResumeSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/SearchProductsAdvancedQuery.d.ts +3 -0
- package/types/graphql/operations/SearchProductsQuery.d.ts +3 -0
- package/types/graphql/operations/SearchQuestionsQuery.d.ts +3 -0
- package/types/graphql/operations/SearchReviewsQuery.d.ts +3 -0
- package/types/graphql/operations/SignInMutation.d.ts +3 -0
- package/types/graphql/operations/SignInViaEmailCompleteMutation.d.ts +3 -0
- package/types/graphql/operations/SignInViaEmailInitMutation.d.ts +3 -0
- package/types/graphql/operations/SignUpMutation.d.ts +3 -0
- package/types/graphql/operations/SkipNextSubscriptionMutation.d.ts +3 -0
- package/types/graphql/operations/UploadFileMutation.d.ts +3 -0
- package/types/graphql/operations/VerifyCodeMutation.d.ts +3 -0
- package/types/graphql/operations/VoteQuestionAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/VoteQuestionMutation.d.ts +3 -0
- package/types/graphql/operations/VoteReviewAnswerMutation.d.ts +3 -0
- package/types/graphql/operations/VoteReviewMutation.d.ts +3 -0
- package/types/graphql/types.d.ts +2471 -0
- package/types/hierarchicalSearchOption.d.ts +14 -0
- package/types/idgen.d.ts +1 -0
- package/types/ignoreQueue.d.ts +10 -0
- package/types/imageAltProps.d.ts +11 -0
- package/types/invoiceFormat.d.ts +32 -0
- package/types/isShippingRequired.d.ts +14 -0
- package/types/isoStripTrailingZeros.d.ts +1 -0
- package/types/json/commerce.d.ts +3 -0
- package/types/json/commerceFileUpload.d.ts +20 -0
- package/types/json/commerceTypes.d.ts +15422 -0
- package/types/json/common.d.ts +81 -0
- package/types/json/fetchAllItems.d.ts +15 -0
- package/types/json/mutator.d.ts +238 -0
- package/types/json/storefront.d.ts +3 -0
- package/types/json/storefrontTypes.d.ts +5059 -0
- package/types/lastValue.d.ts +10 -0
- package/types/lineItemPrice.d.ts +18 -0
- package/types/loadJWT.d.ts +1 -0
- package/types/mapInvalidInput.d.ts +15 -0
- package/types/mapResponseData.d.ts +3 -0
- package/types/mapResponseMultiData.d.ts +2 -0
- package/types/meanBy.d.ts +1 -0
- package/types/media.d.ts +3 -0
- package/types/modules/advancedSearch.d.ts +78 -0
- package/types/modules/cart.d.ts +263 -0
- package/types/modules/config/defaultAdvancedSearchGraphQLConfig.d.ts +3 -0
- package/types/modules/config/defaultCartGraphQLConfig.d.ts +6 -0
- package/types/modules/config/defaultProductGraphQLConfig.d.ts +23 -0
- package/types/modules/config/defaultSearchGraphQLConfig.d.ts +3 -0
- package/types/modules/customer.d.ts +624 -0
- package/types/modules/helpers/cartInitOption.d.ts +2 -0
- package/types/modules/helpers/cookieConsent.d.ts +4 -0
- package/types/modules/helpers/customerOauth2.d.ts +19 -0
- package/types/modules/helpers/getOAuth2Hook.d.ts +22 -0
- package/types/modules/helpers/hookUpAnalytics.d.ts +21 -0
- package/types/modules/helpers/loadJWT.d.ts +1 -0
- package/types/modules/helpers/misc.d.ts +14 -0
- package/types/modules/imageDialog.d.ts +31 -0
- package/types/modules/persist.d.ts +13 -0
- package/types/modules/popupMessage.d.ts +9 -0
- package/types/modules/product.d.ts +320 -0
- package/types/modules/recentlyVisitedProducts.d.ts +25 -0
- package/types/modules/search.d.ts +54 -0
- package/types/multiResponseToResponse.d.ts +2 -0
- package/types/nonNull.d.ts +1 -0
- package/types/oauthState.d.ts +3 -0
- package/types/orderShippingAddress.d.ts +6 -0
- package/types/pender.d.ts +5 -0
- package/types/percentageOff.d.ts +1 -0
- package/types/popupConnectQueue.d.ts +41 -0
- package/types/preact/components/SixDigitInput.d.ts +28 -0
- package/types/preact/effector.d.ts +8 -0
- package/types/preact/transition/CSSTransition.d.ts +8 -0
- package/types/preact/transition/Transition.d.ts +30 -0
- package/types/preact/translateLocalStatic.d.ts +4 -0
- package/types/productFiltering.d.ts +58 -0
- package/types/productSEO.d.ts +59 -0
- package/types/productSorting.d.ts +35 -0
- package/types/promiseAll.d.ts +5 -0
- package/types/promiseLimit.d.ts +13 -0
- package/types/rdsToInitialScores.d.ts +26 -0
- package/types/react/components/Portal.d.ts +2 -0
- package/types/react/components/RootCloseWrapper.d.ts +18 -0
- package/types/react/components/SixDigitInput.d.ts +27 -0
- package/types/react/contains.d.ts +1 -0
- package/types/react/popperBinder.d.ts +23 -0
- package/types/react/rootClose.d.ts +18 -0
- package/types/react/translateLocalStatic.d.ts +4 -0
- package/types/react/useAsyncCachedValue.d.ts +2 -0
- package/types/refreshTimeout.d.ts +5 -0
- package/types/remoteAuth.d.ts +14 -0
- package/types/request.d.ts +104 -0
- package/types/requestDetails.d.ts +16 -0
- package/types/rfc3339Normalize.d.ts +1 -0
- package/types/script.d.ts +36 -0
- package/types/seo.d.ts +5 -0
- package/types/shopDomain.d.ts +7 -0
- package/types/shopLinks.d.ts +14 -0
- package/types/slate.d.ts +47 -0
- package/types/sleep.d.ts +1 -0
- package/types/splitBy.d.ts +1 -0
- package/types/splitName.d.ts +2 -0
- package/types/stripZeros.d.ts +1 -0
- package/types/stripeError.d.ts +14 -0
- package/types/tailSplit.d.ts +1 -0
- package/types/tieredPrice.d.ts +2 -0
- package/types/timeIt.d.ts +1 -0
- package/types/toMajor.d.ts +8 -0
- package/types/toMinor.d.ts +8 -0
- package/types/trace.d.ts +17 -0
- package/types/translateLocale.d.ts +2 -0
- package/types/traverse.d.ts +1 -0
- package/types/truncate.d.ts +7 -0
- package/types/typedLocalStorage.d.ts +3 -0
- package/types/variantImage.d.ts +16 -0
- package/types/variantImageURL.d.ts +25 -0
- package/types/variantImages.d.ts +11 -0
- package/types/variantInventory.d.ts +14 -0
- package/types/variantOptions.d.ts +18 -0
- package/types/variantPrice.d.ts +37 -0
- package/types/variantPriceCommerce.d.ts +26 -0
- package/types/variantTitle.d.ts +7 -0
- package/types/variantTitleFull.d.ts +11 -0
- package/types/variantURL.d.ts +7 -0
- package/types/websocket.d.ts +33 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Transition = void 0;
|
|
4
|
+
const hooks_1 = require("preact/hooks");
|
|
5
|
+
const noop = () => { };
|
|
6
|
+
const APPEAR = "APPEAR";
|
|
7
|
+
const APPEARING = "APPEARING";
|
|
8
|
+
const APPEARED = "APPEARED";
|
|
9
|
+
const ENTER = "ENTER";
|
|
10
|
+
const ENTERING = "ENTERING";
|
|
11
|
+
const ENTERED = "ENTERED";
|
|
12
|
+
const EXIT = "EXIT";
|
|
13
|
+
const EXITING = "EXITING";
|
|
14
|
+
const EXITED = "EXITED";
|
|
15
|
+
const Transition = ({ in: inProp = false, appear = false, enter = true, exit = true, duration = 500, alwaysMounted = false, children, onEnter = noop, onEntering = noop, onEntered = noop, onExit = noop, onExiting = noop, onExited = noop, }) => {
|
|
16
|
+
const timeoutRef = (0, hooks_1.useRef)();
|
|
17
|
+
let ignoreInPropChange = false;
|
|
18
|
+
const [phase, setPhase] = (0, hooks_1.useState)(() => {
|
|
19
|
+
ignoreInPropChange = true;
|
|
20
|
+
if (!inProp)
|
|
21
|
+
return EXITED;
|
|
22
|
+
if (appear)
|
|
23
|
+
return APPEAR;
|
|
24
|
+
return APPEARED;
|
|
25
|
+
});
|
|
26
|
+
(0, hooks_1.useEffect)(() => {
|
|
27
|
+
switch (phase) {
|
|
28
|
+
case APPEAR:
|
|
29
|
+
onEnter();
|
|
30
|
+
setPhase(APPEARING);
|
|
31
|
+
break;
|
|
32
|
+
case APPEARING:
|
|
33
|
+
onEntering();
|
|
34
|
+
timeoutRef.current = setTimeout(() => {
|
|
35
|
+
setPhase(APPEARED);
|
|
36
|
+
}, duration);
|
|
37
|
+
break;
|
|
38
|
+
case APPEARED:
|
|
39
|
+
onEntered();
|
|
40
|
+
break;
|
|
41
|
+
case ENTER:
|
|
42
|
+
onEnter();
|
|
43
|
+
setPhase(ENTERING);
|
|
44
|
+
break;
|
|
45
|
+
case ENTERING:
|
|
46
|
+
onEntering();
|
|
47
|
+
timeoutRef.current = setTimeout(() => {
|
|
48
|
+
setPhase(ENTERED);
|
|
49
|
+
}, duration);
|
|
50
|
+
break;
|
|
51
|
+
case ENTERED:
|
|
52
|
+
onEntered();
|
|
53
|
+
break;
|
|
54
|
+
case EXIT:
|
|
55
|
+
onExit();
|
|
56
|
+
setPhase(EXITING);
|
|
57
|
+
break;
|
|
58
|
+
case EXITING:
|
|
59
|
+
onExiting();
|
|
60
|
+
timeoutRef.current = setTimeout(() => {
|
|
61
|
+
setPhase(EXITED);
|
|
62
|
+
}, duration);
|
|
63
|
+
break;
|
|
64
|
+
case EXITED:
|
|
65
|
+
onExited();
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
return () => {
|
|
69
|
+
if (timeoutRef.current)
|
|
70
|
+
clearTimeout(timeoutRef.current);
|
|
71
|
+
};
|
|
72
|
+
}, [phase]);
|
|
73
|
+
(0, hooks_1.useLayoutEffect)(() => {
|
|
74
|
+
if (!ignoreInPropChange) {
|
|
75
|
+
switch (true) {
|
|
76
|
+
case !!(inProp && enter):
|
|
77
|
+
setPhase(ENTER);
|
|
78
|
+
break;
|
|
79
|
+
case !!(inProp && !enter):
|
|
80
|
+
setPhase(ENTERED);
|
|
81
|
+
break;
|
|
82
|
+
case !!(!inProp && exit):
|
|
83
|
+
setPhase(EXIT);
|
|
84
|
+
break;
|
|
85
|
+
case !!(!inProp && !exit):
|
|
86
|
+
setPhase(EXITED);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, [inProp]);
|
|
91
|
+
const value = (0, hooks_1.useMemo)(() => ({
|
|
92
|
+
appear: phase === APPEAR,
|
|
93
|
+
appearActive: phase === APPEARING,
|
|
94
|
+
appearDone: phase === APPEARED,
|
|
95
|
+
enter: phase === ENTER,
|
|
96
|
+
enterActive: phase === ENTERING,
|
|
97
|
+
enterDone: phase === ENTERED,
|
|
98
|
+
exit: phase === EXIT,
|
|
99
|
+
exitActive: phase === EXITING,
|
|
100
|
+
exitDone: phase === EXITED,
|
|
101
|
+
}), [phase]);
|
|
102
|
+
return alwaysMounted || phase !== EXITED ? children(value) : null;
|
|
103
|
+
};
|
|
104
|
+
exports.Transition = Transition;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeT = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @jsx h
|
|
6
|
+
* @jsxFrag Fragment
|
|
7
|
+
*/
|
|
8
|
+
const preact_1 = require("preact");
|
|
9
|
+
const formatToJSX_js_1 = require("../formatToJSX.js");
|
|
10
|
+
const translateLocale_js_1 = require("../translateLocale.js");
|
|
11
|
+
const formatJSXConfig = {
|
|
12
|
+
cloneElement: preact_1.cloneElement,
|
|
13
|
+
isValidElement: preact_1.isValidElement,
|
|
14
|
+
toFragment: (v) => (0, preact_1.h)(preact_1.Fragment, null, v),
|
|
15
|
+
};
|
|
16
|
+
function makeT(perLocaleData) {
|
|
17
|
+
return (template, ...args) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const locale = (0, translateLocale_js_1.getLocale)();
|
|
20
|
+
let pat = template;
|
|
21
|
+
if (locale !== "en") {
|
|
22
|
+
pat = (_a = perLocaleData[locale]) === null || _a === void 0 ? void 0 : _a[template];
|
|
23
|
+
if (!pat) {
|
|
24
|
+
console.warn(`missing translation string for "${locale}" locale: ${template}`);
|
|
25
|
+
pat = template;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return (0, formatToJSX_js_1.format)(formatJSXConfig, pat, ...args);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
exports.makeT = makeT;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeRatingFilter = exports.makePriceFilter = exports.makeOptionFilter = exports.filtersToSearchOptions = exports.filterProducts = exports.createProductFiltering = void 0;
|
|
4
|
+
const effector_1 = require("effector");
|
|
5
|
+
const variantPrice_js_1 = require("./variantPrice.js");
|
|
6
|
+
const compact_js_1 = require("./compact.js");
|
|
7
|
+
const debounced_js_1 = require("./effector/debounced.js");
|
|
8
|
+
function createProductFiltering() {
|
|
9
|
+
const pageKey = (0, effector_1.createStore)("");
|
|
10
|
+
const setFiltersState = (0, effector_1.createEvent)();
|
|
11
|
+
const setFilterState = (0, effector_1.createEvent)();
|
|
12
|
+
const filtersState = (0, effector_1.createStore)({});
|
|
13
|
+
const filtersStateDebounced = (0, effector_1.createStore)({});
|
|
14
|
+
(0, debounced_js_1.debounced)(filtersState, filtersStateDebounced, 500);
|
|
15
|
+
filtersState.on(setFiltersState, (_, v) => v.state);
|
|
16
|
+
filtersState.on(setFilterState, (fs, { id, data }) => {
|
|
17
|
+
const s = Object.assign({}, fs);
|
|
18
|
+
if (data === undefined) {
|
|
19
|
+
delete s[id];
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
s[id] = data;
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
});
|
|
26
|
+
pageKey.on(setFiltersState, (_, v) => v.pageKey);
|
|
27
|
+
pageKey.on(setFilterState, (_, v) => v.pageKey);
|
|
28
|
+
return {
|
|
29
|
+
setFiltersState,
|
|
30
|
+
setFilterState,
|
|
31
|
+
filtersState,
|
|
32
|
+
filtersStateDebounced,
|
|
33
|
+
pageKey,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.createProductFiltering = createProductFiltering;
|
|
37
|
+
function filterProducts(state, filtersMap, products) {
|
|
38
|
+
if (Object.keys(state).length === 0)
|
|
39
|
+
return products.map((p) => ({ original: p, filtered: p }));
|
|
40
|
+
const funcs = [];
|
|
41
|
+
for (const key in state) {
|
|
42
|
+
const f = filtersMap[key];
|
|
43
|
+
if (!f)
|
|
44
|
+
continue;
|
|
45
|
+
const val = state[key];
|
|
46
|
+
funcs.push((p) => f.filter(val, p));
|
|
47
|
+
}
|
|
48
|
+
return (0, compact_js_1.compact)(products.map((p) => {
|
|
49
|
+
let pp = p;
|
|
50
|
+
for (const f of funcs) {
|
|
51
|
+
if (!pp)
|
|
52
|
+
break;
|
|
53
|
+
pp = f(pp);
|
|
54
|
+
}
|
|
55
|
+
return pp ? { original: p, filtered: pp } : undefined;
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
exports.filterProducts = filterProducts;
|
|
59
|
+
function filtersToSearchOptions(state, filtersMap) {
|
|
60
|
+
const perContext = new Map();
|
|
61
|
+
const out = [];
|
|
62
|
+
for (const key in state) {
|
|
63
|
+
const f = filtersMap[key];
|
|
64
|
+
if (!f)
|
|
65
|
+
continue;
|
|
66
|
+
const val = state[key];
|
|
67
|
+
const result = f.api(val);
|
|
68
|
+
if (result) {
|
|
69
|
+
const context = f.context;
|
|
70
|
+
if (!perContext.has(context)) {
|
|
71
|
+
perContext.set(context, []);
|
|
72
|
+
}
|
|
73
|
+
const array = perContext.get(context);
|
|
74
|
+
array.push(result);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const p = perContext.get("product");
|
|
78
|
+
if (p)
|
|
79
|
+
out.push(...p);
|
|
80
|
+
const v = perContext.get("variant");
|
|
81
|
+
if (v)
|
|
82
|
+
out.push({ kind: "and", opts: v, context: "variants" });
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
exports.filtersToSearchOptions = filtersToSearchOptions;
|
|
86
|
+
function makeOptionFilter(optionID) {
|
|
87
|
+
return {
|
|
88
|
+
id: `option:${optionID}`,
|
|
89
|
+
context: "variant",
|
|
90
|
+
filter: (state, p) => {
|
|
91
|
+
if (state === undefined)
|
|
92
|
+
return p;
|
|
93
|
+
const variants = (0, compact_js_1.compact)(p.variants).filter((v) => v.options.some((opt) => opt.option_id === optionID && (state === null || state === void 0 ? void 0 : state.has(opt.option_value_id))));
|
|
94
|
+
if (variants.length === 0)
|
|
95
|
+
return undefined;
|
|
96
|
+
return Object.assign(Object.assign({}, p), { variants });
|
|
97
|
+
},
|
|
98
|
+
api: (state) => {
|
|
99
|
+
if (!state)
|
|
100
|
+
return undefined;
|
|
101
|
+
const vals = Array.from(state.keys());
|
|
102
|
+
return {
|
|
103
|
+
kind: "or",
|
|
104
|
+
opts: vals.map((val) => ({
|
|
105
|
+
kind: "and",
|
|
106
|
+
opts: [
|
|
107
|
+
{ kind: "opt", opt: { op: "eq", name: "variants.options.option_id", text: optionID } },
|
|
108
|
+
{ kind: "opt", opt: { op: "eq", name: "variants.options.option_value_id", text: val } },
|
|
109
|
+
],
|
|
110
|
+
})),
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
exports.makeOptionFilter = makeOptionFilter;
|
|
116
|
+
function makePriceFilter(env) {
|
|
117
|
+
return {
|
|
118
|
+
id: "price-range",
|
|
119
|
+
context: "variant",
|
|
120
|
+
filter: (state, p) => {
|
|
121
|
+
if (state === undefined)
|
|
122
|
+
return p;
|
|
123
|
+
const variants = (0, compact_js_1.compact)(p.variants).filter((v) => {
|
|
124
|
+
const price = (0, variantPrice_js_1.variantPriceInfo)(env, v).price;
|
|
125
|
+
return price >= state.from && price <= state.to;
|
|
126
|
+
});
|
|
127
|
+
if (variants.length === 0)
|
|
128
|
+
return undefined;
|
|
129
|
+
return Object.assign(Object.assign({}, p), { variants });
|
|
130
|
+
},
|
|
131
|
+
api: (state) => {
|
|
132
|
+
if (state === undefined)
|
|
133
|
+
return undefined;
|
|
134
|
+
// TODO: better API price filtering, what about other currencies?
|
|
135
|
+
return {
|
|
136
|
+
kind: "and",
|
|
137
|
+
opts: [
|
|
138
|
+
{ kind: "opt", opt: { op: "ge", name: "variants.price", number: state.from } },
|
|
139
|
+
{ kind: "opt", opt: { op: "le", name: "variants.price", number: state.to } },
|
|
140
|
+
],
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
exports.makePriceFilter = makePriceFilter;
|
|
146
|
+
function makeRatingFilter() {
|
|
147
|
+
return {
|
|
148
|
+
id: "rating-range",
|
|
149
|
+
context: "product",
|
|
150
|
+
filter: (state, p) => {
|
|
151
|
+
if (state === undefined)
|
|
152
|
+
return p;
|
|
153
|
+
const score = p.average_score / 2 + 0.5;
|
|
154
|
+
if (score >= state.from && score <= state.to)
|
|
155
|
+
return p;
|
|
156
|
+
return undefined;
|
|
157
|
+
},
|
|
158
|
+
api: (state) => {
|
|
159
|
+
if (state === undefined)
|
|
160
|
+
return undefined;
|
|
161
|
+
const lo = 2 * state.from - 1;
|
|
162
|
+
const hi = 2 * state.to - 1;
|
|
163
|
+
return {
|
|
164
|
+
kind: "and",
|
|
165
|
+
opts: [
|
|
166
|
+
{ kind: "opt", opt: { op: "ge", name: "average_score", number: lo, zero: lo === 0 } },
|
|
167
|
+
{ kind: "opt", opt: { op: "le", name: "average_score", number: hi, zero: hi === 0 } },
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
exports.makeRatingFilter = makeRatingFilter;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.productSEO = void 0;
|
|
4
|
+
const defaultVariant_js_1 = require("./defaultVariant.js");
|
|
5
|
+
const toMajor_js_1 = require("./toMajor.js");
|
|
6
|
+
const variantImages_js_1 = require("./variantImages.js");
|
|
7
|
+
const variantPrice_js_1 = require("./variantPrice.js");
|
|
8
|
+
function productSEO(env, product) {
|
|
9
|
+
var _a;
|
|
10
|
+
const variant = (0, defaultVariant_js_1.defaultVariant)(product);
|
|
11
|
+
if (!variant)
|
|
12
|
+
return undefined;
|
|
13
|
+
const images = (0, variantImages_js_1.variantImages)(variant);
|
|
14
|
+
const priceInfo = (0, variantPrice_js_1.variantPriceInfo)(env, variant);
|
|
15
|
+
const info = variant
|
|
16
|
+
? {
|
|
17
|
+
variantID: variant.id,
|
|
18
|
+
variantSKU: variant.sku,
|
|
19
|
+
productID: product.id,
|
|
20
|
+
productHandle: product.handle,
|
|
21
|
+
}
|
|
22
|
+
: undefined;
|
|
23
|
+
return {
|
|
24
|
+
canonicalLinkHref: info && env.canonicalVariantURL ? env.canonicalVariantURL(info) : undefined,
|
|
25
|
+
meta: [
|
|
26
|
+
{ name: "title", content: product.meta_title },
|
|
27
|
+
{ name: "description", content: product.meta_description },
|
|
28
|
+
// OPEN GRAPH
|
|
29
|
+
{ property: "og:type", content: "product" },
|
|
30
|
+
{ property: "og:title", content: product.meta_title },
|
|
31
|
+
...(info && env.canonicalVariantURL ? [{ property: "og:url", content: env.canonicalVariantURL(info) }] : []),
|
|
32
|
+
{ property: "og:price:amount", content: `${(0, toMajor_js_1.toMajor)(env.shopCurrencies, env.currency, priceInfo.price)}` },
|
|
33
|
+
{ property: "og:price:currency", content: env.currency },
|
|
34
|
+
{ property: "og:availability", content: (((_a = variant.inventory) === null || _a === void 0 ? void 0 : _a.available) || 0) > 0 ? "instock" : "oos" },
|
|
35
|
+
{ property: "og:description", content: product.meta_description },
|
|
36
|
+
// TWITTER CARD
|
|
37
|
+
{ name: "twitter:card", content: "summary" },
|
|
38
|
+
{ name: "twitter:title", content: product.meta_title },
|
|
39
|
+
{ name: "twitter:description", content: product.meta_description },
|
|
40
|
+
// OPEN GRAPH images
|
|
41
|
+
...images.reduce((array, f) => [
|
|
42
|
+
...array,
|
|
43
|
+
{ property: "og:image", content: f.public_url },
|
|
44
|
+
{ property: "og:image:secure_url", content: f.public_url },
|
|
45
|
+
], []),
|
|
46
|
+
// TWITTER CARD images
|
|
47
|
+
...images.reduce((array, f) => [...array, { property: "twitter:image", content: f.public_url }], []),
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.productSEO = productSEO;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sortProducts = exports.defaultSortOptions = exports.sortByVisitsDesc = exports.sortBySalesDesc = exports.sortByRatingDesc = exports.sortByRatingAsc = exports.sortByTitleDesc = exports.sortByTitleAsc = exports.sortByPriceDesc = exports.sortByPriceAsc = void 0;
|
|
4
|
+
const variantPrice_js_1 = require("./variantPrice.js");
|
|
5
|
+
const defaultVariant_js_1 = require("./defaultVariant.js");
|
|
6
|
+
exports.sortByPriceAsc = {
|
|
7
|
+
id: "price_asc",
|
|
8
|
+
api: () => ["min_price", false],
|
|
9
|
+
func: (a, b) => a.price - b.price,
|
|
10
|
+
};
|
|
11
|
+
exports.sortByPriceDesc = {
|
|
12
|
+
id: "price_desc",
|
|
13
|
+
api: () => ["min_price", true],
|
|
14
|
+
func: (a, b) => b.price - a.price,
|
|
15
|
+
};
|
|
16
|
+
exports.sortByTitleAsc = {
|
|
17
|
+
id: "title_asc",
|
|
18
|
+
api: () => ["title", false],
|
|
19
|
+
func: (a, b) => a.title.localeCompare(b.title),
|
|
20
|
+
};
|
|
21
|
+
exports.sortByTitleDesc = {
|
|
22
|
+
id: "title_desc",
|
|
23
|
+
api: () => ["title", true],
|
|
24
|
+
func: (a, b) => b.title.localeCompare(a.title),
|
|
25
|
+
};
|
|
26
|
+
exports.sortByRatingAsc = {
|
|
27
|
+
id: "rating_asc",
|
|
28
|
+
api: () => ["rating", false],
|
|
29
|
+
func: (a, b) => {
|
|
30
|
+
if (a.rating !== undefined && b.rating !== undefined) {
|
|
31
|
+
return a.rating - b.rating;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return (a.rating !== undefined ? 0 : 1) - (b.rating !== undefined ? 0 : 1);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
exports.sortByRatingDesc = {
|
|
39
|
+
id: "rating_desc",
|
|
40
|
+
api: () => ["rating", true],
|
|
41
|
+
func: (a, b) => {
|
|
42
|
+
if (a.rating !== undefined && b.rating !== undefined) {
|
|
43
|
+
return b.rating - a.rating;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return (a.rating !== undefined ? 0 : 1) - (b.rating !== undefined ? 0 : 1);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
exports.sortBySalesDesc = {
|
|
51
|
+
id: "top_selling",
|
|
52
|
+
api: () => ["sales", true],
|
|
53
|
+
func: () => {
|
|
54
|
+
throw new Error("not implemented");
|
|
55
|
+
},
|
|
56
|
+
apiOnly: true,
|
|
57
|
+
};
|
|
58
|
+
exports.sortByVisitsDesc = {
|
|
59
|
+
id: "most_viewed",
|
|
60
|
+
api: () => ["visits", true],
|
|
61
|
+
func: () => {
|
|
62
|
+
throw new Error("not implemented");
|
|
63
|
+
},
|
|
64
|
+
apiOnly: true,
|
|
65
|
+
};
|
|
66
|
+
exports.defaultSortOptions = [
|
|
67
|
+
exports.sortByPriceAsc,
|
|
68
|
+
exports.sortByPriceDesc,
|
|
69
|
+
exports.sortByTitleAsc,
|
|
70
|
+
exports.sortByTitleDesc,
|
|
71
|
+
exports.sortByRatingAsc,
|
|
72
|
+
exports.sortByRatingDesc,
|
|
73
|
+
exports.sortBySalesDesc,
|
|
74
|
+
exports.sortByVisitsDesc,
|
|
75
|
+
];
|
|
76
|
+
function sortProducts(env, sortBy, products) {
|
|
77
|
+
if (!sortBy)
|
|
78
|
+
return products;
|
|
79
|
+
return products
|
|
80
|
+
.map((fp, idx) => {
|
|
81
|
+
const p = fp.filtered;
|
|
82
|
+
const v = (0, defaultVariant_js_1.defaultVariant)(p);
|
|
83
|
+
return {
|
|
84
|
+
idx,
|
|
85
|
+
price: (0, variantPrice_js_1.variantPriceInfo)(env, v).price,
|
|
86
|
+
title: p.title,
|
|
87
|
+
rating: p.review_count !== 0 ? p.average_score : undefined,
|
|
88
|
+
};
|
|
89
|
+
})
|
|
90
|
+
.sort(sortBy.func)
|
|
91
|
+
.map((vi) => products[vi.idx]);
|
|
92
|
+
}
|
|
93
|
+
exports.sortProducts = sortProducts;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.promiseAll = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
function promiseAll(obj) {
|
|
6
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
7
|
+
const keys = Object.keys(obj);
|
|
8
|
+
const values = yield Promise.all(keys.map((key) => obj[key]));
|
|
9
|
+
const out = {};
|
|
10
|
+
for (let i = 0; i < keys.length; i++) {
|
|
11
|
+
const key = keys[i];
|
|
12
|
+
const val = values[i];
|
|
13
|
+
out[key] = val;
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.promiseAll = promiseAll;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PromiseLimiter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
class PromiseLimiter {
|
|
6
|
+
constructor(num) {
|
|
7
|
+
this.queue = [];
|
|
8
|
+
this.dispatch = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
if (this.queue.length === 0 || this.slots.length === 0)
|
|
10
|
+
return;
|
|
11
|
+
const slot = this.slots.shift();
|
|
12
|
+
const item = this.queue.shift();
|
|
13
|
+
try {
|
|
14
|
+
item.resolve(yield item.pfunc(slot));
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
item.reject(err);
|
|
18
|
+
}
|
|
19
|
+
this.slots.push(slot);
|
|
20
|
+
this.dispatch();
|
|
21
|
+
});
|
|
22
|
+
this.slots = Array.from({ length: num }).map((_, idx) => idx);
|
|
23
|
+
}
|
|
24
|
+
run(pfunc) {
|
|
25
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const p = new Promise((resolve, reject) => {
|
|
27
|
+
this.queue.push({
|
|
28
|
+
pfunc,
|
|
29
|
+
resolve,
|
|
30
|
+
reject,
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
this.dispatch();
|
|
34
|
+
return p;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.PromiseLimiter = PromiseLimiter;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rdsToInitialScores = void 0;
|
|
4
|
+
const compact_js_1 = require("./compact.js");
|
|
5
|
+
function findScoreInPrevScores(rdID, prevScores) {
|
|
6
|
+
const s = prevScores === null || prevScores === void 0 ? void 0 : prevScores.find((s) => (s.review_dimension ? s.review_dimension.id === rdID : rdID === ""));
|
|
7
|
+
return s ? s.score : 0;
|
|
8
|
+
}
|
|
9
|
+
function defaultInitialScoresValue(prevScores) {
|
|
10
|
+
return [{ review_dimension_id: "", score: findScoreInPrevScores("", prevScores) || 9, overall: false }];
|
|
11
|
+
}
|
|
12
|
+
function rdsToInitialScores(rds, reviewDimensions, prevScores) {
|
|
13
|
+
var _a;
|
|
14
|
+
if (!rds) {
|
|
15
|
+
return defaultInitialScoresValue(prevScores);
|
|
16
|
+
}
|
|
17
|
+
const overallID = rds.overall_review_dimension ? rds.overall_review_dimension.id : "";
|
|
18
|
+
const arr = (0, compact_js_1.compact)((_a = rds.review_dimensions) === null || _a === void 0 ? void 0 : _a.map((rd) => {
|
|
19
|
+
if (!rd)
|
|
20
|
+
return undefined;
|
|
21
|
+
const v = reviewDimensions[rd.id];
|
|
22
|
+
if (!v)
|
|
23
|
+
return undefined;
|
|
24
|
+
return {
|
|
25
|
+
review_dimension_id: v.id,
|
|
26
|
+
score: findScoreInPrevScores(v.id, prevScores) || 9,
|
|
27
|
+
overall: v.id === overallID,
|
|
28
|
+
};
|
|
29
|
+
}));
|
|
30
|
+
return arr.length > 0 ? arr : defaultInitialScoresValue(prevScores);
|
|
31
|
+
}
|
|
32
|
+
exports.rdsToInitialScores = rdsToInitialScores;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Portal = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_dom_1 = tslib_1.__importDefault(require("react-dom"));
|
|
6
|
+
const Portal = (props) => typeof document !== "undefined" ? react_dom_1.default.createPortal(props.children, document.body) : null;
|
|
7
|
+
exports.Portal = Portal;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RootCloseWrapper = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const rootClose_js_1 = require("../rootClose.js");
|
|
7
|
+
const globalTracker = new rootClose_js_1.RootCloseTracker(true);
|
|
8
|
+
class RootCloseWrapper extends react_1.default.Component {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.added = false;
|
|
12
|
+
}
|
|
13
|
+
componentDidMount() {
|
|
14
|
+
const { tracker, tag, onRootClose, disabled, ignoreBelowWidth, ignoreAboveWidth } = this.props;
|
|
15
|
+
if (!disabled) {
|
|
16
|
+
(tracker || globalTracker).addTrackedComponent(this, tag, onRootClose, { ignoreBelowWidth, ignoreAboveWidth });
|
|
17
|
+
this.added = true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
componentDidUpdate() {
|
|
21
|
+
const { tracker, tag, onRootClose, disabled } = this.props;
|
|
22
|
+
if (this.added && disabled) {
|
|
23
|
+
(tracker || globalTracker).removeTrackedComponent(this);
|
|
24
|
+
this.added = false;
|
|
25
|
+
}
|
|
26
|
+
else if (!this.added && !disabled) {
|
|
27
|
+
(tracker || globalTracker).addTrackedComponent(this, tag, onRootClose);
|
|
28
|
+
this.added = true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
componentWillUnmount() {
|
|
32
|
+
const { tracker } = this.props;
|
|
33
|
+
if (this.added) {
|
|
34
|
+
(tracker || globalTracker).removeTrackedComponent(this);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return this.props.children;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.RootCloseWrapper = RootCloseWrapper;
|