@salla.sa/twilight-components 2.13.87 → 2.13.89
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-c5340b59.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-add-product-button_48.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-booking-field_2.cjs.entry.js +1 -3
- package/dist/cjs/salla-booking-field_2.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/salla-product-options.cjs.entry.js +2 -2
- package/dist/cjs/salla-product-options.cjs.entry.js.map +1 -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-booking-field/salla-booking-field.js +1 -4
- package/dist/collection/components/salla-booking-field/salla-booking-field.js.map +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +1 -1
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js.map +1 -1
- package/dist/collection/components/salla-product-options/salla-product-options.js +2 -2
- package/dist/collection/components/salla-product-options/salla-product-options.js.map +1 -1
- package/dist/collection/components/salla-products-list/salla-products-list.js +1 -1
- package/dist/collection/components/salla-products-list/salla-products-list.js.map +1 -1
- package/dist/collection/components/salla-products-slider/salla-products-slider.js +1 -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-booking-field2.js +1 -4
- package/dist/components/salla-booking-field2.js.map +1 -1
- package/dist/components/salla-filters-widget2.js +1 -1
- package/dist/components/salla-filters-widget2.js.map +1 -1
- package/dist/components/salla-product-options.js +2 -2
- package/dist/components/salla-product-options.js.map +1 -1
- package/dist/components/salla-products-list2.js.map +1 -1
- package/dist/components/salla-products-slider.js.map +1 -1
- package/dist/components/salla-quick-buy2.js.map +1 -1
- package/dist/esm/app-globals-0280e1d0.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-add-product-button_48.entry.js.map +1 -1
- package/dist/esm/salla-booking-field_2.entry.js +1 -3
- package/dist/esm/salla-booking-field_2.entry.js.map +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js.map +1 -1
- package/dist/esm/salla-product-options.entry.js +2 -2
- package/dist/esm/salla-product-options.entry.js.map +1 -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-0280e1d0.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_48.entry.js.map +1 -1
- package/dist/esm-es5/salla-booking-field_2.entry.js +1 -1
- package/dist/esm-es5/salla-booking-field_2.entry.js.map +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
- package/dist/esm-es5/salla-filters-widget.entry.js.map +1 -1
- package/dist/esm-es5/salla-product-options.entry.js +1 -1
- package/dist/esm-es5/salla-product-options.entry.js.map +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-0b3b39fc.entry.js.map +1 -1
- package/dist/twilight/p-1ae3cce4.system.entry.js +5 -0
- package/dist/twilight/p-1ae3cce4.system.entry.js.map +1 -0
- package/dist/twilight/{p-edee796d.system.entry.js → p-1b730cf7.system.entry.js} +2 -2
- package/dist/twilight/p-1b730cf7.system.entry.js.map +1 -0
- package/dist/twilight/p-1f9a3721.system.entry.js +5 -0
- package/dist/twilight/p-1f9a3721.system.entry.js.map +1 -0
- package/dist/twilight/p-411485fc.entry.js.map +1 -1
- package/dist/twilight/p-4a9df09e.js.map +1 -1
- package/dist/twilight/p-4c2194e3.system.js.map +1 -1
- package/dist/twilight/p-4e795693.system.entry.js.map +1 -1
- package/dist/twilight/p-54e1a882.system.js +1 -1
- package/dist/twilight/p-54e1a882.system.js.map +1 -1
- package/dist/twilight/p-666cefe6.system.entry.js.map +1 -1
- package/dist/twilight/p-e057192c.entry.js +5 -0
- package/dist/twilight/p-e057192c.entry.js.map +1 -0
- package/dist/twilight/{p-bebc6fdf.entry.js → p-e82c0359.entry.js} +2 -2
- package/dist/twilight/p-e82c0359.entry.js.map +1 -0
- package/dist/twilight/p-fc0f037b.entry.js +5 -0
- package/dist/twilight/p-fc0f037b.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-booking-field/salla-booking-field.d.ts +0 -1
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +2 -2
- package/dist/types/components/salla-products-slider/salla-products-slider.d.ts +2 -2
- package/dist/types/components.d.ts +4 -4
- package/package.json +5 -5
- package/dist/twilight/p-5ba21699.system.entry.js +0 -5
- package/dist/twilight/p-5ba21699.system.entry.js.map +0 -1
- package/dist/twilight/p-6cce417a.entry.js +0 -5
- package/dist/twilight/p-6cce417a.entry.js.map +0 -1
- package/dist/twilight/p-a642b326.system.entry.js +0 -5
- package/dist/twilight/p-a642b326.system.entry.js.map +0 -1
- package/dist/twilight/p-bd26e79e.entry.js +0 -5
- package/dist/twilight/p-bd26e79e.entry.js.map +0 -1
- package/dist/twilight/p-bebc6fdf.entry.js.map +0 -1
- package/dist/twilight/p-edee796d.system.entry.js.map +0 -1
package/dist/cjs/twilight.cjs.js
CHANGED
|
@@ -23,7 +23,7 @@ const patchBrowser = () => {
|
|
|
23
23
|
|
|
24
24
|
patchBrowser().then(options => {
|
|
25
25
|
appGlobals.globalScripts();
|
|
26
|
-
return index.bootstrapLazy(JSON.parse("[[\"salla-offer.cjs\",[[0,\"salla-offer\",{\"productCardComponent\":[1,\"product-card-component\"],\"offersList\":[32],\"userCurrency\":[32],\"isMultipleBank\":[32],\"title\":[32],\"currentPage\":[32],\"hasCustomComponent\":[32],\"isBankOffer\":[32],\"canRender\":[32],\"showOffer\":[32],\"offer_with_price_text\":[32],\"with_discount_text\":[32],\"product_discount_text\":[32],\"special_offer_text\":[32],\"multipleBankOfferTitleText\":[32],\"multipleBankOfferTitleDescription\":[32],\"buy_quantity_text\":[32]}]]],[\"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\"],\"productCardComponent\":[1,\"product-card-component\"],\"includes\":[1025],\"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-notifications.cjs\",[[0,\"salla-notifications\",{\"loadMoreText\":[1,\"load-more-text\"],\"itemPerPage\":[2,\"item-per-page\"],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"no_notifications_trans\":[32],\"load_more_text_trans\":[32]}]]],[\"salla-order-summary.cjs\",[[0,\"salla-order-summary\",{\"orderId\":[514,\"order-id\"],\"codeCopied\":[32],\"noItemFound\":[32],\"order_items\":[32]}]]],[\"salla-reviews.cjs\",[[0,\"salla-reviews\",{\"displayAllLink\":[516,\"display-all-link\"],\"source\":[513],\"sourceValue\":[513,\"source-value\"],\"limit\":[514],\"type\":[1],\"sort\":[1],\"hideCustomerInfo\":[4,\"hide-customer-info\"],\"reviews\":[32],\"isRTL\":[32],\"showReviews\":[32],\"testimonialText\":[32],\"displayAllLinkText\":[32]}]]],[\"salla-conditional-offer.cjs\",[[0,\"salla-conditional-offer\",{\"offer\":[32],\"products\":[32],\"isLoading\":[32],\"canRender\":[32]}]]],[\"salla-orders.cjs\",[[0,\"salla-orders\",{\"params\":[16],\"loadMoreText\":[1,\"load-more-text\"],\"orderNumberText\":[32],\"totalOrderText\":[32],\"orderDateText\":[32],\"orderStatusText\":[32],\"noOrderText\":[32],\"load_more_text_trans\":[32],\"languageCode\":[32],\"orders\":[32],\"pagination\":[32],\"hasInfiniteScroll\":[32],\"total\":[32],\"nextPage\":[32],\"showPlaceholder\":[32]}]]],[\"salla-advertisement.cjs\",[[0,\"salla-advertisement\",{\"position\":[32],\"advertisements\":[32],\"advertIcon\":[32],\"currentSlug\":[32]}]]],[\"salla-app-install-alert.cjs\",[[0,\"salla-app-install-alert\",{\"data\":[32],\"ctaLink\":[32],\"open\":[32],\"closing\":[32]}]]],[\"salla-apps-icons.cjs\",[[0,\"salla-apps-icons\",{\"hideTitle\":[4,\"hide-title\"],\"appsTitle\":[1,\"apps-title\"],\"vertical\":[4],\"apps\":[32]}]]],[\"salla-contacts.cjs\",[[0,\"salla-contacts\",{\"contactsTitle\":[1025,\"contacts-title\"],\"hideTitle\":[4,\"hide-title\"],\"isHeader\":[4,\"is-header\"],\"horizontal\":[4],\"iconsOnly\":[4,\"icons-only\"],\"contacts\":[32],\"iconsList\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32],\"mispayActive\":[32],\"installment_sheria_text\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-metadata.cjs\",[[0,\"salla-metadata\",{\"entity\":[1],\"entityId\":[2,\"entity-id\"],\"specs\":[32],\"download\":[32]}]]],[\"salla-payments.cjs\",[[0,\"salla-payments\",{\"exclude\":[1040]}]]],[\"salla-social.cjs\",[[0,\"salla-social\",{\"links\":[32],\"iconsList\":[32]}]]],[\"salla-add-product-button_48.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\"],\"inline\":[516],\"withoutReload\":[4,\"without-reload\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"isModalOpen\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"hasError\":[32],\"errorMessage\":[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-user-profile\",{\"customFields\":[1,\"custom-fields\"],\"minAge\":[2,\"min-age\"],\"userData\":[32],\"userDefinedFields\":[32],\"disableAction\":[32],\"isLoading\":[32],\"first_name_trans\":[32],\"last_name_trans\":[32],\"birthday_trans\":[32],\"birthday_placeholder_trans\":[32],\"gender_trans\":[32],\"gender_placeholder_trans\":[32],\"male_trans\":[32],\"female_trans\":[32],\"email_trans\":[32],\"mobile_trans\":[32],\"save_btn_trans\":[32],\"drag_and_drop_trans\":[32],\"browse_trans\":[32],\"email_required_trans\":[32],\"invalid_email_trans\":[32],\"setCustomFields\":[64]}],[0,\"salla-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"template\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"storePrice\":[32],\"theDeveloper\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32],\"isRtl\":[32]}],[0,\"salla-comments\",{\"itemId\":[2,\"item-id\"],\"loadMoreText\":[1,\"load-more-text\"],\"hideForm\":[4,\"hide-form\"],\"blockTitle\":[1,\"block-title\"],\"hideTitle\":[4,\"hide-title\"],\"type\":[1],\"showFormAvatar\":[4,\"show-form-avatar\"],\"sort\":[1],\"testimonials\":[4],\"comments\":[32],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"noComments\":[32],\"comment_title\":[32],\"comment_name\":[32],\"placeholder_text\":[32],\"reload\":[64]}],[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],\"maxWords\":[2,\"max-words\"],\"showAction\":[4,\"show-action\"],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-menu\",{\"source\":[1],\"sourceValue\":[1,\"source-value\"],\"topnav\":[4],\"useReactLink\":[4,\"use-react-link\"],\"limit\":[2],\"menus\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64],\"refresh\":[64]}],[0,\"salla-breadcrumb\",{\"breadcrumbs\":[32]}],[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-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],\"hasError\":[32],\"errorMessage\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[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]}],[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"rowCards\":[516,\"row-cards\"],\"autoload\":[1028],\"loadMoreText\":[1,\"load-more-text\"],\"productCardComponent\":[1,\"product-card-component\"],\"includes\":[1025],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"endOfText\":[32],\"failedLoadMore\":[32],\"currentPage\":[32],\"currentCategoryIdFilter\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}],[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]}],[0,\"salla-comment-item\",{\"comment\":[16],\"hideBought\":[16],\"has_bought_trans\":[32],\"rated_trans\":[32],\"waiting_approval_trans\":[32],\"has_order_trans\":[32]}],[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\"]]],[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],\"isApplePayActive\":[32],\"buyNowText\":[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]}],[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-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]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-quick-buy\",{\"type\":[1025],\"productId\":[1025,\"product-id\"],\"cartId\":[1025,\"cart-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"applePayOnly\":[1028,\"apple-pay-only\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[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],\"autofocus\":[516],\"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],\"type\":[513],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[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],\"page\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-notification-item.cjs\",[[0,\"salla-notification-item\",{\"notification\":[16]}]]],[\"salla-booking-field_2.cjs\",[[0,\"salla-booking-field\",{\"option\":[16],\"productId\":[16],\"reservationsInput\":[32],\"priceLabel\":[32],\"bookNowLabel\":[32],\"editLabel\":[32],\"bookedLabel\":[32],\"selectDate\":[32],\"bookingUrl\":[32],\"iframeReady\":[32],\"reservations\":[32]}],[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]],[\"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],\"typing\":[32],\"isMin\":[32],\"isRTL\":[32],\"reset\":[64]}]]]]"), options);
|
|
26
|
+
return index.bootstrapLazy(JSON.parse("[[\"salla-offer.cjs\",[[0,\"salla-offer\",{\"productCardComponent\":[1,\"product-card-component\"],\"offersList\":[32],\"userCurrency\":[32],\"isMultipleBank\":[32],\"title\":[32],\"currentPage\":[32],\"hasCustomComponent\":[32],\"isBankOffer\":[32],\"canRender\":[32],\"showOffer\":[32],\"offer_with_price_text\":[32],\"with_discount_text\":[32],\"product_discount_text\":[32],\"special_offer_text\":[32],\"multipleBankOfferTitleText\":[32],\"multipleBankOfferTitleDescription\":[32],\"buy_quantity_text\":[32]}]]],[\"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\"],\"productCardComponent\":[1,\"product-card-component\"],\"includes\":[1025],\"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-notifications.cjs\",[[0,\"salla-notifications\",{\"loadMoreText\":[1,\"load-more-text\"],\"itemPerPage\":[2,\"item-per-page\"],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"no_notifications_trans\":[32],\"load_more_text_trans\":[32]}]]],[\"salla-order-summary.cjs\",[[0,\"salla-order-summary\",{\"orderId\":[514,\"order-id\"],\"codeCopied\":[32],\"noItemFound\":[32],\"order_items\":[32]}]]],[\"salla-reviews.cjs\",[[0,\"salla-reviews\",{\"displayAllLink\":[516,\"display-all-link\"],\"source\":[513],\"sourceValue\":[513,\"source-value\"],\"limit\":[514],\"type\":[1],\"sort\":[1],\"hideCustomerInfo\":[4,\"hide-customer-info\"],\"reviews\":[32],\"isRTL\":[32],\"showReviews\":[32],\"testimonialText\":[32],\"displayAllLinkText\":[32]}]]],[\"salla-conditional-offer.cjs\",[[0,\"salla-conditional-offer\",{\"offer\":[32],\"products\":[32],\"isLoading\":[32],\"canRender\":[32]}]]],[\"salla-orders.cjs\",[[0,\"salla-orders\",{\"params\":[16],\"loadMoreText\":[1,\"load-more-text\"],\"orderNumberText\":[32],\"totalOrderText\":[32],\"orderDateText\":[32],\"orderStatusText\":[32],\"noOrderText\":[32],\"load_more_text_trans\":[32],\"languageCode\":[32],\"orders\":[32],\"pagination\":[32],\"hasInfiniteScroll\":[32],\"total\":[32],\"nextPage\":[32],\"showPlaceholder\":[32]}]]],[\"salla-advertisement.cjs\",[[0,\"salla-advertisement\",{\"position\":[32],\"advertisements\":[32],\"advertIcon\":[32],\"currentSlug\":[32]}]]],[\"salla-app-install-alert.cjs\",[[0,\"salla-app-install-alert\",{\"data\":[32],\"ctaLink\":[32],\"open\":[32],\"closing\":[32]}]]],[\"salla-apps-icons.cjs\",[[0,\"salla-apps-icons\",{\"hideTitle\":[4,\"hide-title\"],\"appsTitle\":[1,\"apps-title\"],\"vertical\":[4],\"apps\":[32]}]]],[\"salla-contacts.cjs\",[[0,\"salla-contacts\",{\"contactsTitle\":[1025,\"contacts-title\"],\"hideTitle\":[4,\"hide-title\"],\"isHeader\":[4,\"is-header\"],\"horizontal\":[4],\"iconsOnly\":[4,\"icons-only\"],\"contacts\":[32],\"iconsList\":[32]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32],\"mispayActive\":[32],\"installment_sheria_text\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-metadata.cjs\",[[0,\"salla-metadata\",{\"entity\":[1],\"entityId\":[2,\"entity-id\"],\"specs\":[32],\"download\":[32]}]]],[\"salla-payments.cjs\",[[0,\"salla-payments\",{\"exclude\":[1040]}]]],[\"salla-social.cjs\",[[0,\"salla-social\",{\"links\":[32],\"iconsList\":[32]}]]],[\"salla-add-product-button_48.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\"],\"inline\":[516],\"withoutReload\":[4,\"without-reload\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"isModalOpen\":[32],\"currentPhone\":[32],\"currentEmail\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"hasError\":[32],\"errorMessage\":[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-user-profile\",{\"customFields\":[1,\"custom-fields\"],\"minAge\":[2,\"min-age\"],\"userData\":[32],\"userDefinedFields\":[32],\"disableAction\":[32],\"isLoading\":[32],\"first_name_trans\":[32],\"last_name_trans\":[32],\"birthday_trans\":[32],\"birthday_placeholder_trans\":[32],\"gender_trans\":[32],\"gender_placeholder_trans\":[32],\"male_trans\":[32],\"female_trans\":[32],\"email_trans\":[32],\"mobile_trans\":[32],\"save_btn_trans\":[32],\"drag_and_drop_trans\":[32],\"browse_trans\":[32],\"email_required_trans\":[32],\"invalid_email_trans\":[32],\"setCustomFields\":[64]}],[0,\"salla-bottom-alert\",{\"type\":[513],\"icon\":[513],\"message\":[513],\"actionUrl\":[513,\"action-url\"],\"actionLabel\":[513,\"action-label\"],\"storeId\":[32],\"template\":[32],\"loading\":[32],\"templateData\":[32],\"defaultMessage\":[32],\"defaultActionLabel\":[32],\"storeFeatures\":[32],\"storeDetails\":[32],\"storePrice\":[32],\"theDeveloper\":[32],\"templateInformation\":[32],\"buyTheTemplate\":[32],\"isRtl\":[32]}],[0,\"salla-comments\",{\"itemId\":[2,\"item-id\"],\"loadMoreText\":[1,\"load-more-text\"],\"hideForm\":[4,\"hide-form\"],\"blockTitle\":[1,\"block-title\"],\"hideTitle\":[4,\"hide-title\"],\"type\":[1],\"showFormAvatar\":[4,\"show-form-avatar\"],\"sort\":[1],\"testimonials\":[4],\"comments\":[32],\"pagination\":[32],\"total\":[32],\"showPlaceholder\":[32],\"nextPage\":[32],\"noComments\":[32],\"comment_title\":[32],\"comment_name\":[32],\"placeholder_text\":[32],\"reload\":[64]}],[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],\"maxWords\":[2,\"max-words\"],\"showAction\":[4,\"show-action\"],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-menu\",{\"source\":[1],\"sourceValue\":[1,\"source-value\"],\"topnav\":[4],\"useReactLink\":[4,\"use-react-link\"],\"limit\":[2],\"menus\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64],\"refresh\":[64]}],[0,\"salla-breadcrumb\",{\"breadcrumbs\":[32]}],[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-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],\"hasError\":[32],\"errorMessage\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[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]}],[0,\"salla-products-list\",{\"source\":[1537],\"sourceValue\":[1032,\"source-value\"],\"limit\":[1026],\"sortBy\":[1025,\"sort-by\"],\"filtersResults\":[1540,\"filters-results\"],\"horizontalCards\":[516,\"horizontal-cards\"],\"rowCards\":[516,\"row-cards\"],\"autoload\":[1028],\"loadMoreText\":[1,\"load-more-text\"],\"productCardComponent\":[1,\"product-card-component\"],\"includes\":[1025],\"page\":[32],\"nextPage\":[32],\"hasInfiniteScroll\":[32],\"hasCustomComponent\":[32],\"sourceValueIsValid\":[32],\"placeholderText\":[32],\"endOfText\":[32],\"failedLoadMore\":[32],\"currentPage\":[32],\"currentCategoryIdFilter\":[32],\"isReady\":[32],\"showPlaceholder\":[32],\"parsedFilters\":[32],\"setFilters\":[64],\"reload\":[64]}],[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]}],[0,\"salla-comment-item\",{\"comment\":[16],\"hideBought\":[16],\"has_bought_trans\":[32],\"rated_trans\":[32],\"waiting_approval_trans\":[32],\"has_order_trans\":[32]}],[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\"]]],[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],\"isApplePayActive\":[32],\"buyNowText\":[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]}],[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-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]}],[4,\"salla-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"height\":[1025],\"header\":[1025],\"stripped\":[1028],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-quick-buy\",{\"type\":[1025],\"productId\":[1025,\"product-id\"],\"cartId\":[1025,\"cart-id\"],\"amount\":[1538],\"currency\":[1025],\"options\":[16],\"isRequireShipping\":[1028,\"is-require-shipping\"],\"applePayOnly\":[1028,\"apple-pay-only\"],\"isApplePayActive\":[32],\"quickBuy\":[32]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2],\"reviews\":[2]}],[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],\"autofocus\":[516],\"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],\"type\":[513],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[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],\"page\":[32],\"setWidgetHeight\":[64],\"reset\":[64],\"showMore\":[64],\"toggleWidget\":[64]}]]],[\"salla-notification-item.cjs\",[[0,\"salla-notification-item\",{\"notification\":[16]}]]],[\"salla-booking-field_2.cjs\",[[0,\"salla-booking-field\",{\"option\":[16],\"productId\":[16],\"reservationsInput\":[32],\"bookNowLabel\":[32],\"editLabel\":[32],\"bookedLabel\":[32],\"selectDate\":[32],\"bookingUrl\":[32],\"iframeReady\":[32],\"reservations\":[32]}],[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]],[\"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],\"typing\":[32],\"isMin\":[32],\"isRTL\":[32],\"reset\":[64]}]]]]"), options);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
exports.setNonce = index.setNonce;
|
|
@@ -10,7 +10,6 @@ export class SallaBookingField {
|
|
|
10
10
|
this.reservationsInput = undefined;
|
|
11
11
|
this.option = undefined;
|
|
12
12
|
this.productId = undefined;
|
|
13
|
-
this.priceLabel = salla.lang.get('pages.products.price');
|
|
14
13
|
this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment', 'حجز موعد');
|
|
15
14
|
this.editLabel = salla.lang.get('pages.cart.edit_an_appointment', 'تعديل الموعد');
|
|
16
15
|
this.bookedLabel = salla.lang.get('pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');
|
|
@@ -34,7 +33,6 @@ export class SallaBookingField {
|
|
|
34
33
|
await setNestedAsync('en.trans', 'pages.cart.booked_successfully', 'Booked Successfully');
|
|
35
34
|
await setNestedAsync('ar.trans', 'pages.cart.select_appointment_date', 'حدد تاريخ الموعد');
|
|
36
35
|
await setNestedAsync('en.trans', 'pages.cart.select_appointment_date', 'Select appointment date');
|
|
37
|
-
this.priceLabel = salla.lang.get('pages.products.price');
|
|
38
36
|
this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment');
|
|
39
37
|
this.editLabel = salla.lang.get('pages.cart.edit_an_appointment');
|
|
40
38
|
this.bookedLabel = salla.lang.get('pages.cart.booked_successfully');
|
|
@@ -107,7 +105,7 @@ export class SallaBookingField {
|
|
|
107
105
|
});
|
|
108
106
|
}
|
|
109
107
|
render() {
|
|
110
|
-
return (h(Host, null, h("div", { class: "s-booking-field-main" }, h("div", { class: "s-booking-field-price" }, h("span", null,
|
|
108
|
+
return (h(Host, null, h("div", { class: "s-booking-field-main" }, h("div", { class: "s-booking-field-price" }, h("span", null, salla.money(this.option.price))), h("salla-button", { class: "s-booking-field-book-now", size: "small", loaderPosition: 'center', fill: "outline", onClick: event => this.openBookingModal(event) }, h("span", { class: "s-booking-field-book-now-content" }, h("span", { innerHTML: BookingTime }), this.reservations.length ? this.editLabel : this.bookNowLabel))), this.reservations.length ? (h("div", { class: "s-booking-field-reservations" }, this.reservations.map((reservation, index) => (h("div", { key: index, class: "s-booking-field-reservations-item" }, this.renderReservationDate(reservation), this.renderReservationTime(reservation)))))) : '', h("input", { class: "s-hidden", name: this.option.name, required: this.option.required, value: JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations), ref: reservations => this.reservationsInput = reservations }), this.iframeReady && this.bookingModal()));
|
|
111
109
|
}
|
|
112
110
|
renderReservationDate(reservation) {
|
|
113
111
|
return h("span", { class: reservation.from_timestamp ? 's-booking-field-reservations-has-time' : '' }, h("i", { class: "s-booking-field-reservations-icon", innerHTML: Calendar }), reservation.date);
|
|
@@ -177,7 +175,6 @@ export class SallaBookingField {
|
|
|
177
175
|
static get states() {
|
|
178
176
|
return {
|
|
179
177
|
"reservationsInput": {},
|
|
180
|
-
"priceLabel": {},
|
|
181
178
|
"bookNowLabel": {},
|
|
182
179
|
"editLabel": {},
|
|
183
180
|
"bookedLabel": {},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salla-booking-field.js","sourceRoot":"","sources":["../../../src/components/salla-booking-field/salla-booking-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE9F,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAKjD,MAAM,OAAO,iBAAiB;EAC5B;;;;sBA8C8B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC;wBACpC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,UAAU,CAAC;qBAC/D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,cAAc,CAAC;uBAC9D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,wBAAwB,CAAC;sBAC3E,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oCAAoC,EAAE,kBAAkB,CAAC;sBACxE,EAAE;uBACA,KAAK;wBACE,EAAE;IApDvC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAC1C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;UAC7B,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,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AM;MACrE,WAAW,CAAC,IAAI,CACd,CAAC;EACV,CAAC;EAED,qBAAqB,CAAC,WAAuB;IAC3C,IAAG,CAAC,WAAW,CAAC,cAAc,EAAC;MAC3B,OAAO,EAAE,CAAC;KACb;IACD,OAAO,YAAM,KAAK,EAAC,mCAAmC;MAClD,SAAG,KAAK,EAAC,mCAAmC,EAAC,SAAS,EAAE,QAAQ,GAAM;MACtE;;QAAQ,WAAW,CAAC,cAAc;;QAAK,WAAW,CAAC,YAAY,CAAQ,CACpE,CAAA;EACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, State, Event, EventEmitter } from '@stencil/core';\nimport { Option, Reservation } from './interfaces';\nimport BookingTime from '../../assets/svg/calendar-time.svg';\nimport Calendar from '../../assets/svg/calendar.svg';\nimport TimeIcon from '../../assets/svg/time.svg';\n@Component({\n tag: 'salla-booking-field',\n styleUrl: 'salla-booking-field.scss'\n})\nexport class SallaBookingField {\n constructor() {\n salla.lang.onLoaded(() => {\n const setNestedAsync = (lang, key, value) => {\n return new Promise((resolve) => {\n salla.helpers.setNested(salla.lang.messages[lang], key, value);\n resolve(true);\n });\n };\n\n const setTranslations = async () => {\n await setNestedAsync('ar.trans', 'pages.cart.book_an_appointment', 'حجز موعد');\n await setNestedAsync('en.trans', 'pages.cart.book_an_appointment', 'Book an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.edit_an_appointment', 'تعديل الموعد');\n await setNestedAsync('en.trans', 'pages.cart.edit_an_appointment', 'Edit an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n await setNestedAsync('en.trans', 'pages.cart.booked_successfully', 'Booked Successfully');\n await setNestedAsync('ar.trans', 'pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n await setNestedAsync('en.trans', 'pages.cart.select_appointment_date', 'Select appointment date');\n\n this.priceLabel = salla.lang.get('pages.products.price');\n this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment');\n this.editLabel = salla.lang.get('pages.cart.edit_an_appointment');\n this.bookedLabel = salla.lang.get('pages.cart.booked_successfully');\n this.selectDate = salla.lang.get('pages.cart.select_appointment_date');\n };\n\n setTranslations();\n });\n\n Salla.event.on('booking::open', (bookingUrl) => {\n this.bookingUrl = salla.url.addParamToUrl('product_id', this.productId, bookingUrl);\n this.iframeReady = true;\n setTimeout(() => {\n this.modal.setTitle(this.selectDate)\n this.modal.open();\n }, 100);\n });\n\n }\n\n private modal: HTMLSallaModalElement;\n private iframe: HTMLIFrameElement;\n @State() reservationsInput: HTMLInputElement;\n @Prop() option: Option;\n @Prop() productId: Number;\n @Element() host: HTMLElement;\n @State() priceLabel: string = salla.lang.get('pages.products.price');\n @State() bookNowLabel: string = salla.lang.get('pages.cart.book_an_appointment', 'حجز موعد');\n @State() editLabel: string = salla.lang.get('pages.cart.edit_an_appointment', 'تعديل الموعد');\n @State() bookedLabel: string = salla.lang.get('pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n @State() selectDate: string = salla.lang.get('pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n @State() bookingUrl: string = '';\n @State() iframeReady: boolean = false;\n @State() reservations: Reservation[] = [];\n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n\n private openBookingModal(event) {\n event.preventDefault();\n if (salla.config.isGuest()) {\n salla.auth.api.setAfterLoginEvent('booking::open', this.productId);\n salla.event.dispatch('login::open');\n return;\n }\n return salla.booking.add(this.productId, false)\n .then((resp) => {\n if (resp.data.redirect.to !== 'booking') {\n throw new Error('Unexpected redirect!');\n }\n salla.event.dispatch('booking::open', resp.data.redirect.url);\n })\n .catch((error) =>{\n salla.error(salla.lang.get('common.errors.error_occurred'));\n salla.logger.error(error.response);\n });\n }\n\n componentWillLoad() {\n if (this.option && this.option.details.length) {\n this.reservations = this.option.details\n }\n }\n private bookingModal() {\n return (\n <salla-modal class=\"s-booking-field-modal\" ref={modal => this.modal = modal} width=\"md\" position=\"middle\" noPadding isClosable={false}>\n <iframe\n ref={iframe => this.iframe = iframe}\n src={this.bookingUrl}\n frameborder=\"0\">\n </iframe>\n </salla-modal>\n )\n }\n componentDidLoad() {\n window.addEventListener('message', (event) => {\n if (event.data.source != \"booking\") {\n return;\n }\n let action = event.data.type;\n let value = event.data.message;\n localStorage.getItem('debug') && console.log(`recived an action:${action}`, event.data);\n if (action == 'error') {\n salla.notify.error(value.fields.reservations[0]);\n }\n\n if (action == 'success') {\n this.reservations = value.reservations;\n salla.notify.success(this.bookedLabel);\n this.modal.close();\n }\n\n if (action == \"height\") {\n return this.iframe.height = value?.height + \"px\";\n }\n\n });\n\n this.reservationsInput.addEventListener('invalid', e => {\n this.invalidInput.emit(e);\n });\n this.reservationsInput.addEventListener('input', () => {\n this.reservationsInput.setCustomValidity('');\n this.reservationsInput.reportValidity();\n });\n }\n render() {\n return (\n <Host>\n <div class=\"s-booking-field-main\">\n <div class=\"s-booking-field-price\">\n <span>{this.priceLabel}</span>\n <span>{salla.money(this.option.price)}</span>\n </div>\n <salla-button class=\"s-booking-field-book-now\" size=\"small\" loaderPosition='center' fill=\"outline\" onClick={event => this.openBookingModal(event)}>\n <span class=\"s-booking-field-book-now-content\">\n <span innerHTML={BookingTime}></span>\n {this.reservations.length ? this.editLabel : this.bookNowLabel}\n </span>\n </salla-button>\n </div>\n {this.reservations.length ? (\n <div class=\"s-booking-field-reservations\">\n {this.reservations.map((reservation, index) => (\n <div key={index} class=\"s-booking-field-reservations-item\">\n {this.renderReservationDate(reservation)}\n {this.renderReservationTime(reservation)}\n\n </div>\n ))}\n </div>\n ) : ''}\n <input class=\"s-hidden\" name={this.option.name} required={this.option.required} value={JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations)}\n ref={reservations => this.reservationsInput = reservations} />\n {this.iframeReady && this.bookingModal()}\n </Host>\n );\n }\n\n renderReservationDate(reservation:Reservation){\n return <span class={reservation.from_timestamp ? 's-booking-field-reservations-has-time' : ''}>\n <i class=\"s-booking-field-reservations-icon\" innerHTML={Calendar}></i>\n {reservation.date}\n </span>;\n }\n\n renderReservationTime(reservation:Reservation){\n if(!reservation.from_timestamp){\n return '';\n }\n return <span class=\"s-booking-field-reservations-time\">\n <i class=\"s-booking-field-reservations-icon\" innerHTML={TimeIcon}></i>\n <span> {reservation.from_timestamp} - {reservation.to_timestamp}</span>\n </span>\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"salla-booking-field.js","sourceRoot":"","sources":["../../../src/components/salla-booking-field/salla-booking-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE9F,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAC7D,OAAO,QAAQ,MAAM,+BAA+B,CAAC;AACrD,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAKjD,MAAM,OAAO,iBAAiB;EAC5B;;;;wBA8CgC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,UAAU,CAAC;qBAC/D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,cAAc,CAAC;uBAC9D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gCAAgC,EAAE,wBAAwB,CAAC;sBAC3E,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oCAAoC,EAAE,kBAAkB,CAAC;sBACxE,EAAE;uBACA,KAAK;wBACE,EAAE;IAnDvC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAC1C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;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AqB,CAAC,WAAuB;IAC3C,IAAG,CAAC,WAAW,CAAC,cAAc,EAAC;MAC3B,OAAO,EAAE,CAAC;KACb;IACD,OAAO,YAAM,KAAK,EAAC,mCAAmC;MAClD,SAAG,KAAK,EAAC,mCAAmC,EAAC,SAAS,EAAE,QAAQ,GAAM;MACtE;;QAAQ,WAAW,CAAC,cAAc;;QAAK,WAAW,CAAC,YAAY,CAAQ,CACpE,CAAA;EACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, State, Event, EventEmitter } from '@stencil/core';\nimport { Option, Reservation } from './interfaces';\nimport BookingTime from '../../assets/svg/calendar-time.svg';\nimport Calendar from '../../assets/svg/calendar.svg';\nimport TimeIcon from '../../assets/svg/time.svg';\n@Component({\n tag: 'salla-booking-field',\n styleUrl: 'salla-booking-field.scss'\n})\nexport class SallaBookingField {\n constructor() {\n salla.lang.onLoaded(() => {\n const setNestedAsync = (lang, key, value) => {\n return new Promise((resolve) => {\n salla.helpers.setNested(salla.lang.messages[lang], key, value);\n resolve(true);\n });\n };\n\n const setTranslations = async () => {\n await setNestedAsync('ar.trans', 'pages.cart.book_an_appointment', 'حجز موعد');\n await setNestedAsync('en.trans', 'pages.cart.book_an_appointment', 'Book an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.edit_an_appointment', 'تعديل الموعد');\n await setNestedAsync('en.trans', 'pages.cart.edit_an_appointment', 'Edit an Appointment');\n await setNestedAsync('ar.trans', 'pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n await setNestedAsync('en.trans', 'pages.cart.booked_successfully', 'Booked Successfully');\n await setNestedAsync('ar.trans', 'pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n await setNestedAsync('en.trans', 'pages.cart.select_appointment_date', 'Select appointment date');\n\n \n this.bookNowLabel = salla.lang.get('pages.cart.book_an_appointment');\n this.editLabel = salla.lang.get('pages.cart.edit_an_appointment');\n this.bookedLabel = salla.lang.get('pages.cart.booked_successfully');\n this.selectDate = salla.lang.get('pages.cart.select_appointment_date');\n };\n\n setTranslations();\n });\n\n Salla.event.on('booking::open', (bookingUrl) => {\n this.bookingUrl = salla.url.addParamToUrl('product_id', this.productId, bookingUrl);\n this.iframeReady = true;\n setTimeout(() => {\n this.modal.setTitle(this.selectDate)\n this.modal.open();\n }, 100);\n });\n\n }\n\n private modal: HTMLSallaModalElement;\n private iframe: HTMLIFrameElement;\n @State() reservationsInput: HTMLInputElement;\n @Prop() option: Option;\n @Prop() productId: Number;\n @Element() host: HTMLElement;\n @State() bookNowLabel: string = salla.lang.get('pages.cart.book_an_appointment', 'حجز موعد');\n @State() editLabel: string = salla.lang.get('pages.cart.edit_an_appointment', 'تعديل الموعد');\n @State() bookedLabel: string = salla.lang.get('pages.cart.booked_successfully', 'تمت اضافة الموعد بنجاح');\n @State() selectDate: string = salla.lang.get('pages.cart.select_appointment_date', 'حدد تاريخ الموعد');\n @State() bookingUrl: string = '';\n @State() iframeReady: boolean = false;\n @State() reservations: Reservation[] = [];\n /**\n * Event emitted when the input is invalid.\n */\n @Event() invalidInput: EventEmitter<any>;\n\n private openBookingModal(event) {\n event.preventDefault();\n if (salla.config.isGuest()) {\n salla.auth.api.setAfterLoginEvent('booking::open', this.productId);\n salla.event.dispatch('login::open');\n return;\n }\n return salla.booking.add(this.productId, false)\n .then((resp) => {\n if (resp.data.redirect.to !== 'booking') {\n throw new Error('Unexpected redirect!');\n }\n salla.event.dispatch('booking::open', resp.data.redirect.url);\n })\n .catch((error) =>{\n salla.error(salla.lang.get('common.errors.error_occurred'));\n salla.logger.error(error.response);\n });\n }\n\n componentWillLoad() {\n if (this.option && this.option.details.length) {\n this.reservations = this.option.details\n }\n }\n private bookingModal() {\n return (\n <salla-modal class=\"s-booking-field-modal\" ref={modal => this.modal = modal} width=\"md\" position=\"middle\" noPadding isClosable={false}>\n <iframe\n ref={iframe => this.iframe = iframe}\n src={this.bookingUrl}\n frameborder=\"0\">\n </iframe>\n </salla-modal>\n )\n }\n componentDidLoad() {\n window.addEventListener('message', (event) => {\n if (event.data.source != \"booking\") {\n return;\n }\n let action = event.data.type;\n let value = event.data.message;\n localStorage.getItem('debug') && console.log(`recived an action:${action}`, event.data);\n if (action == 'error') {\n salla.notify.error(value.fields.reservations[0]);\n }\n\n if (action == 'success') {\n this.reservations = value.reservations;\n salla.notify.success(this.bookedLabel);\n this.modal.close();\n }\n\n if (action == \"height\") {\n return this.iframe.height = value?.height + \"px\";\n }\n\n });\n\n this.reservationsInput.addEventListener('invalid', e => {\n this.invalidInput.emit(e);\n });\n this.reservationsInput.addEventListener('input', () => {\n this.reservationsInput.setCustomValidity('');\n this.reservationsInput.reportValidity();\n });\n }\n render() {\n return (\n <Host>\n <div class=\"s-booking-field-main\">\n <div class=\"s-booking-field-price\">\n <span>{salla.money(this.option.price)}</span>\n </div>\n <salla-button class=\"s-booking-field-book-now\" size=\"small\" loaderPosition='center' fill=\"outline\" onClick={event => this.openBookingModal(event)}>\n <span class=\"s-booking-field-book-now-content\">\n <span innerHTML={BookingTime}></span>\n {this.reservations.length ? this.editLabel : this.bookNowLabel}\n </span>\n </salla-button>\n </div>\n {this.reservations.length ? (\n <div class=\"s-booking-field-reservations\">\n {this.reservations.map((reservation, index) => (\n <div key={index} class=\"s-booking-field-reservations-item\">\n {this.renderReservationDate(reservation)}\n {this.renderReservationTime(reservation)}\n\n </div>\n ))}\n </div>\n ) : ''}\n <input class=\"s-hidden\" name={this.option.name} required={this.option.required} value={JSON.stringify(this.reservations) === '[]' ? '' : JSON.stringify(this.reservations)}\n ref={reservations => this.reservationsInput = reservations} />\n {this.iframeReady && this.bookingModal()}\n </Host>\n );\n }\n\n renderReservationDate(reservation:Reservation){\n return <span class={reservation.from_timestamp ? 's-booking-field-reservations-has-time' : ''}>\n <i class=\"s-booking-field-reservations-icon\" innerHTML={Calendar}></i>\n {reservation.date}\n </span>;\n }\n\n renderReservationTime(reservation:Reservation){\n if(!reservation.from_timestamp){\n return '';\n }\n return <span class=\"s-booking-field-reservations-time\">\n <i class=\"s-booking-field-reservations-icon\" innerHTML={TimeIcon}></i>\n <span> {reservation.from_timestamp} - {reservation.to_timestamp}</span>\n </span>\n }\n}\n"]}
|
|
@@ -90,7 +90,7 @@ export class SallaFiltersWidget {
|
|
|
90
90
|
//@ts-ignore
|
|
91
91
|
return option.values.map((filterOption, index) => {
|
|
92
92
|
let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);
|
|
93
|
-
return h("label", { class: "s-filters-label", htmlFor: `${option.key}-option-${
|
|
93
|
+
return h("label", { class: "s-filters-label", htmlFor: `${option.key}-option-${value}`, key: `${option.key}-option-${value}` }, h("input", { id: `${option.key}-option-${value}`, name: option.key, type: "radio", checked: this.isSelectedOption(option, value), class: `s-filters-radio`, onChange: event => this.changed.emit({ event, option, value }) }), this.getOptionLabel(option, filterOption));
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
isSelectedOption(option, value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"salla-filters-widget.js","sourceRoot":"","sources":["../../../src/components/salla-filters-widget/salla-filters-widget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAU,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAMxE,MAAM,OAAO,kBAAkB;;IAwBrB,eAAU,GAAW,GAAG,CAAC;;;;kBAEN,IAAI;sBACA,KAAK;yBACH,YAAY;yBACZ,SAAS;gBACrB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;;EAO7C,iBAAiB;IACf,4DAA4D;IAC5D,IAAI,CA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AC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAK,CAEhG,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Method, State, Prop, Event, Element } from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.offsetHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${index}`}>\n <input\n id={`${option.key}-option-${index}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"salla-filters-widget.js","sourceRoot":"","sources":["../../../src/components/salla-filters-widget/salla-filters-widget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAU,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAMxE,MAAM,OAAO,kBAAkB;;IAwBrB,eAAU,GAAW,GAAG,CAAC;;;;kBAEN,IAAI;sBACA,KAAK;yBACH,YAAY;yBACZ,SAAS;gBACrB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;;EAO7C,iBAAiB;IACf,4DAA4D;IAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IACrH,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;MACjB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC,CAAA;IACF,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;MACvB,IAAI,CAAC,aAAa,GAAG,KAAK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per';\nimport { Filter, FilterOptionTypes } from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-filters-widget',\n styleUrl: 'salla-filters-widget.scss',\n})\nexport class SallaFiltersWidget {\n @Element() host: HTMLElement;\n\n /**\n * Show more or less filter options.\n */\n @Prop({ mutable: true }) withLoadMore: boolean;\n\n /**\n * Selected filter options value.\n */\n @Prop({ reflect: true }) filtersData: object;\n\n /**\n * Filter option along with possible values.\n */\n @Prop({ reflect: true }) option: Filter;\n\n\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string = \"عرض المزيد\";\n @State() showLessLabel: string = \"عرض أقل\";\n @State() page: any = salla.config.get('page');\n\n /**\n * Custom event emitted up on filter option selection changes.\n */\n @Event() changed: any;\n\n connectedCallback() {\n //lets be smart and don't show 5 and more link for 8 options\n this.withLoadMore = this.option.key != 'price' && Array.isArray(this.option.values) && this.option.values.length > 8;\n salla.onReady(() => {\n this.page = salla.config.get('page');\n })\n salla.lang.onLoaded(() => {\n this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel)\n this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel)\n })\n }\n\n componentDidLoad() {\n this.widgetValues.scrollHeight < this.initHeight && (this.withLoadMore = false);\n (this.withLoadMore && this.widgetValues) && (this.widgetValues.style.maxHeight = `${this.initHeight}px`);\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }\n\n /**\n * Asynchronously sets the height of a widget element to its current height, allowing for smooth transitions.\n * This function is often used in scenarios where the widget's content changes dynamically, and animating\n * the height adjustment is desired for a smoother user experience.\n *\n * @param {number} [delay=250] - Optional. The delay (in milliseconds) before updating the widget height.\n * Defaults to 250 milliseconds.\n *\n * @returns {Promise<void>} - A Promise that resolves once the widget height is set after the specified delay.\n *\n * @example\n * // Set widget height with the default delay (250 milliseconds)\n * await setWidgetHeight();\n *\n * // Set widget height with a custom delay (e.g., 500 milliseconds)\n * await setWidgetHeight(500);\n */\n @Method()\n async setWidgetHeight(delay = 250) {\n this.widgetContent.removeAttribute('style');\n setTimeout(() => {\n let currentWidgetHeight: number = this.widgetContent.offsetHeight;\n this.widgetContent.style.height = currentWidgetHeight + 'px';\n }, delay)\n }\n\n /**\n * Reset selected filter options.\n */\n @Method()\n async reset() {\n if (this.option.type === FilterOptionTypes.RANGE) {\n this.priceRange.reset()\n }\n Array.from(this.host.querySelectorAll('input')).forEach(input => input.checked = false);\n }\n\n\n /**\n * Action to show more or less filter options.\n */\n @Method()\n async showMore() {\n this.isShowMore = !this.isShowMore\n this.widgetContent.style.height = 'auto';\n this.widgetValues.style.maxHeight = this.isShowMore ? `${this.widgetValues.scrollHeight}px` : `${this.initHeight}px`;\n setTimeout(() => {\n this.widgetContent.style.height = `${this.widgetContent.scrollHeight}px`;\n }, 400); // get height after time of collapse animtion (duration-300)\n }\n\n /**\n * Action to toggle widget open or closed (expand/ collapse).\n */\n @Method()\n async toggleWidget() {\n this.isOpen = !this.isOpen;\n Helper.toggleElementClassIf(this.widgetContent, 's-filters-widget-opened', 's-filters-widget-closed', () => this.isOpen);\n }\n\n renderFilterOption(option: Filter) {\n if (![FilterOptionTypes.VALUES, FilterOptionTypes.MINIMUM, FilterOptionTypes.VARIANTS].includes(option.type)) {\n return '';\n }\n //@ts-ignore\n return option.values.map((filterOption, index) => {\n let value = typeof filterOption == 'number' ? filterOption : (filterOption.key || filterOption.value);\n\n return <label class=\"s-filters-label\" htmlFor={`${option.key}-option-${value}`} key={`${option.key}-option-${value}`}>\n <input\n id={`${option.key}-option-${value}`}\n name={option.key}\n type=\"radio\"\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-radio`}\n onChange={event => this.changed.emit({ event, option, value })}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n\n }\n private isSelectedOption(option: Filter, value: any): boolean {\n if (option.type === FilterOptionTypes.MINIMUM) {\n return this.filtersData[option.key] == value;\n }\n if (option.type === FilterOptionTypes.VARIANTS) {\n return this.filtersData[option.type] && this.filtersData[option.type][Object.keys(this.filtersData[option.type])[0]] == value;\n }\n if (option.type === FilterOptionTypes.RANGE) {\n\n return this.filtersData[option.key] && this.filtersData[option.key].min == value.min && this.filtersData[option.key].max == value.max;\n }\n\n if (option.type === FilterOptionTypes.VALUES) {\n return this.filtersData[option.key] && Number(this.filtersData[option.key]) == Number(value);\n }\n return false;\n }\n\n\n\n private getOptionLabel(option: Filter, filterOption) {\n if (option.key == 'rating') {\n //in amazon has stars & up, should we add it, to avoid those people who will come to say I selected 4 why I see 5 sars products\n return <salla-rating-stars size=\"small\" value={filterOption} />;\n }\n let label = filterOption.value || 'null';\n //label+=filterOption.count ? ` (${salla.helpers.number(filterOption.count)})` : '';\n return <span class=\"s-filters-option-name\">{label}</span>;\n }\n\n render() {\n return (\n <Host class=\"s-filters-widget-container\">\n <h3 class=\"s-filters-widget-title\" onClick={() => this.toggleWidget()}>\n <span>{this.option.label}</span>\n <span class={`s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}`} />\n </h3>\n <div class=\"s-filters-widget-content\" ref={(el) => this.widgetContent = el}>\n <div class=\"s-filters-widget-values\" ref={(el) => this.widgetValues = el}>\n <slot />\n {\n this.option.type !== FilterOptionTypes.RANGE\n ? this.renderFilterOption(this.option)\n : <salla-price-range onChanged={(event) => {\n this.changed.emit(event.detail)\n }}\n ref={price => this.priceRange = price}\n filtersData={this.filtersData}\n option={this.option} />\n }\n </div>\n {this.withLoadMore &&\n <a class=\"s-filters-widget-more\"\n onClick={() => this.showMore()}>{!this.isShowMore ? this.showMoreLabel : this.showLessLabel}</a>\n }\n </div>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -220,7 +220,7 @@ export class SallaProductOptions {
|
|
|
220
220
|
if (option.type === DisplayType.SINGLE_OPTION) {
|
|
221
221
|
return this.singleOption(option);
|
|
222
222
|
}
|
|
223
|
-
if (option.type === DisplayType.BOOKING && salla.
|
|
223
|
+
if (option.type === DisplayType.BOOKING && salla.url.is_page("cart")) {
|
|
224
224
|
return h("salla-booking-field", { onInvalidInput: (e) => this.invalidHandler(e, option), option: option, productId: option.value });
|
|
225
225
|
}
|
|
226
226
|
salla.log(`Couldn't find options type(${option.type})😢`);
|
|
@@ -246,7 +246,7 @@ export class SallaProductOptions {
|
|
|
246
246
|
}
|
|
247
247
|
return (h(Host, { class: "s-product-options-wrapper" }, h("salla-conditional-fields", null, this.optionsData.map((option) => h("div", Object.assign({ class: `s-product-options-option-container${option.visibility_condition ? ' hidden' : ''}`, "data-option-id": option.id }, this.getOptionShownWhen(option)), option.name == 'splitter' ?
|
|
248
248
|
this.splitterOption()
|
|
249
|
-
: h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.
|
|
249
|
+
: h("div", { class: { "s-product-options-option": true, "s-product-options-option-booking": option.type === DisplayType.BOOKING && salla.url.is_page("cart") }, "data-option-type": option.type, "data-option-required": `${option.required}` }, h("label", { htmlFor: 'options[' + option.id + ']', class: `s-product-options-option-label ${this.hideLabel(option) ? 's-product-options-option-label-hidden' : ''}` }, h("b", null, option.name, option.required && h("span", null, " * "), " "), h("small", null, option.placeholder)), h("div", { class: `s-product-options-option-content ${this.hideLabel(option) || (option.type === DisplayType.BOOKING && salla.url.is_page("cart")) ? 's-product-options-option-content-full-width' : ''}` }, this.getDisplayForType(option))))))));
|
|
250
250
|
}
|
|
251
251
|
componentDidLoad() {
|
|
252
252
|
var _a, _b;
|