favesalon-embed 0.0.3 → 0.0.5
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/LICENSE +21 -0
- package/dist/cjs/_commonjsHelpers-5cfcba41.js +36 -0
- package/dist/cjs/chat-button.cjs.entry.js +118 -0
- package/dist/cjs/colors-38421769.js +69 -0
- package/dist/cjs/favesalon-embed.cjs.js +24 -0
- package/dist/cjs/google-map_5.cjs.entry.js +310 -0
- package/{cjs/index-7d179a70.js → dist/cjs/index-47c2a5f6.js} +587 -199
- package/dist/cjs/index-7f190886.js +4396 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/relativeTime-3721080d.js +9 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +30 -0
- package/dist/cjs/salon-booking.cjs.entry.js +51 -0
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +29 -0
- package/dist/cjs/salon-gift-card.cjs.entry.js +51 -0
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
- package/dist/cjs/salon-lookbook.cjs.entry.js +222 -0
- package/dist/cjs/salon-ranking.cjs.entry.js +60 -0
- package/dist/cjs/salon-reviews.cjs.entry.js +193 -0
- package/dist/cjs/salon-services.cjs.entry.js +81 -0
- package/dist/cjs/salon-stylists.cjs.entry.js +118 -0
- package/dist/cjs/services-125c82d8.js +21492 -0
- package/dist/cjs/style-detail.cjs.entry.js +312 -0
- package/dist/cjs/user-avatar.cjs.entry.js +45 -0
- package/dist/cjs/utils-c5a33b3c.js +23 -0
- package/{collection → dist/collection}/collection-manifest.json +5 -4
- package/dist/collection/components/chat-button/index.css +122 -0
- package/dist/collection/components/chat-button/index.js +218 -0
- package/dist/collection/components/chat-conversation/index.js +103 -0
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/{collection → dist/collection}/components/google-map/index.css +0 -1
- package/dist/collection/components/google-map/index.js +90 -0
- package/{collection → dist/collection}/components/salon-booking/index.css +11 -20
- package/dist/collection/components/salon-booking/index.js +126 -0
- package/dist/collection/components/salon-booking/salon-booking-modal.js +92 -0
- package/dist/collection/components/salon-gift-card/index.css +30 -0
- package/dist/collection/components/salon-gift-card/index.js +126 -0
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +73 -0
- package/dist/collection/components/salon-info/index.js +77 -0
- package/dist/collection/components/salon-latest-reviews/index.js +163 -0
- package/dist/collection/components/salon-latest-styles/index.css +12 -0
- package/dist/collection/components/salon-latest-styles/index.js +183 -0
- package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +7 -4
- package/dist/collection/components/salon-locations/index.js +143 -0
- package/dist/collection/components/salon-lookbook/index.css +15 -0
- package/dist/collection/components/salon-lookbook/index.js +368 -0
- package/dist/collection/components/salon-ranking/index.js +117 -0
- package/dist/collection/components/salon-reviews/index.css +18 -0
- package/dist/collection/components/salon-reviews/index.js +249 -0
- package/dist/collection/components/salon-schedules/index.css +18 -0
- package/dist/collection/components/salon-schedules/index.js +167 -0
- package/dist/collection/components/salon-services/index.css +1 -0
- package/dist/collection/components/salon-services/index.js +146 -0
- package/dist/collection/components/salon-stylists/index.js +184 -0
- package/dist/collection/components/style-detail/index.css +76 -0
- package/dist/collection/components/style-detail/index.js +386 -0
- package/dist/collection/components/user-avatar/index.js +134 -0
- package/dist/collection/constants/colors.js +65 -0
- package/dist/collection/mocks/users.js +10 -0
- package/dist/collection/services/services.js +295 -0
- package/dist/collection/types/chat.js +23 -0
- package/dist/collection/types/common.js +11 -0
- package/{collection → dist/collection}/types/review.js +9 -5
- package/dist/collection/types/salon.js +58 -0
- package/dist/collection/types/style.js +128 -0
- package/dist/collection/types/stylist.js +30 -0
- package/dist/collection/types/user.js +10 -0
- package/{custom-elements → dist/custom-elements}/index.d.ts +18 -12
- package/dist/custom-elements/index.js +28340 -0
- package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
- package/dist/esm/chat-button.entry.js +114 -0
- package/dist/esm/colors-ea36347a.js +67 -0
- package/dist/esm/favesalon-embed.js +19 -0
- package/dist/esm/google-map_5.entry.js +302 -0
- package/{esm/index-2160b80b.js → dist/esm/index-3fae868e.js} +586 -200
- package/dist/esm/index-80523fec.js +4393 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/relativeTime-cd452e6d.js +7 -0
- package/dist/esm/salon-booking-modal.entry.js +26 -0
- package/dist/esm/salon-booking.entry.js +47 -0
- package/dist/esm/salon-gift-card-modal.entry.js +25 -0
- package/dist/esm/salon-gift-card.entry.js +47 -0
- package/dist/esm/salon-latest-reviews.entry.js +93 -0
- package/dist/esm/salon-lookbook.entry.js +218 -0
- package/dist/esm/salon-ranking.entry.js +56 -0
- package/dist/esm/salon-reviews.entry.js +189 -0
- package/dist/esm/salon-services.entry.js +77 -0
- package/dist/esm/salon-stylists.entry.js +114 -0
- package/dist/esm/services-40a3e622.js +21485 -0
- package/dist/esm/style-detail.entry.js +308 -0
- package/dist/esm/user-avatar.entry.js +41 -0
- package/dist/esm/utils-e97485e0.js +19 -0
- package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
- package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
- package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
- package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
- package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
- package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
- package/dist/favesalon-embed/p-22093506.entry.js +1 -0
- package/dist/favesalon-embed/p-32b314e9.js +2 -0
- package/dist/favesalon-embed/p-47e646f8.js +1 -0
- package/dist/favesalon-embed/p-4a5eca9a.js +6 -0
- package/dist/favesalon-embed/p-58d2e9be.js +1 -0
- package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
- package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
- package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
- package/dist/favesalon-embed/p-a33331cc.js +1 -0
- package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
- package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
- package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
- package/dist/favesalon-embed/p-b630ae68.js +1580 -0
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
- package/dist/favesalon-embed/p-d6083940.js +1 -0
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +6 -0
- package/dist/types/components/chat-button/index.d.ts +24 -0
- package/dist/types/components/google-map/index.d.ts +5 -0
- package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +1 -0
- package/{types → dist/types}/components/salon-gift-card/index.d.ts +2 -1
- package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +2 -0
- package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
- package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
- package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
- package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-lookbook/index.d.ts +7 -2
- package/dist/types/components/salon-reviews/index.d.ts +24 -0
- package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-services/index.d.ts +1 -0
- package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
- package/dist/types/components/style-detail/index.d.ts +24 -0
- package/{types → dist/types}/components.d.ts +82 -41
- package/dist/types/constants/colors.d.ts +65 -0
- package/dist/types/mocks/users.d.ts +10 -0
- package/dist/types/services/services.d.ts +75 -0
- package/{types → dist/types}/stencil-public-runtime.d.ts +85 -11
- package/dist/types/types/chat.d.ts +17 -0
- package/dist/types/types/common.d.ts +11 -0
- package/{types → dist/types}/types/review.d.ts +4 -0
- package/{types → dist/types}/types/salon.d.ts +3 -1
- package/dist/types/types/style.d.ts +88 -0
- package/{types → dist/types}/types/stylist.d.ts +2 -1
- package/{types → dist/types}/types/user.d.ts +2 -2
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +19 -14
- package/readme.md +25 -2
- package/cjs/favesalon-embed.cjs.js +0 -20
- package/cjs/google-map_15.cjs.entry.js +0 -6632
- package/cjs/loader.cjs.js +0 -22
- package/cjs/salon-booking-modal.cjs.entry.js +0 -23
- package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
- package/collection/components/google-map/index.js +0 -97
- package/collection/components/salon-booking/index.js +0 -103
- package/collection/components/salon-booking/salon-booking-modal.js +0 -82
- package/collection/components/salon-contact/index.js +0 -88
- package/collection/components/salon-gift-card/index.css +0 -25
- package/collection/components/salon-gift-card/index.js +0 -83
- package/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -43
- package/collection/components/salon-info/index.css +0 -3
- package/collection/components/salon-info/index.js +0 -97
- package/collection/components/salon-latest-reviews/index.js +0 -108
- package/collection/components/salon-locations/index.js +0 -80
- package/collection/components/salon-lookbook/index.css +0 -12
- package/collection/components/salon-lookbook/index.js +0 -303
- package/collection/components/salon-ranking/index.js +0 -114
- package/collection/components/salon-reviews/index.js +0 -291
- package/collection/components/salon-schedules/index.css +0 -14
- package/collection/components/salon-schedules/index.js +0 -103
- package/collection/components/salon-services/index.css +0 -0
- package/collection/components/salon-services/index.js +0 -113
- package/collection/components/salon-styles/index.css +0 -23
- package/collection/components/salon-styles/index.js +0 -100
- package/collection/components/salon-stylists/index.js +0 -96
- package/collection/components/user-avatar/index.css +0 -0
- package/collection/components/user-avatar/index.js +0 -127
- package/collection/constants/colors.js +0 -91
- package/collection/services/services.js +0 -203
- package/collection/types/common.js +0 -2
- package/collection/types/salon.js +0 -52
- package/collection/types/style.js +0 -28
- package/collection/types/stylist.js +0 -13
- package/collection/types/user.js +0 -10
- package/custom-elements/index.js +0 -7410
- package/esm/favesalon-embed.js +0 -18
- package/esm/google-map_15.entry.js +0 -6614
- package/esm/loader.js +0 -18
- package/esm/polyfills/css-shim.js +0 -1
- package/esm/salon-booking-modal.entry.js +0 -19
- package/esm/salon-gift-card-modal.entry.js +0 -16
- package/favesalon-embed/favesalon-embed.esm.js +0 -1
- package/favesalon-embed/p-1432ab16.entry.js +0 -1
- package/favesalon-embed/p-2da2ed75.js +0 -1
- package/favesalon-embed/p-4a5eca9a.js +0 -6
- package/favesalon-embed/p-94a0991e.entry.js +0 -1
- package/favesalon-embed/p-f15bcb43.entry.js +0 -1
- package/types/components/google-map/index.d.ts +0 -10
- package/types/components/salon-contact/index.d.ts +0 -9
- package/types/components/salon-reviews/index.d.ts +0 -23
- package/types/components/salon-styles/index.d.ts +0 -9
- package/types/constants/colors.d.ts +0 -88
- package/types/services/services.d.ts +0 -24
- package/types/types/common.d.ts +0 -2
- package/types/types/style.d.ts +0 -49
- package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
- package/{cjs → dist/cjs}/index.cjs.js +0 -0
- package/{esm/index.js → dist/collection/components/salon-info/index.css} +0 -0
- package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -0
- package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
- package/{collection → dist/collection}/components/salon-stylists/index.css +0 -0
- package/{collection/components/salon-locations → dist/collection/components/user-avatar}/index.css +0 -0
- package/{collection → dist/collection}/global/global.js +0 -0
- package/{collection → dist/collection}/index.js +0 -0
- package/{collection → dist/collection}/types/service.js +0 -0
- package/{collection → dist/collection}/utils/utils.js +0 -0
- package/{esm → dist/esm}/global-e1089ffd.js +0 -0
- package/{esm → dist/esm}/polyfills/core-js.js +0 -0
- package/{esm → dist/esm}/polyfills/dom.js +0 -0
- package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
- package/{esm → dist/esm}/polyfills/index.js +0 -0
- package/{esm → dist/esm}/polyfills/system.js +0 -0
- package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
- package/{index.cjs.js → dist/index.cjs.js} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/{collection/components/salon-reviews/index.css → dist/types/components/chat-conversation/index.d.ts} +0 -0
- package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
- /package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
- /package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
- /package/{types → dist/types}/index.d.ts +0 -0
- /package/{types → dist/types}/types/service.d.ts +0 -0
- /package/{types → dist/types}/utils/utils.d.ts +0 -0
|
@@ -6,10 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
export namespace Components {
|
|
9
|
+
interface ChatButton {
|
|
10
|
+
"accessToken": string;
|
|
11
|
+
"fetchData": () => Promise<void>;
|
|
12
|
+
"primaryColor": string;
|
|
13
|
+
"receiverId": string;
|
|
14
|
+
"senderId": string;
|
|
15
|
+
}
|
|
9
16
|
interface GoogleMap {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"lng": number;
|
|
17
|
+
"locationAddress"?: string;
|
|
18
|
+
"locationName"?: string;
|
|
13
19
|
}
|
|
14
20
|
interface SalonBooking {
|
|
15
21
|
"buttonClass": string;
|
|
@@ -22,35 +28,43 @@ export namespace Components {
|
|
|
22
28
|
"redirectUrl": string;
|
|
23
29
|
"salonId": number;
|
|
24
30
|
}
|
|
25
|
-
interface SalonContact {
|
|
26
|
-
"salonId": number;
|
|
27
|
-
"salonInfo"?: string;
|
|
28
|
-
}
|
|
29
31
|
interface SalonGiftCard {
|
|
30
32
|
"buttonClass": string;
|
|
31
33
|
"buttonText": string;
|
|
34
|
+
"primaryColor": string;
|
|
32
35
|
"salonId": number;
|
|
33
36
|
}
|
|
34
37
|
interface SalonGiftCardModal {
|
|
38
|
+
"primaryColor": string;
|
|
35
39
|
"salonId": number;
|
|
36
40
|
}
|
|
37
41
|
interface SalonInfo {
|
|
38
|
-
"backgroundColor": string;
|
|
39
42
|
"fetchData": () => Promise<void>;
|
|
40
43
|
"salonId": number;
|
|
41
44
|
}
|
|
42
45
|
interface SalonLatestReviews {
|
|
43
46
|
"fetchData": () => Promise<void>;
|
|
47
|
+
"primaryColor": string;
|
|
48
|
+
"salonId": number;
|
|
49
|
+
}
|
|
50
|
+
interface SalonLatestStyles {
|
|
51
|
+
"fetchData": () => Promise<boolean>;
|
|
52
|
+
"isLoading"?: boolean;
|
|
44
53
|
"salonId": number;
|
|
54
|
+
"withBorder"?: boolean;
|
|
45
55
|
}
|
|
46
56
|
interface SalonLocations {
|
|
57
|
+
"isLoading"?: boolean;
|
|
47
58
|
"salonId": number;
|
|
48
59
|
"salonInfo"?: string;
|
|
60
|
+
"withBorder"?: boolean;
|
|
49
61
|
}
|
|
50
62
|
interface SalonLookbook {
|
|
51
63
|
"fetchCategories": () => Promise<void>;
|
|
52
64
|
"fetchData": () => Promise<any[]>;
|
|
53
65
|
"fetchLookbooks": (options: any, isLoadingMore?: boolean) => Promise<void>;
|
|
66
|
+
"onChangeFiltering": (filterBy: string) => Promise<void>;
|
|
67
|
+
"onChangeSorting": (sortBy: string) => Promise<void>;
|
|
54
68
|
"onLoadMore": () => Promise<void>;
|
|
55
69
|
"salonId": number;
|
|
56
70
|
}
|
|
@@ -60,26 +74,30 @@ export namespace Components {
|
|
|
60
74
|
"width"?: number;
|
|
61
75
|
}
|
|
62
76
|
interface SalonReviews {
|
|
63
|
-
"
|
|
77
|
+
"primaryColor": string;
|
|
64
78
|
"salonId": number;
|
|
65
79
|
}
|
|
66
80
|
interface SalonSchedules {
|
|
81
|
+
"isLoading"?: boolean;
|
|
67
82
|
"salonId": number;
|
|
68
83
|
"salonInfo"?: string;
|
|
84
|
+
"withBorder"?: boolean;
|
|
69
85
|
}
|
|
70
86
|
interface SalonServices {
|
|
71
87
|
"buttonClass": string;
|
|
72
88
|
"fetchData": () => Promise<void>;
|
|
73
89
|
"salonId": number;
|
|
74
90
|
}
|
|
75
|
-
interface SalonStyles {
|
|
76
|
-
"fetchData": () => Promise<any[]>;
|
|
77
|
-
"salonId": number;
|
|
78
|
-
}
|
|
79
91
|
interface SalonStylists {
|
|
80
92
|
"fetchData": () => Promise<void>;
|
|
93
|
+
"onLoadMore": () => Promise<void>;
|
|
81
94
|
"salonId": number;
|
|
82
95
|
}
|
|
96
|
+
interface StyleDetail {
|
|
97
|
+
"fetchData": () => Promise<any[]>;
|
|
98
|
+
"salonId": number;
|
|
99
|
+
"salonLookbook": string;
|
|
100
|
+
}
|
|
83
101
|
interface UserAvatar {
|
|
84
102
|
"avatar": string;
|
|
85
103
|
"name": string;
|
|
@@ -89,6 +107,12 @@ export namespace Components {
|
|
|
89
107
|
}
|
|
90
108
|
}
|
|
91
109
|
declare global {
|
|
110
|
+
interface HTMLChatButtonElement extends Components.ChatButton, HTMLStencilElement {
|
|
111
|
+
}
|
|
112
|
+
var HTMLChatButtonElement: {
|
|
113
|
+
prototype: HTMLChatButtonElement;
|
|
114
|
+
new (): HTMLChatButtonElement;
|
|
115
|
+
};
|
|
92
116
|
interface HTMLGoogleMapElement extends Components.GoogleMap, HTMLStencilElement {
|
|
93
117
|
}
|
|
94
118
|
var HTMLGoogleMapElement: {
|
|
@@ -107,12 +131,6 @@ declare global {
|
|
|
107
131
|
prototype: HTMLSalonBookingModalElement;
|
|
108
132
|
new (): HTMLSalonBookingModalElement;
|
|
109
133
|
};
|
|
110
|
-
interface HTMLSalonContactElement extends Components.SalonContact, HTMLStencilElement {
|
|
111
|
-
}
|
|
112
|
-
var HTMLSalonContactElement: {
|
|
113
|
-
prototype: HTMLSalonContactElement;
|
|
114
|
-
new (): HTMLSalonContactElement;
|
|
115
|
-
};
|
|
116
134
|
interface HTMLSalonGiftCardElement extends Components.SalonGiftCard, HTMLStencilElement {
|
|
117
135
|
}
|
|
118
136
|
var HTMLSalonGiftCardElement: {
|
|
@@ -137,6 +155,12 @@ declare global {
|
|
|
137
155
|
prototype: HTMLSalonLatestReviewsElement;
|
|
138
156
|
new (): HTMLSalonLatestReviewsElement;
|
|
139
157
|
};
|
|
158
|
+
interface HTMLSalonLatestStylesElement extends Components.SalonLatestStyles, HTMLStencilElement {
|
|
159
|
+
}
|
|
160
|
+
var HTMLSalonLatestStylesElement: {
|
|
161
|
+
prototype: HTMLSalonLatestStylesElement;
|
|
162
|
+
new (): HTMLSalonLatestStylesElement;
|
|
163
|
+
};
|
|
140
164
|
interface HTMLSalonLocationsElement extends Components.SalonLocations, HTMLStencilElement {
|
|
141
165
|
}
|
|
142
166
|
var HTMLSalonLocationsElement: {
|
|
@@ -173,18 +197,18 @@ declare global {
|
|
|
173
197
|
prototype: HTMLSalonServicesElement;
|
|
174
198
|
new (): HTMLSalonServicesElement;
|
|
175
199
|
};
|
|
176
|
-
interface HTMLSalonStylesElement extends Components.SalonStyles, HTMLStencilElement {
|
|
177
|
-
}
|
|
178
|
-
var HTMLSalonStylesElement: {
|
|
179
|
-
prototype: HTMLSalonStylesElement;
|
|
180
|
-
new (): HTMLSalonStylesElement;
|
|
181
|
-
};
|
|
182
200
|
interface HTMLSalonStylistsElement extends Components.SalonStylists, HTMLStencilElement {
|
|
183
201
|
}
|
|
184
202
|
var HTMLSalonStylistsElement: {
|
|
185
203
|
prototype: HTMLSalonStylistsElement;
|
|
186
204
|
new (): HTMLSalonStylistsElement;
|
|
187
205
|
};
|
|
206
|
+
interface HTMLStyleDetailElement extends Components.StyleDetail, HTMLStencilElement {
|
|
207
|
+
}
|
|
208
|
+
var HTMLStyleDetailElement: {
|
|
209
|
+
prototype: HTMLStyleDetailElement;
|
|
210
|
+
new (): HTMLStyleDetailElement;
|
|
211
|
+
};
|
|
188
212
|
interface HTMLUserAvatarElement extends Components.UserAvatar, HTMLStencilElement {
|
|
189
213
|
}
|
|
190
214
|
var HTMLUserAvatarElement: {
|
|
@@ -192,30 +216,36 @@ declare global {
|
|
|
192
216
|
new (): HTMLUserAvatarElement;
|
|
193
217
|
};
|
|
194
218
|
interface HTMLElementTagNameMap {
|
|
219
|
+
"chat-button": HTMLChatButtonElement;
|
|
195
220
|
"google-map": HTMLGoogleMapElement;
|
|
196
221
|
"salon-booking": HTMLSalonBookingElement;
|
|
197
222
|
"salon-booking-modal": HTMLSalonBookingModalElement;
|
|
198
|
-
"salon-contact": HTMLSalonContactElement;
|
|
199
223
|
"salon-gift-card": HTMLSalonGiftCardElement;
|
|
200
224
|
"salon-gift-card-modal": HTMLSalonGiftCardModalElement;
|
|
201
225
|
"salon-info": HTMLSalonInfoElement;
|
|
202
226
|
"salon-latest-reviews": HTMLSalonLatestReviewsElement;
|
|
227
|
+
"salon-latest-styles": HTMLSalonLatestStylesElement;
|
|
203
228
|
"salon-locations": HTMLSalonLocationsElement;
|
|
204
229
|
"salon-lookbook": HTMLSalonLookbookElement;
|
|
205
230
|
"salon-ranking": HTMLSalonRankingElement;
|
|
206
231
|
"salon-reviews": HTMLSalonReviewsElement;
|
|
207
232
|
"salon-schedules": HTMLSalonSchedulesElement;
|
|
208
233
|
"salon-services": HTMLSalonServicesElement;
|
|
209
|
-
"salon-styles": HTMLSalonStylesElement;
|
|
210
234
|
"salon-stylists": HTMLSalonStylistsElement;
|
|
235
|
+
"style-detail": HTMLStyleDetailElement;
|
|
211
236
|
"user-avatar": HTMLUserAvatarElement;
|
|
212
237
|
}
|
|
213
238
|
}
|
|
214
239
|
declare namespace LocalJSX {
|
|
240
|
+
interface ChatButton {
|
|
241
|
+
"accessToken"?: string;
|
|
242
|
+
"primaryColor"?: string;
|
|
243
|
+
"receiverId"?: string;
|
|
244
|
+
"senderId"?: string;
|
|
245
|
+
}
|
|
215
246
|
interface GoogleMap {
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
"lng"?: number;
|
|
247
|
+
"locationAddress"?: string;
|
|
248
|
+
"locationName"?: string;
|
|
219
249
|
}
|
|
220
250
|
interface SalonBooking {
|
|
221
251
|
"buttonClass"?: string;
|
|
@@ -228,28 +258,33 @@ declare namespace LocalJSX {
|
|
|
228
258
|
"redirectUrl"?: string;
|
|
229
259
|
"salonId"?: number;
|
|
230
260
|
}
|
|
231
|
-
interface SalonContact {
|
|
232
|
-
"salonId"?: number;
|
|
233
|
-
"salonInfo"?: string;
|
|
234
|
-
}
|
|
235
261
|
interface SalonGiftCard {
|
|
236
262
|
"buttonClass"?: string;
|
|
237
263
|
"buttonText"?: string;
|
|
264
|
+
"primaryColor"?: string;
|
|
238
265
|
"salonId"?: number;
|
|
239
266
|
}
|
|
240
267
|
interface SalonGiftCardModal {
|
|
268
|
+
"primaryColor"?: string;
|
|
241
269
|
"salonId"?: number;
|
|
242
270
|
}
|
|
243
271
|
interface SalonInfo {
|
|
244
|
-
"backgroundColor"?: string;
|
|
245
272
|
"salonId"?: number;
|
|
246
273
|
}
|
|
247
274
|
interface SalonLatestReviews {
|
|
275
|
+
"primaryColor"?: string;
|
|
248
276
|
"salonId"?: number;
|
|
249
277
|
}
|
|
278
|
+
interface SalonLatestStyles {
|
|
279
|
+
"isLoading"?: boolean;
|
|
280
|
+
"salonId"?: number;
|
|
281
|
+
"withBorder"?: boolean;
|
|
282
|
+
}
|
|
250
283
|
interface SalonLocations {
|
|
284
|
+
"isLoading"?: boolean;
|
|
251
285
|
"salonId"?: number;
|
|
252
286
|
"salonInfo"?: string;
|
|
287
|
+
"withBorder"?: boolean;
|
|
253
288
|
}
|
|
254
289
|
interface SalonLookbook {
|
|
255
290
|
"salonId"?: number;
|
|
@@ -260,21 +295,25 @@ declare namespace LocalJSX {
|
|
|
260
295
|
"width"?: number;
|
|
261
296
|
}
|
|
262
297
|
interface SalonReviews {
|
|
298
|
+
"primaryColor"?: string;
|
|
263
299
|
"salonId"?: number;
|
|
264
300
|
}
|
|
265
301
|
interface SalonSchedules {
|
|
302
|
+
"isLoading"?: boolean;
|
|
266
303
|
"salonId"?: number;
|
|
267
304
|
"salonInfo"?: string;
|
|
305
|
+
"withBorder"?: boolean;
|
|
268
306
|
}
|
|
269
307
|
interface SalonServices {
|
|
270
308
|
"buttonClass"?: string;
|
|
271
309
|
"salonId"?: number;
|
|
272
310
|
}
|
|
273
|
-
interface
|
|
311
|
+
interface SalonStylists {
|
|
274
312
|
"salonId"?: number;
|
|
275
313
|
}
|
|
276
|
-
interface
|
|
314
|
+
interface StyleDetail {
|
|
277
315
|
"salonId"?: number;
|
|
316
|
+
"salonLookbook"?: string;
|
|
278
317
|
}
|
|
279
318
|
interface UserAvatar {
|
|
280
319
|
"avatar"?: string;
|
|
@@ -284,22 +323,23 @@ declare namespace LocalJSX {
|
|
|
284
323
|
"size"?: number;
|
|
285
324
|
}
|
|
286
325
|
interface IntrinsicElements {
|
|
326
|
+
"chat-button": ChatButton;
|
|
287
327
|
"google-map": GoogleMap;
|
|
288
328
|
"salon-booking": SalonBooking;
|
|
289
329
|
"salon-booking-modal": SalonBookingModal;
|
|
290
|
-
"salon-contact": SalonContact;
|
|
291
330
|
"salon-gift-card": SalonGiftCard;
|
|
292
331
|
"salon-gift-card-modal": SalonGiftCardModal;
|
|
293
332
|
"salon-info": SalonInfo;
|
|
294
333
|
"salon-latest-reviews": SalonLatestReviews;
|
|
334
|
+
"salon-latest-styles": SalonLatestStyles;
|
|
295
335
|
"salon-locations": SalonLocations;
|
|
296
336
|
"salon-lookbook": SalonLookbook;
|
|
297
337
|
"salon-ranking": SalonRanking;
|
|
298
338
|
"salon-reviews": SalonReviews;
|
|
299
339
|
"salon-schedules": SalonSchedules;
|
|
300
340
|
"salon-services": SalonServices;
|
|
301
|
-
"salon-styles": SalonStyles;
|
|
302
341
|
"salon-stylists": SalonStylists;
|
|
342
|
+
"style-detail": StyleDetail;
|
|
303
343
|
"user-avatar": UserAvatar;
|
|
304
344
|
}
|
|
305
345
|
}
|
|
@@ -307,22 +347,23 @@ export { LocalJSX as JSX };
|
|
|
307
347
|
declare module "@stencil/core" {
|
|
308
348
|
export namespace JSX {
|
|
309
349
|
interface IntrinsicElements {
|
|
350
|
+
"chat-button": LocalJSX.ChatButton & JSXBase.HTMLAttributes<HTMLChatButtonElement>;
|
|
310
351
|
"google-map": LocalJSX.GoogleMap & JSXBase.HTMLAttributes<HTMLGoogleMapElement>;
|
|
311
352
|
"salon-booking": LocalJSX.SalonBooking & JSXBase.HTMLAttributes<HTMLSalonBookingElement>;
|
|
312
353
|
"salon-booking-modal": LocalJSX.SalonBookingModal & JSXBase.HTMLAttributes<HTMLSalonBookingModalElement>;
|
|
313
|
-
"salon-contact": LocalJSX.SalonContact & JSXBase.HTMLAttributes<HTMLSalonContactElement>;
|
|
314
354
|
"salon-gift-card": LocalJSX.SalonGiftCard & JSXBase.HTMLAttributes<HTMLSalonGiftCardElement>;
|
|
315
355
|
"salon-gift-card-modal": LocalJSX.SalonGiftCardModal & JSXBase.HTMLAttributes<HTMLSalonGiftCardModalElement>;
|
|
316
356
|
"salon-info": LocalJSX.SalonInfo & JSXBase.HTMLAttributes<HTMLSalonInfoElement>;
|
|
317
357
|
"salon-latest-reviews": LocalJSX.SalonLatestReviews & JSXBase.HTMLAttributes<HTMLSalonLatestReviewsElement>;
|
|
358
|
+
"salon-latest-styles": LocalJSX.SalonLatestStyles & JSXBase.HTMLAttributes<HTMLSalonLatestStylesElement>;
|
|
318
359
|
"salon-locations": LocalJSX.SalonLocations & JSXBase.HTMLAttributes<HTMLSalonLocationsElement>;
|
|
319
360
|
"salon-lookbook": LocalJSX.SalonLookbook & JSXBase.HTMLAttributes<HTMLSalonLookbookElement>;
|
|
320
361
|
"salon-ranking": LocalJSX.SalonRanking & JSXBase.HTMLAttributes<HTMLSalonRankingElement>;
|
|
321
362
|
"salon-reviews": LocalJSX.SalonReviews & JSXBase.HTMLAttributes<HTMLSalonReviewsElement>;
|
|
322
363
|
"salon-schedules": LocalJSX.SalonSchedules & JSXBase.HTMLAttributes<HTMLSalonSchedulesElement>;
|
|
323
364
|
"salon-services": LocalJSX.SalonServices & JSXBase.HTMLAttributes<HTMLSalonServicesElement>;
|
|
324
|
-
"salon-styles": LocalJSX.SalonStyles & JSXBase.HTMLAttributes<HTMLSalonStylesElement>;
|
|
325
365
|
"salon-stylists": LocalJSX.SalonStylists & JSXBase.HTMLAttributes<HTMLSalonStylistsElement>;
|
|
366
|
+
"style-detail": LocalJSX.StyleDetail & JSXBase.HTMLAttributes<HTMLStyleDetailElement>;
|
|
326
367
|
"user-avatar": LocalJSX.UserAvatar & JSXBase.HTMLAttributes<HTMLUserAvatarElement>;
|
|
327
368
|
}
|
|
328
369
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const Colors: {
|
|
2
|
+
TextColor: string;
|
|
3
|
+
Black: string;
|
|
4
|
+
White: string;
|
|
5
|
+
Primary: string;
|
|
6
|
+
Secondary: string;
|
|
7
|
+
Black01: string;
|
|
8
|
+
Black02: string;
|
|
9
|
+
Black03: string;
|
|
10
|
+
Gray01: string;
|
|
11
|
+
Gray02: string;
|
|
12
|
+
Gray03: string;
|
|
13
|
+
Gray04: string;
|
|
14
|
+
Gray05: string;
|
|
15
|
+
Red01: string;
|
|
16
|
+
Red02: string;
|
|
17
|
+
Red03: string;
|
|
18
|
+
Red04: string;
|
|
19
|
+
Red05: string;
|
|
20
|
+
Orange01: string;
|
|
21
|
+
Orange02: string;
|
|
22
|
+
Orange03: string;
|
|
23
|
+
Orange04: string;
|
|
24
|
+
Orange05: string;
|
|
25
|
+
Yellow01: string;
|
|
26
|
+
Yellow02: string;
|
|
27
|
+
Yellow03: string;
|
|
28
|
+
Yellow04: string;
|
|
29
|
+
Yellow05: string;
|
|
30
|
+
Lilac01: string;
|
|
31
|
+
Lilac02: string;
|
|
32
|
+
Lilac03: string;
|
|
33
|
+
Lilac04: string;
|
|
34
|
+
Lilac05: string;
|
|
35
|
+
Blue01: string;
|
|
36
|
+
Blue02: string;
|
|
37
|
+
Blue03: string;
|
|
38
|
+
Blue04: string;
|
|
39
|
+
Blue05: string;
|
|
40
|
+
Green01: string;
|
|
41
|
+
Green02: string;
|
|
42
|
+
Green03: string;
|
|
43
|
+
Green04: string;
|
|
44
|
+
Green05: string;
|
|
45
|
+
Success01: string;
|
|
46
|
+
Success02: string;
|
|
47
|
+
Success03: string;
|
|
48
|
+
Success04: string;
|
|
49
|
+
Success05: string;
|
|
50
|
+
Error01: string;
|
|
51
|
+
Error02: string;
|
|
52
|
+
Error03: string;
|
|
53
|
+
Error04: string;
|
|
54
|
+
Error05: string;
|
|
55
|
+
Warning01: string;
|
|
56
|
+
Warning02: string;
|
|
57
|
+
Warning03: string;
|
|
58
|
+
Warning04: string;
|
|
59
|
+
Warning05: string;
|
|
60
|
+
Info01: string;
|
|
61
|
+
Info02: string;
|
|
62
|
+
Info03: string;
|
|
63
|
+
Info04: string;
|
|
64
|
+
Info05: string;
|
|
65
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { ChatMessage } from '../types/chat';
|
|
3
|
+
declare class HttpService {
|
|
4
|
+
http: AxiosInstance;
|
|
5
|
+
firebaseDatabase: any;
|
|
6
|
+
firebaseApp: any;
|
|
7
|
+
constructor();
|
|
8
|
+
fetchStyleDetail(styleId: number): Promise<{
|
|
9
|
+
styleInfo: any;
|
|
10
|
+
similarStyles: any[];
|
|
11
|
+
} | {
|
|
12
|
+
styleInfo: any;
|
|
13
|
+
similarStyles: any[];
|
|
14
|
+
}>;
|
|
15
|
+
fetchSalonInfo(salonId: number): Promise<any>;
|
|
16
|
+
fetchSalonLatestStyles(salonId: number, options: any): Promise<any>;
|
|
17
|
+
decorateServiceGroups(groups: any): any;
|
|
18
|
+
fetchSalonServices(salonId: number): Promise<any>;
|
|
19
|
+
fetchSalonStylists(salonId: number, options?: {
|
|
20
|
+
page: number;
|
|
21
|
+
limit: number;
|
|
22
|
+
}): Promise<{
|
|
23
|
+
total: any;
|
|
24
|
+
data: any;
|
|
25
|
+
} | {
|
|
26
|
+
total: number;
|
|
27
|
+
data: any[];
|
|
28
|
+
}>;
|
|
29
|
+
fetchSalonReviews(salonId: number, options?: any): Promise<{
|
|
30
|
+
total: any;
|
|
31
|
+
stats: {
|
|
32
|
+
totalReviews: any;
|
|
33
|
+
reviewPoint: number;
|
|
34
|
+
'1': number;
|
|
35
|
+
'2': number;
|
|
36
|
+
'3': number;
|
|
37
|
+
'4': number;
|
|
38
|
+
'5': number;
|
|
39
|
+
};
|
|
40
|
+
data: any;
|
|
41
|
+
} | {
|
|
42
|
+
total: number;
|
|
43
|
+
stats: {};
|
|
44
|
+
data: any[];
|
|
45
|
+
}>;
|
|
46
|
+
fetchSalonCategories(): Promise<any>;
|
|
47
|
+
fetchSalonLookbooks(salonId: number, options: any): Promise<{
|
|
48
|
+
total: number;
|
|
49
|
+
allLookbooks: any[];
|
|
50
|
+
} | {
|
|
51
|
+
total: any;
|
|
52
|
+
allLookbooks: any;
|
|
53
|
+
}>;
|
|
54
|
+
fetchStyleComments(styleId: number): Promise<{
|
|
55
|
+
total: any;
|
|
56
|
+
data: any;
|
|
57
|
+
} | {
|
|
58
|
+
total: number;
|
|
59
|
+
data: any[];
|
|
60
|
+
}>;
|
|
61
|
+
createChatRoom(receiverId: any, accessToken: any): Promise<any>;
|
|
62
|
+
private fetchRooms;
|
|
63
|
+
fetchChatRooms(accessToken: string): any;
|
|
64
|
+
fetchChatMessages(roomId: any, onDone: any): Promise<{}>;
|
|
65
|
+
markMessagesAsRead(roomId: any, roomMessages: ChatMessage[]): Promise<void>;
|
|
66
|
+
sendChatMessage(options: any): Promise<{
|
|
67
|
+
uid: string;
|
|
68
|
+
message: any;
|
|
69
|
+
unRead: number;
|
|
70
|
+
senderId: any;
|
|
71
|
+
timestamp: number;
|
|
72
|
+
}>;
|
|
73
|
+
}
|
|
74
|
+
declare const _default: () => HttpService;
|
|
75
|
+
export default _default;
|
|
@@ -133,7 +133,7 @@ export interface ListenOptions {
|
|
|
133
133
|
*/
|
|
134
134
|
passive?: boolean;
|
|
135
135
|
}
|
|
136
|
-
export
|
|
136
|
+
export type ListenTargetOptions = 'body' | 'document' | 'window';
|
|
137
137
|
export interface StateDecorator {
|
|
138
138
|
(): PropertyDecorator;
|
|
139
139
|
}
|
|
@@ -214,14 +214,16 @@ export declare const State: StateDecorator;
|
|
|
214
214
|
* https://stenciljs.com/docs/reactive-data#watch-decorator
|
|
215
215
|
*/
|
|
216
216
|
export declare const Watch: WatchDecorator;
|
|
217
|
-
export
|
|
218
|
-
export
|
|
217
|
+
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
|
|
218
|
+
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
|
|
219
219
|
/**
|
|
220
220
|
* `setMode()` is used for libraries which provide multiple "modes" for styles.
|
|
221
221
|
*/
|
|
222
222
|
export declare const setMode: (handler: ResolutionHandler) => void;
|
|
223
223
|
/**
|
|
224
|
-
* getMode
|
|
224
|
+
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
|
+
* @param ref a reference to the node to get styles for
|
|
226
|
+
* @returns the current mode or undefined, if not found
|
|
225
227
|
*/
|
|
226
228
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
227
229
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -234,6 +236,9 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
234
236
|
/**
|
|
235
237
|
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
|
|
236
238
|
* if the path needs to be customized.
|
|
239
|
+
* @param path the path to use in calculating the asset path. this value will be
|
|
240
|
+
* used in conjunction with the base asset path
|
|
241
|
+
* @returns the base path
|
|
237
242
|
*/
|
|
238
243
|
export declare function getAssetPath(path: string): string;
|
|
239
244
|
/**
|
|
@@ -246,22 +251,38 @@ export declare function getAssetPath(path: string): string;
|
|
|
246
251
|
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
|
|
247
252
|
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
|
|
248
253
|
* But do note that this configuration depends on how your script is bundled, or lack of
|
|
249
|
-
*
|
|
254
|
+
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
250
255
|
* will have to ensure the static assets are copied to its build directory.
|
|
256
|
+
* @param path the asset path to set
|
|
257
|
+
* @returns the set path
|
|
251
258
|
*/
|
|
252
259
|
export declare function setAssetPath(path: string): string;
|
|
253
260
|
/**
|
|
254
|
-
*
|
|
261
|
+
* Used to specify a nonce value that corresponds with an application's
|
|
262
|
+
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
263
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
264
|
+
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
265
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
266
|
+
* @param nonce The value to be used for the nonce attribute.
|
|
267
|
+
*/
|
|
268
|
+
export declare function setNonce(nonce: string): void;
|
|
269
|
+
/**
|
|
270
|
+
* Retrieve a Stencil element for a given reference
|
|
271
|
+
* @param ref the ref to get the Stencil element for
|
|
272
|
+
* @returns a reference to the element
|
|
255
273
|
*/
|
|
256
274
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
257
275
|
/**
|
|
258
276
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
259
277
|
*
|
|
260
|
-
* Notice `forceUpdate()` is not
|
|
278
|
+
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
|
|
279
|
+
*
|
|
280
|
+
* @param ref the node/element to force the re-render of
|
|
261
281
|
*/
|
|
262
282
|
export declare function forceUpdate(ref: any): void;
|
|
263
283
|
/**
|
|
264
284
|
* getRenderingRef
|
|
285
|
+
* @returns the rendering ref
|
|
265
286
|
*/
|
|
266
287
|
export declare function getRenderingRef(): any;
|
|
267
288
|
export interface HTMLStencilElement extends HTMLElement {
|
|
@@ -272,6 +293,8 @@ export interface HTMLStencilElement extends HTMLElement {
|
|
|
272
293
|
* in the best moment to perform DOM mutation without causing layout thrashing.
|
|
273
294
|
*
|
|
274
295
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
296
|
+
*
|
|
297
|
+
* @param task the DOM-write to schedule
|
|
275
298
|
*/
|
|
276
299
|
export declare function writeTask(task: RafCallback): void;
|
|
277
300
|
/**
|
|
@@ -279,6 +302,8 @@ export declare function writeTask(task: RafCallback): void;
|
|
|
279
302
|
* in the best moment to perform DOM reads without causing layout thrashing.
|
|
280
303
|
*
|
|
281
304
|
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
|
|
305
|
+
*
|
|
306
|
+
* @param task the DOM-read to schedule
|
|
282
307
|
*/
|
|
283
308
|
export declare function readTask(task: RafCallback): void;
|
|
284
309
|
/**
|
|
@@ -417,13 +442,57 @@ interface HostAttributes {
|
|
|
417
442
|
ref?: (el: HTMLElement | null) => void;
|
|
418
443
|
[prop: string]: any;
|
|
419
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* Utilities for working with functional Stencil components. An object
|
|
447
|
+
* conforming to this interface is passed by the Stencil runtime as the third
|
|
448
|
+
* argument to a functional component, allowing component authors to work with
|
|
449
|
+
* features like children.
|
|
450
|
+
*
|
|
451
|
+
* The children of a functional component will be passed as the second
|
|
452
|
+
* argument, so a functional component which uses these utils to transform its
|
|
453
|
+
* children might look like the following:
|
|
454
|
+
*
|
|
455
|
+
* ```ts
|
|
456
|
+
* export const AddClass: FunctionalComponent = (_, children, utils) => (
|
|
457
|
+
* utils.map(children, child => ({
|
|
458
|
+
* ...child,
|
|
459
|
+
* vattrs: {
|
|
460
|
+
* ...child.vattrs,
|
|
461
|
+
* class: `${child.vattrs.class} add-class`
|
|
462
|
+
* }
|
|
463
|
+
* }))
|
|
464
|
+
* );
|
|
465
|
+
* ```
|
|
466
|
+
*
|
|
467
|
+
* For more see the Stencil documentation, here:
|
|
468
|
+
* https://stenciljs.com/docs/functional-components
|
|
469
|
+
*/
|
|
420
470
|
export interface FunctionalUtilities {
|
|
471
|
+
/**
|
|
472
|
+
* Utility for reading the children of a functional component at runtime.
|
|
473
|
+
* Since the Stencil runtime uses a different interface for children it is
|
|
474
|
+
* not recommendeded to read the children directly, and is preferable to use
|
|
475
|
+
* this utility to, for instance, perform a side effect for each child.
|
|
476
|
+
*/
|
|
421
477
|
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
|
|
478
|
+
/**
|
|
479
|
+
* Utility for transforming the children of a functional component. Given an
|
|
480
|
+
* array of children and a callback this will return a list of the results of
|
|
481
|
+
* passing each child to the supplied callback.
|
|
482
|
+
*/
|
|
422
483
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
423
484
|
}
|
|
424
485
|
export interface FunctionalComponent<T = {}> {
|
|
425
486
|
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
|
|
426
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* A Child VDOM node
|
|
490
|
+
*
|
|
491
|
+
* This has most of the same properties as {@link VNode} but friendlier names
|
|
492
|
+
* (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
|
|
493
|
+
* order to provide a friendlier public interface for users of the
|
|
494
|
+
* {@link FunctionalUtilities}).
|
|
495
|
+
*/
|
|
427
496
|
export interface ChildNode {
|
|
428
497
|
vtag?: string | number | Function;
|
|
429
498
|
vkey?: string | number;
|
|
@@ -470,6 +539,9 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
|
|
|
470
539
|
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
|
|
471
540
|
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
|
|
472
541
|
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
542
|
+
/**
|
|
543
|
+
* A virtual DOM node
|
|
544
|
+
*/
|
|
473
545
|
export interface VNode {
|
|
474
546
|
$flags$: number;
|
|
475
547
|
$tag$: string | number | Function;
|
|
@@ -666,7 +738,7 @@ export declare namespace JSXBase {
|
|
|
666
738
|
use: JSXBase.SVGAttributes;
|
|
667
739
|
view: JSXBase.SVGAttributes;
|
|
668
740
|
}
|
|
669
|
-
interface SlotAttributes {
|
|
741
|
+
interface SlotAttributes extends JSXAttributes {
|
|
670
742
|
name?: string;
|
|
671
743
|
slot?: string;
|
|
672
744
|
onSlotchange?: (event: Event) => void;
|
|
@@ -1427,9 +1499,7 @@ export declare namespace JSXBase {
|
|
|
1427
1499
|
z?: number | string;
|
|
1428
1500
|
zoomAndPan?: string;
|
|
1429
1501
|
}
|
|
1430
|
-
interface DOMAttributes<T
|
|
1431
|
-
key?: string | number;
|
|
1432
|
-
ref?: (elm?: T) => void;
|
|
1502
|
+
interface DOMAttributes<T> extends JSXAttributes<T> {
|
|
1433
1503
|
slot?: string;
|
|
1434
1504
|
part?: string;
|
|
1435
1505
|
exportparts?: string;
|
|
@@ -1550,6 +1620,10 @@ export declare namespace JSXBase {
|
|
|
1550
1620
|
onTransitionEndCapture?: (event: TransitionEvent) => void;
|
|
1551
1621
|
}
|
|
1552
1622
|
}
|
|
1623
|
+
export interface JSXAttributes<T = Element> {
|
|
1624
|
+
key?: string | number;
|
|
1625
|
+
ref?: (elm?: T) => void;
|
|
1626
|
+
}
|
|
1553
1627
|
export interface CustomElementsDefineOptions {
|
|
1554
1628
|
exclude?: string[];
|
|
1555
1629
|
resourcesUrl?: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { User } from './user';
|
|
2
|
+
export interface ChatMessage {
|
|
3
|
+
uid: string;
|
|
4
|
+
message: string;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
unRead: number;
|
|
7
|
+
senderId: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function createChatMessage(blob: any): ChatMessage;
|
|
10
|
+
export declare class ChatRoom {
|
|
11
|
+
id: number;
|
|
12
|
+
uid: string;
|
|
13
|
+
members: User[];
|
|
14
|
+
messages: ChatMessage[];
|
|
15
|
+
constructor(fields: any);
|
|
16
|
+
}
|
|
17
|
+
export declare function createChatRoom(blob: any): ChatRoom;
|