@ikas/storefront 5.0.24 → 5.0.26
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/build/analytics/analytics.js +1 -1
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/ikasV3.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/adyen/index.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/customer-addresses/style.module.scss.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/form-item/model.d.ts +5 -0
- package/build/components/checkout/components/form-item/model.js +1 -1
- package/build/components/checkout/components/offer-product/select/style.module.scss.js +1 -1
- package/build/components/checkout/components/offer-product/style.module.scss.js +1 -1
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/index.d.ts +1 -0
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +1 -1
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/checkout/steps/step-success/style.module.scss.js +1 -1
- package/build/components/checkout/style.module.scss.js +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/components/popup/renderer/index.js +1 -1
- package/build/components/popup/utils/index.js +1 -1
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/hooks/useStore.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/checkout-settings/index.d.ts +1 -0
- package/build/models/data/checkout-settings/index.js +1 -1
- package/build/models/data/index.d.ts +1 -0
- package/build/models/data/order/line-item/option/value/index.d.ts +2 -1
- package/build/models/data/order/line-item/option/value/index.js +1 -1
- package/build/models/data/order/order-transaction-with-prices/index.d.ts +16 -0
- package/build/models/data/order/order-transaction-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/list-order-transaction-refundable-transaction/index.d.ts +6 -0
- package/build/models/data/order/order-transaction-with-prices/list-order-transaction-refundable-transaction/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/error/index.d.ts +7 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/error/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/index.d.ts +54 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-currency-rate-with-prices/index.d.ts +6 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-currency-rate-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-fee-with-prices/index.d.ts +7 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-fee-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-gift-package-line-item-with-prices/index.d.ts +7 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-gift-package-line-item-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-order-line-item-with-prices/index.d.ts +11 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-order-line-item-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-order-line-item-with-prices/transaction-order-line-variant-with-prices/index.d.ts +11 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-order-line-item-with-prices/transaction-order-line-variant-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-payment-method-detail-with-prices/index.d.ts +14 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-payment-method-detail-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-payment-method-detail-with-prices/transaction-installment-price-with-prices/index.d.ts +9 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-payment-method-detail-with-prices/transaction-installment-price-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-sales-channel-with-prices/index.d.ts +6 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-sales-channel-with-prices/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-shipping-line-item-with-prices/index.d.ts +9 -0
- package/build/models/data/order/order-transaction-with-prices/transaction-with-prices/transaction-shipping-line-item-with-prices/index.js +1 -0
- package/build/models/data/product/attribute-value/index.d.ts +2 -1
- package/build/models/data/product/attribute-value/index.js +1 -1
- package/build/models/data/product/index.d.ts +4 -5
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/option-set/option/index.d.ts +11 -1
- package/build/models/data/product/option-set/option/index.js +1 -1
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/storefront-popup/index.js +1 -1
- package/build/models/data/theme-json/index.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/customer-review-summary-list/index.js +1 -1
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/button-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/divider-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/checkbox-item-view/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/date-item-view/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/gender-item-view/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/image-column-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/social-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/space-element-renderer/index.js +1 -0
- package/build/packages/storefront/ext/@ikas/popup-renderer/build/popup-renderer/components/text-element-renderer/index.js +1 -0
- package/build/page-data-init/index.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/store/blog/index.js +1 -1
- package/build/store/brand/index.js +1 -1
- package/build/store/cart/index.js +1 -1
- package/build/store/category/index.js +1 -1
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/api.d.ts +3 -2
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.d.ts +4 -1
- package/build/store/customer/index.js +1 -1
- package/build/store/html-meta-data/index.js +1 -1
- package/build/store/location/index.js +1 -1
- package/build/store/product/index.js +1 -1
- package/package.json +12 -12
- package/build/analytics/ikas.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/button-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/divider-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/checkbox-item-view/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/date-item-view/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/gender-item-view/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-column-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/social-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/space-element-renderer/index.js +0 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/text-element-renderer/index.js +0 -1
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouType.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeFormatter.util.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeParser.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/AsYouTypeState.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/ParseError.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/PhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/PhoneNumberMatcher.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/constants.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/LRUCache.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/Leniency.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/RegExpCache.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/isValidPreCandidate.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/matchPhoneNumberStringAgainstPhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/parsePreCandidate.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/utf-8.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/findNumbers/util.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/format.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/RFC3966.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/getNumberType.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/isObject.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/mergeArrays.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/parseDigits.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/isPossible.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/isValid.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/isValidPhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/legacy/findPhoneNumbersInitialImplementation.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/metadata.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/normalizeArguments.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/parse.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/parsePhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/parsePhoneNumber_.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/tools/semver-compare.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/metadata.min.json.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/AsYouType.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/Metadata.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/isValidPhoneNumber.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/withMetadataArgument.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/ext/tslib/tslib.es6.mjs.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/assets/left-arrow.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/assets/right-arrow.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/assets/x-close.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/background-settings/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/close-settings/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/base/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/button/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/divider/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/checkbox/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-attribute/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-birthday/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-email/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-gender/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-name/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-phone/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/customer-surname/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/form-settings/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/detail-settings/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/social/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/space/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/text/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/step/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/teaser/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/modal/window-settings/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/settings/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-condition/index.js +0 -0
- /package/build/{ext → packages/storefront/ext}/@ikas/popup-renderer/build/popup-renderer/models/settings/visibility-time/index.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IkasContactForm, IkasCustomer, IkasCustomerAttributeValue, IkasFavoriteProduct, IkasOrderTransaction, IkasProduct, IkasOrder, IkasRaffleParticipant, IkasProductFile } from "../../models/data";
|
|
1
|
+
import { IkasContactForm, IkasCustomer, IkasCustomerAttributeValue, IkasFavoriteProduct, IkasOrderTransaction, IkasOrderTransactionWithPrices, IkasProduct, IkasOrder, IkasRaffleParticipant, IkasProductFile } from "../../models/data";
|
|
2
2
|
import { APIResponse } from "@ikas/fe-api-client";
|
|
3
3
|
import { IkasLoginError, IkasRegisterError } from "@ikas/storefront-api";
|
|
4
4
|
import { IkasBaseStore } from "../base";
|
|
@@ -57,6 +57,9 @@ export declare class IkasCustomerStore {
|
|
|
57
57
|
id?: string;
|
|
58
58
|
orderId?: string;
|
|
59
59
|
}) => Promise<IkasOrderTransaction[]>;
|
|
60
|
+
getOrderTransactionsWithPrices: (params: {
|
|
61
|
+
orderId: string;
|
|
62
|
+
}) => Promise<IkasOrderTransactionWithPrices | null | undefined>;
|
|
60
63
|
getFavoriteProductsIds: () => Promise<IkasFavoriteProduct[]>;
|
|
61
64
|
getFavoriteProducts: () => Promise<IkasProduct[]>;
|
|
62
65
|
addProductToFavorites: (productId: string) => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{makeAutoObservable as i}from"mobx";import s from"lodash/xorBy";import o from"lodash/cloneDeep";import n from"./api.js";import{IkasCustomer as a}from"../../models/data/customer/index.js";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasCustomerEmailSubscriptionStatus as c}from"@ikas/storefront-models";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import{IkasRaffleParticipant as u}from"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import d from"../raffle/index.js";import'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import l from"../product/index.js";import{Analytics as h}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{IkasLoginError as p,IkasRegisterError as f,SaveMyCustomerInput as v}from"@ikas/storefront-api";import{populateRaffleParticipantProducts as g}from"@ikas/storefront-providers";import w from"../checkout/index.js";var k="undefined"==typeof localStorage,b=function(){function b(s){var a=this;this.customer=null,this.token=null,this.tokenExpiry=null,this.baseStore=null,this._initialized=!1,this._visitorSubscribedEmail=!1,this._lastViewedProducts=[],this._customerConsentGranted=!1,this._refundSettings=null,this._captchaToken=null,this._savedLastViewedProducts=[],this._savedLastViewedProductsResponse=null,this.toAnalyticsCustomer=function(t){return r(r({},t),{consentGranted:a._customerConsentGranted})},this.login=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,!0]):[2,!1]}}))}))},this.customerLogin=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(p).includes(t)?t:p.UNKOWN}))}]}}))}))},this.logout=function(){var t;a.clearLocalData(),null===(t=a.baseStore)||void 0===t||t.cartStore.removeCart(),h.customerLogout()},this.register=function(r,i,s,o,c,u,d){return t(a,void 0,void 0,(function(){var t,a;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.register({email:s,password:o,firstName:r,lastName:i,isAcceptMarketing:c,attributes:u,captchaToken:this._captchaToken,phone:d})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&(null===(a=t.data)||void 0===a?void 0:a.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.saveLocalLastViewedProducts(),h.completeRegistration(this.toAnalyticsCustomer(this.customer)),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(f).includes(t)?t:f.UNKOWN}))}]}}))}))},this.activateCustomer=function(){return t(a,void 0,void 0,(function(){var t,r,i;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(r=t.get("token"))?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.activateCustomer({token:r,captchaToken:this._captchaToken})];case 2:return i=e.sent(),this.clearCaptchaToken(),[2,i.isSuccess];case 3:return[2,!1]}}))}))},this.resendCustomerActivationMail=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerActivationMail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess];case 3:return[2,!1]}}))}))},this.validateCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.validateCustomerPhoneVerificationCode({verificationCode:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.resendCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerPhoneVerificationCode({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.saveContactForm=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return h.contactForm(i),[4,this.getCaptcha()];case 1:return e.sent(),[4,n.sendContactFormToMerchant(r(r({},i),{captchaToken:this._captchaToken}))];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.checkEmail=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.checkEmail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&!!(null===(i=t.data)||void 0===i?void 0:i.exists)]}}))}))},this.forgotPassword=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.forgotPassword({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&t.data]}}))}))},this.recoverPassword=function(r,i,s){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.recoverPassword({password:r,passwordAgain:i,token:s,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.saveCustomer=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.saveCustomer({input:new v(r)})];case 1:return(t=e.sent()).isSuccess&&t.data?(this.setCustomer(t.data),[2,!0]):[2,!1]}}))}))},this.getOrders=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getOrders({})];case 1:return[2,t.sent().data||[]]}}))}))},this.getOrder=function(r){return t(a,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrders({orderId:r})];case 1:return(t=e.sent()).isSuccess&&(null===(s=t.data)||void 0===s?void 0:s.length)?(i=t.data[0],[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),i.refundSettings=this._refundSettings,[2,i]}}))}))},this.getOrderByEmail=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrderByEmail({email:r,orderNumber:i})];case 1:return(t=e.sent()).isSuccess&&t.data?(s=t.data,[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),s.refundSettings=this._refundSettings,[2,s]}}))}))},this.getOrderTransactions=function(r){return void 0===r&&(r={}),t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.listOrderTransactions({checkoutId:{eq:r.checkoutId},id:{eq:r.checkoutId},orderId:{eq:r.orderId}})];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProductsIds=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProducts=function(){return t(a,void 0,void 0,(function(){var t,r,i,s,o,a;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return(t=e.sent()).isSuccess&&(null===(i=t.data)||void 0===i?void 0:i.length)?[4,l.searchProducts({input:{productIdList:t.data.map((function(t){return t.productId})),priceListId:m.getPriceListId(),salesChannelId:m.getSalesChannelId(),perPage:100}})]:[2,[]];case 2:return r=e.sent(),null===(o=null===(s=r.data)||void 0===s?void 0:s.data)||void 0===o||o.forEach((function(t){t.selectedVariantValues=t.variants[0].variantValues})),[2,(null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.data)||[]]}}))}))},this.addProductToFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!0,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r),[2,t.data||!1]}}))}))},this.removeProductFromFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!1,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r,!0),[2,t.data||!1]}}))}))},this.isProductFavorite=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(!(null===(t=this.customer)||void 0===t?void 0:t.id))throw Error("Unauthorized");return[4,n.isFavoriteProduct({productId:r})];case 1:return[2,e.sent().data||!1]}}))}))},this.createEmailSubscription=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.subscribeToMarketingNotifications({input:{email:r,captchaToken:this._captchaToken}})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(r)),[2,t.isSuccess]}}))}))},this.saveCustomerFormData=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.saveCustomerFormData({input:r(r({},i),{captchaToken:this._captchaToken})})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(i.email)),[2,t.isSuccess]}}))}))},this.sendReview=function(i){return t(a,void 0,void 0,(function(){var t,s,o,a,c;return e(this,(function(e){switch(e.label){case 0:if(t=m.getCustomerReviewSettings(),s=m.getSalesChannelId(),o=m.getCurrentLocale(),!t)return[2];if(!(a=null===(c=this.customer)||void 0===c?void 0:c.id)&&t.customerLoginRequired)throw Error("Unauthorized");return[4,n.createCustomerReview({input:r(r({},i),{customerId:t.customerLoginRequired?a:void 0,salesChannelId:s||"",locale:o})})];case 1:return[2,e.sent().data]}}))}))},this.deactivateCustomer=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.deactivateCustomer({password:r})]:[3,2];case 1:return[2,t.sent()];case 2:return[2]}}))}))},this.exportCustomerPersonalData=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.exportCustomerPersonelData()]:[3,2];case 1:return[2,t.sent()];case 2:return[2]}}))}))},this.onCustomerConsentGrant=function(){a.saveCustomerConsent()},this.waitUntilInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a.initialized&&(clearInterval(e),t(null))}),100)}))},this.waitUntilCaptchaTokenInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a._captchaToken&&(clearInterval(e),t(null))}),100)}))},this.getRaffles=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,d.listRaffleParticipants()];case 1:return(t=e.sent())&&t.data?[4,g(t.data)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2,null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new u(t)}))]}}))}))},this.getCustomerAttributes=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,n.listCustomerAttribute()];case 1:return t=e.sent(),this.customer&&(null===(r=this.customer.attributes)||void 0===r||r.forEach((function(e){var r,i,s;e.customerAttribute=(null===(r=t.data)||void 0===r?void 0:r.find((function(t){return t.id===e.customerAttributeId})))||null,e.customerAttributeOptionId&&(e.customerAttributeOption=(null===(s=null===(i=e.customerAttribute)||void 0===i?void 0:i.options)||void 0===s?void 0:s.find((function(t){return t.id===e.customerAttributeOptionId})))||null)}))),[2,t.data||[]]}}))}))},this.getOrderProductFiles=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return r.length?[4,w.listProductFile({id:{in:r}})]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getDigitalProductFileDownloadUrl=function(r,i){return t(a,void 0,void 0,(function(){var t,s,o,n,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(t=r.orderLineItems.find((function(t){return t.variant.id===i.variantId})))?[4,w.getDigitalProductFileDownloadUrl({orderId:r.id,orderLineItemId:t.id})]:[3,2];case 1:s=e.sent(),(o=s.data)&&((n=document.createElement("a")).href=o,n.download=decodeURIComponent(i.name.split("/")[i.name.split("/").length-1])||"",n.click(),n.remove()),e.label=2;case 2:return[3,4];case 3:return a=e.sent(),console.error(a),[3,4];case 4:return[2]}}))}))},this.getOrderRefundSettings=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return this._refundSettings?[3,2]:[4,n.listOrderRefundSettings({})];case 1:(t=e.sent()).isSuccess&&(null===(r=t.data)||void 0===r?void 0:r.length)&&(this._refundSettings=t.data[0]),e.label=2;case 2:return[2]}}))}))},this.setSavedLastViewedProductsResponse=function(t){a._savedLastViewedProducts=o(a._lastViewedProducts),a._savedLastViewedProductsResponse=t},this.setCaptchaToken=function(t){a._captchaToken=t},this.baseStore=s,i(this)}return Object.defineProperty(b.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"canCreateEmailSubscription",{get:function(){var t;return!((null===(t=this.customer)||void 0===t?void 0:t.isSubscribed)||k||this._visitorSubscribedEmail)&&!window.localStorage.getItem("customerEmailSubscription")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"customerConsentGranted",{get:function(){return this._customerConsentGranted},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isCaptchaRequired",{get:function(){var t;return(null===(t=m.getCustomerSettings())||void 0===t?void 0:t.requireCaptchaValidation)||!1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"useLastViewedProductResponse",{get:function(){var t;return(null===(t=this._savedLastViewedProducts)||void 0===t?void 0:t.length)&&this._savedLastViewedProductsResponse&&0===s(this._lastViewedProducts,this._savedLastViewedProducts,"productId").length},enumerable:!1,configurable:!0}),b.prototype.socialLogin=function(r){return t(this,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return"undefined"==typeof window?[2]:(t=new URLSearchParams(window.location.search).get("redirect")||"",i="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/ms/").concat(r,"/login/authenticate?redirect=").concat(t),[4,fetch(i,{headers:{"x-api-key":m.getApiKey()||"","x-sfid":m.getStorefrontId()||"","x-sfrid":m.getStorefrontRoutingId()||""}})]);case 1:return[4,e.sent().json()];case 2:return s=e.sent(),window.location.href=s.redirectUrl,[2]}}))}))},b.prototype.socialLoginToken=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.socialLogin({code:r})];case 1:return(null==(t=e.sent())?void 0:t.isSuccess)&&(null===(i=t.data)||void 0===i?void 0:i.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.customer&&h.customerLogin(),[2,!0]):[2,!1]}}))}))},b.prototype.refundOrder=function(r,i){return t(this,void 0,void 0,(function(){var t,s,o=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=[],r.orderLineItems.map((function(e){null!==e.refundQuantity&&(null==t||t.push({orderLineItemId:e.id,quantity:e.refundQuantity?e.refundQuantity:0}))})),[4,n.createOrderRefundRequest({input:{email:i,orderId:r.id,orderLineItems:t}})];case 1:return(s=e.sent()).isSuccess&&s.data?(Object.entries(s.data).forEach((function(t){var e=t[0],r=t[1];o[e]=r})),[2,!0]):[3,3];case 2:return e.sent(),[3,3];case 3:return[2,!1]}}))}))},b.prototype.init=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.loadToken(),this.loadLastViewedProducts(),this.loadCustomerConsent(),[4,this.refreshToken()];case 1:return t.sent(),[4,this.getCustomer()];case 2:return t.sent(),this._initialized=!0,this.customer&&h.customerVisit(),[2]}}))}))},b.prototype.routeChangeInit=function(){this.loadToken(),!this.token&&this.customer&&this.clearLocalData(),this.token&&!this.customer&&this.getCustomer()},b.prototype.getCustomer=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return k||!this.token?[2]:[4,n.getCustomer()];case 1:return(t=e.sent()).data&&this.setCustomer(t.data),[2]}}))}))},b.prototype.refreshToken=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.token?[4,n.refreshToken({token:this.token})]:[2];case 1:return(t=e.sent()).isSuccess&&t.data?this.setToken(t.data.token,t.data.tokenExpiry):(this.token=null,this.tokenExpiry=null,this.clearLocalData()),[2]}}))}))},b.prototype.setCustomer=function(t){this.customer=new a(t)},b.prototype.getLastViewedProducts=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.getLastViewedProducts({customerId:this.customer.id})]:[3,2];case 1:return t=e.sent(),this._lastViewedProducts=(null===(r=o(t.data))||void 0===r?void 0:r.reverse())||[],[3,3];case 2:this.loadLastViewedProducts(),e.label=3;case 3:return[2,this._lastViewedProducts]}}))}))},b.prototype.saveLastViewedProducts=function(){k||window.localStorage.setItem("lastViewedProducts",JSON.stringify(this._lastViewedProducts))},b.prototype.loadLastViewedProducts=function(){k||(this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=o(this._lastViewedProducts).reverse())},b.prototype.getLocalLastViewedProducts=function(){if(k)return[];try{var t=window.localStorage.getItem("lastViewedProducts");if(t)return JSON.parse(t)}catch(t){}return[]},b.prototype.removeLastViewedProducts=function(){k||window.localStorage.removeItem("lastViewedProducts")},b.prototype.onProductView=function(r,i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?this._lastViewedProducts.find((function(t){return t.productId===r}))?[2]:[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:[{productId:r,variantId:i}]}})]:[3,2];case 1:return t.sent()&&this._lastViewedProducts.push({productId:r,variantId:i}),[3,3];case 2:this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=this._lastViewedProducts.filter((function(t){return t.productId!==r})),this._lastViewedProducts.push({productId:r,variantId:i}),this._lastViewedProducts=this._lastViewedProducts.slice(-20),this.saveLastViewedProducts(),t.label=3;case 3:return[2]}}))}))},b.prototype.saveLocalLastViewedProducts=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(k)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),(t=this.getLocalLastViewedProducts()).length?[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:t}})]:[3,3];case 2:e.sent()&&this.removeLastViewedProducts(),e.label=3;case 3:return[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},b.prototype.saveCustomerConsent=function(){k||(this._customerConsentGranted=!0,window.localStorage.setItem("customerConsent","true"))},b.prototype.loadCustomerConsent=function(){k||(this._customerConsentGranted=!!window.localStorage.getItem("customerConsent"))},b.prototype.removeCustomerConsent=function(){k||window.localStorage.removeItem("customerConsent")},b.prototype.setToken=function(t,e){k||(this.token=t,this.tokenExpiry=e,localStorage.setItem("customerToken",t),localStorage.setItem("customerTokenExpiry",e+""),m.init({customerToken:t}))},b.prototype.loadToken=function(){if(!k){var t=localStorage.getItem("customerToken"),e=localStorage.getItem("customerTokenExpiry");t&&e?this.setToken(t,parseInt(e)):this.clearLocalTokenData()}},b.prototype.clearLocalTokenData=function(){localStorage.removeItem("customerToken"),localStorage.removeItem("customerTokenExpiry"),this.token=void 0,this.tokenExpiry=void 0},b.prototype.clearLocalData=function(){this.clearLocalTokenData(),this.customer=void 0,m.init({customerToken:""}),this.clearCaptchaToken()},b.prototype.clearCaptchaToken=function(){this._captchaToken=null},b.prototype.getCaptcha=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),this.isCaptchaRequired?(window.grecaptcha.execute(),[4,this.waitUntilCaptchaTokenInitialized()]):[3,2];case 1:e.sent(),window.grecaptcha.reset(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.log("Get captcha error",t),[3,4];case 4:return[2]}}))}))},b}();export{b as IkasCustomerStore};
|
|
1
|
+
import{__awaiter as t,__generator as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{makeAutoObservable as i}from"mobx";import s from"lodash/xorBy";import o from"lodash/cloneDeep";import n from"./api.js";import{IkasCustomer as a}from"../../models/data/customer/index.js";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import{IkasCustomerEmailSubscriptionStatus as c}from"@ikas/storefront-models";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import{IkasRaffleParticipant as u}from"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import d from"../raffle/index.js";import'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import l from"../product/index.js";import{Analytics as h}from"../../analytics/analytics.js";import"../../analytics/head/index.js";import{IkasStorefrontConfig as m}from"@ikas/storefront-config";import{IkasLoginError as p,IkasRegisterError as f,SaveMyCustomerInput as v}from"@ikas/storefront-api";import{populateRaffleParticipantProducts as g}from"@ikas/storefront-providers";import w from"../checkout/index.js";var k="undefined"==typeof localStorage,b=function(){function b(s){var a=this;this.customer=null,this.token=null,this.tokenExpiry=null,this.baseStore=null,this._initialized=!1,this._visitorSubscribedEmail=!1,this._lastViewedProducts=[],this._customerConsentGranted=!1,this._refundSettings=null,this._captchaToken=null,this._savedLastViewedProducts=[],this._savedLastViewedProductsResponse=null,this.toAnalyticsCustomer=function(t){return r(r({},t),{consentGranted:a._customerConsentGranted})},this.login=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,!0]):[2,!1]}}))}))},this.customerLogin=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.login({email:r,password:i,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&t.data?(s=t.data,this.setToken(s.token,s.tokenExpiry),s.customer&&this.setCustomer(s.customer),this.customer&&h.customerLogin(),this.saveLocalLastViewedProducts(),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(p).includes(t)?t:p.UNKOWN}))}]}}))}))},this.logout=function(){var t;a.clearLocalData(),null===(t=a.baseStore)||void 0===t||t.cartStore.removeCart(),h.customerLogout()},this.register=function(r,i,s,o,c,u,d){return t(a,void 0,void 0,(function(){var t,a;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.register({email:s,password:o,firstName:r,lastName:i,isAcceptMarketing:c,attributes:u,captchaToken:this._captchaToken,phone:d})];case 2:return t=e.sent(),this.clearCaptchaToken(),t&&t.isSuccess&&(null===(a=t.data)||void 0===a?void 0:a.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.saveLocalLastViewedProducts(),h.completeRegistration(this.toAnalyticsCustomer(this.customer)),[2,{isSuccess:!0,errorCodes:[]}]):[2,{isSuccess:!1,errorCodes:t.errorCodes.map((function(t){return Object.values(f).includes(t)?t:f.UNKOWN}))}]}}))}))},this.activateCustomer=function(){return t(a,void 0,void 0,(function(){var t,r,i;return e(this,(function(e){switch(e.label){case 0:return t=new URLSearchParams(window.location.search),(r=t.get("token"))?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.activateCustomer({token:r,captchaToken:this._captchaToken})];case 2:return i=e.sent(),this.clearCaptchaToken(),[2,i.isSuccess];case 3:return[2,!1]}}))}))},this.resendCustomerActivationMail=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerActivationMail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess];case 3:return[2,!1]}}))}))},this.validateCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.validateCustomerPhoneVerificationCode({verificationCode:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.resendCustomerPhoneVerificationCode=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[4,this.getCaptcha()]:[3,3];case 1:return e.sent(),[4,n.resendCustomerPhoneVerificationCode({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!(!t.isSuccess||!t.data)&&t.data];case 3:return[2,!1]}}))}))},this.saveContactForm=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return h.contactForm(i),[4,this.getCaptcha()];case 1:return e.sent(),[4,n.sendContactFormToMerchant(r(r({},i),{captchaToken:this._captchaToken}))];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.checkEmail=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.checkEmail({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&!!(null===(i=t.data)||void 0===i?void 0:i.exists)]}}))}))},this.forgotPassword=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.forgotPassword({email:r,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,!!t.isSuccess&&t.data]}}))}))},this.recoverPassword=function(r,i,s){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.recoverPassword({password:r,passwordAgain:i,token:s,captchaToken:this._captchaToken})];case 2:return t=e.sent(),this.clearCaptchaToken(),[2,t.isSuccess]}}))}))},this.saveCustomer=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.saveCustomer({input:new v(r)})];case 1:return(t=e.sent()).isSuccess&&t.data?(this.setCustomer(t.data),[2,!0]):[2,!1]}}))}))},this.getOrders=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.getOrders({})];case 1:return[2,t.sent().data||[]]}}))}))},this.getOrder=function(r){return t(a,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrders({orderId:r})];case 1:return(t=e.sent()).isSuccess&&(null===(s=t.data)||void 0===s?void 0:s.length)?(i=t.data[0],[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),i.refundSettings=this._refundSettings,[2,i]}}))}))},this.getOrderByEmail=function(r,i){return t(a,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return[4,n.getOrderByEmail({email:r,orderNumber:i})];case 1:return(t=e.sent()).isSuccess&&t.data?(s=t.data,[4,this.getOrderRefundSettings()]):[2,null];case 2:return e.sent(),s.refundSettings=this._refundSettings,[2,s]}}))}))},this.getOrderTransactions=function(r){return void 0===r&&(r={}),t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.listOrderTransactions({checkoutId:{eq:r.checkoutId},id:{eq:r.checkoutId},orderId:{eq:r.orderId}})];case 1:return[2,t.sent().data||[]]}}))}))},this.getOrderTransactionsWithPrices=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,n.listOrderTransactionsWithPrices({input:{orderId:r.orderId}})];case 1:return[2,t.sent().data]}}))}))},this.getFavoriteProductsIds=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getFavoriteProducts=function(){return t(a,void 0,void 0,(function(){var t,r,i,s,o,a;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.listFavoriteProducts()]:[2,[]];case 1:return(t=e.sent()).isSuccess&&(null===(i=t.data)||void 0===i?void 0:i.length)?[4,l.searchProducts({input:{productIdList:t.data.map((function(t){return t.productId})),priceListId:m.getPriceListId(),salesChannelId:m.getSalesChannelId(),perPage:100}})]:[2,[]];case 2:return r=e.sent(),null===(o=null===(s=r.data)||void 0===s?void 0:s.data)||void 0===o||o.forEach((function(t){t.selectedVariantValues=t.variants[0].variantValues})),[2,(null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.data)||[]]}}))}))},this.addProductToFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!0,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r),[2,t.data||!1]}}))}))},this.removeProductFromFavorites=function(r){return t(a,void 0,void 0,(function(){var t,i;return e(this,(function(e){switch(e.label){case 0:if(!(null===(i=this.customer)||void 0===i?void 0:i.id))throw Error("Unauthorized");return[4,n.saveFavoriteProduct({isFavorite:!1,productId:r})];case 1:return t=e.sent(),h.addToWishlist(r,!0),[2,t.data||!1]}}))}))},this.isProductFavorite=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(!(null===(t=this.customer)||void 0===t?void 0:t.id))throw Error("Unauthorized");return[4,n.isFavoriteProduct({productId:r})];case 1:return[2,e.sent().data||!1]}}))}))},this.createEmailSubscription=function(r){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.subscribeToMarketingNotifications({input:{email:r,captchaToken:this._captchaToken}})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(r)),[2,t.isSuccess]}}))}))},this.saveCustomerFormData=function(i){return t(a,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,this.getCaptcha()];case 1:return e.sent(),[4,n.saveCustomerFormData({input:r(r({},i),{captchaToken:this._captchaToken})})];case 2:return(t=e.sent()).isSuccess&&(window.localStorage.setItem("customerEmailSubscription","true"),this.customer?(this.customer.subscriptionStatus,c.SUBSCRIBED):this._visitorSubscribedEmail=!0,h.createEmailSubscripition(i.email)),[2,t.isSuccess]}}))}))},this.sendReview=function(i){return t(a,void 0,void 0,(function(){var t,s,o,a,c;return e(this,(function(e){switch(e.label){case 0:if(t=m.getCustomerReviewSettings(),s=m.getSalesChannelId(),o=m.getCurrentLocale(),!t)return[2];if(!(a=null===(c=this.customer)||void 0===c?void 0:c.id)&&t.customerLoginRequired)throw Error("Unauthorized");return[4,n.createCustomerReview({input:r(r({},i),{customerId:t.customerLoginRequired?a:void 0,salesChannelId:s||"",locale:o})})];case 1:return[2,e.sent().data]}}))}))},this.deactivateCustomer=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.deactivateCustomer({password:r})]:[3,2];case 1:return[2,t.sent()];case 2:return[2]}}))}))},this.exportCustomerPersonalData=function(){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?[4,n.exportCustomerPersonelData()]:[3,2];case 1:return[2,t.sent()];case 2:return[2]}}))}))},this.onCustomerConsentGrant=function(){a.saveCustomerConsent()},this.waitUntilInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a.initialized&&(clearInterval(e),t(null))}),100)}))},this.waitUntilCaptchaTokenInitialized=function(){return new Promise((function(t){var e=setInterval((function(){a._captchaToken&&(clearInterval(e),t(null))}),100)}))},this.getRaffles=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,d.listRaffleParticipants()];case 1:return(t=e.sent())&&t.data?[4,g(t.data)]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2,null===(r=t.data)||void 0===r?void 0:r.map((function(t){return new u(t)}))]}}))}))},this.getCustomerAttributes=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return[4,n.listCustomerAttribute()];case 1:return t=e.sent(),this.customer&&(null===(r=this.customer.attributes)||void 0===r||r.forEach((function(e){var r,i,s;e.customerAttribute=(null===(r=t.data)||void 0===r?void 0:r.find((function(t){return t.id===e.customerAttributeId})))||null,e.customerAttributeOptionId&&(e.customerAttributeOption=(null===(s=null===(i=e.customerAttribute)||void 0===i?void 0:i.options)||void 0===s?void 0:s.find((function(t){return t.id===e.customerAttributeOptionId})))||null)}))),[2,t.data||[]]}}))}))},this.getOrderProductFiles=function(r){return t(a,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return r.length?[4,w.listProductFile({id:{in:r}})]:[2,[]];case 1:return[2,t.sent().data||[]]}}))}))},this.getDigitalProductFileDownloadUrl=function(r,i){return t(a,void 0,void 0,(function(){var t,s,o,n,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),(t=r.orderLineItems.find((function(t){return t.variant.id===i.variantId})))?[4,w.getDigitalProductFileDownloadUrl({orderId:r.id,orderLineItemId:t.id})]:[3,2];case 1:s=e.sent(),(o=s.data)&&((n=document.createElement("a")).href=o,n.download=decodeURIComponent(i.name.split("/")[i.name.split("/").length-1])||"",n.click(),n.remove()),e.label=2;case 2:return[3,4];case 3:return a=e.sent(),console.error(a),[3,4];case 4:return[2]}}))}))},this.getOrderRefundSettings=function(){return t(a,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return this._refundSettings?[3,2]:[4,n.listOrderRefundSettings({})];case 1:(t=e.sent()).isSuccess&&(null===(r=t.data)||void 0===r?void 0:r.length)&&(this._refundSettings=t.data[0]),e.label=2;case 2:return[2]}}))}))},this.setSavedLastViewedProductsResponse=function(t){a._savedLastViewedProducts=o(a._lastViewedProducts),a._savedLastViewedProductsResponse=t},this.setCaptchaToken=function(t){a._captchaToken=t},this.baseStore=s,i(this)}return Object.defineProperty(b.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"canCreateEmailSubscription",{get:function(){var t;return!((null===(t=this.customer)||void 0===t?void 0:t.isSubscribed)||k||this._visitorSubscribedEmail)&&!window.localStorage.getItem("customerEmailSubscription")},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"customerConsentGranted",{get:function(){return this._customerConsentGranted},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"isCaptchaRequired",{get:function(){var t;return(null===(t=m.getCustomerSettings())||void 0===t?void 0:t.requireCaptchaValidation)||!1},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"useLastViewedProductResponse",{get:function(){var t;return(null===(t=this._savedLastViewedProducts)||void 0===t?void 0:t.length)&&this._savedLastViewedProductsResponse&&0===s(this._lastViewedProducts,this._savedLastViewedProducts,"productId").length},enumerable:!1,configurable:!0}),b.prototype.socialLogin=function(r){return t(this,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return"undefined"==typeof window?[2]:(t=new URLSearchParams(window.location.search).get("redirect")||"",i="".concat(process.env.NEXT_PUBLIC_BASE_URL,"/ms/").concat(r,"/login/authenticate?redirect=").concat(t),[4,fetch(i,{headers:{"x-api-key":m.getApiKey()||"","x-sfid":m.getStorefrontId()||"","x-sfrid":m.getStorefrontRoutingId()||""}})]);case 1:return[4,e.sent().json()];case 2:return s=e.sent(),window.location.href=s.redirectUrl,[2]}}))}))},b.prototype.socialLoginToken=function(r){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n.socialLogin({code:r})];case 1:return(null==(t=e.sent())?void 0:t.isSuccess)&&(null===(i=t.data)||void 0===i?void 0:i.customer)?(this.setToken(t.data.token,t.data.tokenExpiry),this.setCustomer(t.data.customer),this.customer&&h.customerLogin(),[2,!0]):[2,!1]}}))}))},b.prototype.refundOrder=function(r,i){return t(this,void 0,void 0,(function(){var t,s,o=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),t=[],r.orderLineItems.map((function(e){null!==e.refundQuantity&&(null==t||t.push({orderLineItemId:e.id,quantity:e.refundQuantity?e.refundQuantity:0}))})),[4,n.createOrderRefundRequest({input:{email:i,orderId:r.id,orderLineItems:t}})];case 1:return(s=e.sent()).isSuccess&&s.data?(Object.entries(s.data).forEach((function(t){var e=t[0],r=t[1];o[e]=r})),[2,!0]):[3,3];case 2:return e.sent(),[3,3];case 3:return[2,!1]}}))}))},b.prototype.init=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.loadToken(),this.loadLastViewedProducts(),this.loadCustomerConsent(),[4,this.refreshToken()];case 1:return t.sent(),[4,this.getCustomer()];case 2:return t.sent(),this._initialized=!0,this.customer&&h.customerVisit(),[2]}}))}))},b.prototype.routeChangeInit=function(){this.loadToken(),!this.token&&this.customer&&this.clearLocalData(),this.token&&!this.customer&&this.getCustomer()},b.prototype.getCustomer=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return k||!this.token?[2]:[4,n.getCustomer()];case 1:return(t=e.sent()).data&&this.setCustomer(t.data),[2]}}))}))},b.prototype.refreshToken=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.token?[4,n.refreshToken({token:this.token})]:[2];case 1:return(t=e.sent()).isSuccess&&t.data?this.setToken(t.data.token,t.data.tokenExpiry):(this.token=null,this.tokenExpiry=null,this.clearLocalData()),[2]}}))}))},b.prototype.setCustomer=function(t){this.customer=new a(t)},b.prototype.getLastViewedProducts=function(){var r;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return this.customer?[4,n.getLastViewedProducts({customerId:this.customer.id})]:[3,2];case 1:return t=e.sent(),this._lastViewedProducts=(null===(r=o(t.data))||void 0===r?void 0:r.reverse())||[],[3,3];case 2:this.loadLastViewedProducts(),e.label=3;case 3:return[2,this._lastViewedProducts]}}))}))},b.prototype.saveLastViewedProducts=function(){k||window.localStorage.setItem("lastViewedProducts",JSON.stringify(this._lastViewedProducts))},b.prototype.loadLastViewedProducts=function(){k||(this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=o(this._lastViewedProducts).reverse())},b.prototype.getLocalLastViewedProducts=function(){if(k)return[];try{var t=window.localStorage.getItem("lastViewedProducts");if(t)return JSON.parse(t)}catch(t){}return[]},b.prototype.removeLastViewedProducts=function(){k||window.localStorage.removeItem("lastViewedProducts")},b.prototype.onProductView=function(r,i){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return this.customer?this._lastViewedProducts.find((function(t){return t.productId===r}))?[2]:[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:[{productId:r,variantId:i}]}})]:[3,2];case 1:return t.sent()&&this._lastViewedProducts.push({productId:r,variantId:i}),[3,3];case 2:this._lastViewedProducts=this.getLocalLastViewedProducts(),this._lastViewedProducts=this._lastViewedProducts.filter((function(t){return t.productId!==r})),this._lastViewedProducts.push({productId:r,variantId:i}),this._lastViewedProducts=this._lastViewedProducts.slice(-20),this.saveLastViewedProducts(),t.label=3;case 3:return[2]}}))}))},b.prototype.saveLocalLastViewedProducts=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:if(k)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),(t=this.getLocalLastViewedProducts()).length?[4,n.saveLastViewedProducts({input:{customerId:this.customer.id,products:t}})]:[3,3];case 2:e.sent()&&this.removeLastViewedProducts(),e.label=3;case 3:return[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},b.prototype.saveCustomerConsent=function(){k||(this._customerConsentGranted=!0,window.localStorage.setItem("customerConsent","true"))},b.prototype.loadCustomerConsent=function(){k||(this._customerConsentGranted=!!window.localStorage.getItem("customerConsent"))},b.prototype.removeCustomerConsent=function(){k||window.localStorage.removeItem("customerConsent")},b.prototype.setToken=function(t,e){k||(this.token=t,this.tokenExpiry=e,localStorage.setItem("customerToken",t),localStorage.setItem("customerTokenExpiry",e+""),m.init({customerToken:t}))},b.prototype.loadToken=function(){if(!k){var t=localStorage.getItem("customerToken"),e=localStorage.getItem("customerTokenExpiry");t&&e?this.setToken(t,parseInt(e)):this.clearLocalTokenData()}},b.prototype.clearLocalTokenData=function(){localStorage.removeItem("customerToken"),localStorage.removeItem("customerTokenExpiry"),this.token=void 0,this.tokenExpiry=void 0},b.prototype.clearLocalData=function(){this.clearLocalTokenData(),this.customer=void 0,m.init({customerToken:""}),this.clearCaptchaToken()},b.prototype.clearCaptchaToken=function(){this._captchaToken=null},b.prototype.getCaptcha=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),this.isCaptchaRequired?(window.grecaptcha.execute(),[4,this.waitUntilCaptchaTokenInitialized()]):[3,2];case 1:e.sent(),window.grecaptcha.reset(),e.label=2;case 2:return[3,4];case 3:return t=e.sent(),console.log("Get captcha error",t),[3,4];case 4:return[2]}}))}))},b}();export{b as IkasCustomerStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as o}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{listHTMLMetaData as d}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import{IkasHTMLMetaData as
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as o}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{listHTMLMetaData as d}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import{IkasHTMLMetaData as i}from"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var a=function(){function a(){}return a.listHTMLMetaData=function(a){var s;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(a)];case 1:return t=e.sent(),[2,new o(null===(s=t.data)||void 0===s?void 0:s.map((function(t){return new i(t)})),t.graphQLErrors)]}}))}))},a}();export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{getMyCountry as o,APIResponse as r,listCountry as i,listCity as d,listDistrict as a,listState as s,getAvailableShippingZones as n}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import{IkasCity as m}from"../../models/data/city/index.js";import{IkasCountry as p}from"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import{IkasDistrict as l}from"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import{IkasState as u}from"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var c=function(){function c(){}return c.getMyCountry=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,o()];case 1:return[2,t.sent()]}}))}))},c.listCountry=function(o){var d;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,i(o)];case 1:return t=e.sent(),[2,new r(null===(d=t.data)||void 0===d?void 0:d.map((function(t){return new p(t)})),t.graphQLErrors)]}}))}))},c.listCity=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new m(t)})),t.graphQLErrors)]}}))}))},c.listDistrict=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new l(t)})),t.graphQLErrors)]}}))}))},c.listState=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new u(t)})),t.graphQLErrors)]}}))}))},c.getAvailableShippingZones=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return t})),t.graphQLErrors)]}}))}))},c}();export{c as default};
|
|
1
|
+
import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{getMyCountry as o,APIResponse as r,listCountry as i,listCity as d,listDistrict as a,listState as s,getAvailableShippingZones as n}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import{IkasCity as m}from"../../models/data/city/index.js";import{IkasCountry as p}from"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import{IkasDistrict as l}from"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import{IkasState as u}from"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var c=function(){function c(){}return c.getMyCountry=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,o()];case 1:return[2,t.sent()]}}))}))},c.listCountry=function(o){var d;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,i(o)];case 1:return t=e.sent(),[2,new r(null===(d=t.data)||void 0===d?void 0:d.map((function(t){return new p(t)})),t.graphQLErrors)]}}))}))},c.listCity=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,d(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new m(t)})),t.graphQLErrors)]}}))}))},c.listDistrict=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new l(t)})),t.graphQLErrors)]}}))}))},c.listState=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return new u(t)})),t.graphQLErrors)]}}))}))},c.getAvailableShippingZones=function(o){var i;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n(o)];case 1:return t=e.sent(),[2,new r(null===(i=t.data)||void 0===i?void 0:i.map((function(t){return t})),t.graphQLErrors)]}}))}))},c}();export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as o,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{listProductBackInStockRemind as e,saveProductBackInStockRemind as i,APIResponse as a,searchProducts as d,getProductFilterData as s,getRelatedProducts as n,getSuggestedProducts as m,listProductAttribute as u,getProductCampaigns as l,getVariantStockLocations as p,getOrderLineFile as c,listProductOptionSet as f,listCampaignOffer as v}from"@ikas/storefront-api";import{IkasProduct as j}from"../../models/data/product/index.js";import{IkasProductAttribute as x}from"../../models/data/product/attribute/index.js";import{IkasProductCampaign as
|
|
1
|
+
import{__awaiter as t,__generator as o,__assign as r}from'./../../ext/tslib/tslib.es6.js';import{listProductBackInStockRemind as e,saveProductBackInStockRemind as i,APIResponse as a,searchProducts as d,getProductFilterData as s,getRelatedProducts as n,getSuggestedProducts as m,listProductAttribute as u,getProductCampaigns as l,getVariantStockLocations as p,getOrderLineFile as c,listProductOptionSet as f,listCampaignOffer as v}from"@ikas/storefront-api";import{IkasProduct as j}from"../../models/data/product/index.js";import{IkasProductAttribute as x}from"../../models/data/product/attribute/index.js";import{IkasProductCampaign as h}from"../../models/data/product/campaign/index.js";import{IkasProductFilter as g}from"../../models/data/product/filter/index.js";import{IkasProductOptionSet as w}from"../../models/data/product/option-set/index.js";import{IkasFilterCategory as b}from"../../models/data/filter-category/index.js";import{IkasStorefrontConfig as y}from"@ikas/storefront-config";import{IkasProductStockLocations as k}from"../../models/data/product/stock-location/index.js";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import{IkasCampaignOffer as L}from"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/ikas-address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";var P=function(){function P(){}return P.listProductBackInStockRemind=function(r){return t(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,e(r)];case 1:return[2,t.sent()]}}))}))},P.saveProductBackInStockRemind=function(r){return t(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,i(r)];case 1:return[2,t.sent()]}}))}))},P.searchProducts=function(e,i){var s,n;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,d(e,i)];case 1:return t=o.sent(),[2,new a(r(r({locale:y.getCurrentLocale()},t.data),{data:null===(n=null===(s=t.data)||void 0===s?void 0:s.data)||void 0===n?void 0:n.map((function(t){return new j(t)}))}))]}}))}))},P.getProductFilterData=function(r){var e;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,s(r)];case 1:return t=o.sent(),[2,new a(t.data?{filters:t.data.filters.map((function(t){return new g(t)})),categories:null===(e=t.data.categories)||void 0===e?void 0:e.map((function(t){return new b(t)})),disabledSortTypes:t.data.disabledSortTypes}:null,t.graphQLErrors)]}}))}))},P.getRelatedProducts=function(e){var i,d;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,n(e)];case 1:return t=o.sent(),[2,new a(r(r({},t.data),{data:null===(d=null===(i=t.data)||void 0===i?void 0:i.data)||void 0===d?void 0:d.map((function(t){return new j(t)}))}),t.graphQLErrors)]}}))}))},P.getSuggestedProducts=function(e){var i,d;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,m(e)];case 1:return t=o.sent(),[2,new a(r(r({},t.data),{data:null===(d=null===(i=t.data)||void 0===i?void 0:i.data)||void 0===d?void 0:d.map((function(t){return new j(t)}))}),t.graphQLErrors)]}}))}))},P.listProductAttribute=function(r){var e;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,u(r)];case 1:return t=o.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new x(t)})),t.graphQLErrors)]}}))}))},P.getProductCampaigns=function(r){var e;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,l(r)];case 1:return t=o.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new h(t)})),t.graphQLErrors)]}}))}))},P.getVariantStockLocations=function(r){var e;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,p(r)];case 1:return t=o.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new k(t)})),t.graphQLErrors)]}}))}))},P.getOrderLineFile=function(r){return t(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},P.listProductOptionSet=function(r){var e;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,f(r)];case 1:return t=o.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new w(t)})),t.graphQLErrors)]}}))}))},P.listCampaignOffer=function(r){var e;return t(this,void 0,void 0,(function(){var t;return o(this,(function(o){switch(o.label){case 0:return[4,v(r)];case 1:return t=o.sent(),[2,new a(null===(e=t.data)||void 0===e?void 0:e.map((function(t){return new L(t)})),t.graphQLErrors)]}}))}))},P}();export{P as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.26",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"swiper": "11.0.6"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@ikas/storefront-api": "^5.0.
|
|
25
|
-
"@ikas/storefront-config": "^5.0.
|
|
26
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
27
|
-
"@ikas/storefront-models": "^5.0.
|
|
28
|
-
"@ikas/storefront-providers": "^5.0.
|
|
29
|
-
"@ikas/localized-address": "1.0.0-beta.
|
|
24
|
+
"@ikas/storefront-api": "^5.0.26",
|
|
25
|
+
"@ikas/storefront-config": "^5.0.26",
|
|
26
|
+
"@ikas/storefront-model-functions": "^5.0.26",
|
|
27
|
+
"@ikas/storefront-models": "^5.0.26",
|
|
28
|
+
"@ikas/storefront-providers": "^5.0.26",
|
|
29
|
+
"@ikas/localized-address": "1.0.0-beta.6",
|
|
30
30
|
"@adyen/adyen-web": "^5.57.0",
|
|
31
31
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
32
32
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@ikas/localized-address": "1.0.0-beta.4",
|
|
63
|
-
"@ikas/storefront-api": "^5.0.
|
|
64
|
-
"@ikas/storefront-config": "^5.0.
|
|
65
|
-
"@ikas/storefront-model-functions": "^5.0.
|
|
66
|
-
"@ikas/storefront-models": "^5.0.
|
|
67
|
-
"@ikas/storefront-providers": "^5.0.
|
|
63
|
+
"@ikas/storefront-api": "^5.0.26",
|
|
64
|
+
"@ikas/storefront-config": "^5.0.26",
|
|
65
|
+
"@ikas/storefront-model-functions": "^5.0.26",
|
|
66
|
+
"@ikas/storefront-models": "^5.0.26",
|
|
67
|
+
"@ikas/storefront-providers": "^5.0.26",
|
|
68
68
|
"mobx": "^6.1.3",
|
|
69
69
|
"mobx-react-lite": "^3.1.5",
|
|
70
70
|
"next": "12.2.0",
|
package/build/analytics/ikas.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e,__assign as s}from'./../ext/tslib/tslib.es6.js';import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{IkasBaseStore as r}from"../store/base.js";import"../store/customer/index.js";import"../store/cart/index.js";import"../models/data/blog/category/index.js";import"../models/data/blog/content/index.js";import"../models/data/blog/meta-data/index.js";import"../models/data/blog/tag/index.js";import"../models/data/blog/index.js";import"../models/data/brand/index.js";import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import"mobx";import"../models/data/campaign-offer/index.js";import"../models/data/cart/campaign-offer/index.js";import"../models/data/cart/index.js";import"../models/data/category/path-item/index.js";import"../models/data/category/index.js";import"../models/data/checkout/index.js";import"../models/data/checkout-settings/index.js";import"../models/data/city/index.js";import"../models/data/country/index.js";import"../models/data/customer/address/region/index.js";import"../models/data/customer/address/index.js";import"../models/data/customer/address/ikas-localized-customer-address.js";import"../models/data/customer/attribute/index.js";import"../models/data/customer/review/summary/index.js";import"../models/data/customer/review/index.js";import"../models/data/customer/index.js";import"../models/data/customer-form-data-input/index.js";import"../models/data/district/index.js";import"../models/data/favorite-product/index.js";import"../models/data/filter-category/index.js";import"../models/data/html-meta-data/index.js";import"../models/data/image/index.js";import"../models/data/order/address/region/index.js";import"../models/data/order/address/index.js";import"../models/data/order/line-item/option/value/index.js";import"../models/data/order/line-item/variant/value/index.js";import"../models/data/order/line-item/variant/index.js";import"../models/data/order/line-item/index.js";import"../models/data/order/package/index.js";import"../models/data/order/transaction/index.js";import"../models/data/order/index.js";import"../models/data/payment-gateway/index.js";import"../models/data/product/attribute-value/index.js";import"../models/data/product/filter/index.js";import"../models/data/product/campaign-offer/index.js";import"../models/data/product/option-set/option/index.js";import"../models/data/product/option-set/index.js";import"../models/data/product/stock-location/index.js";import"../models/data/product/variant/price/index.js";import"../models/data/product/variant/index.js";import"../models/data/variant-type/index.js";import"../models/data/product/index.js";import"../models/data/raffle/index.js";import"../models/data/shipping-zone/state/city/district/region/index.js";import"../models/data/state/index.js";import"../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../models/data/storefront-popup/index.js";import"../models/data/theme-json/index.js";import"../models/data/theme-json/component/index.js";import"../models/data/theme-json/custom-data/index.js";import"../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../models/ui/blog-list/index.js";import"../models/ui/blog-category-list/index.js";import"../models/ui/brand-list/index.js";import"../models/ui/category-list/index.js";import"../models/ui/product-list/index.js";import"../models/ui/product-attribute-detail/index.js";import"../models/ui/product-attribute-list/index.js";import"../models/ui/customer-review-list/index.js";import"../models/ui/customer-review-summary-list/index.js";import"../models/ui/validator/index.js";import"../models/ui/validator/rules/index.js";import"../models/ui/validator/form/login.js";import"../models/ui/validator/form/address.js";import"../models/ui/validator/form/ikas-address.js";import"../models/ui/validator/form/register.js";import"../models/ui/validator/form/contact-form.js";import"../models/ui/validator/form/forgot-password.js";import"../models/ui/validator/form/recover-password.js";import"../models/ui/validator/form/account-info.js";import"../models/ui/validator/form/raffle-form.js";import"../models/ui/validator/form/customer-review.js";import"../models/ui/raffle-list/index.js";var n,a;!function(t){t[t.SESSION_START=1]="SESSION_START",t[t.PAGE_VIEW=2]="PAGE_VIEW",t[t.PRODUCT_VIEW=3]="PRODUCT_VIEW",t[t.ADD_TO_CART=4]="ADD_TO_CART",t[t.VIEW_CART=5]="VIEW_CART",t[t.ORDER_SUCCESS=6]="ORDER_SUCCESS",t[t.BEGIN_CHECKOUT=7]="BEGIN_CHECKOUT",t[t.CHECKOUT_STEP=8]="CHECKOUT_STEP",t[t.CUSTOMER_REGISTER=9]="CUSTOMER_REGISTER",t[t.CUSTOMER_VISIT=10]="CUSTOMER_VISIT",t[t.CUSTOMER_LOGIN=11]="CUSTOMER_LOGIN",t[t.BRAND_VIEW=12]="BRAND_VIEW",t[t.CATEGORY_VIEW=13]="CATEGORY_VIEW",t[t.POPUP_VIEW=14]="POPUP_VIEW"}(n||(n={})),function(t){t[t.INDEX=1]="INDEX",t[t.CATEGORY=2]="CATEGORY",t[t.BRAND=3]="BRAND",t[t.PRODUCT=4]="PRODUCT",t[t.CUSTOM=5]="CUSTOM",t[t.ACCOUNT=6]="ACCOUNT",t[t.ADDRESSES=7]="ADDRESSES",t[t.ORDERS=8]="ORDERS",t[t.ORDER_DETAIL=9]="ORDER_DETAIL",t[t.LOGIN=10]="LOGIN",t[t.REGISTER=11]="REGISTER",t[t.FORGOT_PASSWORD=12]="FORGOT_PASSWORD",t[t.RECOVER_PASSWORD=13]="RECOVER_PASSWORD",t[t.CART=14]="CART",t[t.FAVORITE_PRODUCTS=15]="FAVORITE_PRODUCTS",t[t.SEARCH=16]="SEARCH",t[t.NOT_FOUND=17]="NOT_FOUND",t[t.BLOG=18]="BLOG",t[t.BLOG_INDEX=19]="BLOG_INDEX",t[t.BLOG_CATEGORY=20]="BLOG_CATEGORY",t[t.CHECKOUT=21]="CHECKOUT",t[t.ACTIVATE_CUSTOMER=21]="ACTIVATE_CUSTOMER"}(a||(a={}));var d=process.env.NEXT_PUBLIC_ANALYTICS_URL?"".concat(process.env.NEXT_PUBLIC_ANALYTICS_URL,"/sendEventV2"):"https://0.myikas.com/sendEventV2",c=function(){function c(){}return c.createUUID=function(){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,fetch("".concat(process.env.NEXT_PUBLIC_BASE_URL,"/generate-id/1"))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent().data[0]]}}))}))},c.createSessionId=function(){return t(this,void 0,void 0,(function(){var t,s,i;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),i={},[4,this.createUUID()];case 1:return i.id=e.sent(),i.expiry=Date.now()+this.EXPIRY_LENGTH,t=i,localStorage.setItem(this.SESSION_ID_KEY,JSON.stringify(t)),this.sessionId=t.id,[4,this.sessionStart()];case 2:return e.sent(),[3,4];case 3:return s=e.sent(),console.error(s),[3,4];case 4:return[2]}}))}))},c.checkSessionId=function(){return t(this,void 0,void 0,(function(){var t,s,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,7,,8]),(t=localStorage.getItem(this.SESSION_ID_KEY))?(s=JSON.parse(t)).expiry<Date.now()||s.id.length<=13?[4,this.createSessionId()]:[3,2]:[3,4];case 1:return e.sent(),[3,3];case 2:this.sessionId=s.id,e.label=3;case 3:return[3,6];case 4:return[4,this.createSessionId()];case 5:e.sent(),e.label=6;case 6:return i.init({sessionId:this.sessionId||""}),[3,8];case 7:return r=e.sent(),console.error(r),[3,8];case 8:return[2]}}))}))},c.checkVisitorId=function(){return t(this,void 0,void 0,(function(){var t,s,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),(t=localStorage.getItem(this.VISITOR_ID_KEY))&&t.length>13?(this.visitorId=t,[3,3]):[3,1];case 1:return s=this,[4,this.createUUID()];case 2:s.visitorId=e.sent(),localStorage.setItem(this.VISITOR_ID_KEY,this.visitorId),e.label=3;case 3:return i.init({visitorId:this.visitorId}),[3,5];case 4:return r=e.sent(),console.error(r),[3,5];case 5:return[2]}}))}))},c.getPageType=function(t){switch(t){case o.INDEX:return a.INDEX;case o.CATEGORY:return a.CATEGORY;case o.BRAND:return a.BRAND;case o.PRODUCT:return a.PRODUCT;case o.CUSTOM:return a.CUSTOM;case o.ACCOUNT:return a.ACCOUNT;case o.ADDRESSES:return a.ADDRESSES;case o.ORDERS:return a.ORDERS;case o.ORDER_DETAIL:return a.ORDER_DETAIL;case o.LOGIN:return a.LOGIN;case o.REGISTER:return a.REGISTER;case o.FORGOT_PASSWORD:return a.FORGOT_PASSWORD;case o.RECOVER_PASSWORD:return a.RECOVER_PASSWORD;case o.ACTIVATE_CUSTOMER:return a.ACTIVATE_CUSTOMER;case o.CART:return a.CART;case o.FAVORITE_PRODUCTS:return a.FAVORITE_PRODUCTS;case o.SEARCH:return a.SEARCH;case o.NOT_FOUND:return a.NOT_FOUND;case o.BLOG:return a.BLOG;case o.BLOG_INDEX:return a.BLOG_INDEX;case o.BLOG_CATEGORY:return a.BLOG_CATEGORY;case o.CHECKOUT:return a.CHECKOUT}},c.getCustomerData=function(){var t=r.getInstance(),e=t.customerStore.customer;return{id:(null==e?void 0:e.id)||void 0,e:(null==e?void 0:e.email)||void 0,c:t.customerStore.customerConsentGranted}},c.getCommonEventData=function(){var t=r.getInstance();return{u:window.location.href,r:document.referrer,pt:t.currentPageType?this.getPageType(t.currentPageType):void 0}},c.sendEvents=function(s){var o;return t(this,void 0,void 0,(function(){var t,n,a;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,5,,6]),[4,(t=r.getInstance()).customerStore.waitUntilInitialized()];case 1:return e.sent(),[4,this.checkSessionId()];case 2:return e.sent(),[4,this.checkVisitorId()];case 3:return e.sent(),n={e:s,scid:i.getSalesChannelId(),sfid:i.getStorefrontId(),sid:this.sessionId,vid:this.visitorId,cid:null===(o=t.customerStore.customer)||void 0===o?void 0:o.id},[4,fetch(d,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json","x-api-key":i.getApiKey()}})];case 4:return e.sent(),[3,6];case 5:return a=e.sent(),console.error(a),[3,6];case 6:return[2]}}))}))},c.sessionStart=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.SESSION_START,ts:Date.now(),d:s({},this.getCommonEventData())},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.pageView=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.PAGE_VIEW,ts:Date.now(),d:s(s({},this.getCommonEventData()),{pt:this.getPageType(i)})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.productView=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.PRODUCT_VIEW,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{pr:{id:i.id,vid:i.selectedVariant.id}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.addToCart=function(i,r,o){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.ADD_TO_CART,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{crt:{id:o.id,c:o.itemCount},crtItm:{id:i.id,c:r}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.viewCart=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.VIEW_CART,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{crt:{id:i.id,c:i.itemCount}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.orderSuccess=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.ORDER_SUCCESS,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{chk:{id:i.id,s:"success"}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[4,this.createSessionId()];case 2:return e.sent(),[2]}}))}))},c.beginCheckout=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.BEGIN_CHECKOUT,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{chk:{id:i.id}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.checkoutStep=function(i,r){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.CHECKOUT_STEP,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{chk:{id:i.id,s:r}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.customerRegister=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.CUSTOMER_REGISTER,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{cst:this.getCustomerData()}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.customerLogin=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.CUSTOMER_LOGIN,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{cst:this.getCustomerData()}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.customerVisit=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.CUSTOMER_VISIT,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{cst:this.getCustomerData()}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.viewBrand=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.BRAND_VIEW,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{cst:this.getCustomerData(),br:{id:i.id}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.viewCategory=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.CATEGORY_VIEW,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{cst:this.getCustomerData(),ctg:{id:i.id}}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.viewPopup=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return t={t:n.POPUP_VIEW,ts:Date.now(),d:s(s({},this.getCommonEventData()),{d:{cst:this.getCustomerData()},m:{sfpid:i}})},[4,this.sendEvents([t])];case 1:return e.sent(),[2]}}))}))},c.SESSION_ID_KEY="ikas_session_id",c.VISITOR_ID_KEY="ikas_visitor_id",c.EXPIRY_LENGTH=18e5,c}();export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"../../../ext/tslib/tslib.es6.mjs.js";import e from"react";import{observer as n}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{ButtonActionTypeEnum as o}from"../../models/modal/step/elements/button/index.js";import{getHorizontalAlignment as r,injectFontScript as i}from"../../helpers/index.js";var a=n((function(n){var a=n.element,c=n.isStandaloneButtonComponent,l=n.onClose,s=e.useRef(null),d=a,u={display:"flex",alignItems:"center",justifyContent:r(d.horizontalAlignment),padding:"".concat(d.outerVerticalPadding,"px ").concat(d.outerHorizontalPadding,"px"),backgroundColor:d.bgColor},m={color:d.color,backgroundColor:d.buttonBgColor,fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:i(d.fontFamily),textAlign:"center",border:"".concat(d.borderWidth,"px ").concat(d.borderStyle," ").concat(d.borderColor),borderRadius:d.borderRadius,padding:"".concat(d.verticalPadding,"px ").concat(d.horizontalPadding,"px")},f={width:"".concat(d.width,"%"),minWidth:"fit-content",cursor:"pointer"},p=e.useCallback((function(){if(s.current){var t=d.link||void 0;if(!c&&t)s.current.href=t||"",s.current.click();else switch(d.actionType){case o.NAVIGATE_TO_LINK_AND_CLOSE:s.current.href=t||"",null==l||l(!0),s.current.click();break;case o.NAVIGATE_TO_LINK:s.current.href=t||"",s.current.click();break;case o.CLOSE:null==l||l(!0)}}}),[s,s.current]);return e.createElement("div",{style:u},e.createElement("a",{onClick:p,style:f,target:d.openLinkInNewWindow?"_blank":"_self",ref:s},e.createElement("div",{dangerouslySetInnerHTML:{__html:d.text},style:t({},m)})))}));export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"react";import{observer as o}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{getHorizontalAlignment as e}from"../../helpers/index.js";import{ButtonBorderStyle as r}from"../../models/modal/background-settings/index.js";var d=o((function(o){var d=o.element,a={display:"flex",alignItems:"center",justifyContent:e(d.horizontalAlignment),padding:"".concat(d.verticalPadding,"px ").concat(d.horizontalPadding,"px"),backgroundColor:d.bgColor,width:"100%"},n=d.borderStyle===r.SOLID?"solid":d.borderStyle===r.DASHED?"dashed":"dotted",i={width:"".concat(d.width,"%"),height:"".concat(d.borderWidth,"px"),borderRadius:"".concat(d.borderRadius,"px"),borderBottom:"".concat(d.borderWidth,"px ").concat(n," ").concat(d.borderColor)};return t.createElement("div",{style:a},t.createElement("div",{style:i}))}));export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"../../../../../../../mobx-react/dist/mobxreact.esm.js";var r=t((function(t){var r=t.checkboxItem;e.useEffect((function(){r.showInCheckedStatus?r.isChecked=!0:r.isChecked=!1}),[r.showInCheckedStatus]);var i=r.requiredToBeChecked,o=e.useCallback((function(){var e=/<pre[^>]*>([\s\S]*?)<\/pre>/.exec(r.text);return e?e[1]:r.text}),[r.text]);return e.createElement("div",{style:{width:"100%",display:"flex",gap:6,flexDirection:"column"}},e.createElement("div",{style:{width:"100%",display:"flex",gap:8,flexDirection:"row",alignItems:"baseline",wordBreak:"break-word"}},e.createElement("input",{style:{width:"16px",height:"16px",cursor:"pointer",position:"relative",top:3},type:"checkbox",checked:r.isChecked,onChange:function(){r.isChecked=!r.isChecked,i&&i.hasError&&r.isChecked&&(i.hasError=!1)}}),e.createElement("div",{dangerouslySetInnerHTML:{__html:o()}})),!!i&&i.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},i.validationErrorMessage))}));export{r as CheckboxItemView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as r}from"../../../../../../../mobx-react/dist/mobxreact.esm.js";import t from"react-date-picker";var a=r((function(r){var a=e.useState(!1),o=a[0],l=a[1],n=e.useRef(null);r.placeholder;var c=r.isRequired,i=r.inputLabel;r.updateCurrentInfo;var s=r.formInputSettings,u=r.value,d=r.onValueChange;return e.useEffect((function(){if(n.current){var e=n.current.getElementsByClassName("react-date-picker__wrapper");if(e.length>0){var r=e[0];r.style.backgroundColor=s.bgColor,r.style.border="".concat(s.borderWidth,"px solid ").concat(o?s.focusBorderColor:s.borderColor),r.style.borderRadius="".concat(s.borderRadius,"px"),r.style.fontSize="14px",r.style.padding="10px 12px",r.style.height="".concat(s.height,"px")}}}),[n.current]),e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"},ref:n},(i||c)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},i.text),c&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),c&&c.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c.validationErrorMessage)),e.createElement(t,{onChange:function(e){return function(e){var r=e?e.valueOf().toString():"";d(r),c&&c.hasError&&r.length>0&&(c.hasError=!1)}(e)},value:u?new Date(Number(u)):null,className:"ikas-popup-datepicker",disableCalendar:!0,format:"dd / MM / yyyy",maxDate:new Date,clearIcon:null,onFocus:function(){return l(!0)},onBlur:function(){return function(){if(l(!1),n.current){var e=n.current.getElementsByClassName("react-date-picker__wrapper");e.length>0&&(e[0].style.border="".concat(s.borderWidth,"px solid ").concat(s.borderColor))}}()}}))}));export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as r}from"../../../../../../../mobx-react/dist/mobxreact.esm.js";var t=r((function(r){var t,o=e.useState(!1),n=o[0],i=o[1],l=r.genderFormItem,a=r.formInputSettings;r.onValueChange;var d={width:"100%",backgroundColor:a.bgColor,border:"".concat(a.borderWidth,"px solid ").concat(n?a.focusBorderColor:a.borderColor),color:l.genders.find((function(e){return e.isSelected}))?"black":"#697586",borderRadius:"".concat(a.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(a.height,"px"),appearance:"none",backgroundImage:"url(\"data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' strokeWidth='2' strokeLinecap='round' strokeLinejoin='round' %3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center",backgroundSize:"20px",cursor:"pointer"};return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(l.inputLabel||l.required)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},l.inputLabel&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},l.inputLabel.text),l.required&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),l.required&&l.required.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},l.required.validationErrorMessage)),e.createElement("select",{value:(null===(t=l.genders.find((function(e){return e.isSelected})))||void 0===t?void 0:t.type)||void 0,onChange:function(e){return r=e.target.value,l.genders.forEach((function(e){e.isSelected=e.type===r})),void(l.required&&l.required.hasError&&(l.required.hasError=!1));var r},style:d,onFocus:function(){return i(!0)},onBlur:function(){return i(!1)}},!!l.placeholder&&e.createElement("option",{value:"",disabled:!0,selected:!0,hidden:!0},l.placeholder.text),l.genders.filter((function(e){return!!e.label})).map((function(r){return e.createElement("option",{key:r.type,value:r.type},r.label)}))))}));export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as r}from"../../../ext/tslib/tslib.es6.mjs.js";import t from"react";import{observer as n}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{getHorizontalAlignment as a,injectFontScript as o,validateEmail as i,validatePhoneNumber as l}from"../../helpers/index.js";import{FormItemTypeEnum as s}from"../../models/modal/step/elements/form/index.js";import u from"../button-element-renderer/index.js";import m from"./input-item-view/index.js";import{CheckboxItemView as c}from"./checkbox-item-view/index.js";import d from"./date-item-view/index.js";import f from"./gender-item-view/index.js";var E=n((function(n){var E=n.element,p=n.popup,v=n.isPreviewMode,C=n.sfProps,I=t.useState(!1);I[0];var h=I[1],M=E,S=M.rows.slice().sort((function(e,r){return e.order-r.order})),g=M.formSettings,R=M.buttonSettings,O=M.bgColor,_={display:"flex",flexDirection:"column",justifyContent:a(M.horizontalAlignment),gap:"".concat(g.gapBetweenItems,"px"),padding:"".concat(M.outerVerticalPadding,"px ").concat(M.outerHorizontalPadding,"px"),backgroundColor:O,width:"100%"},T={display:"flex",flexDirection:"row",width:"100%",gap:"".concat(g.gapBetweenItems,"px")},b={flex:1,display:"flex",alignItems:"flex-end",fontFamily:o(g.fontFamily),fontSize:g.fontSize},U=function(){return e(void 0,void 0,void 0,(function(){var e,t,n;return r(this,(function(r){switch(r.label){case 0:return e=p.modal.steps.findIndex((function(e){return e.id===p.modal.selectedStep.id})),t=e===p.modal.steps.length-2,!v&&C&&t?(h(!0),a=0,M.rows.forEach((function(e){e.columns.forEach((function(e){switch(e.type){case s.CUSTOMER_BIRTHDAY:var r=e.formItem;r.required&&!r.value&&(r.required.hasError=!0,a++);break;case s.CUSTOMER_EMAIL:case s.CUSTOMER_PHONE:case s.CUSTOMER_NAME:case s.CUSTOMER_SURNAME:var t=e.formItem;if(t.required&&!t.value){if(t.type===s.CUSTOMER_EMAIL&&(null==C?void 0:C.isCustomerLoggedIn))return;t.required.hasError=!0,a++}else if(e.type===s.CUSTOMER_EMAIL){var n=i(t.value||"");t.validEmailError.hasError=!n,n||a++}else if(e.type===s.CUSTOMER_PHONE){var o=l(t.value||"",null==C?void 0:C.currentCountryCode);t.validPhoneError.hasError=!o,o||a++}break;case s.CUSTOMER_GENDER:var u=e.formItem,m=u.genders.find((function(e){return e.isSelected}));u.required&&!m&&(u.required.hasError=!0,a++);break;case s.CHECKBOX_FORM_ITEM:var c=e.formItem;c.requiredToBeChecked&&!c.isChecked&&(c.requiredToBeChecked.hasError=!0,a++)}}))})),a>0?(h(!1),[2]):(n={},M.rows.forEach((function(e){e.columns.forEach((function(e){var r;switch(e.type){case s.CUSTOMER_BIRTHDAY:n.birthday=e.formItem.value;break;case s.CUSTOMER_EMAIL:n.email=e.formItem.value;break;case s.CUSTOMER_GENDER:n.gender=(null===(r=e.formItem.genders.find((function(e){return e.isSelected})))||void 0===r?void 0:r.type)||"";break;case s.CUSTOMER_PHONE:n.phone=e.formItem.value;break;case s.CUSTOMER_NAME:n.firstName=e.formItem.value||"";break;case s.CUSTOMER_SURNAME:n.lastName=e.formItem.value||"";break;case s.CHECKBOX_FORM_ITEM:n.hasPermission=e.formItem.isChecked}}))})),[4,C.onCustomerSave(n)])):[3,2];case 1:r.sent(),h(!1),r.label=2;case 2:return-1!==e&&e<p.modal.steps.length&&(p.modal.selectedStep=p.modal.steps[e+1]),[2]}var a}))}))};return t.createElement("div",{style:_},S.map((function(e,r){return t.createElement("div",{style:T,key:r},e.columns.slice().sort((function(e,r){return e.order-r.order})).map((function(e,r){return t.createElement("div",{style:b,key:r},function(e){switch(e.type){case s.CUSTOMER_EMAIL:case s.CUSTOMER_PHONE:case s.CUSTOMER_NAME:case s.CUSTOMER_SURNAME:var r=e.formItem;if(r.type===s.CUSTOMER_EMAIL&&(null==C?void 0:C.isCustomerLoggedIn)&&!v)return null;var n=null;if(e.type===s.CUSTOMER_EMAIL){var a=r;a.validEmailError.hasError&&(n=a.validEmailError.validationErrorMessage)}else if(e.type===s.CUSTOMER_PHONE){var o=r;o.validPhoneError.hasError&&(n=o.validPhoneError.validationErrorMessage)}return t.createElement(m,{formInputSettings:g.formInputSettings,inputLabel:r.inputLabel,isRequired:r.required,onValueChange:function(e){return v?null:r.value=e},placeholder:r.placeholder,updateCurrentInfo:r.updateCurrentInfo,value:r.value||"",validationErrorMessage:n});case s.CUSTOMER_BIRTHDAY:var i=e.formItem;return t.createElement(d,{formInputSettings:g.formInputSettings,inputLabel:i.inputLabel,isRequired:i.required,onValueChange:function(e){return v?null:i.value=e},placeholder:i.placeholder,updateCurrentInfo:i.updateCurrentInfo,value:i.value||""});case s.CUSTOMER_GENDER:var l=e.formItem;return t.createElement(f,{genderFormItem:l,formInputSettings:g.formInputSettings,onValueChange:function(e){return v?null:l.genders.forEach((function(r){r.isSelected=r.label===e}))}});case s.CHECKBOX_FORM_ITEM:return t.createElement(c,{checkboxItem:e.formItem})}}(e))})))})),t.createElement("div",{style:{width:"100%",minWidth:"fit-content"},onClick:function(e){U(),e.preventDefault(),e.stopPropagation()}},t.createElement(u,{element:R})," "))}));export{E as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"../../../../../../../mobx-react/dist/mobxreact.esm.js";var r=t((function(t){var r=e.useState(!1),o=r[0],n=r[1];e.useRef(null);var l=t.placeholder,a=t.isRequired,i=t.inputLabel;t.updateCurrentInfo;var c=t.validationErrorMessage,d=t.formInputSettings,u=t.value,s=t.onValueChange,p={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(o?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"},x=a?((null==l?void 0:l.text)||"")+" *":(null==l?void 0:l.text)||"";return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(i||a)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},i.text)),a&&a.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},a.validationErrorMessage),!!c&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c)),e.createElement("input",{type:"text",placeholder:x,value:u||"",onChange:function(e){return function(e){s(e),a&&a.hasError&&e.length>0&&(a.hasError=!1)}(e.target.value)},style:p,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)}}))}));export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{ImageFitEnum as r}from"../../models/modal/step/elements/image/index.js";var i=t((function(t){var i=t.element,a=t.popup,o=t.editModeChildren,d=t.isMobile,n=i;n.cdnURL||(n.cdnURL=a.cdnURL),n.merchantId||(n.merchantId=a.merchantId);var c=a.modal.windowSettings,m={width:c.takeFullWidth||d?"100%":c.maxWidth,backgroundColor:n.bgColor,padding:"".concat(n.verticalPadding,"px ").concat(n.horizontalPadding,"px"),borderRadius:n.borderRadius};if(!n.src&&a.isPreviewMode&&o)return e.createElement("div",{style:m},o);var l={objectFit:n.objectFit===r.CONTAIN?"contain":"cover",height:"100%"};return e.createElement("a",{href:n.link||void 0,style:m,target:"_blank"},n.src&&e.createElement("img",{src:n.src||void 0,width:"100% !important",style:l}))}));export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{ImagePositionEnum as i,ImageFitEnum as a}from"../../models/modal/step/elements/image/index.js";var o=t((function(t){var o=t.element,r=t.popup,n=t.editModeChildren,d=o;if(d.cdnURL||(d.cdnURL=r.cdnURL),d.merchantId||(d.merchantId=r.merchantId),!d.src&&r.isPreviewMode&&n)return n;var c={display:"flex",alignItems:"center",justifyContent:d.imagePosition===i.DISABLE_FLOAT?"center":d.imagePosition===i.FLOAT_LEFT?"flex-start":"flex-end",padding:"".concat(d.verticalPadding,"px ").concat(d.horizontalPadding,"px"),backgroundColor:d.bgColor,maxWidth:"100%"},m={borderRadius:"".concat(d.borderRadius,"px"),objectFit:d.objectFit===a.CONTAIN?"contain":"cover",width:"".concat(d.maxWidth,"%")};return e.createElement("a",{href:d.link||void 0,style:c,target:"_blank"},e.createElement("img",{src:d.src||void 0,width:100===d.maxWidth?"100% !important":void 0,style:m}))}));export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"../../../../../mobx-react/dist/mobxreact.esm.js";import{PopupTypeEnum as o,PopupPositonEnum as n}from"../models/modal/index.js";import i from"../assets/x-close.js";import{CloseButtonPositionTypeEnum as r,CloseIconTypeEnum as l,CloseButtonDisplayTypeEnum as s}from"../models/modal/close-settings/index.js";import{PopupElementTypeEnum as a,ComponentVerticalAlignmentEnum as d}from"../models/modal/step/elements/base/index.js";import c from"./text-element-renderer/index.js";import m from"./button-element-renderer/index.js";import p from"./space-element-renderer/index.js";import u from"./divider-element-renderer/index.js";import f from"./social-element-renderer/index.js";import P from"./image-element-renderer/index.js";import E from"./image-column-element-renderer/index.js";import x from"./product-list-renderer/index.js";import g from"./form-element-renderer/index.js";import{ImageColumnPositionEnum as v,MobileImageColumnPositionEnum as T}from"../models/modal/step/elements/image-column/index.js";var y=t((function(t){var y,b,C,O,I=t.popup,_=t.dynamicData,h=t.dashboardComponents,M=t.previewMode,w=t.sfProps,A=t.isMobile,D=I.modal,S=D.teaser,R=!!D.selectedStep.isTeaser,k=D.selectedStep.elements.find((function(e){return e.type===a.IMAGE_COLUMN})),N=R?S.backgroundSettings:D.backgroundSettings,j=R?S.windowSettings:D.windowSettings,B=R?S.closeSettings:D.closeSettings,L=N.allowScrollingWhenPopupOpen,U=I.isPreviewMode||M,H=!!U||D.isVisible;document.body.style.overflow=H&&!L?"hidden":"auto";var W=N.overlay,F=N.border,V="center",G="center";switch(R?o.POPUP:D.type){case o.POPUP:var z=R?S.position:D.position;z===n.POPUP_TOP_LEFT?(V="flex-start",G="flex-start"):z===n.POPUP_TOP_CENTER?(V="center",G="flex-start"):z===n.POPUP_TOP_RIGHT?(V="flex-end",G="flex-start"):z===n.POPUP_MIDDLE_LEFT?(V="flex-start",G="center"):z===n.POPUP_MIDDLE_CENTER?(V="center",G="center"):z===n.POPUP_MIDDLE_RIGHT?(V="flex-end",G="center"):z===n.POPUP_BOTTOM_LEFT?(V="flex-start",G="flex-end"):z===n.POPUP_BOTTOM_CENTER?(V="center",G="flex-end"):z===n.POPUP_BOTTOM_RIGHT&&(V="flex-end",G="flex-end");break;case o.DRAWER:D.position===n.DRAWER_LEFT?(V="flex-start",G="center"):D.position===n.DRAWER_RIGHT&&(V="flex-end",G="center");break;case o.NOTIFICATION_BAR:D.position===n.NOTIFICATION_BAR_UP?(V="center",G="flex-start"):D.position===n.NOTIFICATION_BAR_DOWN&&(V="center",G="flex-end")}var K=e.useMemo((function(){return 2147483644}),[]),X=e.useMemo((function(){return K+1}),[]),Y=e.useMemo((function(){return X+1}),[]),q=e.useMemo((function(){return Y+1}),[]),J={position:"fixed",display:"flex",justifyContent:V,alignItems:G,top:0,left:0,right:0,bottom:0,zIndex:K,overflow:"hidden",padding:"".concat(j.outerVerticalPadding,"px ").concat(j.outerHorizontalPadding,"px"),opacity:H?1:0,visibility:H?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease"},Q={position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:X,backgroundColor:W?W.bgColor:"",opacity:W?(W.bgOpacity||100)/100:void 0},Z={position:"relative",zIndex:Y,backgroundColor:N.bgColor,border:F?"".concat(F.borderWidth,"px ").concat(F.borderStyle," ").concat(F.borderColor):"",borderRadius:"".concat(j.borderRadius,"px"),maxWidth:"100%",maxHeight:"100%",width:j.takeFullWidth?"100%":void 0,minHeight:j.minHeight,height:j.takeFullHeight?"100%":void 0,boxShadow:N.shadow?"0 0 10px ".concat(N.shadow.color):"",overflow:"auto",opacity:H?1:0,visibility:H?"visible":"hidden",transition:"opacity 0.3s ease, visibility 0.3s ease"},$="";switch(null==k?void 0:k.verticalAlignment){case d.BOTTOM:$="flex-end";break;case d.MIDDLE:$="center";break;case d.TOP:$="flex-start"}var ee=k?k.imagePosition===v.LEFT_ALIGN?"row-reverse":"row":"",te=k?k.mobilePosition===T.TOP?"column-reverse":"column":"",oe={display:"flex",flexDirection:k?A?te:ee:"column",overflow:"hidden"},ne={width:j.takeFullWidth?"100%":j.maxWidth,maxWidth:"100%",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:$,padding:"".concat(j.innerVerticalPadding,"px ").concat(j.innerHorizontalPadding,"px")},ie={position:B.closeButtonPositionType===r.TAKE_SPACE?"relative":"absolute",float:B.closeButtonPositionType===r.TAKE_SPACE?"right":"none",top:8,right:8,zIndex:q},re={position:"sticky",padding:"6px",marginLeft:B.closeButtonPositionType===r.TAKE_SPACE?"14px":void 0,display:"flex",justifyContent:"center",alignItems:"center",border:(null===(y=B.iconSettings)||void 0===y?void 0:y.type)===l.WITH_BORDER?"1px solid ".concat(null===(b=B.iconSettings)||void 0===b?void 0:b.color):"",borderRadius:"50%",backgroundColor:null===(C=B.iconSettings)||void 0===C?void 0:C.backgroundColor},le={color:null===(O=B.iconSettings)||void 0===O?void 0:O.color,cursor:"pointer"},se=function(t){var o=t.type,n=h&&h[o]&&h[o].length?h[o][0]:null,i=n&&I.marketingPopupViewModel?e.createElement(n,{element:t,marketingPopupViewModel:I.marketingPopupViewModel}):void 0;switch(o){case a.TEXT:return e.createElement(c,{element:t});case a.IMAGE:return e.createElement(P,{element:t,popup:I,editModeChildren:i});case a.IMAGE_COLUMN:return A&&k.mobilePosition===T.HIDE?null:e.createElement(E,{element:t,popup:I,editModeChildren:i,isMobile:A});case a.BUTTON:return e.createElement(m,{element:t,onClose:ae,isStandaloneButtonComponent:!0});case a.DIVIDER:return e.createElement(u,{element:t});case a.FORM:return e.createElement(g,{element:t,popup:I,isPreviewMode:!!U,sfProps:w});case a.PRODUCT_LIST:return e.createElement(x,{element:t,products:_.products[t.id],popup:I,editModeChildren:i,isPreviewMode:!!U,sfProps:w,onClose:ae});case a.SOCIAL_MEDIA:return e.createElement(f,{element:t,popup:I,editModeChildren:i});case a.SPACE:return e.createElement(p,{element:t})}},ae=function(e){U||D.isVisible&&(D.isVisible=!1,w&&w.onModalClose(e))};return e.createElement("div",{className:"ikas-popup-default-styles",id:"ikas-popup-container",style:J},e.createElement("div",{style:Z},B.closeButtonDisplayType!==s.ALWAYS_HIDDEN&&e.createElement("div",{style:ie,onClick:function(){return ae()}},e.createElement("div",{style:re,className:B.closeButtonDisplayType===s.VISIBLE_ON_HOVER?"visible-on-hover":""},e.createElement(i,{style:le}))),e.createElement("div",{style:oe,onClick:function(e){R&&(D.selectedStep=D.steps[0])}},e.createElement("div",{style:ne},D.selectedStep.elements.filter((function(e){return e.type!==a.IMAGE_COLUMN})).slice().sort((function(e,t){return e.order-t.order})).map((function(e){return se(e)}))),k&&se(k))),e.createElement("div",{style:Q,onClick:function(){return ae()}}))}));export{y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__spreadArray as t,__assign as e,__awaiter as o,__generator as n}from"../../../ext/tslib/tslib.es6.mjs.js";import i from"react";import{observer as l}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{getHorizontalAlignment as r,injectFontScript as a}from"../../helpers/index.js";import{ProductListTypeEnum as d,ProductListLayoutEnum as c}from"../../models/modal/step/elements/product/index.js";import s from"../button-element-renderer/index.js";import u from"../../../../../../swiper/modules/navigation.mjs.js";import m from"../../../../../../swiper/modules/scrollbar.mjs.js";import{Swiper as p,SwiperSlide as v}from"../../../../../../swiper/swiper-react.mjs.js";import g from"../../assets/left-arrow.js";import f from"../../assets/right-arrow.js";import{ProductActionTypeEnum as b}from"../../models/modal/step/elements/product/detail-settings/index.js";import{ComponentHorizontalAlignmentEnum as x}from"../../models/modal/step/elements/base/index.js";var h=l((function(l){var h,y=l.element,E=l.products,P=l.popup,w=l.editModeChildren,C=l.isPreviewMode,S=l.sfProps,z=l.onClose,j=i.useState(null),R=j[0],A=j[1],D=i.useState(!1),I=D[0],W=D[1],_=i.useState(!1),F=_[0],T=_[1],k=y,L=[];if(E&&(L=k.listType===d.SPECIFIC?(null===(h=k.variantPairs)||void 0===h?void 0:h.length)?E.slice().sort((function(t,e){return k.variantPairs.findIndex((function(e){return e.variantId===t.variantId}))-k.variantPairs.findIndex((function(t){return t.variantId===e.variantId}))})):[]:t([],E,!0)),L.length>k.maxProductsToShow&&(L.length=k.maxProductsToShow),!(L&&L.length||!P.isPreviewMode)&&w)return w;if(!L||!L.length)return null;k.gapBetweenProductElements;var H=k.productDetailSettings.image,B=k.productDetailSettings.button,M=k.buttonSettings,N=k.productDetailSettings.discountRatio,O=k.productDetailSettings.finalPrice,U=k.productDetailSettings.originalPrice,V=k.productDetailSettings.name,$=r(k.horizontalAlignment),q=1;k.layout===c.ONE_COLUMN?q=1:k.layout===c.TWO_COLUMN?q=2:k.layout===c.THREE_COLUMN&&(q=3);var G={padding:"".concat(k.outerVerticalPadding,"px ").concat(k.outerHorizontalPadding,"px"),backgroundColor:k.productBgColor,width:"100%",height:"max-content"},J={display:"flex",flexDirection:"column",justifyContent:"space-between",alignItems:"center",height:"100%"},K={display:"flex",justifyContent:$,alignItems:"center",width:"100%",backgroundColor:null==H?void 0:H.bgColor,borderRadius:(null==H?void 0:H.borderRadius)?"".concat(H.borderRadius,"px"):void 0},Q={width:"".concat(null==H?void 0:H.maxWidth,"%"),objectFit:"contain",borderRadius:(null==H?void 0:H.borderRadius)?"".concat(H.borderRadius,"px"):void 0},X={display:"flex",flexDirection:"column",width:"100%"},Y={display:"flex",flexDirection:"column"},Z={backgroundColor:null==V?void 0:V.bgColor,color:null==V?void 0:V.color,fontFamily:V?a(V.fontFamily):void 0,fontSize:null==V?void 0:V.fontSize,fontWeight:null==V?void 0:V.fontWeight,padding:"".concat(null==V?void 0:V.verticalPadding,"px ").concat(null==V?void 0:V.horizontalPadding,"px"),width:"100%",textAlign:null==V?void 0:V.horizontalAlignment,border:"".concat(null==V?void 0:V.borderWidth,"px ").concat(null==V?void 0:V.borderStyle," ").concat(null==V?void 0:V.borderColor),borderRadius:null==V?void 0:V.borderRadius},tt={backgroundColor:null==N?void 0:N.bgColor,color:null==N?void 0:N.color,fontFamily:N?a(N.fontFamily):void 0,fontSize:null==N?void 0:N.fontSize,fontWeight:null==N?void 0:N.fontWeight,padding:"".concat(null==N?void 0:N.verticalPadding,"px ").concat(null==N?void 0:N.horizontalPadding,"px"),width:"fit-content !important",border:"".concat(null==N?void 0:N.borderWidth,"px ").concat(null==N?void 0:N.borderStyle," ").concat(null==N?void 0:N.borderColor),borderRadius:null==N?void 0:N.borderRadius},et={textDecoration:"line-through",backgroundColor:null==U?void 0:U.bgColor,color:null==U?void 0:U.color,fontFamily:U?a(U.fontFamily):void 0,fontSize:null==U?void 0:U.fontSize,fontWeight:null==U?void 0:U.fontWeight,padding:"".concat(null==U?void 0:U.verticalPadding,"px ").concat(null==U?void 0:U.horizontalPadding,"px"),width:"100%",textAlign:null==U?void 0:U.horizontalAlignment,border:"".concat(null==U?void 0:U.borderWidth,"px ").concat(null==U?void 0:U.borderStyle," ").concat(null==U?void 0:U.borderColor),borderRadius:null==U?void 0:U.borderRadius},ot={backgroundColor:null==O?void 0:O.bgColor,color:null==O?void 0:O.color,fontFamily:O?a(O.fontFamily):void 0,fontSize:null==O?void 0:O.fontSize,fontWeight:null==O?void 0:O.fontWeight,padding:"".concat(null==O?void 0:O.verticalPadding,"px ").concat(null==O?void 0:O.horizontalPadding,"px"),width:"100%",textAlign:null==O?void 0:O.horizontalAlignment,border:"".concat(null==O?void 0:O.borderWidth,"px ").concat(null==O?void 0:O.borderStyle," ").concat(null==O?void 0:O.borderColor),borderRadius:null==O?void 0:O.borderRadius},nt={width:"".concat(M.width,"%"),minWidth:"fit-content"},it=e({display:"flex",justifyContent:"center",width:"100%",gap:"10px"},1===q?{position:"absolute",top:"calc(50% - 25px)",alignItems:"center",justifyContent:"space-between",zIndex:10}:void 0),lt={padding:10,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",border:"1px solid #EEF2F6",cursor:"pointer"};return i.createElement("div",{style:G},i.createElement(p,{onSwiper:A,modules:[u,m],spaceBetween:k.gapBetweenProducts,slidesPerView:q,navigation:{nextEl:".custom-next-button",prevEl:".custom-prev-button"},scrollbar:void 0},L.map((function(t,e){return i.createElement(v,{style:{height:"auto"},key:t.variantId},i.createElement("div",{style:J,onClick:function(){return function(t){return o(void 0,void 0,void 0,(function(){var e,o;return n(this,(function(n){switch(n.label){case 0:return C||!t.url?[3,4]:(null===(o=k.productDetailSettings.button)||void 0===o?void 0:o.action)===b.ADD_TO_CART&&S?[4,S.addProductToCart(t)]:[3,2];case 1:return n.sent()&&((e=document.createElement("a")).href="".concat(P.storeUrl,"/cart"),e.target="_self",e.click()),[3,3];case 2:(e=document.createElement("a")).href=t.url,e.target="_self",e.click(),n.label=3;case 3:z(!0),n.label=4;case 4:return[2]}}))}))}(t)}},i.createElement("div",{style:X},!!H&&t.imageURL&&i.createElement("div",{style:K},i.createElement("img",{src:t.imageURL||void 0,alt:t.name||void 0,style:Q})),!!V&&i.createElement("div",{style:Y},!!V&&i.createElement("div",{style:Z},t.name)),(!!U||!!O||!!N)&&i.createElement("div",{style:{display:"flex",flexDirection:"column",gap:2}},!!N&&!!t.discountPrice&&i.createElement("div",{style:{padding:"".concat(N.outerVerticalPadding,"px ").concat(N.outerHorizontalPadding,"px"),width:"100% !important",display:"flex",justifyContent:r(N.horizontalAlignment),alignItems:"center"}},i.createElement("div",{style:tt},function(t){return t.$discountRatio?k.productDetailSettings.discountRatioText?"".concat(t.$discountRatio," ").concat(k.productDetailSettings.discountRatioText):t.$discountRatio:null}(t))),i.createElement("div",{style:{display:"flex",gap:4,flexWrap:"wrap",overflow:"hidden",width:"100%",justifyContent:r((null==U?void 0:U.horizontalAlignment)||(null==O?void 0:O.horizontalAlignment)||x.LEFT),alignItems:"center"}},!!U&&!!t.discountPrice&&i.createElement("div",{style:{padding:"".concat(U.outerVerticalPadding,"px ").concat(U.outerHorizontalPadding,"px")}},i.createElement("div",{style:et},t.price)),!!O&&i.createElement("div",{style:{padding:"".concat(O.outerVerticalPadding,"px ").concat(O.outerHorizontalPadding,"px")}},i.createElement("div",{style:ot},t.discountPrice||t.price))))),!!B&&i.createElement("div",{style:nt}," ",i.createElement(s,{element:M})," ")))})),L.length>1&&i.createElement("div",{style:it},i.createElement("div",{className:"custom-prev-button",style:e(e({},lt),I?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){R&&(T(R.isEnd),W(R.isBeginning))}},i.createElement(g,null)),i.createElement("div",{className:"custom-next-button",style:e(e({},lt),F?{opacity:.5,cursor:"not-allowed"}:{}),onClick:function(){R&&(T(R.isEnd),W(R.isBeginning))}},i.createElement(f,null)))))}));export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{getHorizontalAlignment as r}from"../../helpers/index.js";var n=t((function(t){var n=t.element,i=n.socialMediaLinks.filter((function(e){return!!e.link})).sort((function(e,t){return e.order-t.order}));if(!i.length&&t.editModeChildren&&t.popup.isPreviewMode)return t.editModeChildren;var o={display:"flex",alignItems:"center",justifyContent:r(n.horizontalAlignment),padding:"".concat(n.verticalPadding,"px ").concat(n.horizontalPadding,"px"),backgroundColor:n.bgColor,width:"100%"},a={display:"flex",alignItems:"center",gap:"".concat(n.gapBetweenLogos,"px")};return e.createElement("div",{style:o},e.createElement("div",{style:a},i.map((function(t,r){return e.createElement("a",{href:t.link||"",key:r,target:"_blank"},e.createElement("img",{src:t.iconUrlWithoutHash||"",width:24,height:24}))}))))}));export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"react";import{observer as e}from"../../../../../../mobx-react/dist/mobxreact.esm.js";var r=e((function(e){var r=e.element,o={backgroundColor:r.bgColor,padding:"".concat(r.verticalPadding,"px ").concat(r.horizontalPadding,"px"),height:r.height,width:"100%"};return t.createElement("div",{style:o})}));export{r as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"../../../ext/tslib/tslib.es6.mjs.js";import o from"react";import{observer as e}from"../../../../../../mobx-react/dist/mobxreact.esm.js";import{injectFontScript as r}from"../../helpers/index.js";var n=e((function(e){var n=e.element,a=n,i={border:"".concat(a.borderWidth,"px ").concat(a.borderStyle," ").concat(a.borderColor),borderRadius:a.borderRadius,padding:"".concat(a.outerVerticalPadding,"px ").concat(a.outerHorizontalPadding,"px")},d={color:a.color,fontSize:a.fontSize,fontWeight:a.fontWeight,fontFamily:r(a.fontFamily),textAlign:a.horizontalAlignment,padding:"".concat(a.verticalPadding,"px ").concat(a.horizontalPadding,"px"),backgroundColor:a.bgColor};return o.createElement("div",{style:i},o.createElement("div",{dangerouslySetInnerHTML:{__html:n.text},style:t({},d)}))}));export{n as default};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|