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.
Files changed (183) hide show
  1. package/dist/custom-elements/index.d.ts +42 -0
  2. package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -6
  3. package/dist/favesalon-embed/activate-form.entry.js +70 -0
  4. package/dist/favesalon-embed/app-globals-74127f4b.js +7 -0
  5. package/dist/favesalon-embed/app-globals-f954a22f.js +7 -0
  6. package/dist/favesalon-embed/change-password-form.entry.js +81 -0
  7. package/dist/favesalon-embed/chat-box.entry.js +55 -0
  8. package/dist/{esm → favesalon-embed}/chat-button.entry.js +36 -13
  9. package/dist/favesalon-embed/chat-form.entry.js +39 -0
  10. package/dist/favesalon-embed/chat-messages.entry.js +71 -0
  11. package/dist/favesalon-embed/chat-rooms.entry.js +111 -0
  12. package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
  13. package/dist/favesalon-embed/dom-64053c71.js +73 -0
  14. package/dist/favesalon-embed/favesalon-embed.css +114 -1
  15. package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
  16. package/dist/{esm → favesalon-embed}/google-map.entry.js +1 -1
  17. package/dist/{esm/index-a1c7583c.js → favesalon-embed/index-00b83e1c.js} +425 -15
  18. package/dist/favesalon-embed/index-888e99e3.js +3371 -0
  19. package/dist/favesalon-embed/index-a229b3b5.js +3371 -0
  20. package/dist/favesalon-embed/index.esm.js +1 -0
  21. package/dist/{esm/chat-box_5.entry.js → favesalon-embed/lodash-d5526b38.js} +27 -243
  22. package/dist/favesalon-embed/login-form.entry.js +67 -0
  23. package/dist/{cjs/chat-button.cjs.entry.js → favesalon-embed/notify-sounds.entry.js} +20 -44
  24. package/dist/favesalon-embed/register-form.entry.js +88 -0
  25. package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
  26. package/dist/favesalon-embed/reset-password-form.entry.js +47 -0
  27. package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
  28. package/dist/{esm → favesalon-embed}/salon-booking.entry.js +4 -4
  29. package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
  30. package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +4 -4
  31. package/dist/{esm → favesalon-embed}/salon-info.entry.js +3 -3
  32. package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +22 -6
  33. package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +27 -105
  34. package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
  35. package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +18 -6
  36. package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
  37. package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +20 -6
  38. package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
  39. package/dist/{esm → favesalon-embed}/salon-services.entry.js +25 -13
  40. package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
  41. package/dist/{esm/services-257442e2.js → favesalon-embed/services-5a4c43a6.js} +2608 -188
  42. package/dist/{cjs/services-d1bdf299.js → favesalon-embed/services-d71be591.js} +2616 -191
  43. package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
  44. package/dist/{esm → favesalon-embed}/style-detail.entry.js +29 -11
  45. package/dist/favesalon-embed/user-avatar.entry.js +52 -0
  46. package/dist/favesalon-embed/user-form.entry.js +44 -0
  47. package/dist/{collection/utils/utils.js → favesalon-embed/utils-fd30fb29.js} +14 -5
  48. package/dist/types/components/activate-form/activate-form.d.ts +12 -0
  49. package/dist/types/components/activate-form/test/activate-form.spec.d.ts +1 -0
  50. package/dist/types/components/change-password-form/change-password-form.d.ts +12 -0
  51. package/dist/types/components/chat-box/index.d.ts +1 -0
  52. package/dist/types/components/chat-button/index.d.ts +6 -2
  53. package/dist/types/components/chat-button/notify-sounds.d.ts +5 -0
  54. package/dist/types/components/chat-rooms/index.d.ts +6 -0
  55. package/dist/types/components/login-form/login-form.d.ts +10 -0
  56. package/dist/types/components/register-form/register-form.d.ts +13 -0
  57. package/dist/types/components/reset-password-form/reset-password-form.d.ts +9 -0
  58. package/dist/types/components/user-form/user-form.d.ts +7 -0
  59. package/dist/types/components.d.ts +127 -2
  60. package/dist/types/services/services.d.ts +17 -0
  61. package/dist/types/types/chat.d.ts +1 -0
  62. package/dist/types/types/user.d.ts +16 -0
  63. package/dist/types/utils/utils.d.ts +1 -0
  64. package/dist/types/utils/utils.spec.d.ts +1 -0
  65. package/package.json +1 -1
  66. package/dist/cjs/chat-box_5.cjs.entry.js +0 -17439
  67. package/dist/cjs/colors-38421769.js +0 -69
  68. package/dist/cjs/favesalon-embed.cjs.js +0 -23
  69. package/dist/cjs/google-map.cjs.entry.js +0 -52
  70. package/dist/cjs/index-7f190886.js +0 -4396
  71. package/dist/cjs/index-dd8176c4.js +0 -1531
  72. package/dist/cjs/index.cjs.js +0 -2
  73. package/dist/cjs/loader.cjs.js +0 -22
  74. package/dist/cjs/relativeTime-3721080d.js +0 -9
  75. package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
  76. package/dist/cjs/salon-booking.cjs.entry.js +0 -51
  77. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
  78. package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
  79. package/dist/cjs/salon-info.cjs.entry.js +0 -33
  80. package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
  81. package/dist/cjs/salon-latest-styles_3.cjs.entry.js +0 -241
  82. package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
  83. package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
  84. package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
  85. package/dist/cjs/salon-services.cjs.entry.js +0 -81
  86. package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
  87. package/dist/cjs/style-detail.cjs.entry.js +0 -312
  88. package/dist/cjs/utils-c5a33b3c.js +0 -23
  89. package/dist/collection/collection-manifest.json +0 -33
  90. package/dist/collection/components/chat-box/index.css +0 -105
  91. package/dist/collection/components/chat-box/index.js +0 -138
  92. package/dist/collection/components/chat-button/index.css +0 -101
  93. package/dist/collection/components/chat-button/index.js +0 -155
  94. package/dist/collection/components/chat-form/index.css +0 -40
  95. package/dist/collection/components/chat-form/index.js +0 -79
  96. package/dist/collection/components/chat-messages/index.css +0 -48
  97. package/dist/collection/components/chat-messages/index.js +0 -142
  98. package/dist/collection/components/chat-rooms/index.css +0 -102
  99. package/dist/collection/components/chat-rooms/index.js +0 -157
  100. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  101. package/dist/collection/components/google-map/index.css +0 -5
  102. package/dist/collection/components/google-map/index.js +0 -90
  103. package/dist/collection/components/salon-booking/index.css +0 -30
  104. package/dist/collection/components/salon-booking/index.js +0 -126
  105. package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
  106. package/dist/collection/components/salon-gift-card/index.css +0 -30
  107. package/dist/collection/components/salon-gift-card/index.js +0 -126
  108. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
  109. package/dist/collection/components/salon-info/index.css +0 -1
  110. package/dist/collection/components/salon-info/index.js +0 -77
  111. package/dist/collection/components/salon-latest-reviews/index.css +0 -11
  112. package/dist/collection/components/salon-latest-reviews/index.js +0 -163
  113. package/dist/collection/components/salon-latest-styles/index.css +0 -12
  114. package/dist/collection/components/salon-locations/index.css +0 -24
  115. package/dist/collection/components/salon-lookbook/index.css +0 -15
  116. package/dist/collection/components/salon-lookbook/index.js +0 -368
  117. package/dist/collection/components/salon-ranking/index.css +0 -3
  118. package/dist/collection/components/salon-ranking/index.js +0 -117
  119. package/dist/collection/components/salon-reviews/index.css +0 -18
  120. package/dist/collection/components/salon-reviews/index.js +0 -249
  121. package/dist/collection/components/salon-schedules/index.css +0 -18
  122. package/dist/collection/components/salon-services/index.css +0 -1
  123. package/dist/collection/components/salon-services/index.js +0 -146
  124. package/dist/collection/components/salon-stylists/index.css +0 -43
  125. package/dist/collection/components/salon-stylists/index.js +0 -184
  126. package/dist/collection/components/style-detail/index.css +0 -76
  127. package/dist/collection/components/style-detail/index.js +0 -386
  128. package/dist/collection/components/user-avatar/index.css +0 -0
  129. package/dist/collection/components/user-avatar/index.js +0 -159
  130. package/dist/collection/constants/colors.js +0 -65
  131. package/dist/collection/global/global.js +0 -0
  132. package/dist/collection/mocks/users.js +0 -10
  133. package/dist/collection/services/services.js +0 -295
  134. package/dist/collection/types/chat.js +0 -23
  135. package/dist/collection/types/common.js +0 -11
  136. package/dist/collection/types/review.js +0 -39
  137. package/dist/collection/types/salon.js +0 -58
  138. package/dist/collection/types/service.js +0 -24
  139. package/dist/collection/types/style.js +0 -128
  140. package/dist/collection/types/stylist.js +0 -30
  141. package/dist/collection/types/user.js +0 -10
  142. package/dist/custom-elements/index.js +0 -44974
  143. package/dist/esm/_commonjsHelpers-66ac50f5.js +0 -32
  144. package/dist/esm/favesalon-embed.js +0 -18
  145. package/dist/esm/index-0494771f.js +0 -1504
  146. package/dist/esm/index.js +0 -1
  147. package/dist/esm/loader.js +0 -18
  148. package/dist/esm/polyfills/core-js.js +0 -11
  149. package/dist/esm/polyfills/css-shim.js +0 -1
  150. package/dist/esm/polyfills/dom.js +0 -79
  151. package/dist/esm/polyfills/es5-html-element.js +0 -1
  152. package/dist/esm/polyfills/index.js +0 -34
  153. package/dist/esm/polyfills/system.js +0 -6
  154. package/dist/esm/relativeTime-baa50aa2.js +0 -7
  155. package/dist/esm/salon-latest-styles_3.entry.js +0 -235
  156. package/dist/esm/utils-e97485e0.js +0 -19
  157. package/dist/favesalon-embed/p-05a1c88a.entry.js +0 -1
  158. package/dist/favesalon-embed/p-0acf0447.entry.js +0 -1
  159. package/dist/favesalon-embed/p-0bc4f624.js +0 -1
  160. package/dist/favesalon-embed/p-1af1515f.entry.js +0 -1
  161. package/dist/favesalon-embed/p-1cba5fc9.entry.js +0 -1
  162. package/dist/favesalon-embed/p-39a4ef15.entry.js +0 -1
  163. package/dist/favesalon-embed/p-3e2cb05b.entry.js +0 -1
  164. package/dist/favesalon-embed/p-47e646f8.js +0 -1
  165. package/dist/favesalon-embed/p-487b311f.entry.js +0 -1
  166. package/dist/favesalon-embed/p-55387c2f.entry.js +0 -1
  167. package/dist/favesalon-embed/p-566f05b4.entry.js +0 -1
  168. package/dist/favesalon-embed/p-862a0de0.entry.js +0 -1
  169. package/dist/favesalon-embed/p-9fe0cbeb.js +0 -2
  170. package/dist/favesalon-embed/p-a33331cc.js +0 -1
  171. package/dist/favesalon-embed/p-aeeb7b5f.entry.js +0 -1
  172. package/dist/favesalon-embed/p-b08e5b54.js +0 -6
  173. package/dist/favesalon-embed/p-b5cca5fc.entry.js +0 -1
  174. package/dist/favesalon-embed/p-c7fb7af5.js +0 -1580
  175. package/dist/favesalon-embed/p-ccab56d8.js +0 -1
  176. package/dist/favesalon-embed/p-d6e13053.entry.js +0 -1
  177. package/dist/favesalon-embed/p-dee42d34.entry.js +0 -1
  178. package/dist/favesalon-embed/p-e661ca1d.entry.js +0 -1
  179. package/dist/favesalon-embed/p-eeceab9c.entry.js +0 -1
  180. package/dist/index.cjs.js +0 -1
  181. package/dist/index.js +0 -1
  182. /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
  183. /package/dist/{collection/index.js → types/components/activate-form/test/activate-form.e2e.d.ts} +0 -0
