@salla.sa/twilight-components 2.11.124 → 2.11.125

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 (39) hide show
  1. package/dist/cjs/salla-filters-widget.cjs.entry.js +2 -2
  2. package/dist/cjs/salla-filters-widget.cjs.entry.js.map +1 -1
  3. package/dist/cjs/salla-price-range.cjs.entry.js +4 -4
  4. package/dist/cjs/salla-price-range.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +2 -2
  6. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js.map +1 -1
  7. package/dist/collection/components/salla-price-range/salla-price-range.js +4 -4
  8. package/dist/collection/components/salla-price-range/salla-price-range.js.map +1 -1
  9. package/dist/components/salla-filters-widget2.js +2 -2
  10. package/dist/components/salla-filters-widget2.js.map +1 -1
  11. package/dist/components/salla-price-range2.js +4 -4
  12. package/dist/components/salla-price-range2.js.map +1 -1
  13. package/dist/esm/salla-filters-widget.entry.js +2 -2
  14. package/dist/esm/salla-filters-widget.entry.js.map +1 -1
  15. package/dist/esm/salla-price-range.entry.js +4 -4
  16. package/dist/esm/salla-price-range.entry.js.map +1 -1
  17. package/dist/esm-es5/salla-filters-widget.entry.js +1 -1
  18. package/dist/esm-es5/salla-filters-widget.entry.js.map +1 -1
  19. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  20. package/dist/esm-es5/salla-price-range.entry.js.map +1 -1
  21. package/dist/twilight/p-0254e9be.system.js +1 -1
  22. package/dist/twilight/p-563fa06a.system.entry.js +5 -0
  23. package/dist/twilight/p-563fa06a.system.entry.js.map +1 -0
  24. package/dist/twilight/p-710f64c1.entry.js +5 -0
  25. package/dist/twilight/p-710f64c1.entry.js.map +1 -0
  26. package/dist/twilight/p-a2c691a1.entry.js +5 -0
  27. package/dist/twilight/p-a2c691a1.entry.js.map +1 -0
  28. package/dist/twilight/p-e4f8147f.system.entry.js +5 -0
  29. package/dist/twilight/p-e4f8147f.system.entry.js.map +1 -0
  30. package/dist/twilight/twilight.esm.js +1 -1
  31. package/package.json +2 -2
  32. package/dist/twilight/p-1492ec4a.entry.js +0 -5
  33. package/dist/twilight/p-1492ec4a.entry.js.map +0 -1
  34. package/dist/twilight/p-56698988.entry.js +0 -5
  35. package/dist/twilight/p-56698988.entry.js.map +0 -1
  36. package/dist/twilight/p-5fa5a40e.system.entry.js +0 -5
  37. package/dist/twilight/p-5fa5a40e.system.entry.js.map +0 -1
  38. package/dist/twilight/p-9a9c63f6.system.entry.js +0 -5
  39. package/dist/twilight/p-9a9c63f6.system.entry.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import{p as e,b as a}from"./p-3c7d3f26.js";export{s as setNonce}from"./p-3c7d3f26.js";import{g as t}from"./p-3278e007.js";import"./p-f84bae34.js";const l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((e=>{t();return a(JSON.parse('[["p-660c0e88",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64]}],[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],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-be3279c0",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"autoplay":[1028],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-f2ec7427",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-720eb9fc",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-16e25100",[[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}]]],["p-bce1b49b",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-8f0fd469",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-c3539119",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-1492ec4a",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"reset":[64]}]]],["p-56698988",[[4,"salla-filters-widget",{"widgetTitle":[1025,"widget-title"],"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-dc422f49",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e)}));
4
+ import{p as e,b as a}from"./p-3c7d3f26.js";export{s as setNonce}from"./p-3c7d3f26.js";import{g as t}from"./p-3278e007.js";import"./p-f84bae34.js";const l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((e=>{t();return a(JSON.parse('[["p-660c0e88",[[4,"salla-gifting",{"productId":[2,"product-id"],"widgetSubtitle":[1,"widget-subtitle"],"sectionTitle":[32],"sectionSubtitle":[32],"sectionBtnText":[32],"giftDetails":[32],"selectImageForYourGift":[32],"selectImageOrUpload":[32],"selectGiftMessage":[32],"giftCustomText":[32],"textId":[32],"incorrectGiftText":[32],"nextStep":[32],"senderNameLabel":[32],"receiverNameFieldLabel":[32],"receiverMobileFieldLabel":[32],"receiverEmailFieldLabel":[32],"emailPlaceholder":[32],"sendLater":[32],"selectSendDateAndTime":[32],"canNotEditOrderAfterSelectDate":[32],"sendGift":[32],"donationRequired":[32],"currentStep":[32],"showCalendar":[32],"showGiftText":[32],"currentLang":[32],"parentClass":[32],"errors":[32],"gift":[32],"selectedGiftTextOption":[32],"showTextArea":[32],"selectedImage":[32],"uploadedImage":[32],"selectedText":[32],"senderName":[32],"errorMessage":[32],"hasError":[32],"quantity":[32],"deliveryDate":[32],"timeZone":[32],"receiverName":[32],"receiverMobile":[32],"receiverCountryCode":[32],"receiverEmail":[32],"open":[64],"close":[64],"goToStep2":[64]}],[4,"salla-loyalty",{"prizePoints":[1544,"prize-points"],"customerPoints":[1538,"customer-points"],"prizeTitle":[1537,"prize-title"],"allowEmail":[4,"allow-email"],"allowMobile":[4,"allow-mobile"],"requireEmail":[4,"require-email"],"guestMessage":[1025,"guest-message"],"loyaltyProgram":[32],"buttonLoading":[32],"selectedItem":[32],"askConfirmation":[32],"is_loggedin":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64],"resetExchange":[64],"exchangeLoyaltyPoint":[64]}],[4,"salla-product-size-guide",{"guides":[32],"productId":[32],"placeholder_title":[32],"placeholder_description":[32],"modal_title":[32],"hasError":[32],"open":[64],"close":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"supportWebAuth":[516,"support-web-auth"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"dragAndDrop":[32],"browseFromFiles":[32],"customFields":[32],"uploadedImage":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"productID":[32],"offer_type":[32],"translationLoaded":[32],"addToCartLabel":[32],"open":[64],"showOffer":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[32],"open":[64],"close":[64]}],[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"translationLoaded":[32],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"selected_scope":[32],"isOpenedBefore":[32],"hasError":[32],"loading":[32],"close":[64],"open":[64],"handleSubmit":[64]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-quick-order",{"quickOrderTitle":[1025,"quick-order-title"],"subTitle":[1025,"sub-title"],"payButtonTitle":[1025,"pay-button-title"],"confirmPayButtonTitle":[1025,"confirm-pay-button-title"],"agreementText":[1025,"agreement-text"],"isEmailRequired":[1028,"is-email-required"],"productId":[1025,"product-id"],"thanksMessage":[1025,"thanks-message"],"quickOrderStyle":[1025,"quick-order-style"],"user":[32],"isAvailable":[32],"oneClick":[32],"expanded":[32],"isTermsRequired":[32],"countryCode":[32],"submitSucess":[32],"placeHolderEmail":[32],"emailOptional":[32],"agreementShowText":[32],"agreementModalHead":[32],"userNameLabel":[32],"termsChecked":[32]}],[0,"salla-user-settings",{"isNotifiable":[516,"is-notifiable"],"deactivateAccount":[32],"promotionalMsgs":[32],"deactivateDesc":[32],"promotionalMsgsDesc":[32],"sorryForLeavingText":[32],"warningText":[32],"keepAccount":[32],"buttonLoading":[32]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"translationLoaded":[32],"results":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]},[[0,"keydown","handleKeyDown"]]],[4,"salla-social-share",{"url":[513],"urlName":[513,"url-name"],"platforms":[513],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"convertedPlatforms":[32],"open":[64]}],[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],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}],[0,"salla-maintenance-alert",{"title":[32],"message":[32],"buttonTitle":[32]}],[4,"salla-quantity-input",{"quantity":[32],"fireChangeEvent":[32],"decrease":[64],"increase":[64],"setValue":[64]}],[4,"salla-user-menu",{"inline":[516],"avatarOnly":[516,"avatar-only"],"showHeader":[516,"show-header"],"relativeDropdown":[516,"relative-dropdown"],"accountLoading":[32],"opened":[32],"notifications":[32],"orders":[32],"pending_orders":[32],"wishlist":[32],"profile":[32],"rating":[32],"logout":[32],"hello":[32],"first_name":[32],"last_name":[32],"avatar":[32],"is_loggedIn":[32],"badges":[32],"hasBadges":[32],"OrderUpdate":[32]}],[4,"salla-product-card",{"product":[1],"horizontal":[4],"shadowOnHover":[4,"shadow-on-hover"],"hideAddBtn":[4,"hide-add-btn"],"fullImage":[4,"full-image"],"minimal":[4],"isSpecial":[4,"is-special"],"showQuantity":[4,"show-quantity"],"productData":[32],"fitImageHeight":[32],"remained":[32],"outOfStock":[32],"donationAmount":[32],"startingPrice":[32],"addToCart":[32],"placeholder":[32]}],[4,"salla-map",{"name":[1],"required":[4],"readonly":[4],"searchable":[1028],"lat":[1026],"lng":[1026],"apiKey":[1025,"api-key"],"modalTitle":[1,"modal-title"],"zoom":[1026],"theme":[1025],"modalActivityTitle":[32],"confirmButtonTitle":[32],"locateButtonTitle":[32],"locateButtonEdit":[32],"searchPlaceholder":[32],"searchInputValue":[32],"formattedAddress":[32],"geolocationError":[32],"searchInput":[32],"mapInput":[32],"mapElement":[32],"selectedLat":[32],"selectedLng":[32],"open":[64]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"supportWebAuth":[4,"support-web-auth"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[4,"salla-color-picker",{"name":[1],"required":[4],"color":[1537],"format":[1],"showCancelButton":[4,"show-cancel-button"],"showTextField":[4,"show-text-field"],"enableAlpha":[4,"enable-alpha"],"widgetColor":[32],"setPickerOption":[64],"movePopUp":[64],"setColorValue":[64],"openPicker":[64],"closePicker":[64],"destroyPicker":[64]}],[4,"salla-add-product-button",{"channels":[513],"subscribedOptions":[1,"subscribed-options"],"quickBuy":[1540,"quick-buy"],"quantity":[514],"donatingAmount":[514,"donating-amount"],"notifyOptionsAvailability":[516,"notify-options-availability"],"productId":[520,"product-id"],"supportStickyBar":[516,"support-sticky-bar"],"productStatus":[513,"product-status"],"productType":[513,"product-type"],"hasOutOfStockOption":[32],"hasSubscribedOptions":[32],"selectedOptions":[32],"showQuickBuy":[32]}],[0,"salla-count-down",{"date":[1],"boxed":[4],"size":[1],"color":[1],"labeled":[4],"endText":[1,"end-text"],"digits":[1],"endOfDay":[4,"end-of-day"],"daysLabel":[32],"hoursLabel":[32],"minutesLabel":[32],"secondsLabel":[32],"endLabel":[32],"invalidDate":[32],"offerEnded":[32],"countInterval":[32],"days":[32],"hours":[32],"minutes":[32],"seconds":[32],"endCountDown":[64]}],[0,"salla-datetime-picker",{"value":[1537],"required":[4],"name":[513],"placeholder":[1],"allowInput":[4,"allow-input"],"allowInvalidPreload":[4,"allow-invalid-preload"],"altFormat":[1,"alt-format"],"altInput":[4,"alt-input"],"altInputClass":[1,"alt-input-class"],"appendTo":[16],"ariaDateFormat":[1,"aria-date-format"],"autoFillDefaultTime":[4,"auto-fill-default-time"],"clickOpens":[4,"click-opens"],"closeOnSelect":[4,"close-on-select"],"conjunction":[1],"dateFormat":[1,"date-format"],"defaultDate":[8,"default-date"],"defaultHour":[2,"default-hour"],"defaultMinute":[2,"default-minute"],"defaultSeconds":[2,"default-seconds"],"disable":[16],"disableMobile":[4,"disable-mobile"],"enable":[16],"enableSeconds":[4,"enable-seconds"],"enableTime":[4,"enable-time"],"formatDate":[16],"hourIncrement":[2,"hour-increment"],"inline":[4],"locale":[1],"maxDate":[8,"max-date"],"maxTime":[8,"max-time"],"minDate":[8,"min-date"],"minTime":[8,"min-time"],"minuteIncrement":[2,"minute-increment"],"mode":[1],"monthSelectorType":[1,"month-selector-type"],"nextArrow":[1,"next-arrow"],"noCalendar":[4,"no-calendar"],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[0,"salla-product-availability",{"channels":[1],"notifyOptionsAvailability":[4,"notify-options-availability"],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[0,"salla-quick-buy",{"type":[1025],"productId":[1025,"product-id"],"amount":[1538],"currency":[1025],"options":[16],"isRequireShipping":[1028,"is-require-shipping"],"isApplePayActive":[32],"quickBuy":[32]}],[0,"salla-file-upload",{"value":[1537],"files":[513],"height":[513],"cartItemId":[1,"cart-item-id"],"profileImage":[516,"profile-image"],"name":[1537],"payloadName":[1,"payload-name"],"accept":[1537],"fileId":[2,"file-id"],"url":[1025],"method":[1],"formData":[1,"form-data"],"required":[4],"maxFileSize":[1,"max-file-size"],"disabled":[4],"allowDrop":[4,"allow-drop"],"allowBrowse":[4,"allow-browse"],"allowPaste":[4,"allow-paste"],"allowMultiple":[4,"allow-multiple"],"allowReplace":[4,"allow-replace"],"allowRevert":[4,"allow-revert"],"allowRemove":[4,"allow-remove"],"allowProcess":[4,"allow-process"],"allowReorder":[4,"allow-reorder"],"storeAsFile":[4,"store-as-file"],"forceRevert":[4,"force-revert"],"maxFilesCount":[2,"max-files-count"],"maxParallelUploads":[2,"max-parallel-uploads"],"checkValidity":[4,"check-validity"],"itemInsertLocation":[1,"item-insert-location"],"itemInsertInterval":[2,"item-insert-interval"],"credits":[4],"dropOnPage":[4,"drop-on-page"],"dropOnElement":[4,"drop-on-element"],"dropValidation":[4,"drop-validation"],"ignoredFiles":[16],"instantUpload":[1028,"instant-upload"],"chunkUploads":[4,"chunk-uploads"],"chunkForce":[4,"chunk-force"],"chunkSize":[2,"chunk-size"],"chunkRetryDelays":[16],"labelDecimalSeparator":[1,"label-decimal-separator"],"labelThousandsSeparator":[1,"label-thousands-separator"],"labelIdle":[1025,"label-idle"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"setOption":[64]}],[0,"salla-progress-bar",{"donation":[1],"target":[1026],"value":[1026],"height":[1025],"header":[1025],"stripped":[1028],"message":[1025],"unit":[1025],"color":[1025]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2],"reviews":[2]}],[4,"salla-list-tile",{"href":[1],"target":[1]}],[4,"salla-slider",{"blockTitle":[513,"block-title"],"listenToThumbnailsOption":[516,"listen-to-thumbnails-option"],"blockSubtitle":[513,"block-subtitle"],"displayAllUrl":[513,"display-all-url"],"arrowsCentered":[516,"arrows-centered"],"verticalThumbs":[516,"vertical-thumbs"],"gridThumbs":[516,"grid-thumbs"],"vertical":[516],"autoHeight":[516,"auto-height"],"showControls":[516,"show-controls"],"controlsOuter":[516,"controls-outer"],"showThumbsControls":[4,"show-thumbs-controls"],"autoPlay":[4,"auto-play"],"slidesPerView":[1,"slides-per-view"],"pagination":[4],"centered":[4],"loop":[4],"direction":[1537],"type":[1],"sliderConfig":[520,"slider-config"],"thumbsConfig":[520,"thumbs-config"],"currentIndex":[32],"isEnd":[32],"isBeginning":[32],"swiperScript":[32],"displayAllTitle":[32],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"slideToLoop":[64],"slideNextLoop":[64],"slidePrevLoop":[64],"slideReset":[64],"slideToClosest":[64],"update":[64],"updateAutoHeight":[64],"updateSlides":[64],"updateProgress":[64],"updateSlidesClasses":[64],"getSlides":[64]}],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"translationLoaded":[32]}],[0,"salla-skeleton",{"type":[1],"width":[1],"height":[1]}],[0,"salla-tel-input",{"phone":[1025],"name":[1],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"hasSkeleton":[516,"has-skeleton"],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"centered":[4],"iconStyle":[1,"icon-style"],"modalTitle":[32],"open":[64],"close":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]},[[0,"keyup","handleKeyUp"]]],[0,"salla-loading",{"size":[8],"width":[8],"color":[1],"bgColor":[1,"bg-color"]}],[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["p-be3279c0",[[0,"salla-products-slider",{"blockTitle":[1,"block-title"],"subTitle":[1,"sub-title"],"sliderId":[1,"slider-id"],"displayAllUrl":[1,"display-all-url"],"source":[1537],"sourceValue":[1,"source-value"],"limit":[1026],"autoplay":[1028],"productsData":[32],"isReady":[32],"sourceValueIsValid":[32],"hasCustomComponent":[32],"apiUrl":[32],"parsedSourceValue":[32]}]]],["p-f2ec7427",[[0,"salla-product-options",{"productId":[2,"product-id"],"options":[1],"optionsData":[32],"outOfStockText":[32],"donationAmount":[32],"selectedOptions":[32],"canDisabled":[32],"selectedSkus":[32],"selectedOutSkus":[32],"getSelectedOptionsData":[64],"reportValidity":[64],"hasOutOfStockOption":[64],"getSelectedOptions":[64],"getOption":[64]}]]],["p-720eb9fc",[[0,"salla-filters",{"filters":[1040],"isSidebarOpen":[32],"filtersData":[32],"apply":[32],"reset":[32],"getFilters":[64],"applyFilters":[64],"resetFilters":[64]}]]],["p-16e25100",[[0,"salla-comment-form",{"type":[1537],"showAvatar":[4,"show-avatar"],"itemId":[1544,"item-id"],"placeholder":[32],"submitText":[32],"canComment":[32]}]]],["p-bce1b49b",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-8f0fd469",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-c3539119",[[0,"salla-products-list",{"source":[1537],"sourceValue":[1032,"source-value"],"limit":[1026],"sortBy":[1025,"sort-by"],"filtersResults":[1540,"filters-results"],"horizontalCards":[516,"horizontal-cards"],"page":[32],"nextPage":[32],"hasInfiniteScroll":[32],"hasCustomComponent":[32],"sourceValueIsValid":[32],"placeholderText":[32],"isReady":[32],"showPlaceholder":[32],"parsedFilters":[32],"setFilters":[64],"reload":[64]}]]],["p-a2c691a1",[[0,"salla-price-range",{"minPrice":[1032,"min-price"],"maxPrice":[1032,"max-price"],"option":[16],"filtersData":[520,"filters-data"],"min":[32],"max":[32],"priceOptions":[32],"moreThanLabel":[32],"lessThanLabel":[32],"toLabel":[32],"fromLabel":[32],"reset":[64]}]]],["p-710f64c1",[[4,"salla-filters-widget",{"widgetTitle":[1025,"widget-title"],"withLoadMore":[1028,"with-load-more"],"filtersData":[16],"option":[16],"isOpen":[32],"isShowMore":[32],"showMoreLabel":[32],"showLessLabel":[32],"reset":[64],"showMore":[64],"toggleWidget":[64]}]]],["p-dc422f49",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]]]'),e)}));
5
5
  //# sourceMappingURL=twilight.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight-components",
3
- "version": "2.11.124",
3
+ "version": "2.11.125",
4
4
  "license": "GPL-3.0",
5
5
  "author": "Salla Team <support@salla.dev> (https://salla.dev)",
6
6
  "bugs": {
@@ -96,5 +96,5 @@
96
96
  "vanilla-lazyload": "^17.8.3",
97
97
  "vanilla-picker": "^2.12.1"
98
98
  },
99
- "gitHead": "c3a315ea5f22829d4e8854cd8e2bfe23fe49adf1"
99
+ "gitHead": "75441202b6c0bd6a4c59a45895d3e2fdea64dba4"
100
100
  }
@@ -1,5 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as t,c as e,h as i,H as s}from"./p-3c7d3f26.js";const r=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";const l=class{constructor(i){t(this,i);this.changed=e(this,"changed",7);this.filterValues=[];this.minPrice=undefined;this.maxPrice=undefined;this.option=undefined;this.filtersData=undefined;this.min=0;this.max=1e4;this.priceOptions=undefined;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من"}connectedCallback(){var t;if(this.filtersData&&((t=this.filtersData)===null||t===void 0?void 0:t.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((()=>{this.moreThanLabel=salla.lang.get("common.elements.more_than",this.moreThanLabel);this.lessThanLabel=salla.lang.get("common.elements.less_than",this.lessThanLabel);this.toLabel=salla.lang.get("common.elements.to",this.toLabel);this.fromLabel=salla.lang.get("common.elements.from",this.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}const e=Math.ceil(this.option.values.length/5);for(let t=0;t<this.option.values.length;t+=e){this.filterValues.push(this.option.values.slice(t,t+e).reduce(((t,e)=>{t.to=e.to;t.count+=e.count;return t})))}}async reset(){this.minInput.value=null;this.maxInput.value=null}getPriceLabel(t){if(isNaN(t.from)||t.from<1){return`${this.lessThanLabel} ${salla.money(t.to)}`}if(isNaN(t.to)||t.to<1){return`${this.moreThanLabel} ${salla.money(t.from)}`}return`${salla.money(t.from)} ${this.toLabel} ${salla.money(t.to)}`}handleMinMaxPrice(t,e){this.minPrice=e.from;this.maxPrice=e.to!="*"?e.to:null;this.changedEventHandler(t)}async changedEventHandler(t,e=false){salla.helpers.inputDigitsOnly(t.target);let i=t?t.target.value*1:null;if(e){this.minInputValidation(i)}else{this.maxInputValidation(i)}this.isReady&&this.changed.emit({event:t,option:this.option,value:{max:this.maxPrice,min:this.minPrice}})}minInputValidation(t){if(t&&(t>this.max||t>this.maxPrice)){return}if(t<this.min){this.minPrice=this.min;return}if(t){this.minPrice=t}}maxInputValidation(t){if(t&&(t<this.min||t<this.minPrice)){return}if(t>this.max){this.maxPrice=this.max;return}if(t){this.maxPrice=t}}isChecked(t){if(!this.minPrice&&!this.maxPrice){return false}let e=(t.from<1||t.from=="*")&&this.minPrice==0||t.from==this.minPrice;let i=t.to=="*"||!t.to||t.to==this.maxPrice;return e&&i}render(){return i(s,null,this.filterValues.map(((t,e)=>i("label",{class:"s-filters-label",htmlFor:`${this.option.key}-${e}`},i("input",{id:`${this.option.key}-${e}`,name:"price",type:"radio",checked:this.isChecked(t),class:"s-filters-radio",onChange:e=>this.handleMinMaxPrice(e,t)}),this.getPriceLabel(t)))),i("div",{class:"flex justify-center items-center"},i("div",{class:"relative max-w-xl w-full"},i("div",{class:"s-price-range-inputs"},i("div",{class:"s-price-range-relative"},i("div",{class:"s-price-range-currency"}," ",salla.config.currency().symbol),i("input",{type:"number",maxlength:"5",ref:t=>this.minInput=t,onInput:t=>this.changedEventHandler(t,true),value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),i("div",{class:"s-price-range-gray-text"}," -"),i("div",{class:"s-price-range-relative"},i("div",{class:"s-price-range-currency"}," ",salla.config.currency().symbol),i("input",{type:"number",maxlength:"5",placeholder:this.toLabel,ref:t=>this.maxInput=t,onInput:t=>this.changedEventHandler(t),value:this.maxPrice,class:"s-price-range-number-input","aria-describedby":"price-currency"}))))))}componentDidLoad(){this.isReady=true}};l.style=r;export{l as salla_price_range};
5
- //# sourceMappingURL=p-1492ec4a.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["sallaPriceRangeCss","SallaPriceRange","this","filterValues","connectedCallback","filtersData","_a","price","minPrice","min","maxPrice","max","salla","lang","onLoaded","moreThanLabel","get","lessThanLabel","toLabel","fromLabel","option","values","length","chunkSize","Math","ceil","i","push","slice","reduce","final","currentValue","to","count","async","minInput","value","maxInput","getPriceLabel","filterValue","isNaN","from","money","handleMinMaxPrice","event","changedEventHandler","isMin","helpers","inputDigitsOnly","target","minInputValidation","maxInputValidation","isReady","changed","emit","isChecked","isMinEqual","isMaxEqual","render","h","Host","map","index","class","htmlFor","key","id","name","type","checked","onChange","e","config","currency","symbol","maxlength","ref","el","onInput","placeholder","componentDidLoad"],"sources":["./src/components/salla-price-range/salla-price-range.scss?tag=salla-price-range","./src/components/salla-price-range/salla-price-range.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n\n.rtl, [dir=\"rtl\"] {\n .rtl-range-slider {\n transform: rotateY(180deg);\n }\n\n .rtl-range-numbers{\n flex-direction: row-reverse;\n }\n\n .form-select, select{\n background-position: left 0.5rem center;\n padding-right: 12px;\n } \n\n // divide\n.menu-divide {\n li {\n &:not(:last-child) {\n &:after {\n left: 0;\n right: auto;\n }\n }\n }\n}\n}\n\ninput[type=range]::-webkit-slider-thumb {\n pointer-events: all;\n width: 24px;\n height: 24px;\n -webkit-appearance: none;\n}\n\n[type='checkbox']:checked{\n background-size: 80%;\n}","import {Component, Host, h, State, Prop, Event, Method} from '@stencil/core';\nimport {Filter, FilterValue} from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-price-range',\n styleUrl: 'salla-price-range.scss',\n})\nexport class SallaPriceRange {\n @Prop({mutable: true}) minPrice;\n @Prop({mutable: true}) maxPrice;\n @Prop({reflect: true}) option: Filter;\n @Prop({reflect: true}) filtersData: any;\n @State() min = 0;\n @State() max = 10000;\n\n @State() priceOptions: any;\n @State() moreThanLabel: string=\"أكثر من\";\n @State() lessThanLabel: string=\"أقل من\";\n @State() toLabel: string=\"الى\";\n @State() fromLabel: string=\"من\";\n\n @Event() changed: any;\n\n isReady: Boolean;\n minInput: HTMLInputElement;\n maxInput: HTMLInputElement;\n filterValues: Array<FilterValue> = [];\n\n\n connectedCallback() {\n if (this.filtersData && this.filtersData?.price) {\n this.minPrice = this.filtersData.price.min;\n this.maxPrice = this.filtersData.price.max;\n }\n salla.lang.onLoaded(() => {\n this.moreThanLabel=salla.lang.get('common.elements.more_than', this.moreThanLabel)\n this.lessThanLabel=salla.lang.get('common.elements.less_than', this.lessThanLabel)\n this.toLabel=salla.lang.get('common.elements.to', this.toLabel)\n this.fromLabel=salla.lang.get('common.elements.from', this.fromLabel)\n })\n\n //no need to show one option only\n if (this.option.values.length == 1) {\n return;\n }\n //here we may recive too many prices, we will group all inputs to\n if (this.option.values.length <= 5) {\n this.filterValues = this.option.values;\n return;\n }\n const chunkSize = Math.ceil(this.option.values.length / 5);\n for (let i = 0; i < this.option.values.length; i += chunkSize) {\n this.filterValues.push(\n this.option.values\n .slice(i, i + chunkSize)\n .reduce((final: FilterValue, currentValue: FilterValue) => {\n final.to = currentValue.to;\n final.count += currentValue.count;\n return final;\n })\n );\n // do whatever\n }\n }\n\n @Method()\n async reset() {\n //@ts-ignore\n this.minInput.value = null;\n this.maxInput.value = null;\n }\n\n private getPriceLabel(filterValue: FilterValue) {\n // @ts-ignore\n if (isNaN(filterValue.from) || filterValue.from < 1) {\n return `${this.lessThanLabel} ${salla.money(filterValue.to)}`;\n }\n // @ts-ignore\n if (isNaN(filterValue.to) || filterValue.to < 1) {\n return `${this.moreThanLabel} ${salla.money(filterValue.from)}`;\n }\n\n return `${salla.money(filterValue.from)} ${this.toLabel} ${salla.money(filterValue.to)}`;\n }\n\n\n private handleMinMaxPrice(event: Event, value: FilterValue): void {\n\n this.minPrice = value.from;\n this.maxPrice = value.to != '*' ? value.to : null;\n\n this.changedEventHandler(event);\n }\n\n private async changedEventHandler(event, isMin = false) {\n salla.helpers.inputDigitsOnly(event.target)\n let value = event ? event.target.value * 1 : null\n if (isMin) {\n this.minInputValidation(value);\n } else {\n this.maxInputValidation(value)\n }\n\n\n this.isReady && this.changed.emit({\n event: event,\n option: this.option,\n value: {max: this.maxPrice, min: this.minPrice}\n })\n }\n\n\n minInputValidation(value) {\n if (value && (value > this.max || value > this.maxPrice)) {\n // this.minPrice = this.maxPrice;\n return;\n }\n\n if (value < this.min) {\n this.minPrice = this.min;\n return;\n }\n\n if (value) {\n this.minPrice = value;\n }\n }\n\n maxInputValidation(value) {\n if (value && (value < this.min || value < this.minPrice)) {\n // this.maxPrice = this.minPrice;\n return;\n }\n if (value > this.max) {\n this.maxPrice = this.max;\n return;\n }\n\n if (value) {\n this.maxPrice = value;\n }\n }\n\n private isChecked(filterValue: FilterValue) {\n if (!this.minPrice && !this.maxPrice) {\n return false;\n }\n\n //1 filterValue.from zero or * and this.minPrice not set or zero\n //2 filterValue.from == this.minPrice\n //@ts-ignore\n let isMinEqual = ((filterValue.from < 1 || filterValue.from == '*') && this.minPrice == 0) || filterValue.from == this.minPrice;\n\n //1 filterValue.to == \"*\" or null\n //2 filterValue.to == this.max\n let isMaxEqual = filterValue.to == '*' || !filterValue.to || filterValue.to == this.maxPrice;\n return isMinEqual && isMaxEqual;\n }\n\n\n render() {\n return (\n <Host>\n {\n this.filterValues.map((filterValue, index) => {\n return <label class=\"s-filters-label\" htmlFor={`${this.option.key}-${index}`}>\n <input\n id={`${this.option.key}-${index}`}\n name=\"price\"\n type=\"radio\"\n checked={this.isChecked(filterValue)}\n class=\"s-filters-radio\"\n onChange={e => this.handleMinMaxPrice(e, filterValue)}\n />\n {this.getPriceLabel(filterValue)}\n </label>\n })\n }\n\n\n <div class=\"flex justify-center items-center\">\n <div class=\"relative max-w-xl w-full\">\n <div class=\"s-price-range-inputs\">\n <div class=\"s-price-range-relative\">\n <div class=\"s-price-range-currency\"> {salla.config.currency().symbol}</div>\n <input\n type=\"number\"\n maxlength=\"5\"\n ref={el => this.minInput = el}\n onInput={(event) => this.changedEventHandler(event, true)}\n value={this.minPrice}\n placeholder={this.fromLabel}\n class=\"s-price-range-number-input\"\n />\n </div>\n\n <div class=\"s-price-range-gray-text\"> -</div>\n <div class=\"s-price-range-relative\">\n <div class=\"s-price-range-currency\"> {salla.config.currency().symbol}</div>\n <input type=\"number\" maxlength=\"5\"\n placeholder={this.toLabel}\n ref={el => this.maxInput = el}\n onInput={(event) => this.changedEventHandler(event)}\n value={this.maxPrice}\n class=\"s-price-range-number-input\" aria-describedby=\"price-currency\"/>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n componentDidLoad() {\n this.isReady = true;\n }\n}\n"],"mappings":";;;yDAAA,MAAMA,EAAqB,0nB,MCOdC,EAAe,M,0DAmB1BC,KAAAC,aAAmC,G,0GAdpB,E,SACA,I,+CAGgB,U,mBACA,S,aAC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"}
@@ -1,5 +0,0 @@
1
- /*!
2
- * Crafted with ❤ by Salla
3
- */
4
- import{r as s,c as t,h as i,H as e,g as h}from"./p-3c7d3f26.js";import{H as l}from"./p-dad8bacc.js";import{a,F as n}from"./p-d3cc3770.js";const r=":host{display:block}";const o=class{constructor(i){s(this,i);this.changed=t(this,"changed",7);this.initHeight=195;this.widgetTitle=undefined;this.withLoadMore=undefined;this.filtersData=undefined;this.option=undefined;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل"}connectedCallback(){this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;this.widgetTitle=this.option.label;salla.lang.onLoaded((()=>{this.showMoreLabel=salla.lang.get("common.titles.more",this.showMoreLabel);this.showLessLabel=salla.lang.get("common.elements.show_less",this.showLessLabel)}))}componentDidLoad(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight=`${this.initHeight}px`);this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}async reset(){if(this.option.type===a.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((s=>s.checked=false))}async showMore(){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?`${this.widgetValues.scrollHeight}px`:`${this.initHeight}px`;setTimeout((()=>{this.widgetContent.style.height=`${this.widgetContent.scrollHeight}px`}),400)}async toggleWidget(){this.isOpen=!this.isOpen;l.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(()=>this.isOpen))}renderFilterOption(s){if(![a.VALUES,a.MINIMUM,a.VARIANTS].includes(s.type)){return""}return s.values.map(((t,e)=>{let h=typeof t=="number"?t:t.key||t.value;return i("label",{class:"s-filters-label",htmlFor:`${s.key}-option-${e}`},i("input",{id:`${s.key}-option-${e}`,name:s.key,type:s.inputType,checked:this.isSelectedOption(s,h),class:`s-filters-${s.inputType}`,onChange:t=>this.changed.emit({event:t,option:s,value:h})}),this.getOptionLabel(s,t))}))}isSelectedOption(s,t){if(!this.filtersData||!this.filtersData[s.key]){return false}return s.inputType===n.CHECKBOX?this.filtersData[s.key].includes(t):this.filtersData[s.key]==t}getOptionLabel(s,t){if(s.key=="rating"){return i("salla-rating-stars",{size:"small",value:t})}let e=t.value||"null";return i("span",{class:"s-filters-option-name"},e)}render(){return i(e,{class:"s-filters-widget-container"},i("h3",{class:"s-filters-widget-title",onClick:()=>this.toggleWidget()},i("span",null,this.widgetTitle),i("span",{class:`s-filters-widget-plusminus ${this.isOpen?"s-filters-widget-plusminus-active":""}`})),i("div",{class:"s-filters-widget-content",ref:s=>this.widgetContent=s},i("div",{class:"s-filters-widget-values",ref:s=>this.widgetValues=s},i("slot",null),this.option.type!==a.RANGE?this.renderFilterOption(this.option):i("salla-price-range",{onChanged:s=>this.changed.emit(s.detail),ref:s=>this.priceRange=s,filtersData:this.filtersData,option:this.option})),this.withLoadMore&&i("a",{class:"s-filters-widget-more",onClick:()=>this.showMore()},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))}get host(){return h(this)}};o.style=r;export{o as salla_filters_widget};
5
- //# sourceMappingURL=p-56698988.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["sallaFiltersWidgetCss","SallaFiltersWidget","this","initHeight","connectedCallback","withLoadMore","option","key","Array","isArray","values","length","widgetTitle","label","salla","lang","onLoaded","showMoreLabel","get","showLessLabel","componentDidLoad","widgetValues","scrollHeight","style","maxHeight","widgetContent","height","async","type","FilterOptionTypes","RANGE","priceRange","reset","from","host","querySelectorAll","forEach","input","checked","isShowMore","setTimeout","isOpen","Helper","toggleElementClassIf","renderFilterOption","VALUES","MINIMUM","VARIANTS","includes","map","filterOption","index","value","h","class","htmlFor","id","name","inputType","isSelectedOption","onChange","e","changed","emit","event","getOptionLabel","filtersData","FilterOptionInputType","CHECKBOX","size","render","Host","onClick","toggleWidget","ref","el","onChanged","detail","price","showMore"],"sources":["./src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","./src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import {Component, Host, h, Method, State, Prop, Event, Element} from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport {Filter, FilterOptionInputType, 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 @Prop({mutable: true}) widgetTitle: string;\n @Prop({mutable: true}) withLoadMore: boolean;\n @Prop({reflect: true}) filtersData: object;\n @Prop({reflect: true}) option: Filter;\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string=\"عرض المزيد\";\n @State() showLessLabel: string=\"عرض أقل\";\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 this.widgetTitle = this.option.label;\n salla.lang.onLoaded(() => {\n this.showMoreLabel=salla.lang.get('common.titles.more', this.showMoreLabel)\n this.showLessLabel=salla.lang.get('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 @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 @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 @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={option.inputType}\n //TODO:: debug more why sometimes it's not rendered as selected🤨\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-${option.inputType}`}\n onChange={e => this.changed.emit({event: e, option: option, value: value})}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n }\n\n private isSelectedOption(option: Filter, value) {\n if (!this.filtersData || !this.filtersData[option.key]) {\n return false\n }\n\n return option.inputType === FilterOptionInputType.CHECKBOX\n ? this.filtersData[option.key].includes(value)\n : this.filtersData[option.key] == value;\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.widgetTitle}</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) => this.changed.emit(event.detail)}\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"],"mappings":";;;0IAAA,MAAMA,EAAwB,uB,MCQjBC,EAAkB,M,0DAWrBC,KAAAC,WAAqB,I,oHACF,K,gBACI,M,mBACA,a,mBACA,S,CAI/BC,oBAEEF,KAAKG,aAAeH,KAAKI,OAAOC,KAAK,SAAWC,MAAMC,QAAQP,KAAKI,OAAOI,SAAWR,KAAKI,OAAOI,OAAOC,OAAS,EACjHT,KAAKU,YAAcV,KAAKI,OAAOO,MAC/BC,MAAMC,KAAKC,UAAS,KAClBd,KAAKe,cAAcH,MAAMC,KAAKG,IAAI,qBAAsBhB,KAAKe,eAC7Df,KAAKiB,cAAcL,MAAMC,KAAKG,IAAI,4BAA6BhB,KAAKiB,cAAc,G,CAItFC,mBACElB,KAAKmB,aAAaC,aAAepB,KAAKC,aAAeD,KAAKG,aAAe,OACxEH,KAAKG,cAAgBH,KAAKmB,eAAkBnB,KAAKmB,aAAaE,MAAMC,UAAY,GAAGtB,KAAKC,gBACzFD,KAAKuB,cAAcF,MAAMG,OAAS,GAAGxB,KAAKuB,cAAcH,gB,CAI1DK,cACE,GAAIzB,KAAKI,OAAOsB,OAASC,EAAkBC,MAAO,CAChD5B,KAAK6B,WAAWC,O,CAElBxB,MAAMyB,KAAK/B,KAAKgC,KAAKC,iBAAiB,UAAUC,SAAQC,G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KAAKgE,YAAY5D,EAAOC,MAAQ6C,C,CAG9Ba,eAAe3D,EAAgB4C,GACrC,GAAI5C,EAAOC,KAAO,SAAU,CAE1B,OAAO8C,EAAA,sBAAoBgB,KAAK,QAAQjB,MAAOF,G,CAEjD,IAAIrC,EAAQqC,EAAaE,OAAS,OAElC,OAAOC,EAAA,QAAMC,MAAM,yBAAyBzC,E,CAG9CyD,SACE,OACEjB,EAACkB,EAAI,CAACjB,MAAM,8BACVD,EAAA,MAAIC,MAAM,yBAAyBkB,QAAS,IAAMtE,KAAKuE,gBACrDpB,EAAA,YAAOnD,KAAKU,aACZyC,EAAA,QAAMC,MAAO,8BAA8BpD,KAAKuC,OAAS,oCAAsC,QAEjGY,EAAA,OAAKC,MAAM,2BAA2BoB,IAAMC,GAAOzE,KAAKuB,cAAgBkD,GACtEtB,EAAA,OAAKC,MAAM,0BAA0BoB,IAAMC,GAAOzE,KAAKmB,aAAesD,GACpEtB,EAAA,aAEEnD,KAAKI,OAAOsB,OAASC,EAAkBC,MACnC5B,KAAK0C,mBAAmB1C,KAAKI,QAC7B+C,EAAA,qBAAmBuB,UAAYZ,GAAU9D,KAAK4D,QAAQC,KAAKC,EAAMa,QAC9CH,IAAKI,GAAS5E,KAAK6B,WAAa+C,EAChCZ,YAAahE,KAAKgE,YAClB5D,OAAQJ,KAAKI,UAGvCJ,KAAKG,cACNgD,EAAA,KAAGC,MAAM,wBACNkB,QAAS,IAAMtE,KAAK6E,aAAc7E,KAAKqC,WAAYrC,KAAKe,cAAgBf,KAAKiB,gB"}
@@ -1,5 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i["throw"](e))}catch(e){a(e)}}function l(e){e.done?n(e.value):r(e.value).then(o,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(n=0)),n)try{if(i=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};
2
- /*!
3
- * Crafted with ❤ by Salla
4
- */System.register(["./p-5ee0461b.system.js"],(function(e){"use strict";var t,n,i,r;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H}],execute:function(){var a=":host{display:block}.rtl .rtl-range-slider,[dir=rtl] .rtl-range-slider{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.rtl .rtl-range-numbers,[dir=rtl] .rtl-range-numbers{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.rtl .form-select,.rtl select,[dir=rtl] .form-select,[dir=rtl] select{background-position:left 0.5rem center;padding-right:12px}.rtl .menu-divide li:not(:last-child):after,[dir=rtl] .menu-divide li:not(:last-child):after{left:0;right:auto}input[type=range]::-webkit-slider-thumb{pointer-events:all;width:24px;height:24px;-webkit-appearance:none}[type=checkbox]:checked{background-size:80%}";var o=e("salla_price_range",function(){function e(e){t(this,e);this.changed=n(this,"changed",7);this.filterValues=[];this.minPrice=undefined;this.maxPrice=undefined;this.option=undefined;this.filtersData=undefined;this.min=0;this.max=1e4;this.priceOptions=undefined;this.moreThanLabel="أكثر من";this.lessThanLabel="أقل من";this.toLabel="الى";this.fromLabel="من"}e.prototype.connectedCallback=function(){var e=this;var t;if(this.filtersData&&((t=this.filtersData)===null||t===void 0?void 0:t.price)){this.minPrice=this.filtersData.price.min;this.maxPrice=this.filtersData.price.max}salla.lang.onLoaded((function(){e.moreThanLabel=salla.lang.get("common.elements.more_than",e.moreThanLabel);e.lessThanLabel=salla.lang.get("common.elements.less_than",e.lessThanLabel);e.toLabel=salla.lang.get("common.elements.to",e.toLabel);e.fromLabel=salla.lang.get("common.elements.from",e.fromLabel)}));if(this.option.values.length==1){return}if(this.option.values.length<=5){this.filterValues=this.option.values;return}var n=Math.ceil(this.option.values.length/5);for(var i=0;i<this.option.values.length;i+=n){this.filterValues.push(this.option.values.slice(i,i+n).reduce((function(e,t){e.to=t.to;e.count+=t.count;return e})))}};e.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.minInput.value=null;this.maxInput.value=null;return[2]}))}))};e.prototype.getPriceLabel=function(e){if(isNaN(e.from)||e.from<1){return"".concat(this.lessThanLabel," ").concat(salla.money(e.to))}if(isNaN(e.to)||e.to<1){return"".concat(this.moreThanLabel," ").concat(salla.money(e.from))}return"".concat(salla.money(e.from)," ").concat(this.toLabel," ").concat(salla.money(e.to))};e.prototype.handleMinMaxPrice=function(e,t){this.minPrice=t.from;this.maxPrice=t.to!="*"?t.to:null;this.changedEventHandler(e)};e.prototype.changedEventHandler=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(i){salla.helpers.inputDigitsOnly(e.target);n=e?e.target.value*1:null;if(t){this.minInputValidation(n)}else{this.maxInputValidation(n)}this.isReady&&this.changed.emit({event:e,option:this.option,value:{max:this.maxPrice,min:this.minPrice}});return[2]}))}))};e.prototype.minInputValidation=function(e){if(e&&(e>this.max||e>this.maxPrice)){return}if(e<this.min){this.minPrice=this.min;return}if(e){this.minPrice=e}};e.prototype.maxInputValidation=function(e){if(e&&(e<this.min||e<this.minPrice)){return}if(e>this.max){this.maxPrice=this.max;return}if(e){this.maxPrice=e}};e.prototype.isChecked=function(e){if(!this.minPrice&&!this.maxPrice){return false}var t=(e.from<1||e.from=="*")&&this.minPrice==0||e.from==this.minPrice;var n=e.to=="*"||!e.to||e.to==this.maxPrice;return t&&n};e.prototype.render=function(){var e=this;return i(r,null,this.filterValues.map((function(t,n){return i("label",{class:"s-filters-label",htmlFor:"".concat(e.option.key,"-").concat(n)},i("input",{id:"".concat(e.option.key,"-").concat(n),name:"price",type:"radio",checked:e.isChecked(t),class:"s-filters-radio",onChange:function(n){return e.handleMinMaxPrice(n,t)}}),e.getPriceLabel(t))})),i("div",{class:"flex justify-center items-center"},i("div",{class:"relative max-w-xl w-full"},i("div",{class:"s-price-range-inputs"},i("div",{class:"s-price-range-relative"},i("div",{class:"s-price-range-currency"}," ",salla.config.currency().symbol),i("input",{type:"number",maxlength:"5",ref:function(t){return e.minInput=t},onInput:function(t){return e.changedEventHandler(t,true)},value:this.minPrice,placeholder:this.fromLabel,class:"s-price-range-number-input"})),i("div",{class:"s-price-range-gray-text"}," -"),i("div",{class:"s-price-range-relative"},i("div",{class:"s-price-range-currency"}," ",salla.config.currency().symbol),i("input",{type:"number",maxlength:"5",placeholder:this.toLabel,ref:function(t){return e.maxInput=t},onInput:function(t){return e.changedEventHandler(t)},value:this.maxPrice,class:"s-price-range-number-input","aria-describedby":"price-currency"}))))))};e.prototype.componentDidLoad=function(){this.isReady=true};return e}());o.style=a}}}));
5
- //# sourceMappingURL=p-5fa5a40e.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["sallaPriceRangeCss","SallaPriceRange","exports","this","filterValues","class_1","prototype","connectedCallback","_this","filtersData","_a","price","minPrice","min","maxPrice","max","salla","lang","onLoaded","moreThanLabel","get","lessThanLabel","toLabel","fromLabel","option","values","length","chunkSize","Math","ceil","i","push","slice","reduce","final","currentValue","to","count","reset","minInput","value","maxInput","getPriceLabel","filterValue","isNaN","from","concat","money","handleMinMaxPrice","event","changedEventHandler","isMin","helpers","inputDigitsOnly","target","minInputValidation","maxInputValidation","isReady","changed","emit","isChecked","isMinEqual","isMaxEqual","render","h","Host","map","index","class","htmlFor","key","id","name","type","checked","onChange","e","config","currency","symbol","maxlength","ref","el","onInput","placeholder","componentDidLoad"],"sources":["src/components/salla-price-range/salla-price-range.scss?tag=salla-price-range","src/components/salla-price-range/salla-price-range.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n\n.rtl, [dir=\"rtl\"] {\n .rtl-range-slider {\n transform: rotateY(180deg);\n }\n\n .rtl-range-numbers{\n flex-direction: row-reverse;\n }\n\n .form-select, select{\n background-position: left 0.5rem center;\n padding-right: 12px;\n } \n\n // divide\n.menu-divide {\n li {\n &:not(:last-child) {\n &:after {\n left: 0;\n right: auto;\n }\n }\n }\n}\n}\n\ninput[type=range]::-webkit-slider-thumb {\n pointer-events: all;\n width: 24px;\n height: 24px;\n -webkit-appearance: none;\n}\n\n[type='checkbox']:checked{\n background-size: 80%;\n}","import {Component, Host, h, State, Prop, Event, Method} from '@stencil/core';\nimport {Filter, FilterValue} from \"../salla-filters/interfaces\";\n\n@Component({\n tag: 'salla-price-range',\n styleUrl: 'salla-price-range.scss',\n})\nexport class SallaPriceRange {\n @Prop({mutable: true}) minPrice;\n @Prop({mutable: true}) maxPrice;\n @Prop({reflect: true}) option: Filter;\n @Prop({reflect: true}) filtersData: any;\n @State() min = 0;\n @State() max = 10000;\n\n @State() priceOptions: any;\n @State() moreThanLabel: string=\"أكثر من\";\n @State() lessThanLabel: string=\"أقل من\";\n @State() toLabel: string=\"الى\";\n @State() fromLabel: string=\"من\";\n\n @Event() changed: any;\n\n isReady: Boolean;\n minInput: HTMLInputElement;\n maxInput: HTMLInputElement;\n filterValues: Array<FilterValue> = [];\n\n\n connectedCallback() {\n if (this.filtersData && this.filtersData?.price) {\n this.minPrice = this.filtersData.price.min;\n this.maxPrice = this.filtersData.price.max;\n }\n salla.lang.onLoaded(() => {\n this.moreThanLabel=salla.lang.get('common.elements.more_than', this.moreThanLabel)\n this.lessThanLabel=salla.lang.get('common.elements.less_than', this.lessThanLabel)\n this.toLabel=salla.lang.get('common.elements.to', this.toLabel)\n this.fromLabel=salla.lang.get('common.elements.from', this.fromLabel)\n })\n\n //no need to show one option only\n if (this.option.values.length == 1) {\n return;\n }\n //here we may recive too many prices, we will group all inputs to\n if (this.option.values.length <= 5) {\n this.filterValues = this.option.values;\n return;\n }\n const chunkSize = Math.ceil(this.option.values.length / 5);\n for (let i = 0; i < this.option.values.length; i += chunkSize) {\n this.filterValues.push(\n this.option.values\n .slice(i, i + chunkSize)\n .reduce((final: FilterValue, currentValue: FilterValue) => {\n final.to = currentValue.to;\n final.count += currentValue.count;\n return final;\n })\n );\n // do whatever\n }\n }\n\n @Method()\n async reset() {\n //@ts-ignore\n this.minInput.value = null;\n this.maxInput.value = null;\n }\n\n private getPriceLabel(filterValue: FilterValue) {\n // @ts-ignore\n if (isNaN(filterValue.from) || filterValue.from < 1) {\n return `${this.lessThanLabel} ${salla.money(filterValue.to)}`;\n }\n // @ts-ignore\n if (isNaN(filterValue.to) || filterValue.to < 1) {\n return `${this.moreThanLabel} ${salla.money(filterValue.from)}`;\n }\n\n return `${salla.money(filterValue.from)} ${this.toLabel} ${salla.money(filterValue.to)}`;\n }\n\n\n private handleMinMaxPrice(event: Event, value: FilterValue): void {\n\n this.minPrice = value.from;\n this.maxPrice = value.to != '*' ? value.to : null;\n\n this.changedEventHandler(event);\n }\n\n private async changedEventHandler(event, isMin = false) {\n salla.helpers.inputDigitsOnly(event.target)\n let value = event ? event.target.value * 1 : null\n if (isMin) {\n this.minInputValidation(value);\n } else {\n this.maxInputValidation(value)\n }\n\n\n this.isReady && this.changed.emit({\n event: event,\n option: this.option,\n value: {max: this.maxPrice, min: this.minPrice}\n })\n }\n\n\n minInputValidation(value) {\n if (value && (value > this.max || value > this.maxPrice)) {\n // this.minPrice = this.maxPrice;\n return;\n }\n\n if (value < this.min) {\n this.minPrice = this.min;\n return;\n }\n\n if (value) {\n this.minPrice = value;\n }\n }\n\n maxInputValidation(value) {\n if (value && (value < this.min || value < this.minPrice)) {\n // this.maxPrice = this.minPrice;\n return;\n }\n if (value > this.max) {\n this.maxPrice = this.max;\n return;\n }\n\n if (value) {\n this.maxPrice = value;\n }\n }\n\n private isChecked(filterValue: FilterValue) {\n if (!this.minPrice && !this.maxPrice) {\n return false;\n }\n\n //1 filterValue.from zero or * and this.minPrice not set or zero\n //2 filterValue.from == this.minPrice\n //@ts-ignore\n let isMinEqual = ((filterValue.from < 1 || filterValue.from == '*') && this.minPrice == 0) || filterValue.from == this.minPrice;\n\n //1 filterValue.to == \"*\" or null\n //2 filterValue.to == this.max\n let isMaxEqual = filterValue.to == '*' || !filterValue.to || filterValue.to == this.maxPrice;\n return isMinEqual && isMaxEqual;\n }\n\n\n render() {\n return (\n <Host>\n {\n this.filterValues.map((filterValue, index) => {\n return <label class=\"s-filters-label\" htmlFor={`${this.option.key}-${index}`}>\n <input\n id={`${this.option.key}-${index}`}\n name=\"price\"\n type=\"radio\"\n checked={this.isChecked(filterValue)}\n class=\"s-filters-radio\"\n onChange={e => this.handleMinMaxPrice(e, filterValue)}\n />\n {this.getPriceLabel(filterValue)}\n </label>\n })\n }\n\n\n <div class=\"flex justify-center items-center\">\n <div class=\"relative max-w-xl w-full\">\n <div class=\"s-price-range-inputs\">\n <div class=\"s-price-range-relative\">\n <div class=\"s-price-range-currency\"> {salla.config.currency().symbol}</div>\n <input\n type=\"number\"\n maxlength=\"5\"\n ref={el => this.minInput = el}\n onInput={(event) => this.changedEventHandler(event, true)}\n value={this.minPrice}\n placeholder={this.fromLabel}\n class=\"s-price-range-number-input\"\n />\n </div>\n\n <div class=\"s-price-range-gray-text\"> -</div>\n <div class=\"s-price-range-relative\">\n <div class=\"s-price-range-currency\"> {salla.config.currency().symbol}</div>\n <input type=\"number\" maxlength=\"5\"\n placeholder={this.toLabel}\n ref={el => this.maxInput = el}\n onInput={(event) => this.changedEventHandler(event)}\n value={this.maxPrice}\n class=\"s-price-range-number-input\" aria-describedby=\"price-currency\"/>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n componentDidLoad() {\n this.isReady = true;\n }\n}\n"],"mappings":";;;6JAAA,IAAMA,EAAqB,0nB,ICOdC,EAAeC,EAAA,+B,yDAmB1BC,KAAAC,aAAmC,G,0GAdpB,E,SACA,I,+CAGgB,U,mBACA,S,aACN,M,eACE,I,CAU3BC,EAAAC,UAAAC,kBAAA,eAAAC,EAAAL,K,MACE,GAAIA,KAAKM,eAAeC,EAAAP,KAAKM,eAAW,MAAAC,SAAA,SAAAA,EAAEC,OAAO,CAC/CR,KAAKS,SAAWT,KAAKM,YAAYE,MAAME,IACvCV,KAAKW,SAAWX,KAAKM,YAAYE,MAAMI,G,CAEzCC,MAAMC,KAAKC,UAAS,WAClBV,EAAKW,cAAcH,MAAMC,KAAKG,IAAI,4BAA6BZ,EAAKW,eACpEX,EAAKa,cAAcL,MAAMC,KAAKG,IAAI,4BAA6BZ,EAAKa,eACpEb,EAAKc,QAAQN,MAAMC,KAAKG,IAAI,qBAAsBZ,EAAKc,SACvDd,EAAKe,UAAUP,MAAMC,KAAKG,IAAI,uBAAwBZ,EAAKe,U,IAI7D,GAAIpB,KAAKqB,OAAOC,OAAOC,QAAU,EAAG,CAClC,M,CAGF,GAAIvB,KAAKqB,OAAOC,OAAOC,QAAU,EAAG,CAClCvB,KAAKC,aAAeD,KAAKqB,OAAOC,OAChC,M,CAEF,IAAME,EAAYC,KAAKC,KAAK1B,KAAKqB,OAAOC,OAAOC,OAAS,GACxD,IAAK,IAAII,EA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KAAK,QACLC,KAAK,QACLC,QAASlE,EAAKoD,UAAUjB,GACxByB,MAAM,kBACNO,SAAU,SAAAC,GAAK,OAAApE,EAAKwC,kBAAkB4B,EAAGjC,EAA1B,IAEhBnC,EAAKkC,cAAcC,G,IAM1BqB,EAAA,OAAKI,MAAM,oCACTJ,EAAA,OAAKI,MAAM,4BACTJ,EAAA,OAAKI,MAAM,wBACTJ,EAAA,OAAKI,MAAM,0BACTJ,EAAA,OAAKI,MAAM,0BAAwB,IAAGpD,MAAM6D,OAAOC,WAAWC,QAC9Df,EAAA,SACES,KAAK,SACLO,UAAU,IACVC,IAAK,SAAAC,GAAM,OAAA1E,EAAK+B,SAAW2C,CAAhB,EACXC,QAAS,SAAClC,GAAU,OAAAzC,EAAK0C,oBAAoBD,EAAO,KAAhC,EACpBT,MAAOrC,KAAKS,SACZwE,YAAajF,KAAKoB,UAClB6C,MAAM,gCAIVJ,EAAA,OAAKI,MAAM,2BAAyB,MACpCJ,EAAA,OAAKI,MAAM,0BACTJ,EAAA,OAAKI,MAAM,0BAAwB,IAAGpD,MAAM6D,OAAOC,WAAWC,QAC9Df,EAAA,SAAOS,KAAK,SAASO,UAAU,IACxBI,YAAajF,KAAKmB,QAClB2D,IAAK,SAAAC,GAAM,OAAA1E,EAAKiC,SAAWyC,CAAhB,EACXC,QAAS,SAAClC,GAAU,OAAAzC,EAAK0C,oBAAoBD,EAAzB,EACpBT,MAAOrC,KAAKW,SACZsD,MAAM,6BAA4B,mBAAkB,uB,EASzE/D,EAAAC,UAAA+E,iBAAA,WACElF,KAAKsD,QAAU,I,WA/MS,I"}
@@ -1,5 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function r(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n["throw"](t))}catch(t){o(t)}}function l(t){t.done?i(t.value):s(t.value).then(r,a)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(t){return function(e){return l([t,e])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(i=0)),i)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};
2
- /*!
3
- * Crafted with ❤ by Salla
4
- */System.register(["./p-5ee0461b.system.js","./p-77944169.system.js","./p-01a0d85b.system.js"],(function(t){"use strict";var e,i,n,s,o,r,a,l;return{setters:[function(t){e=t.r;i=t.c;n=t.h;s=t.H;o=t.g},function(t){r=t.H},function(t){a=t.a;l=t.F}],execute:function(){var u=":host{display:block}";var c=t("salla_filters_widget",function(){function t(t){e(this,t);this.changed=i(this,"changed",7);this.initHeight=195;this.widgetTitle=undefined;this.withLoadMore=undefined;this.filtersData=undefined;this.option=undefined;this.isOpen=true;this.isShowMore=false;this.showMoreLabel="عرض المزيد";this.showLessLabel="عرض أقل"}t.prototype.connectedCallback=function(){var t=this;this.withLoadMore=this.option.key!="price"&&Array.isArray(this.option.values)&&this.option.values.length>8;this.widgetTitle=this.option.label;salla.lang.onLoaded((function(){t.showMoreLabel=salla.lang.get("common.titles.more",t.showMoreLabel);t.showLessLabel=salla.lang.get("common.elements.show_less",t.showLessLabel)}))};t.prototype.componentDidLoad=function(){this.widgetValues.scrollHeight<this.initHeight&&(this.withLoadMore=false);this.withLoadMore&&this.widgetValues&&(this.widgetValues.style.maxHeight="".concat(this.initHeight,"px"));this.widgetContent.style.height="".concat(this.widgetContent.scrollHeight,"px")};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.option.type===a.RANGE){this.priceRange.reset()}Array.from(this.host.querySelectorAll("input")).forEach((function(t){return t.checked=false}));return[2]}))}))};t.prototype.showMore=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){this.isShowMore=!this.isShowMore;this.widgetContent.style.height="auto";this.widgetValues.style.maxHeight=this.isShowMore?"".concat(this.widgetValues.scrollHeight,"px"):"".concat(this.initHeight,"px");setTimeout((function(){t.widgetContent.style.height="".concat(t.widgetContent.scrollHeight,"px")}),400);return[2]}))}))};t.prototype.toggleWidget=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){this.isOpen=!this.isOpen;r.toggleElementClassIf(this.widgetContent,"s-filters-widget-opened","s-filters-widget-closed",(function(){return t.isOpen}));return[2]}))}))};t.prototype.renderFilterOption=function(t){var e=this;if(![a.VALUES,a.MINIMUM,a.VARIANTS].includes(t.type)){return""}return t.values.map((function(i,s){var o=typeof i=="number"?i:i.key||i.value;return n("label",{class:"s-filters-label",htmlFor:"".concat(t.key,"-option-").concat(s)},n("input",{id:"".concat(t.key,"-option-").concat(s),name:t.key,type:t.inputType,checked:e.isSelectedOption(t,o),class:"s-filters-".concat(t.inputType),onChange:function(i){return e.changed.emit({event:i,option:t,value:o})}}),e.getOptionLabel(t,i))}))};t.prototype.isSelectedOption=function(t,e){if(!this.filtersData||!this.filtersData[t.key]){return false}return t.inputType===l.CHECKBOX?this.filtersData[t.key].includes(e):this.filtersData[t.key]==e};t.prototype.getOptionLabel=function(t,e){if(t.key=="rating"){return n("salla-rating-stars",{size:"small",value:e})}var i=e.value||"null";return n("span",{class:"s-filters-option-name"},i)};t.prototype.render=function(){var t=this;return n(s,{class:"s-filters-widget-container"},n("h3",{class:"s-filters-widget-title",onClick:function(){return t.toggleWidget()}},n("span",null,this.widgetTitle),n("span",{class:"s-filters-widget-plusminus ".concat(this.isOpen?"s-filters-widget-plusminus-active":"")})),n("div",{class:"s-filters-widget-content",ref:function(e){return t.widgetContent=e}},n("div",{class:"s-filters-widget-values",ref:function(e){return t.widgetValues=e}},n("slot",null),this.option.type!==a.RANGE?this.renderFilterOption(this.option):n("salla-price-range",{onChanged:function(e){return t.changed.emit(e.detail)},ref:function(e){return t.priceRange=e},filtersData:this.filtersData,option:this.option})),this.withLoadMore&&n("a",{class:"s-filters-widget-more",onClick:function(){return t.showMore()}},!this.isShowMore?this.showMoreLabel:this.showLessLabel)))};Object.defineProperty(t.prototype,"host",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());c.style=u}}}));
5
- //# sourceMappingURL=p-9a9c63f6.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["sallaFiltersWidgetCss","SallaFiltersWidget","exports","this","initHeight","class_1","prototype","connectedCallback","_this","withLoadMore","option","key","Array","isArray","values","length","widgetTitle","label","salla","lang","onLoaded","showMoreLabel","get","showLessLabel","componentDidLoad","widgetValues","scrollHeight","style","maxHeight","concat","widgetContent","height","reset","type","FilterOptionTypes","RANGE","priceRange","from","host","querySelectorAll","forEach","input","checked","showMore","isShowMore","setTimeout","toggleWidget","isOpen","Helper","toggleElementClassIf","renderFilterOption","VALUES","MINIMUM","VARIANTS","includes","map","filterOption","index","value","h","class","htmlFor","id","name","inputType","isSelectedOption","onChange","e","changed","emit","event","getOptionLabel","filtersData","FilterOptionInputType","CHECKBOX","size","render","Host","onClick","ref","el","onChanged","detail","price"],"sources":["src/components/salla-filters-widget/salla-filters-widget.scss?tag=salla-filters-widget","src/components/salla-filters-widget/salla-filters-widget.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import {Component, Host, h, Method, State, Prop, Event, Element} from '@stencil/core';\nimport Helper from '../../Helpers/Helper';\nimport {Filter, FilterOptionInputType, 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 @Prop({mutable: true}) widgetTitle: string;\n @Prop({mutable: true}) withLoadMore: boolean;\n @Prop({reflect: true}) filtersData: object;\n @Prop({reflect: true}) option: Filter;\n priceRange: HTMLSallaPriceRangeElement\n\n\n private widgetValues: HTMLElement;\n private widgetContent: HTMLDivElement;\n private initHeight: number = 195;\n @State() isOpen: boolean = true;\n @State() isShowMore: boolean = false;\n @State() showMoreLabel: string=\"عرض المزيد\";\n @State() showLessLabel: string=\"عرض أقل\";\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 this.widgetTitle = this.option.label;\n salla.lang.onLoaded(() => {\n this.showMoreLabel=salla.lang.get('common.titles.more', this.showMoreLabel)\n this.showLessLabel=salla.lang.get('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 @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 @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 @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={option.inputType}\n //TODO:: debug more why sometimes it's not rendered as selected🤨\n checked={this.isSelectedOption(option, value)}\n class={`s-filters-${option.inputType}`}\n onChange={e => this.changed.emit({event: e, option: option, value: value})}\n />\n {this.getOptionLabel(option, filterOption)}\n </label>\n }\n )\n }\n\n private isSelectedOption(option: Filter, value) {\n if (!this.filtersData || !this.filtersData[option.key]) {\n return false\n }\n\n return option.inputType === FilterOptionInputType.CHECKBOX\n ? this.filtersData[option.key].includes(value)\n : this.filtersData[option.key] == value;\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.widgetTitle}</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) => this.changed.emit(event.detail)}\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"],"mappings":";;;yQAAA,IAAMA,EAAwB,uB,ICQjBC,EAAkBC,EAAA,kC,yDAWrBC,KAAAC,WAAqB,I,oHACF,K,gBACI,M,mBACA,a,mBACA,S,CAI/BC,EAAAC,UAAAC,kBAAA,eAAAC,EAAAL,KAEEA,KAAKM,aAAeN,KAAKO,OAAOC,KAAK,SAAWC,MAAMC,QAAQV,KAAKO,OAAOI,SAAWX,KAAKO,OAAOI,OAAOC,OAAS,EACjHZ,KAAKa,YAAcb,KAAKO,OAAOO,MAC/BC,MAAMC,KAAKC,UAAS,WAClBZ,EAAKa,cAAcH,MAAMC,KAAKG,IAAI,qBAAsBd,EAAKa,eAC7Db,EAAKe,cAAcL,MAAMC,KAAKG,IAAI,4BAA6Bd,EAAKe,c,KAIxElB,EAAAC,UAAAkB,iBAAA,WACErB,KAAKsB,aAAaC,aAAevB,KAAKC,aAAeD,KAAKM,aAAe,OACxEN,KAAKM,cAAgBN,KAAKsB,eAAkBtB,KAAKsB,aAAaE,MAAMC,UAAY,GAAAC,OAAG1B,KAAKC,WAAU,OACnGD,KAAK2B,cAAcH,MAAMI,OAAS,GAAAF,OAAG1B,KAAK2B,cAAcJ,aAAY,K,EAIhErB,EAAAC,UAAA0B,MAAN,W,qFACE,GAAI7B,KAAKO,OAA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