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.
Files changed (160) hide show
  1. package/dist/custom-elements/index.d.ts +24 -0
  2. package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-9bc404fc.js} +14 -6
  3. package/dist/{esm/_commonjsHelpers-098d5b27.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -2
  4. package/dist/{cjs/global-9073d10e.js → favesalon-embed/app-globals-437cc3f3.js} +15 -8
  5. package/dist/{esm/global-e1089ffd.js → favesalon-embed/app-globals-60769a2c.js} +16 -7
  6. package/dist/favesalon-embed/chat-box.entry.js +54 -0
  7. package/dist/favesalon-embed/chat-button.entry.js +51 -0
  8. package/dist/favesalon-embed/chat-form.entry.js +39 -0
  9. package/dist/favesalon-embed/chat-messages.entry.js +53 -0
  10. package/dist/favesalon-embed/chat-rooms.entry.js +17279 -0
  11. package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
  12. package/dist/favesalon-embed/dom-64053c71.js +73 -0
  13. package/dist/favesalon-embed/favesalon-embed.css +2433 -4
  14. package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
  15. package/dist/{collection/components/google-map/index.js → favesalon-embed/google-map.entry.js} +12 -54
  16. package/dist/{esm/index-80523fec.js → favesalon-embed/index-00b83e1c.js} +425 -15
  17. package/dist/favesalon-embed/index-04c09911.js +3371 -0
  18. package/dist/favesalon-embed/index-888e99e3.js +3371 -0
  19. package/dist/{cjs/index-7f190886.js → favesalon-embed/index-ac52896a.js} +454 -47
  20. package/dist/favesalon-embed/index.esm.js +1 -0
  21. package/dist/favesalon-embed/isObject-13b86c17.js +203 -0
  22. package/dist/favesalon-embed/relativeTime-15477f02.js +7 -0
  23. package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
  24. package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
  25. package/dist/{esm → favesalon-embed}/salon-booking.entry.js +3 -3
  26. package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
  27. package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +3 -3
  28. package/dist/favesalon-embed/salon-info.entry.js +29 -0
  29. package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +4 -4
  30. package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +14 -99
  31. package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
  32. package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +3 -3
  33. package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
  34. package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +3 -3
  35. package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
  36. package/dist/{esm → favesalon-embed}/salon-services.entry.js +3 -3
  37. package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
  38. package/dist/{custom-elements/index.js → favesalon-embed/services-55a87166.js} +2465 -7150
  39. package/dist/{cjs/services-125c82d8.js → favesalon-embed/services-7c46a2fd.js} +2465 -103
  40. package/dist/{esm/services-40a3e622.js → favesalon-embed/services-7cb8f2a6.js} +2469 -100
  41. package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
  42. package/dist/{esm → favesalon-embed}/style-detail.entry.js +4 -4
  43. package/dist/{esm → favesalon-embed}/user-avatar.entry.js +13 -4
  44. package/dist/{esm/utils-e97485e0.js → favesalon-embed/utils-2c19db45.js} +6 -0
  45. package/dist/types/components/chat-box/index.d.ts +12 -0
  46. package/dist/types/components/chat-button/index.d.ts +0 -8
  47. package/dist/types/components/chat-form/index.d.ts +6 -0
  48. package/dist/types/components/chat-messages/index.d.ts +14 -0
  49. package/dist/types/components/chat-rooms/index.d.ts +12 -0
  50. package/dist/types/components/user-avatar/index.d.ts +2 -1
  51. package/dist/types/components.d.ts +84 -1
  52. package/dist/types/utils/utils.d.ts +1 -0
  53. package/package.json +1 -1
  54. package/dist/cjs/chat-button.cjs.entry.js +0 -118
  55. package/dist/cjs/colors-38421769.js +0 -69
  56. package/dist/cjs/favesalon-embed.cjs.js +0 -24
  57. package/dist/cjs/google-map_5.cjs.entry.js +0 -310
  58. package/dist/cjs/index-47c2a5f6.js +0 -1533
  59. package/dist/cjs/index.cjs.js +0 -2
  60. package/dist/cjs/loader.cjs.js +0 -23
  61. package/dist/cjs/relativeTime-3721080d.js +0 -9
  62. package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
  63. package/dist/cjs/salon-booking.cjs.entry.js +0 -51
  64. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
  65. package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
  66. package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
  67. package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
  68. package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
  69. package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
  70. package/dist/cjs/salon-services.cjs.entry.js +0 -81
  71. package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
  72. package/dist/cjs/style-detail.cjs.entry.js +0 -312
  73. package/dist/cjs/user-avatar.cjs.entry.js +0 -45
  74. package/dist/cjs/utils-c5a33b3c.js +0 -23
  75. package/dist/collection/collection-manifest.json +0 -29
  76. package/dist/collection/components/chat-button/index.css +0 -122
  77. package/dist/collection/components/chat-button/index.js +0 -218
  78. package/dist/collection/components/chat-conversation/index.js +0 -103
  79. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  80. package/dist/collection/components/google-map/index.css +0 -5
  81. package/dist/collection/components/salon-booking/index.css +0 -30
  82. package/dist/collection/components/salon-booking/index.js +0 -126
  83. package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
  84. package/dist/collection/components/salon-gift-card/index.css +0 -30
  85. package/dist/collection/components/salon-gift-card/index.js +0 -126
  86. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
  87. package/dist/collection/components/salon-info/index.css +0 -1
  88. package/dist/collection/components/salon-info/index.js +0 -77
  89. package/dist/collection/components/salon-latest-reviews/index.css +0 -11
  90. package/dist/collection/components/salon-latest-reviews/index.js +0 -163
  91. package/dist/collection/components/salon-latest-styles/index.css +0 -12
  92. package/dist/collection/components/salon-locations/index.css +0 -24
  93. package/dist/collection/components/salon-lookbook/index.css +0 -15
  94. package/dist/collection/components/salon-lookbook/index.js +0 -368
  95. package/dist/collection/components/salon-ranking/index.css +0 -3
  96. package/dist/collection/components/salon-ranking/index.js +0 -117
  97. package/dist/collection/components/salon-reviews/index.css +0 -18
  98. package/dist/collection/components/salon-reviews/index.js +0 -249
  99. package/dist/collection/components/salon-schedules/index.css +0 -18
  100. package/dist/collection/components/salon-services/index.css +0 -1
  101. package/dist/collection/components/salon-services/index.js +0 -146
  102. package/dist/collection/components/salon-stylists/index.css +0 -43
  103. package/dist/collection/components/salon-stylists/index.js +0 -184
  104. package/dist/collection/components/style-detail/index.css +0 -76
  105. package/dist/collection/components/style-detail/index.js +0 -386
  106. package/dist/collection/components/user-avatar/index.css +0 -0
  107. package/dist/collection/components/user-avatar/index.js +0 -134
  108. package/dist/collection/constants/colors.js +0 -65
  109. package/dist/collection/global/global.js +0 -8
  110. package/dist/collection/index.js +0 -1
  111. package/dist/collection/mocks/users.js +0 -10
  112. package/dist/collection/services/services.js +0 -295
  113. package/dist/collection/types/chat.js +0 -23
  114. package/dist/collection/types/common.js +0 -11
  115. package/dist/collection/types/review.js +0 -39
  116. package/dist/collection/types/salon.js +0 -58
  117. package/dist/collection/types/service.js +0 -24
  118. package/dist/collection/types/style.js +0 -128
  119. package/dist/collection/types/stylist.js +0 -30
  120. package/dist/collection/types/user.js +0 -10
  121. package/dist/collection/utils/utils.js +0 -20
  122. package/dist/esm/chat-button.entry.js +0 -114
  123. package/dist/esm/favesalon-embed.js +0 -19
  124. package/dist/esm/google-map_5.entry.js +0 -302
  125. package/dist/esm/index-3fae868e.js +0 -1506
  126. package/dist/esm/index.js +0 -1
  127. package/dist/esm/loader.js +0 -19
  128. package/dist/esm/polyfills/core-js.js +0 -11
  129. package/dist/esm/polyfills/css-shim.js +0 -1
  130. package/dist/esm/polyfills/dom.js +0 -79
  131. package/dist/esm/polyfills/es5-html-element.js +0 -1
  132. package/dist/esm/polyfills/index.js +0 -34
  133. package/dist/esm/polyfills/system.js +0 -6
  134. package/dist/esm/relativeTime-cd452e6d.js +0 -7
  135. package/dist/favesalon-embed/p-019c5ccd.entry.js +0 -1
  136. package/dist/favesalon-embed/p-083a8821.entry.js +0 -1
  137. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +0 -1
  138. package/dist/favesalon-embed/p-119db8de.entry.js +0 -1
  139. package/dist/favesalon-embed/p-1432c51b.entry.js +0 -1
  140. package/dist/favesalon-embed/p-22093506.entry.js +0 -1
  141. package/dist/favesalon-embed/p-32b314e9.js +0 -2
  142. package/dist/favesalon-embed/p-47e646f8.js +0 -1
  143. package/dist/favesalon-embed/p-4a5eca9a.js +0 -6
  144. package/dist/favesalon-embed/p-58d2e9be.js +0 -1
  145. package/dist/favesalon-embed/p-71404b6a.entry.js +0 -1
  146. package/dist/favesalon-embed/p-857c3a61.entry.js +0 -1
  147. package/dist/favesalon-embed/p-99ec77f7.entry.js +0 -1
  148. package/dist/favesalon-embed/p-a33331cc.js +0 -1
  149. package/dist/favesalon-embed/p-b0c3673a.entry.js +0 -1
  150. package/dist/favesalon-embed/p-b287b1ea.entry.js +0 -1
  151. package/dist/favesalon-embed/p-b3af7842.entry.js +0 -1
  152. package/dist/favesalon-embed/p-b630ae68.js +0 -1580
  153. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +0 -1
  154. package/dist/favesalon-embed/p-d6083940.js +0 -1
  155. package/dist/favesalon-embed/p-d9b7ad58.entry.js +0 -1
  156. package/dist/favesalon-embed/p-fc9a5551.js +0 -6
  157. package/dist/index.cjs.js +0 -1
  158. package/dist/index.js +0 -1
  159. package/dist/types/components/chat-conversation/index.d.ts +0 -0
  160. /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
@@ -0,0 +1,387 @@
1
+ /*
2
+ Stencil Client Platform v2.22.3 | MIT Licensed | https://stenciljs.com
3
+ */
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ *
11
+ * This file is a port of shadowCSS from webcomponents.js to TypeScript.
12
+ * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
13
+ * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
14
+ */
15
+ const safeSelector = (selector) => {
16
+ const placeholders = [];
17
+ let index = 0;
18
+ // Replaces attribute selectors with placeholders.
19
+ // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
20
+ selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
21
+ const replaceBy = `__ph-${index}__`;
22
+ placeholders.push(keep);
23
+ index++;
24
+ return replaceBy;
25
+ });
26
+ // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
27
+ // WS and "+" would otherwise be interpreted as selector separators.
28
+ const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
29
+ const replaceBy = `__ph-${index}__`;
30
+ placeholders.push(exp);
31
+ index++;
32
+ return pseudo + replaceBy;
33
+ });
34
+ const ss = {
35
+ content,
36
+ placeholders,
37
+ };
38
+ return ss;
39
+ };
40
+ const restoreSafeSelector = (placeholders, content) => {
41
+ return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
42
+ };
43
+ const _polyfillHost = '-shadowcsshost';
44
+ const _polyfillSlotted = '-shadowcssslotted';
45
+ // note: :host-context pre-processed to -shadowcsshostcontext.
46
+ const _polyfillHostContext = '-shadowcsscontext';
47
+ const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
48
+ const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
49
+ const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
50
+ const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
51
+ const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
52
+ const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
53
+ const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
54
+ const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
55
+ const _polyfillHostRe = /-shadowcsshost/gim;
56
+ const _colonHostRe = /:host/gim;
57
+ const _colonSlottedRe = /::slotted/gim;
58
+ const _colonHostContextRe = /:host-context/gim;
59
+ const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
60
+ const stripComments = (input) => {
61
+ return input.replace(_commentRe, '');
62
+ };
63
+ const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
64
+ const extractCommentsWithHash = (input) => {
65
+ return input.match(_commentWithHashRe) || [];
66
+ };
67
+ const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
68
+ const _curlyRe = /([{}])/g;
69
+ const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
70
+ const OPEN_CURLY = '{';
71
+ const CLOSE_CURLY = '}';
72
+ const BLOCK_PLACEHOLDER = '%BLOCK%';
73
+ const processRules = (input, ruleCallback) => {
74
+ const inputWithEscapedBlocks = escapeBlocks(input);
75
+ let nextBlockIndex = 0;
76
+ return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
77
+ const selector = m[2];
78
+ let content = '';
79
+ let suffix = m[4];
80
+ let contentPrefix = '';
81
+ if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
82
+ content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
83
+ suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
84
+ contentPrefix = '{';
85
+ }
86
+ const cssRule = {
87
+ selector,
88
+ content,
89
+ };
90
+ const rule = ruleCallback(cssRule);
91
+ return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
92
+ });
93
+ };
94
+ const escapeBlocks = (input) => {
95
+ const inputParts = input.split(_curlyRe);
96
+ const resultParts = [];
97
+ const escapedBlocks = [];
98
+ let bracketCount = 0;
99
+ let currentBlockParts = [];
100
+ for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
101
+ const part = inputParts[partIndex];
102
+ if (part === CLOSE_CURLY) {
103
+ bracketCount--;
104
+ }
105
+ if (bracketCount > 0) {
106
+ currentBlockParts.push(part);
107
+ }
108
+ else {
109
+ if (currentBlockParts.length > 0) {
110
+ escapedBlocks.push(currentBlockParts.join(''));
111
+ resultParts.push(BLOCK_PLACEHOLDER);
112
+ currentBlockParts = [];
113
+ }
114
+ resultParts.push(part);
115
+ }
116
+ if (part === OPEN_CURLY) {
117
+ bracketCount++;
118
+ }
119
+ }
120
+ if (currentBlockParts.length > 0) {
121
+ escapedBlocks.push(currentBlockParts.join(''));
122
+ resultParts.push(BLOCK_PLACEHOLDER);
123
+ }
124
+ const strEscapedBlocks = {
125
+ escapedString: resultParts.join(''),
126
+ blocks: escapedBlocks,
127
+ };
128
+ return strEscapedBlocks;
129
+ };
130
+ const insertPolyfillHostInCssText = (selector) => {
131
+ selector = selector
132
+ .replace(_colonHostContextRe, _polyfillHostContext)
133
+ .replace(_colonHostRe, _polyfillHost)
134
+ .replace(_colonSlottedRe, _polyfillSlotted);
135
+ return selector;
136
+ };
137
+ const convertColonRule = (cssText, regExp, partReplacer) => {
138
+ // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
139
+ return cssText.replace(regExp, (...m) => {
140
+ if (m[2]) {
141
+ const parts = m[2].split(',');
142
+ const r = [];
143
+ for (let i = 0; i < parts.length; i++) {
144
+ const p = parts[i].trim();
145
+ if (!p)
146
+ break;
147
+ r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
148
+ }
149
+ return r.join(',');
150
+ }
151
+ else {
152
+ return _polyfillHostNoCombinator + m[3];
153
+ }
154
+ });
155
+ };
156
+ const colonHostPartReplacer = (host, part, suffix) => {
157
+ return host + part.replace(_polyfillHost, '') + suffix;
158
+ };
159
+ const convertColonHost = (cssText) => {
160
+ return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
161
+ };
162
+ const colonHostContextPartReplacer = (host, part, suffix) => {
163
+ if (part.indexOf(_polyfillHost) > -1) {
164
+ return colonHostPartReplacer(host, part, suffix);
165
+ }
166
+ else {
167
+ return host + part + suffix + ', ' + part + ' ' + host + suffix;
168
+ }
169
+ };
170
+ const convertColonSlotted = (cssText, slotScopeId) => {
171
+ const slotClass = '.' + slotScopeId + ' > ';
172
+ const selectors = [];
173
+ cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
174
+ if (m[2]) {
175
+ const compound = m[2].trim();
176
+ const suffix = m[3];
177
+ const slottedSelector = slotClass + compound + suffix;
178
+ let prefixSelector = '';
179
+ for (let i = m[4] - 1; i >= 0; i--) {
180
+ const char = m[5][i];
181
+ if (char === '}' || char === ',') {
182
+ break;
183
+ }
184
+ prefixSelector = char + prefixSelector;
185
+ }
186
+ const orgSelector = prefixSelector + slottedSelector;
187
+ const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
188
+ if (orgSelector.trim() !== addedSelector.trim()) {
189
+ const updatedSelector = `${addedSelector}, ${orgSelector}`;
190
+ selectors.push({
191
+ orgSelector,
192
+ updatedSelector,
193
+ });
194
+ }
195
+ return slottedSelector;
196
+ }
197
+ else {
198
+ return _polyfillHostNoCombinator + m[3];
199
+ }
200
+ });
201
+ return {
202
+ selectors,
203
+ cssText,
204
+ };
205
+ };
206
+ const convertColonHostContext = (cssText) => {
207
+ return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
208
+ };
209
+ const convertShadowDOMSelectors = (cssText) => {
210
+ return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
211
+ };
212
+ const makeScopeMatcher = (scopeSelector) => {
213
+ const lre = /\[/g;
214
+ const rre = /\]/g;
215
+ scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
216
+ return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
217
+ };
218
+ const selectorNeedsScoping = (selector, scopeSelector) => {
219
+ const re = makeScopeMatcher(scopeSelector);
220
+ return !re.test(selector);
221
+ };
222
+ const injectScopingSelector = (selector, scopingSelector) => {
223
+ return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
224
+ return before + scopingSelector + colon + after;
225
+ });
226
+ };
227
+ const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
228
+ // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
229
+ _polyfillHostRe.lastIndex = 0;
230
+ if (_polyfillHostRe.test(selector)) {
231
+ const replaceBy = `.${hostSelector}`;
232
+ return selector
233
+ .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
234
+ .replace(_polyfillHostRe, replaceBy + ' ');
235
+ }
236
+ return scopeSelector + ' ' + selector;
237
+ };
238
+ const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
239
+ const isRe = /\[is=([^\]]*)\]/g;
240
+ scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
241
+ const className = '.' + scopeSelector;
242
+ const _scopeSelectorPart = (p) => {
243
+ let scopedP = p.trim();
244
+ if (!scopedP) {
245
+ return '';
246
+ }
247
+ if (p.indexOf(_polyfillHostNoCombinator) > -1) {
248
+ scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
249
+ }
250
+ else {
251
+ // remove :host since it should be unnecessary
252
+ const t = p.replace(_polyfillHostRe, '');
253
+ if (t.length > 0) {
254
+ scopedP = injectScopingSelector(t, className);
255
+ }
256
+ }
257
+ return scopedP;
258
+ };
259
+ const safeContent = safeSelector(selector);
260
+ selector = safeContent.content;
261
+ let scopedSelector = '';
262
+ let startIndex = 0;
263
+ let res;
264
+ const sep = /( |>|\+|~(?!=))\s*/g;
265
+ // If a selector appears before :host it should not be shimmed as it
266
+ // matches on ancestor elements and not on elements in the host's shadow
267
+ // `:host-context(div)` is transformed to
268
+ // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
269
+ // the `div` is not part of the component in the 2nd selectors and should not be scoped.
270
+ // Historically `component-tag:host` was matching the component so we also want to preserve
271
+ // this behavior to avoid breaking legacy apps (it should not match).
272
+ // The behavior should be:
273
+ // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
274
+ // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
275
+ // `:host-context(tag)`)
276
+ const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
277
+ // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
278
+ let shouldScope = !hasHost;
279
+ while ((res = sep.exec(selector)) !== null) {
280
+ const separator = res[1];
281
+ const part = selector.slice(startIndex, res.index).trim();
282
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
283
+ const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
284
+ scopedSelector += `${scopedPart} ${separator} `;
285
+ startIndex = sep.lastIndex;
286
+ }
287
+ const part = selector.substring(startIndex);
288
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
289
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
290
+ // replace the placeholders with their original values
291
+ return restoreSafeSelector(safeContent.placeholders, scopedSelector);
292
+ };
293
+ const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
294
+ return selector
295
+ .split(',')
296
+ .map((shallowPart) => {
297
+ if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
298
+ return shallowPart.trim();
299
+ }
300
+ if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
301
+ return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
302
+ }
303
+ else {
304
+ return shallowPart.trim();
305
+ }
306
+ })
307
+ .join(', ');
308
+ };
309
+ const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
310
+ return processRules(cssText, (rule) => {
311
+ let selector = rule.selector;
312
+ let content = rule.content;
313
+ if (rule.selector[0] !== '@') {
314
+ selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
315
+ }
316
+ else if (rule.selector.startsWith('@media') ||
317
+ rule.selector.startsWith('@supports') ||
318
+ rule.selector.startsWith('@page') ||
319
+ rule.selector.startsWith('@document')) {
320
+ content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
321
+ }
322
+ const cssRule = {
323
+ selector: selector.replace(/\s{2,}/g, ' ').trim(),
324
+ content,
325
+ };
326
+ return cssRule;
327
+ });
328
+ };
329
+ const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
330
+ cssText = insertPolyfillHostInCssText(cssText);
331
+ cssText = convertColonHost(cssText);
332
+ cssText = convertColonHostContext(cssText);
333
+ const slotted = convertColonSlotted(cssText, slotScopeId);
334
+ cssText = slotted.cssText;
335
+ cssText = convertShadowDOMSelectors(cssText);
336
+ if (scopeId) {
337
+ cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
338
+ }
339
+ cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
340
+ cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
341
+ return {
342
+ cssText: cssText.trim(),
343
+ slottedSelectors: slotted.selectors,
344
+ };
345
+ };
346
+ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
347
+ const hostScopeId = scopeId + '-h';
348
+ const slotScopeId = scopeId + '-s';
349
+ const commentsWithHash = extractCommentsWithHash(cssText);
350
+ cssText = stripComments(cssText);
351
+ const orgSelectors = [];
352
+ if (commentOriginalSelector) {
353
+ const processCommentedSelector = (rule) => {
354
+ const placeholder = `/*!@___${orgSelectors.length}___*/`;
355
+ const comment = `/*!@${rule.selector}*/`;
356
+ orgSelectors.push({ placeholder, comment });
357
+ rule.selector = placeholder + rule.selector;
358
+ return rule;
359
+ };
360
+ cssText = processRules(cssText, (rule) => {
361
+ if (rule.selector[0] !== '@') {
362
+ return processCommentedSelector(rule);
363
+ }
364
+ else if (rule.selector.startsWith('@media') ||
365
+ rule.selector.startsWith('@supports') ||
366
+ rule.selector.startsWith('@page') ||
367
+ rule.selector.startsWith('@document')) {
368
+ rule.content = processRules(rule.content, processCommentedSelector);
369
+ return rule;
370
+ }
371
+ return rule;
372
+ });
373
+ }
374
+ const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
375
+ cssText = [scoped.cssText, ...commentsWithHash].join('\n');
376
+ if (commentOriginalSelector) {
377
+ orgSelectors.forEach(({ placeholder, comment }) => {
378
+ cssText = cssText.replace(placeholder, comment);
379
+ });
380
+ }
381
+ scoped.slottedSelectors.forEach((slottedSelector) => {
382
+ cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
383
+ });
384
+ return cssText;
385
+ };
386
+
387
+ export { scopeCss };
@@ -1,8 +1,8 @@
1
- import { r as registerInstance, h } from './index-3fae868e.js';
2
- import { d as dayjs_min, H as HttpService, i as isVideoMedia, g as getSalonImage, s as shortDateYearFormat } from './services-40a3e622.js';
3
- import { r as relativeTime } from './relativeTime-cd452e6d.js';
1
+ import { r as registerInstance, h } from './index-888e99e3.js';
2
+ import { d as dayjs_min, H as HttpService, i as isVideoMedia, g as getSalonImage, s as shortDateYearFormat } from './services-7c46a2fd.js';
3
+ import { r as relativeTime } from './relativeTime-268e64b0.js';
4
4
  import { C as Colors } from './colors-ea36347a.js';
