favesalon-embed 1.0.1 → 1.0.3

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.
Files changed (160) hide show
  1. package/dist/custom-elements/index.d.ts +24 -0
  2. package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-9bc404fc.js} +14 -6
  3. package/dist/{esm/_commonjsHelpers-098d5b27.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -2
  4. package/dist/{cjs/global-9073d10e.js → favesalon-embed/app-globals-437cc3f3.js} +15 -8
  5. package/dist/{esm/global-e1089ffd.js → favesalon-embed/app-globals-60769a2c.js} +16 -7
  6. package/dist/favesalon-embed/chat-box.entry.js +54 -0
  7. package/dist/favesalon-embed/chat-button.entry.js +51 -0
  8. package/dist/favesalon-embed/chat-form.entry.js +39 -0
  9. package/dist/favesalon-embed/chat-messages.entry.js +53 -0
  10. package/dist/favesalon-embed/chat-rooms.entry.js +17279 -0
  11. package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
  12. package/dist/favesalon-embed/dom-64053c71.js +73 -0
  13. package/dist/favesalon-embed/favesalon-embed.css +2433 -4
  14. package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
  15. package/dist/{collection/components/google-map/index.js → favesalon-embed/google-map.entry.js} +12 -54
  16. package/dist/{esm/index-80523fec.js → favesalon-embed/index-00b83e1c.js} +425 -15
  17. package/dist/favesalon-embed/index-04c09911.js +3371 -0
  18. package/dist/favesalon-embed/index-888e99e3.js +3371 -0
  19. package/dist/{cjs/index-7f190886.js → favesalon-embed/index-ac52896a.js} +454 -47
  20. package/dist/favesalon-embed/index.esm.js +1 -0
  21. package/dist/favesalon-embed/isObject-13b86c17.js +203 -0
  22. package/dist/favesalon-embed/relativeTime-15477f02.js +7 -0
  23. package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
  24. package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
  25. package/dist/{esm → favesalon-embed}/salon-booking.entry.js +3 -3
  26. package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
  27. package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +3 -3
  28. package/dist/favesalon-embed/salon-info.entry.js +29 -0
  29. package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +4 -4
  30. package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +14 -99
  31. package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
  32. package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +3 -3
  33. package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
  34. package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +3 -3
  35. package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
  36. package/dist/{esm → favesalon-embed}/salon-services.entry.js +3 -3
  37. package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
  38. package/dist/{custom-elements/index.js → favesalon-embed/services-55a87166.js} +2465 -7150
  39. package/dist/{cjs/services-125c82d8.js → favesalon-embed/services-7c46a2fd.js} +2465 -103
  40. package/dist/{esm/services-40a3e622.js → favesalon-embed/services-7cb8f2a6.js} +2469 -100
  41. package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
  42. package/dist/{esm → favesalon-embed}/style-detail.entry.js +4 -4
  43. package/dist/{esm → favesalon-embed}/user-avatar.entry.js +13 -4
  44. package/dist/{esm/utils-e97485e0.js → favesalon-embed/utils-2c19db45.js} +6 -0
  45. package/dist/types/components/chat-box/index.d.ts +12 -0
  46. package/dist/types/components/chat-button/index.d.ts +0 -8
  47. package/dist/types/components/chat-form/index.d.ts +6 -0
  48. package/dist/types/components/chat-messages/index.d.ts +14 -0
  49. package/dist/types/components/chat-rooms/index.d.ts +12 -0
  50. package/dist/types/components/user-avatar/index.d.ts +2 -1
  51. package/dist/types/components.d.ts +84 -1
  52. package/dist/types/utils/utils.d.ts +1 -0
  53. package/package.json +1 -1
  54. package/dist/cjs/chat-button.cjs.entry.js +0 -118
  55. package/dist/cjs/colors-38421769.js +0 -69
  56. package/dist/cjs/favesalon-embed.cjs.js +0 -24
  57. package/dist/cjs/google-map_5.cjs.entry.js +0 -310
  58. package/dist/cjs/index-47c2a5f6.js +0 -1533
  59. package/dist/cjs/index.cjs.js +0 -2
  60. package/dist/cjs/loader.cjs.js +0 -23
  61. package/dist/cjs/relativeTime-3721080d.js +0 -9
  62. package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
  63. package/dist/cjs/salon-booking.cjs.entry.js +0 -51
  64. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
  65. package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
  66. package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
  67. package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
  68. package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
  69. package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
  70. package/dist/cjs/salon-services.cjs.entry.js +0 -81
  71. package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
  72. package/dist/cjs/style-detail.cjs.entry.js +0 -312
  73. package/dist/cjs/user-avatar.cjs.entry.js +0 -45
  74. package/dist/cjs/utils-c5a33b3c.js +0 -23
  75. package/dist/collection/collection-manifest.json +0 -29
  76. package/dist/collection/components/chat-button/index.css +0 -122
  77. package/dist/collection/components/chat-button/index.js +0 -218
  78. package/dist/collection/components/chat-conversation/index.js +0 -103
  79. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  80. package/dist/collection/components/google-map/index.css +0 -5
  81. package/dist/collection/components/salon-booking/index.css +0 -30
  82. package/dist/collection/components/salon-booking/index.js +0 -126
  83. package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
  84. package/dist/collection/components/salon-gift-card/index.css +0 -30
  85. package/dist/collection/components/salon-gift-card/index.js +0 -126
  86. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
  87. package/dist/collection/components/salon-info/index.css +0 -1
  88. package/dist/collection/components/salon-info/index.js +0 -77
  89. package/dist/collection/components/salon-latest-reviews/index.css +0 -11
  90. package/dist/collection/components/salon-latest-reviews/index.js +0 -163
  91. package/dist/collection/components/salon-latest-styles/index.css +0 -12
  92. package/dist/collection/components/salon-locations/index.css +0 -24
  93. package/dist/collection/components/salon-lookbook/index.css +0 -15
  94. package/dist/collection/components/salon-lookbook/index.js +0 -368
  95. package/dist/collection/components/salon-ranking/index.css +0 -3
  96. package/dist/collection/components/salon-ranking/index.js +0 -117
  97. package/dist/collection/components/salon-reviews/index.css +0 -18
  98. package/dist/collection/components/salon-reviews/index.js +0 -249
  99. package/dist/collection/components/salon-schedules/index.css +0 -18
  100. package/dist/collection/components/salon-services/index.css +0 -1
  101. package/dist/collection/components/salon-services/index.js +0 -146
  102. package/dist/collection/components/salon-stylists/index.css +0 -43
  103. package/dist/collection/components/salon-stylists/index.js +0 -184
  104. package/dist/collection/components/style-detail/index.css +0 -76
  105. package/dist/collection/components/style-detail/index.js +0 -386
  106. package/dist/collection/components/user-avatar/index.css +0 -0
  107. package/dist/collection/components/user-avatar/index.js +0 -134
  108. package/dist/collection/constants/colors.js +0 -65
  109. package/dist/collection/global/global.js +0 -8
  110. package/dist/collection/index.js +0 -1
  111. package/dist/collection/mocks/users.js +0 -10
  112. package/dist/collection/services/services.js +0 -295
  113. package/dist/collection/types/chat.js +0 -23
  114. package/dist/collection/types/common.js +0 -11
  115. package/dist/collection/types/review.js +0 -39
  116. package/dist/collection/types/salon.js +0 -58
  117. package/dist/collection/types/service.js +0 -24
  118. package/dist/collection/types/style.js +0 -128
  119. package/dist/collection/types/stylist.js +0 -30
  120. package/dist/collection/types/user.js +0 -10
  121. package/dist/collection/utils/utils.js +0 -20
  122. package/dist/esm/chat-button.entry.js +0 -114
  123. package/dist/esm/favesalon-embed.js +0 -19
  124. package/dist/esm/google-map_5.entry.js +0 -302
  125. package/dist/esm/index-3fae868e.js +0 -1506
  126. package/dist/esm/index.js +0 -1
  127. package/dist/esm/loader.js +0 -19
  128. package/dist/esm/polyfills/core-js.js +0 -11
  129. package/dist/esm/polyfills/css-shim.js +0 -1
  130. package/dist/esm/polyfills/dom.js +0 -79
  131. package/dist/esm/polyfills/es5-html-element.js +0 -1
  132. package/dist/esm/polyfills/index.js +0 -34
  133. package/dist/esm/polyfills/system.js +0 -6
  134. package/dist/esm/relativeTime-cd452e6d.js +0 -7
  135. package/dist/favesalon-embed/p-019c5ccd.entry.js +0 -1
  136. package/dist/favesalon-embed/p-083a8821.entry.js +0 -1
  137. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +0 -1
  138. package/dist/favesalon-embed/p-119db8de.entry.js +0 -1
  139. package/dist/favesalon-embed/p-1432c51b.entry.js +0 -1
  140. package/dist/favesalon-embed/p-22093506.entry.js +0 -1
  141. package/dist/favesalon-embed/p-32b314e9.js +0 -2
  142. package/dist/favesalon-embed/p-47e646f8.js +0 -1
  143. package/dist/favesalon-embed/p-4a5eca9a.js +0 -6
  144. package/dist/favesalon-embed/p-58d2e9be.js +0 -1
  145. package/dist/favesalon-embed/p-71404b6a.entry.js +0 -1
  146. package/dist/favesalon-embed/p-857c3a61.entry.js +0 -1
  147. package/dist/favesalon-embed/p-99ec77f7.entry.js +0 -1
  148. package/dist/favesalon-embed/p-a33331cc.js +0 -1
  149. package/dist/favesalon-embed/p-b0c3673a.entry.js +0 -1
  150. package/dist/favesalon-embed/p-b287b1ea.entry.js +0 -1
  151. package/dist/favesalon-embed/p-b3af7842.entry.js +0 -1
  152. package/dist/favesalon-embed/p-b630ae68.js +0 -1580
  153. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +0 -1
  154. package/dist/favesalon-embed/p-d6083940.js +0 -1
  155. package/dist/favesalon-embed/p-d9b7ad58.entry.js +0 -1
  156. package/dist/favesalon-embed/p-fc9a5551.js +0 -6
  157. package/dist/index.cjs.js +0 -1
  158. package/dist/index.js +0 -1
  159. package/dist/types/components/chat-conversation/index.d.ts +0 -0
  160. /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
@@ -1,310 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-47c2a5f6.js');
6
- const colors = require('./colors-38421769.js');
7
- const services = require('./services-125c82d8.js');
8
- const utils = require('./utils-c5a33b3c.js');
9
- require('./_commonjsHelpers-5cfcba41.js');
10
-
11
- const indexCss$4 = "google-map{display:block;width:100%;height:100%}";
12
-
13
- const GoogleMap = class {
14
- constructor(hostRef) {
15
- index.registerInstance(this, hostRef);
16
- this.locationName = undefined;
17
- this.locationAddress = undefined;
18
- }
19
- render() {
20
- const mapPlaceholder = index.getAssetPath('./assets/map--placeholder.jpeg');
21
- return (index.h("div", { style: {
22
- backgroundImage: `url("${mapPlaceholder}")`,
23
- backgroundColor: colors.Colors.Gray01,
24
- backgroundPosition: 'center center',
25
- backgroundRepeat: 'no-repeat',
26
- backgroundSize: 'cover',
27
- borderRadius: '8px',
28
- position: 'relative',
29
- height: '296px',
30
- } }, index.h("div", { style: {
31
- position: 'absolute',
32
- left: '50%',
33
- top: '50%',
34
- transform: 'translate(-50%, -50%)',
35
- } }, index.h("a", { target: "_blank", rel: "noopener noreferrer", href: `https://www.google.com/maps/search/?api=1&query=${this.locationAddress}`, style: {
36
- backgroundColor: colors.Colors.Red01,
37
- border: `1px solid ${colors.Colors.Red02}`,
38
- borderRadius: '4px',
39
- color: colors.Colors.TextColor,
40
- padding: '12px',
41
- display: 'flex',
42
- flexWrap: 'wrap',
43
- height: 'auto',
44
- width: 'auto',
45
- whiteSpace: 'normal',
46
- textAlign: 'left',
47
- maxWidth: '320px',
48
- textDecoration: 'none',
49
- } }, this.locationName && index.h("span", { style: { fontSize: '16px', marginBottom: '4px' } }, this.locationName), this.locationAddress && index.h("span", { style: { fontSize: '12px' } }, this.locationAddress)), index.h("div", { style: { marginTop: '8px', textAlign: 'center' } }, index.h("i", { class: "ri-map-pin-fill", style: { fontSize: '24px' } })))));
50
- }
51
- static get assetsDirs() { return ["assets"]; }
52
- };
53
- GoogleMap.style = indexCss$4;
54
-
55
- const indexCss$3 = "";
56
-
57
- const SalonInfo = class {
58
- constructor(hostRef) {
59
- index.registerInstance(this, hostRef);
60
- this.salonId = undefined;
61
- this.salonInfo = undefined;
62
- }
63
- componentWillLoad() {
64
- this.fetchData();
65
- }
66
- async fetchData() {
67
- try {
68
- this.salonInfo = await services.HttpService().fetchSalonInfo(this.salonId);
69
- }
70
- catch (e) { }
71
- }
72
- render() {
73
- return (index.h("div", { class: "salon-info" }, index.h("div", { class: "container" }, index.h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } }, index.h("salon-schedules", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), index.h("div", { class: "row" }, index.h("div", { class: "col-md-5", style: { marginBottom: '24px' } }, index.h("salon-locations", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), index.h("div", { class: "col-md-7", style: { marginBottom: '24px' } }, index.h("salon-latest-styles", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))))));
74
- }
75
- };
76
- SalonInfo.style = indexCss$3;
77
-
78
- const indexCss$2 = "salon-latest-styles .view--salon-styles--item{width:120px;height:120px}@media (min-width: 1024px){salon-latest-styles .view--salon-styles--item{width:200px;height:200px}}";
79
-
80
- const SalonLatestStyles = class {
81
- constructor(hostRef) {
82
- index.registerInstance(this, hostRef);
83
- this.salonId = undefined;
84
- this.isLoading = undefined;
85
- this.withBorder = undefined;
86
- this.isLoadingState = undefined;
87
- this.latestStyles = undefined;
88
- }
89
- componentDidLoad() {
90
- this.fetchData();
91
- }
92
- async fetchData() {
93
- this.isLoadingState = true;
94
- try {
95
- const promises = [
96
- services.HttpService().fetchSalonLatestStyles(this.salonId, { limit: 6 })
97
- .then(salonStyles => this.latestStyles = salonStyles),
98
- ];
99
- return Promise.all(promises)
100
- .then(() => this.isLoadingState = false)
101
- .catch(() => this.isLoadingState = false);
102
- }
103
- catch (e) { }
104
- }
105
- onClickLookbook(style) {
106
- const elLookbookModal = document.createElement('div');
107
- elLookbookModal.innerHTML = `
108
- <style-detail
109
- salon-id=${this.salonId}
110
- salon-lookbook='${JSON.stringify(style)}'
111
- ></style-detail>
112
- `;
113
- document.body.appendChild(elLookbookModal);
114
- }
115
- render() {
116
- if (this.isLoading || this.isLoadingState) {
117
- return (index.h("div", { class: "view view--salon-styles" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: {
118
- backgroundColor: colors.Colors.Gray02,
119
- height: '20px',
120
- width: '120px',
121
- } }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
122
- overflow: 'hidden',
123
- marginLeft: '-16px',
124
- marginBottom: '-16px',
125
- } }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((fakeId, idx) => (index.h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
126
- float: 'left',
127
- paddingLeft: '16px',
128
- marginBottom: '16px',
129
- } }, index.h("div", { style: {
130
- backgroundColor: colors.Colors.Gray01,
131
- borderRadius: '8px',
132
- width: '120px',
133
- height: '120px',
134
- overflow: 'hidden',
135
- position: 'relative',
136
- cursor: 'pointer',
137
- } })))))))));
138
- }
139
- return (index.h("div", { class: "view view--salon-styles" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Photos"), index.h("div", { style: {
140
- overflow: 'hidden',
141
- marginLeft: '-16px',
142
- marginBottom: '-16px',
143
- marginTop: '16px',
144
- } }, (this.latestStyles || []).map((faveStyle, idx) => {
145
- const { imageThumb, albumMedias } = faveStyle;
146
- const firstMedia = albumMedias.length > 0 ? albumMedias[0] : null;
147
- const isVideo = firstMedia ? services.isVideoMedia(firstMedia) : false;
148
- return (index.h("div", { key: `style-listing--item-${faveStyle.id}-${idx}`, style: {
149
- float: 'left',
150
- paddingLeft: '16px',
151
- marginBottom: '16px',
152
- } }, index.h("div", { class: "view--salon-styles--item", style: Object.assign({ backgroundColor: colors.Colors.Gray01, borderRadius: '8px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, !isVideo && firstMedia ? {
153
- backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
154
- backgroundRepeat: 'no-repeat',
155
- backgroundPosition: 'center center',
156
- backgroundSize: 'cover',
157
- } : {}), onClick: () => this.onClickLookbook(faveStyle) }, isVideo && firstMedia && (index.h("div", null, index.h("video", { muted: true, width: "100%", height: "100%", poster: imageThumb }, index.h("source", { src: firstMedia.mediaUrl, type: "video/mp4" })), index.h("i", { class: "ri-play-circle-fill", style: {
158
- fontSize: '48px',
159
- color: colors.Colors.TextColor,
160
- position: 'absolute',
161
- left: '50%',
162
- top: '50%',
163
- transform: 'translate(-50%, -50%)',
164
- } }))))));
165
- })))));
166
- }
167
- };
168
- SalonLatestStyles.style = indexCss$2;
169
-
170
- const indexCss$1 = "@media (min-width: 768px){salon-locations .salon-contact--links{overflow:hidden;margin-left:-32px}salon-locations .salon-contact--links-item{float:left;display:flex;flex-direction:row;align-items:center;font-size:16px;min-width:300px;padding-left:32px}salon-locations .salon-contact--links-item:nth-child(2n+1){clear:left}salon-locations .salon-contact--links-item+.salon-contact--links-item{margin-top:8px}}";
171
-
172
- const SalonLocations = class {
173
- constructor(hostRef) {
174
- index.registerInstance(this, hostRef);
175
- this.salonId = undefined;
176
- this.salonInfo = undefined;
177
- this.isLoading = undefined;
178
- this.withBorder = undefined;
179
- this.salonInfoState = undefined;
180
- }
181
- componentWillLoad() {
182
- if (this.salonInfo) {
183
- this.salonInfoState = JSON.parse(this.salonInfo);
184
- }
185
- else {
186
- this.fetchData();
187
- }
188
- }
189
- fetchData() {
190
- try {
191
- services.HttpService().fetchSalonInfo(this.salonId)
192
- .then(salonInfo => this.salonInfoState = salonInfo);
193
- }
194
- catch (e) { }
195
- }
196
- render() {
197
- if (this.isLoading) {
198
- return (index.h("div", { class: "view view--salon-locations" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: {
199
- backgroundColor: colors.Colors.Gray02,
200
- height: '20px',
201
- width: '120px',
202
- } }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
203
- backgroundColor: colors.Colors.Gray01,
204
- height: '16px',
205
- width: '50%',
206
- } }), index.h("div", { style: {
207
- backgroundColor: colors.Colors.Gray01,
208
- height: '16px',
209
- width: '50%',
210
- marginTop: '8px',
211
- } }), index.h("div", { style: {
212
- backgroundColor: colors.Colors.Gray01,
213
- height: '192px',
214
- width: '100%',
215
- marginTop: '24px',
216
- } })))));
217
- }
218
- const { businessPhone, businessName, website, email, } = this.salonInfoState || {};
219
- const websiteUrl = utils.formatWebsiteUrl(website);
220
- const fullAddress = utils.formatFullAddress(this.salonInfoState);
221
- return (index.h("div", { class: "view view--salon-locations" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Contact"), index.h("div", { class: "salon-contact--links", style: { marginTop: '16px' } }, businessPhone && (index.h("div", { class: "salon-contact--links-item" }, index.h("i", { class: "ri-phone-line", style: { color: colors.Colors.Gray04, fontSize: '18px', marginRight: '6px' } }), " ", index.h("a", { href: `tel:${businessPhone}`, style: { color: colors.Colors.TextColor, textDecoration: 'none' } }, businessPhone))), websiteUrl && (index.h("div", { class: "salon-contact--links-item" }, index.h("i", { class: "ri-links-line", style: { color: colors.Colors.Gray04, fontSize: '18px', marginRight: '6px' } }), " ", index.h("a", { target: websiteUrl && websiteUrl.indexOf(window.location.hostname) === -1 ? '_blank' : undefined, href: websiteUrl, style: { color: colors.Colors.TextColor, textDecoration: 'none' } }, websiteUrl))), email && (index.h("div", { class: "salon-contact--links-item" }, index.h("i", { class: "ri-mail-line", style: { color: colors.Colors.Gray04, fontSize: '18px', marginRight: '6px' } }), " ", index.h("a", { href: `mailto:${email}`, style: { color: colors.Colors.TextColor, textDecoration: 'none' } }, email)))), index.h("div", { class: "view--salon-info--map", style: { marginTop: '24px' } }, index.h("google-map", { "location-name": businessName, "location-address": fullAddress })))));
222
- }
223
- };
224
- SalonLocations.style = indexCss$1;
225
-
226
- const indexCss = "salon-schedules .salon-schedules--day{display:flex;flex-direction:row;min-width:240px}@media (min-width: 768px){salon-schedules .salon-schedules--dates{overflow:hidden;margin-left:-32px}salon-schedules .salon-schedules--day{float:left;padding-left:32px}}";
227
-
228
- const SalonSchedules = class {
229
- constructor(hostRef) {
230
- index.registerInstance(this, hostRef);
231
- this.salonId = undefined;
232
- this.salonInfo = undefined;
233
- this.isLoading = undefined;
234
- this.withBorder = undefined;
235
- this.salonInfoState = undefined;
236
- }
237
- componentWillLoad() {
238
- if (this.salonInfo) {
239
- this.salonInfoState = JSON.parse(this.salonInfo);
240
- }
241
- else {
242
- this.fetchData();
243
- }
244
- }
245
- fetchData() {
246
- try {
247
- services.HttpService().fetchSalonInfo(this.salonId)
248
- .then(salonInfo => this.salonInfoState = salonInfo);
249
- }
250
- catch (e) { }
251
- }
252
- renderBusinessHour(businessHour) {
253
- if (businessHour.status === services.BusinessHourStatus.ByAppointment) {
254
- return 'By Appointment';
255
- }
256
- if (businessHour.status === services.BusinessHourStatus.Close) {
257
- return 'Close';
258
- }
259
- return `${businessHour.openTime} - ${businessHour.closeTime}`;
260
- }
261
- render() {
262
- if (this.isLoading) {
263
- return (index.h("div", { class: "view view--salon-contact" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: {
264
- backgroundColor: colors.Colors.Gray02,
265
- height: '20px',
266
- width: '120px',
267
- } }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
268
- backgroundColor: colors.Colors.Gray01,
269
- height: '16px',
270
- width: '30%',
271
- } }), index.h("div", { style: {
272
- backgroundColor: colors.Colors.Gray01,
273
- height: '16px',
274
- width: '40%',
275
- marginTop: '8px',
276
- } }), index.h("div", { style: {
277
- backgroundColor: colors.Colors.Gray01,
278
- height: '16px',
279
- width: '75%',
280
- marginTop: '12px',
281
- } }), index.h("div", { style: {
282
- backgroundColor: colors.Colors.Gray01,
283
- height: '16px',
284
- width: '75%',
285
- marginTop: '8px',
286
- } })), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
287
- overflow: 'hidden',
288
- marginLeft: '-16px',
289
- marginBottom: '-16px',
290
- } }, [1, 2, 3, 4, 5, 6, 7].map((fakeId, idx) => (index.h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
291
- float: 'left',
292
- paddingLeft: '16px',
293
- marginBottom: '16px',
294
- } }, index.h("div", { style: {
295
- backgroundColor: colors.Colors.Gray01,
296
- width: '120px',
297
- height: '20px',
298
- } })))))))));
299
- }
300
- const { about, businessHours, } = (this.salonInfoState || {});
301
- return (index.h("div", { class: "view view--salon-contact" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "About"), about && (index.h("div", { class: "salon-contact--info--desc", style: { fontSize: '16px', marginTop: '16px' }, innerHTML: about })), businessHours && businessHours.length > 0 && (index.h("div", { class: "salon-schedules", style: { marginTop: '24px' } }, index.h("div", { class: "salon-schedules--title", style: { fontSize: '16px', fontWeight: 'bold' } }, "Working hours"), index.h("div", { class: "salon-schedules--dates" }, index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Mon"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[0]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Tue"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[1]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Wed"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[2]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Thur"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[3]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Fri"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[4]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Sat"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[5]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Sun"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[6])))))))));
302
- }
303
- };
304
- SalonSchedules.style = indexCss;
305
-
306
- exports.google_map = GoogleMap;
307
- exports.salon_info = SalonInfo;
308
- exports.salon_latest_styles = SalonLatestStyles;
309
- exports.salon_locations = SalonLocations;
310
- exports.salon_schedules = SalonSchedules;