@salla.sa/twilight-components 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-button_27.cjs.entry.js +27879 -0
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +26 -0
- package/dist/cjs/salla-scopes.cjs.entry.js +9 -6
- package/dist/cjs/salla-select.cjs.entry.js +159 -0
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/assets/svg/caret-down.svg +0 -1
- package/dist/collection/assets/svg/images.svg +0 -1
- package/dist/collection/collection-manifest.json +5 -0
- package/dist/collection/components/salla-datetime-picker/interfaces.js +4 -0
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.css +13 -0
- package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1374 -0
- package/dist/collection/components/salla-file-upload/interfaces.js +42 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.css +219 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +1435 -0
- package/dist/collection/components/salla-gifting/gift-schema.js +4 -0
- package/dist/collection/components/salla-gifting/intefaces.js +4 -0
- package/dist/collection/components/salla-gifting/salla-gifting.css +20 -0
- package/dist/collection/components/salla-gifting/salla-gifting.js +564 -0
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +23 -13
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +48 -29
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.css +3 -0
- package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +69 -0
- package/dist/collection/components/salla-loyalty/salla-loyalty.css +0 -4
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +29 -16
- package/dist/collection/components/salla-modal/salla-modal.css +6 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +37 -13
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +23 -8
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +87 -64
- package/dist/collection/components/salla-scopes/salla-scopes.js +11 -7
- package/dist/collection/components/salla-search/salla-search.js +1 -1
- package/dist/collection/components/salla-select/salla-select.css +86 -0
- package/dist/collection/components/salla-select/salla-select.js +610 -0
- package/dist/collection/components/salla-tel-input/interfaces.js +4 -0
- package/dist/collection/components/salla-tel-input/salla-tel-input.css +1 -2
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +32 -3
- package/dist/collection/components/salla-verify/salla-verify.js +1 -1
- package/dist/collection/global/app.js +15 -12
- package/dist/components/_commonjsHelpers.js +24 -0
- package/dist/components/anime.es.js +1312 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +5 -0
- package/dist/components/salla-datetime-picker.d.ts +11 -0
- package/dist/components/salla-datetime-picker.js +9 -0
- package/dist/components/salla-datetime-picker2.js +2876 -0
- package/dist/components/salla-file-upload.d.ts +11 -0
- package/dist/components/salla-file-upload.js +9 -0
- package/dist/components/salla-file-upload2.js +14623 -0
- package/dist/components/salla-gifting.d.ts +11 -0
- package/dist/components/salla-gifting.js +499 -0
- package/dist/components/salla-localization-modal.js +31 -16
- package/dist/components/salla-login-modal.js +37 -20
- package/dist/components/salla-loyalty-prize-item.d.ts +11 -0
- package/dist/components/salla-loyalty-prize-item.js +42 -0
- package/dist/components/salla-loyalty.js +28 -17
- package/dist/components/salla-modal2.js +1 -1
- package/dist/components/salla-offer-modal.js +42 -12
- package/dist/components/salla-product-size-guide.js +21 -6
- package/dist/components/salla-rating-modal.js +47 -19
- package/dist/components/salla-scopes.js +10 -6
- package/dist/components/salla-search.js +1 -1
- package/dist/components/salla-select.d.ts +11 -0
- package/dist/components/salla-select.js +199 -0
- package/dist/components/salla-social-share.js +1 -1308
- package/dist/components/salla-swiper2.js +9 -9
- package/dist/components/salla-tel-input2.js +15 -18
- package/dist/components/salla-verify2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-button_27.entry.js +27849 -0
- package/dist/esm/salla-loyalty-prize-item.entry.js +22 -0
- package/dist/esm/salla-scopes.entry.js +9 -6
- package/dist/esm/salla-select.entry.js +155 -0
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/p-49125b6a.entry.js +4 -0
- package/dist/twilight-components/p-9a25753c.entry.js +4 -0
- package/dist/twilight-components/p-b7b9439d.entry.js +22 -0
- package/dist/twilight-components/p-df1eb1e5.entry.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-datetime-picker/interfaces.d.ts +8 -0
- package/dist/types/components/salla-datetime-picker/salla-datetime-picker.d.ts +250 -0
- package/dist/types/components/salla-file-upload/interfaces.d.ts +766 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +267 -0
- package/dist/types/components/salla-gifting/gift-schema.d.ts +20 -0
- package/dist/types/components/salla-gifting/intefaces.d.ts +18 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +98 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +3 -2
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +13 -3
- package/dist/types/components/salla-loyalty/salla-loyalty-prize-item.d.ts +8 -0
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +2 -0
- package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -1
- package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +4 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -2
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +1 -0
- package/dist/types/components/salla-select/salla-select.d.ts +110 -0
- package/dist/types/components/salla-tel-input/interfaces.d.ts +4 -0
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -0
- package/dist/types/components.d.ts +1253 -10
- package/package.json +2 -2
- package/dist/cjs/salla-button_24.cjs.entry.js +0 -10087
- package/dist/esm/salla-button_24.entry.js +0 -10060
- package/dist/twilight-components/p-30b2c5b0.entry.js +0 -4
- package/dist/twilight-components/p-5fb32395.entry.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import{r as e,h as t,H as i}from"./p-1503d976.js";const s=class{constructor(t){e(this,t),this.label=void 0,this.items=[],this.itemText="text",this.itemValue="value",this.itemDisabled="disabled",this.size="normal",this.value=void 0,this.autofocus=!1,this.clearable=!1,this.clearIcon="sicon-cancel",this.color="primary",this.flat=void 0,this.disabled=!1,this.loading=!1,this.loadingColor="primary",this.hint=void 0,this.persistHint=!1,this.placeholder=void 0,this.multiple=!1,this.autocomplete=!1,this.required=!1,this.chips=!1,this.shape="outlined",this.returnObject=!1,this.hideDetail=!1}selectClass(){return`s-select-field s-select-${this.shape} ${this.color} ${this.size}`}onSelectedItemChange(e){let t=e.target.selectedIndex;if(t<0)return void(this.value=void 0);let i=this.items[this.placeholder?t-1:t];this.value=this.returnObject?i:i[this.itemValue],console.log("🚀 ~ file: salla-select.tsx ~ line 153 ~ SallaSelect ~ onSelectedItemChange ~ this.value",this.value)}generateHint(){return this.persistHint||this.value?t("div",{class:"s-select-hint"},this.hint):""}checkForSelected(e){return this.returnObject&&this.value?e[this.itemValue]=this.value[this.itemValue]:e[this.itemValue]==this.value}render(){return t(i,null,this.label?t("label",{htmlFor:"s-select",class:"s-select-label"},this.label):"",t("select",{multiple:this.multiple,autocomplete:this.autocomplete?"on":"off",disabled:this.disabled,autoFocus:this.autofocus,id:"s-select",class:this.selectClass(),onChange:this.onSelectedItemChange.bind(this)},this.placeholder?t("option",{selected:!this.value},this.placeholder):"",this.items.map((e=>t("option",{label:e[this.itemText],value:e[this.itemValue],selected:this.checkForSelected(e),disabled:e[this.itemDisabled]})))),t("div",{class:{"s-hidden":this.hideDetail}},this.generateHint()))}};s.style=".s-select-label{display:block;margin-bottom:0.5rem;color:#111827;font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-select-underline{display:block;padding-left:0;padding-right:0;padding-top:0.625rem;padding-bottom:0.625rem;background-color:transparent;color:#6B7280;font-size:0.875rem;line-height:1.25rem;width:100%;border-width:0;border-bottom-width:2px;border-color:#E5E7EB;appearance:none}.s-select-outlined{display:block;padding:0.625rem;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:1rem;padding-right:1rem;background-color:#F9FAFB;color:#111827;font-size:0.875rem;line-height:1.25rem;width:100%;border-radius:0.5rem;border-width:1px;border-color:#D1D5DB}.s-select-x-large{height:5rem}.s-select-large{height:4rem}.s-select-normal{height:3rem}.s-select-small{height:3rem}.s-select-x-small{height:2.5rem}.s-select-field{padding-top:0.25rem;padding-bottom:0.25rem;padding-right:0.5rem;padding-left:0.5rem;margin:0;font-size:1.125rem;line-height:1.75rem;font-weight:400;line-height:1.75rem;width:100%;border-radius:0.375rem;border-color:#9CA3AF;box-shadow:none}.s-select-hint{margin-top:0.25rem;color:#374151;font-size:0.875rem;line-height:1.25rem;line-height:1.25rem}";export{s as salla_select}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as a}from"./p-1503d976.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-30b2c5b0",[[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:[1,"guest-message"],loyaltyProgram:[32],buttonLoading:[32],selectedItem:[32],askConfirmation:[32],is_loggedin:[32],translationLoaded:[32],open:[64],close:[64],resetExchange:[64],exchangeLoyaltyPoint:[64]}],[4,"salla-product-size-guide",{guides:[32],productId:[32],open:[64],close:[64]}],[4,"salla-login-modal",{isEmailAllowed:[1028,"is-email-allowed"],isMobileAllowed:[1028,"is-mobile-allowed"],isEmailRequired:[1028,"is-email-required"],translationLoaded:[32],title:[32],emailErrorMsg:[32],firstNameErrorMsg:[32],lastNameErrorMsg:[32],open:[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{language:[1537],currency:[1537],translationLoaded:[32],languages:[32],currencies:[32],isLoading:[32],open:[64],close:[64],submit:[64]}],[0,"salla-rating-modal",{orderId:[2,"order-id"],order:[32],translationLoaded:[32],open:[64],close:[64]}],[0,"salla-offer-modal",{offer:[32],offer_name:[32],offer_message:[32],translationLoaded:[32],open:[64],showOffer:[64]}],[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:[16],opened:[32],allPlatforms:[32],platformIcons:[32],open:[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-product-availability",{channels:[1],productId:[2,"product-id"],isSubscribed:[1028,"is-subscribed"],translationLoaded:[32],title_:[32],isVisitorSubscribed:[32]}],[4,"salla-verify",{display:[1],type:[1025],autoReload:[4,"auto-reload"],translationLoaded:[32],title:[32],resendAfter:[32],isProfileVerify:[32],getCode:[64],open:[64]}],[4,"salla-swiper",{loop:[4],speed:[2],itemPerView:[8,"item-per-view"],spaceBetweenItems:[2,"space-between-items"],currentIndex:[32],isLastSlideItem:[32],isFirstSlideItem:[32]}],[0,"salla-rating-stars",{name:[1],size:[1],value:[2]}],[4,"salla-list-tile",{href:[1],target:[1]}],[4,"salla-tab-content",{name:[1],isSelected:[32],getChild:[64]}],[4,"salla-tab-header",{name:[1],activeClass:[1,"active-class"],height:[8],centered:[4],isSelected:[32],getChild:[64]}],[4,"salla-tabs",{backgroundColor:[1,"background-color"],vertical:[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-placeholder",{icon:[1],alignment:[1],iconSize:[1,"icon-size"],translationLoaded:[32]}],[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]}],[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]}],[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"]}]]],["p-5fb32395",[[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],close:[64],open:[64],handleSubmit:[64]}]]],["p-76cb2574",[[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"]}]]],["p-019bb315",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-639d5426",[[0,"salla-installment",{price:[1],language:[1],currency:[1],tamaraIsActive:[32],tabbyIsActive:[32],spotiiIsActive:[32]}]]]],e)));
|
|
4
|
+
import{p as e,b as l}from"./p-1503d976.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((e=>l(JSON.parse('[["p-b7b9439d",[[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],"step1Elems":[32],"step2Elems":[32],"stepsWrapper":[32],"imageCover":[32],"textSelect":[32],"customTextArea":[32],"calendarFormGroup":[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":[1,"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]}],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"translationLoaded":[32],"languages":[32],"currencies":[32],"hasError":[32],"errorMessage":[32],"open":[64],"close":[64],"submit":[64]}],[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"currentTabName":[32],"regType":[32],"translationLoaded":[32],"title":[32],"emailErrorMsg":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"hasError":[32],"errorMessage":[32],"translationLoaded":[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]}],[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":[16],"opened":[32],"allPlatforms":[32],"platformIcons":[32],"open":[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-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"translationLoaded":[32],"title_":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"translationLoaded":[32],"title":[32],"resendAfter":[32],"isProfileVerify":[32],"getCode":[64],"open":[64]}],[0,"salla-datetime-picker",{"value":[1025],"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"],"onChange":[16],"onClose":[16],"onDayCreate":[16],"onDestroy":[16],"onKeyDown":[16],"onMonthChange":[16],"onOpen":[16],"onParseConfig":[16],"onReady":[16],"onValueUpdate":[16],"onYearChange":[16],"dateParser":[16],"position":[1],"positionElement":[16],"prevArrow":[1,"prev-arrow"],"shorthandCurrentMonth":[4,"shorthand-current-month"],"static":[4],"showMonths":[2,"show-months"],"time_24hr":[4,"time_-2-4hr"],"weekNumbers":[4,"week-numbers"],"wrap":[4]}],[0,"salla-file-upload",{"required":[4],"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],"serverConfig":[1,"server-config"],"instantUpload":[4,"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":[1,"label-idle"],"labelInvalidField":[1,"label-invalid-field"],"labelFileWaitingForSize":[1,"label-file-waiting-for-size"],"labelFileSizeNotAvailable":[1,"label-file-size-not-available"],"labelFileLoading":[1,"label-file-loading"],"labelFileLoadError":[1,"label-file-load-error"],"labelFileProcessing":[1,"label-file-processing"],"labelFileProcessingComplete":[1,"label-file-processing-complete"],"labelFileProcessingAborted":[1,"label-file-processing-aborted"],"labelFileProcessingError":[1,"label-file-processing-error"],"labelFileProcessingRevertError":[1,"label-file-processing-revert-error"],"labelFileRemoveError":[1,"label-file-remove-error"],"labelTapToCancel":[1,"label-tap-to-cancel"],"labelTapToRetry":[1,"label-tap-to-retry"],"labelTapToUndo":[1,"label-tap-to-undo"],"labelButtonRemoveItem":[1,"label-button-remove-item"],"labelButtonAbortItemLoad":[1,"label-button-abort-item-load"],"labelButtonRetryItemLoad":[1,"label-button-retry-item-load"],"labelButtonAbortItemProcessing":[1,"label-button-abort-item-processing"],"labelButtonUndoItemProcessing":[1,"label-button-undo-item-processing"],"labelButtonRetryItemProcessing":[1,"label-button-retry-item-processing"],"labelButtonProcessItem":[1,"label-button-process-item"],"iconRemove":[1,"icon-remove"],"iconProcess":[1,"icon-process"],"iconRetry":[1,"icon-retry"],"iconUndo":[1,"icon-undo"],"pond":[32],"files":[32],"appendFile":[64]}],[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}],[4,"salla-swiper",{"loop":[4],"speed":[2],"itemPerView":[8,"item-per-view"],"spaceBetweenItems":[2,"space-between-items"],"currentIndex":[32],"isLastSlideItem":[32],"isFirstSlideItem":[32]}],[4,"salla-tab-content",{"name":[1],"isSelected":[32],"getChild":[64]}],[4,"salla-tab-header",{"name":[1],"activeClass":[1,"active-class"],"height":[8],"centered":[4],"isSelected":[32],"getChild":[64]}],[4,"salla-tabs",{"backgroundColor":[1,"background-color"],"vertical":[4]},[[0,"tabSelected","onSelectedTab"]]],[4,"salla-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]}],[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"]}]]],["p-9a25753c",[[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],"close":[64],"open":[64],"handleSubmit":[64]}]]],["p-76cb2574",[[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"]}]]],["p-019bb315",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-639d5426",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["p-49125b6a",[[0,"salla-loyalty-prize-item",{"item":[16]}]]],["p-df1eb1e5",[[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"]}]]]]'),e)));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare type DateOption = Date | string | number;
|
|
2
|
+
export declare type DateRangeLimit<D = DateOption> = {
|
|
3
|
+
from: D;
|
|
4
|
+
to: D;
|
|
5
|
+
};
|
|
6
|
+
export declare type DateLimit<D = DateOption> = D | DateRangeLimit<D> | ((date: Date) => boolean);
|
|
7
|
+
export declare type Hook = (dates: Date[], currentDateString: string, self: any, data?: any) => void;
|
|
8
|
+
export declare type LocaleKey = "ar" | "at" | "az" | "be" | "bg" | "bn" | "bs" | "ca" | "cat" | "ckb" | "cs" | "cy" | "da" | "de" | "default" | "en" | "eo" | "es" | "et" | "fa" | "fi" | "fo" | "fr" | "gr" | "he" | "hi" | "hr" | "hu" | "hy" | "id" | "is" | "it" | "ja" | "ka" | "ko" | "km" | "kz" | "lt" | "lv" | "mk" | "mn" | "ms" | "my" | "nl" | "nn" | "no" | "pa" | "pl" | "pt" | "ro" | "ru" | "si" | "sk" | "sl" | "sq" | "sr" | "sv" | "th" | "tr" | "uk" | "vn" | "zh" | "uz" | "uz_latn" | "zh_tw";
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { DateOption, LocaleKey, Hook, DateLimit } from './interfaces';
|
|
3
|
+
export declare class SallaDatetimePicker {
|
|
4
|
+
dateInput: HTMLInputElement;
|
|
5
|
+
/**
|
|
6
|
+
* Two way data binding to retrieve the selected date[time] value
|
|
7
|
+
*/
|
|
8
|
+
value: string;
|
|
9
|
+
/**
|
|
10
|
+
* Placeholder text to show on the input element
|
|
11
|
+
*/
|
|
12
|
+
placeholder: string;
|
|
13
|
+
/**
|
|
14
|
+
* Allows the user to enter a date directly into the input field. By default, direct entry is disabled.
|
|
15
|
+
*/
|
|
16
|
+
allowInput: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid
|
|
19
|
+
*/
|
|
20
|
+
allowInvalidPreload: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Exactly the same as date format, but for the altInput field.
|
|
23
|
+
*/
|
|
24
|
+
altFormat: string;
|
|
25
|
+
/**
|
|
26
|
+
* Show the user a readable date (as per altFormat), but return something totally different to the server.
|
|
27
|
+
*/
|
|
28
|
+
altInput: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* This class will be added to the input element created by the altInput option.
|
|
31
|
+
* Note that altInput already inherits classes from the original input.
|
|
32
|
+
*/
|
|
33
|
+
altInputClass: string;
|
|
34
|
+
/**
|
|
35
|
+
* Instead of body, appends the calendar to the specified node instead.
|
|
36
|
+
*/
|
|
37
|
+
appendTo: HTMLElement;
|
|
38
|
+
/**
|
|
39
|
+
* Defines how the date will be formatted in the aria-label for calendar days,
|
|
40
|
+
* using the same tokens as dateFormat. If you change this, you should choose a
|
|
41
|
+
* value that will make sense if a screen reader reads it out loud.
|
|
42
|
+
*/
|
|
43
|
+
ariaDateFormat: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the default time should be auto-filled when the input is empty and gains or loses focus.
|
|
46
|
+
*/
|
|
47
|
+
autoFillDefaultTime: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether clicking on the input should open the picker.
|
|
50
|
+
* Set it to false if you only want to open the calendar programmatically with [open()]
|
|
51
|
+
*/
|
|
52
|
+
clickOpens: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether calendar should close after date selection or not
|
|
55
|
+
*/
|
|
56
|
+
closeOnSelect: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* When in "multiple" mode, conjunction is used to separate dates in the entry field.
|
|
59
|
+
*/
|
|
60
|
+
conjunction?: string;
|
|
61
|
+
/**
|
|
62
|
+
* A string of characters which are used to define how the date will be displayed in the input box.
|
|
63
|
+
* The supported characters are defined in the table below.
|
|
64
|
+
*/
|
|
65
|
+
dateFormat: string;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the initial selected date(s). If you're using mode: "multiple" or a range calendar supply an
|
|
68
|
+
* Array of Date objects or an Array of date strings which follow your dateFormat. Otherwise, you can supply
|
|
69
|
+
* a single Date object or a date string.
|
|
70
|
+
*/
|
|
71
|
+
defaultDate: DateOption | DateOption[];
|
|
72
|
+
/**
|
|
73
|
+
* Initial value of the hour element, when no date is selected
|
|
74
|
+
*/
|
|
75
|
+
defaultHour: number;
|
|
76
|
+
/**
|
|
77
|
+
* Initial value of the minute element, when no date is selected
|
|
78
|
+
*/
|
|
79
|
+
defaultMinute: number;
|
|
80
|
+
/**
|
|
81
|
+
* Initial value of the seconds element, when no date is selected
|
|
82
|
+
*/
|
|
83
|
+
defaultSeconds: number;
|
|
84
|
+
/**
|
|
85
|
+
* Disables certain dates, preventing them from being selected.
|
|
86
|
+
* See https://chmln.github.io/flatpickr/examples/#disabling-specific-dates
|
|
87
|
+
*/
|
|
88
|
+
disable: DateLimit<DateOption>[];
|
|
89
|
+
/**
|
|
90
|
+
* Set this to true to always use the non-native picker on mobile devices.
|
|
91
|
+
* By default, Flatpickr utilizes native datetime widgets unless certain options (e.g. disable) are used.
|
|
92
|
+
*/
|
|
93
|
+
disableMobile: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Disables all dates except these specified. See https://chmln.github.io/flatpickr/examples/#disabling-all-dates-except-select-few
|
|
96
|
+
*/
|
|
97
|
+
enable: DateLimit<DateOption>[];
|
|
98
|
+
/**
|
|
99
|
+
* Enables seconds selection in the time picker.
|
|
100
|
+
*/
|
|
101
|
+
enableSeconds: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Enables the time picker
|
|
104
|
+
*/
|
|
105
|
+
enableTime: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Allows using a custom date formatting function instead of the built-in handling for date formats using dateFormat, altFormat, etc.
|
|
108
|
+
*/
|
|
109
|
+
formatDate: (date: Date, format: string, locale: Object) => string;
|
|
110
|
+
/**
|
|
111
|
+
* Adjusts the step for the hour input (incl. scrolling)
|
|
112
|
+
*/
|
|
113
|
+
hourIncrement: number;
|
|
114
|
+
/**
|
|
115
|
+
* Displays the calendar inline
|
|
116
|
+
*/
|
|
117
|
+
inline: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The locale, either as a string (e.g. "ar", "en") or as an object.
|
|
120
|
+
* See https://chmln.github.io/flatpickr/localization/
|
|
121
|
+
*/
|
|
122
|
+
locale: LocaleKey;
|
|
123
|
+
/**
|
|
124
|
+
* The maximum date that a user can pick to (inclusive).
|
|
125
|
+
*/
|
|
126
|
+
maxDate: DateOption;
|
|
127
|
+
/**
|
|
128
|
+
* The minimum date that a user can start picking from (inclusive).
|
|
129
|
+
*/
|
|
130
|
+
maxTime: DateOption;
|
|
131
|
+
/**
|
|
132
|
+
* The minimum date that a user can start picking from (inclusive).
|
|
133
|
+
*/
|
|
134
|
+
minDate: DateOption;
|
|
135
|
+
/**
|
|
136
|
+
* The minimum time that a user can start picking from (inclusive).
|
|
137
|
+
*/
|
|
138
|
+
minTime: DateOption;
|
|
139
|
+
/**
|
|
140
|
+
* Adjusts the step for the minute input (incl. scrolling) Defaults to 5
|
|
141
|
+
*/
|
|
142
|
+
minuteIncrement: number;
|
|
143
|
+
/**
|
|
144
|
+
* Date selection mode, defaults to "single"
|
|
145
|
+
*/
|
|
146
|
+
mode: "single" | "multiple" | "range" | "time";
|
|
147
|
+
/**
|
|
148
|
+
* How the month should be displayed in the header of the calendar.
|
|
149
|
+
* If showMonths has a value greater than 1, the month is always shown as static.
|
|
150
|
+
*/
|
|
151
|
+
monthSelectorType: "dropdown" | "static";
|
|
152
|
+
/**
|
|
153
|
+
* HTML for the arrow icon, used to switch months.
|
|
154
|
+
*/
|
|
155
|
+
nextArrow: string;
|
|
156
|
+
/**
|
|
157
|
+
* Hides the day selection in calendar. Use it along with enableTime to create a time picker.
|
|
158
|
+
*/
|
|
159
|
+
noCalendar: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Fires when the selected dates have changed - when a date is picked or cleared, by user or programmatically.
|
|
162
|
+
*/
|
|
163
|
+
onChange: Hook | Hook[];
|
|
164
|
+
/**
|
|
165
|
+
* Fires when the calendar is closed
|
|
166
|
+
*/
|
|
167
|
+
onClose: Hook | Hook[];
|
|
168
|
+
/**
|
|
169
|
+
* Fires for every day cell in the calendar, where the fourth argument is the html element of the cell.
|
|
170
|
+
* See https://chmln.github.io/flatpickr/events/#ondaycreate
|
|
171
|
+
*/
|
|
172
|
+
onDayCreate: Hook | Hook[];
|
|
173
|
+
/**
|
|
174
|
+
* Fires before the calendar instance is destroyed
|
|
175
|
+
*/
|
|
176
|
+
onDestroy: Hook | Hook[];
|
|
177
|
+
/**
|
|
178
|
+
* Fires when valid keyboard input for calendar is detected
|
|
179
|
+
*/
|
|
180
|
+
onKeyDown: Hook | Hook[];
|
|
181
|
+
/**
|
|
182
|
+
* Fires after the month has changed
|
|
183
|
+
*/
|
|
184
|
+
onMonthChange: Hook | Hook[];
|
|
185
|
+
/**
|
|
186
|
+
* Fires after the calendar is opened
|
|
187
|
+
*/
|
|
188
|
+
onOpen: Hook | Hook[];
|
|
189
|
+
/**
|
|
190
|
+
* Fires after the configuration for the calendar is parsed
|
|
191
|
+
*/
|
|
192
|
+
onParseConfig: Hook | Hook[];
|
|
193
|
+
/**
|
|
194
|
+
* Fires once the calendar instance is ready
|
|
195
|
+
*/
|
|
196
|
+
onReady: Hook | Hook[];
|
|
197
|
+
/**
|
|
198
|
+
* Like onChange, but fires immediately after any date changes
|
|
199
|
+
*/
|
|
200
|
+
onValueUpdate: Hook | Hook[];
|
|
201
|
+
/**
|
|
202
|
+
* Fires after the year has changed
|
|
203
|
+
*/
|
|
204
|
+
onYearChange: Hook | Hook[];
|
|
205
|
+
/**
|
|
206
|
+
* A custom datestring parser
|
|
207
|
+
*/
|
|
208
|
+
dateParser: (date: string, format: string) => Date;
|
|
209
|
+
/**
|
|
210
|
+
* How the calendar should be positioned with regards to the input. Defaults to "auto"
|
|
211
|
+
*/
|
|
212
|
+
position: "auto" | "above" | "below" | "auto left" | "auto center" | "auto right" | "above left" | "above center" | "above right" | "below left" | "below center" | "below right" | ((self: any, customElement: HTMLElement | undefined) => void);
|
|
213
|
+
/**
|
|
214
|
+
* The element off of which the calendar will be positioned. Defaults to the date input
|
|
215
|
+
*/
|
|
216
|
+
positionElement: HTMLElement;
|
|
217
|
+
/**
|
|
218
|
+
* HTML for the left arrow icon, used to switch months.
|
|
219
|
+
*/
|
|
220
|
+
prevArrow: string;
|
|
221
|
+
/**
|
|
222
|
+
* Whether to display the current month name in shorthand mode, e.g. "Sep" instead "September"
|
|
223
|
+
*/
|
|
224
|
+
shorthandCurrentMonth: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Position the calendar inside the wrapper and next to the input element*.
|
|
227
|
+
*/
|
|
228
|
+
static: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* The number of months to be shown at the same time when displaying the calendar.
|
|
231
|
+
*/
|
|
232
|
+
showMonths: number;
|
|
233
|
+
/**
|
|
234
|
+
* Displays time picker in 24 hour mode without AM/PM selection when enabled.
|
|
235
|
+
*/
|
|
236
|
+
time_24hr: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* Enables display of week numbers in calendar.
|
|
239
|
+
*/
|
|
240
|
+
weekNumbers: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* See https://chmln.github.io/flatpickr/examples/#flatpickr-external-elements
|
|
243
|
+
*/
|
|
244
|
+
wrap: boolean;
|
|
245
|
+
picked: EventEmitter<any>;
|
|
246
|
+
private onInputChange;
|
|
247
|
+
componentDidLoad(): void;
|
|
248
|
+
initPicker(): void;
|
|
249
|
+
render(): any;
|
|
250
|
+
}
|