5
- import './_commonjsHelpers-098d5b27.js';
5
+ import './_commonjsHelpers-a4f66ccd.js';
6
6
 
7
7
  const indexCss = ".salon-modal.salon-modal--lookbook-detail .salon-modal--close{display:none !important}.salon-modal.salon-modal--lookbook-detail .salon-modal--content{background-color:#fff;position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1000;overflow-y:auto}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:240px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnails{text-align:center}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{display:inline-block;margin-top:12px;margin-right:12px;height:40px;width:60px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--button{border:none;position:absolute;top:50%;z-index:20;height:40px;width:40px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;-moz-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--prev{left:24px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--next{right:24px}@media (min-width: 768px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:360px !important}}@media (min-width: 992px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:480px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{height:56px;width:72px}}";
8
8
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-3fae868e.js';
1
+ import { r as registerInstance, h } from './index-888e99e3.js';
2
2
  import { C as Colors } from './colors-ea36347a.js';
3
3
 
4
4
  const indexCss = "";
@@ -8,12 +8,14 @@ const UserAvatar = class {
8
8
  registerInstance(this, hostRef);
9
9
  this.size = 24;
10
10
  this.name = undefined;
11
+ this.description = undefined;
11
12
  this.nameStyle = undefined;
12
13
  this.shortName = undefined;
13
14
  this.avatar = undefined;
14
15
  }
