@salla.sa/twilight-components 1.5.7 → 1.5.8
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/{index-d43334bf.js → index-0d0167d5.js} +0 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-add-product-button.cjs.entry.js +20 -5
- package/dist/cjs/salla-button_24.cjs.entry.js +76 -9
- package/dist/cjs/salla-conditional-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +2 -2
- package/dist/cjs/salla-scopes.cjs.entry.js +19 -4
- package/dist/cjs/twilight-components.cjs.js +2 -2
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +29 -14
- package/dist/collection/components/salla-list-tile/salla-list-tile.js +8 -2
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +12 -3
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +2 -2
- package/dist/collection/components/salla-modal/salla-modal.js +24 -6
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +11 -5
- package/dist/collection/components/salla-scopes/salla-scopes.js +21 -6
- package/dist/collection/components/salla-search/salla-search.js +12 -3
- package/dist/collection/components/salla-social-share/salla-social-share.js +4 -1
- package/dist/collection/components/salla-swiper/salla-swiper.js +17 -25
- package/dist/collection/components/salla-tabs/salla-tab-content.js +5 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +11 -8
- package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
- package/dist/components/salla-add-product-button.js +19 -4
- package/dist/components/salla-list-tile2.js +6 -0
- package/dist/components/salla-localization-modal.js +9 -0
- package/dist/components/salla-loyalty.js +1 -1
- package/dist/components/salla-modal2.js +18 -0
- package/dist/components/salla-rating-stars2.js +6 -0
- package/dist/components/salla-scopes.js +18 -3
- package/dist/components/salla-search.js +9 -0
- package/dist/components/salla-social-share.js +3 -0
- package/dist/components/salla-swiper2.js +13 -4
- package/dist/components/salla-tab-content2.js +3 -0
- package/dist/components/salla-tab-header2.js +7 -4
- package/dist/components/salla-tabs2.js +1 -1
- package/dist/esm/{index-c78562f8.js → index-4e30ffd0.js} +0 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-add-product-button.entry.js +20 -5
- package/dist/esm/salla-button_24.entry.js +76 -9
- package/dist/esm/salla-conditional-fields.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +19 -4
- package/dist/esm/twilight-components.js +2 -2
- package/dist/twilight-components/{p-ca871c42.entry.js → p-019bb315.entry.js} +1 -1
- package/dist/twilight-components/{p-336eda99.js → p-1503d976.js} +0 -0
- package/dist/twilight-components/{p-b5028001.entry.js → p-4cba804f.entry.js} +1 -1
- package/dist/twilight-components/p-952f6c78.entry.js +4 -0
- package/dist/twilight-components/{p-aa546227.entry.js → p-a023ad04.entry.js} +1 -1
- package/dist/twilight-components/p-e7d11878.entry.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +24 -3
- package/dist/types/components/salla-list-tile/salla-list-tile.d.ts +6 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +9 -0
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +1 -1
- package/dist/types/components/salla-modal/salla-modal.d.ts +18 -0
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +10 -1
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +9 -0
- package/dist/types/components/salla-search/salla-search.d.ts +9 -0
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +3 -0
- package/dist/types/components/salla-swiper/salla-swiper.d.ts +12 -1
- package/dist/types/components/salla-tabs/salla-tab-content.d.ts +7 -0
- package/dist/types/components/salla-tabs/salla-tab-header.d.ts +9 -3
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -0
- package/dist/types/components.d.ts +203 -9
- package/package.json +2 -2
- package/dist/twilight-components/p-5707f352.entry.js +0 -4
- package/dist/twilight-components/p-c2947b0f.entry.js +0 -4
|
File without changes
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-0d0167d5.js');
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
@@ -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-button_24.cjs",[[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],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[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"],"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],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[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],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[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"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"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"],"
|
|
20
|
+
return index.bootstrapLazy([["salla-button_24.cjs",[[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],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[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"],"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],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[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],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[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"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"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,"onTabSelected","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"default_title":[32],"default_description":[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"]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"branchNotFound":[32],"ourServiceIsNotFound":[32],"searchForAvailabilityInOtherBranch":[32],"shoppingFromAnotherBranch":[32],"nowBrowsingFrom":[32],"confirmButton":[32],"scopeSearchPlaceholder":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -5,21 +5,36 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-0d0167d5.js');
|
|
9
9
|
|
|
10
10
|
const sallaAddProductButtonCss = ":host{display:block}salla-add-product-button[width=wide]{width:100%}";
|
|
11
11
|
|
|
12
12
|
const SallaAddProductButton = class {
|
|
13
13
|
constructor(hostRef) {
|
|
14
14
|
index.registerInstance(this, hostRef);
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
15
|
+
this.onSuccess = index.createEvent(this, "onSuccess", 7);
|
|
16
|
+
this.onFailed = index.createEvent(this, "onFailed", 7);
|
|
17
17
|
this.hostAttributes = {};
|
|
18
18
|
this.hasLabel = false;
|
|
19
|
+
/**
|
|
20
|
+
* Channels.
|
|
21
|
+
*/
|
|
19
22
|
this.channels = null;
|
|
23
|
+
/**
|
|
24
|
+
* Product Quantity
|
|
25
|
+
*/
|
|
20
26
|
this.quantity = 0;
|
|
27
|
+
/**
|
|
28
|
+
* Donating amount.
|
|
29
|
+
*/
|
|
21
30
|
this.donatingAmount = 0;
|
|
31
|
+
/**
|
|
32
|
+
* Product Status.Defaults to `sale`
|
|
33
|
+
*/
|
|
22
34
|
this.productStatus = 'sale';
|
|
35
|
+
/**
|
|
36
|
+
* Product type. Defaults to `product`
|
|
37
|
+
*/
|
|
23
38
|
this.productType = 'product';
|
|
24
39
|
}
|
|
25
40
|
getLabel() {
|
|
@@ -50,10 +65,10 @@ const SallaAddProductButton = class {
|
|
|
50
65
|
}).reduce((a, [k, v]) => (v ? (a[k] = v, a) : a), {});
|
|
51
66
|
return salla.cart.quickAdd(data)
|
|
52
67
|
.then((response) => {
|
|
53
|
-
return this.
|
|
68
|
+
return this.onSuccess.emit(response);
|
|
54
69
|
})
|
|
55
70
|
.catch((error) => {
|
|
56
|
-
return this.
|
|
71
|
+
return this.onFailed.emit(error);
|
|
57
72
|
});
|
|
58
73
|
}
|
|
59
74
|
getBtnAttributes() {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index$1 = require('./index-
|
|
8
|
+
const index$1 = require('./index-0d0167d5.js');
|
|
9
9
|
const search = require('./search-b487cc49.js');
|
|
10
10
|
|
|
11
11
|
const sallaButtonCss = "";
|
|
@@ -226,7 +226,13 @@ const sallaListTileCss = "";
|
|
|
226
226
|
const SallaListTile = class {
|
|
227
227
|
constructor(hostRef) {
|
|
228
228
|
index$1.registerInstance(this, hostRef);
|
|
229
|
+
/**
|
|
230
|
+
* Designates the component as anchor and applies the `href` attribute.
|
|
231
|
+
*/
|
|
229
232
|
this.href = undefined;
|
|
233
|
+
/**
|
|
234
|
+
* Designates the target attribute. This should only be applied when using the `href` prop.
|
|
235
|
+
*/
|
|
230
236
|
this.target = "_self";
|
|
231
237
|
}
|
|
232
238
|
generateClass() {
|
|
@@ -278,7 +284,13 @@ const SallaLocalizationModal = class {
|
|
|
278
284
|
this.languages = [];
|
|
279
285
|
this.currencies = [];
|
|
280
286
|
this.isLoading = true;
|
|
287
|
+
/**
|
|
288
|
+
* Current language (existing or newly selected)
|
|
289
|
+
*/
|
|
281
290
|
this.language = salla.config.get('user.language_code');
|
|
291
|
+
/**
|
|
292
|
+
* Current currency (existing or newly selected)
|
|
293
|
+
*/
|
|
282
294
|
this.currency = salla.config.get('user.currency_code');
|
|
283
295
|
Helper$1.setHost(this.host);
|
|
284
296
|
salla.event.on('localization::open', () => this.open());
|
|
@@ -329,6 +341,9 @@ const SallaLocalizationModal = class {
|
|
|
329
341
|
onChangeLanguage(event) {
|
|
330
342
|
this.language = event.target.value;
|
|
331
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Change currency and language to the selected ones.
|
|
346
|
+
*/
|
|
332
347
|
async submit() {
|
|
333
348
|
let url;
|
|
334
349
|
this.btn.load()
|
|
@@ -808,7 +823,7 @@ const SallaLoyalty = class {
|
|
|
808
823
|
.catch(e => console.log(e));
|
|
809
824
|
}
|
|
810
825
|
/**
|
|
811
|
-
*
|
|
826
|
+
* Exchange loyalty points with the selected prize item
|
|
812
827
|
* @param {number} loyalty_prize_id
|
|
813
828
|
*
|
|
814
829
|
*/
|
|
@@ -868,6 +883,9 @@ const sallaModalCss = "";
|
|
|
868
883
|
const SallaModal = class {
|
|
869
884
|
constructor(hostRef) {
|
|
870
885
|
index$1.registerInstance(this, hostRef);
|
|
886
|
+
/**
|
|
887
|
+
* Sets the modal to be closable. Defaults to `true`
|
|
888
|
+
*/
|
|
871
889
|
this.isClosable = true; //todo::rename unclude. Suggestion => persistent
|
|
872
890
|
/**
|
|
873
891
|
* The size of the modal
|
|
@@ -889,10 +907,25 @@ const SallaModal = class {
|
|
|
889
907
|
* Show loading in the middle
|
|
890
908
|
*/
|
|
891
909
|
this.isLoading = false;
|
|
910
|
+
/**
|
|
911
|
+
* Show subtitle before the title or not, defaults to `false` (after the title)
|
|
912
|
+
*/
|
|
892
913
|
this.subTitleFirst = false; //todo:: choose better name
|
|
914
|
+
/**
|
|
915
|
+
* Avoid padding in the modal body or not, defaults to `false`
|
|
916
|
+
*/
|
|
893
917
|
this.noPadding = false; //todo:: choose better name
|
|
918
|
+
/**
|
|
919
|
+
* Set modal sub title.
|
|
920
|
+
*/
|
|
894
921
|
this.subTitle = '';
|
|
922
|
+
/**
|
|
923
|
+
* Align modal content to center, defaults to `false`
|
|
924
|
+
*/
|
|
895
925
|
this.centered = false;
|
|
926
|
+
/**
|
|
927
|
+
* Set the style of the header icon.
|
|
928
|
+
*/
|
|
896
929
|
this.iconStyle = undefined;
|
|
897
930
|
Helper$1.setHost(this.host);
|
|
898
931
|
salla.event.on('modal::open', target => target == this.host.id && this.open());
|
|
@@ -1631,7 +1664,13 @@ const sallaRatingStarsCss = "";
|
|
|
1631
1664
|
const SallaRatingStars = class {
|
|
1632
1665
|
constructor(hostRef) {
|
|
1633
1666
|
index$1.registerInstance(this, hostRef);
|
|
1667
|
+
/**
|
|
1668
|
+
* Sets input name.
|
|
1669
|
+
*/
|
|
1634
1670
|
this.name = 'rating';
|
|
1671
|
+
/**
|
|
1672
|
+
* Sets the height and width of the component. Defaults to medium.
|
|
1673
|
+
*/
|
|
1635
1674
|
this.size = 'medium';
|
|
1636
1675
|
}
|
|
1637
1676
|
initiateRating() {
|
|
@@ -1701,8 +1740,17 @@ const SallaSearch = class {
|
|
|
1701
1740
|
this.loading = false;
|
|
1702
1741
|
this.typing = false;
|
|
1703
1742
|
this.debounce = setTimeout(() => '', 1000);
|
|
1743
|
+
/**
|
|
1744
|
+
* Set the component display without modal window. Defaults to `false`
|
|
1745
|
+
*/
|
|
1704
1746
|
this.inline = false;
|
|
1747
|
+
/**
|
|
1748
|
+
* Adds a border radius to the input. Half of the height.
|
|
1749
|
+
*/
|
|
1705
1750
|
this.oval = false;
|
|
1751
|
+
/**
|
|
1752
|
+
* Sets the height of the input
|
|
1753
|
+
*/
|
|
1706
1754
|
this.height = 60;
|
|
1707
1755
|
Helper$1.setHost(this.host);
|
|
1708
1756
|
this.productSlot = ((_a = Helper$1.getElement('[slot="product"]')) === null || _a === void 0 ? void 0 : _a.innerHTML) || this.getDefaultProductSlot();
|
|
@@ -3215,6 +3263,9 @@ const SallaSocialShare = class {
|
|
|
3215
3263
|
window.a2a_config.locale = salla.lang.locale;
|
|
3216
3264
|
});
|
|
3217
3265
|
}
|
|
3266
|
+
/**
|
|
3267
|
+
* Activate or open the share menu.
|
|
3268
|
+
*/
|
|
3218
3269
|
async open() {
|
|
3219
3270
|
this.opened = !this.opened;
|
|
3220
3271
|
if (this.opened) {
|
|
@@ -8226,12 +8277,22 @@ const sallaSwiperCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:a
|
|
|
8226
8277
|
const SallaSwiper = class {
|
|
8227
8278
|
constructor(hostRef) {
|
|
8228
8279
|
index$1.registerInstance(this, hostRef);
|
|
8229
|
-
|
|
8280
|
+
/**
|
|
8281
|
+
* Set to true to enable continuous loop mode. Defaults to false.
|
|
8282
|
+
*/
|
|
8230
8283
|
this.loop = false;
|
|
8284
|
+
/**
|
|
8285
|
+
* Duration of transition between slides (in ms). Defaults to 300ms.
|
|
8286
|
+
*/
|
|
8231
8287
|
this.speed = 300;
|
|
8288
|
+
/**
|
|
8289
|
+
* Number of slides per view (slides visible at the same time on slider's container).
|
|
8290
|
+
*/
|
|
8232
8291
|
this.itemPerView = "auto";
|
|
8292
|
+
/**
|
|
8293
|
+
* Distance between slide items in px. Defaults to 8px
|
|
8294
|
+
*/
|
|
8233
8295
|
this.spaceBetweenItems = 8;
|
|
8234
|
-
this.direction = 'ltr';
|
|
8235
8296
|
// States
|
|
8236
8297
|
this.currentIndex = undefined;
|
|
8237
8298
|
this.isLastSlideItem = false;
|
|
@@ -8256,7 +8317,7 @@ const SallaSwiper = class {
|
|
|
8256
8317
|
}
|
|
8257
8318
|
render() {
|
|
8258
8319
|
var _a, _b;
|
|
8259
|
-
return (index$1.h("div", { class: "s-swiper"
|
|
8320
|
+
return (index$1.h("div", { class: "s-swiper" }, index$1.h("div", { class: "s-swiper-button-prev" }, index$1.h("salla-button", { disabled: (_a = this.swiper) === null || _a === void 0 ? void 0 : _a.isBeginning, shape: "icon", color: "light", onClick: () => this.swiper.slidePrev() }, index$1.h("span", { class: "s-swiper-button-icon", innerHTML: ArrowLeftIcon }))), index$1.h("div", { class: "s-swiper-button-next" }, index$1.h("salla-button", { disabled: (_b = this.swiper) === null || _b === void 0 ? void 0 : _b.isEnd, shape: "icon", color: "light", onClick: () => this.swiper.slideNext() }, index$1.h("span", { class: "s-swiper-button-icon", innerHTML: ArrowRightIcon }))), index$1.h("div", { class: "swiper" }, index$1.h("div", { class: "swiper-container s-swiper-container", ref: el => this.swiperContainer = el }, index$1.h("div", { class: "swiper-wrapper s-swiper-wrapper", ref: el => this.swiperWrapper = el }, index$1.h("slot", null))))));
|
|
8260
8321
|
}
|
|
8261
8322
|
};
|
|
8262
8323
|
SallaSwiper.style = sallaSwiperCss;
|
|
@@ -8268,6 +8329,9 @@ const SallaTabContent = class {
|
|
|
8268
8329
|
index$1.registerInstance(this, hostRef);
|
|
8269
8330
|
this.isSelected = false;
|
|
8270
8331
|
}
|
|
8332
|
+
/**
|
|
8333
|
+
* Expose self for the parent.
|
|
8334
|
+
*/
|
|
8271
8335
|
async getChild() {
|
|
8272
8336
|
return {
|
|
8273
8337
|
select: this.select.bind(this),
|
|
@@ -8300,7 +8364,7 @@ const sallaTabHeaderCss = "";
|
|
|
8300
8364
|
const SallaTabHeader = class {
|
|
8301
8365
|
constructor(hostRef) {
|
|
8302
8366
|
index$1.registerInstance(this, hostRef);
|
|
8303
|
-
this.
|
|
8367
|
+
this.tabSelected = index$1.createEvent(this, "tabSelected", 7);
|
|
8304
8368
|
this.id = generateRandomId();
|
|
8305
8369
|
/**
|
|
8306
8370
|
* The class applied to the currently active(selected) tab
|
|
@@ -8316,9 +8380,12 @@ const SallaTabHeader = class {
|
|
|
8316
8380
|
this.centered = false;
|
|
8317
8381
|
this.isSelected = false;
|
|
8318
8382
|
}
|
|
8383
|
+
/**
|
|
8384
|
+
* Expose self for the parent.
|
|
8385
|
+
*/
|
|
8319
8386
|
async getChild() {
|
|
8320
8387
|
return {
|
|
8321
|
-
select: this.
|
|
8388
|
+
select: this.selected.bind(this),
|
|
8322
8389
|
unselect: this.unselect.bind(this),
|
|
8323
8390
|
name: this.name,
|
|
8324
8391
|
id: this.id
|
|
@@ -8327,12 +8394,12 @@ const SallaTabHeader = class {
|
|
|
8327
8394
|
unselect() {
|
|
8328
8395
|
this.isSelected = false;
|
|
8329
8396
|
}
|
|
8330
|
-
|
|
8397
|
+
selected() {
|
|
8331
8398
|
this.isSelected = true;
|
|
8332
8399
|
}
|
|
8333
8400
|
onClick() {
|
|
8334
8401
|
this.getChild().then(child => {
|
|
8335
|
-
this.
|
|
8402
|
+
this.tabSelected.emit(child);
|
|
8336
8403
|
});
|
|
8337
8404
|
}
|
|
8338
8405
|
render() {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-0d0167d5.js');
|
|
9
9
|
|
|
10
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}.salla-y #tabbyPromoWrapper{border:1px solid var(--color-grey-dark);border-radius:12px}#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;box-shadow:none;border:none}#tabbyPromoWrapper #tabbyPromo .tabby-promo-snippet{max-width:100%;min-height:100px;padding:18px 20px;border:none !important}#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;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)}.salla-y .tamara-product-widget,.salla-y .spotii-wrapper{border-radius:12px;border:1px solid var(--color-grey-dark)}.tamara-product-widget:hover,.spotii-wrapper:hover{box-shadow:0 0 #0000, 0 0 #0000, 5px 10px 30px #2B2D340D}.tamara-product-widget .spotii-logo,.spotii-wrapper .spotii-logo{float:left;margin:0 0 0 -75px}.ltr .tamara-product-widget,.ltr .spotii-wrapper{text-align:left;padding:18px 100px 18px 20px !important}.ltr .tamara-product-widget .spotii-logo,.ltr .spotii-wrapper .spotii-logo{float:right;margin:0 -75px 0 0}.ltr .tamara-product-widget .spotii-product-widget,.ltr .spotii-wrapper .spotii-product-widget{text-align:left !important}.spotii-wrapper .spotii-promo{font-size:var(--font-md)}.spotii-wrapper .spotii-product-widget{font-size:var(--font-sm) !important;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
|
|
|
@@ -22,7 +22,7 @@ const SallaInstallment = class {
|
|
|
22
22
|
* Currency code
|
|
23
23
|
*/
|
|
24
24
|
this.currency = salla.config.get('user.currency_code');
|
|
25
|
-
|
|
25
|
+
salla.onReady(() => {
|
|
26
26
|
const installment = salla.config.get('store.settings.installments');
|
|
27
27
|
if (installment) {
|
|
28
28
|
this.tamaraIsActive = installment.indexOf('tamara_installment') != -1;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-0d0167d5.js');
|
|
9
9
|
const search = require('./search-b487cc49.js');
|
|
10
10
|
|
|
11
11
|
const StoreAlt = `<!-- Generated by IcoMoon.io -->
|
|
@@ -59,10 +59,16 @@ const SallaScopees = class {
|
|
|
59
59
|
this.scopeSearchPlaceholder = salla.lang.get('blocks.scope.searching_for_a_branch');
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Closes the scope modal.
|
|
64
|
+
*/
|
|
62
65
|
async close() {
|
|
63
66
|
var _a;
|
|
64
67
|
return await ((_a = this.modal) === null || _a === void 0 ? void 0 : _a.close());
|
|
65
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Opens the scope modal.
|
|
71
|
+
*/
|
|
66
72
|
async open(mode = ModeType.DEFAULT, product_id = null) {
|
|
67
73
|
this.setScopeValues([]);
|
|
68
74
|
if (typeof mode !== 'undefined' && [ModeType.AVAILABILITY, ModeType.DEFAULT].includes(mode)) {
|
|
@@ -86,14 +92,23 @@ const SallaScopees = class {
|
|
|
86
92
|
this.modal.stopLoading();
|
|
87
93
|
});
|
|
88
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Submit form to change exsiting scope.
|
|
97
|
+
*/
|
|
89
98
|
async handleSubmit() {
|
|
90
|
-
let payload = { '
|
|
99
|
+
let payload = { 'id': this.current_scope.id };
|
|
91
100
|
this.changeBtn.load();
|
|
92
101
|
return await salla.scope.change(payload)
|
|
93
102
|
.then(() => {
|
|
94
103
|
salla.storage.set("branch-choosed-before", true);
|
|
95
|
-
salla.storage.set("scope",
|
|
96
|
-
|
|
104
|
+
salla.storage.set("scope", {
|
|
105
|
+
'type': this.current_scope.type,
|
|
106
|
+
'id': this.current_scope.id
|
|
107
|
+
});
|
|
108
|
+
if (window.location.search.includes("?")) {
|
|
109
|
+
window.location.search += "&";
|
|
110
|
+
}
|
|
111
|
+
window.location.search += "scope=" + this.current_scope.id;
|
|
97
112
|
}).catch(e => console.log(e))
|
|
98
113
|
.finally(() => {
|
|
99
114
|
this.changeBtn.stop();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
const index = require('./index-
|
|
6
|
+
const index = require('./index-0d0167d5.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v2.17.4 | MIT Licensed | https://stenciljs.com
|
|
@@ -18,5 +18,5 @@ const patchBrowser = () => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(options => {
|
|
21
|
-
return index.bootstrapLazy([["salla-button_24.cjs",[[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],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[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"],"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],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[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],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[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"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"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"],"
|
|
21
|
+
return index.bootstrapLazy([["salla-button_24.cjs",[[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],"points":[32],"exchange_points":[32],"are_you_sure_to_exchange":[32],"for":[32],"cancel":[32],"confirm":[32],"cart_total_point_summary":[32],"cart_point_exchange_now":[32],"login_button":[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"],"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],"open":[64]},[[8,"verified","onVerified"]]],[0,"salla-localization-modal",{"language":[1537],"currency":[1537],"languages":[32],"currencies":[32],"languagesTitle":[32],"currenciesTitle":[32],"isLoading":[32],"open":[64],"close":[64],"submit":[64]}],[0,"salla-rating-modal",{"orderId":[2,"order-id"],"order":[32],"open":[64],"close":[64]}],[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],"open":[64],"showOffer":[64]}],[0,"salla-search",{"inline":[4],"oval":[4],"height":[2],"results":[32],"placeholder":[32],"noResultsText":[32],"loading":[32],"typing":[32],"debounce":[32],"search_term":[32]}],[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"],"subTitle":[32],"mobileLabel":[32],"emailLabel":[32],"emailPlaceholder":[32],"subscribedMessage":[32],"title_":[32],"emailErrorMsg":[32],"isVisitorSubscribed":[32]}],[4,"salla-verify",{"display":[1],"type":[1025],"autoReload":[4,"auto-reload"],"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,"onTabSelected","onSelectedTab"]]],[4,"salla-placeholder",{"icon":[1],"alignment":[1],"iconSize":[1,"icon-size"],"default_title":[32],"default_description":[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"]}]]],["salla-scopes.cjs",[[4,"salla-scopes",{"selection":[1],"searchDisplayLimit":[2,"search-display-limit"],"mode":[32],"current_scope":[32],"scopes":[32],"originalScopesList":[32],"branchNotFound":[32],"ourServiceIsNotFound":[32],"searchForAvailabilityInOtherBranch":[32],"shoppingFromAnotherBranch":[32],"nowBrowsingFrom":[32],"confirmButton":[32],"scopeSearchPlaceholder":[32],"selected_scope":[32],"isOpenedBefore":[32],"close":[64],"open":[64],"handleSubmit":[64]}]]],["salla-add-product-button.cjs",[[4,"salla-add-product-button",{"channels":[513],"quantity":[514],"donatingAmount":[514,"donating-amount"],"productId":[520,"product-id"],"productStatus":[513,"product-status"],"productType":[513,"product-type"]}]]],["salla-conditional-fields.cjs",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["salla-installment.cjs",[[0,"salla-installment",{"price":[1],"language":[1],"currency":[1],"tamaraIsActive":[32],"tabbyIsActive":[32],"spotiiIsActive":[32]}]]]], options);
|
|
22
22
|
});
|
|
@@ -6,10 +6,25 @@ export class SallaAddProductButton {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.hostAttributes = {};
|
|
8
8
|
this.hasLabel = false;
|
|
9
|
+
/**
|
|
10
|
+
* Channels.
|
|
11
|
+
*/
|
|
9
12
|
this.channels = null;
|
|
13
|
+
/**
|
|
14
|
+
* Product Quantity
|
|
15
|
+
*/
|
|
10
16
|
this.quantity = 0;
|
|
17
|
+
/**
|
|
18
|
+
* Donating amount.
|
|
19
|
+
*/
|
|
11
20
|
this.donatingAmount = 0;
|
|
21
|
+
/**
|
|
22
|
+
* Product Status.Defaults to `sale`
|
|
23
|
+
*/
|
|
12
24
|
this.productStatus = 'sale';
|
|
25
|
+
/**
|
|
26
|
+
* Product type. Defaults to `product`
|
|
27
|
+
*/
|
|
13
28
|
this.productType = 'product';
|
|
14
29
|
}
|
|
15
30
|
getLabel() {
|
|
@@ -40,10 +55,10 @@ export class SallaAddProductButton {
|
|
|
40
55
|
}).reduce((a, [k, v]) => (v ? (a[k] = v, a) : a), {});
|
|
41
56
|
return salla.cart.quickAdd(data)
|
|
42
57
|
.then((response) => {
|
|
43
|
-
return this.
|
|
58
|
+
return this.onSuccess.emit(response);
|
|
44
59
|
})
|
|
45
60
|
.catch((error) => {
|
|
46
|
-
return this.
|
|
61
|
+
return this.onFailed.emit(error);
|
|
47
62
|
});
|
|
48
63
|
}
|
|
49
64
|
getBtnAttributes() {
|
|
@@ -88,7 +103,7 @@ export class SallaAddProductButton {
|
|
|
88
103
|
"optional": false,
|
|
89
104
|
"docs": {
|
|
90
105
|
"tags": [],
|
|
91
|
-
"text": ""
|
|
106
|
+
"text": "Channels."
|
|
92
107
|
},
|
|
93
108
|
"attribute": "channels",
|
|
94
109
|
"reflect": true,
|
|
@@ -106,7 +121,7 @@ export class SallaAddProductButton {
|
|
|
106
121
|
"optional": false,
|
|
107
122
|
"docs": {
|
|
108
123
|
"tags": [],
|
|
109
|
-
"text": ""
|
|
124
|
+
"text": "Product Quantity"
|
|
110
125
|
},
|
|
111
126
|
"attribute": "quantity",
|
|
112
127
|
"reflect": true,
|
|
@@ -124,7 +139,7 @@ export class SallaAddProductButton {
|
|
|
124
139
|
"optional": false,
|
|
125
140
|
"docs": {
|
|
126
141
|
"tags": [],
|
|
127
|
-
"text": ""
|
|
142
|
+
"text": "Donating amount."
|
|
128
143
|
},
|
|
129
144
|
"attribute": "donating-amount",
|
|
130
145
|
"reflect": true,
|
|
@@ -142,7 +157,7 @@ export class SallaAddProductButton {
|
|
|
142
157
|
"optional": false,
|
|
143
158
|
"docs": {
|
|
144
159
|
"tags": [],
|
|
145
|
-
"text": ""
|
|
160
|
+
"text": "Product id"
|
|
146
161
|
},
|
|
147
162
|
"attribute": "product-id",
|
|
148
163
|
"reflect": true
|
|
@@ -159,7 +174,7 @@ export class SallaAddProductButton {
|
|
|
159
174
|
"optional": false,
|
|
160
175
|
"docs": {
|
|
161
176
|
"tags": [],
|
|
162
|
-
"text": ""
|
|
177
|
+
"text": "Product Status.Defaults to `sale`"
|
|
163
178
|
},
|
|
164
179
|
"attribute": "product-status",
|
|
165
180
|
"reflect": true,
|
|
@@ -177,7 +192,7 @@ export class SallaAddProductButton {
|
|
|
177
192
|
"optional": false,
|
|
178
193
|
"docs": {
|
|
179
194
|
"tags": [],
|
|
180
|
-
"text": ""
|
|
195
|
+
"text": "Product type. Defaults to `product`"
|
|
181
196
|
},
|
|
182
197
|
"attribute": "product-type",
|
|
183
198
|
"reflect": true,
|
|
@@ -185,14 +200,14 @@ export class SallaAddProductButton {
|
|
|
185
200
|
}
|
|
186
201
|
}; }
|
|
187
202
|
static get events() { return [{
|
|
188
|
-
"method": "
|
|
189
|
-
"name": "
|
|
203
|
+
"method": "onSuccess",
|
|
204
|
+
"name": "onSuccess",
|
|
190
205
|
"bubbles": true,
|
|
191
206
|
"cancelable": true,
|
|
192
207
|
"composed": true,
|
|
193
208
|
"docs": {
|
|
194
209
|
"tags": [],
|
|
195
|
-
"text": ""
|
|
210
|
+
"text": "Custome DOM event emitter when product gets added to cart successfully."
|
|
196
211
|
},
|
|
197
212
|
"complexType": {
|
|
198
213
|
"original": "any",
|
|
@@ -200,14 +215,14 @@ export class SallaAddProductButton {
|
|
|
200
215
|
"references": {}
|
|
201
216
|
}
|
|
202
217
|
}, {
|
|
203
|
-
"method": "
|
|
204
|
-
"name": "
|
|
218
|
+
"method": "onFailed",
|
|
219
|
+
"name": "onFailed",
|
|
205
220
|
"bubbles": true,
|
|
206
221
|
"cancelable": true,
|
|
207
222
|
"composed": true,
|
|
208
223
|
"docs": {
|
|
209
224
|
"tags": [],
|
|
210
|
-
"text": ""
|
|
225
|
+
"text": "Custome DOM event emitter when product addition to cart fails."
|
|
211
226
|
},
|
|
212
227
|
"complexType": {
|
|
213
228
|
"original": "any",
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
import { Component, Host, h, Prop } from '@stencil/core';
|
|
5
5
|
export class SallaListTile {
|
|
6
6
|
constructor() {
|
|
7
|
+
/**
|
|
8
|
+
* Designates the component as anchor and applies the `href` attribute.
|
|
9
|
+
*/
|
|
7
10
|
this.href = undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Designates the target attribute. This should only be applied when using the `href` prop.
|
|
13
|
+
*/
|
|
8
14
|
this.target = "_self";
|
|
9
15
|
}
|
|
10
16
|
generateClass() {
|
|
@@ -46,7 +52,7 @@ export class SallaListTile {
|
|
|
46
52
|
"optional": false,
|
|
47
53
|
"docs": {
|
|
48
54
|
"tags": [],
|
|
49
|
-
"text": ""
|
|
55
|
+
"text": "Designates the component as anchor and applies the `href` attribute."
|
|
50
56
|
},
|
|
51
57
|
"attribute": "href",
|
|
52
58
|
"reflect": false,
|
|
@@ -64,7 +70,7 @@ export class SallaListTile {
|
|
|
64
70
|
"optional": false,
|
|
65
71
|
"docs": {
|
|
66
72
|
"tags": [],
|
|
67
|
-
"text": ""
|
|
73
|
+
"text": "Designates the target attribute. This should only be applied when using the `href` prop."
|
|
68
74
|
},
|
|
69
75
|
"attribute": "target",
|
|
70
76
|
"reflect": false,
|