@salla.sa/twilight-components 2.11.26 → 2.11.27

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.
Files changed (51) hide show
  1. package/dist/cjs/camera-058ddeeb.js +13 -0
  2. package/dist/cjs/index-1d2b3370.js +10 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{salla-button_37.cjs.entry.js → salla-button_36.cjs.entry.js} +57 -341
  5. package/dist/cjs/salla-conditional-fields.cjs.entry.js +99 -0
  6. package/dist/cjs/salla-product-options.cjs.entry.js +257 -0
  7. package/dist/cjs/twilight.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/salla-product-options/salla-product-options.js +11 -4
  10. package/dist/collection/components/salla-progress-bar/salla-progress-bar.css +34 -0
  11. package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +196 -0
  12. package/dist/collection/components/salla-slider/salla-slider.js +2 -1
  13. package/dist/collection/global/app-dev.js +5 -0
  14. package/dist/components/index.d.ts +1 -0
  15. package/dist/components/index.js +1 -0
  16. package/dist/components/salla-product-options.js +32 -21
  17. package/dist/components/salla-progress-bar.d.ts +11 -0
  18. package/dist/components/salla-progress-bar.js +9 -0
  19. package/dist/components/salla-progress-bar2.js +81 -0
  20. package/dist/components/salla-slider2.js +2 -1
  21. package/dist/esm/camera-647ab50f.js +11 -0
  22. package/dist/esm/index-f1d446ac.js +10 -2
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/esm/{salla-button_37.entry.js → salla-button_36.entry.js} +56 -339
  25. package/dist/esm/salla-conditional-fields.entry.js +95 -0
  26. package/dist/esm/salla-product-options.entry.js +253 -0
  27. package/dist/esm/twilight.js +1 -1
  28. package/dist/esm-es5/camera-647ab50f.js +4 -0
  29. package/dist/esm-es5/index-f1d446ac.js +1 -1
  30. package/dist/esm-es5/loader.js +1 -1
  31. package/dist/esm-es5/salla-button_36.entry.js +53 -0
  32. package/dist/esm-es5/salla-conditional-fields.entry.js +4 -0
  33. package/dist/esm-es5/salla-product-options.entry.js +4 -0
  34. package/dist/esm-es5/twilight.js +1 -1
  35. package/dist/twilight/p-1b87ab66.system.js +1 -1
  36. package/dist/twilight/p-485b62a3.entry.js +36 -0
  37. package/dist/twilight/p-56830c52.system.entry.js +4 -0
  38. package/dist/twilight/p-643ea74e.entry.js +4 -0
  39. package/dist/twilight/p-79264f27.system.entry.js +53 -0
  40. package/dist/twilight/p-9b7452c1.entry.js +4 -0
  41. package/dist/twilight/p-c328c14e.system.js +4 -0
  42. package/dist/twilight/p-ccd78636.js +4 -0
  43. package/dist/twilight/p-dbe8db94.system.entry.js +4 -0
  44. package/dist/twilight/twilight.esm.js +1 -1
  45. package/dist/types/components/salla-product-options/interfaces.d.ts +9 -0
  46. package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +35 -0
  47. package/dist/types/components.d.ts +70 -0
  48. package/package.json +4 -4
  49. package/dist/esm-es5/salla-button_37.entry.js +0 -53
  50. package/dist/twilight/p-187222ed.system.entry.js +0 -53
  51. package/dist/twilight/p-a341ed7a.entry.js +0 -36
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ 'use strict';
5
+
6
+ const CameraIcon = `<!-- Generated by IcoMoon.io -->
7
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
8
+ <title>camera</title>
9
+ <path d="M16 10.667c-4.044 0-7.333 3.289-7.333 7.333s3.289 7.333 7.333 7.333 7.333-3.289 7.333-7.333-3.289-7.333-7.333-7.333zM16 22.667c-2.573 0-4.667-2.093-4.667-4.667s2.093-4.667 4.667-4.667 4.667 2.093 4.667 4.667-2.093 4.667-4.667 4.667zM28 5.333h-3.287l-2.271-3.407c-0.248-0.371-0.664-0.593-1.109-0.593h-10.667c-0.445 0-0.861 0.223-1.109 0.593l-2.271 3.407h-3.287c-2.205 0-4 1.795-4 4v17.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-17.333c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-17.333c0-0.735 0.599-1.333 1.333-1.333h4c0.445 0 0.861-0.223 1.109-0.593l2.272-3.407h9.239l2.271 3.407c0.248 0.371 0.664 0.593 1.109 0.593h4c0.735 0 1.333 0.599 1.333 1.333zM25.333 10.66c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327z"></path>
10
+ </svg>
11
+ `;
12
+
13
+ exports.CameraIcon = CameraIcon;
@@ -1908,10 +1908,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1908
1908
  }
1909
1909
  switch(bundleId) {
1910
1910
 
1911
- case 'salla-button_37.cjs':
1911
+ case 'salla-button_36.cjs':
1912
1912
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1913
1913
  /* webpackMode: "lazy" */
1914
- './salla-button_37.cjs.entry.js')); }).then(processMod, consoleError);
1914
+ './salla-button_36.cjs.entry.js')); }).then(processMod, consoleError);
1915
1915
  case 'salla-add-product-button.cjs':
1916
1916
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1917
1917
  /* webpackMode: "lazy" */
@@ -1924,10 +1924,18 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1924
1924
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1925
1925
  /* webpackMode: "lazy" */
1926
1926
  './salla-loyalty-prize-item.cjs.entry.js')); }).then(processMod, consoleError);
1927
+ case 'salla-product-options.cjs':
1928
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1929
+ /* webpackMode: "lazy" */
1930
+ './salla-product-options.cjs.entry.js')); }).then(processMod, consoleError);
1927
1931
  case 'salla-select.cjs':
1928
1932
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1929
1933
  /* webpackMode: "lazy" */
1930
1934
  './salla-select.cjs.entry.js')); }).then(processMod, consoleError);
1935
+ case 'salla-conditional-fields.cjs':
1936
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
1937
+ /* webpackMode: "lazy" */
1938
+ './salla-conditional-fields.cjs.entry.js')); }).then(processMod, consoleError);
1931
1939
  }
1932
1940
  }
