@salla.sa/twilight-components 2.12.41 → 2.12.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-fe89d834.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-add-product-button_41.cjs.entry.js +135 -333
- package/dist/cjs/salla-add-product-button_41.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/components/salla-count-down/salla-count-down.js +12 -12
- package/dist/collection/components/salla-count-down/salla-count-down.js.map +1 -1
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +22 -1
- package/dist/collection/components/salla-products-slider/salla-products-slider.js.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-count-down2.js +12 -12
- package/dist/components/salla-count-down2.js.map +1 -1
- package/dist/components/salla-products-slider.js +3 -1
- package/dist/components/salla-products-slider.js.map +1 -1
- package/dist/components/salla-tel-input2.js +123 -321
- package/dist/components/salla-tel-input2.js.map +1 -1
- package/dist/esm/app-globals-4359b023.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-add-product-button_41.entry.js +135 -333
- package/dist/esm/salla-add-product-button_41.entry.js.map +1 -1
- package/dist/esm/salla-products-slider.entry.js +2 -1
- package/dist/esm/salla-products-slider.entry.js.map +1 -1
- package/dist/esm/twilight.js +1 -1
- package/dist/esm-es5/app-globals-4359b023.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/salla-add-product-button_41.entry.js +4 -4
- package/dist/esm-es5/salla-add-product-button_41.entry.js.map +1 -1
- package/dist/esm-es5/salla-products-slider.entry.js +1 -1
- package/dist/esm-es5/salla-products-slider.entry.js.map +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/esm-es5/twilight.js.map +1 -1
- package/dist/twilight/{p-25fc9949.system.entry.js → p-270897bc.system.entry.js} +6 -6
- package/dist/twilight/p-270897bc.system.entry.js.map +1 -0
- package/dist/twilight/p-539cf1d8.system.entry.js +5 -0
- package/dist/twilight/p-539cf1d8.system.entry.js.map +1 -0
- package/dist/twilight/p-a04e6e5e.system.js +1 -1
- package/dist/twilight/p-a04e6e5e.system.js.map +1 -1
- package/dist/twilight/p-a527f060.system.js.map +1 -1
- package/dist/twilight/p-ab4c6cc3.js.map +1 -1
- package/dist/twilight/{p-e23a4e3f.entry.js → p-d2437066.entry.js} +8 -8
- package/dist/twilight/p-d2437066.entry.js.map +1 -0
- package/dist/twilight/p-ff5cfed5.entry.js +5 -0
- package/dist/twilight/p-ff5cfed5.entry.js.map +1 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.esm.js.map +1 -1
- package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +12 -0
- package/dist/types/components.d.ts +10 -0
- package/package.json +2 -2
- package/dist/twilight/p-17869512.system.entry.js +0 -5
- package/dist/twilight/p-17869512.system.entry.js.map +0 -1
- package/dist/twilight/p-25fc9949.system.entry.js.map +0 -1
- package/dist/twilight/p-d7b6c544.entry.js +0 -5
- package/dist/twilight/p-d7b6c544.entry.js.map +0 -1
- package/dist/twilight/p-e23a4e3f.entry.js.map +0 -1
|
@@ -21,6 +21,7 @@ const SallaProductsSlider = class {
|
|
|
21
21
|
this.source = undefined;
|
|
22
22
|
this.sourceValue = undefined;
|
|
23
23
|
this.limit = undefined;
|
|
24
|
+
this.sliderConfig = undefined;
|
|
24
25
|
this.productsData = undefined;
|
|
25
26
|
this.isReady = undefined;
|
|
26
27
|
this.sourceValueIsValid = undefined;
|
|
@@ -71,7 +72,7 @@ const SallaProductsSlider = class {
|
|
|
71
72
|
if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled')) || !this.canRender()) {
|
|
72
73
|
return;
|
|
73
74
|
}
|
|
74
|
-
return (index.h(index.Host, { class: "s-products-slider-wrapper" }, index.h("salla-slider", { class: "s-products-slider-slider", id: this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`, "auto-play": this.autoplay, type: "carousel", "block-title": this.blockTitle, "block-subTitle": this.subTitle, "display-all-url": this.displayAllUrl }, index.h("div", { slot: "items" }, (_a = this.productsData) === null || _a === void 0 ? void 0 : _a.map(product => this.getItemHTML(product))))));
|
|
75
|
+
return (index.h(index.Host, { class: "s-products-slider-wrapper" }, index.h("salla-slider", { class: "s-products-slider-slider", id: this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`, "auto-play": this.autoplay, type: "carousel", "block-title": this.blockTitle, "block-subTitle": this.subTitle, "display-all-url": this.displayAllUrl, sliderConfig: this.sliderConfig ? this.sliderConfig : null }, index.h("div", { slot: "items" }, (_a = this.productsData) === null || _a === void 0 ? void 0 : _a.map(product => this.getItemHTML(product))))));
|
|
75
76
|
}
|
|
76
77
|
get host() { return index.getElement(this); }
|
|
77
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"salla-products-slider.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,EAAE;;MCQpB,mBAAmB
|
|
1
|
+
{"file":"salla-products-slider.entry.cjs.js","mappings":";;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,EAAE;;MCQpB,mBAAmB;;;;;;;;;;;;;;;;kBAoFJ,EAAE;;;EAnFpB,oBAAoB;IAC1B,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;GACjE;EAoFO,WAAW,CAAC,OAAO;IACzB,IAAI,IAAI,CAAC,kBAAkB,EAAE;MAC3B,OAAOA,iBAAK,KAAK,EAAC,wBAAwB,IACxCA,uCAA2B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC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AI,CAAC,CAAC;OACzE,CAAC,CAAC;KACN,CAAC,CAAC;GACN;EAEO,SAAS;IACf,OAAOA,aAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;GAC9C;EAEO,cAAc;IACpB,OAAOA,aAAM,CAAC,sBAAsB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;GACrE;EAED,MAAM;;IACJ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,SAAS,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,iDAAiD,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;MAChI,OAAO;KACR;IACD,QACED,QAACE,UAAI,IAAC,KAAK,EAAC,2BAA2B,IACrCF,0BACE,KAAK,EAAC,0BAA0B,EAChC,EAAE,EAAE,IAAI,CAAC,QAAQ,IAAI,qBAAqB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,eACxE,IAAI,CAAC,QAAQ,EACxB,IAAI,EAAC,UAAU,iBACF,IAAI,CAAC,UAAU,oBACZ,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,YAAY,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,IAE1DA,iBAAK,IAAI,EAAC,OAAO,IACd,MAAA,IAAI,CAAC,YAAY,0CAAE,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CACzD,CACO,CACV,EACP;GACH;;;;;;;","names":["h","Helper","Host"],"sources":["./src/components/salla-products-slider/salla-products-slider.scss?tag=salla-products-slider","./src/components/salla-products-slider/salla-products-slider.tsx"],"sourcesContent":[".s-products-slider{\n &-wrapper{\n\n }\n &-slider{\n\n }\n &-card{\n\n }\n}","import { Component, Host, h, Prop, Element, State } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\n\n//todo:: extends this component from salla-products-list or the opposite\nexport class SallaProductsSlider {\n private isSourceWithoutValue() {\n return ['offers', 'latest', 'sales'].includes(this.getSource());\n }\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\n\n /**\n * Title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() blockTitle: string;\n\n /**\n * Sub title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() subTitle: string;\n\n /**\n * Slider Id, if not provided will be generated automatically\n * @type {string}\n * @default ''\n * */\n @Prop() sliderId: string;\n\n /**\n * Display 'ALL' URL\n * @type {string}\n * @default ''\n * */\n @Prop() displayAllUrl: string;\n\n /**\n * autoplay option for products slider\n */\n @Prop({ mutable: true }) autoplay: boolean\n\n /**\n * Source of the products, if api will get the products from the API, if json will get the products from the products prop\n * @type {string}\n * @default ''\n * */\n @Prop({\n reflect: true,\n mutable: true\n }) source: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'tags' | 'selected' | 'offers' | 'landing-page';\n\n /**\n * The source value, cloud be different values as following:\n * - array of ids when `source` in ['categories', 'brands', 'tags', 'selected']\n * - products payload when `source` = 'json'\n * - product_id when `source` = 'related'\n *\n * @type {string}\n * */\n @Prop() sourceValue: string;\n\n /**\n * Limit for number of products in the list.\n */\n @Prop({ mutable: true }) limit: number;\n\n /**\n * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n\n\n @State() productsData: any;\n @State() isReady: boolean;\n @State() sourceValueIsValid: boolean;\n @State() hasCustomComponent: boolean;\n @State() apiUrl: string = '';\n @State() parsedSourceValue: any;\n\n private getItemHTML(product) {\n if (this.hasCustomComponent) {\n return <div class=\"s-products-slider-card\">\n <custom-salla-product-card product={product} source={this.getSource()} source-value={this.getSourceValue()} />\n </div>;\n }\n\n return <div class=\"s-products-slider-card\">\n <salla-product-card\n show-quantity={this.getSource() == 'landing-page'}\n hide-add-btn={this.getSource() == 'landing-page'}\n shadow-on-hover={true}\n product={product} />\n </div>;\n }\n\n\n\n private canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n componentWillLoad() {\n return Helper.onSallaReadyPromise(() => {\n this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${\n this.getSource()\n }]`);\n return;\n }\n this.hasCustomComponent = !!customElements.get('custom-salla-product-card');\n\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return;\n }\n return Helper.fetchProducts(this.getSource(), this.getSourceValue(), this.limit).then(res => {\n this.productsData = res.data\n this.isReady = true\n salla.event.emit('salla-products-slider::products.fetched', res.data);\n });\n });\n }\n\n private getSource() {\n return Helper.getProductsSource(this.source);\n }\n\n private getSourceValue() {\n return Helper.getProductsSourceValue(this.source, this.sourceValue);\n }\n\n render() {\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled')) || !this.canRender()) {\n return;\n }\n return (\n <Host class=\"s-products-slider-wrapper\">\n <salla-slider\n class=\"s-products-slider-slider\"\n id={this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`}\n auto-play={this.autoplay}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n sliderConfig={this.sliderConfig ? this.sliderConfig : null}\n >\n <div slot=\"items\">\n {this.productsData?.map(product => this.getItemHTML(product))}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
package/dist/cjs/twilight.cjs.js
CHANGED
|
@@ -26,7 +26,7 @@ const patchBrowser = () => {
|
|
|
26
26
|
|
|
27
27
|
patchBrowser().then(options => {
|
|
28
28
|
appGlobals.globalScripts();
|
|
29
|
-
return index.bootstrapLazy(JSON.parse("[[\"salla-add-product-button_41.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetTitle\":[1,\"widget-title\"],\"widgetSubtitle\":[1,\"widget-subtitle\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"offer_type\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64],\"refresh\":[64]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"loadMoreText\":[1,\"load-more-text\"],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[0,\"salla-maintenance-alert\",{\"title\":[32],\"message\":[32],\"buttonTitle\":[32]}],[4,\"salla-quantity-input\",{\"cartItemId\":[8,\"cart-item-id\"],\"quantity\":[32],\"fireChangeEvent\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[4,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"is_loggedIn\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[4,\"salla-product-card\",{\"product\":[1],\"horizontal\":[4],\"shadowOnHover\":[4,\"shadow-on-hover\"],\"hideAddBtn\":[4,\"hide-add-btn\"],\"fullImage\":[4,\"full-image\"],\"minimal\":[4],\"isSpecial\":[4,\"is-special\"],\"showQuantity\":[4,\"show-quantity\"],\"productData\":[32],\"fitImageHeight\":[32],\"remained\":[32],\"outOfStock\":[32],\"donationAmount\":[32],\"startingPrice\":[32],\"addToCart\":[32],\"placeholder\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1537],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quickBuy\":[1540,\"quick-buy\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"supportStickyBar\":[516,\"support-sticky-bar\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32],\"showQuickBuy\":[32]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"endOfDay\":[4,\"end-of-day\"],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"days\":[32],\"hours\":[32],\"minutes\":[32],\"seconds\":[32],\"endCountDown\":[64]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[0,\"salla-quick-buy\",{\"type\":[1025],\"productId\":[1025,\"product-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"gridThumbs\":[516,\"grid-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"direction\":[1537],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"windowWidth\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}]]],[\"salla-products-slider.cjs\",[[0,\"salla-products-slider\",{\"blockTitle\":[1,\"block-title\"],\"subTitle\":[1,\"sub-title\"],\"sliderId\":[1,\"slider-id\"],\"displayAllUrl\":[1,\"display-all-url\"],\"autoplay\":[1028],\"source\":[1537],\"sourceValue\":[1,\"source-value\"],\"limit\":[1026],\"productsData\":[32],\"isReady\":[32],\"sourceValueIsValid\":[32],\"hasCustomComponent\":[32],\"apiUrl\":[32],\"parsedSourceValue\":[32]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectDonationAmount\":[32],\"selectAmount\":[32],\"isCustomDonation\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"reportValidity\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-filters.cjs\",[[0,\"salla-filters\",{\"filters\":[1040],\"isSidebarOpen\":[32],\"filtersData\":[32],\"apply\":[32],\"reset\":[32],\"getFilters\":[64],\"applyFilters\":[64],\"resetFilters\":[64]}]]],[\"salla-comment-form.cjs\",[[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-products-list.cjs\",[[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}]]],[\"salla-price-range.cjs\",[[0,\"salla-price-range\",{\"minPrice\":[1032,\"min-price\"],\"maxPrice\":[1032,\"max-price\"],\"option\":[16],\"filtersData\":[520,\"filters-data\"],\"min\":[32],\"max\":[32],\"priceOptions\":[32],\"moreThanLabel\":[32],\"lessThanLabel\":[32],\"toLabel\":[32],\"fromLabel\":[32],\"reset\":[64]}]]],[\"salla-filters-widget.cjs\",[[4,\"salla-filters-widget\",{\"withLoadMore\":[1028,\"with-load-more\"],\"filtersData\":[16],\"option\":[16],\"isOpen\":[32],\"isShowMore\":[32],\"showMoreLabel\":[32],\"showLessLabel\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
|
|
29
|
+
return index.bootstrapLazy(JSON.parse("[[\"salla-add-product-button_41.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"widgetTitle\":[1,\"widget-title\"],\"widgetSubtitle\":[1,\"widget-subtitle\"],\"sectionTitle\":[32],\"sectionSubtitle\":[32],\"sectionBtnText\":[32],\"giftDetails\":[32],\"selectImageForYourGift\":[32],\"selectImageOrUpload\":[32],\"selectGiftMessage\":[32],\"giftCustomText\":[32],\"textId\":[32],\"incorrectGiftText\":[32],\"nextStep\":[32],\"senderNameLabel\":[32],\"receiverNameFieldLabel\":[32],\"receiverMobileFieldLabel\":[32],\"receiverEmailFieldLabel\":[32],\"emailPlaceholder\":[32],\"sendLater\":[32],\"selectSendDateAndTime\":[32],\"canNotEditOrderAfterSelectDate\":[32],\"sendGift\":[32],\"donationRequired\":[32],\"currentStep\":[32],\"showCalendar\":[32],\"showGiftText\":[32],\"currentLang\":[32],\"parentClass\":[32],\"errors\":[32],\"gift\":[32],\"selectedGiftTextOption\":[32],\"showTextArea\":[32],\"selectedImage\":[32],\"uploadedImage\":[32],\"selectedText\":[32],\"senderName\":[32],\"errorMessage\":[32],\"hasError\":[32],\"quantity\":[32],\"deliveryDate\":[32],\"timeZone\":[32],\"receiverName\":[32],\"receiverMobile\":[32],\"receiverCountryCode\":[32],\"receiverEmail\":[32],\"open\":[64],\"close\":[64],\"goToStep2\":[64]}],[4,\"salla-loyalty\",{\"prizePoints\":[1544,\"prize-points\"],\"customerPoints\":[1538,\"customer-points\"],\"prizeTitle\":[1537,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"offer_type\":[32],\"translationLoaded\":[32],\"addToCartLabel\":[32],\"open\":[64],\"showOffer\":[64]}],[0,\"salla-rating-modal\",{\"orderId\":[2,\"order-id\"],\"order\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-scopes\",{\"selection\":[1],\"searchDisplayLimit\":[2,\"search-display-limit\"],\"translationLoaded\":[32],\"mode\":[32],\"current_scope\":[32],\"scopes\":[32],\"originalScopesList\":[32],\"selected_scope\":[32],\"isOpenedBefore\":[32],\"hasError\":[32],\"loading\":[32],\"close\":[64],\"open\":[64],\"handleSubmit\":[64]}],[0,\"salla-localization-modal\",{\"language\":[1537],\"currency\":[1537],\"translationLoaded\":[32],\"languages\":[32],\"currencies\":[32],\"hasError\":[32],\"errorMessage\":[32],\"open\":[64],\"close\":[64],\"submit\":[64]}],[0,\"salla-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32]}],[0,\"salla-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64],\"refresh\":[64]}],[4,\"salla-cart-summary\",{\"showCartLabel\":[4,\"show-cart-label\"],\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"cartLabel\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"loadMoreText\":[1,\"load-more-text\"],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[0,\"salla-maintenance-alert\",{\"title\":[32],\"message\":[32],\"buttonTitle\":[32]}],[4,\"salla-quantity-input\",{\"cartItemId\":[8,\"cart-item-id\"],\"quantity\":[32],\"fireChangeEvent\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[4,\"salla-user-menu\",{\"inline\":[516],\"avatarOnly\":[516,\"avatar-only\"],\"showHeader\":[516,\"show-header\"],\"relativeDropdown\":[516,\"relative-dropdown\"],\"accountLoading\":[32],\"opened\":[32],\"notifications\":[32],\"orders\":[32],\"pending_orders\":[32],\"wishlist\":[32],\"profile\":[32],\"rating\":[32],\"logout\":[32],\"hello\":[32],\"first_name\":[32],\"last_name\":[32],\"avatar\":[32],\"is_loggedIn\":[32],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[4,\"salla-product-card\",{\"product\":[1],\"horizontal\":[4],\"shadowOnHover\":[4,\"shadow-on-hover\"],\"hideAddBtn\":[4,\"hide-add-btn\"],\"fullImage\":[4,\"full-image\"],\"minimal\":[4],\"isSpecial\":[4,\"is-special\"],\"showQuantity\":[4,\"show-quantity\"],\"productData\":[32],\"fitImageHeight\":[32],\"remained\":[32],\"outOfStock\":[32],\"donationAmount\":[32],\"startingPrice\":[32],\"addToCart\":[32],\"placeholder\":[32]}],[4,\"salla-map\",{\"name\":[1],\"required\":[4],\"readonly\":[4],\"searchable\":[1028],\"lat\":[1026],\"lng\":[1026],\"apiKey\":[1025,\"api-key\"],\"modalTitle\":[1,\"modal-title\"],\"zoom\":[1026],\"theme\":[1025],\"modalActivityTitle\":[32],\"confirmButtonTitle\":[32],\"locateButtonTitle\":[32],\"locateButtonEdit\":[32],\"searchPlaceholder\":[32],\"searchInputValue\":[32],\"formattedAddress\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"selectedLat\":[32],\"selectedLng\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1537],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[4,\"salla-add-product-button\",{\"channels\":[513],\"subscribedOptions\":[1,\"subscribed-options\"],\"quickBuy\":[1540,\"quick-buy\"],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"notifyOptionsAvailability\":[516,\"notify-options-availability\"],\"productId\":[520,\"product-id\"],\"supportStickyBar\":[516,\"support-sticky-bar\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"],\"hasOutOfStockOption\":[32],\"hasSubscribedOptions\":[32],\"selectedOptions\":[32],\"showQuickBuy\":[32]}],[0,\"salla-count-down\",{\"date\":[1],\"boxed\":[4],\"size\":[1],\"color\":[1],\"labeled\":[4],\"endText\":[1,\"end-text\"],\"digits\":[1],\"endOfDay\":[4,\"end-of-day\"],\"daysLabel\":[32],\"hoursLabel\":[32],\"minutesLabel\":[32],\"secondsLabel\":[32],\"endLabel\":[32],\"invalidDate\":[32],\"offerEnded\":[32],\"countInterval\":[32],\"days\":[32],\"hours\":[32],\"minutes\":[32],\"seconds\":[32],\"endCountDown\":[64]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-product-availability\",{\"channels\":[1],\"notifyOptionsAvailability\":[4,\"notify-options-availability\"],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[32]}],[0,\"salla-quick-buy\",{\"type\":[1025],\"productId\":[1025,\"product-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[0,\"salla-file-upload\",{\"value\":[1537],\"files\":[513],\"height\":[513],\"cartItemId\":[1,\"cart-item-id\"],\"profileImage\":[516,\"profile-image\"],\"name\":[1537],\"payloadName\":[1,\"payload-name\"],\"accept\":[1537],\"fileId\":[2,\"file-id\"],\"url\":[1025],\"method\":[1],\"formData\":[1,\"form-data\"],\"required\":[4],\"maxFileSize\":[1,\"max-file-size\"],\"disabled\":[4],\"allowDrop\":[4,\"allow-drop\"],\"allowBrowse\":[4,\"allow-browse\"],\"allowPaste\":[4,\"allow-paste\"],\"allowMultiple\":[4,\"allow-multiple\"],\"allowReplace\":[4,\"allow-replace\"],\"allowRevert\":[4,\"allow-revert\"],\"allowRemove\":[4,\"allow-remove\"],\"allowProcess\":[4,\"allow-process\"],\"allowReorder\":[4,\"allow-reorder\"],\"storeAsFile\":[4,\"store-as-file\"],\"forceRevert\":[4,\"force-revert\"],\"maxFilesCount\":[2,\"max-files-count\"],\"maxParallelUploads\":[2,\"max-parallel-uploads\"],\"checkValidity\":[4,\"check-validity\"],\"itemInsertLocation\":[1,\"item-insert-location\"],\"itemInsertInterval\":[2,\"item-insert-interval\"],\"credits\":[4],\"dropOnPage\":[4,\"drop-on-page\"],\"dropOnElement\":[4,\"drop-on-element\"],\"dropValidation\":[4,\"drop-validation\"],\"ignoredFiles\":[16],\"instantUpload\":[1028,\"instant-upload\"],\"chunkUploads\":[4,\"chunk-uploads\"],\"chunkForce\":[4,\"chunk-force\"],\"chunkSize\":[2,\"chunk-size\"],\"chunkRetryDelays\":[16],\"labelDecimalSeparator\":[1,\"label-decimal-separator\"],\"labelThousandsSeparator\":[1,\"label-thousands-separator\"],\"labelIdle\":[1025,\"label-idle\"],\"iconRemove\":[1,\"icon-remove\"],\"iconProcess\":[1,\"icon-process\"],\"iconRetry\":[1,\"icon-retry\"],\"iconUndo\":[1,\"icon-undo\"],\"setOption\":[64]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[4,\"salla-slider\",{\"blockTitle\":[513,\"block-title\"],\"listenToThumbnailsOption\":[516,\"listen-to-thumbnails-option\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-thumbs\"],\"gridThumbs\":[516,\"grid-thumbs\"],\"vertical\":[516],\"autoHeight\":[516,\"auto-height\"],\"showControls\":[516,\"show-controls\"],\"controlsOuter\":[516,\"controls-outer\"],\"showThumbsControls\":[4,\"show-thumbs-controls\"],\"autoPlay\":[4,\"auto-play\"],\"slidesPerView\":[1,\"slides-per-view\"],\"pagination\":[4],\"centered\":[4],\"loop\":[4],\"direction\":[1537],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"swiperScript\":[32],\"displayAllTitle\":[32],\"windowWidth\":[32],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"slideToLoop\":[64],\"slideNextLoop\":[64],\"slidePrevLoop\":[64],\"slideReset\":[64],\"slideToClosest\":[64],\"update\":[64],\"updateAutoHeight\":[64],\"updateSlides\":[64],\"updateProgress\":[64],\"updateSlidesClasses\":[64],\"getSlides\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-modal\",{\"isClosable\":[1028,\"is-closable\"],\"width\":[513],\"position\":[513],\"visible\":[516],\"hasSkeleton\":[516,\"has-skeleton\"],\"isLoading\":[1540,\"is-loading\"],\"subTitleFirst\":[4,\"sub-title-first\"],\"noPadding\":[4,\"no-padding\"],\"subTitle\":[1,\"sub-title\"],\"centered\":[4],\"iconStyle\":[1,\"icon-style\"],\"modalTitle\":[32],\"open\":[64],\"close\":[64],\"setTitle\":[64],\"loading\":[64],\"stopLoading\":[64]},[[0,\"keyup\",\"handleKeyUp\"]]],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}]]],[\"salla-products-slider.cjs\",[[0,\"salla-products-slider\",{\"blockTitle\":[1,\"block-title\"],\"subTitle\":[1,\"sub-title\"],\"sliderId\":[1,\"slider-id\"],\"displayAllUrl\":[1,\"display-all-url\"],\"autoplay\":[1028],\"source\":[1537],\"sourceValue\":[1,\"source-value\"],\"limit\":[1026],\"sliderConfig\":[520,\"slider-config\"],\"productsData\":[32],\"isReady\":[32],\"sourceValueIsValid\":[32],\"hasCustomComponent\":[32],\"apiUrl\":[32],\"parsedSourceValue\":[32]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32],\"selectDonationAmount\":[32],\"selectAmount\":[32],\"isCustomDonation\":[32],\"selectedOptions\":[32],\"canDisabled\":[32],\"selectedSkus\":[32],\"selectedOutSkus\":[32],\"getSelectedOptionsData\":[64],\"reportValidity\":[64],\"hasOutOfStockOption\":[64],\"getSelectedOptions\":[64],\"getOption\":[64]}]]],[\"salla-filters.cjs\",[[0,\"salla-filters\",{\"filters\":[1040],\"isSidebarOpen\":[32],\"filtersData\":[32],\"apply\":[32],\"reset\":[32],\"getFilters\":[64],\"applyFilters\":[64],\"resetFilters\":[64]}]]],[\"salla-comment-form.cjs\",[[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-products-list.cjs\",[[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}]]],[\"salla-price-range.cjs\",[[0,\"salla-price-range\",{\"minPrice\":[1032,\"min-price\"],\"maxPrice\":[1032,\"max-price\"],\"option\":[16],\"filtersData\":[520,\"filters-data\"],\"min\":[32],\"max\":[32],\"priceOptions\":[32],\"moreThanLabel\":[32],\"lessThanLabel\":[32],\"toLabel\":[32],\"fromLabel\":[32],\"reset\":[64]}]]],[\"salla-filters-widget.cjs\",[[4,\"salla-filters-widget\",{\"withLoadMore\":[1028,\"with-load-more\"],\"filtersData\":[16],\"option\":[16],\"isOpen\":[32],\"isShowMore\":[32],\"showMoreLabel\":[32],\"showLessLabel\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
exports.setNonce = index.setNonce;
|
|
@@ -12,12 +12,12 @@ export class SallaCountDown {
|
|
|
12
12
|
this.endText = undefined;
|
|
13
13
|
this.digits = 'auto';
|
|
14
14
|
this.endOfDay = undefined;
|
|
15
|
-
this.daysLabel =
|
|
16
|
-
this.hoursLabel =
|
|
17
|
-
this.minutesLabel =
|
|
18
|
-
this.secondsLabel =
|
|
19
|
-
this.endLabel =
|
|
20
|
-
this.invalidDate =
|
|
15
|
+
this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');
|
|
16
|
+
this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');
|
|
17
|
+
this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');
|
|
18
|
+
this.secondsLabel = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');
|
|
19
|
+
this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
|
|
20
|
+
this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');
|
|
21
21
|
this.offerEnded = false;
|
|
22
22
|
this.countInterval = undefined;
|
|
23
23
|
this.days = undefined;
|
|
@@ -29,12 +29,12 @@ export class SallaCountDown {
|
|
|
29
29
|
this.minutes = this.number(0);
|
|
30
30
|
this.seconds = this.number(0);
|
|
31
31
|
salla.lang.onLoaded(() => {
|
|
32
|
-
this.daysLabel = salla.lang.
|
|
33
|
-
this.hoursLabel = salla.lang.
|
|
34
|
-
this.minutesLabel = salla.lang.
|
|
35
|
-
this.invalidDate = salla.lang.
|
|
36
|
-
this.secondsLabel = salla.lang.
|
|
37
|
-
this.endLabel = salla.lang.
|
|
32
|
+
this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');
|
|
33
|
+
this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');
|
|
34
|
+
this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');
|
|
35
|
+
this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');
|
|
36
|
+
this.secondsLabel = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');
|
|
37
|
+
this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
|
|
38
38
|
});
|
|
39
39
|
if (this.date && this.isValidDate(this.date)) {
|
|
40
40
|
this.startCountDown();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salla-count-down.js","sourceRoot":"","sources":["../../../src/components/salla-count-down/salla-count-down.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAMtE,MAAM,OAAO,cAAc;EACzB;;;gBAmCmC,IAAI;iBAKO,MAAM;;;kBAgBpB,MAAM;;;;;;;;sBAaP,KAAK;;;;;;IAnElC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;MACtD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;MACxD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;MAC5D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;MACvE,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC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UAC3B,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,KAAK,CAAO;UACtD,IAAI,CAAC,OAAO,IAAI,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,UAAU,CAAO,CAC1E;QACL,UAAI,KAAK,EAAC,mBAAmB;UAC3B,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,IAAI,CAAO;UACrD,IAAI,CAAC,OAAO,IAAI,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,SAAS,CAAO,CACzE,CACF;MAEJ,IAAI,CAAC,UAAU,IAAI,WAAK,KAAK,EAAC,uBAAuB,IAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAO,CACvG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {Component, Host, h, Prop, State, Method} from '@stencil/core';\n\n@Component({\n tag: 'salla-count-down',\n styleUrl: 'salla-count-down.scss',\n})\nexport class SallaCountDown {\n constructor() {\n\n this.days = this.number(0);\n this.hours = this.number(0);\n this.minutes = this.number(0);\n this.seconds = this.number(0);\n salla.lang.onLoaded(() => {\n this.daysLabel = salla.lang.get('pages.checkout.day');\n this.hoursLabel = salla.lang.get('pages.checkout.hour');\n this.minutesLabel = salla.lang.get('pages.checkout.minute');\n this.invalidDate = salla.lang.get('blocks.buy_as_gift.incorrect_date');\n this.secondsLabel = salla.lang.get('pages.checkout.second');\n this.endLabel = salla.lang.get('pages.checkout.offer_ended');\n });\n\n if (this.date && this.isValidDate(this.date)) {\n this.startCountDown();\n }\n }\n\n /**\n * The date to count down to\n * Format: MMM DD, YYYY HH:mm:ss (e.g. Jan 2, 2023 16:37:52)\n * */\n @Prop() date: string;\n\n\n /**\n * If true, the count down numbers will be appear in a boxes\n * */\n @Prop() boxed: boolean;\n\n /**\n * The size of the count down\n * */\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The color of the count down\n * */\n @Prop() color: 'primary' | 'light' | 'dark' = 'dark';\n\n /**\n * Show labels for each count down number\n * */\n @Prop() labeled: boolean;\n\n /**\n * The text to show when the count down ends\n * */\n @Prop() endText: string;\n\n\n /**\n * The digits lang to show in the count down\n * */\n @Prop() digits: 'en' | 'auto' = 'auto';\n\n /**\n * If true, the count down will end at the end of the day\n * */\n @Prop() endOfDay: boolean;\n\n @State() daysLabel: string;\n @State() hoursLabel: string;\n @State() minutesLabel: string;\n @State() secondsLabel: string;\n @State() endLabel: string;\n @State() invalidDate: string;\n @State() offerEnded: boolean = false;\n @State() countInterval: any;\n @State() days: string;\n @State() hours: string;\n @State() minutes: string;\n @State() seconds: string;\n\n\n /**\n * End the count down\n * */\n @Method()\n async endCountDown() {\n clearInterval(this.countInterval);\n this.offerEnded = true;\n this.days = this.number(0);\n this.hours = this.number(0);\n this.minutes = this.number(0);\n this.seconds = this.number(0);\n }\n\n private isValidDate(date: string) {\n let dateHasDashes = date.includes('-'),\n dateParts = date.split(' '),\n testedDate;\n if (dateHasDashes) {\n testedDate = dateParts[0].replace(/-/g, '/');\n } else {\n testedDate = dateParts[0];\n }\n return !isNaN(Date.parse(testedDate));\n }\n\n private number(digit: number) {\n return salla.helpers.number(digit, this.digits === 'en');\n }\n\n private startCountDown() {\n\n let countDownDate = new Date(this.date.replace(/-/g, \"/\"));\n if (this.endOfDay || this.date.split(' ').length === 1) {\n countDownDate.setHours(23, 59, 59, 999);\n }\n let countDownTime = countDownDate.getTime();\n\n this.countInterval = setInterval(() => {\n let now = new Date().getTime();\n let distance = countDownTime - now;\n\n this.days = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));\n this.hours = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));\n this.minutes = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));\n this.seconds = this.number(Math.floor((distance % (1000 * 60)) / 1000));\n\n if (distance < 0) {\n this.endCountDown();\n }\n }, 1000);\n }\n\n render() {\n if (!this.date) {\n return \"\";\n } else if (this.date && !this.isValidDate(this.date)) {\n return <div class=\"s-count-down-text-center\">{this.invalidDate}</div>\n }\n return (\n <Host class=\"s-count-down-wrapper\">\n <ul\n class={`s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}`}>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.seconds}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.secondsLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.minutes}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.minutesLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.hours}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.hoursLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.days}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.daysLabel}</div>}\n </li>\n </ul>\n\n {this.offerEnded && <div class=\"s-count-down-end-text\">{!!this.endText ? this.endText : this.endLabel}</div>}\n </Host>\n );\n }\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"salla-count-down.js","sourceRoot":"","sources":["../../../src/components/salla-count-down/salla-count-down.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAMtE,MAAM,O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,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,YAAY,CAAO,CAC5E;QACL,UAAI,KAAK,EAAC,mBAAmB;UAC3B,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,KAAK,CAAO;UACtD,IAAI,CAAC,OAAO,IAAI,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,UAAU,CAAO,CAC1E;QACL,UAAI,KAAK,EAAC,mBAAmB;UAC3B,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,IAAI,CAAO;UACrD,IAAI,CAAC,OAAO,IAAI,WAAK,KAAK,EAAC,yBAAyB,IAAE,IAAI,CAAC,SAAS,CAAO,CACzE,CACF;MAEJ,IAAI,CAAC,UAAU,IAAI,WAAK,KAAK,EAAC,uBAAuB,IAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAO,CACvG,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import {Component, Host, h, Prop, State, Method} from '@stencil/core';\n\n@Component({\n tag: 'salla-count-down',\n styleUrl: 'salla-count-down.scss',\n})\nexport class SallaCountDown {\n constructor() {\n\n this.days = this.number(0);\n this.hours = this.number(0);\n this.minutes = this.number(0);\n this.seconds = this.number(0);\n salla.lang.onLoaded(() => {\n this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');\n this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');\n this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');\n this.invalidDate = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');\n this.secondsLabel = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');\n this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');\n });\n\n if (this.date && this.isValidDate(this.date)) {\n this.startCountDown();\n }\n }\n\n /**\n * The date to count down to\n * Format: MMM DD, YYYY HH:mm:ss (e.g. Jan 2, 2023 16:37:52)\n * */\n @Prop() date: string;\n\n\n /**\n * If true, the count down numbers will be appear in a boxes\n * */\n @Prop() boxed: boolean;\n\n /**\n * The size of the count down\n * */\n @Prop() size: 'sm' | 'md' | 'lg' = 'md';\n\n /**\n * The color of the count down\n * */\n @Prop() color: 'primary' | 'light' | 'dark' = 'dark';\n\n /**\n * Show labels for each count down number\n * */\n @Prop() labeled: boolean;\n\n /**\n * The text to show when the count down ends\n * */\n @Prop() endText: string;\n\n\n /**\n * The digits lang to show in the count down\n * */\n @Prop() digits: 'en' | 'auto' = 'auto';\n\n /**\n * If true, the count down will end at the end of the day\n * */\n @Prop() endOfDay: boolean;\n\n @State() daysLabel: string = salla.lang.getWithDefault('pages.checkout.day', 'يوم');\n @State() hoursLabel: string = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');\n @State() minutesLabel: string = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');\n @State() secondsLabel: string = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');\n @State() endLabel: string = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');\n @State() invalidDate: string = salla.lang.getWithDefault('blocks.buy_as_gift.incorrect_date', 'الرجاء إدخال الموعد بشكل صحيح');\n @State() offerEnded: boolean = false;\n @State() countInterval: any;\n @State() days: string;\n @State() hours: string;\n @State() minutes: string;\n @State() seconds: string;\n\n\n /**\n * End the count down\n * */\n @Method()\n async endCountDown() {\n clearInterval(this.countInterval);\n this.offerEnded = true;\n this.days = this.number(0);\n this.hours = this.number(0);\n this.minutes = this.number(0);\n this.seconds = this.number(0);\n }\n\n private isValidDate(date: string) {\n let dateHasDashes = date.includes('-'),\n dateParts = date.split(' '),\n testedDate;\n if (dateHasDashes) {\n testedDate = dateParts[0].replace(/-/g, '/');\n } else {\n testedDate = dateParts[0];\n }\n return !isNaN(Date.parse(testedDate));\n }\n\n private number(digit: number) {\n return salla.helpers.number(digit, this.digits === 'en');\n }\n\n private startCountDown() {\n\n let countDownDate = new Date(this.date.replace(/-/g, \"/\"));\n if (this.endOfDay || this.date.split(' ').length === 1) {\n countDownDate.setHours(23, 59, 59, 999);\n }\n let countDownTime = countDownDate.getTime();\n\n this.countInterval = setInterval(() => {\n let now = new Date().getTime();\n let distance = countDownTime - now;\n\n this.days = this.number(Math.floor(distance / (1000 * 60 * 60 * 24)));\n this.hours = this.number(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));\n this.minutes = this.number(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));\n this.seconds = this.number(Math.floor((distance % (1000 * 60)) / 1000));\n\n if (distance < 0) {\n this.endCountDown();\n }\n }, 1000);\n }\n\n render() {\n if (!this.date) {\n return \"\";\n } else if (this.date && !this.isValidDate(this.date)) {\n return <div class=\"s-count-down-text-center\">{this.invalidDate}</div>\n }\n return (\n <Host class=\"s-count-down-wrapper\">\n <ul\n class={`s-count-down-list ${this.boxed ? 's-count-down-boxed' : ''} ${this.offerEnded ? 's-count-down-ended' : ''} s-count-down-${this.size} s-count-down-${this.color}`}>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.seconds}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.secondsLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.minutes}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.minutesLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.hours}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.hoursLabel}</div>}\n </li>\n <li class=\"s-count-down-item\">\n <div class=\"s-count-down-item-value\">{this.days}</div>\n {this.labeled && <div class=\"s-count-down-item-label\">{this.daysLabel}</div>}\n </li>\n </ul>\n\n {this.offerEnded && <div class=\"s-count-down-end-text\">{!!this.endText ? this.endText : this.endLabel}</div>}\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -14,6 +14,7 @@ export class SallaProductsSlider {
|
|
|
14
14
|
this.source = undefined;
|
|
15
15
|
this.sourceValue = undefined;
|
|
16
16
|
this.limit = undefined;
|
|
17
|
+
this.sliderConfig = undefined;
|
|
17
18
|
this.productsData = undefined;
|
|
18
19
|
this.isReady = undefined;
|
|
19
20
|
this.sourceValueIsValid = undefined;
|
|
@@ -64,7 +65,7 @@ export class SallaProductsSlider {
|
|
|
64
65
|
if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled')) || !this.canRender()) {
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
|
-
return (h(Host, { class: "s-products-slider-wrapper" }, h("salla-slider", { class: "s-products-slider-slider", id: this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`, "auto-play": this.autoplay, type: "carousel", "block-title": this.blockTitle, "block-subTitle": this.subTitle, "display-all-url": this.displayAllUrl }, h("div", { slot: "items" }, (_a = this.productsData) === null || _a === void 0 ? void 0 : _a.map(product => this.getItemHTML(product))))));
|
|
68
|
+
return (h(Host, { class: "s-products-slider-wrapper" }, h("salla-slider", { class: "s-products-slider-slider", id: this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`, "auto-play": this.autoplay, type: "carousel", "block-title": this.blockTitle, "block-subTitle": this.subTitle, "display-all-url": this.displayAllUrl, sliderConfig: this.sliderConfig ? this.sliderConfig : null }, h("div", { slot: "items" }, (_a = this.productsData) === null || _a === void 0 ? void 0 : _a.map(product => this.getItemHTML(product))))));
|
|
68
69
|
}
|
|
69
70
|
static get is() { return "salla-products-slider"; }
|
|
70
71
|
static get originalStyleUrls() {
|
|
@@ -247,6 +248,26 @@ export class SallaProductsSlider {
|
|
|
247
248
|
},
|
|
248
249
|
"attribute": "limit",
|
|
249
250
|
"reflect": false
|
|
251
|
+
},
|
|
252
|
+
"sliderConfig": {
|
|
253
|
+
"type": "any",
|
|
254
|
+
"mutable": false,
|
|
255
|
+
"complexType": {
|
|
256
|
+
"original": "any",
|
|
257
|
+
"resolved": "any",
|
|
258
|
+
"references": {}
|
|
259
|
+
},
|
|
260
|
+
"required": false,
|
|
261
|
+
"optional": false,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [{
|
|
264
|
+
"name": "example",
|
|
265
|
+
"text": "let slider = document.querySelector('salla-slider');\n slider.sliderConfig = {\n slidesPerView: 1,\n spaceBetween : 30,\n lazy: true,\n}"
|
|
266
|
+
}],
|
|
267
|
+
"text": "Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object"
|
|
268
|
+
},
|
|
269
|
+
"attribute": "slider-config",
|
|
270
|
+
"reflect": true
|
|
250
271
|
}
|
|
251
272
|
};
|
|
252
273
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salla-products-slider.js","sourceRoot":"","sources":["../../../src/components/salla-products-slider/salla-products-slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAM1C,wEAAwE;AACxE,MAAM,OAAO,mBAAmB
|
|
1
|
+
{"version":3,"file":"salla-products-slider.js","sourceRoot":"","sources":["../../../src/components/salla-products-slider/salla-products-slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,MAAM,MA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ACZ,IAAI,CAAC,QAAQ,qBACZ,IAAI,CAAC,aAAa,EACnC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;QAE1D,WAAK,IAAI,EAAC,OAAO,IACd,MAAA,IAAI,CAAC,YAAY,0CAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CACzD,CACO,CACV,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Element, State } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\n@Component({\n tag: 'salla-products-slider',\n styleUrl: 'salla-products-slider.scss'\n})\n\n//todo:: extends this component from salla-products-list or the opposite\nexport class SallaProductsSlider {\n private isSourceWithoutValue() {\n return ['offers', 'latest', 'sales'].includes(this.getSource());\n }\n\n @Element() host: HTMLElement;\n //todo:: support limit, default =10, make sure that maximum is 32,\n\n /**\n * Title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() blockTitle: string;\n\n /**\n * Sub title of the block - works only if slider is true\n * @type {string}\n * @default ''\n * */\n @Prop() subTitle: string;\n\n /**\n * Slider Id, if not provided will be generated automatically\n * @type {string}\n * @default ''\n * */\n @Prop() sliderId: string;\n\n /**\n * Display 'ALL' URL\n * @type {string}\n * @default ''\n * */\n @Prop() displayAllUrl: string;\n\n /**\n * autoplay option for products slider\n */\n @Prop({ mutable: true }) autoplay: boolean\n\n /**\n * Source of the products, if api will get the products from the API, if json will get the products from the products prop\n * @type {string}\n * @default ''\n * */\n @Prop({\n reflect: true,\n mutable: true\n }) source: 'categories' | 'latest' | 'related' | 'brands' | 'json' | 'tags' | 'selected' | 'offers' | 'landing-page';\n\n /**\n * The source value, cloud be different values as following:\n * - array of ids when `source` in ['categories', 'brands', 'tags', 'selected']\n * - products payload when `source` = 'json'\n * - product_id when `source` = 'related'\n *\n * @type {string}\n * */\n @Prop() sourceValue: string;\n\n /**\n * Limit for number of products in the list.\n */\n @Prop({ mutable: true }) limit: number;\n\n /**\n * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n\n\n @State() productsData: any;\n @State() isReady: boolean;\n @State() sourceValueIsValid: boolean;\n @State() hasCustomComponent: boolean;\n @State() apiUrl: string = '';\n @State() parsedSourceValue: any;\n\n private getItemHTML(product) {\n if (this.hasCustomComponent) {\n return <div class=\"s-products-slider-card\">\n <custom-salla-product-card product={product} source={this.getSource()} source-value={this.getSourceValue()} />\n </div>;\n }\n\n return <div class=\"s-products-slider-card\">\n <salla-product-card\n show-quantity={this.getSource() == 'landing-page'}\n hide-add-btn={this.getSource() == 'landing-page'}\n shadow-on-hover={true}\n product={product} />\n </div>;\n }\n\n\n\n private canRender() {\n return this.sourceValueIsValid && this.isReady;\n }\n componentWillLoad() {\n return Helper.onSallaReadyPromise(() => {\n this.sourceValueIsValid = !!(this.getSourceValue() || this.isSourceWithoutValue());\n if (!this.sourceValueIsValid) {\n salla.logger.warn(`source-value prop is required for source [${\n this.getSource()\n }]`);\n return;\n }\n this.hasCustomComponent = !!customElements.get('custom-salla-product-card');\n\n if (this.source === 'json') {\n this.productsData = this.getSourceValue();\n this.isReady = true\n return;\n }\n return Helper.fetchProducts(this.getSource(), this.getSourceValue(), this.limit).then(res => {\n this.productsData = res.data\n this.isReady = true\n salla.event.emit('salla-products-slider::products.fetched', res.data);\n });\n });\n }\n\n private getSource() {\n return Helper.getProductsSource(this.source);\n }\n\n private getSourceValue() {\n return Helper.getProductsSourceValue(this.source, this.sourceValue);\n }\n\n render() {\n if ((this.getSource() == 'related' && !salla.config.get('store.settings.product.related_products_enabled')) || !this.canRender()) {\n return;\n }\n return (\n <Host class=\"s-products-slider-wrapper\">\n <salla-slider\n class=\"s-products-slider-slider\"\n id={this.sliderId || `s-products-slider-${Math.random().toString(36).substr(2, 9)}`}\n auto-play={this.autoplay}\n type=\"carousel\"\n block-title={this.blockTitle}\n block-subTitle={this.subTitle}\n display-all-url={this.displayAllUrl}\n sliderConfig={this.sliderConfig ? this.sliderConfig : null}\n >\n <div slot=\"items\">\n {this.productsData?.map(product => this.getItemHTML(product))}\n </div>\n </salla-slider>\n </Host>\n );\n }\n\n}\n"]}
|