@salla.sa/twilight-components 1.2.0 → 1.3.1
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-branches_22.cjs.entry.js → salla-branches_23.cjs.entry.js} +1540 -26
- package/dist/cjs/twilight-components.cjs.js +1 -1
- package/dist/collection/assets/flat.svg +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/salla-loyalty/salla-loyalty.css +4 -0
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +268 -50
- package/dist/collection/components/salla-modal/salla-modal.js +5 -2
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +13 -3
- package/dist/collection/components/salla-search/salla-search.js +5 -4
- package/dist/collection/components/salla-social-share/interfaces.js +11 -0
- package/dist/collection/components/salla-social-share/salla-social-share.css +0 -0
- package/dist/collection/components/salla-social-share/salla-social-share.js +165 -0
- package/dist/collection/global/app.js +6 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/salla-loyalty.js +115 -22
- package/dist/components/salla-modal2.js +5 -2
- package/dist/components/salla-placeholder2.js +8 -2
- package/dist/components/salla-search.js +5 -4
- package/dist/components/salla-social-share.d.ts +11 -0
- package/dist/components/salla-social-share.js +1460 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{salla-branches_22.entry.js → salla-branches_23.entry.js} +1540 -27
- package/dist/esm/twilight-components.js +1 -1
- package/dist/twilight-components/p-9a8c8e0a.entry.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +40 -2
- package/dist/types/components/salla-modal/salla-modal.d.ts +1 -0
- package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +3 -0
- package/dist/types/components/salla-search/salla-search.d.ts +1 -1
- package/dist/types/components/salla-social-share/interfaces.d.ts +7 -0
- package/dist/types/components/salla-social-share/salla-social-share.d.ts +23 -0
- package/dist/types/components.d.ts +98 -0
- package/example/assets/tailwind.css +579 -14
- package/package.json +3 -2
- package/dist/twilight-components/p-49a2ee1e.entry.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{p as e,b as a}from"./p-1503d976.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-
|
|
4
|
+
import{p as e,b as a}from"./p-1503d976.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((e=>a([["p-9a8c8e0a",[[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-rating-modal",{orderId:[2,"order-id"],order:[32],open:[64],close:[64]}],[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]}],[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-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],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]}],[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"],direction:[1],currentIndex:[32],isLastSlideItem:[32],isFirstSlideItem:[32]}],[4,"salla-list-tile",{href:[1],target:[1]}],[0,"salla-rating-stars",{name:[1],size:[1],value:[2]}],[4,"salla-placeholder",{icon:[1],alignment:[1],iconSize:[1,"icon-size"],default_title:[32],default_description:[32]}],[4,"salla-tab-content",{name:[1],isSelected:[32],getChild:[64]}],[4,"salla-tab-header",{name:[1],activeClass:[1,"active-class"],height:[8],centered:[4],isSelected:[32],getChild:[64]}],[4,"salla-tabs",{backgroundColor:[1,"background-color"],vertical:[4]},[[0,"onSelect","onSelectedTab"]]],[0,"salla-tel-input",{phone:[1025],name:[1],countryCode:[1025,"country-code"],mobileRequired:[32],countryCodeLabel:[32],mobileLabel:[32],tooShort:[32],tooLong:[32],invalidCountryCode:[32],invalidNumber:[32],errorMap:[32],getValues:[64],isValid:[64]}],[4,"salla-modal",{isClosable:[1028,"is-closable"],width:[513],position:[513],visible:[516],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],open:[64],close:[64],setTitle:[64],loading:[64],stopLoading:[64]}],[4,"salla-button",{shape:[513],color:[513],fill:[513],size:[513],width:[513],loading:[516],disabled:[516],loaderPosition:[1,"loader-position"],href:[1],load:[64],stop:[64],setText:[64],disable:[64],enable:[64]}],[0,"salla-loading",{size:[8],width:[8],color:[1],bgColor:[1,"bg-color"]}]]],["p-b9fe5498",[[4,"salla-add-product-button",{channels:[513],quantity:[514],donatingAmount:[514,"donating-amount"],productId:[520,"product-id"],productStatus:[513,"product-status"],productType:[513,"product-type"]}]]],["p-019bb315",[[4,"salla-conditional-fields",null,[[0,"change","changeHandler"]]]]],["p-1708802b",[[0,"salla-installment",{price:[1],language:[1],currency:[1],tamaraIsActive:[32],tabbyIsActive:[32],spotiiIsActive:[32]}]]],["p-4c5055cf",[[4,"salla-quantity-input",{quantity:[32],decrease:[64],increase:[64],setValue:[64]}]]]],e)));
|
|
@@ -7,17 +7,49 @@ export declare class SallaLoyalty {
|
|
|
7
7
|
buttonLoading: boolean;
|
|
8
8
|
selectedItem: Item | undefined;
|
|
9
9
|
askConfirmation: boolean;
|
|
10
|
+
is_loggedin: boolean;
|
|
10
11
|
points: string;
|
|
11
12
|
exchange_points: string;
|
|
12
13
|
are_you_sure_to_exchange: string;
|
|
13
14
|
for: string;
|
|
14
15
|
cancel: string;
|
|
15
16
|
confirm: string;
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
cart_total_point_summary: string;
|
|
18
|
+
cart_point_exchange_now: string;
|
|
19
|
+
login_button: string;
|
|
20
|
+
/**
|
|
21
|
+
* The exchanged prize point
|
|
22
|
+
*/
|
|
23
|
+
prizePoints: string | number;
|
|
24
|
+
/**
|
|
25
|
+
* Available customer points with which they can exchange.
|
|
26
|
+
*/
|
|
27
|
+
customerPoints: number;
|
|
28
|
+
/**
|
|
29
|
+
* The exchangable prize title
|
|
30
|
+
*/
|
|
31
|
+
prizeTitle: string;
|
|
32
|
+
/**
|
|
33
|
+
* Does the merchant allow to login using email
|
|
34
|
+
*/
|
|
35
|
+
allowEmail: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Does the merchant/current location for visitor allow to login using mobile, By default outside KSA is `false`
|
|
38
|
+
*/
|
|
39
|
+
allowMobile: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Does the merchant require registration with email & mobile
|
|
42
|
+
*/
|
|
43
|
+
requireEmail: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Message to show for guest users.
|
|
46
|
+
*/
|
|
47
|
+
guestMessage: string;
|
|
18
48
|
private setSelectedPrizeItem;
|
|
49
|
+
private handleLongText;
|
|
19
50
|
private prizeItem;
|
|
20
51
|
private getConfirmationModal;
|
|
52
|
+
private getAfterExchangeUI;
|
|
21
53
|
/**
|
|
22
54
|
* Show loyalty modal
|
|
23
55
|
*/
|
|
@@ -27,6 +59,11 @@ export declare class SallaLoyalty {
|
|
|
27
59
|
* Hide loyalty modal
|
|
28
60
|
*/
|
|
29
61
|
close(): Promise<HTMLElement>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* Cancel Exchanged prizes
|
|
65
|
+
*/
|
|
66
|
+
resetExchange(): Promise<any>;
|
|
30
67
|
/**
|
|
31
68
|
* Open Confirmation modal
|
|
32
69
|
*/
|
|
@@ -42,4 +79,5 @@ export declare class SallaLoyalty {
|
|
|
42
79
|
*/
|
|
43
80
|
exchangeLoyaltyPoint(): Promise<any>;
|
|
44
81
|
render(): any;
|
|
82
|
+
componentDidLoad(): void;
|
|
45
83
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "https://static.addtoany.com/menu/page.js";
|
|
2
|
+
export declare class SallaSocialShare {
|
|
3
|
+
private shareMenu?;
|
|
4
|
+
private platformItem?;
|
|
5
|
+
opened: boolean;
|
|
6
|
+
allPlatforms: Array<string>;
|
|
7
|
+
platformIcons: Array<object>;
|
|
8
|
+
/**
|
|
9
|
+
* page url that will be shared custom | current page url
|
|
10
|
+
*/
|
|
11
|
+
url: string;
|
|
12
|
+
/**
|
|
13
|
+
* page url name that will be shared custom | current page url
|
|
14
|
+
*/
|
|
15
|
+
urlName: string;
|
|
16
|
+
/**
|
|
17
|
+
* selected platforms to share | all platforms
|
|
18
|
+
*/
|
|
19
|
+
platforms: Array<string>;
|
|
20
|
+
componentWillLoad(): void;
|
|
21
|
+
open(): void;
|
|
22
|
+
render(): any;
|
|
23
|
+
}
|
|
@@ -170,18 +170,50 @@ export namespace Components {
|
|
|
170
170
|
"open": (event?: any) => Promise<HTMLElement>;
|
|
171
171
|
}
|
|
172
172
|
interface SallaLoyalty {
|
|
173
|
+
/**
|
|
174
|
+
* Does the merchant allow to login using email
|
|
175
|
+
*/
|
|
176
|
+
"allowEmail": boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Does the merchant/current location for visitor allow to login using mobile, By default outside KSA is `false`
|
|
179
|
+
*/
|
|
180
|
+
"allowMobile": boolean;
|
|
173
181
|
/**
|
|
174
182
|
* Hide loyalty modal
|
|
175
183
|
*/
|
|
176
184
|
"close": () => Promise<HTMLElement>;
|
|
185
|
+
/**
|
|
186
|
+
* Available customer points with which they can exchange.
|
|
187
|
+
*/
|
|
188
|
+
"customerPoints": number;
|
|
177
189
|
/**
|
|
178
190
|
* @param loyalty_prize_id
|
|
179
191
|
*/
|
|
180
192
|
"exchangeLoyaltyPoint": () => Promise<any>;
|
|
193
|
+
/**
|
|
194
|
+
* Message to show for guest users.
|
|
195
|
+
*/
|
|
196
|
+
"guestMessage": string;
|
|
181
197
|
/**
|
|
182
198
|
* Show loyalty modal
|
|
183
199
|
*/
|
|
184
200
|
"open": () => Promise<any>;
|
|
201
|
+
/**
|
|
202
|
+
* The exchanged prize point
|
|
203
|
+
*/
|
|
204
|
+
"prizePoints": string | number;
|
|
205
|
+
/**
|
|
206
|
+
* The exchangable prize title
|
|
207
|
+
*/
|
|
208
|
+
"prizeTitle": string;
|
|
209
|
+
/**
|
|
210
|
+
* Does the merchant require registration with email & mobile
|
|
211
|
+
*/
|
|
212
|
+
"requireEmail": boolean;
|
|
213
|
+
/**
|
|
214
|
+
* Cancel Exchanged prizes
|
|
215
|
+
*/
|
|
216
|
+
"resetExchange": () => Promise<any>;
|
|
185
217
|
}
|
|
186
218
|
interface SallaModal {
|
|
187
219
|
/**
|
|
@@ -326,6 +358,21 @@ export namespace Components {
|
|
|
326
358
|
"inline": boolean;
|
|
327
359
|
"oval": boolean;
|
|
328
360
|
}
|
|
361
|
+
interface SallaSocialShare {
|
|
362
|
+
"open": () => Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* selected platforms to share | all platforms
|
|
365
|
+
*/
|
|
366
|
+
"platforms": Array<string>;
|
|
367
|
+
/**
|
|
368
|
+
* page url that will be shared custom | current page url
|
|
369
|
+
*/
|
|
370
|
+
"url": string;
|
|
371
|
+
/**
|
|
372
|
+
* page url name that will be shared custom | current page url
|
|
373
|
+
*/
|
|
374
|
+
"urlName": string;
|
|
375
|
+
}
|
|
329
376
|
interface SallaSwiper {
|
|
330
377
|
"direction": string;
|
|
331
378
|
"itemPerView": "auto" | number;
|
|
@@ -552,6 +599,12 @@ declare global {
|
|
|
552
599
|
prototype: HTMLSallaSearchElement;
|
|
553
600
|
new (): HTMLSallaSearchElement;
|
|
554
601
|
};
|
|
602
|
+
interface HTMLSallaSocialShareElement extends Components.SallaSocialShare, HTMLStencilElement {
|
|
603
|
+
}
|
|
604
|
+
var HTMLSallaSocialShareElement: {
|
|
605
|
+
prototype: HTMLSallaSocialShareElement;
|
|
606
|
+
new (): HTMLSallaSocialShareElement;
|
|
607
|
+
};
|
|
555
608
|
interface HTMLSallaSwiperElement extends Components.SallaSwiper, HTMLStencilElement {
|
|
556
609
|
}
|
|
557
610
|
var HTMLSallaSwiperElement: {
|
|
@@ -609,6 +662,7 @@ declare global {
|
|
|
609
662
|
"salla-rating-modal": HTMLSallaRatingModalElement;
|
|
610
663
|
"salla-rating-stars": HTMLSallaRatingStarsElement;
|
|
611
664
|
"salla-search": HTMLSallaSearchElement;
|
|
665
|
+
"salla-social-share": HTMLSallaSocialShareElement;
|
|
612
666
|
"salla-swiper": HTMLSallaSwiperElement;
|
|
613
667
|
"salla-tab-content": HTMLSallaTabContentElement;
|
|
614
668
|
"salla-tab-header": HTMLSallaTabHeaderElement;
|
|
@@ -748,6 +802,34 @@ declare namespace LocalJSX {
|
|
|
748
802
|
"isMobileAllowed"?: boolean;
|
|
749
803
|
}
|
|
750
804
|
interface SallaLoyalty {
|
|
805
|
+
/**
|
|
806
|
+
* Does the merchant allow to login using email
|
|
807
|
+
*/
|
|
808
|
+
"allowEmail"?: boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Does the merchant/current location for visitor allow to login using mobile, By default outside KSA is `false`
|
|
811
|
+
*/
|
|
812
|
+
"allowMobile"?: boolean;
|
|
813
|
+
/**
|
|
814
|
+
* Available customer points with which they can exchange.
|
|
815
|
+
*/
|
|
816
|
+
"customerPoints"?: number;
|
|
817
|
+
/**
|
|
818
|
+
* Message to show for guest users.
|
|
819
|
+
*/
|
|
820
|
+
"guestMessage"?: string;
|
|
821
|
+
/**
|
|
822
|
+
* The exchanged prize point
|
|
823
|
+
*/
|
|
824
|
+
"prizePoints"?: string | number;
|
|
825
|
+
/**
|
|
826
|
+
* The exchangable prize title
|
|
827
|
+
*/
|
|
828
|
+
"prizeTitle"?: string;
|
|
829
|
+
/**
|
|
830
|
+
* Does the merchant require registration with email & mobile
|
|
831
|
+
*/
|
|
832
|
+
"requireEmail"?: boolean;
|
|
751
833
|
}
|
|
752
834
|
interface SallaModal {
|
|
753
835
|
/**
|
|
@@ -830,6 +912,20 @@ declare namespace LocalJSX {
|
|
|
830
912
|
"inline"?: boolean;
|
|
831
913
|
"oval"?: boolean;
|
|
832
914
|
}
|
|
915
|
+
interface SallaSocialShare {
|
|
916
|
+
/**
|
|
917
|
+
* selected platforms to share | all platforms
|
|
918
|
+
*/
|
|
919
|
+
"platforms"?: Array<string>;
|
|
920
|
+
/**
|
|
921
|
+
* page url that will be shared custom | current page url
|
|
922
|
+
*/
|
|
923
|
+
"url"?: string;
|
|
924
|
+
/**
|
|
925
|
+
* page url name that will be shared custom | current page url
|
|
926
|
+
*/
|
|
927
|
+
"urlName"?: string;
|
|
928
|
+
}
|
|
833
929
|
interface SallaSwiper {
|
|
834
930
|
"direction"?: string;
|
|
835
931
|
"itemPerView"?: "auto" | number;
|
|
@@ -923,6 +1019,7 @@ declare namespace LocalJSX {
|
|
|
923
1019
|
"salla-rating-modal": SallaRatingModal;
|
|
924
1020
|
"salla-rating-stars": SallaRatingStars;
|
|
925
1021
|
"salla-search": SallaSearch;
|
|
1022
|
+
"salla-social-share": SallaSocialShare;
|
|
926
1023
|
"salla-swiper": SallaSwiper;
|
|
927
1024
|
"salla-tab-content": SallaTabContent;
|
|
928
1025
|
"salla-tab-header": SallaTabHeader;
|
|
@@ -955,6 +1052,7 @@ declare module "@stencil/core" {
|
|
|
955
1052
|
"salla-rating-modal": LocalJSX.SallaRatingModal & JSXBase.HTMLAttributes<HTMLSallaRatingModalElement>;
|
|
956
1053
|
"salla-rating-stars": LocalJSX.SallaRatingStars & JSXBase.HTMLAttributes<HTMLSallaRatingStarsElement>;
|
|
957
1054
|
"salla-search": LocalJSX.SallaSearch & JSXBase.HTMLAttributes<HTMLSallaSearchElement>;
|
|
1055
|
+
"salla-social-share": LocalJSX.SallaSocialShare & JSXBase.HTMLAttributes<HTMLSallaSocialShareElement>;
|
|
958
1056
|
"salla-swiper": LocalJSX.SallaSwiper & JSXBase.HTMLAttributes<HTMLSallaSwiperElement>;
|
|
959
1057
|
"salla-tab-content": LocalJSX.SallaTabContent & JSXBase.HTMLAttributes<HTMLSallaTabContentElement>;
|
|
960
1058
|
"salla-tab-header": LocalJSX.SallaTabHeader & JSXBase.HTMLAttributes<HTMLSallaTabHeaderElement>;
|