1933
1941
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
@@ -34,7 +34,7 @@ const defineCustomElements = (win, options) => {
34
34
  if (typeof window === 'undefined') return Promise.resolve();
35
35
  return patchEsm().then(() => {
36
36
  appGlobals.globalScripts();
37
- return index.bootstrapLazy(JSON.parse("[[\"salla-button_37.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"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\":[8,\"prize-points\"],\"customerPoints\":[2,\"customer-points\"],\"prizeTitle\":[1,\"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]}],[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"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-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"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],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[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],\"searchInputValue\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"format\":[1],\"showCancelButton\":[4,\"show-cancel-button\"],\"showTextField\":[4,\"show-text-field\"],\"enableAlpha\":[4,\"enable-alpha\"],\"widgetColor\":[32],\"setPickerOption\":[64],\"movePopUp\":[64],\"setColorValue\":[64],\"openPicker\":[64],\"closePicker\":[64],\"destroyPicker\":[64]}],[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-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-slider\",{\"blockTitle\":[513,\"block-title\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-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],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[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-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[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\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-add-product-button.cjs\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select.cjs\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]]]"), options);
37
+ return index.bootstrapLazy(JSON.parse("[[\"salla-button_36.cjs\",[[4,\"salla-gifting\",{\"productId\":[2,\"product-id\"],\"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\":[8,\"prize-points\"],\"customerPoints\":[2,\"customer-points\"],\"prizeTitle\":[1,\"prize-title\"],\"allowEmail\":[4,\"allow-email\"],\"allowMobile\":[4,\"allow-mobile\"],\"requireEmail\":[4,\"require-email\"],\"guestMessage\":[1025,\"guest-message\"],\"loyaltyProgram\":[32],\"buttonLoading\":[32],\"selectedItem\":[32],\"askConfirmation\":[32],\"is_loggedin\":[32],\"hasError\":[32],\"errorMessage\":[32],\"translationLoaded\":[32],\"open\":[64],\"close\":[64],\"resetExchange\":[64],\"exchangeLoyaltyPoint\":[64]}],[4,\"salla-product-size-guide\",{\"guides\":[32],\"productId\":[32],\"placeholder_title\":[32],\"placeholder_description\":[32],\"modal_title\":[32],\"hasError\":[32],\"open\":[64],\"close\":[64]}],[4,\"salla-login-modal\",{\"isEmailAllowed\":[1028,\"is-email-allowed\"],\"isMobileAllowed\":[1028,\"is-mobile-allowed\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"supportWebAuth\":[516,\"support-web-auth\"],\"currentTabName\":[32],\"regType\":[32],\"translationLoaded\":[32],\"title\":[32],\"emailErrorMsg\":[32],\"firstNameErrorMsg\":[32],\"lastNameErrorMsg\":[32],\"dragAndDrop\":[32],\"browseFromFiles\":[32],\"customFields\":[32],\"uploadedImage\":[32],\"open\":[64]},[[8,\"verified\",\"onVerified\"]]],[0,\"salla-offer-modal\",{\"offer\":[32],\"offer_name\":[32],\"offer_message\":[32],\"hasError\":[32],\"errorMessage\":[32],\"productID\":[32],\"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-quick-order\",{\"quickOrderTitle\":[1025,\"quick-order-title\"],\"subTitle\":[1025,\"sub-title\"],\"payButtonTitle\":[1025,\"pay-button-title\"],\"confirmPayButtonTitle\":[1025,\"confirm-pay-button-title\"],\"agreementText\":[1025,\"agreement-text\"],\"isEmailRequired\":[1028,\"is-email-required\"],\"productId\":[1025,\"product-id\"],\"thanksMessage\":[1025,\"thanks-message\"],\"quickOrderStyle\":[1025,\"quick-order-style\"],\"user\":[32],\"isAvailable\":[32],\"oneClick\":[32],\"expanded\":[32],\"isTermsRequired\":[32],\"countryCode\":[32],\"submitSucess\":[32],\"placeHolderEmail\":[32],\"emailOptional\":[32],\"agreementShowText\":[32],\"agreementModalHead\":[32],\"userNameLabel\":[32],\"termsChecked\":[32]}],[0,\"salla-user-settings\",{\"isNotifiable\":[516,\"is-notifiable\"],\"deactivateAccount\":[32],\"promotionalMsgs\":[32],\"deactivateDesc\":[32],\"promotionalMsgsDesc\":[32],\"sorryForLeavingText\":[32],\"warningText\":[32],\"keepAccount\":[32],\"buttonLoading\":[32]}],[0,\"salla-search\",{\"inline\":[4],\"oval\":[4],\"height\":[2],\"translationLoaded\":[32],\"results\":[32],\"loading\":[32],\"typing\":[32],\"debounce\":[32],\"search_term\":[32]},[[0,\"keydown\",\"handleKeyDown\"]]],[0,\"salla-comment-form\",{\"type\":[1537],\"showAvatar\":[4,\"show-avatar\"],\"itemId\":[1544,\"item-id\"],\"placeholder\":[32],\"submitText\":[32],\"canComment\":[32]}],[4,\"salla-social-share\",{\"url\":[513],\"urlName\":[513,\"url-name\"],\"platforms\":[513],\"opened\":[32],\"allPlatforms\":[32],\"platformIcons\":[32],\"convertedPlatforms\":[32],\"open\":[64]}],[4,\"salla-cart-summary\",{\"cartSummaryCount\":[32],\"cartSummaryTotal\":[32],\"animateToCart\":[64]}],[4,\"salla-infinite-scroll\",{\"nextPage\":[1,\"next-page\"],\"autoload\":[1028],\"container\":[1],\"item\":[1],\"loadMore\":[32],\"noMore\":[32],\"failedToLoad\":[32]}],[4,\"salla-quantity-input\",{\"quantity\":[32],\"decrease\":[64],\"increase\":[64],\"setValue\":[64]}],[0,\"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],\"badges\":[32],\"hasBadges\":[32],\"OrderUpdate\":[32]}],[0,\"salla-product-availability\",{\"channels\":[1],\"productId\":[2,\"product-id\"],\"isSubscribed\":[1028,\"is-subscribed\"],\"translationLoaded\":[32],\"title_\":[32],\"isVisitorSubscribed\":[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],\"searchInputValue\":[32],\"geolocationError\":[32],\"searchInput\":[32],\"mapInput\":[32],\"mapElement\":[32],\"open\":[64]}],[4,\"salla-verify\",{\"display\":[1],\"type\":[1025],\"autoReload\":[4,\"auto-reload\"],\"supportWebAuth\":[4,\"support-web-auth\"],\"translationLoaded\":[32],\"title\":[32],\"resendAfter\":[32],\"isProfileVerify\":[32],\"getCode\":[64],\"open\":[64]}],[4,\"salla-color-picker\",{\"name\":[1],\"required\":[4],\"color\":[1],\"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-progress-bar\",{\"donation\":[1],\"target\":[1026],\"value\":[1026],\"header\":[1025],\"message\":[1025],\"unit\":[1025],\"color\":[1025]}],[0,\"salla-rating-stars\",{\"name\":[1],\"size\":[1],\"value\":[2]}],[0,\"salla-datetime-picker\",{\"value\":[1537],\"required\":[4],\"name\":[513],\"placeholder\":[1],\"allowInput\":[4,\"allow-input\"],\"allowInvalidPreload\":[4,\"allow-invalid-preload\"],\"altFormat\":[1,\"alt-format\"],\"altInput\":[4,\"alt-input\"],\"altInputClass\":[1,\"alt-input-class\"],\"appendTo\":[16],\"ariaDateFormat\":[1,\"aria-date-format\"],\"autoFillDefaultTime\":[4,\"auto-fill-default-time\"],\"clickOpens\":[4,\"click-opens\"],\"closeOnSelect\":[4,\"close-on-select\"],\"conjunction\":[1],\"dateFormat\":[1,\"date-format\"],\"defaultDate\":[8,\"default-date\"],\"defaultHour\":[2,\"default-hour\"],\"defaultMinute\":[2,\"default-minute\"],\"defaultSeconds\":[2,\"default-seconds\"],\"disable\":[16],\"disableMobile\":[4,\"disable-mobile\"],\"enable\":[16],\"enableSeconds\":[4,\"enable-seconds\"],\"enableTime\":[4,\"enable-time\"],\"formatDate\":[16],\"hourIncrement\":[2,\"hour-increment\"],\"inline\":[4],\"locale\":[1],\"maxDate\":[8,\"max-date\"],\"maxTime\":[8,\"max-time\"],\"minDate\":[8,\"min-date\"],\"minTime\":[8,\"min-time\"],\"minuteIncrement\":[2,\"minute-increment\"],\"mode\":[1],\"monthSelectorType\":[1,\"month-selector-type\"],\"nextArrow\":[1,\"next-arrow\"],\"noCalendar\":[4,\"no-calendar\"],\"dateParser\":[16],\"position\":[1],\"positionElement\":[16],\"prevArrow\":[1,\"prev-arrow\"],\"shorthandCurrentMonth\":[4,\"shorthand-current-month\"],\"static\":[4],\"showMonths\":[2,\"show-months\"],\"time_24hr\":[4,\"time_-2-4hr\"],\"weekNumbers\":[4,\"week-numbers\"],\"wrap\":[4]}],[4,\"salla-tab-content\",{\"name\":[1],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tab-header\",{\"name\":[1],\"activeClass\":[1,\"active-class\"],\"height\":[8],\"centered\":[4],\"isSelected\":[32],\"getChild\":[64]}],[4,\"salla-tabs\",{\"backgroundColor\":[1,\"background-color\"],\"vertical\":[4]},[[0,\"tabSelected\",\"onSelectedTab\"]]],[0,\"salla-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-slider\",{\"blockTitle\":[513,\"block-title\"],\"blockSubtitle\":[513,\"block-subtitle\"],\"displayAllUrl\":[513,\"display-all-url\"],\"arrowsCentered\":[516,\"arrows-centered\"],\"verticalThumbs\":[516,\"vertical-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],\"type\":[1],\"sliderConfig\":[520,\"slider-config\"],\"thumbsConfig\":[520,\"thumbs-config\"],\"currentIndex\":[32],\"isEnd\":[32],\"isBeginning\":[32],\"isRTL\":[32],\"swiperScript\":[32],\"displayAllTitle\":[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-list-tile\",{\"href\":[1],\"target\":[1]}],[0,\"salla-tel-input\",{\"phone\":[1025],\"name\":[1],\"countryCode\":[1025,\"country-code\"],\"mobileRequired\":[32],\"countryCodeLabel\":[32],\"mobileLabel\":[32],\"tooShort\":[32],\"tooLong\":[32],\"invalidCountryCode\":[32],\"invalidNumber\":[32],\"errorMap\":[32],\"getValues\":[64],\"isValid\":[64]}],[4,\"salla-placeholder\",{\"icon\":[1],\"alignment\":[1],\"iconSize\":[1,\"icon-size\"],\"translationLoaded\":[32]}],[0,\"salla-skeleton\",{\"type\":[1],\"width\":[1],\"height\":[1]}],[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\"]]],[4,\"salla-button\",{\"shape\":[513],\"color\":[513],\"fill\":[513],\"size\":[513],\"width\":[513],\"loading\":[516],\"disabled\":[516],\"loaderPosition\":[1,\"loader-position\"],\"href\":[1],\"load\":[64],\"stop\":[64],\"setText\":[64],\"disable\":[64],\"enable\":[64]}],[0,\"salla-loading\",{\"size\":[8],\"width\":[8],\"color\":[1],\"bgColor\":[1,\"bg-color\"]}]]],[\"salla-product-options.cjs\",[[0,\"salla-product-options\",{\"productId\":[2,\"product-id\"],\"options\":[1],\"optionsData\":[32],\"outOfStockText\":[32],\"donationAmount\":[32]}]]],[\"salla-add-product-button.cjs\",[[4,\"salla-add-product-button\",{\"channels\":[513],\"quantity\":[514],\"donatingAmount\":[514,\"donating-amount\"],\"productId\":[520,\"product-id\"],\"productStatus\":[513,\"product-status\"],\"productType\":[513,\"product-type\"]}]]],[\"salla-installment.cjs\",[[0,\"salla-installment\",{\"price\":[1],\"language\":[1],\"currency\":[1],\"tamaraIsActive\":[32],\"tabbyIsActive\":[32],\"spotiiIsActive\":[32]}]]],[\"salla-loyalty-prize-item.cjs\",[[0,\"salla-loyalty-prize-item\",{\"item\":[16]}]]],[\"salla-select.cjs\",[[0,\"salla-select\",{\"label\":[1],\"items\":[16],\"itemText\":[1,\"item-text\"],\"itemValue\":[1,\"item-value\"],\"itemDisabled\":[1,\"item-disabled\"],\"size\":[1],\"value\":[1032],\"autofocus\":[4],\"clearable\":[4],\"clearIcon\":[1,\"clear-icon\"],\"color\":[1],\"flat\":[4],\"disabled\":[4],\"loading\":[4],\"loadingColor\":[1,\"loading-color\"],\"hint\":[1],\"persistHint\":[4,\"persist-hint\"],\"placeholder\":[1],\"multiple\":[4],\"autocomplete\":[4],\"required\":[4],\"chips\":[4],\"shape\":[1],\"returnObject\":[4,\"return-object\"],\"hideDetail\":[4,\"hide-detail\"]}]]],[\"salla-conditional-fields.cjs\",[[4,\"salla-conditional-fields\",null,[[0,\"change\",\"changeHandler\"]]]]]]"), options);
38
38
  });
39
39
  };
