favesalon-embed 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements/index.d.ts +42 -0
- package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -6
- package/dist/favesalon-embed/activate-form.entry.js +70 -0
- package/dist/favesalon-embed/app-globals-74127f4b.js +7 -0
- package/dist/favesalon-embed/app-globals-f954a22f.js +7 -0
- package/dist/favesalon-embed/change-password-form.entry.js +81 -0
- package/dist/favesalon-embed/chat-box.entry.js +55 -0
- package/dist/{esm → favesalon-embed}/chat-button.entry.js +36 -13
- package/dist/favesalon-embed/chat-form.entry.js +39 -0
- package/dist/favesalon-embed/chat-messages.entry.js +71 -0
- package/dist/favesalon-embed/chat-rooms.entry.js +111 -0
- package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
- package/dist/favesalon-embed/dom-64053c71.js +73 -0
- package/dist/favesalon-embed/favesalon-embed.css +114 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
- package/dist/{esm → favesalon-embed}/google-map.entry.js +1 -1
- package/dist/{esm/index-a1c7583c.js → favesalon-embed/index-00b83e1c.js} +425 -15
- package/dist/favesalon-embed/index-888e99e3.js +3371 -0
- package/dist/favesalon-embed/index-a229b3b5.js +3371 -0
- package/dist/favesalon-embed/index.esm.js +1 -0
- package/dist/{esm/chat-box_5.entry.js → favesalon-embed/lodash-d5526b38.js} +27 -243
- package/dist/favesalon-embed/login-form.entry.js +67 -0
- package/dist/{cjs/chat-button.cjs.entry.js → favesalon-embed/notify-sounds.entry.js} +20 -44
- package/dist/favesalon-embed/register-form.entry.js +88 -0
- package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
- package/dist/favesalon-embed/reset-password-form.entry.js +47 -0
- package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-booking.entry.js +4 -4
- package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +4 -4
- package/dist/{esm → favesalon-embed}/salon-info.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +22 -6
- package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +27 -105
- package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
- package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +18 -6
- package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +20 -6
- package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
- package/dist/{esm → favesalon-embed}/salon-services.entry.js +25 -13
- package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
- package/dist/{esm/services-257442e2.js → favesalon-embed/services-5a4c43a6.js} +2608 -188
- package/dist/{cjs/services-d1bdf299.js → favesalon-embed/services-d71be591.js} +2616 -191
- package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
- package/dist/{esm → favesalon-embed}/style-detail.entry.js +29 -11
- package/dist/favesalon-embed/user-avatar.entry.js +52 -0
- package/dist/favesalon-embed/user-form.entry.js +44 -0
- package/dist/{collection/utils/utils.js → favesalon-embed/utils-fd30fb29.js} +14 -5
- package/dist/types/components/activate-form/activate-form.d.ts +12 -0
- package/dist/types/components/activate-form/test/activate-form.spec.d.ts +1 -0
- package/dist/types/components/change-password-form/change-password-form.d.ts +12 -0
- package/dist/types/components/chat-box/index.d.ts +1 -0
- package/dist/types/components/chat-button/index.d.ts +6 -2
- package/dist/types/components/chat-button/notify-sounds.d.ts +5 -0
- package/dist/types/components/chat-rooms/index.d.ts +6 -0
- package/dist/types/components/login-form/login-form.d.ts +10 -0
- package/dist/types/components/register-form/register-form.d.ts +13 -0
- package/dist/types/components/reset-password-form/reset-password-form.d.ts +9 -0
- package/dist/types/components/user-form/user-form.d.ts +7 -0
- package/dist/types/components.d.ts +127 -2
- package/dist/types/services/services.d.ts +17 -0
- package/dist/types/types/chat.d.ts +1 -0
- package/dist/types/types/user.d.ts +16 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/types/utils/utils.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/chat-box_5.cjs.entry.js +0 -17439
- package/dist/cjs/colors-38421769.js +0 -69
- package/dist/cjs/favesalon-embed.cjs.js +0 -23
- package/dist/cjs/google-map.cjs.entry.js +0 -52
- package/dist/cjs/index-7f190886.js +0 -4396
- package/dist/cjs/index-dd8176c4.js +0 -1531
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -22
- package/dist/cjs/relativeTime-3721080d.js +0 -9
- package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
- package/dist/cjs/salon-booking.cjs.entry.js +0 -51
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
- package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
- package/dist/cjs/salon-info.cjs.entry.js +0 -33
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
- package/dist/cjs/salon-latest-styles_3.cjs.entry.js +0 -241
- package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
- package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
- package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
- package/dist/cjs/salon-services.cjs.entry.js +0 -81
- package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
- package/dist/cjs/style-detail.cjs.entry.js +0 -312
- package/dist/cjs/utils-c5a33b3c.js +0 -23
- package/dist/collection/collection-manifest.json +0 -33
- package/dist/collection/components/chat-box/index.css +0 -105
- package/dist/collection/components/chat-box/index.js +0 -138
- package/dist/collection/components/chat-button/index.css +0 -101
- package/dist/collection/components/chat-button/index.js +0 -155
- package/dist/collection/components/chat-form/index.css +0 -40
- package/dist/collection/components/chat-form/index.js +0 -79
- package/dist/collection/components/chat-messages/index.css +0 -48
- package/dist/collection/components/chat-messages/index.js +0 -142
- package/dist/collection/components/chat-rooms/index.css +0 -102
- package/dist/collection/components/chat-rooms/index.js +0 -157
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/dist/collection/components/google-map/index.css +0 -5
- package/dist/collection/components/google-map/index.js +0 -90
- package/dist/collection/components/salon-booking/index.css +0 -30
- package/dist/collection/components/salon-booking/index.js +0 -126
- package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
- package/dist/collection/components/salon-gift-card/index.css +0 -30
- package/dist/collection/components/salon-gift-card/index.js +0 -126
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
- package/dist/collection/components/salon-info/index.css +0 -1
- package/dist/collection/components/salon-info/index.js +0 -77
- package/dist/collection/components/salon-latest-reviews/index.css +0 -11
- package/dist/collection/components/salon-latest-reviews/index.js +0 -163
- package/dist/collection/components/salon-latest-styles/index.css +0 -12
- package/dist/collection/components/salon-locations/index.css +0 -24
- package/dist/collection/components/salon-lookbook/index.css +0 -15
- package/dist/collection/components/salon-lookbook/index.js +0 -368
- package/dist/collection/components/salon-ranking/index.css +0 -3
- package/dist/collection/components/salon-ranking/index.js +0 -117
- package/dist/collection/components/salon-reviews/index.css +0 -18
- package/dist/collection/components/salon-reviews/index.js +0 -249
- package/dist/collection/components/salon-schedules/index.css +0 -18
- package/dist/collection/components/salon-services/index.css +0 -1
- package/dist/collection/components/salon-services/index.js +0 -146
- package/dist/collection/components/salon-stylists/index.css +0 -43
- package/dist/collection/components/salon-stylists/index.js +0 -184
- package/dist/collection/components/style-detail/index.css +0 -76
- package/dist/collection/components/style-detail/index.js +0 -386
- package/dist/collection/components/user-avatar/index.css +0 -0
- package/dist/collection/components/user-avatar/index.js +0 -159
- package/dist/collection/constants/colors.js +0 -65
- package/dist/collection/global/global.js +0 -0
- package/dist/collection/mocks/users.js +0 -10
- package/dist/collection/services/services.js +0 -295
- package/dist/collection/types/chat.js +0 -23
- package/dist/collection/types/common.js +0 -11
- package/dist/collection/types/review.js +0 -39
- package/dist/collection/types/salon.js +0 -58
- package/dist/collection/types/service.js +0 -24
- package/dist/collection/types/style.js +0 -128
- package/dist/collection/types/stylist.js +0 -30
- package/dist/collection/types/user.js +0 -10
- package/dist/custom-elements/index.js +0 -44974
- package/dist/esm/_commonjsHelpers-66ac50f5.js +0 -32
- package/dist/esm/favesalon-embed.js +0 -18
- package/dist/esm/index-0494771f.js +0 -1504
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -18
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/relativeTime-baa50aa2.js +0 -7
- package/dist/esm/salon-latest-styles_3.entry.js +0 -235
- package/dist/esm/utils-e97485e0.js +0 -19
- package/dist/favesalon-embed/p-05a1c88a.entry.js +0 -1
- package/dist/favesalon-embed/p-0acf0447.entry.js +0 -1
- package/dist/favesalon-embed/p-0bc4f624.js +0 -1
- package/dist/favesalon-embed/p-1af1515f.entry.js +0 -1
- package/dist/favesalon-embed/p-1cba5fc9.entry.js +0 -1
- package/dist/favesalon-embed/p-39a4ef15.entry.js +0 -1
- package/dist/favesalon-embed/p-3e2cb05b.entry.js +0 -1
- package/dist/favesalon-embed/p-47e646f8.js +0 -1
- package/dist/favesalon-embed/p-487b311f.entry.js +0 -1
- package/dist/favesalon-embed/p-55387c2f.entry.js +0 -1
- package/dist/favesalon-embed/p-566f05b4.entry.js +0 -1
- package/dist/favesalon-embed/p-862a0de0.entry.js +0 -1
- package/dist/favesalon-embed/p-9fe0cbeb.js +0 -2
- package/dist/favesalon-embed/p-a33331cc.js +0 -1
- package/dist/favesalon-embed/p-aeeb7b5f.entry.js +0 -1
- package/dist/favesalon-embed/p-b08e5b54.js +0 -6
- package/dist/favesalon-embed/p-b5cca5fc.entry.js +0 -1
- package/dist/favesalon-embed/p-c7fb7af5.js +0 -1580
- package/dist/favesalon-embed/p-ccab56d8.js +0 -1
- package/dist/favesalon-embed/p-d6e13053.entry.js +0 -1
- package/dist/favesalon-embed/p-dee42d34.entry.js +0 -1
- package/dist/favesalon-embed/p-e661ca1d.entry.js +0 -1
- package/dist/favesalon-embed/p-eeceab9c.entry.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
- /package/dist/{collection/index.js → types/components/activate-form/test/activate-form.e2e.d.ts} +0 -0
package/dist/cjs/index.cjs.js
DELETED
package/dist/cjs/loader.cjs.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.js');
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
9
|
-
*/
|
|
10
|
-
const patchEsm = () => {
|
|
11
|
-
return index.promiseResolve();
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const defineCustomElements = (win, options) => {
|
|
15
|
-
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
-
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["salon-info.cjs",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[32],"fetchData":[64]}]]],["chat-box_5.cjs",[[0,"chat-box",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"chatRooms":[32],"activeRoom":[32],"fetchData":[64]}],[0,"chat-rooms",{"senderId":[2,"sender-id"],"chatRooms":[16],"activeRoom":[16],"onClickRoom":[16],"keyword":[32]}],[0,"chat-messages",{"sender":[16],"receiver":[16],"messages":[16],"chatRoomId":[1,"chat-room-id"]}],[0,"chat-form",{"senderId":[2,"sender-id"],"chatRoomId":[1,"chat-room-id"]}],[0,"user-avatar",{"size":[2],"name":[1],"description":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]],["chat-button.cjs",[[0,"chat-button",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"receiverId":[1,"receiver-id"],"senderInfo":[32],"receiverInfo":[32],"chatRoom":[32],"chatMessages":[32],"isChatExpanded":[32],"fetchData":[64]}]]],["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]}]]],["google-map.cjs",[[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]],["salon-latest-styles_3.cjs",[[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]}]]]], options);
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.setNonce = index.setNonce;
|
|
22
|
-
exports.defineCustomElements = defineCustomElements;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const _commonjsHelpers = require('./_commonjsHelpers-5cfcba41.js');
|
|
4
|
-
|
|
5
|
-
var relativeTime = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
6
|
-
!function(r,e){module.exports=e();}(_commonjsHelpers.commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
exports.relativeTime = relativeTime;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.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
|
-
const SalonBookingModal = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.salonId = undefined;
|
|
14
|
-
this.primaryColor = colors.Colors.Primary;
|
|
15
|
-
this.redirectUrl = window.btoa(window.location.href);
|
|
16
|
-
this.isModalOpen = true;
|
|
17
|
-
}
|
|
18
|
-
closeModal() {
|
|
19
|
-
this.isModalOpen = false;
|
|
20
|
-
const el = document.querySelector('salon-booking-modal');
|
|
21
|
-
el.remove();
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
25
|
-
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` })))))));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
SalonBookingModal.style = indexCss;
|
|
29
|
-
|
|
30
|
-
exports.salon_booking_modal = SalonBookingModal;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.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
|
-
const SalonBooking = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.salonId = undefined;
|
|
16
|
-
this.buttonClass = '';
|
|
17
|
-
this.buttonText = 'Book now';
|
|
18
|
-
this.primaryColor = colors.Colors.Primary;
|
|
19
|
-
}
|
|
20
|
-
openModal() {
|
|
21
|
-
const elBookingModal = document.createElement('div');
|
|
22
|
-
elBookingModal.innerHTML = `
|
|
23
|
-
<salon-booking-modal
|
|
24
|
-
salon-id=${this.salonId}
|
|
25
|
-
primary-color=${this.primaryColor}
|
|
26
|
-
></salon-booking-modal>
|
|
27
|
-
`;
|
|
28
|
-
document.body.appendChild(elBookingModal);
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
32
|
-
let buttonStyle = {};
|
|
33
|
-
if (!this.buttonClass) {
|
|
34
|
-
const primaryColor = index$1.color(this.primaryColor);
|
|
35
|
-
const primaryColorHover = primaryColor.darken(0.05);
|
|
36
|
-
buttonStyle = index$1.lib.css({
|
|
37
|
-
backgroundColor: this.primaryColor,
|
|
38
|
-
borderColor: this.primaryColor,
|
|
39
|
-
color: primaryColor.isLight() ? colors.Colors.Black01 : colors.Colors.White,
|
|
40
|
-
':hover': {
|
|
41
|
-
backgroundColor: primaryColorHover,
|
|
42
|
-
borderColor: primaryColorHover,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
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))));
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
SalonBooking.style = indexCss;
|
|
50
|
-
|
|
51
|
-
exports.salon_booking = SalonBooking;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.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
|
-
const SalonGiftCardModal = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.salonId = undefined;
|
|
14
|
-
this.primaryColor = colors.Colors.Primary;
|
|
15
|
-
this.isModalOpen = true;
|
|
16
|
-
}
|
|
17
|
-
closeModal() {
|
|
18
|
-
this.isModalOpen = false;
|
|
19
|
-
const el = document.querySelector('salon-gift-card-modal');
|
|
20
|
-
el.remove();
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
24
|
-
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` })))))));
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
SalonGiftCardModal.style = indexCss;
|
|
28
|
-
|
|
29
|
-
exports.salon_gift_card_modal = SalonGiftCardModal;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.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
|
-
const SalonGiftCard = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.salonId = undefined;
|
|
16
|
-
this.buttonClass = '';
|
|
17
|
-
this.buttonText = 'Buy Gift card';
|
|
18
|
-
this.primaryColor = colors.Colors.Primary;
|
|
19
|
-
}
|
|
20
|
-
openModal() {
|
|
21
|
-
const elBookingModal = document.createElement('div');
|
|
22
|
-
elBookingModal.innerHTML = `
|
|
23
|
-
<salon-gift-card-modal
|
|
24
|
-
salon-id=${this.salonId}
|
|
25
|
-
primary-color=${this.primaryColor}
|
|
26
|
-
></salon-gift-card-modal>
|
|
27
|
-
`;
|
|
28
|
-
document.body.appendChild(elBookingModal);
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
32
|
-
let buttonStyle = {};
|
|
33
|
-
if (!this.buttonClass) {
|
|
34
|
-
const primaryColor = index$1.color(this.primaryColor);
|
|
35
|
-
const primaryColorHover = primaryColor.darken(0.05);
|
|
36
|
-
buttonStyle = index$1.lib.css({
|
|
37
|
-
backgroundColor: this.primaryColor,
|
|
38
|
-
borderColor: this.primaryColor,
|
|
39
|
-
color: primaryColor.isLight() ? colors.Colors.Black01 : colors.Colors.White,
|
|
40
|
-
':hover': {
|
|
41
|
-
backgroundColor: primaryColorHover,
|
|
42
|
-
borderColor: primaryColorHover,
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
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))));
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
SalonGiftCard.style = indexCss;
|
|
50
|
-
|
|
51
|
-
exports.salon_gift_card = SalonGiftCard;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.js');
|
|
6
|
-
const services = require('./services-d1bdf299.js');
|
|
7
|
-
require('./_commonjsHelpers-5cfcba41.js');
|
|
8
|
-
require('./colors-38421769.js');
|
|
9
|
-
|
|
10
|
-
const indexCss = "";
|
|
11
|
-
|
|
12
|
-
const SalonInfo = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.salonId = undefined;
|
|
16
|
-
this.salonInfo = undefined;
|
|
17
|
-
}
|
|
18
|
-
componentWillLoad() {
|
|
19
|
-
this.fetchData();
|
|
20
|
-
}
|
|
21
|
-
async fetchData() {
|
|
22
|
-
try {
|
|
23
|
-
this.salonInfo = await services.HttpService().fetchSalonInfo(this.salonId);
|
|
24
|
-
}
|
|
25
|
-
catch (e) { }
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
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) }))))));
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
SalonInfo.style = indexCss;
|
|
32
|
-
|
|
33
|
-
exports.salon_info = SalonInfo;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.js');
|
|
6
|
-
const services = require('./services-d1bdf299.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
|
-
const SalonLatestReviews = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
this.salonId = undefined;
|
|
17
|
-
this.primaryColor = colors.Colors.Primary;
|
|
18
|
-
this.salonReviews = [];
|
|
19
|
-
this.isLoading = undefined;
|
|
20
|
-
}
|
|
21
|
-
componentWillLoad() {
|
|
22
|
-
this.fetchData();
|
|
23
|
-
}
|
|
24
|
-
async fetchData() {
|
|
25
|
-
this.isLoading = true;
|
|
26
|
-
try {
|
|
27
|
-
const { data: allReviews } = await services.HttpService().fetchSalonReviews(this.salonId, { limit: 5 });
|
|
28
|
-
this.salonReviews = [...allReviews];
|
|
29
|
-
}
|
|
30
|
-
catch (e) { }
|
|
31
|
-
this.isLoading = false;
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
if (this.isLoading) {
|
|
35
|
-
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) => {
|
|
36
|
-
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: {
|
|
37
|
-
backgroundColor: colors.Colors.Gray02,
|
|
38
|
-
borderRadius: '50px',
|
|
39
|
-
height: '48px',
|
|
40
|
-
width: '48px',
|
|
41
|
-
float: 'left',
|
|
42
|
-
} }), index.h("div", { style: {
|
|
43
|
-
backgroundColor: colors.Colors.Gray01,
|
|
44
|
-
height: '16px',
|
|
45
|
-
width: '120px',
|
|
46
|
-
marginLeft: '16px',
|
|
47
|
-
marginTop: '14px',
|
|
48
|
-
float: 'left',
|
|
49
|
-
} })), index.h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (index.h("div", { style: {
|
|
50
|
-
backgroundColor: colors.Colors.Gray01,
|
|
51
|
-
height: '20px',
|
|
52
|
-
width: '20px',
|
|
53
|
-
marginRight: '8px',
|
|
54
|
-
float: 'left',
|
|
55
|
-
} })))), index.h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, index.h("div", { style: {
|
|
56
|
-
backgroundColor: colors.Colors.Gray01,
|
|
57
|
-
height: '16px',
|
|
58
|
-
width: '132px',
|
|
59
|
-
} })), index.h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, index.h("div", { class: "salon-review--description", style: {
|
|
60
|
-
fontSize: '16px',
|
|
61
|
-
lineHeight: '26px',
|
|
62
|
-
overflow: 'hidden',
|
|
63
|
-
} }, index.h("div", { style: {
|
|
64
|
-
backgroundColor: colors.Colors.Gray01,
|
|
65
|
-
height: '16px',
|
|
66
|
-
width: '240px',
|
|
67
|
-
float: 'left',
|
|
68
|
-
} })))))));
|
|
69
|
-
}))));
|
|
70
|
-
}
|
|
71
|
-
const ratingTexts = utils.getRatingText();
|
|
72
|
-
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) => {
|
|
73
|
-
const { user } = review;
|
|
74
|
-
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: {
|
|
75
|
-
fontSize: '16px',
|
|
76
|
-
lineHeight: '26px',
|
|
77
|
-
overflow: 'hidden',
|
|
78
|
-
maxHeight: review.photos.length > 0 ? '52px' : '104px',
|
|
79
|
-
} }, review.title || review.description))), review.photos.length > 0 && (index.h("div", { style: {
|
|
80
|
-
display: 'flex',
|
|
81
|
-
flexDirection: 'row',
|
|
82
|
-
overflowX: 'auto',
|
|
83
|
-
} }, review.photos.map(photo => (index.h("div", { style: {
|
|
84
|
-
border: '1px solid #d9d9d9',
|
|
85
|
-
position: 'relative',
|
|
86
|
-
cursor: 'pointer',
|
|
87
|
-
borderRadius: '2px',
|
|
88
|
-
height: '66px',
|
|
89
|
-
marginTop: '12px',
|
|
90
|
-
marginRight: '12px',
|
|
91
|
-
} }, index.h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
|
|
92
|
-
}))));
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
SalonLatestReviews.style = indexCss;
|
|
96
|
-
|
|
97
|
-
exports.salon_latest_reviews = SalonLatestReviews;
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-dd8176c4.js');
|
|
6
|
-
const colors = require('./colors-38421769.js');
|
|
7
|
-
const services = require('./services-d1bdf299.js');
|
|
8
|
-
const utils = require('./utils-c5a33b3c.js');
|
|
9
|
-
require('./_commonjsHelpers-5cfcba41.js');
|
|
10
|
-
|
|
11
|
-
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}}";
|
|
12
|
-
|
|
13
|
-
const SalonLatestStyles = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
this.salonId = undefined;
|
|
17
|
-
this.isLoading = undefined;
|
|
18
|
-
this.withBorder = undefined;
|
|
19
|
-
this.isLoadingState = undefined;
|
|
20
|
-
this.latestStyles = undefined;
|
|
21
|
-
}
|
|
22
|
-
componentDidLoad() {
|
|
23
|
-
this.fetchData();
|
|
24
|
-
}
|
|
25
|
-
async fetchData() {
|
|
26
|
-
this.isLoadingState = true;
|
|
27
|
-
try {
|
|
28
|
-
const promises = [
|
|
29
|
-
services.HttpService().fetchSalonLatestStyles(this.salonId, { limit: 6 })
|
|
30
|
-
.then(salonStyles => this.latestStyles = salonStyles),
|
|
31
|
-
];
|
|
32
|
-
return Promise.all(promises)
|
|
33
|
-
.then(() => this.isLoadingState = false)
|
|
34
|
-
.catch(() => this.isLoadingState = false);
|
|
35
|
-
}
|
|
36
|
-
catch (e) { }
|
|
37
|
-
}
|
|
38
|
-
onClickLookbook(style) {
|
|
39
|
-
const elLookbookModal = document.createElement('div');
|
|
40
|
-
elLookbookModal.innerHTML = `
|
|
41
|
-
<style-detail
|
|
42
|
-
salon-id=${this.salonId}
|
|
43
|
-
salon-lookbook='${JSON.stringify(style)}'
|
|
44
|
-
></style-detail>
|
|
45
|
-
`;
|
|
46
|
-
document.body.appendChild(elLookbookModal);
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
if (this.isLoading || this.isLoadingState) {
|
|
50
|
-
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: {
|
|
51
|
-
backgroundColor: colors.Colors.Gray02,
|
|
52
|
-
height: '20px',
|
|
53
|
-
width: '120px',
|
|
54
|
-
} }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
|
|
55
|
-
overflow: 'hidden',
|
|
56
|
-
marginLeft: '-16px',
|
|
57
|
-
marginBottom: '-16px',
|
|
58
|
-
} }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((fakeId, idx) => (index.h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
|
|
59
|
-
float: 'left',
|
|
60
|
-
paddingLeft: '16px',
|
|
61
|
-
marginBottom: '16px',
|
|
62
|
-
} }, index.h("div", { style: {
|
|
63
|
-
backgroundColor: colors.Colors.Gray01,
|
|
64
|
-
borderRadius: '8px',
|
|
65
|
-
width: '120px',
|
|
66
|
-
height: '120px',
|
|
67
|
-
overflow: 'hidden',
|
|
68
|
-
position: 'relative',
|
|
69
|
-
cursor: 'pointer',
|
|
70
|
-
} })))))))));
|
|
71
|
-
}
|
|
72
|
-
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: {
|
|
73
|
-
overflow: 'hidden',
|
|
74
|
-
marginLeft: '-16px',
|
|
75
|
-
marginBottom: '-16px',
|
|
76
|
-
marginTop: '16px',
|
|
77
|
-
} }, (this.latestStyles || []).map((faveStyle, idx) => {
|
|
78
|
-
const { imageThumb, albumMedias } = faveStyle;
|
|
79
|
-
const firstMedia = albumMedias.length > 0 ? albumMedias[0] : null;
|
|
80
|
-
const isVideo = firstMedia ? services.isVideoMedia(firstMedia) : false;
|
|
81
|
-
return (index.h("div", { key: `style-listing--item-${faveStyle.id}-${idx}`, style: {
|
|
82
|
-
float: 'left',
|
|
83
|
-
paddingLeft: '16px',
|
|
84
|
-
marginBottom: '16px',
|
|
85
|
-
} }, 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 ? {
|
|
86
|
-
backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
|
|
87
|
-
backgroundRepeat: 'no-repeat',
|
|
88
|
-
backgroundPosition: 'center center',
|
|
89
|
-
backgroundSize: 'cover',
|
|
90
|
-
} : {}), 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: {
|
|
91
|
-
fontSize: '48px',
|
|
92
|
-
color: colors.Colors.TextColor,
|
|
93
|
-
position: 'absolute',
|
|
94
|
-
left: '50%',
|
|
95
|
-
top: '50%',
|
|
96
|
-
transform: 'translate(-50%, -50%)',
|
|
97
|
-
} }))))));
|
|
98
|
-
})))));
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
SalonLatestStyles.style = indexCss$2;
|
|
102
|
-
|
|
103
|
-
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}}";
|
|
104
|
-
|
|
105
|
-
const SalonLocations = class {
|
|
106
|
-
constructor(hostRef) {
|
|
107
|
-
index.registerInstance(this, hostRef);
|
|
108
|
-
this.salonId = undefined;
|
|
109
|
-
this.salonInfo = undefined;
|
|
110
|
-
this.isLoading = undefined;
|
|
111
|
-
this.withBorder = undefined;
|
|
112
|
-
this.salonInfoState = undefined;
|
|
113
|
-
}
|
|
114
|
-
componentWillLoad() {
|
|
115
|
-
if (this.salonInfo) {
|
|
116
|
-
this.salonInfoState = JSON.parse(this.salonInfo);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
this.fetchData();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
fetchData() {
|
|
123
|
-
try {
|
|
124
|
-
services.HttpService().fetchSalonInfo(this.salonId)
|
|
125
|
-
.then(salonInfo => this.salonInfoState = salonInfo);
|
|
126
|
-
}
|
|
127
|
-
catch (e) { }
|
|
128
|
-
}
|
|
129
|
-
render() {
|
|
130
|
-
if (this.isLoading) {
|
|
131
|
-
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: {
|
|
132
|
-
backgroundColor: colors.Colors.Gray02,
|
|
133
|
-
height: '20px',
|
|
134
|
-
width: '120px',
|
|
135
|
-
} }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
|
|
136
|
-
backgroundColor: colors.Colors.Gray01,
|
|
137
|
-
height: '16px',
|
|
138
|
-
width: '50%',
|
|
139
|
-
} }), index.h("div", { style: {
|
|
140
|
-
backgroundColor: colors.Colors.Gray01,
|
|
141
|
-
height: '16px',
|
|
142
|
-
width: '50%',
|
|
143
|
-
marginTop: '8px',
|
|
144
|
-
} }), index.h("div", { style: {
|
|
145
|
-
backgroundColor: colors.Colors.Gray01,
|
|
146
|
-
height: '192px',
|
|
147
|
-
width: '100%',
|
|
148
|
-
marginTop: '24px',
|
|
149
|
-
} })))));
|
|
150
|
-
}
|
|
151
|
-
const { businessPhone, businessName, website, email, } = this.salonInfoState || {};
|
|
152
|
-
const websiteUrl = utils.formatWebsiteUrl(website);
|
|
153
|
-
const fullAddress = utils.formatFullAddress(this.salonInfoState);
|
|
154
|
-
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 })))));
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
SalonLocations.style = indexCss$1;
|
|
158
|
-
|
|
159
|
-
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}}";
|
|
160
|
-
|
|
161
|
-
const SalonSchedules = class {
|
|
162
|
-
constructor(hostRef) {
|
|
163
|
-
index.registerInstance(this, hostRef);
|
|
164
|
-
this.salonId = undefined;
|
|
165
|
-
this.salonInfo = undefined;
|
|
166
|
-
this.isLoading = undefined;
|
|
167
|
-
this.withBorder = undefined;
|
|
168
|
-
this.salonInfoState = undefined;
|
|
169
|
-
}
|
|
170
|
-
componentWillLoad() {
|
|
171
|
-
if (this.salonInfo) {
|
|
172
|
-
this.salonInfoState = JSON.parse(this.salonInfo);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
this.fetchData();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
fetchData() {
|
|
179
|
-
try {
|
|
180
|
-
services.HttpService().fetchSalonInfo(this.salonId)
|
|
181
|
-
.then(salonInfo => this.salonInfoState = salonInfo);
|
|
182
|
-
}
|
|
183
|
-
catch (e) { }
|
|
184
|
-
}
|
|
185
|
-
renderBusinessHour(businessHour) {
|
|
186
|
-
if (businessHour.status === services.BusinessHourStatus.ByAppointment) {
|
|
187
|
-
return 'By Appointment';
|
|
188
|
-
}
|
|
189
|
-
if (businessHour.status === services.BusinessHourStatus.Close) {
|
|
190
|
-
return 'Close';
|
|
191
|
-
}
|
|
192
|
-
return `${businessHour.openTime} - ${businessHour.closeTime}`;
|
|
193
|
-
}
|
|
194
|
-
render() {
|
|
195
|
-
if (this.isLoading) {
|
|
196
|
-
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: {
|
|
197
|
-
backgroundColor: colors.Colors.Gray02,
|
|
198
|
-
height: '20px',
|
|
199
|
-
width: '120px',
|
|
200
|
-
} }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
|
|
201
|
-
backgroundColor: colors.Colors.Gray01,
|
|
202
|
-
height: '16px',
|
|
203
|
-
width: '30%',
|
|
204
|
-
} }), index.h("div", { style: {
|
|
205
|
-
backgroundColor: colors.Colors.Gray01,
|
|
206
|
-
height: '16px',
|
|
207
|
-
width: '40%',
|
|
208
|
-
marginTop: '8px',
|
|
209
|
-
} }), index.h("div", { style: {
|
|
210
|
-
backgroundColor: colors.Colors.Gray01,
|
|
211
|
-
height: '16px',
|
|
212
|
-
width: '75%',
|
|
213
|
-
marginTop: '12px',
|
|
214
|
-
} }), index.h("div", { style: {
|
|
215
|
-
backgroundColor: colors.Colors.Gray01,
|
|
216
|
-
height: '16px',
|
|
217
|
-
width: '75%',
|
|
218
|
-
marginTop: '8px',
|
|
219
|
-
} })), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
|
|
220
|
-
overflow: 'hidden',
|
|
221
|
-
marginLeft: '-16px',
|
|
222
|
-
marginBottom: '-16px',
|
|
223
|
-
} }, [1, 2, 3, 4, 5, 6, 7].map((fakeId, idx) => (index.h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
|
|
224
|
-
float: 'left',
|
|
225
|
-
paddingLeft: '16px',
|
|
226
|
-
marginBottom: '16px',
|
|
227
|
-
} }, index.h("div", { style: {
|
|
228
|
-
backgroundColor: colors.Colors.Gray01,
|
|
229
|
-
width: '120px',
|
|
230
|
-
height: '20px',
|
|
231
|
-
} })))))))));
|
|
232
|
-
}
|
|
233
|
-
const { about, businessHours, } = (this.salonInfoState || {});
|
|
234
|
-
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])))))))));
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
SalonSchedules.style = indexCss;
|
|
238
|
-
|
|
239
|
-
exports.salon_latest_styles = SalonLatestStyles;
|
|
240
|
-
exports.salon_locations = SalonLocations;
|
|
241
|
-
exports.salon_schedules = SalonSchedules;
|