15
16
  render() {
16
17
  return (h("div", { style: { display: "flex", alignItems: "center" } }, this.avatar && (h("div", { style: {
18
+ border: `1px solid ${Colors.White}`,
17
19
  backgroundImage: `url("${this.avatar}")`,
18
20
  backgroundColor: Colors.Gray01,
19
21
  backgroundPosition: 'center center',
@@ -23,9 +25,8 @@ const UserAvatar = class {
23
25
  width: `${this.size}px`,
24
26
  minWidth: `${this.size}px`,
25
27
  } })), !this.avatar && (h("div", { style: {
28
+ border: `1px solid ${Colors.White}`,
26
29
  backgroundColor: Colors.Gray01,
27
- backgroundPosition: 'center center',
28
- backgroundSize: 'cover',
29
30
  borderRadius: '50%',
30
31
  display: 'flex',
31
32
  alignItems: 'center',
@@ -33,9 +34,17 @@ const UserAvatar = class {
33
34
  height: `${this.size}px`,
34
35
  width: `${this.size}px`,
35
36
  minWidth: `${this.size}px`,
36
- } }, this.shortName)), this.name && (h("div", { style: Object.assign({ flexShrink: '1', flexGrow: '1', marginLeft: '12px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, this.nameStyle) }, this.name))));
37
+ } }, this.shortName)), this.name && (h("div", { style: {
38
+ flexShrink: '1',
39
+ flexGrow: '1',
40
+ marginLeft: '12px',
41
+ overflow: 'hidden',
42
+ whiteSpace: 'nowrap',
43
+ textOverflow: 'ellipsis',
44
+ } }, h("div", { style: Object.assign({}, this.nameStyle) }, this.name), this.description && h("div", { style: { color: '#999999' } }, this.description)))));
37
45
  }
38
46
  };
47
+ ;
39
48
  UserAvatar.style = indexCss;
40
49
 
41
50
  export { UserAvatar as user_avatar };
@@ -1,3 +1,9 @@
1
+ function wait(time = 1000) {
2
+ return new Promise(resolve => setTimeout(() => resolve({}), time));
3
+ }
4
+ function format(first, middle, last) {
5
+ return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
6
+ }
1
7
  function formatWebsiteUrl(website) {
2
8
  return !!website ? website.indexOf('http') > -1 ? website : `http://${website}` : null;
3
9
  }
@@ -0,0 +1,12 @@
1
+ import { ChatRoom } from '../../types/chat';
2
+ export declare class ChatBox {
3
+ primaryColor: string;
4
+ accessToken: string;
5
+ senderId: string;
6
+ chatRooms: ChatRoom[];
7
+ activeRoom: ChatRoom;
8
+ componentWillLoad(): void;
9
+ fetchData(): Promise<void>;
10
+ private onClickRoom;
11
+ render(): any;
12
+ }
@@ -11,14 +11,6 @@ export declare class ChatButton {
11
11
  chatMessages: ChatMessage[];
12
12
  isChatExpanded: boolean;
13
13
  componentWillLoad(): void;
14
- componentDidLoad(): void;
15
- componentWillUpdate(): void;
16
14
  fetchData(): Promise<void>;
17
- private onSubmitMessage;
18
- private markMessagesAsRead;
19
- private scrollToLastMessage;
20
- private renderMessage;
21
- private renderMessages;
22
- private renderForm;
23
15
  render(): any;
24
16
  }
@@ -0,0 +1,6 @@
1
+ export declare class ChatForm {
2
+ senderId: number;
3
+ chatRoomId: string;
4
+ private onSubmitMessage;
5
+ render(): any;
6
+ }
@@ -0,0 +1,14 @@
1
+ import { ChatMessage } from '../../types/chat';
2
+ import { User } from '../../types/user';
3
+ export declare class ChatMessages {
4
+ sender: User;
5
+ receiver: User;
6
+ messages: ChatMessage[];
7
+ chatRoomId: string;
8
+ componentDidLoad(): void;
9
+ componentDidUpdate(): void;
10
+ private markMessagesAsRead;
11
+ private scrollToLastMessage;
12
+ private renderMessage;
13
+ render(): any;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { ChatRoom } from '../../types/chat';
2
+ export declare class ChatRooms {
3
+ senderId: number;
4
+ chatRooms: ChatRoom[];
5
+ activeRoom: ChatRoom;
6
+ onClickRoom: (chatRoom: ChatRoom) => void;
7
+ keyword: string;
8
+ private clickRoom;
9
+ private onSearchRooms;
10
+ private renderChatRoom;
11
+ render(): any;
12
+ }
@@ -1,6 +1,7 @@
1
1
  export declare class UserAvatar {
2
2
  size: number;
3
- name: string;
3
+ name?: string;
4
+ description?: string;
4
5
  nameStyle?: object;
5
6
  shortName: string;
6
7
  avatar: string;