40
40
 
@@ -7,6 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-1d2b3370.js');
9
9
  const _commonjsHelpers = require('./_commonjsHelpers-691dd63b.js');
10
+ const camera = require('./camera-058ddeeb.js');
10
11
 
11
12
  const sallaButtonCss = "";
12
13
 
@@ -2699,95 +2700,6 @@ const SallaCommentForm = class {
2699
2700
  };
2700
2701
  SallaCommentForm.style = sallaCommentFormCss;
2701
2702
 
2702
- const SallaConditionalFields = class {
2703
- constructor(hostRef) {
2704
- index.registerInstance(this, hostRef);
2705
- }
2706
- hideAllOptions(optionId) {
2707
- this.host.querySelectorAll(`[data-show-when^="options[${optionId}"]`).forEach((field) => {
2708
- field.classList.add('hidden');
2709
- this.hideAllOptions(field.dataset.optionId);
2710
- this.disableInputs(field);
2711
- });
2712
- }
2713
- disableInputs(field) {
2714
- field.querySelectorAll('[name]').forEach((input) => {
2715
- var _a;
2716
- input.setAttribute('disabled', '');
2717
- input.removeAttribute('required');
2718
- if (((_a = input === null || input === void 0 ? void 0 : input.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'select') {
2719
- input.value = '';
2720
- }
2721
- if (['checkbox'].includes(input.getAttribute('type')) && input.hasOwnProperty('checked')) {
2722
- // @ts-ignore
2723
- input.checked = false;
2724
- }
2725
- });
2726
- }
2727
- changeHandler(event) {
2728
- var _a;
2729
- salla.event.emit('salla-onditional-fields::change', event);
2730
- salla.log('Received the change event: ', event);
2731
- if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox'].includes(event.target.getAttribute('type'))) {
2732
- salla.log('Ignore the change because is not support input: ' + (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.tagName) || 'N/A'));
2733
- return;
2734
- }
2735
- // to extract the option id from the input name, the supported names are name[*] and name[*][]
2736
- let optionId = event.target.name.replace('[]', '');
2737
- let isMultiple = event.target.getAttribute('type') === 'checkbox';
2738
- salla.log('Trying to find all the element with condition:', `[data-show-when^="${optionId}"]`);
2739
- this.host.querySelectorAll(`[data-show-when^="${optionId}"]`)
2740
- .forEach((field) => {
2741
- let isEqual = !(field === null || field === void 0 ? void 0 : field.dataset.showWhen.includes('!='));
2742
- let value = field === null || field === void 0 ? void 0 : field.dataset.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$3').trim();
2743
- // let isSelected = isMultiple ? event.target?.checked : value === event.target.value;
2744
- let isSelected;
2745
- if (isMultiple) {
2746
- // @ts-ignore
2747
- let selectedValues = Array.from(this.host.querySelectorAll(`input[name="${event.target.name}"]:checked`), e => e === null || e === void 0 ? void 0 : e.value);
2748
- isSelected = selectedValues.includes(value.toString());
2749
- }
2750
- else {
2751
- isSelected = value === event.target.value;
2752
- }
2753
- salla.log('The input is ', (isMultiple ? 'Multiple' : 'Single'), ' value:', isSelected);
2754
- let showTheInput = (isEqual && isSelected) || (!isEqual && !isSelected);
2755
- if (showTheInput) {
2756
- field.classList.remove('hidden');
2757
- field.querySelectorAll('[name]').forEach((input) => {
2758
- input.removeAttribute('disabled');
2759
- //To handle focus on hidden input error
2760
- if (!['checkbox'].includes(input.getAttribute('type')) && field.getElementsByClassName('required').length) {
2761
- input.setAttribute('required', '');
2762
- }
2763
- });
2764
- }
2765
- else {
2766
- this.hideAllOptions(field.dataset.optionId);
2767
- field.classList.add('hidden');
2768
- this.disableInputs(field);
2769
- }
2770
- });
2771
- }
2772
- componentDidRender() {
2773
- this.host.querySelectorAll(`[data-show-when]`).forEach((field) => {
2774
- var _a;
2775
- // @ts-ignore
2776
- let optionName = (_a = field === null || field === void 0 ? void 0 : field.dataset) === null || _a === void 0 ? void 0 : _a.showWhen.replace(/(.*)(=|!=)(.*)/gm, '$1').trim();
2777
- if (!optionName) {
2778
- return;
2779
- }
2780
- this.changeHandler({
2781
- target: this.host.querySelector('[name^="' + optionName + '"]')
2782
- });
2783
- });
2784
- }
2785
- render() {
2786
- return (index.h(index.Host, null, index.h("slot", null)));
2787
- }
2788
- get host() { return index.getElement(this); }
2789
- };
2790
-
2791
2703
  var HOOKS = [
2792
2704
  "onChange",
2793
2705
  "onClose",
@@ -21667,13 +21579,6 @@ const MailIcon = `<!-- Generated by IcoMoon.io -->
21667
21579
  </svg>
21668
21580
  `;
21669
21581
 
21670
- const CameraIcon = `<!-- Generated by IcoMoon.io -->
21671
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
21672
- <title>camera</title>
21673
- <path d="M16 10.667c-4.044 0-7.333 3.289-7.333 7.333s3.289 7.333 7.333 7.333 7.333-3.289 7.333-7.333-3.289-7.333-7.333-7.333zM16 22.667c-2.573 0-4.667-2.093-4.667-4.667s2.093-4.667 4.667-4.667 4.667 2.093 4.667 4.667-2.093 4.667-4.667 4.667zM28 5.333h-3.287l-2.271-3.407c-0.248-0.371-0.664-0.593-1.109-0.593h-10.667c-0.445 0-0.861 0.223-1.109 0.593l-2.271 3.407h-3.287c-2.205 0-4 1.795-4 4v17.333c0 2.205 1.795 4 4 4h24c2.205 0 4-1.795 4-4v-17.333c0-2.205-1.795-4-4-4zM29.333 26.667c0 0.735-0.599 1.333-1.333 1.333h-24c-0.735 0-1.333-0.599-1.333-1.333v-17.333c0-0.735 0.599-1.333 1.333-1.333h4c0.445 0 0.861-0.223 1.109-0.593l2.272-3.407h9.239l2.271 3.407c0.248 0.371 0.664 0.593 1.109 0.593h4c0.735 0 1.333 0.599 1.333 1.333zM25.333 10.66c-0.736 0-1.333 0.604-1.333 1.34s0.597 1.333 1.333 1.333 1.333-0.597 1.333-1.333v-0.013c0-0.736-0.597-1.327-1.333-1.327z"></path>
21674
- </svg>
21675
- `;
21676
-
21677
21582
  const ArrowRightIcon$1 = `<!-- Generated by IcoMoon.io -->
21678
21583
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
21679
21584
  <title>keyboard_arrow_right</title>
@@ -21900,7 +21805,7 @@ const SallaLoginModal = class {
21900
21805
  throw 'Please insert required fields';
21901
21806
  }
21902
21807
  getFilepondPlaceholder() {
21903
- return `<div class="s-login-modal-filepond-placeholder"><span class="s-login-modal-filepond-placeholder-icon">${CameraIcon}</span><p class="s-login-modal-filepond-placeholder-text">${this.dragAndDrop}</p> <span class="filepond--label-action">${this.browseFromFiles}</span></div>`;
21808
+ return `<div class="s-login-modal-filepond-placeholder"><span class="s-login-modal-filepond-placeholder-icon">${camera.CameraIcon}</span><p class="s-login-modal-filepond-placeholder-text">${this.dragAndDrop}</p> <span class="filepond--label-action">${this.browseFromFiles}</span></div>`;
21904
21809
  }
21905
21810
  // eslint-disable-next-line @stencil/own-methods-must-be-private
21906
21811
  validateField(field, errorMsg) {
@@ -23313,247 +23218,6 @@ const SallaProductAvailability = class {
23313
23218
  };
23314
23219
  SallaProductAvailability.style = sallaProductAvailabilityCss;
23315
23220
 
23316
- var DisplayType;
23317
- (function (DisplayType) {
23318
- DisplayType["COLOR"] = "color";
23319
- DisplayType["DATE"] = "date";
23320
- DisplayType["DATETIME"] = "datetime";
23321
- DisplayType["DONATION"] = "donation";
23322
- DisplayType["IMAGE"] = "image";
23323
- DisplayType["MULTIPLE_OPTIONS"] = "multiple-options";
23324
- DisplayType["NUMBER"] = "number";
23325
- DisplayType["SINGLE_OPTION"] = "single-option";
23326
- DisplayType["SPLITTER"] = "splitter";
23327
- DisplayType["TEXT"] = "text";
23328
- DisplayType["TEXTAREA"] = "textarea";
23329
- DisplayType["THUMBNAIL"] = "thumbnail";
23330
- DisplayType["TIME"] = "time";
23331
- DisplayType["RADIO"] = "radio";
23332
- DisplayType["CHECKBOX"] = "checkbox";
23333
- DisplayType["MAP"] = "map";
23334
- DisplayType["FILE"] = "file";
23335
- DisplayType["COLOR_PICKER"] = "color_picker";
23336
- })(DisplayType || (DisplayType = {}));
23337
- var Currency;
23338
- (function (Currency) {
23339
- Currency["Sar"] = "SAR";
23340
- })(Currency || (Currency = {}));
23341
-
23342
- const CheckCircleIcon = `<!-- Generated by IcoMoon.io -->
23343
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
23344
- <title>check</title>
23345
- <path d="M27.521 6.976c-0.569-0.472-1.407-0.393-1.879 0.171l-12.567 15.080-7.003-4.668c-0.615-0.411-1.441-0.244-1.849 0.369-0.409 0.612-0.244 1.441 0.369 1.849l8 5.333c0.227 0.149 0.484 0.223 0.739 0.223 0.384 0 0.763-0.165 1.027-0.48l13.333-16c0.471-0.565 0.393-1.407-0.171-1.877z"></path>
23346
- </svg>
23347
- `;
23348
-
23349
- const FileIcon = `<!-- Generated by IcoMoon.io -->
23350
- <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
23351
- <title>file-upload</title>
23352
- <path d="M21.333 24c0.341 0 0.683-0.131 0.943-0.391 0.521-0.521 0.521-1.364 0-1.885l-5.333-5.333c-0.123-0.123-0.271-0.22-0.433-0.288-0.327-0.135-0.693-0.135-1.019 0-0.163 0.068-0.311 0.165-0.433 0.288l-5.333 5.333c-0.521 0.521-0.521 1.364 0 1.885s1.364 0.521 1.885 0l3.057-3.057v10.115c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-10.115l3.057 3.057c0.26 0.26 0.601 0.391 0.943 0.391zM28.943 9.724l-9.333-9.333c-0.249-0.251-0.589-0.391-0.943-0.391h-12c-2.205 0-4 1.795-4 4v24c0 2.205 1.795 4 4 4h4c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-4c-0.735 0-1.333-0.599-1.333-1.333v-24c0-0.735 0.599-1.333 1.333-1.333h11.448l8.552 8.552v16.781c0 0.735-0.599 1.333-1.333 1.333h-4c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333h4c2.205 0 4-1.795 4-4v-17.333c0-0.353-0.14-0.693-0.391-0.943z"></path>
23353
- </svg>
23354
- `;
23355
-
23356
- const sallaProductOptionsCss = "";
23357
-
23358
- const SallaProductOptions = class {
23359
- constructor(hostRef) {
23360
- index.registerInstance(this, hostRef);
23361
- this.colorSelected = index.createEvent(this, "colorSelected", 7);
23362
- this.thumbnailSelected = index.createEvent(this, "thumbnailSelected", 7);
23363
- this.singleSelectOptionSelected = index.createEvent(this, "singleSelectOptionSelected", 7);
23364
- this.donationMoneyEntered = index.createEvent(this, "donationMoneyEntered", 7);
23365
- this.textOptionEntered = index.createEvent(this, "textOptionEntered", 7);
23366
- this.textareaOptionEntered = index.createEvent(this, "textareaOptionEntered", 7);
23367
- this.numberOptionEntered = index.createEvent(this, "numberOptionEntered", 7);
23368
- this.itemsSelected = index.createEvent(this, "itemsSelected", 7);
23369
- this.dateTimeSelected = index.createEvent(this, "dateTimeSelected", 7);
23370
- this.dateSelected = index.createEvent(this, "dateSelected", 7);
23371
- this.timeSelected = index.createEvent(this, "timeSelected", 7);
23372
- this.colorPicked = index.createEvent(this, "colorPicked", 7);
23373
- this.locationSelected = index.createEvent(this, "locationSelected", 7);
23374
- this.fileTypes = {
23375
- pdf: 'application/pdf',
23376
- png: 'image/png',
23377
- jpg: 'image/jpeg',
23378
- word: 'application/msword',
23379
- exl: 'application/vnd.ms-excel',
23380
- txt: 'text/plain',
23381
- };
23382
- this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
23383
- this.donationAmount = salla.lang.get('pages.products.donation_amount');
23384
- /**
23385
- * The id of the product to which the options are going to be fetched for.
23386
- */
23387
- this.productId = salla.config.get('page.id');
23388
- salla.lang.onLoaded(() => {
23389
- this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
23390
- this.donationAmount = salla.lang.get('pages.products.donation_amount');
23391
- });
23392
- if (this.options) {
23393
- try {
23394
- this.optionsData = JSON.parse(this.options);
23395
- return;
23396
- }
23397
- catch (e) {
23398
- salla.log('Bad json passed via options prop');
23399
- }
23400
- }
23401
- if (Array.isArray(this.optionsData)) {
23402
- salla.log('Options is not an array[] ---> ', this.optionsData);
23403
- this.optionsData = [];
23404
- }
23405
- if (this.productId && !salla.url.is_page('cart')) {
23406
- salla.api.product.getDetails(this.productId, ['options']).then(resp => this.optionsData = resp.data.options);
23407
- }
23408
- }
23409
- //todo:: typo here, but I think we will drop it anyway😌
23410
- handleMultiSelectFieldInput() {
23411
- var checkedBoxes = this.multipleOptionDom.querySelectorAll('input[type="checkbox"]:checked');
23412
- var multiSelectedItems = [];
23413
- for (let checkbox of checkedBoxes) {
23414
- multiSelectedItems.push(checkbox.value);
23415
- }
23416
- this.itemsSelected.emit(multiSelectedItems);
23417
- }
23418
- getLatLng(value, type) {
23419
- return value
23420
- ? value.split(',')[type == 'lat' ? 0 : 1]
23421
- : '';
23422
- }
23423
- getDisplayForType(option) {
23424
- if (this[`${option.type}Option`]) {
23425
- return this[`${option.type}Option`](option);
23426
- }
23427
- if (option.type === DisplayType.COLOR_PICKER) {
23428
- return this.colorPickerOption(option);
23429
- }
23430
- if (option.type === DisplayType.MULTIPLE_OPTIONS) {
23431
- return this.multipleOptions(option);
23432
- }
23433
- if (option.type === DisplayType.SINGLE_OPTION) {
23434
- return this.singleOption(option);
23435
- }
23436
- salla.log(`Couldn't find options type(${option.type})😢`);
23437
- return '';
23438
- }
23439
- getOptionShownWhen(option) {
23440
- return option.visibility_condition
23441
- ? { "data-show-when": `options[${option.visibility_condition.option}] ${option.visibility_condition.operator} ${option.visibility_condition.value}` }
23442
- : {};
23443
- }
23444
- //we need the cart Id for productOption Image
23445
- componentWillLoad() {
23446
- return salla.api.cart.getCurrentCartId();
23447
- }
23448
- render() {
23449
- if (this.optionsData.length == 0) {
23450
- return;
23451
- }
23452
- return (index.h(index.Host, { class: "s-product-options-wrapper" }, index.h("salla-conditional-fields", null, this.optionsData.map((option) => index.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' ?
23453
- this.splitterOption()
23454
- : index.h("div", { class: "s-product-options-option" }, index.h("label", { htmlFor: 'options[' + option.id + ']', class: "s-product-options-option-label" }, index.h("b", null, option.name, option.required && index.h("span", null, " * "), " "), index.h("small", null, option.placeholder)), index.h("div", { class: "s-product-options-option-content" }, this.getDisplayForType(option))))))));
23455
- }
23456
- //@ts-ignore
23457
- donationOption(option) {
23458
- return index.h("div", { class: "s-product-options-donation-wrapper" }, index.h("input", { type: "text", id: "donating-amount", name: "donating_amount", class: "s-form-control", value: option.value, placeholder: option.placeholder, onInput: e => salla.helpers.inputDigitsOnly(e.target), onBlur: e => this.donationMoneyEntered.emit(e) }), index.h("span", { class: "s-product-options-donation-amount-currency" }, salla.config.currency(salla.config.get('user.currency_code')).symbol));
23459
- }
23460
- //todo:: why we need this way, use the native way!!
23461
- //@ts-ignore
23462
- selectThumbnail(e, value) {
23463
- this.thumbnailSelected.emit(e);
23464
- }
23465
- fileUploader(option, additions = null) {
23466
- return index.h("salla-file-upload", Object.assign({}, (additions || {}), { "payload-name": "file", value: option.value, "instant-upload": true, name: `options[${option.id}]`, height: "120px", url: salla.cart.api.getUploadImageEndpoint(), "form-data": { cart_item_id: this.productId, product_id: this.productId }, class: { "s-product-options-image-input": true, required: option.required } }), index.h("div", { class: "s-product-options-filepond-placeholder" }, index.h("span", { class: "s-product-options-filepond-placeholder-icon", innerHTML: additions.accept && additions.accept.split(',').every(type => type.includes('image'))
23467
- ? CameraIcon
23468
- : FileIcon }), index.h("p", { class: "s-product-options-filepond-placeholder-text" }, salla.lang.get('common.uploader.drag_and_drop')), index.h("span", { class: "filepond--label-action" }, salla.lang.get('common.uploader.browse'))));
23469
- }
23470
- //@ts-ignore
23471
- imageOption(option) {
23472
- return this.fileUploader(option, { accept: 'image/png,image/jpeg,image/jpg,image/gif' });
23473
- }
23474
- //@ts-ignore
23475
- fileOption(option) {
23476
- let types = option.details.map(detail => this.fileTypes[detail.name]).filter(Boolean);
23477
- return types.length
23478
- ? this.fileUploader(option, { accept: types.join(',') })
23479
- : 'File types not selected.';
23480
- }
23481
- //@ts-ignore
23482
- numberOption(option) {
23483
- return index.h("input", { type: "text", value: option.value, class: "s-form-control", required: option.required, name: `options[${option.id}]`, placeholder: option.placeholder, onBlur: e => this.numberOptionEntered.emit(e), onInput: e => salla.helpers.inputDigitsOnly(e.target) });
23484
- }
23485
- //@ts-ignore
23486
- splitterOption() {
23487
- return index.h("div", { class: "s-product-options-splitter" });
23488
- }
23489
- //@ts-ignore
23490
- textOption(option) {
23491
- return index.h("div", { class: "s-product-options-text" }, index.h("input", { type: "text", value: option.value, class: 's-form-control', required: option.required, name: `options[${option.id}]`, placeholder: option.placeholder, onInput: e => this.textOptionEntered.emit(e) }));
23492
- }
23493
- //@ts-ignore
23494
- textareaOption(option) {
23495
- //todo::remove mt-1 class, and if it's okay to remove the tag itself will be great
23496
- return index.h("div", { class: "s-product-options-textarea" }, index.h("div", { class: "mt-1" }, index.h("textarea", { rows: 4, value: option.value, class: "s-form-control", required: option.required, id: `options[${option.id}]`, name: `options[${option.id}]`, placeholder: option.placeholder, onInput: (e) => this.textareaOptionEntered.emit(e) })));
23497
- }
23498
- //@ts-ignore
23499
- mapOption(option) {
23500
- return index.h("salla-map", { zoom: 15, lat: this.getLatLng(option.value, 'lat'), lng: this.getLatLng(option.value, 'lng'), name: `options[${option.id}]`, searchable: true, required: option.required, onSelected: e => this.locationSelected.emit(e) });
23501
- }
23502
- colorPickerOption(option) {
23503
- return index.h("salla-color-picker", { onSubmitted: e => this.colorPicked.emit(e), name: `options[${option.id}]`, required: option.required, color: option.value || '#5dd5c4' });
23504
- }
23505
- /**
23506
- * ============= Date Time options =============
23507
- */
23508
- //@ts-ignore
23509
- timeOption(option) {
23510
- return index.h("salla-datetime-picker", { noCalendar: true, enableTime: true, dateFormat: "h:i K", value: option.value, placeholder: option.name, required: option.required, name: `options[${option.id}]`, class: "s-product-options-time-element", onPicked: e => this.timeSelected.emit(e) });
23511
- }
23512
- //@ts-ignore
23513
- dateOption(option) {
23514
- //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23
23515
- return index.h("div", { class: "s-product-options-date-element" }, index.h("salla-datetime-picker", { value: option.value, placeholder: option.name, required: option.required, name: `options[${option.id}]`, onPicked: e => this.dateSelected.emit(e) }));
23516
- }
23517
- //@ts-ignore
23518
- datetimeOption(option) {
23519
- //todo:: consider date-range @see https://github.com/SallaApp/theme-raed/blob/master/src/assets/js/partials/product-options.js#L8-L23
23520
- return index.h("div", { class: "s-product-options-datetime-element" }, index.h("salla-datetime-picker", { enableTime: true, value: option.value, dateFormat: "Y-m-d G:i:K", placeholder: option.name, required: option.required, name: `options[${option.id}]`, maxDate: option.to_date_time, minDate: option.from_date_time, onPicked: e => this.dateTimeSelected.emit(e) }));
23521
- }
23522
- /**
23523
- * ============= Advanced options =============
23524
- */
23525
- getOptionDetailName(detail, outOfStock = true) {
23526
- return detail.name
23527
- + ((outOfStock && detail.is_out) ? ` - ${this.outOfStockText}` : '')
23528
- + (detail.additional_price ? ` (${salla.money(detail.additional_price)})` : '');
23529
- }
23530
- singleOption(option) {
23531
- return index.h("div", null, index.h("select", { name: `options[${option.id}]`, required: option.required, class: "s-form-control" }, index.h("option", { value: "" }, option.placeholder), option === null || option === void 0 ? void 0 :
23532
- option.details.map((detail) => {
23533
- return index.h("option", { value: detail.id, disabled: detail.is_out, selected: detail.is_selected, onChange: e => this.singleSelectOptionSelected.emit(e) }, this.getOptionDetailName(detail));
23534
- })));
23535
- }
23536
- multipleOptions(option) {
23537
- return index.h("div", { ref: element => this.multipleOptionDom = element, class: { "s-product-options-multiple-options-wrapper": true, 'required': option.required } }, option === null || option === void 0 ? void 0 : option.details.map((detail) => {
23538
- return index.h("div", null, index.h("input", { type: "checkbox", value: detail.id, disabled: detail.is_out, checked: detail.is_selected, name: `options[${option.id}][]`, id: `field-${option.id}-${detail.id}`, onChange: () => this.handleMultiSelectFieldInput(), "aria-describedby": `options[${option.id}]-description` }), index.h("label", { htmlFor: `field-${option.id}-${detail.id}` }, this.getOptionDetailName(detail)));
23539
- }));
23540
- }
23541
- //@ts-ignore
23542
- colorOption(option) {
23543
- return index.h("fieldset", { class: "s-product-options-colors-wrapper" }, option === null || option === void 0 ? void 0 : option.details.map((detail) => index.h("div", null, index.h("input", { type: "radio", value: detail.id, disabled: detail.is_out, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, id: `color-${this.productId}-${option.id}-${detail.id}`, onChange: e => this.colorSelected.emit(e) }), index.h("label", { htmlFor: `color-${this.productId}-${option.id}-${detail.id}` }, index.h("span", { style: { "background-color": detail.color } }), index.h("p", null, this.getOptionDetailName(detail))))));
23544
- }
23545
- //@ts-ignore
23546
- thumbnailOption(option) {
23547
- return index.h("div", { class: "s-product-options-thumbnails-wrapper" }, option.details.map((detail) => {
23548
- return index.h("div", null, index.h("input", { type: "radio", value: detail.id, "data-itemid": detail.id, disabled: detail.is_out, required: option.required, checked: detail.is_selected, name: `options[${option.id}]`, "data-img-id": detail.option_value, id: `option_${this.productId}-${option.id}_${detail.id}`, onChange: (e) => this.selectThumbnail(e, detail.option_value) }), index.h("label", { htmlFor: `option_${this.productId}-${option.id}_${detail.id}`, "data-img-id": detail.option_value, class: "go-to-slide" }, index.h("img", { "data-src": detail.image, src: detail.image, title: detail.name, alt: detail.name }), index.h("span", { innerHTML: CheckCircleIcon, class: "s-product-options-thumbnails-icon" })), index.h("p", null, this.getOptionDetailName(detail, false), " "), detail.is_out ?
23549
- [index.h("small", { class: "s-product-options-thumbnails-stock-badge" }, this.outOfStockText), index.h("div", { class: "s-product-options-thumbnails-badge-overlay" })]
23550
- : '');
23551
- }));
23552
- }
23553
- get host() { return index.getElement(this); }
23554
- };
23555
- SallaProductOptions.style = sallaProductOptionsCss;
23556
-
23557
23221
  const PencilRuler = `<!-- Generated by IcoMoon.io -->
23558
23222
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
23559
23223
  <title>pencil-ruler</title>
@@ -23613,6 +23277,58 @@ const SallaProductSizeGuide = class {
23613
23277
  };
23614
23278
  SallaProductSizeGuide.style = sallaProductSizeGuideCss;
23615
23279
 
23280
+ const sallaProgressBarCss = ".s-progress-bar-header{font-size:0.875rem;line-height:1.25rem;color:#6b7280;font-weight:bold}.s-progress-bar-target-section{display:-ms-flexbox;display:flex;margin-bottom:0.625rem;font-size:0.875rem;line-height:1.25rem;-ms-flex-pack:justify;justify-content:space-between}.s-progress-bar-container{margin-bottom:0.625rem}.s-progress-bar-wrapper{background-color:#E5E7EB;width:100%;height:0.625rem;border-radius:9999px;margin-bottom:0.375rem}.s-progress-bar-progress{height:0.625rem;border-radius:9999px}.s-progress-bar-message{color:#a2a8b4;font-size:0.75rem;line-height:1rem;display:block;margin-bottom:0.625rem}";
23281
+
23282
+ const SallaProgressBar = class {
23283
+ constructor(hostRef) {
23284
+ index.registerInstance(this, hostRef);
23285
+ try {
23286
+ if (this.donation) {
23287
+ let donationJson = typeof this.donation == 'string' ? JSON.parse(this.donation) : this.donation;
23288
+ if (donationJson.can_donate) {
23289
+ this.value = donationJson.collected_amount;
23290
+ this.target = donationJson.target_amount;
23291
+ this.header = salla.lang.get('pages.products.target');
23292
+ this.message = salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date;
23293
+ }
23294
+ else {
23295
+ this.message = donationJson.target_message;
23296
+ }
23297
+ }
23298
+ }
23299
+ catch (e) {
23300
+ salla.log('Wrong donation json');
23301
+ }
23302
+ salla.lang.onLoaded(() => {
23303
+ var _a, _b;
23304
+ this.header = (_a = this.header) === null || _a === void 0 ? void 0 : _a.replace('pages.products.target', salla.lang.get('pages.products.target'));
23305
+ this.message = (_b = this.message) === null || _b === void 0 ? void 0 : _b.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
23306
+ });
23307
+ salla.onReady(() => {
23308
+ this.color = this.color || salla.config.get('theme.color.primary', "#ffd5c4");
23309
+ if (!this.unit) {
23310
+ this.unit = salla.config.currency().symbol;
23311
+ }
23312
+ });
23313
+ }
23314
+ getPercentage() {
23315
+ return (this.value / this.target) * 100;
23316
+ }
23317
+ render() {
23318
+ if (!this.target && !this.message) {
23319
+ return '';
23320
+ }
23321
+ return (index.h("div", { class: "s-progress-bar-container" }, this.header ? index.h("div", { class: "s-progress-bar-header" }, this.header) : '', this.getProgressBar(), this.message ? index.h("span", { class: "s-progress-bar-message" }, this.message) : ''));
23322
+ }
23323
+ getProgressBar() {
23324
+ return this.target ? [
23325
+ index.h("div", { class: "s-progress-bar-target-section" }, index.h("span", null, salla.helpers.number(this.value), " ", this.unit), index.h("span", null, salla.helpers.number(this.target), " ", this.unit)),
23326
+ index.h("div", { class: "s-progress-bar-wrapper" }, index.h("div", { class: "s-progress-bar-progress", style: { 'width': `${this.getPercentage()}%`, 'background-color': this.color } }))
23327
+ ] : '';
23328
+ }
23329
+ };
23330
+ SallaProgressBar.style = sallaProgressBarCss;
23331
+
23616
23332
  const Add = `<!-- Generated by IcoMoon.io -->
