favesalon-embed 0.0.2 → 0.1.0
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/colors-38421769.js +69 -0
- package/dist/cjs/favesalon-embed.cjs.js +20 -0
- package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
- package/dist/cjs/google-map_5.cjs.entry.js +291 -0
- package/dist/cjs/index-7f190886.js +4396 -0
- package/{cjs/index-7d179a70.js → dist/cjs/index-e6bea8f5.js} +87 -3
- package/{cjs → dist/cjs}/index.cjs.js +0 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +29 -0
- package/dist/cjs/salon-booking.cjs.entry.js +50 -0
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +28 -0
- package/dist/cjs/salon-gift-card.cjs.entry.js +50 -0
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +95 -0
- package/dist/cjs/salon-lookbook.cjs.entry.js +218 -0
- package/{cjs → dist/cjs}/salon-ranking.cjs.entry.js +7 -7
- package/dist/cjs/salon-reviews.cjs.entry.js +186 -0
- package/dist/cjs/salon-services.cjs.entry.js +78 -0
- package/dist/cjs/salon-stylists.cjs.entry.js +112 -0
- package/{cjs/services-d6f8214c.js → dist/cjs/services-eee8f251.js} +317 -361
- package/dist/cjs/style-detail.cjs.entry.js +310 -0
- package/{cjs → dist/cjs}/user-avatar.cjs.entry.js +4 -4
- package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
- package/{collection → dist/collection}/collection-manifest.json +2 -2
- 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 +86 -0
- package/{collection → dist/collection}/components/salon-booking/index.css +10 -24
- package/{collection → dist/collection}/components/salon-booking/index.js +29 -11
- package/{collection → dist/collection}/components/salon-booking/salon-booking-modal.js +12 -6
- package/dist/collection/components/salon-gift-card/index.css +25 -0
- package/{collection → dist/collection}/components/salon-gift-card/index.js +44 -6
- package/{collection → dist/collection}/components/salon-gift-card/salon-gift-card-modal.js +30 -4
- package/{collection/components/salon-locations → dist/collection/components/salon-info}/index.css +0 -0
- package/{collection → dist/collection}/components/salon-info/index.js +6 -32
- package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -3
- package/dist/collection/components/salon-latest-reviews/index.js +176 -0
- package/dist/collection/components/salon-latest-styles/index.css +10 -0
- package/dist/collection/components/salon-latest-styles/index.js +178 -0
- package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +6 -6
- package/dist/collection/components/salon-locations/index.js +151 -0
- package/dist/collection/components/salon-lookbook/index.css +12 -0
- package/{collection → dist/collection}/components/salon-lookbook/index.js +122 -49
- package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
- package/{collection → dist/collection}/components/salon-ranking/index.js +5 -5
- package/dist/collection/components/salon-reviews/index.css +15 -0
- package/dist/collection/components/salon-reviews/index.js +286 -0
- package/dist/collection/components/salon-schedules/index.css +15 -0
- package/dist/collection/components/salon-schedules/index.js +189 -0
- package/{collection/components/salon-reviews → dist/collection/components/salon-services}/index.css +0 -0
- package/dist/collection/components/salon-services/index.js +156 -0
- package/{collection → dist/collection}/components/salon-stylists/index.css +0 -8
- package/dist/collection/components/salon-stylists/index.js +183 -0
- package/dist/collection/components/style-detail/index.css +62 -0
- package/dist/collection/components/style-detail/index.js +461 -0
- package/{collection/components/salon-services → dist/collection/components/user-avatar}/index.css +0 -0
- package/{collection → dist/collection}/components/user-avatar/index.js +2 -2
- package/dist/collection/constants/colors.js +65 -0
- package/{collection → dist/collection}/global/global.js +0 -0
- package/{collection → dist/collection}/index.js +0 -0
- package/dist/collection/services/services.js +174 -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/{collection → dist/collection}/types/service.js +0 -0
- package/dist/collection/types/style.js +128 -0
- package/dist/collection/types/stylist.js +30 -0
- package/{collection/components/user-avatar/index.css → dist/collection/types/tmp.js} +0 -0
- package/{collection → dist/collection}/types/user.js +2 -2
- package/{collection → dist/collection}/utils/utils.js +0 -0
- package/{custom-elements → dist/custom-elements}/index.d.ts +12 -12
- package/{custom-elements → dist/custom-elements}/index.js +5783 -870
- package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
- package/dist/esm/colors-ea36347a.js +67 -0
- package/dist/esm/favesalon-embed.js +18 -0
- package/{esm → dist/esm}/global-e1089ffd.js +0 -0
- package/dist/esm/google-map_5.entry.js +283 -0
- package/{esm/index-2160b80b.js → dist/esm/index-6af0a03d.js} +87 -4
- package/dist/esm/index-80523fec.js +4393 -0
- package/{esm → dist/esm}/index.js +0 -0
- package/dist/esm/loader.js +18 -0
- package/{esm → dist/esm}/polyfills/core-js.js +0 -0
- package/{esm → dist/esm}/polyfills/css-shim.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/dist/esm/salon-booking-modal.entry.js +25 -0
- package/dist/esm/salon-booking.entry.js +46 -0
- package/dist/esm/salon-gift-card-modal.entry.js +24 -0
- package/dist/esm/salon-gift-card.entry.js +46 -0
- package/dist/esm/salon-latest-reviews.entry.js +91 -0
- package/dist/esm/salon-lookbook.entry.js +214 -0
- package/{esm → dist/esm}/salon-ranking.entry.js +7 -7
- package/dist/esm/salon-reviews.entry.js +182 -0
- package/dist/esm/salon-services.entry.js +74 -0
- package/dist/esm/salon-stylists.entry.js +108 -0
- package/{esm/services-57fadd0a.js → dist/esm/services-295247b1.js} +310 -355
- package/dist/esm/style-detail.entry.js +306 -0
- package/{esm → dist/esm}/user-avatar.entry.js +4 -4
- package/{esm → dist/esm}/utils-e97485e0.js +0 -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/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
- package/dist/favesalon-embed/p-292b97ba.entry.js +1 -0
- package/{favesalon-embed → dist/favesalon-embed}/p-47e646f8.js +0 -0
- package/dist/favesalon-embed/p-4869dfed.entry.js +1 -0
- package/{favesalon-embed → dist/favesalon-embed}/p-4a5eca9a.js +0 -0
- package/dist/favesalon-embed/p-4aee4fd9.entry.js +1 -0
- package/dist/favesalon-embed/p-5528c705.entry.js +1 -0
- package/dist/favesalon-embed/p-612ad685.entry.js +1 -0
- package/dist/favesalon-embed/p-75aef7e0.entry.js +1 -0
- package/dist/favesalon-embed/p-8c780874.entry.js +1 -0
- package/dist/favesalon-embed/p-8dbf04c5.js +1 -0
- package/dist/favesalon-embed/p-9f31061a.entry.js +1 -0
- package/dist/favesalon-embed/p-a33331cc.js +1 -0
- package/dist/favesalon-embed/p-a60d78e9.entry.js +1 -0
- package/dist/favesalon-embed/p-a6debdae.entry.js +1 -0
- package/dist/favesalon-embed/p-bad1e9a7.entry.js +1 -0
- package/dist/favesalon-embed/p-c2ecb365.js +1 -0
- package/dist/favesalon-embed/p-c7dea70c.entry.js +1 -0
- package/dist/favesalon-embed/p-d6083940.js +1 -0
- package/dist/favesalon-embed/p-f0e14641.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +6 -0
- package/{index.cjs.js → dist/index.cjs.js} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/dist/types/components/google-map/index.d.ts +5 -0
- package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
- 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/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
- 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 +2 -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/user-avatar/index.d.ts +0 -0
- package/{types → dist/types}/components.d.ts +62 -41
- package/dist/types/constants/colors.d.ts +65 -0
- package/{types → dist/types}/index.d.ts +0 -0
- package/dist/types/services/services.d.ts +60 -0
- package/{types → dist/types}/stencil-public-runtime.d.ts +0 -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/{types → dist/types}/types/service.d.ts +0 -0
- package/dist/types/types/style.d.ts +88 -0
- package/{types → dist/types}/types/stylist.d.ts +2 -1
- package/dist/types/types/tmp.d.ts +0 -0
- package/{types → dist/types}/types/user.d.ts +2 -2
- package/{types → dist/types}/utils/utils.d.ts +0 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +18 -13
- package/readme.md +23 -2
- package/cjs/colors-7f354880.js +0 -95
- package/cjs/favesalon-embed.cjs.js +0 -20
- package/cjs/google-map.cjs.entry.js +0 -47
- package/cjs/loader.cjs.js +0 -22
- package/cjs/salon-booking-modal.cjs.entry.js +0 -23
- package/cjs/salon-booking_2.cjs.entry.js +0 -56
- package/cjs/salon-contact_4.cjs.entry.js +0 -154
- package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
- package/cjs/salon-info.cjs.entry.js +0 -34
- package/cjs/salon-latest-reviews.cjs.entry.js +0 -57
- package/cjs/salon-lookbook.cjs.entry.js +0 -187
- package/cjs/salon-reviews.cjs.entry.js +0 -196
- package/cjs/salon-services.cjs.entry.js +0 -40
- package/cjs/salon-stylists.cjs.entry.js +0 -53
- package/collection/components/google-map/index.js +0 -97
- package/collection/components/salon-contact/index.js +0 -88
- package/collection/components/salon-gift-card/index.css +0 -25
- package/collection/components/salon-info/index.css +0 -3
- 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-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.js +0 -86
- 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/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/esm/colors-1ec90c5f.js +0 -93
- package/esm/favesalon-embed.js +0 -18
- package/esm/google-map.entry.js +0 -43
- package/esm/loader.js +0 -18
- package/esm/salon-booking-modal.entry.js +0 -19
- package/esm/salon-booking_2.entry.js +0 -51
- package/esm/salon-contact_4.entry.js +0 -147
- package/esm/salon-gift-card-modal.entry.js +0 -16
- package/esm/salon-info.entry.js +0 -30
- package/esm/salon-latest-reviews.entry.js +0 -53
- package/esm/salon-lookbook.entry.js +0 -183
- package/esm/salon-reviews.entry.js +0 -192
- package/esm/salon-services.entry.js +0 -36
- package/esm/salon-stylists.entry.js +0 -49
- package/favesalon-embed/favesalon-embed.esm.js +0 -1
- package/favesalon-embed/p-14a46adf.entry.js +0 -1
- package/favesalon-embed/p-2da2ed75.js +0 -1
- package/favesalon-embed/p-3712d9ab.entry.js +0 -1
- package/favesalon-embed/p-38066f9f.entry.js +0 -1
- package/favesalon-embed/p-4e2d7b29.js +0 -1
- package/favesalon-embed/p-520c8ffb.entry.js +0 -1
- package/favesalon-embed/p-54a1c294.entry.js +0 -1
- package/favesalon-embed/p-762520f2.js +0 -1
- package/favesalon-embed/p-94a0991e.entry.js +0 -1
- package/favesalon-embed/p-94b179eb.entry.js +0 -1
- package/favesalon-embed/p-977bd8bc.entry.js +0 -1
- package/favesalon-embed/p-bc363938.entry.js +0 -1
- package/favesalon-embed/p-bf9c83a3.entry.js +0 -1
- package/favesalon-embed/p-c5ebd3c9.entry.js +0 -1
- package/favesalon-embed/p-d84b61b0.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
|
@@ -46,6 +46,7 @@ const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
|
46
46
|
})()
|
|
47
47
|
;
|
|
48
48
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
49
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
49
50
|
const createTime = (fnName, tagName = '') => {
|
|
50
51
|
{
|
|
51
52
|
return () => {
|
|
@@ -144,6 +145,7 @@ const isComplexType = (o) => {
|
|
|
144
145
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
145
146
|
const h = (nodeName, vnodeData, ...children) => {
|
|
146
147
|
let child = null;
|
|
148
|
+
let key = null;
|
|
147
149
|
let simple = false;
|
|
148
150
|
let lastSimple = false;
|
|
149
151
|
let vNodeChildren = [];
|
|
@@ -171,6 +173,10 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
171
173
|
};
|
|
172
174
|
walk(children);
|
|
173
175
|
if (vnodeData) {
|
|
176
|
+
// normalize class / classname attributes
|
|
177
|
+
if (vnodeData.key) {
|
|
178
|
+
key = vnodeData.key;
|
|
179
|
+
}
|
|
174
180
|
{
|
|
175
181
|
const classData = vnodeData.className || vnodeData.class;
|
|
176
182
|
if (classData) {
|
|
@@ -188,6 +194,9 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
188
194
|
if (vNodeChildren.length > 0) {
|
|
189
195
|
vnode.$children$ = vNodeChildren;
|
|
190
196
|
}
|
|
197
|
+
{
|
|
198
|
+
vnode.$key$ = key;
|
|
199
|
+
}
|
|
191
200
|
return vnode;
|
|
192
201
|
};
|
|
193
202
|
const newVNode = (tag, text) => {
|
|
@@ -201,6 +210,9 @@ const newVNode = (tag, text) => {
|
|
|
201
210
|
{
|
|
202
211
|
vnode.$attrs$ = null;
|
|
203
212
|
}
|
|
213
|
+
{
|
|
214
|
+
vnode.$key$ = null;
|
|
215
|
+
}
|
|
204
216
|
return vnode;
|
|
205
217
|
};
|
|
206
218
|
const Host = {};
|
|
@@ -249,6 +261,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
249
261
|
}
|
|
250
262
|
}
|
|
251
263
|
}
|
|
264
|
+
else if (memberName === 'key')
|
|
265
|
+
;
|
|
266
|
+
else if (memberName === 'ref') {
|
|
267
|
+
// minifier will clean this up
|
|
268
|
+
if (newValue) {
|
|
269
|
+
newValue(elm);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
252
272
|
else if ((!isProp ) &&
|
|
253
273
|
memberName[0] === 'o' &&
|
|
254
274
|
memberName[1] === 'n') {
|
|
@@ -310,16 +330,36 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
310
330
|
}
|
|
311
331
|
catch (e) { }
|
|
312
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* Need to manually update attribute if:
|
|
335
|
+
* - memberName is not an attribute
|
|
336
|
+
* - if we are rendering the host element in order to reflect attribute
|
|
337
|
+
* - if it's a SVG, since properties might not work in <svg>
|
|
338
|
+
* - if the newValue is null/undefined or 'false'.
|
|
339
|
+
*/
|
|
340
|
+
let xlink = false;
|
|
341
|
+
{
|
|
342
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
|
|
343
|
+
memberName = ln;
|
|
344
|
+
xlink = true;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
313
347
|
if (newValue == null || newValue === false) {
|
|
314
348
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
315
|
-
{
|
|
349
|
+
if (xlink) {
|
|
350
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
316
353
|
elm.removeAttribute(memberName);
|
|
317
354
|
}
|
|
318
355
|
}
|
|
319
356
|
}
|
|
320
357
|
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
321
358
|
newValue = newValue === true ? '' : newValue;
|
|
322
|
-
{
|
|
359
|
+
if (xlink) {
|
|
360
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
323
363
|
elm.setAttribute(memberName, newValue);
|
|
324
364
|
}
|
|
325
365
|
}
|
|
@@ -415,6 +455,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
415
455
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
416
456
|
if ((vnode = vnodes[startIdx])) {
|
|
417
457
|
elm = vnode.$elm$;
|
|
458
|
+
callNodeRefs(vnode);
|
|
418
459
|
// remove the vnode's element from the dom
|
|
419
460
|
elm.remove();
|
|
420
461
|
}
|
|
@@ -423,6 +464,8 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
423
464
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
424
465
|
let oldStartIdx = 0;
|
|
425
466
|
let newStartIdx = 0;
|
|
467
|
+
let idxInOld = 0;
|
|
468
|
+
let i = 0;
|
|
426
469
|
let oldEndIdx = oldCh.length - 1;
|
|
427
470
|
let oldStartVnode = oldCh[0];
|
|
428
471
|
let oldEndVnode = oldCh[oldEndIdx];
|
|
@@ -430,6 +473,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
430
473
|
let newStartVnode = newCh[0];
|
|
431
474
|
let newEndVnode = newCh[newEndIdx];
|
|
432
475
|
let node;
|
|
476
|
+
let elmToMove;
|
|
433
477
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
434
478
|
if (oldStartVnode == null) {
|
|
435
479
|
// Vnode might have been moved left
|
|
@@ -467,7 +511,29 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
467
511
|
newStartVnode = newCh[++newStartIdx];
|
|
468
512
|
}
|
|
469
513
|
else {
|
|
514
|
+
// createKeyToOldIdx
|
|
515
|
+
idxInOld = -1;
|
|
470
516
|
{
|
|
517
|
+
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
518
|
+
if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
|
|
519
|
+
idxInOld = i;
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
if (idxInOld >= 0) {
|
|
525
|
+
elmToMove = oldCh[idxInOld];
|
|
526
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
527
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
patch(elmToMove, newStartVnode);
|
|
531
|
+
oldCh[idxInOld] = undefined;
|
|
532
|
+
node = elmToMove.$elm$;
|
|
533
|
+
}
|
|
534
|
+
newStartVnode = newCh[++newStartIdx];
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
471
537
|
// new element
|
|
472
538
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
473
539
|
newStartVnode = newCh[++newStartIdx];
|
|
@@ -490,7 +556,9 @@ const isSameVnode = (vnode1, vnode2) => {
|
|
|
490
556
|
// compare if two vnode to see if they're "technically" the same
|
|
491
557
|
// need to have the same element tag, and same key to be the same
|
|
492
558
|
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
493
|
-
|
|
559
|
+
{
|
|
560
|
+
return vnode1.$key$ === vnode2.$key$;
|
|
561
|
+
}
|
|
494
562
|
}
|
|
495
563
|
return false;
|
|
496
564
|
};
|
|
@@ -542,6 +610,12 @@ const patch = (oldVNode, newVNode) => {
|
|
|
542
610
|
elm.data = text;
|
|
543
611
|
}
|
|
544
612
|
};
|
|
613
|
+
const callNodeRefs = (vNode) => {
|
|
614
|
+
{
|
|
615
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
616
|
+
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
617
|
+
}
|
|
618
|
+
};
|
|
545
619
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
546
620
|
const hostElm = hostRef.$hostElement$;
|
|
547
621
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -732,6 +806,11 @@ const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
|
732
806
|
const parsePropertyValue = (propValue, propType) => {
|
|
733
807
|
// ensure this value is of the correct prop type
|
|
734
808
|
if (propValue != null && !isComplexType(propValue)) {
|
|
809
|
+
if (propType & 4 /* Boolean */) {
|
|
810
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
811
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
812
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
813
|
+
}
|
|
735
814
|
if (propType & 2 /* Number */) {
|
|
736
815
|
// force it to be a number
|
|
737
816
|
return parseFloat(propValue);
|
|
@@ -1053,6 +1132,10 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1053
1132
|
// Fallback appLoad event
|
|
1054
1133
|
endBootstrap();
|
|
1055
1134
|
};
|
|
1135
|
+
const getAssetPath = (path) => {
|
|
1136
|
+
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
1137
|
+
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
1138
|
+
};
|
|
1056
1139
|
const hostRefs = new WeakMap();
|
|
1057
1140
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1058
1141
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1140,6 +1223,7 @@ const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
|
1140
1223
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1141
1224
|
|
|
1142
1225
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1226
|
+
exports.getAssetPath = getAssetPath;
|
|
1143
1227
|
exports.h = h;
|
|
1144
1228
|
exports.promiseResolve = promiseResolve;
|
|
1145
1229
|
exports.registerInstance = registerInstance;
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6bea8f5.js');
|
|
6
|
+
require('./global-9073d10e.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
const patchEsm = () => {
|
|
12
|
+
return index.promiseResolve();
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const defineCustomElements = (win, options) => {
|
|
16
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
17
|
+
return patchEsm().then(() => {
|
|
18
|
+
return index.bootstrapLazy([["salon-latest-reviews.cjs",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonReviews":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-lookbook.cjs",[[0,"salon-lookbook",{"salonId":[2,"salon-id"],"isLoading":[32],"isLoadingMore":[32],"hideLoadMore":[32],"currentPage":[32],"totalLookbooks":[32],"salonCategories":[32],"salonLookbooks":[32],"sortBy":[32],"filterBy":[32],"isLayoutSetup":[32],"fetchData":[64],"fetchLookbooks":[64],"onChangeFiltering":[64],"onChangeSorting":[64],"onLoadMore":[64],"fetchCategories":[64]}]]],["salon-reviews.cjs",[[0,"salon-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonInfo":[32],"stats":[32],"totalReviews":[32],"allReviews":[32],"isLoading":[32],"isSorting":[32],"isFiltering":[32],"isLoadingMore":[32],"canLoadMore":[32],"page":[32],"filterBy":[32],"sortBy":[32]}]]],["style-detail.cjs",[[0,"style-detail",{"salonId":[2,"salon-id"],"salonLookbook":[1,"salon-lookbook"],"lookbookInfo":[32],"isModalOpen":[32],"currentMediaIdx":[32],"currentMedia":[32],"albumMedias":[32],"similarStyles":[32],"totalComments":[32],"lookbookComments":[32],"isLayoutSetup":[32],"fetchData":[64]}]]],["salon-booking.cjs",[[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-booking-modal.cjs",[[0,"salon-booking-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"redirectUrl":[1,"redirect-url"],"isModalOpen":[32]}]]],["salon-gift-card.cjs",[[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-gift-card-modal.cjs",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"isModalOpen":[32]}]]],["salon-ranking.cjs",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["salon-services.cjs",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-stylists.cjs",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"totalStylists":[32],"page":[32],"isLoading":[32],"isLoadingMore":[32],"canLoadMore":[32],"fetchData":[64],"onLoadMore":[64]}]]],["user-avatar.cjs",[[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]],["google-map_5.cjs",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[32],"fetchData":[64]}],[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"salon-latest-styles",{"salonId":[2,"salon-id"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"isLoadingState":[32],"latestStyles":[32],"fetchData":[64]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]]], options);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6bea8f5.js');
|
|
6
|
+
const colors = require('./colors-38421769.js');
|
|
7
|
+
|
|
8
|
+
const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:20px;top:20px}}";
|
|
9
|
+
|
|
10
|
+
let SalonBookingModal = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.primaryColor = colors.Colors.Primary;
|
|
14
|
+
this.redirectUrl = window.btoa(window.location.href);
|
|
15
|
+
this.isModalOpen = true;
|
|
16
|
+
}
|
|
17
|
+
closeModal() {
|
|
18
|
+
this.isModalOpen = false;
|
|
19
|
+
const el = document.querySelector('salon-booking-modal');
|
|
20
|
+
el.remove();
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
24
|
+
return (index.h("div", { class: "salon-booking--modal" }, this.isModalOpen && (index.h("div", { class: "salon-modal salon-modal--booking" }, index.h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), index.h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), index.h("div", { class: "salon-modal--inner" }, index.h("div", { class: "salon-modal--content" }, index.h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/booking?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
SalonBookingModal.style = indexCss;
|
|
28
|
+
|
|
29
|
+
exports.salon_booking_modal = SalonBookingModal;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6bea8f5.js');
|
|
6
|
+
const index$1 = require('./index-7f190886.js');
|
|
7
|
+
const colors = require('./colors-38421769.js');
|
|
8
|
+
require('./_commonjsHelpers-5cfcba41.js');
|
|
9
|
+
|
|
10
|
+
const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:20px;top:20px}}";
|
|
11
|
+
|
|
12
|
+
let SalonBooking = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.buttonClass = '';
|
|
16
|
+
this.buttonText = 'Book now';
|
|
17
|
+
this.primaryColor = colors.Colors.Primary;
|
|
18
|
+
}
|
|
19
|
+
openModal() {
|
|
20
|
+
const elBookingModal = document.createElement('div');
|
|
21
|
+
elBookingModal.innerHTML = `
|
|
22
|
+
<salon-booking-modal
|
|
23
|
+
salon-id=${this.salonId}
|
|
24
|
+
primary-color=${this.primaryColor}
|
|
25
|
+
></salon-booking-modal>
|
|
26
|
+
`;
|
|
27
|
+
document.body.appendChild(elBookingModal);
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
31
|
+
let buttonStyle = {};
|
|
32
|
+
if (!this.buttonClass) {
|
|
33
|
+
const primaryColor = index$1.color(this.primaryColor);
|
|
34
|
+
const primaryColorHover = primaryColor.darken(0.05);
|
|
35
|
+
buttonStyle = index$1.lib.css({
|
|
36
|
+
backgroundColor: this.primaryColor,
|
|
37
|
+
borderColor: this.primaryColor,
|
|
38
|
+
color: primaryColor.isLight() ? colors.Colors.Black01 : colors.Colors.White,
|
|
39
|
+
':hover': {
|
|
40
|
+
backgroundColor: primaryColorHover,
|
|
41
|
+
borderColor: primaryColorHover,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return (index.h("div", { class: "salon-booking" }, index.h("div", { class: "salon-booking--button" }, index.h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
SalonBooking.style = indexCss;
|
|
49
|
+
|
|
50
|
+
exports.salon_booking = SalonBooking;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6bea8f5.js');
|
|
6
|
+
const colors = require('./colors-38421769.js');
|
|
7
|
+
|
|
8
|
+
const indexCss = ".salon-modal.salon-modal--gift-card:before{display:none}.salon-modal.salon-modal--gift-card .salon-modal--inner,.salon-modal.salon-modal--gift-card .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--gift-card .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--gift-card .salon-modal--close{right:20px;top:20px}}";
|
|
9
|
+
|
|
10
|
+
let SalonGiftCardModal = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.primaryColor = colors.Colors.Primary;
|
|
14
|
+
this.isModalOpen = true;
|
|
15
|
+
}
|
|
16
|
+
closeModal() {
|
|
17
|
+
this.isModalOpen = false;
|
|
18
|
+
const el = document.querySelector('salon-gift-card-modal');
|
|
19
|
+
el.remove();
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
23
|
+
return (index.h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (index.h("div", { class: "salon-modal salon-modal--gift-card" }, index.h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), index.h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), index.h("div", { class: "salon-modal--inner" }, index.h("div", { class: "salon-modal--content" }, index.h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/buy-gift-card?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
SalonGiftCardModal.style = indexCss;
|
|
27
|
+
|
|
28
|
+
exports.salon_gift_card_modal = SalonGiftCardModal;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6bea8f5.js');
|
|
6
|
+
const index$1 = require('./index-7f190886.js');
|
|
7
|
+
const colors = require('./colors-38421769.js');
|
|
8
|
+
require('./_commonjsHelpers-5cfcba41.js');
|
|
9
|
+
|
|
10
|
+
const indexCss = ".salon-modal.salon-modal--gift-card:before{display:none}.salon-modal.salon-modal--gift-card .salon-modal--inner,.salon-modal.salon-modal--gift-card .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--gift-card .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--gift-card .salon-modal--close{right:20px;top:20px}}";
|
|
11
|
+
|
|
12
|
+
let SalonGiftCard = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.buttonClass = '';
|
|
16
|
+
this.buttonText = 'Buy Gift card';
|
|
17
|
+
this.primaryColor = colors.Colors.Primary;
|
|
18
|
+
}
|
|
19
|
+
openModal() {
|
|
20
|
+
const elBookingModal = document.createElement('div');
|
|
21
|
+
elBookingModal.innerHTML = `
|
|
22
|
+
<salon-gift-card-modal
|
|
23
|
+
salon-id=${this.salonId}
|
|
24
|
+
primary-color=${this.primaryColor}
|
|
25
|
+
></salon-gift-card-modal>
|
|
26
|
+
`;
|
|
27
|
+
document.body.appendChild(elBookingModal);
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
31
|
+
let buttonStyle = {};
|
|
32
|
+
if (!this.buttonClass) {
|
|
33
|
+
const primaryColor = index$1.color(this.primaryColor);
|
|
34
|
+
const primaryColorHover = primaryColor.darken(0.05);
|
|
35
|
+
buttonStyle = index$1.lib.css({
|
|
36
|
+
backgroundColor: this.primaryColor,
|
|
37
|
+
borderColor: this.primaryColor,
|
|
38
|
+
color: primaryColor.isLight() ? colors.Colors.Black01 : colors.Colors.White,
|
|
39
|
+
':hover': {
|
|
40
|
+
backgroundColor: primaryColorHover,
|
|
41
|
+
borderColor: primaryColorHover,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return (index.h("div", { class: "salon-gift-card" }, index.h("div", { class: "salon-gift-card--button" }, index.h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
SalonGiftCard.style = indexCss;
|
|
49
|
+
|
|
50
|
+
exports.salon_gift_card = SalonGiftCard;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e6bea8f5.js');
|
|
6
|
+
const services = require('./services-eee8f251.js');
|
|
7
|
+
const colors = require('./colors-38421769.js');
|
|
8
|
+
const utils = require('./utils-c5a33b3c.js');
|
|
9
|
+
require('./_commonjsHelpers-5cfcba41.js');
|
|
10
|
+
|
|
11
|
+
const indexCss = ".salon-latest-reviews .salon-review{min-width:280px}@media (min-width: 768px){.salon-latest-reviews .salon-review{min-width:300px}}";
|
|
12
|
+
|
|
13
|
+
let SalonLatestReviews = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
index.registerInstance(this, hostRef);
|
|
16
|
+
this.primaryColor = colors.Colors.Primary;
|
|
17
|
+
this.salonReviews = [];
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.fetchData();
|
|
21
|
+
}
|
|
22
|
+
async fetchData() {
|
|
23
|
+
this.isLoading = true;
|
|
24
|
+
try {
|
|
25
|
+
const { data: allReviews } = await services.HttpService().fetchSalonReviews(this.salonId, { limit: 5 });
|
|
26
|
+
this.salonReviews = [...allReviews];
|
|
27
|
+
}
|
|
28
|
+
catch (e) { }
|
|
29
|
+
this.isLoading = false;
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
if (this.isLoading) {
|
|
33
|
+
return (index.h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } }, index.h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index$1) => {
|
|
34
|
+
return (index.h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${colors.Colors.Gray02}`, background: colors.Colors.White, borderRadius: '8px', overflow: 'hidden' }, index$1 > 0 ? { marginLeft: '16px' } : {}) }, index.h("div", { class: "card", style: { border: 'none' } }, index.h("div", { class: "card-body" }, index.h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } }, index.h("div", { style: {
|
|
35
|
+
backgroundColor: colors.Colors.Gray02,
|
|
36
|
+
borderRadius: '50px',
|
|
37
|
+
height: '48px',
|
|
38
|
+
width: '48px',
|
|
39
|
+
float: 'left',
|
|
40
|
+
} }), index.h("div", { style: {
|
|
41
|
+
backgroundColor: colors.Colors.Gray01,
|
|
42
|
+
height: '16px',
|
|
43
|
+
width: '120px',
|
|
44
|
+
marginLeft: '16px',
|
|
45
|
+
marginTop: '14px',
|
|
46
|
+
float: 'left',
|
|
47
|
+
} })), index.h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (index.h("div", { style: {
|
|
48
|
+
backgroundColor: colors.Colors.Gray01,
|
|
49
|
+
height: '20px',
|
|
50
|
+
width: '20px',
|
|
51
|
+
marginRight: '8px',
|
|
52
|
+
float: 'left',
|
|
53
|
+
} })))), index.h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, index.h("div", { style: {
|
|
54
|
+
backgroundColor: colors.Colors.Gray01,
|
|
55
|
+
height: '16px',
|
|
56
|
+
width: '132px',
|
|
57
|
+
} })), index.h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, index.h("div", { class: "salon-review--description", style: {
|
|
58
|
+
fontSize: '16px',
|
|
59
|
+
lineHeight: '26px',
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
} }, index.h("div", { style: {
|
|
62
|
+
backgroundColor: colors.Colors.Gray01,
|
|
63
|
+
height: '16px',
|
|
64
|
+
width: '240px',
|
|
65
|
+
float: 'left',
|
|
66
|
+
} })))))));
|
|
67
|
+
}))));
|
|
68
|
+
}
|
|
69
|
+
const ratingTexts = utils.getRatingText();
|
|
70
|
+
return (index.h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, index.h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index$1) => {
|
|
71
|
+
const { user } = review;
|
|
72
|
+
return (index.h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${colors.Colors.Gray02}`, background: colors.Colors.White, borderRadius: '8px', overflow: 'hidden' }, index$1 > 0 ? { marginLeft: '16px' } : {}) }, index.h("div", { class: "card", style: { border: 'none' } }, index.h("div", { class: "card-body" }, index.h("div", { class: "salon-review--user", style: { marginBottom: '16px' } }, index.h("user-avatar", { size: 48, name: index.h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })), index.h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(score => (index.h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: Object.assign({ fontSize: '16px', marginRight: '4px' }, score <= review.point ? { color: this.primaryColor } : { color: colors.Colors.Gray04 }) }))), index.h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: colors.Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, services.dayjs_min(review.createdDate).format(services.shortDateYearFormat))), index.h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]), (review.title || review.description) && (index.h("div", { class: "salon-review--detail", style: { marginTop: '16px' } }, index.h("div", { class: "salon-review--description", style: {
|
|
73
|
+
fontSize: '16px',
|
|
74
|
+
lineHeight: '26px',
|
|
75
|
+
overflow: 'hidden',
|
|
76
|
+
maxHeight: review.photos.length > 0 ? '52px' : '104px',
|
|
77
|
+
} }, review.title || review.description))), review.photos.length > 0 && (index.h("div", { style: {
|
|
78
|
+
display: 'flex',
|
|
79
|
+
flexDirection: 'row',
|
|
80
|
+
overflowX: 'auto',
|
|
81
|
+
} }, review.photos.map(photo => (index.h("div", { style: {
|
|
82
|
+
border: '1px solid #d9d9d9',
|
|
83
|
+
position: 'relative',
|
|
84
|
+
cursor: 'pointer',
|
|
85
|
+
borderRadius: '2px',
|
|
86
|
+
height: '66px',
|
|
87
|
+
marginTop: '12px',
|
|
88
|
+
marginRight: '12px',
|
|
89
|
+
} }, index.h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
|
|
90
|
+
}))));
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
SalonLatestReviews.style = indexCss;
|
|
94
|
+
|
|
95
|
+
exports.salon_latest_reviews = SalonLatestReviews;
|