favesalon-embed 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements/index.d.ts +24 -0
- package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-9bc404fc.js} +14 -6
- package/dist/{esm/_commonjsHelpers-098d5b27.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -2
- package/dist/{cjs/global-9073d10e.js → favesalon-embed/app-globals-437cc3f3.js} +15 -8
- package/dist/{esm/global-e1089ffd.js → favesalon-embed/app-globals-60769a2c.js} +16 -7
- package/dist/favesalon-embed/chat-box.entry.js +54 -0
- package/dist/favesalon-embed/chat-button.entry.js +51 -0
- package/dist/favesalon-embed/chat-form.entry.js +39 -0
- package/dist/favesalon-embed/chat-messages.entry.js +53 -0
- package/dist/favesalon-embed/chat-rooms.entry.js +17279 -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 +2433 -4
- package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
- package/dist/{collection/components/google-map/index.js → favesalon-embed/google-map.entry.js} +12 -54
- package/dist/{esm/index-80523fec.js → favesalon-embed/index-00b83e1c.js} +425 -15
- package/dist/favesalon-embed/index-04c09911.js +3371 -0
- package/dist/favesalon-embed/index-888e99e3.js +3371 -0
- package/dist/{cjs/index-7f190886.js → favesalon-embed/index-ac52896a.js} +454 -47
- package/dist/favesalon-embed/index.esm.js +1 -0
- package/dist/favesalon-embed/isObject-13b86c17.js +203 -0
- package/dist/favesalon-embed/relativeTime-15477f02.js +7 -0
- package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
- package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-booking.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +3 -3
- package/dist/favesalon-embed/salon-info.entry.js +29 -0
- package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +4 -4
- package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +14 -99
- 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 +3 -3
- package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +3 -3
- 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 +3 -3
- package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
- package/dist/{custom-elements/index.js → favesalon-embed/services-55a87166.js} +2465 -7150
- package/dist/{cjs/services-125c82d8.js → favesalon-embed/services-7c46a2fd.js} +2465 -103
- package/dist/{esm/services-40a3e622.js → favesalon-embed/services-7cb8f2a6.js} +2469 -100
- package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
- package/dist/{esm → favesalon-embed}/style-detail.entry.js +4 -4
- package/dist/{esm → favesalon-embed}/user-avatar.entry.js +13 -4
- package/dist/{esm/utils-e97485e0.js → favesalon-embed/utils-2c19db45.js} +6 -0
- package/dist/types/components/chat-box/index.d.ts +12 -0
- package/dist/types/components/chat-button/index.d.ts +0 -8
- package/dist/types/components/chat-form/index.d.ts +6 -0
- package/dist/types/components/chat-messages/index.d.ts +14 -0
- package/dist/types/components/chat-rooms/index.d.ts +12 -0
- package/dist/types/components/user-avatar/index.d.ts +2 -1
- package/dist/types/components.d.ts +84 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/chat-button.cjs.entry.js +0 -118
- package/dist/cjs/colors-38421769.js +0 -69
- package/dist/cjs/favesalon-embed.cjs.js +0 -24
- package/dist/cjs/google-map_5.cjs.entry.js +0 -310
- package/dist/cjs/index-47c2a5f6.js +0 -1533
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- 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-latest-reviews.cjs.entry.js +0 -97
- 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/user-avatar.cjs.entry.js +0 -45
- package/dist/cjs/utils-c5a33b3c.js +0 -23
- package/dist/collection/collection-manifest.json +0 -29
- package/dist/collection/components/chat-button/index.css +0 -122
- package/dist/collection/components/chat-button/index.js +0 -218
- package/dist/collection/components/chat-conversation/index.js +0 -103
- 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/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 -134
- package/dist/collection/constants/colors.js +0 -65
- package/dist/collection/global/global.js +0 -8
- package/dist/collection/index.js +0 -1
- 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/collection/utils/utils.js +0 -20
- package/dist/esm/chat-button.entry.js +0 -114
- package/dist/esm/favesalon-embed.js +0 -19
- package/dist/esm/google-map_5.entry.js +0 -302
- package/dist/esm/index-3fae868e.js +0 -1506
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- 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-cd452e6d.js +0 -7
- package/dist/favesalon-embed/p-019c5ccd.entry.js +0 -1
- package/dist/favesalon-embed/p-083a8821.entry.js +0 -1
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +0 -1
- package/dist/favesalon-embed/p-119db8de.entry.js +0 -1
- package/dist/favesalon-embed/p-1432c51b.entry.js +0 -1
- package/dist/favesalon-embed/p-22093506.entry.js +0 -1
- package/dist/favesalon-embed/p-32b314e9.js +0 -2
- package/dist/favesalon-embed/p-47e646f8.js +0 -1
- package/dist/favesalon-embed/p-4a5eca9a.js +0 -6
- package/dist/favesalon-embed/p-58d2e9be.js +0 -1
- package/dist/favesalon-embed/p-71404b6a.entry.js +0 -1
- package/dist/favesalon-embed/p-857c3a61.entry.js +0 -1
- package/dist/favesalon-embed/p-99ec77f7.entry.js +0 -1
- package/dist/favesalon-embed/p-a33331cc.js +0 -1
- package/dist/favesalon-embed/p-b0c3673a.entry.js +0 -1
- package/dist/favesalon-embed/p-b287b1ea.entry.js +0 -1
- package/dist/favesalon-embed/p-b3af7842.entry.js +0 -1
- package/dist/favesalon-embed/p-b630ae68.js +0 -1580
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +0 -1
- package/dist/favesalon-embed/p-d6083940.js +0 -1
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +0 -1
- package/dist/favesalon-embed/p-fc9a5551.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/chat-conversation/index.d.ts +0 -0
- /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
package/dist/cjs/index.cjs.js
DELETED
package/dist/cjs/loader.cjs.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-47c2a5f6.js');
|
|
6
|
-
require('./global-9073d10e.js');
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
Stencil Client Patch Esm v2.22.3 | 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([["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_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"]}]]],["user-avatar.cjs",[[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]]], options);
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
exports.setNonce = index.setNonce;
|
|
23
|
-
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-47c2a5f6.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-47c2a5f6.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-47c2a5f6.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-47c2a5f6.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,97 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-47c2a5f6.js');
|
|
6
|
-
const services = require('./services-125c82d8.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,222 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-47c2a5f6.js');
|
|
6
|
-
const colors = require('./colors-38421769.js');
|
|
7
|
-
const services = require('./services-125c82d8.js');
|
|
8
|
-
require('./_commonjsHelpers-5cfcba41.js');
|
|
9
|
-
|
|
10
|
-
const indexCss = "@media (max-width: 768px){salon-lookbook .view-header{display:block !important}salon-lookbook .salon-loobook--serch-result{margin-bottom:16px}salon-lookbook .salon-loobook--filter-wrapper>label,salon-lookbook .salon-loobook--sort-wrapper>label{display:none !important}}";
|
|
11
|
-
|
|
12
|
-
const lookbookSortOptions = [{
|
|
13
|
-
value: 'like',
|
|
14
|
-
label: 'Most popular',
|
|
15
|
-
}, {
|
|
16
|
-
value: 'newest',
|
|
17
|
-
label: 'Newest first',
|
|
18
|
-
}, {
|
|
19
|
-
value: 'oldest',
|
|
20
|
-
label: 'Oldest first',
|
|
21
|
-
}];
|
|
22
|
-
const lookbookFilterOptions = [{
|
|
23
|
-
value: 'all',
|
|
24
|
-
label: 'All Category',
|
|
25
|
-
}];
|
|
26
|
-
const SalonLookbook = class {
|
|
27
|
-
constructor(hostRef) {
|
|
28
|
-
index.registerInstance(this, hostRef);
|
|
29
|
-
this.salonId = undefined;
|
|
30
|
-
this.isLoading = true;
|
|
31
|
-
this.isLoadingMore = undefined;
|
|
32
|
-
this.hideLoadMore = undefined;
|
|
33
|
-
this.currentPage = 1;
|
|
34
|
-
this.totalLookbooks = 0;
|
|
35
|
-
this.salonCategories = [];
|
|
36
|
-
this.salonLookbooks = [];
|
|
37
|
-
this.sortBy = lookbookSortOptions[1].value;
|
|
38
|
-
this.filterBy = lookbookFilterOptions[0].value;
|
|
39
|
-
this.isLayoutSetup = undefined;
|
|
40
|
-
}
|
|
41
|
-
componentWillLoad() {
|
|
42
|
-
this.fetchData();
|
|
43
|
-
this.injectSDK();
|
|
44
|
-
}
|
|
45
|
-
componentDidRender() {
|
|
46
|
-
this.setupGridLayout();
|
|
47
|
-
}
|
|
48
|
-
injectSDK() {
|
|
49
|
-
return new Promise((resolve) => {
|
|
50
|
-
const script = document.createElement('script');
|
|
51
|
-
script.type = 'text/javascript';
|
|
52
|
-
script.src = 'https://cdn.jsdelivr.net/npm/macy@2';
|
|
53
|
-
document.body.appendChild(script);
|
|
54
|
-
return resolve(true);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
setupGridLayout() {
|
|
58
|
-
if (!this.isLayoutSetup && document.querySelector('#salon-loobooks--grid')) {
|
|
59
|
-
const script = document.createElement('script');
|
|
60
|
-
script.type = 'text/javascript';
|
|
61
|
-
script.innerHTML = `
|
|
62
|
-
var masonry = new Macy({
|
|
63
|
-
container: '#salon-loobooks--grid',
|
|
64
|
-
useContainerForBreakpoints: true,
|
|
65
|
-
margin: 16,
|
|
66
|
-
columns: 5,
|
|
67
|
-
breakAt: {
|
|
68
|
-
1024: {
|
|
69
|
-
columns: 4,
|
|
70
|
-
},
|
|
71
|
-
768: {
|
|
72
|
-
columns: 3,
|
|
73
|
-
},
|
|
74
|
-
576: {
|
|
75
|
-
margin: 16,
|
|
76
|
-
columns: 2,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
`;
|
|
81
|
-
document.body.appendChild(script);
|
|
82
|
-
this.isLayoutSetup = true;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
async fetchData() {
|
|
86
|
-
try {
|
|
87
|
-
const promises = [
|
|
88
|
-
this.fetchLookbooks(Object.assign({ page: 1, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [this.filterBy] } : {})),
|
|
89
|
-
this.fetchCategories(),
|
|
90
|
-
];
|
|
91
|
-
return Promise.all(promises);
|
|
92
|
-
}
|
|
93
|
-
catch (e) { }
|
|
94
|
-
}
|
|
95
|
-
async fetchLookbooks(options, isLoadingMore) {
|
|
96
|
-
if (isLoadingMore) {
|
|
97
|
-
this.isLoadingMore = true;
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
this.isLoading = true;
|
|
101
|
-
}
|
|
102
|
-
try {
|
|
103
|
-
const { total, allLookbooks } = await services.HttpService().fetchSalonLookbooks(this.salonId, options);
|
|
104
|
-
this.totalLookbooks = total;
|
|
105
|
-
this.salonLookbooks = this.salonLookbooks.concat(allLookbooks);
|
|
106
|
-
this.hideLoadMore = allLookbooks.length < 20;
|
|
107
|
-
}
|
|
108
|
-
catch (error) { }
|
|
109
|
-
if (isLoadingMore) {
|
|
110
|
-
this.isLoadingMore = false;
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
this.isLoading = false;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
async onChangeFiltering(filterBy) {
|
|
117
|
-
try {
|
|
118
|
-
this.currentPage = 1;
|
|
119
|
-
this.totalLookbooks = 0;
|
|
120
|
-
this.salonLookbooks = [];
|
|
121
|
-
this.hideLoadMore = true;
|
|
122
|
-
this.filterBy = filterBy;
|
|
123
|
-
await this.fetchLookbooks(Object.assign({ page: this.currentPage, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [Number(this.filterBy)] } : {}));
|
|
124
|
-
if (window.masonry) {
|
|
125
|
-
this.isLayoutSetup = false;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
catch (error) { }
|
|
129
|
-
}
|
|
130
|
-
async onChangeSorting(sortBy) {
|
|
131
|
-
try {
|
|
132
|
-
this.currentPage = 1;
|
|
133
|
-
this.totalLookbooks = 0;
|
|
134
|
-
this.salonLookbooks = [];
|
|
135
|
-
this.hideLoadMore = true;
|
|
136
|
-
this.sortBy = sortBy;
|
|
137
|
-
await this.fetchLookbooks(Object.assign({ page: this.currentPage, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [this.filterBy] } : {}));
|
|
138
|
-
if (window.masonry) {
|
|
139
|
-
this.isLayoutSetup = false;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
catch (error) { }
|
|
143
|
-
}
|
|
144
|
-
async onLoadMore() {
|
|
145
|
-
try {
|
|
146
|
-
this.currentPage += 1;
|
|
147
|
-
await this.fetchLookbooks({ page: this.currentPage }, true);
|
|
148
|
-
if (window.masonry) {
|
|
149
|
-
this.isLayoutSetup = false;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
catch (error) { }
|
|
153
|
-
}
|
|
154
|
-
async fetchCategories() {
|
|
155
|
-
try {
|
|
156
|
-
this.salonCategories = await services.HttpService().fetchSalonCategories();
|
|
157
|
-
}
|
|
158
|
-
catch (error) { }
|
|
159
|
-
}
|
|
160
|
-
onClickLookbook(style) {
|
|
161
|
-
const elLookbookModal = document.createElement('div');
|
|
162
|
-
elLookbookModal.innerHTML = `
|
|
163
|
-
<style-detail
|
|
164
|
-
salon-id=${this.salonId}
|
|
165
|
-
salon-lookbook='${JSON.stringify(style)}'
|
|
166
|
-
></style-detail>
|
|
167
|
-
`;
|
|
168
|
-
document.body.appendChild(elLookbookModal);
|
|
169
|
-
}
|
|
170
|
-
renderHeader() {
|
|
171
|
-
const allFilterOptions = lookbookFilterOptions.concat(([...this.salonCategories]).map(category => {
|
|
172
|
-
return {
|
|
173
|
-
value: category.id,
|
|
174
|
-
label: category.name,
|
|
175
|
-
};
|
|
176
|
-
}));
|
|
177
|
-
return (index.h("div", { class: "view-header", style: {
|
|
178
|
-
display: 'flex',
|
|
179
|
-
flexDirection: 'row',
|
|
180
|
-
justifyContent: 'space-between',
|
|
181
|
-
alignItems: 'center',
|
|
182
|
-
marginBottom: '24px',
|
|
183
|
-
} }, index.h("div", { class: "salon-loobook--serch-result" }, this.totalLookbooks, " ", this.totalLookbooks === 1 ? 'result' : 'results'), index.h("div", { style: {
|
|
184
|
-
display: 'flex',
|
|
185
|
-
flexDirection: 'row',
|
|
186
|
-
alignItems: 'center',
|
|
187
|
-
} }, index.h("div", { class: "salon-loobook--filter-wrapper", style: {
|
|
188
|
-
display: 'flex',
|
|
189
|
-
flexDirection: 'row',
|
|
190
|
-
alignItems: 'center',
|
|
191
|
-
marginRight: '16px',
|
|
192
|
-
} }, index.h("label", { style: { marginRight: '8px', marginBottom: '0' } }, "Filter by"), index.h("select", { class: "form-select", style: { width: '160px' }, onChange: (evt) => this.onChangeFiltering(evt.target.value) }, allFilterOptions.map(filterOption => (index.h("option", { value: filterOption.value, selected: String(filterOption.value) === String(this.filterBy) }, filterOption.label))))), index.h("div", { class: "salon-loobook--sort-wrapper", style: {
|
|
193
|
-
display: 'flex',
|
|
194
|
-
flexDirection: 'row',
|
|
195
|
-
alignItems: 'center',
|
|
196
|
-
} }, index.h("label", { style: { marginRight: '8px', marginBottom: '0' } }, "Sort by"), index.h("select", { class: "form-select", style: { width: '160px' }, onChange: (evt) => this.onChangeSorting(evt.target.value) }, lookbookSortOptions.map(sortOption => (index.h("option", { value: sortOption.value, selected: sortOption.value === this.sortBy }, sortOption.label))))))));
|
|
197
|
-
}
|
|
198
|
-
render() {
|
|
199
|
-
return (index.h("div", { class: "salon-loobooks" }, index.h("div", null, index.h("div", { class: "view-content" }, this.renderHeader(), this.salonLookbooks.length > 0 && (index.h("div", { class: "salon-loobooks--grid", id: "salon-loobooks--grid" }, this.salonLookbooks.map(style => {
|
|
200
|
-
const { caption, imageThumbMedium, owner } = style;
|
|
201
|
-
return (index.h("div", { class: "salon-lookbook salon-loobooks--grid-item", onClick: () => this.onClickLookbook(style) }, index.h("div", { class: "card", style: {
|
|
202
|
-
background: 'none',
|
|
203
|
-
border: 'none',
|
|
204
|
-
// maxWidth: '200px',
|
|
205
|
-
} }, index.h("div", { class: "salon-lookbook--image", style: {
|
|
206
|
-
borderRadius: '8px',
|
|
207
|
-
overflow: 'hidden',
|
|
208
|
-
minHeight: '80px',
|
|
209
|
-
background: colors.Colors.Gray01,
|
|
210
|
-
} }, index.h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })), owner && (index.h("div", { class: "card-body", style: { paddingLeft: '0' } }, index.h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
|
|
211
|
-
})))), this.salonLookbooks.length > 0 && !this.hideLoadMore && (index.h("div", { class: "view-footer", style: { paddingTop: '16px', textAlign: 'center' } }, index.h("button", { type: "button", class: "btn btn-light btn-lg", onClick: () => this.onLoadMore(), style: {
|
|
212
|
-
background: colors.Colors.White,
|
|
213
|
-
border: `1px solid ${colors.Colors.Gray02}`,
|
|
214
|
-
borderRadius: '4px',
|
|
215
|
-
paddingLeft: '24px',
|
|
216
|
-
paddingRight: '24px',
|
|
217
|
-
} }, this.isLoadingMore ? 'Loading' : 'Load more'))))));
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
SalonLookbook.style = indexCss;
|
|
221
|
-
|
|
222
|
-
exports.salon_lookbook = SalonLookbook;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-47c2a5f6.js');
|
|
6
|
-
const colors = require('./colors-38421769.js');
|
|
7
|
-
|
|
8
|
-
const indexCss = "salon-ranking{display:block}";
|
|
9
|
-
|
|
10
|
-
const SalonRanking = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.ranking = undefined;
|
|
14
|
-
this.height = 16;
|
|
15
|
-
this.width = 16;
|
|
16
|
-
}
|
|
17
|
-
getRankingData(ranking) {
|
|
18
|
-
if (ranking === 5) {
|
|
19
|
-
return {
|
|
20
|
-
color: colors.Colors.Primary,
|
|
21
|
-
text: 'Viral',
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
if (ranking === 4) {
|
|
25
|
-
return {
|
|
26
|
-
color: colors.Colors.Orange03,
|
|
27
|
-
text: 'Advancing',
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
if (ranking === 3) {
|
|
31
|
-
return {
|
|
32
|
-
color: colors.Colors.Lilac03,
|
|
33
|
-
text: 'Progressing',
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
if (ranking === 2) {
|
|
37
|
-
return {
|
|
38
|
-
color: colors.Colors.Blue03,
|
|
39
|
-
text: 'Building',
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
color: colors.Colors.Gray05,
|
|
44
|
-
text: 'Starting',
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
const rankingData = this.getRankingData(this.ranking);
|
|
49
|
-
return (index.h("div", { style: {
|
|
50
|
-
display: 'flex',
|
|
51
|
-
alignItems: 'center',
|
|
52
|
-
justifyContent: 'center',
|
|
53
|
-
width: '100%',
|
|
54
|
-
color: rankingData.color,
|
|
55
|
-
} }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", width: this.width, height: this.height, viewBox: `0 0 ${this.width} ${this.height}`, style: { maxWidth: `${this.width}px`, height: 'auto', marginRight: '8px' } }, index.h("path", { d: "M14.9984 14.1273C15.0188 14.2658 14.8369 14.3204 14.7415 14.2251L8.11345 7.6028C6.41272 5.90355 6.42184 3.19468 8.23887 1.76037C9.63972 0.678363 11.7259 0.753791 13.1793 1.96961C14.1899 2.80207 14.706 3.93808 14.7471 5.07223L14.9984 14.1273Z", fill: "currentColor" }), index.h("path", { d: "M1.74847 8.24513C3.18403 6.42967 5.91004 6.40579 7.61078 8.10504L14.2548 14.7432C14.3501 14.8385 14.2795 15.0043 14.1568 14.9999L5.078 14.7329C3.94287 14.6918 2.78997 14.1604 1.97268 13.1665C0.755801 11.7144 0.680308 9.62998 1.74847 8.24513Z", fill: "currentColor" })), rankingData.text));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
SalonRanking.style = indexCss;
|
|
59
|
-
|
|
60
|
-
exports.salon_ranking = SalonRanking;
|