@@ -1,142 +0,0 @@
1
- import dayjs from 'dayjs';
2
- import { h } from '@stencil/core';
3
- import { Colors } from '../../constants/colors';
4
- import { dateFormat } from '../../types/common';
5
- import HttpService from '../../services/services';
6
- import relativeTime from 'dayjs/plugin/relativeTime';
7
- dayjs.extend(relativeTime);
8
- export class ChatMessages {
9
- constructor() {
10
- this.markMessagesAsRead = async () => {
11
- try {
12
- const unreadMessages = (this.messages || []).filter(message => {
13
- return Boolean(message.unRead) && message.senderId !== this.sender.id;
14
- });
15
- if (unreadMessages.length > 0) {
16
- await HttpService().markMessagesAsRead(this.chatRoomId, unreadMessages);
17
- }
18
- }
19
- catch (e) { }
20
- };
21
- this.scrollToLastMessage = () => {
22
- const targetElement = document.getElementById('chat--last-message');
23
- targetElement && targetElement.scrollIntoView();
24
- };
25
- this.renderMessage = (chatMessage) => {
26
- const { message, senderId, timestamp } = chatMessage;
27
- const isOwner = this.sender.id === senderId;
28
- const todayStr = dayjs().format(dateFormat);
29
- const messageDayStr = dayjs(timestamp).format(dateFormat);
30
- return (h("div", { class: `chat-message ${isOwner ? 'is-owner' : 'is-guest'}` }, h("div", { class: "chat-message--meta" }, h("user-avatar", { size: 40, shortName: String(((isOwner ? this.sender : this.receiver) || {}).fullName || '').charAt(0), avatar: ((isOwner ? this.sender : this.receiver) || {}).avatar }), h("div", { class: "chat-message--content" }, h("div", { class: "chat-message--title" }, message), timestamp && (h("div", { class: "chat-message--time" }, todayStr === messageDayStr ? dayjs(timestamp).format('HH:mm') : dayjs(timestamp).fromNow()))))));
31
- };
32
- this.sender = {};
33
- this.receiver = {};
34
- this.messages = [];
35
- this.chatRoomId = undefined;
36
- }
37
- componentDidLoad() {
38
- this.markMessagesAsRead();
39
- }
40
- componentDidUpdate() {
41
- this.scrollToLastMessage();
42
- }
43
- render() {
44
- const isEmpty = (this.messages || []).length === 0;
45
- return (h("div", { class: "chat-messages" }, !isEmpty && this.messages.map(this.renderMessage), isEmpty && (h("div", { style: { padding: '48px', textAlign: 'center' } }, h("div", { style: { color: Colors.Green04 } }, "No messages yet"))), h("div", { id: "chat--last-message" })));
46
- }
47
- static get is() { return "chat-messages"; }
48
- static get originalStyleUrls() {
49
- return {
50
- "$": ["index.css"]
51
- };
52
- }
53
- static get styleUrls() {
54
- return {
55
- "$": ["index.css"]
56
- };
57
- }
58
- static get properties() {
59
- return {
60
- "sender": {
61
- "type": "unknown",
62
- "mutable": false,
63
- "complexType": {
64
- "original": "User",
65
- "resolved": "User",
66
- "references": {
67
- "User": {
68
- "location": "import",
69
- "path": "../../types/user"
70
- }
71
- }
72
- },
73
- "required": false,
74
- "optional": false,
75
- "docs": {
76
- "tags": [],
77
- "text": ""
78
- },
79
- "defaultValue": "{} as User"
80
- },
81
- "receiver": {
82
- "type": "unknown",
83
- "mutable": false,
84
- "complexType": {
85
- "original": "User",
86
- "resolved": "User",
87
- "references": {
88
- "User": {
89
- "location": "import",
90
- "path": "../../types/user"
91
- }
92
- }
93
- },
94
- "required": false,
95
- "optional": false,
96
- "docs": {
97
- "tags": [],
98
- "text": ""
99
- },
100
- "defaultValue": "{} as User"
101
- },
102
- "messages": {
103
- "type": "unknown",
104
- "mutable": false,
105
- "complexType": {
106
- "original": "ChatMessage[]",
107
- "resolved": "ChatMessage[]",
108
- "references": {
109
- "ChatMessage": {
110
- "location": "import",
111
- "path": "../../types/chat"
112
- }
113
- }
114
- },
115
- "required": false,
116
- "optional": false,
117
- "docs": {
118
- "tags": [],
119
- "text": ""
120
- },
121
- "defaultValue": "[]"
122
- },
123
- "chatRoomId": {
124
- "type": "string",
125
- "mutable": false,
126
- "complexType": {
127
- "original": "string",
128
- "resolved": "string",
129
- "references": {}
130
- },
131
- "required": false,
132
- "optional": false,
133
- "docs": {
134
- "tags": [],
135
- "text": ""
136
- },
137
- "attribute": "chat-room-id",
138
- "reflect": false
139
- }
140
- };
141
- }
142
- }
@@ -1,102 +0,0 @@
1
- chat-rooms,
2
- .chat-rooms {
3
- display: flex;
4
- flex-direction: column;
5
- height: 100%;
6
- width: 100%;
7
- }
8
-
9
- .chat-rooms--search {
10
- background-color: #001529;
11
- border-bottom: 1px solid #EFEFEF;
12
- display: flex;
13
- padding: 16px;
14
- }
15
-
16
- .chat-rooms--search > input {
17
- background-color: #F5F5F5;
18
- border: 1px solid #EFEFEF;
19
- height: 40px;
20
- width: 100%;
21
- font-size: 16px;
22
- padding-left: 16px;
23
- padding-right: 16px;
24
-
25
- -moz-border-radius: 4px;
26
- -webkit-border-radius: 4px;
27
- border-radius: 4px;
28
- }
29
-
30
- .chat-rooms--search > input:hover,
31
- .chat-rooms--search > input:active {
32
- border: 1px solid #DBDBDB;
33
- }
34
-
35
- .chat-rooms--search > button {
36
- background-color: #F5F5F5;
37
- border: 1px solid #EFEFEF;
38
- font-size: 16px;
39
- min-width: 80px;
40
- height: 40px;
41
- margin-left: 12px;
42
- -moz-border-radius: 4px;
43
- -webkit-border-radius: 4px;
44
- border-radius: 4px;
45
- }
46
-
47
- .chat-rooms--list {
48
- flex-grow: 1;
49
- flex-shrink: 1;
50
- overflow-y: auto;
51
- }
52
-
53
- .chat-room {
54
- cursor: pointer;
55
- display: flex;
56
- position: relative;
57
- margin-bottom: 1px;
58
- padding: 12px 16px;
59
- }
60
-
61
- .chat-room:hover,
62
- .chat-room.is-active {
63
- background-color: #F5F5F5;
64
- }
65
-
66
- .chat-room--user {
67
- flex-grow: 1;
68
- flex-shrink: 1;
69
- overflow: hidden;
70
- }
71
-
72
- .chat-room--user-name {
73
- font-size: 16px;
74
- font-weight: 600;
75
- line-height: 18px;
76
- white-space: nowrap;
77
- overflow: hidden;
78
- text-overflow: ellipsis;
79
- }
80
-
81
- .chat-room--latest-message {
82
- font-size: 12px;
83
- line-height: 14px;
84
- margin-top: 4px;
85
- white-space: nowrap;
86
- overflow: hidden;
87
- text-overflow: ellipsis;
88
- }
89
-
90
- .chat-room--user-indicator {
91
- background-color: rgb(240, 90, 97);
92
- border: 1px solid rgb(255, 255, 255);
93
- height: 8px;
94
- width: 8px;
95
- position: absolute;
96
- right: 8px;
97
- top: 50%;
98
- transform: translate(0, -50%);
99
- -moz-border-radius: 8px;
100
- -webkit-border-radius: 8px;
101
- border-radius: 8px;
102
- }
@@ -1,157 +0,0 @@
1
- import { debounce, last } from 'lodash';
2
- import { h } from '@stencil/core';
3
- import { Colors } from '../../constants/colors';
4
- export class ChatRooms {
5
- constructor() {
6
- this.clickRoom = (chatRoom) => {
7
- this.onClickRoom(chatRoom);
8
- };
9
- this.onSearchRooms = debounce((keyword) => {
10
- this.keyword = keyword;
11
- }, 500);
12
- this.renderChatRoom = (chatRoom, index) => {
13
- const { uid, members, messages } = chatRoom;
14
- const receiverUser = members.find(user => user.id !== this.senderId);
15
- const isActiveRoom = (this.activeRoom || {}).uid === uid;
16
- let unreadMessages = 0;
17
- const lastMessage = last(messages || []);
18
- (messages || []).forEach(message => {
19
- if (Boolean(message.unRead) && message.senderId !== this.senderId) {
20
- unreadMessages += 1;
21
- }
22
- });
23
- return (h("div", { key: `chat-room--${uid}-${index}`, class: `chat-room ${isActiveRoom ? 'is-active' : ''}`, onClick: () => !isActiveRoom && this.clickRoom(chatRoom) }, h("div", { class: "chat-room--user" }, h("user-avatar", { size: 48, avatar: receiverUser.avatar, name: h("div", { class: "chat-room--user-name" }, receiverUser.fullName), description: lastMessage && (h("div", { class: "chat-room--latest-message" }, lastMessage.senderId === this.senderId ? 'You: ' : '', lastMessage.message)), shortName: String(receiverUser.fullName || '').charAt(0) })), unreadMessages > 0 && (h("div", { class: "chat-room--user-indicator" }))));
24
- };
25
- this.senderId = undefined;
26
- this.chatRooms = undefined;
27
- this.activeRoom = undefined;
28
- this.onClickRoom = undefined;
29
- this.keyword = undefined;
30
- }
31
- render() {
32
- const visibleRooms = (this.chatRooms || []).filter(chatRoom => {
33
- if (this.keyword) {
34
- const receiverUser = chatRoom.members.find(user => user.id !== this.senderId);
35
- return String(receiverUser.fullName).toLowerCase().indexOf(String(this.keyword).toLowerCase()) > -1;
36
- }
37
- return true;
38
- });
39
- return (h("div", { class: "chat-rooms" }, h("div", { class: "chat-rooms--search" }, h("input", { autoComplete: "off", placeholder: "Enter a name...", onInput: evt => this.onSearchRooms(evt.target.value) })), h("div", { class: "chat-rooms--list" }, !this.chatRooms && [1, 2, 3, 4].map(fakeId => (h("div", { key: `chat-room--${fakeId}`, class: "chat-room" }, h("div", { class: "chat-room--user" }, h("div", { style: { display: "flex", alignItems: "center" } }, h("div", { style: {
40
- backgroundColor: Colors.Gray02,
41
- borderRadius: '50%',
42
- height: `48px`,
43
- width: `48px`,
44
- minWidth: `48px`,
45
- } }), h("div", { style: {
46
- flexShrink: '1',
47
- flexGrow: '1',
48
- marginLeft: '12px',
49
- } }, h("div", { style: {
50
- backgroundColor: Colors.Gray02,
51
- height: '16px',
52
- width: '30%',
53
- } }), h("div", { style: {
54
- backgroundColor: Colors.Gray01,
55
- marginTop: '12px',
56
- height: '16px',
57
- width: '60%',
58
- } }))))))), this.chatRooms && visibleRooms.length > 0 && visibleRooms.map(this.renderChatRoom), this.chatRooms && visibleRooms.length === 0 && (h("div", { style: { color: Colors.Gray04, padding: '64px 24px', textAlign: 'center' } }, "No available users")))));
59
- }
60
- static get is() { return "chat-rooms"; }
61
- static get originalStyleUrls() {
62
- return {
63
- "$": ["index.css"]
64
- };
65
- }
66
- static get styleUrls() {
67
- return {
68
- "$": ["index.css"]
69
- };
70
- }
71
- static get properties() {
72
- return {
73
- "senderId": {
74
- "type": "number",
75
- "mutable": false,
76
- "complexType": {
77
- "original": "number",
78
- "resolved": "number",
79
- "references": {}
80
- },
81
- "required": false,
82
- "optional": false,
83
- "docs": {
84
- "tags": [],
85
- "text": ""
86
- },
87
- "attribute": "sender-id",
88
- "reflect": false
89
- },
90
- "chatRooms": {
91
- "type": "unknown",
92
- "mutable": false,
93
- "complexType": {
94
- "original": "ChatRoom[]",
95
- "resolved": "ChatRoom[]",
96
- "references": {
97
- "ChatRoom": {
98
- "location": "import",
99
- "path": "../../types/chat"
100
- }
101
- }
102
- },
103
- "required": false,
104
- "optional": false,
105
- "docs": {
106
- "tags": [],
107
- "text": ""
108
- }
109
- },
110
- "activeRoom": {
111
- "type": "unknown",
112
- "mutable": false,
113
- "complexType": {
114
- "original": "ChatRoom",
115
- "resolved": "ChatRoom",
116
- "references": {
117
- "ChatRoom": {
118
- "location": "import",
119
- "path": "../../types/chat"
120
- }
121
- }
122
- },
123
- "required": false,
124
- "optional": false,
125
- "docs": {
126
- "tags": [],
127
- "text": ""
128
- }
129
- },
130
- "onClickRoom": {
131
- "type": "unknown",
132
- "mutable": false,
133
- "complexType": {
134
- "original": "(chatRoom: ChatRoom) => void",
135
- "resolved": "(chatRoom: ChatRoom) => void",
136
- "references": {
137
- "ChatRoom": {
138
- "location": "import",
139
- "path": "../../types/chat"
140
- }
141
- }
142
- },
143
- "required": false,
144
- "optional": false,
145
- "docs": {
146
- "tags": [],
147
- "text": ""
148
- }
149
- }
150
- };
151
- }
152
- static get states() {
153
- return {
154
- "keyword": {}
155
- };
156
- }
157
- }
@@ -1,5 +0,0 @@
1
- google-map {
2
- display: block;
3
- width: 100%;
4
- height: 100%;
5
- }
@@ -1,90 +0,0 @@
1
- import { getAssetPath, h } from '@stencil/core';
2
- import { Colors } from '../../constants/colors';
3
- export class GoogleMap {
4
- constructor() {
5
- this.locationName = undefined;
6
- this.locationAddress = undefined;
7
- }
8
- render() {
9
- const mapPlaceholder = getAssetPath('./assets/map--placeholder.jpeg');
10
- return (h("div", { style: {
11
- backgroundImage: `url("${mapPlaceholder}")`,
12
- backgroundColor: Colors.Gray01,
13
- backgroundPosition: 'center center',
14
- backgroundRepeat: 'no-repeat',
15
- backgroundSize: 'cover',
16
- borderRadius: '8px',
17
- position: 'relative',
18
- height: '296px',
19
- } }, h("div", { style: {
20
- position: 'absolute',
21
- left: '50%',
22
- top: '50%',
23
- transform: 'translate(-50%, -50%)',
24
- } }, h("a", { target: "_blank", rel: "noopener noreferrer", href: `https://www.google.com/maps/search/?api=1&query=${this.locationAddress}`, style: {
25
- backgroundColor: Colors.Red01,
26
- border: `1px solid ${Colors.Red02}`,
27
- borderRadius: '4px',
28
- color: Colors.TextColor,
29
- padding: '12px',
30
- display: 'flex',
31
- flexWrap: 'wrap',
32
- height: 'auto',
33
- width: 'auto',
34
- whiteSpace: 'normal',
35
- textAlign: 'left',
36
- maxWidth: '320px',
37
- textDecoration: 'none',
38
- } }, this.locationName && h("span", { style: { fontSize: '16px', marginBottom: '4px' } }, this.locationName), this.locationAddress && h("span", { style: { fontSize: '12px' } }, this.locationAddress)), h("div", { style: { marginTop: '8px', textAlign: 'center' } }, h("i", { class: "ri-map-pin-fill", style: { fontSize: '24px' } })))));
39
- }
40
- static get is() { return "google-map"; }
41
- static get originalStyleUrls() {
42
- return {
43
- "$": ["index.css"]
44
- };
45
- }
46
- static get styleUrls() {
47
- return {
48
- "$": ["index.css"]
49
- };
50
- }
51
- static get assetsDirs() { return ["assets"]; }
52
- static get properties() {
53
- return {
54
- "locationName": {
55
- "type": "string",
56
- "mutable": false,
57
- "complexType": {
58
- "original": "string",
59
- "resolved": "string",
60
- "references": {}
61
- },
62
- "required": false,
63
- "optional": true,
64
- "docs": {
65
- "tags": [],
66
- "text": ""
67
- },
68
- "attribute": "location-name",
69
- "reflect": false
70
- },
71
- "locationAddress": {
72
- "type": "string",
73
- "mutable": false,
74
- "complexType": {
75
- "original": "string",
76
- "resolved": "string",
77
- "references": {}
78
- },
79
- "required": false,
80
- "optional": true,
81
- "docs": {
82
- "tags": [],
83
- "text": ""
84
- },
85
- "attribute": "location-address",
86
- "reflect": false
87
- }
88
- };
89
- }
90
- }
@@ -1,30 +0,0 @@
1
- .salon-modal.salon-modal--booking:before {
2
- display: none;
3
- }
4
-
5
- .salon-modal.salon-modal--booking .salon-modal--inner,
6
- .salon-modal.salon-modal--booking .salon-modal--content {
7
- max-width: none;
8
- width: 100%;
9
- height: 100%;
10
- }
11
-
12
- .salon-modal.salon-modal--booking .salon-modal--close {
13
- background-color: #EFEFEF;
14
- width: 40px;
15
- height: 40px;
16
- right: 16px;
17
- top: 16px;
18
-
19
- -moz-border-radius: 50px;
20
- -webkit-border-radius: 50px;
21
- border-radius: 50px;
22
- }
23
-
24
-
25
- @media (min-width: 768px) {
26
- .salon-modal.salon-modal--booking .salon-modal--close {
27
- right: 20px;
28
- top: 20px;
29
- }
30
- }
@@ -1,126 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import Color from 'color';
3
- import { css } from 'glamor';
4
- import { Colors } from '../../constants/colors';
5
- export class SalonBooking {
6
- constructor() {
7
- this.salonId = undefined;
8
- this.buttonClass = '';
9
- this.buttonText = 'Book now';
10
- this.primaryColor = Colors.Primary;
11
- }
12
- openModal() {
13
- const elBookingModal = document.createElement('div');
14
- elBookingModal.innerHTML = `
15
- <salon-booking-modal
16
- salon-id=${this.salonId}
17
- primary-color=${this.primaryColor}
18
- ></salon-booking-modal>
19
- `;
20
- document.body.appendChild(elBookingModal);
21
- }
22
- render() {
23
- const buttonClass = this.buttonClass || 'btn btn-primary';
24
- let buttonStyle = {};
25
- if (!this.buttonClass) {
26
- const primaryColor = Color(this.primaryColor);
27
- const primaryColorHover = primaryColor.darken(0.05);
28
- buttonStyle = css({
29
- backgroundColor: this.primaryColor,
30
- borderColor: this.primaryColor,
31
- color: primaryColor.isLight() ? Colors.Black01 : Colors.White,
32
- ':hover': {
33
- backgroundColor: primaryColorHover,
34
- borderColor: primaryColorHover,
35
- },
36
- });
37
- }
38
- 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))));
39
- }
40
- static get is() { return "salon-booking"; }
41
- static get originalStyleUrls() {
42
- return {
43
- "$": ["index.css"]
44
- };
45
- }
46
- static get styleUrls() {
47
- return {
48
- "$": ["index.css"]
49
- };
50
- }
51
- static get properties() {
52
- return {
53
- "salonId": {
54
- "type": "number",
55
- "mutable": false,
56
- "complexType": {
57
- "original": "number",
58
- "resolved": "number",
59
- "references": {}
60
- },
61
- "required": false,
62
- "optional": false,
63
- "docs": {
64
- "tags": [],
65
- "text": ""
66
- },
67
- "attribute": "salon-id",
68
- "reflect": false
69
- },
70
- "buttonClass": {
71
- "type": "string",
72
- "mutable": false,
73
- "complexType": {
74
- "original": "string",
75
- "resolved": "string",
76
- "references": {}
77
- },
78
- "required": false,
79
- "optional": false,
80
- "docs": {
81
- "tags": [],
82
- "text": ""
83
- },
84
- "attribute": "button-class",
85
- "reflect": false,
86
- "defaultValue": "''"
87
- },
88
- "buttonText": {
89
- "type": "string",
90
- "mutable": false,
91
- "complexType": {
92
- "original": "string",
93
- "resolved": "string",
94
- "references": {}
95
- },
96
- "required": false,
97
- "optional": false,
98
- "docs": {
99
- "tags": [],
100
- "text": ""
101
- },
102
- "attribute": "button-text",
103
- "reflect": false,
104
- "defaultValue": "'Book now'"
105
- },
106
- "primaryColor": {
107
- "type": "string",
108
- "mutable": false,
109
- "complexType": {
110
- "original": "string",
111
- "resolved": "string",
112
- "references": {}
113
- },
114
- "required": false,
115
- "optional": false,
116
- "docs": {
117
- "tags": [],
118
- "text": ""
119
- },
120
- "attribute": "primary-color",
121
- "reflect": false,
122
- "defaultValue": "Colors.Primary"
123
- }
124
- };
125
- }
126
- }