favesalon-embed 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/_commonjsHelpers-5cfcba41.js +36 -0
- package/dist/cjs/colors-38421769.js +69 -0
- package/dist/cjs/favesalon-embed.cjs.js +20 -0
- package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
- package/dist/cjs/google-map_5.cjs.entry.js +291 -0
- package/dist/cjs/index-7f190886.js +4396 -0
- package/{cjs/index-7d179a70.js → dist/cjs/index-e6bea8f5.js} +87 -3
- package/{cjs → dist/cjs}/index.cjs.js +0 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +29 -0
- package/dist/cjs/salon-booking.cjs.entry.js +50 -0
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +28 -0
- package/dist/cjs/salon-gift-card.cjs.entry.js +50 -0
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +95 -0
- package/dist/cjs/salon-lookbook.cjs.entry.js +218 -0
- package/{cjs → dist/cjs}/salon-ranking.cjs.entry.js +7 -7
- package/dist/cjs/salon-reviews.cjs.entry.js +186 -0
- package/dist/cjs/salon-services.cjs.entry.js +78 -0
- package/dist/cjs/salon-stylists.cjs.entry.js +112 -0
- package/{cjs/services-d6f8214c.js → dist/cjs/services-eee8f251.js} +317 -361
- package/dist/cjs/style-detail.cjs.entry.js +310 -0
- package/{cjs → dist/cjs}/user-avatar.cjs.entry.js +4 -4
- package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
- package/{collection → dist/collection}/collection-manifest.json +2 -2
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/{collection → dist/collection}/components/google-map/index.css +0 -1
- package/dist/collection/components/google-map/index.js +86 -0
- package/{collection → dist/collection}/components/salon-booking/index.css +10 -24
- package/{collection → dist/collection}/components/salon-booking/index.js +29 -11
- package/{collection → dist/collection}/components/salon-booking/salon-booking-modal.js +12 -6
- package/dist/collection/components/salon-gift-card/index.css +25 -0
- package/{collection → dist/collection}/components/salon-gift-card/index.js +44 -6
- package/{collection → dist/collection}/components/salon-gift-card/salon-gift-card-modal.js +30 -4
- package/{collection/components/salon-locations → dist/collection/components/salon-info}/index.css +0 -0
- package/{collection → dist/collection}/components/salon-info/index.js +6 -32
- package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -3
- package/dist/collection/components/salon-latest-reviews/index.js +176 -0
- package/dist/collection/components/salon-latest-styles/index.css +10 -0
- package/dist/collection/components/salon-latest-styles/index.js +178 -0
- package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +6 -6
- package/dist/collection/components/salon-locations/index.js +151 -0
- package/dist/collection/components/salon-lookbook/index.css +12 -0
- package/{collection → dist/collection}/components/salon-lookbook/index.js +122 -49
- package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
- package/{collection → dist/collection}/components/salon-ranking/index.js +5 -5
- package/dist/collection/components/salon-reviews/index.css +15 -0
- package/dist/collection/components/salon-reviews/index.js +286 -0
- package/dist/collection/components/salon-schedules/index.css +15 -0
- package/dist/collection/components/salon-schedules/index.js +189 -0
- package/{collection/components/salon-reviews → dist/collection/components/salon-services}/index.css +0 -0
- package/dist/collection/components/salon-services/index.js +156 -0
- package/{collection → dist/collection}/components/salon-stylists/index.css +0 -8
- package/dist/collection/components/salon-stylists/index.js +183 -0
- package/dist/collection/components/style-detail/index.css +62 -0
- package/dist/collection/components/style-detail/index.js +461 -0
- package/{collection/components/salon-services → dist/collection/components/user-avatar}/index.css +0 -0
- package/{collection → dist/collection}/components/user-avatar/index.js +2 -2
- package/dist/collection/constants/colors.js +65 -0
- package/{collection → dist/collection}/global/global.js +0 -0
- package/{collection → dist/collection}/index.js +0 -0
- package/dist/collection/services/services.js +174 -0
- package/dist/collection/types/common.js +11 -0
- package/{collection → dist/collection}/types/review.js +9 -5
- package/dist/collection/types/salon.js +58 -0
- package/{collection → dist/collection}/types/service.js +0 -0
- package/dist/collection/types/style.js +128 -0
- package/dist/collection/types/stylist.js +30 -0
- package/{collection/components/user-avatar/index.css → dist/collection/types/tmp.js} +0 -0
- package/{collection → dist/collection}/types/user.js +2 -2
- package/{collection → dist/collection}/utils/utils.js +0 -0
- package/{custom-elements → dist/custom-elements}/index.d.ts +12 -12
- package/{custom-elements → dist/custom-elements}/index.js +5783 -870
- package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
- package/dist/esm/colors-ea36347a.js +67 -0
- package/dist/esm/favesalon-embed.js +18 -0
- package/{esm → dist/esm}/global-e1089ffd.js +0 -0
- package/dist/esm/google-map_5.entry.js +283 -0
- package/{esm/index-2160b80b.js → dist/esm/index-6af0a03d.js} +87 -4
- package/dist/esm/index-80523fec.js +4393 -0
- package/{esm → dist/esm}/index.js +0 -0
- package/dist/esm/loader.js +18 -0
- package/{esm → dist/esm}/polyfills/core-js.js +0 -0
- package/{esm → dist/esm}/polyfills/css-shim.js +0 -0
- package/{esm → dist/esm}/polyfills/dom.js +0 -0
- package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
- package/{esm → dist/esm}/polyfills/index.js +0 -0
- package/{esm → dist/esm}/polyfills/system.js +0 -0
- package/dist/esm/salon-booking-modal.entry.js +25 -0
- package/dist/esm/salon-booking.entry.js +46 -0
- package/dist/esm/salon-gift-card-modal.entry.js +24 -0
- package/dist/esm/salon-gift-card.entry.js +46 -0
- package/dist/esm/salon-latest-reviews.entry.js +91 -0
- package/dist/esm/salon-lookbook.entry.js +214 -0
- package/{esm → dist/esm}/salon-ranking.entry.js +7 -7
- package/dist/esm/salon-reviews.entry.js +182 -0
- package/dist/esm/salon-services.entry.js +74 -0
- package/dist/esm/salon-stylists.entry.js +108 -0
- package/{esm/services-57fadd0a.js → dist/esm/services-295247b1.js} +310 -355
- package/dist/esm/style-detail.entry.js +306 -0
- package/{esm → dist/esm}/user-avatar.entry.js +4 -4
- package/{esm → dist/esm}/utils-e97485e0.js +0 -0
- package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
- package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
- package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
- package/dist/favesalon-embed/p-292b97ba.entry.js +1 -0
- package/{favesalon-embed → dist/favesalon-embed}/p-47e646f8.js +0 -0
- package/dist/favesalon-embed/p-4869dfed.entry.js +1 -0
- package/{favesalon-embed → dist/favesalon-embed}/p-4a5eca9a.js +0 -0
- package/dist/favesalon-embed/p-4aee4fd9.entry.js +1 -0
- package/dist/favesalon-embed/p-5528c705.entry.js +1 -0
- package/dist/favesalon-embed/p-612ad685.entry.js +1 -0
- package/dist/favesalon-embed/p-75aef7e0.entry.js +1 -0
- package/dist/favesalon-embed/p-8c780874.entry.js +1 -0
- package/dist/favesalon-embed/p-8dbf04c5.js +1 -0
- package/dist/favesalon-embed/p-9f31061a.entry.js +1 -0
- package/dist/favesalon-embed/p-a33331cc.js +1 -0
- package/dist/favesalon-embed/p-a60d78e9.entry.js +1 -0
- package/dist/favesalon-embed/p-a6debdae.entry.js +1 -0
- package/dist/favesalon-embed/p-bad1e9a7.entry.js +1 -0
- package/dist/favesalon-embed/p-c2ecb365.js +1 -0
- package/dist/favesalon-embed/p-c7dea70c.entry.js +1 -0
- package/dist/favesalon-embed/p-d6083940.js +1 -0
- package/dist/favesalon-embed/p-f0e14641.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +6 -0
- package/{index.cjs.js → dist/index.cjs.js} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/dist/types/components/google-map/index.d.ts +5 -0
- package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
- package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +1 -0
- package/{types → dist/types}/components/salon-gift-card/index.d.ts +2 -1
- package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +2 -0
- package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
- package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
- package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
- package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-lookbook/index.d.ts +7 -2
- package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
- package/dist/types/components/salon-reviews/index.d.ts +24 -0
- package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-services/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
- package/dist/types/components/style-detail/index.d.ts +24 -0
- package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
- package/{types → dist/types}/components.d.ts +62 -41
- package/dist/types/constants/colors.d.ts +65 -0
- package/{types → dist/types}/index.d.ts +0 -0
- package/dist/types/services/services.d.ts +60 -0
- package/{types → dist/types}/stencil-public-runtime.d.ts +0 -0
- package/dist/types/types/common.d.ts +11 -0
- package/{types → dist/types}/types/review.d.ts +4 -0
- package/{types → dist/types}/types/salon.d.ts +3 -1
- package/{types → dist/types}/types/service.d.ts +0 -0
- package/dist/types/types/style.d.ts +88 -0
- package/{types → dist/types}/types/stylist.d.ts +2 -1
- package/dist/types/types/tmp.d.ts +0 -0
- package/{types → dist/types}/types/user.d.ts +2 -2
- package/{types → dist/types}/utils/utils.d.ts +0 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +18 -13
- package/readme.md +23 -2
- package/cjs/colors-7f354880.js +0 -95
- package/cjs/favesalon-embed.cjs.js +0 -20
- package/cjs/google-map.cjs.entry.js +0 -47
- package/cjs/loader.cjs.js +0 -22
- package/cjs/salon-booking-modal.cjs.entry.js +0 -23
- package/cjs/salon-booking_2.cjs.entry.js +0 -56
- package/cjs/salon-contact_4.cjs.entry.js +0 -154
- package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
- package/cjs/salon-info.cjs.entry.js +0 -34
- package/cjs/salon-latest-reviews.cjs.entry.js +0 -57
- package/cjs/salon-lookbook.cjs.entry.js +0 -187
- package/cjs/salon-reviews.cjs.entry.js +0 -196
- package/cjs/salon-services.cjs.entry.js +0 -40
- package/cjs/salon-stylists.cjs.entry.js +0 -53
- package/collection/components/google-map/index.js +0 -97
- package/collection/components/salon-contact/index.js +0 -88
- package/collection/components/salon-gift-card/index.css +0 -25
- package/collection/components/salon-info/index.css +0 -3
- package/collection/components/salon-latest-reviews/index.js +0 -108
- package/collection/components/salon-locations/index.js +0 -80
- package/collection/components/salon-lookbook/index.css +0 -12
- package/collection/components/salon-reviews/index.js +0 -291
- package/collection/components/salon-schedules/index.css +0 -14
- package/collection/components/salon-schedules/index.js +0 -103
- package/collection/components/salon-services/index.js +0 -86
- package/collection/components/salon-styles/index.css +0 -23
- package/collection/components/salon-styles/index.js +0 -100
- package/collection/components/salon-stylists/index.js +0 -96
- package/collection/constants/colors.js +0 -91
- package/collection/services/services.js +0 -203
- package/collection/types/common.js +0 -2
- package/collection/types/salon.js +0 -52
- package/collection/types/style.js +0 -28
- package/collection/types/stylist.js +0 -13
- package/esm/colors-1ec90c5f.js +0 -93
- package/esm/favesalon-embed.js +0 -18
- package/esm/google-map.entry.js +0 -43
- package/esm/loader.js +0 -18
- package/esm/salon-booking-modal.entry.js +0 -19
- package/esm/salon-booking_2.entry.js +0 -51
- package/esm/salon-contact_4.entry.js +0 -147
- package/esm/salon-gift-card-modal.entry.js +0 -16
- package/esm/salon-info.entry.js +0 -30
- package/esm/salon-latest-reviews.entry.js +0 -53
- package/esm/salon-lookbook.entry.js +0 -183
- package/esm/salon-reviews.entry.js +0 -192
- package/esm/salon-services.entry.js +0 -36
- package/esm/salon-stylists.entry.js +0 -49
- package/favesalon-embed/favesalon-embed.esm.js +0 -1
- package/favesalon-embed/p-14a46adf.entry.js +0 -1
- package/favesalon-embed/p-2da2ed75.js +0 -1
- package/favesalon-embed/p-3712d9ab.entry.js +0 -1
- package/favesalon-embed/p-38066f9f.entry.js +0 -1
- package/favesalon-embed/p-4e2d7b29.js +0 -1
- package/favesalon-embed/p-520c8ffb.entry.js +0 -1
- package/favesalon-embed/p-54a1c294.entry.js +0 -1
- package/favesalon-embed/p-762520f2.js +0 -1
- package/favesalon-embed/p-94a0991e.entry.js +0 -1
- package/favesalon-embed/p-94b179eb.entry.js +0 -1
- package/favesalon-embed/p-977bd8bc.entry.js +0 -1
- package/favesalon-embed/p-bc363938.entry.js +0 -1
- package/favesalon-embed/p-bf9c83a3.entry.js +0 -1
- package/favesalon-embed/p-c5ebd3c9.entry.js +0 -1
- package/favesalon-embed/p-d84b61b0.entry.js +0 -1
- package/favesalon-embed/p-f15bcb43.entry.js +0 -1
- package/types/components/google-map/index.d.ts +0 -10
- package/types/components/salon-contact/index.d.ts +0 -9
- package/types/components/salon-reviews/index.d.ts +0 -23
- package/types/components/salon-styles/index.d.ts +0 -9
- package/types/constants/colors.d.ts +0 -88
- package/types/services/services.d.ts +0 -24
- package/types/types/common.d.ts +0 -2
- package/types/types/style.d.ts +0 -49
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-6af0a03d.js';
|
|
2
|
+
import './global-e1089ffd.js';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
6
|
+
*/
|
|
7
|
+
const patchEsm = () => {
|
|
8
|
+
return promiseResolve();
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const defineCustomElements = (win, options) => {
|
|
12
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
|
+
return patchEsm().then(() => {
|
|
14
|
+
return bootstrapLazy([["salon-latest-reviews",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonReviews":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-lookbook",[[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",[[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",[[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",[[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-booking-modal",[[0,"salon-booking-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"redirectUrl":[1,"redirect-url"],"isModalOpen":[32]}]]],["salon-gift-card",[[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-gift-card-modal",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"isModalOpen":[32]}]]],["salon-ranking",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["salon-services",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-stylists",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"totalStylists":[32],"page":[32],"isLoading":[32],"isLoadingMore":[32],"canLoadMore":[32],"fetchData":[64],"onLoadMore":[64]}]]],["user-avatar",[[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]],["google-map_5",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[32],"fetchData":[64]}],[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"salon-latest-styles",{"salonId":[2,"salon-id"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"isLoadingState":[32],"latestStyles":[32],"fetchData":[64]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]]], options);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { defineCustomElements };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
+
|
|
4
|
+
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}}";
|
|
5
|
+
|
|
6
|
+
let SalonBookingModal = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.primaryColor = Colors.Primary;
|
|
10
|
+
this.redirectUrl = window.btoa(window.location.href);
|
|
11
|
+
this.isModalOpen = true;
|
|
12
|
+
}
|
|
13
|
+
closeModal() {
|
|
14
|
+
this.isModalOpen = false;
|
|
15
|
+
const el = document.querySelector('salon-booking-modal');
|
|
16
|
+
el.remove();
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
20
|
+
return (h("div", { class: "salon-booking--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--booking" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, 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` })))))));
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
SalonBookingModal.style = indexCss;
|
|
24
|
+
|
|
25
|
+
export { SalonBookingModal as salon_booking_modal };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { c as color, l as lib } from './index-80523fec.js';
|
|
3
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
4
|
+
import './_commonjsHelpers-098d5b27.js';
|
|
5
|
+
|
|
6
|
+
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}}";
|
|
7
|
+
|
|
8
|
+
let SalonBooking = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.buttonClass = '';
|
|
12
|
+
this.buttonText = 'Book now';
|
|
13
|
+
this.primaryColor = Colors.Primary;
|
|
14
|
+
}
|
|
15
|
+
openModal() {
|
|
16
|
+
const elBookingModal = document.createElement('div');
|
|
17
|
+
elBookingModal.innerHTML = `
|
|
18
|
+
<salon-booking-modal
|
|
19
|
+
salon-id=${this.salonId}
|
|
20
|
+
primary-color=${this.primaryColor}
|
|
21
|
+
></salon-booking-modal>
|
|
22
|
+
`;
|
|
23
|
+
document.body.appendChild(elBookingModal);
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
27
|
+
let buttonStyle = {};
|
|
28
|
+
if (!this.buttonClass) {
|
|
29
|
+
const primaryColor = color(this.primaryColor);
|
|
30
|
+
const primaryColorHover = primaryColor.darken(0.05);
|
|
31
|
+
buttonStyle = lib.css({
|
|
32
|
+
backgroundColor: this.primaryColor,
|
|
33
|
+
borderColor: this.primaryColor,
|
|
34
|
+
color: primaryColor.isLight() ? Colors.Black01 : Colors.White,
|
|
35
|
+
':hover': {
|
|
36
|
+
backgroundColor: primaryColorHover,
|
|
37
|
+
borderColor: primaryColorHover,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return (h("div", { class: "salon-booking" }, h("div", { class: "salon-booking--button" }, h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
SalonBooking.style = indexCss;
|
|
45
|
+
|
|
46
|
+
export { SalonBooking as salon_booking };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
+
|
|
4
|
+
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}}";
|
|
5
|
+
|
|
6
|
+
let SalonGiftCardModal = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.primaryColor = Colors.Primary;
|
|
10
|
+
this.isModalOpen = true;
|
|
11
|
+
}
|
|
12
|
+
closeModal() {
|
|
13
|
+
this.isModalOpen = false;
|
|
14
|
+
const el = document.querySelector('salon-gift-card-modal');
|
|
15
|
+
el.remove();
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
19
|
+
return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, 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` })))))));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
SalonGiftCardModal.style = indexCss;
|
|
23
|
+
|
|
24
|
+
export { SalonGiftCardModal as salon_gift_card_modal };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { c as color, l as lib } from './index-80523fec.js';
|
|
3
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
4
|
+
import './_commonjsHelpers-098d5b27.js';
|
|
5
|
+
|
|
6
|
+
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}}";
|
|
7
|
+
|
|
8
|
+
let SalonGiftCard = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.buttonClass = '';
|
|
12
|
+
this.buttonText = 'Buy Gift card';
|
|
13
|
+
this.primaryColor = Colors.Primary;
|
|
14
|
+
}
|
|
15
|
+
openModal() {
|
|
16
|
+
const elBookingModal = document.createElement('div');
|
|
17
|
+
elBookingModal.innerHTML = `
|
|
18
|
+
<salon-gift-card-modal
|
|
19
|
+
salon-id=${this.salonId}
|
|
20
|
+
primary-color=${this.primaryColor}
|
|
21
|
+
></salon-gift-card-modal>
|
|
22
|
+
`;
|
|
23
|
+
document.body.appendChild(elBookingModal);
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
27
|
+
let buttonStyle = {};
|
|
28
|
+
if (!this.buttonClass) {
|
|
29
|
+
const primaryColor = color(this.primaryColor);
|
|
30
|
+
const primaryColorHover = primaryColor.darken(0.05);
|
|
31
|
+
buttonStyle = lib.css({
|
|
32
|
+
backgroundColor: this.primaryColor,
|
|
33
|
+
borderColor: this.primaryColor,
|
|
34
|
+
color: primaryColor.isLight() ? Colors.Black01 : Colors.White,
|
|
35
|
+
':hover': {
|
|
36
|
+
backgroundColor: primaryColorHover,
|
|
37
|
+
borderColor: primaryColorHover,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return (h("div", { class: "salon-gift-card" }, h("div", { class: "salon-gift-card--button" }, h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
SalonGiftCard.style = indexCss;
|
|
45
|
+
|
|
46
|
+
export { SalonGiftCard as salon_gift_card };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { H as HttpService, d as dayjs_min, s as shortDateYearFormat } from './services-295247b1.js';
|
|
3
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
4
|
+
import { g as getRatingText } from './utils-e97485e0.js';
|
|
5
|
+
import './_commonjsHelpers-098d5b27.js';
|
|
6
|
+
|
|
7
|
+
const indexCss = ".salon-latest-reviews .salon-review{min-width:280px}@media (min-width: 768px){.salon-latest-reviews .salon-review{min-width:300px}}";
|
|
8
|
+
|
|
9
|
+
let SalonLatestReviews = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.primaryColor = Colors.Primary;
|
|
13
|
+
this.salonReviews = [];
|
|
14
|
+
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
this.fetchData();
|
|
17
|
+
}
|
|
18
|
+
async fetchData() {
|
|
19
|
+
this.isLoading = true;
|
|
20
|
+
try {
|
|
21
|
+
const { data: allReviews } = await HttpService().fetchSalonReviews(this.salonId, { limit: 5 });
|
|
22
|
+
this.salonReviews = [...allReviews];
|
|
23
|
+
}
|
|
24
|
+
catch (e) { }
|
|
25
|
+
this.isLoading = false;
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (this.isLoading) {
|
|
29
|
+
return (h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index) => {
|
|
30
|
+
return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } }, h("div", { style: {
|
|
31
|
+
backgroundColor: Colors.Gray02,
|
|
32
|
+
borderRadius: '50px',
|
|
33
|
+
height: '48px',
|
|
34
|
+
width: '48px',
|
|
35
|
+
float: 'left',
|
|
36
|
+
} }), h("div", { style: {
|
|
37
|
+
backgroundColor: Colors.Gray01,
|
|
38
|
+
height: '16px',
|
|
39
|
+
width: '120px',
|
|
40
|
+
marginLeft: '16px',
|
|
41
|
+
marginTop: '14px',
|
|
42
|
+
float: 'left',
|
|
43
|
+
} })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (h("div", { style: {
|
|
44
|
+
backgroundColor: Colors.Gray01,
|
|
45
|
+
height: '20px',
|
|
46
|
+
width: '20px',
|
|
47
|
+
marginRight: '8px',
|
|
48
|
+
float: 'left',
|
|
49
|
+
} })))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, h("div", { style: {
|
|
50
|
+
backgroundColor: Colors.Gray01,
|
|
51
|
+
height: '16px',
|
|
52
|
+
width: '132px',
|
|
53
|
+
} })), h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, h("div", { class: "salon-review--description", style: {
|
|
54
|
+
fontSize: '16px',
|
|
55
|
+
lineHeight: '26px',
|
|
56
|
+
overflow: 'hidden',
|
|
57
|
+
} }, h("div", { style: {
|
|
58
|
+
backgroundColor: Colors.Gray01,
|
|
59
|
+
height: '16px',
|
|
60
|
+
width: '240px',
|
|
61
|
+
float: 'left',
|
|
62
|
+
} })))))));
|
|
63
|
+
}))));
|
|
64
|
+
}
|
|
65
|
+
const ratingTexts = getRatingText();
|
|
66
|
+
return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
|
|
67
|
+
const { user } = review;
|
|
68
|
+
return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px' } }, h("user-avatar", { size: 48, name: h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(score => (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.Gray04 }) }))), h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, dayjs_min(review.createdDate).format(shortDateYearFormat))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]), (review.title || review.description) && (h("div", { class: "salon-review--detail", style: { marginTop: '16px' } }, h("div", { class: "salon-review--description", style: {
|
|
69
|
+
fontSize: '16px',
|
|
70
|
+
lineHeight: '26px',
|
|
71
|
+
overflow: 'hidden',
|
|
72
|
+
maxHeight: review.photos.length > 0 ? '52px' : '104px',
|
|
73
|
+
} }, review.title || review.description))), review.photos.length > 0 && (h("div", { style: {
|
|
74
|
+
display: 'flex',
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
overflowX: 'auto',
|
|
77
|
+
} }, review.photos.map(photo => (h("div", { style: {
|
|
78
|
+
border: '1px solid #d9d9d9',
|
|
79
|
+
position: 'relative',
|
|
80
|
+
cursor: 'pointer',
|
|
81
|
+
borderRadius: '2px',
|
|
82
|
+
height: '66px',
|
|
83
|
+
marginTop: '12px',
|
|
84
|
+
marginRight: '12px',
|
|
85
|
+
} }, h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
|
|
86
|
+
}))));
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
SalonLatestReviews.style = indexCss;
|
|
90
|
+
|
|
91
|
+
export { SalonLatestReviews as salon_latest_reviews };
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
+
import { H as HttpService } from './services-295247b1.js';
|
|
4
|
+
import './_commonjsHelpers-098d5b27.js';
|
|
5
|
+
|
|
6
|
+
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}}";
|
|
7
|
+
|
|
8
|
+
const lookbookSortOptions = [{
|
|
9
|
+
value: 'like',
|
|
10
|
+
label: 'Most popular',
|
|
11
|
+
}, {
|
|
12
|
+
value: 'newest',
|
|
13
|
+
label: 'Newest first',
|
|
14
|
+
}, {
|
|
15
|
+
value: 'oldest',
|
|
16
|
+
label: 'Oldest first',
|
|
17
|
+
}];
|
|
18
|
+
const lookbookFilterOptions = [{
|
|
19
|
+
value: 'all',
|
|
20
|
+
label: 'All Category',
|
|
21
|
+
}];
|
|
22
|
+
let SalonLookbook = class {
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
registerInstance(this, hostRef);
|
|
25
|
+
this.isLoading = true;
|
|
26
|
+
this.currentPage = 1;
|
|
27
|
+
this.totalLookbooks = 0;
|
|
28
|
+
this.salonCategories = [];
|
|
29
|
+
this.salonLookbooks = [];
|
|
30
|
+
this.sortBy = lookbookSortOptions[1].value;
|
|
31
|
+
this.filterBy = lookbookFilterOptions[0].value;
|
|
32
|
+
}
|
|
33
|
+
componentWillLoad() {
|
|
34
|
+
this.fetchData();
|
|
35
|
+
this.injectSDK();
|
|
36
|
+
}
|
|
37
|
+
componentDidRender() {
|
|
38
|
+
this.setupGridLayout();
|
|
39
|
+
}
|
|
40
|
+
injectSDK() {
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
const script = document.createElement('script');
|
|
43
|
+
script.type = 'text/javascript';
|
|
44
|
+
script.src = 'https://cdn.jsdelivr.net/npm/macy@2';
|
|
45
|
+
document.body.appendChild(script);
|
|
46
|
+
return resolve(true);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
setupGridLayout() {
|
|
50
|
+
if (!this.isLayoutSetup && document.querySelector('#salon-loobooks--grid')) {
|
|
51
|
+
const script = document.createElement('script');
|
|
52
|
+
script.type = 'text/javascript';
|
|
53
|
+
script.innerHTML = `
|
|
54
|
+
var masonry = new Macy({
|
|
55
|
+
container: '#salon-loobooks--grid',
|
|
56
|
+
useContainerForBreakpoints: true,
|
|
57
|
+
margin: 16,
|
|
58
|
+
columns: 5,
|
|
59
|
+
breakAt: {
|
|
60
|
+
1024: {
|
|
61
|
+
columns: 4,
|
|
62
|
+
},
|
|
63
|
+
768: {
|
|
64
|
+
columns: 3,
|
|
65
|
+
},
|
|
66
|
+
576: {
|
|
67
|
+
margin: 16,
|
|
68
|
+
columns: 2,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
`;
|
|
73
|
+
document.body.appendChild(script);
|
|
74
|
+
this.isLayoutSetup = true;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async fetchData() {
|
|
78
|
+
try {
|
|
79
|
+
const promises = [
|
|
80
|
+
this.fetchLookbooks(Object.assign({ page: 1, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [this.filterBy] } : {})),
|
|
81
|
+
this.fetchCategories(),
|
|
82
|
+
];
|
|
83
|
+
return Promise.all(promises);
|
|
84
|
+
}
|
|
85
|
+
catch (e) { }
|
|
86
|
+
}
|
|
87
|
+
async fetchLookbooks(options, isLoadingMore) {
|
|
88
|
+
if (isLoadingMore) {
|
|
89
|
+
this.isLoadingMore = true;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
this.isLoading = true;
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
const { total, allLookbooks } = await HttpService().fetchSalonLookbooks(this.salonId, options);
|
|
96
|
+
this.totalLookbooks = total;
|
|
97
|
+
this.salonLookbooks = this.salonLookbooks.concat(allLookbooks);
|
|
98
|
+
this.hideLoadMore = allLookbooks.length < 20;
|
|
99
|
+
}
|
|
100
|
+
catch (error) { }
|
|
101
|
+
if (isLoadingMore) {
|
|
102
|
+
this.isLoadingMore = false;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
this.isLoading = false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async onChangeFiltering(filterBy) {
|
|
109
|
+
try {
|
|
110
|
+
this.currentPage = 1;
|
|
111
|
+
this.totalLookbooks = 0;
|
|
112
|
+
this.salonLookbooks = [];
|
|
113
|
+
this.hideLoadMore = true;
|
|
114
|
+
this.filterBy = filterBy;
|
|
115
|
+
await this.fetchLookbooks(Object.assign({ page: this.currentPage, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [Number(this.filterBy)] } : {}));
|
|
116
|
+
if (window.masonry) {
|
|
117
|
+
this.isLayoutSetup = false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch (error) { }
|
|
121
|
+
}
|
|
122
|
+
async onChangeSorting(sortBy) {
|
|
123
|
+
try {
|
|
124
|
+
this.currentPage = 1;
|
|
125
|
+
this.totalLookbooks = 0;
|
|
126
|
+
this.salonLookbooks = [];
|
|
127
|
+
this.hideLoadMore = true;
|
|
128
|
+
this.sortBy = sortBy;
|
|
129
|
+
await this.fetchLookbooks(Object.assign({ page: this.currentPage, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [this.filterBy] } : {}));
|
|
130
|
+
if (window.masonry) {
|
|
131
|
+
this.isLayoutSetup = false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch (error) { }
|
|
135
|
+
}
|
|
136
|
+
async onLoadMore() {
|
|
137
|
+
try {
|
|
138
|
+
this.currentPage += 1;
|
|
139
|
+
await this.fetchLookbooks({ page: this.currentPage }, true);
|
|
140
|
+
if (window.masonry) {
|
|
141
|
+
this.isLayoutSetup = false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch (error) { }
|
|
145
|
+
}
|
|
146
|
+
async fetchCategories() {
|
|
147
|
+
try {
|
|
148
|
+
this.salonCategories = await HttpService().fetchSalonCategories();
|
|
149
|
+
}
|
|
150
|
+
catch (error) { }
|
|
151
|
+
}
|
|
152
|
+
onClickLookbook(style) {
|
|
153
|
+
const elLookbookModal = document.createElement('div');
|
|
154
|
+
elLookbookModal.innerHTML = `
|
|
155
|
+
<style-detail
|
|
156
|
+
salon-id=${this.salonId}
|
|
157
|
+
salon-lookbook='${JSON.stringify(style)}'
|
|
158
|
+
></style-detail>
|
|
159
|
+
`;
|
|
160
|
+
document.body.appendChild(elLookbookModal);
|
|
161
|
+
}
|
|
162
|
+
renderHeader() {
|
|
163
|
+
const allFilterOptions = lookbookFilterOptions.concat(([...this.salonCategories]).map(category => {
|
|
164
|
+
return {
|
|
165
|
+
value: category.id,
|
|
166
|
+
label: category.name,
|
|
167
|
+
};
|
|
168
|
+
}));
|
|
169
|
+
return (h("div", { class: "view-header", style: {
|
|
170
|
+
display: 'flex',
|
|
171
|
+
flexDirection: 'row',
|
|
172
|
+
justifyContent: 'space-between',
|
|
173
|
+
alignItems: 'center',
|
|
174
|
+
marginBottom: '24px',
|
|
175
|
+
} }, h("div", { class: "salon-loobook--serch-result" }, this.totalLookbooks, " ", this.totalLookbooks === 1 ? 'result' : 'results'), h("div", { style: {
|
|
176
|
+
display: 'flex',
|
|
177
|
+
flexDirection: 'row',
|
|
178
|
+
alignItems: 'center',
|
|
179
|
+
} }, h("div", { class: "salon-loobook--filter-wrapper", style: {
|
|
180
|
+
display: 'flex',
|
|
181
|
+
flexDirection: 'row',
|
|
182
|
+
alignItems: 'center',
|
|
183
|
+
marginRight: '16px',
|
|
184
|
+
} }, h("label", { style: { marginRight: '8px', marginBottom: '0' } }, "Filter by"), h("select", { class: "form-select", style: { width: '160px' }, onChange: (evt) => this.onChangeFiltering(evt.target.value) }, allFilterOptions.map(filterOption => (h("option", { value: filterOption.value, selected: String(filterOption.value) === String(this.filterBy) }, filterOption.label))))), h("div", { class: "salon-loobook--sort-wrapper", style: {
|
|
185
|
+
display: 'flex',
|
|
186
|
+
flexDirection: 'row',
|
|
187
|
+
alignItems: 'center',
|
|
188
|
+
} }, h("label", { style: { marginRight: '8px', marginBottom: '0' } }, "Sort by"), h("select", { class: "form-select", style: { width: '160px' }, onChange: (evt) => this.onChangeSorting(evt.target.value) }, lookbookSortOptions.map(sortOption => (h("option", { value: sortOption.value, selected: sortOption.value === this.sortBy }, sortOption.label))))))));
|
|
189
|
+
}
|
|
190
|
+
render() {
|
|
191
|
+
return (h("div", { class: "salon-loobooks" }, h("div", null, h("div", { class: "view-content" }, this.renderHeader(), this.salonLookbooks.length > 0 && (h("div", { class: "salon-loobooks--grid", id: "salon-loobooks--grid" }, this.salonLookbooks.map(style => {
|
|
192
|
+
const { caption, imageThumbMedium, owner } = style;
|
|
193
|
+
return (h("div", { class: "salon-lookbook salon-loobooks--grid-item", onClick: () => this.onClickLookbook(style) }, h("div", { class: "card", style: {
|
|
194
|
+
background: 'none',
|
|
195
|
+
border: 'none',
|
|
196
|
+
// maxWidth: '200px',
|
|
197
|
+
} }, h("div", { class: "salon-lookbook--image", style: {
|
|
198
|
+
borderRadius: '8px',
|
|
199
|
+
overflow: 'hidden',
|
|
200
|
+
minHeight: '80px',
|
|
201
|
+
background: Colors.Gray01,
|
|
202
|
+
} }, h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })), owner && (h("div", { class: "card-body", style: { paddingLeft: '0' } }, h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
|
|
203
|
+
})))), this.salonLookbooks.length > 0 && !this.hideLoadMore && (h("div", { class: "view-footer", style: { paddingTop: '16px', textAlign: 'center' } }, h("button", { type: "button", class: "btn btn-light btn-lg", onClick: () => this.onLoadMore(), style: {
|
|
204
|
+
background: Colors.White,
|
|
205
|
+
border: `1px solid ${Colors.Gray02}`,
|
|
206
|
+
borderRadius: '4px',
|
|
207
|
+
paddingLeft: '24px',
|
|
208
|
+
paddingRight: '24px',
|
|
209
|
+
} }, this.isLoadingMore ? 'Loading' : 'Load more'))))));
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
SalonLookbook.style = indexCss;
|
|
213
|
+
|
|
214
|
+
export { SalonLookbook as salon_lookbook };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
2
|
-
import { C as Colors } from './colors-
|
|
1
|
+
import { r as registerInstance, h } from './index-6af0a03d.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = "salon-ranking{display:block}";
|
|
5
5
|
|
|
@@ -12,30 +12,30 @@ let SalonRanking = class {
|
|
|
12
12
|
getRankingData(ranking) {
|
|
13
13
|
if (ranking === 5) {
|
|
14
14
|
return {
|
|
15
|
-
color: Colors.
|
|
15
|
+
color: Colors.Primary,
|
|
16
16
|
text: 'Viral',
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
if (ranking === 4) {
|
|
20
20
|
return {
|
|
21
|
-
color: Colors.
|
|
21
|
+
color: Colors.Orange03,
|
|
22
22
|
text: 'Advancing',
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
if (ranking === 3) {
|
|
26
26
|
return {
|
|
27
|
-
color: Colors.
|
|
27
|
+
color: Colors.Lilac03,
|
|
28
28
|
text: 'Progressing',
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
if (ranking === 2) {
|
|
32
32
|
return {
|
|
33
|
-
color: Colors.
|
|
33
|
+
color: Colors.Blue03,
|
|
34
34
|
text: 'Building',
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
|
-
color: Colors.
|
|
38
|
+
color: Colors.Gray05,
|
|
39
39
|
text: 'Starting',
|
|
40
40
|
};
|
|
41
41
|
}
|