@salla.sa/twilight-components 1.0.69 → 1.0.71
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.cjs.entry.js +2 -2
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +0 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-login-modal.cjs.entry.js +8 -10
- package/dist/cjs/salla-modal_2.cjs.entry.js +0 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -4
- package/dist/cjs/salla-rating-modal.cjs.entry.js +0 -4
- package/dist/cjs/salla-tel-input.cjs.entry.js +3 -6
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/components/salla-button/salla-button.css +4 -2
- package/dist/collection/components/salla-button/salla-button.js +2 -2
- package/dist/collection/components/salla-conditional-fields/salla-conditional-fields.js +0 -1
- package/dist/collection/components/salla-installment/salla-installment.css +1 -0
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +15 -15
- package/dist/collection/components/salla-modal/salla-modal.js +0 -1
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.css +10 -4
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +0 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +0 -4
- package/dist/collection/components/salla-search/salla-search.js +0 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +5 -27
- package/dist/components/salla-button2.js +2 -2
- package/dist/components/salla-conditional-fields.js +0 -1
- package/dist/components/salla-installment.js +1 -1
- package/dist/components/salla-login-modal.js +8 -10
- package/dist/components/salla-modal2.js +0 -1
- package/dist/components/salla-offer-modal.js +1 -4
- package/dist/components/salla-rating-modal.js +0 -4
- package/dist/components/salla-search.js +0 -1
- package/dist/components/salla-tel-input2.js +3 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-button.entry.js +2 -2
- package/dist/esm/salla-conditional-fields.entry.js +0 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-login-modal.entry.js +8 -10
- package/dist/esm/salla-modal_2.entry.js +0 -2
- package/dist/esm/salla-offer-modal.entry.js +1 -4
- package/dist/esm/salla-rating-modal.entry.js +0 -4
- package/dist/esm/salla-tel-input.entry.js +3 -6
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/{p-aecd5e75.entry.js → p-35b0d8f6.entry.js} +1 -1
- package/dist/twilight-components/{p-9eaeceb7.entry.js → p-3aabd1b6.entry.js} +1 -1
- package/dist/twilight-components/p-44910fc8.entry.js +4 -0
- package/dist/twilight-components/{p-ec5f10e4.entry.js → p-50502ca8.entry.js} +1 -1
- package/dist/twilight-components/{p-676beef2.entry.js → p-94d96cef.entry.js} +1 -1
- package/dist/twilight-components/{p-191c7430.entry.js → p-ca4cf691.entry.js} +1 -1
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-button/salla-button.d.ts +1 -1
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +0 -1
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +1 -4
- package/dist/types/components.d.ts +3 -5
- package/package.json +2 -2
- package/dist/twilight-components/p-0f256a3b.entry.js +0 -4
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -17,7 +17,7 @@ const patchEsm = () => {
|
|
|
17
17
|
const defineCustomElements = (win, options) => {
|
|
18
18
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
19
19
|
return patchEsm().then(() => {
|
|
20
|
-
return index.bootstrapLazy([["salla-modal_2.cjs",[[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"show":[64]},[[0,"verified","onVerified"]]]]],["salla-product-availability.cjs",[[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"show":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-button.cjs",[[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]],["salla-tel-input.cjs",[[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"
|
|
20
|
+
return index.bootstrapLazy([["salla-modal_2.cjs",[[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"show":[64]},[[0,"verified","onVerified"]]]]],["salla-product-availability.cjs",[[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"show":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-button.cjs",[[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]],["salla-tel-input.cjs",[[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-c0f5bb97.js');
|
|
9
9
|
|
|
10
|
-
const sallaButtonCss = "salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}salla-button[width=wide]{width:100%}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-element{pointer-events:none !important}.s-button-wrap[loading] .s-button-loader-center .s-button-text{opacity:0}.s-button-wrap .s-button-element[loading]{pointer-events:none !important}.s-button-wrap .s-button-element:not(:disabled){pointer-events:auto}.s-button-wrap .s-button-solid .s-button-loader:before{border-color:#fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2)}.s-button-wrap .s-button-outline{border:1px solid currentColor}.s-button-wrap .s-button-outline:hover{border-color:transparent}.s-button-wrap .s-button-outline .s-button-loader:before{border-top-color:currentColor;border-left-color:currentColor}.s-button-wrap .s-button-icon.s-button-large{width:56px;height:56px}.s-button-wrap .s-button-icon.s-button-small{width:24px;height:24px}.s-button-wrap .s-button-icon.s-button-small .s-button-loader:before{width:0.85rem;height:0.85rem}.s-button-wrap .s-button-loader-after .s-button-load{flex-direction:row}.s-button-wrap .s-button-loader-start.s-button-element{padding-right:
|
|
10
|
+
const sallaButtonCss = "salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}salla-button[width=wide]{width:100%}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-element{pointer-events:none !important}.s-button-wrap[loading] .s-button-loader-center .s-button-text{opacity:0}.s-button-wrap .s-button-element[loading]{pointer-events:none !important}.s-button-wrap .s-button-element:not(:disabled){pointer-events:auto}.s-button-wrap .s-button-solid .s-button-loader:before{border-color:#fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2)}.s-button-wrap .s-button-outline{border:1px solid currentColor}.s-button-wrap .s-button-outline:hover{border-color:transparent}.s-button-wrap .s-button-outline .s-button-loader:before{border-top-color:currentColor;border-left-color:currentColor}.s-button-wrap .s-button-icon.s-button-large{width:56px;height:56px}.s-button-wrap .s-button-icon.s-button-small{width:24px;height:24px}.s-button-wrap .s-button-icon.s-button-small .s-button-loader:before{width:0.85rem;height:0.85rem}.s-button-wrap .s-button-loader-after .s-button-load{flex-direction:row}.s-button-wrap .s-button-loader-start.s-button-element{padding-left:32px;padding-right:32px}.s-button-wrap .s-button-loader-start .s-button-loader{position:absolute;right:8px}.s-button-wrap .s-button-loader-start .s-button-loader [dir=ltr]{left:8px;right:auto}.s-button-wrap .s-button-loader-end.s-button-element{padding-left:32px;padding-right:32px}.s-button-wrap .s-button-loader-end .s-button-loader{position:absolute;left:8px}.s-button-wrap .s-button-loader-end .s-button-loader [dir=ltr]{right:8px;left:auto}.s-button-wrap .s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin:0 !important}";
|
|
11
11
|
|
|
12
12
|
const SallaButton = class {
|
|
13
13
|
constructor(hostRef) {
|
|
14
14
|
index.registerInstance(this, hostRef);
|
|
15
15
|
this.hostAttributes = {};
|
|
16
16
|
/**
|
|
17
|
-
* Button Type
|
|
17
|
+
* Button Type
|
|
18
18
|
*/
|
|
19
19
|
this.shape = 'btn';
|
|
20
20
|
/**
|
|
@@ -17,7 +17,6 @@ const SallaConditionalFields = class {
|
|
|
17
17
|
var _a;
|
|
18
18
|
salla.log('Received the change event: ', event);
|
|
19
19
|
if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox'].includes(event.target.getAttribute('type'))) {
|
|
20
|
-
// todo :: support debug
|
|
21
20
|
salla.log('Ignore the change because is not support input: ' + (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.tagName) || 'N/A'));
|
|
22
21
|
return;
|
|
23
22
|
}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index = require('./index-c0f5bb97.js');
|
|
9
9
|
|
|
10
|
-
const sallaInstallmentCss = "#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;padding:15px;box-shadow:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;border:1px solid var(--color-grey-dark);padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm);margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";
|
|
10
|
+
const sallaInstallmentCss = "#tabbyPromoWrapper{background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);margin-bottom:20px}#tabbyPromoWrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}#tabbyPromoWrapper #tabbyPromo *{font-family:var(--font-main)}#tabbyPromoWrapper #tabbyPromo>div>div{max-width:none;padding:15px;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__text,#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-size:var(--font-sm);color:var(--color-text) !important}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet__link{font-weight:bold}.tabby-promo-wrapper #tabby-promo{font-family:var(--font-main) !important}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-title{font-size:var(--font-md)}.tabby-promo-wrapper #tabby-promo .tabby-promo__feature-desc{font-size:var(--font-sm);line-height:20px}.tamara-product-widget{margin-bottom:20px}.tamara-product-widget,.spotii-wrapper{min-height:100px;position:relative;color:var(--color-text);font-size:var(--font-sm);line-height:1.25;border:1px solid var(--color-grey-dark);padding:18px 20px 18px 100px !important;background:white;border-radius:0.375rem;transition:box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm);margin-top:10px}.tamara-product-widget .tamara-logo{position:absolute;left:20px;top:18px;margin:0 !important}.ltr .tamara-product-widget .tamara-logo{right:20px;left:auto}.tamara-product-widget span{font-family:var(--font-main);font-size:var(--font-sm);color:var(--color-text)}.tamara-product-widget span:last-child{display:block;position:relative;margin-top:8px}.tamara-popup__wrap{overflow:auto !important}";
|
|
11
11
|
|
|
12
12
|
const SallaInstallment = class {
|
|
13
13
|
constructor(hostRef) {
|
|
@@ -26,7 +26,6 @@ const SallaLoginModal = class {
|
|
|
26
26
|
*/
|
|
27
27
|
this.isEmailRequired = salla.config.get('store.settings.auth.is_email_required', false);
|
|
28
28
|
this.regType = 'phone';
|
|
29
|
-
//TODO:: any salla-button, text should updated by this.btn?.setText(newText)
|
|
30
29
|
this.title = salla.lang.get('blocks.header.login');
|
|
31
30
|
this.loginTypeTitle = salla.lang.get('blocks.header.select_login_way');
|
|
32
31
|
this.loginText = salla.lang.get('blocks.header.login');
|
|
@@ -63,7 +62,7 @@ const SallaLoginModal = class {
|
|
|
63
62
|
};
|
|
64
63
|
this.newUser = async () => {
|
|
65
64
|
var _a;
|
|
66
|
-
const { mobile: regPhone, countryCode
|
|
65
|
+
const { mobile: regPhone, countryCode } = this.regType == "email" ? await this.regTelInput.getValues() : await this.loginTelInput.getValues(), emailValue = this.regEmail.value || ((_a = this.loginEmail) === null || _a === void 0 ? void 0 : _a.value);
|
|
67
66
|
await this.newUserValidation();
|
|
68
67
|
await this.regBtn.load();
|
|
69
68
|
await this.regBtn.disable();
|
|
@@ -72,7 +71,6 @@ const SallaLoginModal = class {
|
|
|
72
71
|
last_name: this.lastName.value,
|
|
73
72
|
phone: regPhone || this.loginTelInput.mobile,
|
|
74
73
|
country_code: countryCode,
|
|
75
|
-
country_key: countryKey,
|
|
76
74
|
verified_by: this.regType,
|
|
77
75
|
};
|
|
78
76
|
emailValue && (data = Object.assign(Object.assign({}, data), { email: emailValue }));
|
|
@@ -117,19 +115,19 @@ const SallaLoginModal = class {
|
|
|
117
115
|
* @param {CustomEvent|{details:{case:'new_customer'|'authenticated', redirect_url:string|null}}} event
|
|
118
116
|
*/
|
|
119
117
|
onVerified(event) {
|
|
120
|
-
if (!event.detail.case) {
|
|
118
|
+
if (!event.detail.data.case) {
|
|
121
119
|
salla.log('verified but without case!');
|
|
122
120
|
return;
|
|
123
121
|
}
|
|
124
|
-
if (event.detail.case === "new_customer") {
|
|
122
|
+
if (event.detail.data.case === "new_customer") {
|
|
125
123
|
return this.showTab(this.registrationTab);
|
|
126
124
|
}
|
|
127
125
|
//TODO::It looks that this is a workaround for something, so needs to be enhanced🤔
|
|
128
126
|
if (salla.auth.event.getTypeActionOnVerified() !== 'redirect') {
|
|
129
127
|
return;
|
|
130
128
|
}
|
|
131
|
-
if (event.redirect_url) {
|
|
132
|
-
return window.location.href = event.redirect_url;
|
|
129
|
+
if (event.data.redirect_url) {
|
|
130
|
+
return window.location.href = event.data.redirect_url;
|
|
133
131
|
}
|
|
134
132
|
window.location.reload();
|
|
135
133
|
}
|
|
@@ -162,8 +160,8 @@ const SallaLoginModal = class {
|
|
|
162
160
|
isRegistrationTab && ((_a = this.firstName) === null || _a === void 0 ? void 0 : _a.focus());
|
|
163
161
|
(_b = this.modal) === null || _b === void 0 ? void 0 : _b.setTitle(isRegistrationTab ? salla.lang.get('common.titles.registration') : this.title);
|
|
164
162
|
if (!isRegistrationTab) {
|
|
165
|
-
Helper.Helper.toggleElementClassIf(this.regMobileBlock, 's-hidden', 's-
|
|
166
|
-
.toggleElementClassIf(this.regEmailBlock, 's-hidden', 's-
|
|
163
|
+
Helper.Helper.toggleElementClassIf(this.regMobileBlock, 's-hidden', 's-show', () => this.regType === 'phone')
|
|
164
|
+
.toggleElementClassIf(this.regEmailBlock, 's-hidden', 's-show', () => this.regType === 'email');
|
|
167
165
|
}
|
|
168
166
|
return this;
|
|
169
167
|
}
|
|
@@ -196,7 +194,7 @@ const SallaLoginModal = class {
|
|
|
196
194
|
index.h("div", { class: "s-login-modal-tab", ref: tab => this.mobileTab = tab }, index.h("slot", { name: "before-login-mobile" }), index.h("label", { class: "s-login-modal-label" }, this.mobileLabel), index.h("salla-tel-input", { ref: el => this.loginTelInput = el, onKeyDown: e => this.typing(e, this.loginBySMS) }), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginBySMS(), ref: b => this.smsBtn = b }, salla.lang.get('blocks.header.enter')), this.isEmailAllowed ?
|
|
197
195
|
index.h("a", { href: "#", onClick: () => this.showTab(this.emailTab), class: "s-login-modal-link" }, this.byEmailText) : '', index.h("slot", { name: "after-login-mobile" })) : '', this.isEmailAllowed ?
|
|
198
196
|
index.h("div", { class: "s-login-modal-tab", ref: tab => this.emailTab = tab }, index.h("slot", { name: "before-login-email" }), index.h("label", { class: "s-login-modal-label" }, this.emailLabel), index.h("input", { type: "email", ref: el => this.loginEmail = el, onKeyDown: e => this.typing(e, this.loginByEmail), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" }), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.loginByEmail(), ref: b => this.emailBtn = b }, salla.lang.get('blocks.header.enter')), this.isMobileAllowed ?
|
|
199
|
-
index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', index.h("slot", { name: "after-login-email" })) : '', index.h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, index.h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), index.h("div", { ref: tab => this.registrationTab = tab }, index.h("slot", { name: "before-registration" }), index.h("label", { class: "s-login-modal-label" }, this.firstNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), index.h("span", { class: "s-login-modal-error-message" }), index.h("label", { class: "s-login-modal-label" }, this.lastNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), index.h("span", { class: "s-login-modal-error-message" }), index.h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.mobileLabel), index.h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), index.h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.emailLabel), index.h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" })), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), index.h("slot", { name: "after-registration" })))));
|
|
197
|
+
index.h("a", { href: "#", onClick: () => this.showTab(this.mobileTab), class: "s-login-modal-link" }, this.bySMSText) : '', index.h("slot", { name: "after-login-email" })) : '', index.h("salla-verify-modal", { withoutModal: true, ref: tab => this.verifyTab = tab, autoReload: false }, index.h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })), index.h("div", { ref: tab => this.registrationTab = tab }, index.h("slot", { name: "before-registration" }), index.h("div", null, index.h("label", { class: "s-login-modal-label" }, this.firstNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }), index.h("span", { class: "s-login-modal-error-message" })), index.h("div", null, index.h("label", { class: "s-login-modal-label" }, this.lastNameLabel), index.h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }), index.h("span", { class: "s-login-modal-error-message" })), index.h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.mobileLabel), index.h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })), index.h("div", { ref: el => this.regEmailBlock = el, class: "mb-1.5" }, index.h("label", { class: "s-login-modal-label" }, this.emailLabel), index.h("input", { type: "email", ref: el => this.regEmail = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: "your@email.com", class: "s-login-modal-input s-ltr" }), index.h("span", { class: "s-login-modal-error-message" })), index.h("salla-button", { "loader-position": 'center', width: "wide", onClick: () => this.newUser(), ref: b => this.regBtn = b }, salla.lang.get('blocks.header.register')), index.h("slot", { name: "after-registration" })))));
|
|
200
198
|
}
|
|
201
199
|
get host() { return index.getElement(this); }
|
|
202
200
|
};
|
|
@@ -100,7 +100,6 @@ const SallaModal = class {
|
|
|
100
100
|
const body = this.host.querySelector('.s-modal-body');
|
|
101
101
|
Helper.Helper.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)
|
|
102
102
|
.toggleElementClassIf(this.overlay, 's-modal-entering', 's-modal-overlay-leaving', () => isOpen)
|
|
103
|
-
//todo:: use united class names
|
|
104
103
|
.toggleElementClassIf(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);
|
|
105
104
|
if (!isOpen) {
|
|
106
105
|
setTimeout(() => this.host.classList.add('s-hidden'), 350);
|
|
@@ -188,7 +187,6 @@ const SallaSearch = class {
|
|
|
188
187
|
' <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div>' +
|
|
189
188
|
'</div>';
|
|
190
189
|
}
|
|
191
|
-
//todo:: reset data when closing
|
|
192
190
|
search(e) {
|
|
193
191
|
this.inputValue = e.target.value;
|
|
194
192
|
Helper.Helper.hideElement(this.noResults);
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
const index = require('./index-c0f5bb97.js');
|
|
9
9
|
const Helper = require('./Helper-8ae6a805.js');
|
|
10
10
|
|
|
11
|
-
const sallaOfferModalCss = "#salla-offer-modal .s-offer-modal-body{-webkit-overflow-scrolling:touch}#salla-offer-modal .s-offer-modal-body::-webkit-scrollbar{display:none}#salla-offer-modal .s-offer-modal-next-btn{background:linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}#salla-offer-modal .s-offer-modal-prev-btn{background:linear-gradient(
|
|
11
|
+
const sallaOfferModalCss = "#salla-offer-modal .s-offer-modal-body{-webkit-overflow-scrolling:touch}#salla-offer-modal .s-offer-modal-body::-webkit-scrollbar{display:none}#salla-offer-modal .s-offer-modal-next-btn{background:linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}#salla-offer-modal .s-offer-modal-prev-btn{background:linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%)}.rtl #salla-offer-modal .s-offer-modal-next-btn{transform:scale(-1) translateX(100%)}.rtl #salla-offer-modal .s-offer-modal-prev-btn{transform:scale(-1) translateX(-100%)}.rtl #salla-offer-modal .s-offer-modal-btn-is-active{transform:scale(-1) translateX(0)}";
|
|
12
12
|
|
|
13
13
|
const SallaOfferModal = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -92,9 +92,6 @@ const SallaOfferModal = class {
|
|
|
92
92
|
] : '');
|
|
93
93
|
}
|
|
94
94
|
componentDidRender() {
|
|
95
|
-
//todo:: know from where there is hidden attributes to the doms🤔
|
|
96
|
-
//todo:: add animation
|
|
97
|
-
this.modal.querySelectorAll('[hidden]').forEach(el => el.removeAttribute('hidden'));
|
|
98
95
|
// Sooo mini Slider
|
|
99
96
|
if (this.offer && window.screen.width > 639) {
|
|
100
97
|
let sliderWrap = this.host.querySelector('.s-offer-modal-scrolled-slider-wrap'), slider = this.host.querySelector('.s-offer-modal-scrolled-slider'), navButtons = this.host.querySelectorAll('.s-offer-modal-nav-btn'), nexBtn = this.host.querySelector('.s-offer-modal-next-btn'), prevBtn = this.host.querySelector('.s-offer-modal-prev-btn'), items = this.host.querySelectorAll('.s-offer-modal-slider-item'), sliderNavMargin = 20, // space before displaying the next/prev btns.
|
|
@@ -167,10 +167,6 @@ const SallaRatingModal = class {
|
|
|
167
167
|
: '', index.h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, index.h("span", { class: "s-rating-modal-icon sicon-check-circle2" }), index.h("h3", { class: "s-rating-modal-thanks-title" }, this.thanks), index.h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), index.h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), index.h("div", { class: "s-rating-modal-footer" }, index.h("button", { ref: el => this.backBtn = el, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, this.back), this.stepsCount > 1 ? index.h("ul", { class: "s-rating-modal-dots" }, [0, 1, 2].slice(0, this.stepsCount).map(() => index.h("li", { class: 's-rating-modal-bg-gray s-rating-modal-step-dot' }))) : '', index.h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, this.next)),]
|
|
168
168
|
: '')));
|
|
169
169
|
}
|
|
170
|
-
componentDidRender() {
|
|
171
|
-
//todo:: know from where there is hidden attributes to the doms🤔
|
|
172
|
-
this.modal.querySelectorAll('[hidden]').forEach(el => el.removeAttribute('hidden'));
|
|
173
|
-
}
|
|
174
170
|
componentDidLoad() {
|
|
175
171
|
salla.event.dispatch('rating::ready', this);
|
|
176
172
|
}
|
|
@@ -1391,7 +1391,6 @@ const SallaTelInput = class {
|
|
|
1391
1391
|
* Current country_code
|
|
1392
1392
|
*/
|
|
1393
1393
|
this.countryCode = salla.config.get('user.country_code', 'SA');
|
|
1394
|
-
this.countryKey = "+966"; //TODO:: why we need it, if it's important find a way to get it automatically for the current user
|
|
1395
1394
|
this.countryCodeLabel = salla.lang.get('common.country_code');
|
|
1396
1395
|
this.mobileLabel = salla.lang.get('common.elements.mobile');
|
|
1397
1396
|
this.tooShort = salla.lang.get('common.errors.too_short', { attribute: this.mobileLabel });
|
|
@@ -1413,13 +1412,12 @@ const SallaTelInput = class {
|
|
|
1413
1412
|
}
|
|
1414
1413
|
/**
|
|
1415
1414
|
* Get current values
|
|
1416
|
-
* @return {{mobile:number,countryCode:'SA'|string
|
|
1415
|
+
* @return {{mobile:number,countryCode:'SA'|string}}
|
|
1417
1416
|
*/
|
|
1418
1417
|
async getValues() {
|
|
1419
1418
|
return {
|
|
1420
1419
|
mobile: this.mobile = this.phoneInput.value,
|
|
1421
|
-
countryCode: this.countryCode = this.countryCodeInput.value
|
|
1422
|
-
countryKey: this.countryKey = this.countryKeyInput.value
|
|
1420
|
+
countryCode: this.countryCode = this.countryCodeInput.value
|
|
1423
1421
|
};
|
|
1424
1422
|
}
|
|
1425
1423
|
/**
|
|
@@ -1453,7 +1451,6 @@ const SallaTelInput = class {
|
|
|
1453
1451
|
this.phoneInput.addEventListener("countrychange", () => {
|
|
1454
1452
|
let data = this.iti.getSelectedCountryData();
|
|
1455
1453
|
this.countryCodeInput.value = data.iso2.toUpperCase();
|
|
1456
|
-
this.countryKeyInput.value = ('+' + data.dialCode).replace('++', '+');
|
|
1457
1454
|
});
|
|
1458
1455
|
// on blur: validate
|
|
1459
1456
|
this.phoneInput.addEventListener('blur', () => this.isValid());
|
|
@@ -1469,7 +1466,7 @@ const SallaTelInput = class {
|
|
|
1469
1466
|
}
|
|
1470
1467
|
;
|
|
1471
1468
|
render() {
|
|
1472
|
-
return (index.h(index.Host, { id: "s-tel-input" }, index.h("input", { type: "tel", name: "mobile", value: this.mobile, ref: el => this.phoneInput = el, class: "s-tel-input-control tel-input s-ltr" }), index.h("span", { class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), index.h("input", { type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })
|
|
1469
|
+
return (index.h(index.Host, { id: "s-tel-input" }, index.h("input", { type: "tel", name: "mobile", value: this.mobile, ref: el => this.phoneInput = el, class: "s-tel-input-control tel-input s-ltr" }), index.h("span", { class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }), index.h("input", { type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
1473
1470
|
}
|
|
1474
1471
|
componentDidLoad() {
|
|
1475
1472
|
this.initTelInput();
|
|
@@ -18,5 +18,5 @@ const patchBrowser = () => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(options => {
|
|
21
|
-
return index.bootstrapLazy([["salla-modal_2.cjs",[[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"show":[64]},[[0,"verified","onVerified"]]]]],["salla-product-availability.cjs",[[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"show":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-button.cjs",[[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]],["salla-tel-input.cjs",[[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"
|
|
21
|
+
return index.bootstrapLazy([["salla-modal_2.cjs",[[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32]},[[0,"modalOpened","onModalOpen"],[0,"modalClosed","onModalClose"]]],[4,"salla-modal",{"isClosable":[1028,"is-closable"],"width":[513],"position":[513],"visible":[516],"isLoading":[1540,"is-loading"],"subTitleFirst":[4,"sub-title-first"],"noPadding":[4,"no-padding"],"subTitle":[1,"sub-title"],"icon":[1],"iconStyle":[1,"icon-style"],"imageIcon":[1,"image-icon"],"modalTitle":[32],"show":[64],"hide":[64],"setTitle":[64],"loading":[64],"stopLoading":[64]}]]],["salla-login-modal.cjs",[[4,"salla-login-modal",{"isEmailAllowed":[1028,"is-email-allowed"],"isMobileAllowed":[1028,"is-mobile-allowed"],"isEmailRequired":[1028,"is-email-required"],"title":[32],"loginTypeTitle":[32],"loginText":[32],"smsLabel":[32],"mobileLabel":[32],"emailLabel":[32],"enterText":[32],"bySMSText":[32],"byEmailText":[32],"emailErrorMsg":[32],"firstNameLabel":[32],"lastNameLabel":[32],"firstNameErrorMsg":[32],"lastNameErrorMsg":[32],"show":[64]},[[0,"verified","onVerified"]]]]],["salla-product-availability.cjs",[[0,"salla-product-availability",{"channels":[1],"productId":[2,"product-id"],"isSubscribed":[1028,"is-subscribed"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}]]],["salla-rating-modal.cjs",[[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"show":[64],"hide":[64]}]]],["salla-branches.cjs",[[4,"salla-branches",{"position":[1],"displayAs":[1,"display-as"],"browseProductsFrom":[1,"browse-products-from"],"branches":[16],"current":[1026],"open":[32],"selected":[32],"isOpenedBefore":[32],"show":[64],"hide":[64]}]]],["salla-localization-modal.cjs",[[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"show":[64],"hide":[64],"submit":[64]}]]],["salla-offer-modal.cjs",[[0,"salla-offer-modal",{"offer":[32],"offer_name":[32],"offer_message":[32],"offer_expires_in":[32],"remember_my_choice":[32],"add_to_cart":[32],"out_of_stock":[32],"show":[64],"showOffer":[64]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-infinite-scroll.cjs",[[4,"salla-infinite-scroll",{"nextPage":[1,"next-page"],"nextPageAutoload":[1028,"next-page-autoload"],"container":[1],"item":[1],"loadMore":[32],"noMore":[32],"failedToLoad":[32]}]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]],["salla-quantity-input.cjs",[[4,"salla-quantity-input",{"quantity":[32],"decrease":[64],"increase":[64],"setValue":[64]}]]],["salla-button.cjs",[[4,"salla-button",{"shape":[513],"color":[513],"fill":[513],"size":[513],"width":[513],"loading":[516],"disabled":[516],"loaderPosition":[1,"loader-position"],"wide":[4],"href":[1],"load":[64],"stop":[64],"setText":[64],"disable":[64],"enable":[64]}]]],["salla-verify-modal.cjs",[[4,"salla-verify-modal",{"withoutModal":[4,"without-modal"],"url":[513],"by":[1],"autoReload":[4,"auto-reload"],"title":[32],"getCode":[64],"show":[64]}]]],["salla-rating-stars.cjs",[[0,"salla-rating-stars",{"name":[1],"size":[1],"value":[2]}]]],["salla-tel-input.cjs",[[0,"salla-tel-input",{"mobile":[1025],"countryCode":[1025,"country-code"],"mobileRequired":[32],"countryCodeLabel":[32],"mobileLabel":[32],"tooShort":[32],"tooLong":[32],"invalidCountryCode":[32],"invalidNumber":[32],"errorMap":[32],"getValues":[64],"isValid":[64]}]]]], options);
|
|
22
22
|
});
|
|
@@ -59,7 +59,8 @@ salla-button[width=wide] {
|
|
|
59
59
|
flex-direction: row;
|
|
60
60
|
}
|
|
61
61
|
.s-button-wrap .s-button-loader-start.s-button-element {
|
|
62
|
-
padding-
|
|
62
|
+
padding-left: 32px;
|
|
63
|
+
padding-right: 32px;
|
|
63
64
|
}
|
|
64
65
|
.s-button-wrap .s-button-loader-start .s-button-loader {
|
|
65
66
|
position: absolute;
|
|
@@ -70,7 +71,8 @@ salla-button[width=wide] {
|
|
|
70
71
|
right: auto;
|
|
71
72
|
}
|
|
72
73
|
.s-button-wrap .s-button-loader-end.s-button-element {
|
|
73
|
-
padding-left:
|
|
74
|
+
padding-left: 32px;
|
|
75
|
+
padding-right: 32px;
|
|
74
76
|
}
|
|
75
77
|
.s-button-wrap .s-button-loader-end .s-button-loader {
|
|
76
78
|
position: absolute;
|
|
@@ -6,7 +6,7 @@ export class SallaButton {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.hostAttributes = {};
|
|
8
8
|
/**
|
|
9
|
-
* Button Type
|
|
9
|
+
* Button Type
|
|
10
10
|
*/
|
|
11
11
|
this.shape = 'btn';
|
|
12
12
|
/**
|
|
@@ -131,7 +131,7 @@ export class SallaButton {
|
|
|
131
131
|
"optional": false,
|
|
132
132
|
"docs": {
|
|
133
133
|
"tags": [],
|
|
134
|
-
"text": "Button Type
|
|
134
|
+
"text": "Button Type"
|
|
135
135
|
},
|
|
136
136
|
"attribute": "shape",
|
|
137
137
|
"reflect": true,
|
|
@@ -11,7 +11,6 @@ export class SallaConditionalFields {
|
|
|
11
11
|
var _a;
|
|
12
12
|
salla.log('Received the change event: ', event);
|
|
13
13
|
if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox'].includes(event.target.getAttribute('type'))) {
|
|
14
|
-
// todo :: support debug
|
|
15
14
|
salla.log('Ignore the change because is not support input: ' + (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.tagName) || 'N/A'));
|
|
16
15
|
return;
|
|
17
16
|
}
|
|
@@ -29,7 +29,6 @@ export class SallaLoginModal {
|
|
|
29
29
|
*/
|
|
30
30
|
this.isEmailRequired = salla.config.get('store.settings.auth.is_email_required', false);
|
|
31
31
|
this.regType = 'phone';
|
|
32
|
-
//TODO:: any salla-button, text should updated by this.btn?.setText(newText)
|
|
33
32
|
this.title = salla.lang.get('blocks.header.login');
|
|
34
33
|
this.loginTypeTitle = salla.lang.get('blocks.header.select_login_way');
|
|
35
34
|
this.loginText = salla.lang.get('blocks.header.login');
|
|
@@ -66,7 +65,7 @@ export class SallaLoginModal {
|
|
|
66
65
|
};
|
|
67
66
|
this.newUser = async () => {
|
|
68
67
|
var _a;
|
|
69
|
-
const { mobile: regPhone, countryCode
|
|
68
|
+
const { mobile: regPhone, countryCode } = this.regType == "email" ? await this.regTelInput.getValues() : await this.loginTelInput.getValues(), emailValue = this.regEmail.value || ((_a = this.loginEmail) === null || _a === void 0 ? void 0 : _a.value);
|
|
70
69
|
await this.newUserValidation();
|
|
71
70
|
await this.regBtn.load();
|
|
72
71
|
await this.regBtn.disable();
|
|
@@ -75,7 +74,6 @@ export class SallaLoginModal {
|
|
|
75
74
|
last_name: this.lastName.value,
|
|
76
75
|
phone: regPhone || this.loginTelInput.mobile,
|
|
77
76
|
country_code: countryCode,
|
|
78
|
-
country_key: countryKey,
|
|
79
77
|
verified_by: this.regType,
|
|
80
78
|
};
|
|
81
79
|
emailValue && (data = Object.assign(Object.assign({}, data), { email: emailValue }));
|
|
@@ -120,19 +118,19 @@ export class SallaLoginModal {
|
|
|
120
118
|
* @param {CustomEvent|{details:{case:'new_customer'|'authenticated', redirect_url:string|null}}} event
|
|
121
119
|
*/
|
|
122
120
|
onVerified(event) {
|
|
123
|
-
if (!event.detail.case) {
|
|
121
|
+
if (!event.detail.data.case) {
|
|
124
122
|
salla.log('verified but without case!');
|
|
125
123
|
return;
|
|
126
124
|
}
|
|
127
|
-
if (event.detail.case === "new_customer") {
|
|
125
|
+
if (event.detail.data.case === "new_customer") {
|
|
128
126
|
return this.showTab(this.registrationTab);
|
|
129
127
|
}
|
|
130
128
|
//TODO::It looks that this is a workaround for something, so needs to be enhanced🤔
|
|
131
129
|
if (salla.auth.event.getTypeActionOnVerified() !== 'redirect') {
|
|
132
130
|
return;
|
|
133
131
|
}
|
|
134
|
-
if (event.redirect_url) {
|
|
135
|
-
return window.location.href = event.redirect_url;
|
|
132
|
+
if (event.data.redirect_url) {
|
|
133
|
+
return window.location.href = event.data.redirect_url;
|
|
136
134
|
}
|
|
137
135
|
window.location.reload();
|
|
138
136
|
}
|
|
@@ -165,8 +163,8 @@ export class SallaLoginModal {
|
|
|
165
163
|
isRegistrationTab && ((_a = this.firstName) === null || _a === void 0 ? void 0 : _a.focus());
|
|
166
164
|
(_b = this.modal) === null || _b === void 0 ? void 0 : _b.setTitle(isRegistrationTab ? salla.lang.get('common.titles.registration') : this.title);
|
|
167
165
|
if (!isRegistrationTab) {
|
|
168
|
-
Helper.toggleElementClassIf(this.regMobileBlock, 's-hidden', 's-
|
|
169
|
-
.toggleElementClassIf(this.regEmailBlock, 's-hidden', 's-
|
|
166
|
+
Helper.toggleElementClassIf(this.regMobileBlock, 's-hidden', 's-show', () => this.regType === 'phone')
|
|
167
|
+
.toggleElementClassIf(this.regEmailBlock, 's-hidden', 's-show', () => this.regType === 'email');
|
|
170
168
|
}
|
|
171
169
|
return this;
|
|
172
170
|
}
|
|
@@ -232,12 +230,14 @@ export class SallaLoginModal {
|
|
|
232
230
|
h("a", { onClick: () => this.showTab(this.regType == 'phone' ? this.mobileTab : this.emailTab), class: "s-verify-modal-back sicon-arrow-right", slot: "after-footer", href: "#" })),
|
|
233
231
|
h("div", { ref: tab => this.registrationTab = tab },
|
|
234
232
|
h("slot", { name: "before-registration" }),
|
|
235
|
-
h("
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
h("
|
|
240
|
-
|
|
233
|
+
h("div", null,
|
|
234
|
+
h("label", { class: "s-login-modal-label" }, this.firstNameLabel),
|
|
235
|
+
h("input", { type: "text", class: "s-login-modal-input", ref: el => this.firstName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.first_name') }),
|
|
236
|
+
h("span", { class: "s-login-modal-error-message" })),
|
|
237
|
+
h("div", null,
|
|
238
|
+
h("label", { class: "s-login-modal-label" }, this.lastNameLabel),
|
|
239
|
+
h("input", { type: "text", class: "s-login-modal-input", ref: el => this.lastName = el, onKeyDown: e => this.typing(e, this.newUser), placeholder: salla.lang.get('pages.profile.last_name') }),
|
|
240
|
+
h("span", { class: "s-login-modal-error-message" })),
|
|
241
241
|
h("div", { ref: el => this.regMobileBlock = el, class: "mb-1.5" },
|
|
242
242
|
h("label", { class: "s-login-modal-label" }, this.mobileLabel),
|
|
243
243
|
h("salla-tel-input", { ref: el => this.regTelInput = el, onKeyDown: e => this.typing(e, this.newUser) })),
|
|
@@ -93,7 +93,6 @@ export class SallaModal {
|
|
|
93
93
|
const body = this.host.querySelector('.s-modal-body');
|
|
94
94
|
Helper.toggleElementClassIf(body, 's-modal-entering', 's-modal-leaving', () => isOpen)
|
|
95
95
|
.toggleElementClassIf(this.overlay, 's-modal-entering', 's-modal-overlay-leaving', () => isOpen)
|
|
96
|
-
//todo:: use united class names
|
|
97
96
|
.toggleElementClassIf(document.body, 'modal-is-open', 'modal-is-closed', () => isOpen);
|
|
98
97
|
if (!isOpen) {
|
|
99
98
|
setTimeout(() => this.host.classList.add('s-hidden'), 350);
|
|
@@ -12,11 +12,17 @@
|
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
14
14
|
#salla-offer-modal .s-offer-modal-next-btn {
|
|
15
|
-
background: linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
|
|
15
|
+
background: linear-gradient(-90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
|
|
16
16
|
}
|
|
17
17
|
#salla-offer-modal .s-offer-modal-prev-btn {
|
|
18
|
-
background: linear-gradient(
|
|
18
|
+
background: linear-gradient(90deg, #fff 25%, rgba(255, 255, 255, 0.4) 80%, rgba(255, 255, 255, 0) 100%);
|
|
19
|
+
}
|
|
20
|
+
.rtl #salla-offer-modal .s-offer-modal-next-btn {
|
|
21
|
+
transform: scale(-1) translateX(100%);
|
|
22
|
+
}
|
|
23
|
+
.rtl #salla-offer-modal .s-offer-modal-prev-btn {
|
|
24
|
+
transform: scale(-1) translateX(-100%);
|
|
19
25
|
}
|
|
20
|
-
.
|
|
21
|
-
transform: scale(-1);
|
|
26
|
+
.rtl #salla-offer-modal .s-offer-modal-btn-is-active {
|
|
27
|
+
transform: scale(-1) translateX(0);
|
|
22
28
|
}
|
|
@@ -105,9 +105,6 @@ export class SallaOfferModal {
|
|
|
105
105
|
] : '');
|
|
106
106
|
}
|
|
107
107
|
componentDidRender() {
|
|
108
|
-
//todo:: know from where there is hidden attributes to the doms🤔
|
|
109
|
-
//todo:: add animation
|
|
110
|
-
this.modal.querySelectorAll('[hidden]').forEach(el => el.removeAttribute('hidden'));
|
|
111
108
|
// Sooo mini Slider
|
|
112
109
|
if (this.offer && window.screen.width > 639) {
|
|
113
110
|
let sliderWrap = this.host.querySelector('.s-offer-modal-scrolled-slider-wrap'), slider = this.host.querySelector('.s-offer-modal-scrolled-slider'), navButtons = this.host.querySelectorAll('.s-offer-modal-nav-btn'), nexBtn = this.host.querySelector('.s-offer-modal-next-btn'), prevBtn = this.host.querySelector('.s-offer-modal-prev-btn'), items = this.host.querySelectorAll('.s-offer-modal-slider-item'), sliderNavMargin = 20, // space before displaying the next/prev btns.
|
|
@@ -199,10 +199,6 @@ export class SallaRatingModal {
|
|
|
199
199
|
h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, this.next)),]
|
|
200
200
|
: '')));
|
|
201
201
|
}
|
|
202
|
-
componentDidRender() {
|
|
203
|
-
//todo:: know from where there is hidden attributes to the doms🤔
|
|
204
|
-
this.modal.querySelectorAll('[hidden]').forEach(el => el.removeAttribute('hidden'));
|
|
205
|
-
}
|
|
206
202
|
componentDidLoad() {
|
|
207
203
|
salla.event.dispatch('rating::ready', this);
|
|
208
204
|
}
|
|
@@ -38,7 +38,6 @@ export class SallaSearch {
|
|
|
38
38
|
' <div class="s-search-product-title">{name}</div> <div class="s-search-product-price">{price} <span class="s-search-product-regular-price">{regular_price}</span></div>' +
|
|
39
39
|
'</div>';
|
|
40
40
|
}
|
|
41
|
-
//todo:: reset data when closing
|
|
42
41
|
search(e) {
|
|
43
42
|
this.inputValue = e.target.value;
|
|
44
43
|
Helper.hideElement(this.noResults);
|
|
@@ -10,7 +10,6 @@ export class SallaTelInput {
|
|
|
10
10
|
* Current country_code
|
|
11
11
|
*/
|
|
12
12
|
this.countryCode = salla.config.get('user.country_code', 'SA');
|
|
13
|
-
this.countryKey = "+966"; //TODO:: why we need it, if it's important find a way to get it automatically for the current user
|
|
14
13
|
this.countryCodeLabel = salla.lang.get('common.country_code');
|
|
15
14
|
this.mobileLabel = salla.lang.get('common.elements.mobile');
|
|
16
15
|
this.tooShort = salla.lang.get('common.errors.too_short', { attribute: this.mobileLabel });
|
|
@@ -32,13 +31,12 @@ export class SallaTelInput {
|
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* Get current values
|
|
35
|
-
* @return {{mobile:number,countryCode:'SA'|string
|
|
34
|
+
* @return {{mobile:number,countryCode:'SA'|string}}
|
|
36
35
|
*/
|
|
37
36
|
async getValues() {
|
|
38
37
|
return {
|
|
39
38
|
mobile: this.mobile = this.phoneInput.value,
|
|
40
|
-
countryCode: this.countryCode = this.countryCodeInput.value
|
|
41
|
-
countryKey: this.countryKey = this.countryKeyInput.value
|
|
39
|
+
countryCode: this.countryCode = this.countryCodeInput.value
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
42
|
/**
|
|
@@ -72,7 +70,6 @@ export class SallaTelInput {
|
|
|
72
70
|
this.phoneInput.addEventListener("countrychange", () => {
|
|
73
71
|
let data = this.iti.getSelectedCountryData();
|
|
74
72
|
this.countryCodeInput.value = data.iso2.toUpperCase();
|
|
75
|
-
this.countryKeyInput.value = ('+' + data.dialCode).replace('++', '+');
|
|
76
73
|
});
|
|
77
74
|
// on blur: validate
|
|
78
75
|
this.phoneInput.addEventListener('blur', () => this.isValid());
|
|
@@ -91,8 +88,7 @@ export class SallaTelInput {
|
|
|
91
88
|
return (h(Host, { id: "s-tel-input" },
|
|
92
89
|
h("input", { type: "tel", name: "mobile", value: this.mobile, ref: el => this.phoneInput = el, class: "s-tel-input-control tel-input s-ltr" }),
|
|
93
90
|
h("span", { class: "s-tel-input-error-msg", ref: el => this.errorMsg = el }),
|
|
94
|
-
h("input", { type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })
|
|
95
|
-
h("input", { type: "hidden", name: "country_key", value: this.countryKey, ref: el => this.countryKeyInput = el, class: "country_key" })));
|
|
91
|
+
h("input", { type: "hidden", name: "country_code", value: this.countryCode, ref: el => this.countryCodeInput = el, class: "country_code" })));
|
|
96
92
|
}
|
|
97
93
|
componentDidLoad() {
|
|
98
94
|
this.initTelInput();
|
|
@@ -139,24 +135,6 @@ export class SallaTelInput {
|
|
|
139
135
|
"attribute": "country-code",
|
|
140
136
|
"reflect": false,
|
|
141
137
|
"defaultValue": "salla.config.get('user.country_code', 'SA')"
|
|
142
|
-
},
|
|
143
|
-
"countryKey": {
|
|
144
|
-
"type": "string",
|
|
145
|
-
"mutable": true,
|
|
146
|
-
"complexType": {
|
|
147
|
-
"original": "string",
|
|
148
|
-
"resolved": "string",
|
|
149
|
-
"references": {}
|
|
150
|
-
},
|
|
151
|
-
"required": false,
|
|
152
|
-
"optional": false,
|
|
153
|
-
"docs": {
|
|
154
|
-
"tags": [],
|
|
155
|
-
"text": ""
|
|
156
|
-
},
|
|
157
|
-
"attribute": "country-key",
|
|
158
|
-
"reflect": false,
|
|
159
|
-
"defaultValue": "\"+966\""
|
|
160
138
|
}
|
|
161
139
|
}; }
|
|
162
140
|
static get states() { return {
|
|
@@ -188,14 +166,14 @@ export class SallaTelInput {
|
|
|
188
166
|
static get methods() { return {
|
|
189
167
|
"getValues": {
|
|
190
168
|
"complexType": {
|
|
191
|
-
"signature": "() => Promise<{ mobile: string; countryCode: string;
|
|
169
|
+
"signature": "() => Promise<{ mobile: string; countryCode: string; }>",
|
|
192
170
|
"parameters": [],
|
|
193
171
|
"references": {
|
|
194
172
|
"Promise": {
|
|
195
173
|
"location": "global"
|
|
196
174
|
}
|
|
197
175
|
},
|
|
198
|
-
"return": "Promise<{ mobile: string; countryCode: string;
|
|
176
|
+
"return": "Promise<{ mobile: string; countryCode: string; }>"
|
|
199
177
|
},
|
|
200
178
|
"docs": {
|
|
201
179
|
"text": "Get current values",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
|
|
6
|
-
const sallaButtonCss = "salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}salla-button[width=wide]{width:100%}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-element{pointer-events:none !important}.s-button-wrap[loading] .s-button-loader-center .s-button-text{opacity:0}.s-button-wrap .s-button-element[loading]{pointer-events:none !important}.s-button-wrap .s-button-element:not(:disabled){pointer-events:auto}.s-button-wrap .s-button-solid .s-button-loader:before{border-color:#fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2)}.s-button-wrap .s-button-outline{border:1px solid currentColor}.s-button-wrap .s-button-outline:hover{border-color:transparent}.s-button-wrap .s-button-outline .s-button-loader:before{border-top-color:currentColor;border-left-color:currentColor}.s-button-wrap .s-button-icon.s-button-large{width:56px;height:56px}.s-button-wrap .s-button-icon.s-button-small{width:24px;height:24px}.s-button-wrap .s-button-icon.s-button-small .s-button-loader:before{width:0.85rem;height:0.85rem}.s-button-wrap .s-button-loader-after .s-button-load{flex-direction:row}.s-button-wrap .s-button-loader-start.s-button-element{padding-right:
|
|
6
|
+
const sallaButtonCss = "salla-button{pointer-events:none}salla-button[type=submit]{-webkit-appearance:none}salla-button[width=wide]{width:100%}.s-button-wrap[loading]{pointer-events:none}.s-button-wrap[loading] .s-button-element{pointer-events:none !important}.s-button-wrap[loading] .s-button-loader-center .s-button-text{opacity:0}.s-button-wrap .s-button-element[loading]{pointer-events:none !important}.s-button-wrap .s-button-element:not(:disabled){pointer-events:auto}.s-button-wrap .s-button-solid .s-button-loader:before{border-color:#fff #fff rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2)}.s-button-wrap .s-button-outline{border:1px solid currentColor}.s-button-wrap .s-button-outline:hover{border-color:transparent}.s-button-wrap .s-button-outline .s-button-loader:before{border-top-color:currentColor;border-left-color:currentColor}.s-button-wrap .s-button-icon.s-button-large{width:56px;height:56px}.s-button-wrap .s-button-icon.s-button-small{width:24px;height:24px}.s-button-wrap .s-button-icon.s-button-small .s-button-loader:before{width:0.85rem;height:0.85rem}.s-button-wrap .s-button-loader-after .s-button-load{flex-direction:row}.s-button-wrap .s-button-loader-start.s-button-element{padding-left:32px;padding-right:32px}.s-button-wrap .s-button-loader-start .s-button-loader{position:absolute;right:8px}.s-button-wrap .s-button-loader-start .s-button-loader [dir=ltr]{left:8px;right:auto}.s-button-wrap .s-button-loader-end.s-button-element{padding-left:32px;padding-right:32px}.s-button-wrap .s-button-loader-end .s-button-loader{position:absolute;left:8px}.s-button-wrap .s-button-loader-end .s-button-loader [dir=ltr]{right:8px;left:auto}.s-button-wrap .s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin:0 !important}";
|
|
7
7
|
|
|
8
8
|
const SallaButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
@@ -11,7 +11,7 @@ const SallaButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
this.hostAttributes = {};
|
|
13
13
|
/**
|
|
14
|
-
* Button Type
|
|
14
|
+
* Button Type
|
|
15
15
|
*/
|
|
16
16
|
this.shape = 'btn';
|
|
17
17
|
/**
|
|
@@ -14,7 +14,6 @@ const SallaConditionalFields$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
14
14
|
var _a;
|
|
15
15
|
salla.log('Received the change event: ', event);
|
|
16
16
|
if (!event.target || !['SELECT'].includes(event.target.tagName) && !['checkbox'].includes(event.target.getAttribute('type'))) {
|
|
17
|
-
// todo :: support debug
|
|
18
17
|
salla.log('Ignore the change because is not support input: ' + (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.tagName) || 'N/A'));
|
|
19
18
|
return;
|
|
20
19
|
}
|