23617
23333
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
23618
23334
  <title>add</title>
@@ -24787,7 +24503,8 @@ const SallaSwiper = class {
24787
24503
  autoHeight: this.autoHeight,
24788
24504
  lazy: true,
24789
24505
  on: {
24790
- // todo:: find better way for this workaround to show lazyLoad for duplicated slides, for some reason they are loaded but class not added.
24506
+ // todo:: find better way for this workaround to show lazyLoad for duplicated slides, because it clones the slide after it's already rendered,
24507
+ // then it re appended it as is,in this case the image is loaded but class not added.
24791
24508
  afterInit: (slider) => {
24792
24509
  var _a;
24793
24510
  (_a = document.lazyLoadInstance) === null || _a === void 0 ? void 0 : _a.update();
@@ -27073,7 +26790,6 @@ exports.salla_button = SallaButton;
27073
26790
  exports.salla_cart_summary = SallaCartSummary;
27074
26791
  exports.salla_color_picker = SallaColorPicker;
27075
26792
  exports.salla_comment_form = SallaCommentForm;
27076
- exports.salla_conditional_fields = SallaConditionalFields;
27077
26793
  exports.salla_datetime_picker = SallaDatetimePicker;
27078
26794
  exports.salla_file_upload = SallaFileUpload;
27079
26795
  exports.salla_gifting = SallaGifting;
@@ -27088,8 +26804,8 @@ exports.salla_modal = SallaModal;
27088
26804
  exports.salla_offer_modal = SallaOfferModal;
27089
26805
  exports.salla_placeholder = SallaPlaceholder;
27090
26806
  exports.salla_product_availability = SallaProductAvailability;
27091
- exports.salla_product_options = SallaProductOptions;
27092
26807
  exports.salla_product_size_guide = SallaProductSizeGuide;
26808
+ exports.salla_progress_bar = SallaProgressBar;
27093
26809
  exports.salla_quantity_input = SallaQuantityInput;
27094
26810
  exports.salla_quick_order = SallaQuickOrder;
27095
26811
  exports.salla_rating_modal = SallaRatingModal;