favesalon-embed 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/favesalon-embed/app-globals-74127f4b.js +7 -0
- package/dist/favesalon-embed/chat-box.entry.js +4 -3
- package/dist/favesalon-embed/chat-button.entry.js +2 -2
- package/dist/favesalon-embed/chat-form.entry.js +2 -2
- package/dist/favesalon-embed/chat-messages.entry.js +23 -5
- package/dist/favesalon-embed/chat-rooms.entry.js +50 -17218
- package/dist/favesalon-embed/favesalon-embed.css +1 -2326
- package/dist/favesalon-embed/favesalon-embed.esm.js +2 -2
- package/dist/favesalon-embed/lodash-d5526b38.js +17215 -0
- package/dist/favesalon-embed/notify-sounds.entry.js +31 -0
- package/dist/favesalon-embed/salon-info.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-reviews.entry.js +2 -2
- package/dist/favesalon-embed/salon-latest-styles.entry.js +1 -1
- package/dist/favesalon-embed/salon-locations.entry.js +2 -2
- package/dist/favesalon-embed/salon-lookbook.entry.js +1 -1
- package/dist/favesalon-embed/salon-reviews.entry.js +1 -1
- package/dist/favesalon-embed/salon-schedules.entry.js +1 -1
- package/dist/favesalon-embed/salon-services.entry.js +1 -1
- package/dist/favesalon-embed/salon-stylists.entry.js +1 -1
- package/dist/favesalon-embed/services-122dcf73.js +23886 -0
- package/dist/favesalon-embed/{services-7c46a2fd.js → services-23eda072.js} +25 -2
- package/dist/favesalon-embed/{services-55a87166.js → services-243eef47.js} +229 -4
- package/dist/favesalon-embed/services-260ea6eb.js +23883 -0
- package/dist/favesalon-embed/services-27607998.js +23886 -0
- package/dist/favesalon-embed/{services-7cb8f2a6.js → services-46b2f0aa.js} +15 -2
- package/dist/favesalon-embed/services-65a8cf4a.js +23887 -0
- package/dist/favesalon-embed/services-8f52210f.js +23880 -0
- package/dist/favesalon-embed/services-de32365e.js +23880 -0
- package/dist/favesalon-embed/services-e9cfcd2b.js +23885 -0
- package/dist/favesalon-embed/services-f7278483.js +23880 -0
- package/dist/favesalon-embed/services-f9872bea.js +23880 -0
- package/dist/favesalon-embed/style-detail.entry.js +1 -1
- package/dist/favesalon-embed/utils-89c2cff2.js +32 -0
- package/dist/favesalon-embed/utils-e226fa04.js +32 -0
- package/dist/favesalon-embed/utils-fd30fb29.js +32 -0
- package/dist/types/components/chat-box/index.d.ts +1 -0
- package/dist/types/components/chat-button/notify-sounds.d.ts +5 -0
- package/dist/types/components/chat-rooms/index.d.ts +6 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/services/services.d.ts +1 -0
- package/dist/types/types/chat.d.ts +1 -0
- package/dist/types/types/user.d.ts +10 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/favesalon-embed/_commonjsHelpers-9bc404fc.js +0 -44
- package/dist/favesalon-embed/app-globals-437cc3f3.js +0 -712
- package/dist/favesalon-embed/app-globals-60769a2c.js +0 -712
- package/dist/favesalon-embed/index-04c09911.js +0 -3371
- package/dist/favesalon-embed/index-ac52896a.js +0 -4803
- package/dist/favesalon-embed/isObject-13b86c17.js +0 -203
- package/dist/favesalon-embed/relativeTime-15477f02.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { d as dayjs_min, H as HttpService, i as isVideoMedia, g as getSalonImage, s as shortDateYearFormat } from './services-260ea6eb.js';
|
|
3
3
|
import { r as relativeTime } from './relativeTime-268e64b0.js';
|
|
4
4
|
import { C as Colors } from './colors-ea36347a.js';
|
|
5
5
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
7
|
+
function formatWebsiteUrl(website) {
|
|
8
|
+
return !!website ? website.indexOf('http') > -1 ? website : `http://${website}` : null;
|
|
9
|
+
}
|
|
10
|
+
function formatFullAddress(salon) {
|
|
11
|
+
const { businessAddress, city, state, zipcode, } = salon || {};
|
|
12
|
+
const stateFields = [state, zipcode].filter(field => !!field);
|
|
13
|
+
if (businessAddress) {
|
|
14
|
+
return [businessAddress, city]
|
|
15
|
+
.filter(field => !!field)
|
|
16
|
+
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
17
|
+
.join(', ');
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
function getRatingText() {
|
|
22
|
+
return ['', 'Poor', 'Sufficient', 'Average', 'Well', 'Very good'];
|
|
23
|
+
}
|
|
24
|
+
function formatPhoneNumber(phone) {
|
|
25
|
+
return String(phone)
|
|
26
|
+
.replace('(', '')
|
|
27
|
+
.replace(')', '')
|
|
28
|
+
.replace('-', '')
|
|
29
|
+
.replaceAll(' ', '');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { formatFullAddress as a, formatWebsiteUrl as f, getRatingText as g };
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
7
|
+
function formatWebsiteUrl(website) {
|
|
8
|
+
return !!website ? website.indexOf('http') > -1 ? website : `http://${website}` : null;
|
|
9
|
+
}
|
|
10
|
+
function formatFullAddress(salon) {
|
|
11
|
+
const { businessAddress, city, state, zipcode, } = salon || {};
|
|
12
|
+
const stateFields = [state, zipcode].filter(field => !!field);
|
|
13
|
+
if (businessAddress) {
|
|
14
|
+
return [businessAddress, city]
|
|
15
|
+
.filter(field => !!field)
|
|
16
|
+
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
17
|
+
.join(', ');
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
function getRatingText() {
|
|
22
|
+
return ['', 'Poor', 'Sufficient', 'Average', 'Well', 'Very good'];
|
|
23
|
+
}
|
|
24
|
+
function formatPhoneNumber(phone) {
|
|
25
|
+
return String(phone || '')
|
|
26
|
+
.replace('(', '')
|
|
27
|
+
.replace(')', '')
|
|
28
|
+
.replace('-', '')
|
|
29
|
+
.replaceAll(' ', '');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { formatFullAddress as a, formatWebsiteUrl as f, getRatingText as g };
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
7
|
+
function formatWebsiteUrl(website) {
|
|
8
|
+
return !!website ? website.indexOf('http') > -1 ? website : `http://${website}` : null;
|
|
9
|
+
}
|
|
10
|
+
function formatFullAddress(salon) {
|
|
11
|
+
const { businessAddress, city, state, zipcode, } = salon || {};
|
|
12
|
+
const stateFields = [state, zipcode].filter(field => !!field);
|
|
13
|
+
if (businessAddress) {
|
|
14
|
+
return [businessAddress, city]
|
|
15
|
+
.filter(field => !!field)
|
|
16
|
+
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
17
|
+
.join(', ');
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
function getRatingText() {
|
|
22
|
+
return ['', 'Poor', 'Sufficient', 'Average', 'Well', 'Very good'];
|
|
23
|
+
}
|
|
24
|
+
function formatPhoneNumber(phone) {
|
|
25
|
+
return String(phone || '')
|
|
26
|
+
.replace('(', '')
|
|
27
|
+
.replace(')', '')
|
|
28
|
+
.replace('-', '')
|
|
29
|
+
.replaceAll(' ', '');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { formatWebsiteUrl as a, formatFullAddress as b, formatPhoneNumber as f, getRatingText as g };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { ChatRoom } from '../../types/chat';
|
|
2
|
+
import { User } from '../../types/user';
|
|
2
3
|
export declare class ChatRooms {
|
|
3
4
|
senderId: number;
|
|
5
|
+
salonId: number;
|
|
4
6
|
chatRooms: ChatRoom[];
|
|
7
|
+
clients: User[];
|
|
5
8
|
activeRoom: ChatRoom;
|
|
9
|
+
accessToken: string;
|
|
6
10
|
onClickRoom: (chatRoom: ChatRoom) => void;
|
|
7
11
|
keyword: string;
|
|
8
12
|
private clickRoom;
|
|
9
13
|
private onSearchRooms;
|
|
10
14
|
private renderChatRoom;
|
|
15
|
+
private initChatRoom;
|
|
16
|
+
private renderClient;
|
|
11
17
|
render(): any;
|
|
12
18
|
}
|
|
@@ -12,6 +12,7 @@ export namespace Components {
|
|
|
12
12
|
"accessToken": string;
|
|
13
13
|
"fetchData": () => Promise<void>;
|
|
14
14
|
"primaryColor": string;
|
|
15
|
+
"salonId": string;
|
|
15
16
|
"senderId": string;
|
|
16
17
|
}
|
|
17
18
|
interface ChatButton {
|
|
@@ -32,15 +33,20 @@ export namespace Components {
|
|
|
32
33
|
"sender": User;
|
|
33
34
|
}
|
|
34
35
|
interface ChatRooms {
|
|
36
|
+
"accessToken": string;
|
|
35
37
|
"activeRoom": ChatRoom;
|
|
36
38
|
"chatRooms": ChatRoom[];
|
|
39
|
+
"clients": User[];
|
|
37
40
|
"onClickRoom": (chatRoom: ChatRoom) => void;
|
|
41
|
+
"salonId": number;
|
|
38
42
|
"senderId": number;
|
|
39
43
|
}
|
|
40
44
|
interface GoogleMap {
|
|
41
45
|
"locationAddress"?: string;
|
|
42
46
|
"locationName"?: string;
|
|
43
47
|
}
|
|
48
|
+
interface NotifySounds {
|
|
49
|
+
}
|
|
44
50
|
interface SalonBooking {
|
|
45
51
|
"buttonClass": string;
|
|
46
52
|
"buttonText": string;
|
|
@@ -168,6 +174,12 @@ declare global {
|
|
|
168
174
|
prototype: HTMLGoogleMapElement;
|
|
169
175
|
new (): HTMLGoogleMapElement;
|
|
170
176
|
};
|
|
177
|
+
interface HTMLNotifySoundsElement extends Components.NotifySounds, HTMLStencilElement {
|
|
178
|
+
}
|
|
179
|
+
var HTMLNotifySoundsElement: {
|
|
180
|
+
prototype: HTMLNotifySoundsElement;
|
|
181
|
+
new (): HTMLNotifySoundsElement;
|
|
182
|
+
};
|
|
171
183
|
interface HTMLSalonBookingElement extends Components.SalonBooking, HTMLStencilElement {
|
|
172
184
|
}
|
|
173
185
|
var HTMLSalonBookingElement: {
|
|
@@ -271,6 +283,7 @@ declare global {
|
|
|
271
283
|
"chat-messages": HTMLChatMessagesElement;
|
|
272
284
|
"chat-rooms": HTMLChatRoomsElement;
|
|
273
285
|
"google-map": HTMLGoogleMapElement;
|
|
286
|
+
"notify-sounds": HTMLNotifySoundsElement;
|
|
274
287
|
"salon-booking": HTMLSalonBookingElement;
|
|
275
288
|
"salon-booking-modal": HTMLSalonBookingModalElement;
|
|
276
289
|
"salon-gift-card": HTMLSalonGiftCardElement;
|
|
@@ -293,6 +306,7 @@ declare namespace LocalJSX {
|
|
|
293
306
|
interface ChatBox {
|
|
294
307
|
"accessToken"?: string;
|
|
295
308
|
"primaryColor"?: string;
|
|
309
|
+
"salonId"?: string;
|
|
296
310
|
"senderId"?: string;
|
|
297
311
|
}
|
|
298
312
|
interface ChatButton {
|
|
@@ -312,15 +326,20 @@ declare namespace LocalJSX {
|
|
|
312
326
|
"sender"?: User;
|
|
313
327
|
}
|
|
314
328
|
interface ChatRooms {
|
|
329
|
+
"accessToken"?: string;
|
|
315
330
|
"activeRoom"?: ChatRoom;
|
|
316
331
|
"chatRooms"?: ChatRoom[];
|
|
332
|
+
"clients"?: User[];
|
|
317
333
|
"onClickRoom"?: (chatRoom: ChatRoom) => void;
|
|
334
|
+
"salonId"?: number;
|
|
318
335
|
"senderId"?: number;
|
|
319
336
|
}
|
|
320
337
|
interface GoogleMap {
|
|
321
338
|
"locationAddress"?: string;
|
|
322
339
|
"locationName"?: string;
|
|
323
340
|
}
|
|
341
|
+
interface NotifySounds {
|
|
342
|
+
}
|
|
324
343
|
interface SalonBooking {
|
|
325
344
|
"buttonClass"?: string;
|
|
326
345
|
"buttonText"?: string;
|
|
@@ -404,6 +423,7 @@ declare namespace LocalJSX {
|
|
|
404
423
|
"chat-messages": ChatMessages;
|
|
405
424
|
"chat-rooms": ChatRooms;
|
|
406
425
|
"google-map": GoogleMap;
|
|
426
|
+
"notify-sounds": NotifySounds;
|
|
407
427
|
"salon-booking": SalonBooking;
|
|
408
428
|
"salon-booking-modal": SalonBookingModal;
|
|
409
429
|
"salon-gift-card": SalonGiftCard;
|
|
@@ -432,6 +452,7 @@ declare module "@stencil/core" {
|
|
|
432
452
|
"chat-messages": LocalJSX.ChatMessages & JSXBase.HTMLAttributes<HTMLChatMessagesElement>;
|
|
433
453
|
"chat-rooms": LocalJSX.ChatRooms & JSXBase.HTMLAttributes<HTMLChatRoomsElement>;
|
|
434
454
|
"google-map": LocalJSX.GoogleMap & JSXBase.HTMLAttributes<HTMLGoogleMapElement>;
|
|
455
|
+
"notify-sounds": LocalJSX.NotifySounds & JSXBase.HTMLAttributes<HTMLNotifySoundsElement>;
|
|
435
456
|
"salon-booking": LocalJSX.SalonBooking & JSXBase.HTMLAttributes<HTMLSalonBookingElement>;
|
|
436
457
|
"salon-booking-modal": LocalJSX.SalonBookingModal & JSXBase.HTMLAttributes<HTMLSalonBookingModalElement>;
|
|
437
458
|
"salon-gift-card": LocalJSX.SalonGiftCard & JSXBase.HTMLAttributes<HTMLSalonGiftCardElement>;
|
|
@@ -4,6 +4,7 @@ export interface User {
|
|
|
4
4
|
firstName: string;
|
|
5
5
|
lastName: string;
|
|
6
6
|
avatar: string;
|
|
7
|
+
mobilePhone: string;
|
|
7
8
|
}
|
|
8
9
|
export declare function createUser(blob: any): {
|
|
9
10
|
id: any;
|
|
@@ -11,4 +12,13 @@ export declare function createUser(blob: any): {
|
|
|
11
12
|
lastName: any;
|
|
12
13
|
fullName: any;
|
|
13
14
|
avatar: any;
|
|
15
|
+
mobilePhone: any;
|
|
16
|
+
};
|
|
17
|
+
export declare function createUserFromChatRoom(blob: any): {
|
|
18
|
+
id: any;
|
|
19
|
+
firstName: any;
|
|
20
|
+
lastName: any;
|
|
21
|
+
fullName: any;
|
|
22
|
+
avatar: any;
|
|
23
|
+
mobilePhone: any;
|
|
14
24
|
};
|
|
@@ -4,3 +4,4 @@ export declare function format(first: string, middle: string, last: string): str
|
|
|
4
4
|
export declare function formatWebsiteUrl(website: string): string;
|
|
5
5
|
export declare function formatFullAddress(salon: Salon): string;
|
|
6
6
|
export declare function getRatingText(): string[];
|
|
7
|
+
export declare function formatPhoneNumber(phone: string): string;
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
8
|
-
return module = {
|
|
9
|
-
path: basedir,
|
|
10
|
-
exports: {},
|
|
11
|
-
require: function (path, base) {
|
|
12
|
-
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
13
|
-
}
|
|
14
|
-
}, fn(module, module.exports), module.exports;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
18
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
22
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function getAugmentedNamespace(n) {
|
|
26
|
-
if (n.__esModule) return n;
|
|
27
|
-
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
28
|
-
Object.keys(n).forEach(function (k) {
|
|
29
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
30
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return n[k];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
return a;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function commonjsRequire () {
|
|
41
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { commonjsGlobal as a, getAugmentedNamespace as b, createCommonjsModule as c, getDefaultExportFromCjs as g };
|