favesalon-embed 0.0.4 → 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/{cjs → dist/cjs}/_commonjsHelpers-5cfcba41.js +0 -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/{cjs/index-48ac68d0.js → dist/cjs/index-7f190886.js} +1924 -0
- package/{cjs/index-d5de0b9d.js → dist/cjs/index-e6bea8f5.js} +10 -0
- package/{cjs → dist/cjs}/index.cjs.js +0 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/{cjs → dist/cjs}/salon-booking-modal.cjs.entry.js +5 -5
- package/{cjs → dist/cjs}/salon-booking.cjs.entry.js +6 -7
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +28 -0
- package/{cjs → dist/cjs}/salon-gift-card.cjs.entry.js +7 -7
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +95 -0
- package/{cjs/salon-lookbook_2.cjs.entry.js → dist/cjs/salon-lookbook.cjs.entry.js} +23 -57
- 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-f1102d4a.js → dist/cjs/services-eee8f251.js} +265 -393
- package/dist/cjs/style-detail.cjs.entry.js +310 -0
- package/dist/cjs/user-avatar.cjs.entry.js +41 -0
- package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
- package/{collection → dist/collection}/collection-manifest.json +2 -3
- 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 +3 -3
- package/{collection → dist/collection}/components/salon-booking/salon-booking-modal.js +4 -4
- package/dist/collection/components/salon-gift-card/index.css +25 -0
- package/{collection → dist/collection}/components/salon-gift-card/index.js +4 -3
- package/{collection → dist/collection}/components/salon-gift-card/salon-gift-card-modal.js +24 -3
- 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/{collection → dist/collection}/components/salon-lookbook/index.css +0 -9
- package/{collection → dist/collection}/components/salon-lookbook/index.js +19 -19
- package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
- package/{collection → dist/collection}/components/salon-ranking/index.js +5 -5
- package/{collection → dist/collection}/components/salon-reviews/index.css +0 -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 → dist/collection}/components/salon-services/index.css +0 -0
- package/{collection → dist/collection}/components/salon-services/index.js +51 -8
- 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 → 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/{collection → dist/collection}/types/stylist.js +12 -9
- package/{favesalon-embed/index.esm.js → 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 -18
- package/{custom-elements → dist/custom-elements}/index.js +1227 -1035
- package/{esm → dist/esm}/_commonjsHelpers-098d5b27.js +0 -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-0f8eed73.js → dist/esm/index-6af0a03d.js} +10 -1
- package/{esm/index-67d677ba.js → dist/esm/index-80523fec.js} +1924 -1
- 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/{esm → dist/esm}/salon-booking-modal.entry.js +5 -5
- package/{esm → dist/esm}/salon-booking.entry.js +5 -6
- package/dist/esm/salon-gift-card-modal.entry.js +24 -0
- package/{esm → dist/esm}/salon-gift-card.entry.js +6 -6
- package/dist/esm/salon-latest-reviews.entry.js +91 -0
- package/{esm/salon-lookbook_2.entry.js → dist/esm/salon-lookbook.entry.js} +24 -57
- 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-74d84ca9.js → dist/esm/services-295247b1.js} +263 -392
- package/dist/esm/style-detail.entry.js +306 -0
- package/dist/esm/user-avatar.entry.js +37 -0
- 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/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/{favesalon-embed → dist/favesalon-embed}/p-d6083940.js +0 -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 +0 -0
- package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +0 -0
- package/{types → dist/types}/components/salon-gift-card/index.d.ts +0 -0
- package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +1 -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 +3 -3
- 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 +1 -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 +54 -59
- 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 +1 -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 +24 -7
- 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/index-95daad08.js +0 -1928
- package/cjs/loader.cjs.js +0 -22
- package/cjs/salon-contact_4.cjs.entry.js +0 -155
- package/cjs/salon-gift-card-modal.cjs.entry.js +0 -25
- package/cjs/salon-info.cjs.entry.js +0 -35
- package/cjs/salon-latest-reviews.cjs.entry.js +0 -58
- package/cjs/salon-lookbook-modal.cjs.entry.js +0 -141
- package/cjs/salon-reviews.cjs.entry.js +0 -205
- package/cjs/salon-services.cjs.entry.js +0 -47
- package/cjs/salon-stylists.cjs.entry.js +0 -54
- 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/lookbook-modal.css +0 -72
- package/collection/components/salon-lookbook/salon-lookbook-modal.js +0 -248
- package/collection/components/salon-reviews/index.js +0 -317
- package/collection/components/salon-schedules/index.css +0 -14
- package/collection/components/salon-schedules/index.js +0 -103
- 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 -225
- package/collection/types/common.js +0 -2
- package/collection/types/salon.js +0 -52
- package/collection/types/style.js +0 -103
- package/esm/colors-1ec90c5f.js +0 -93
- package/esm/favesalon-embed.js +0 -18
- package/esm/google-map.entry.js +0 -43
- package/esm/index-09d43e3e.js +0 -1926
- package/esm/loader.js +0 -18
- package/esm/salon-contact_4.entry.js +0 -148
- package/esm/salon-gift-card-modal.entry.js +0 -21
- package/esm/salon-info.entry.js +0 -31
- package/esm/salon-latest-reviews.entry.js +0 -54
- package/esm/salon-lookbook-modal.entry.js +0 -137
- package/esm/salon-reviews.entry.js +0 -201
- package/esm/salon-services.entry.js +0 -43
- package/esm/salon-stylists.entry.js +0 -50
- package/favesalon-embed/favesalon-embed.esm.js +0 -1
- package/favesalon-embed/p-0188d4dc.entry.js +0 -1
- package/favesalon-embed/p-0318501e.js +0 -1
- package/favesalon-embed/p-078f242d.entry.js +0 -1
- package/favesalon-embed/p-13e23c61.entry.js +0 -1
- package/favesalon-embed/p-17df13ad.js +0 -1
- package/favesalon-embed/p-1a3179c8.entry.js +0 -1
- package/favesalon-embed/p-20aa75de.js +0 -6
- package/favesalon-embed/p-2901a6d6.entry.js +0 -1
- package/favesalon-embed/p-2b861430.entry.js +0 -1
- package/favesalon-embed/p-44d810a0.js +0 -1
- package/favesalon-embed/p-4c68700f.entry.js +0 -1
- package/favesalon-embed/p-4e2d7b29.js +0 -1
- package/favesalon-embed/p-6b845bf1.entry.js +0 -1
- package/favesalon-embed/p-7350f6b5.entry.js +0 -1
- package/favesalon-embed/p-897c2b1c.entry.js +0 -1
- package/favesalon-embed/p-8e60f56f.entry.js +0 -1
- package/favesalon-embed/p-a49afdc1.entry.js +0 -1
- package/favesalon-embed/p-c93867c4.entry.js +0 -1
- package/favesalon-embed/p-ea6a097f.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-lookbook/salon-lookbook-modal.d.ts +0 -13
- package/types/components/salon-reviews/index.d.ts +0 -24
- 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 -26
- package/types/types/common.d.ts +0 -2
- package/types/types/style.d.ts +0 -59
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const _commonjsHelpers = require('./_commonjsHelpers-5cfcba41.js');
|
|
4
|
+
const colors = require('./colors-38421769.js');
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Appends the elements of `values` to `array`.
|
|
@@ -42,17 +43,17 @@ var Symbol = _root.Symbol;
|
|
|
42
43
|
var _Symbol = Symbol;
|
|
43
44
|
|
|
44
45
|
/** Used for built-in method references. */
|
|
45
|
-
var objectProto$
|
|
46
|
+
var objectProto$b = Object.prototype;
|
|
46
47
|
|
|
47
48
|
/** Used to check objects for own properties. */
|
|
48
|
-
var hasOwnProperty$
|
|
49
|
+
var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
|
|
49
50
|
|
|
50
51
|
/**
|
|
51
52
|
* Used to resolve the
|
|
52
53
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
53
54
|
* of values.
|
|
54
55
|
*/
|
|
55
|
-
var nativeObjectToString$1 = objectProto$
|
|
56
|
+
var nativeObjectToString$1 = objectProto$b.toString;
|
|
56
57
|
|
|
57
58
|
/** Built-in value references. */
|
|
58
59
|
var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
@@ -65,7 +66,7 @@ var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
|
|
|
65
66
|
* @returns {string} Returns the raw `toStringTag`.
|
|
66
67
|
*/
|
|
67
68
|
function getRawTag(value) {
|
|
68
|
-
var isOwn = hasOwnProperty$
|
|
69
|
+
var isOwn = hasOwnProperty$8.call(value, symToStringTag$1),
|
|
69
70
|
tag = value[symToStringTag$1];
|
|
70
71
|
|
|
71
72
|
try {
|
|
@@ -87,14 +88,14 @@ function getRawTag(value) {
|
|
|
87
88
|
var _getRawTag = getRawTag;
|
|
88
89
|
|
|
89
90
|
/** Used for built-in method references. */
|
|
90
|
-
var objectProto$
|
|
91
|
+
var objectProto$a = Object.prototype;
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Used to resolve the
|
|
94
95
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
95
96
|
* of values.
|
|
96
97
|
*/
|
|
97
|
-
var nativeObjectToString = objectProto$
|
|
98
|
+
var nativeObjectToString = objectProto$a.toString;
|
|
98
99
|
|
|
99
100
|
/**
|
|
100
101
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -181,13 +182,13 @@ function baseIsArguments(value) {
|
|
|
181
182
|
var _baseIsArguments = baseIsArguments;
|
|
182
183
|
|
|
183
184
|
/** Used for built-in method references. */
|
|
184
|
-
var objectProto$
|
|
185
|
+
var objectProto$9 = Object.prototype;
|
|
185
186
|
|
|
186
187
|
/** Used to check objects for own properties. */
|
|
187
|
-
var hasOwnProperty$
|
|
188
|
+
var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
|
|
188
189
|
|
|
189
190
|
/** Built-in value references. */
|
|
190
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
191
|
+
var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
|
|
191
192
|
|
|
192
193
|
/**
|
|
193
194
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -208,7 +209,7 @@ var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
|
|
|
208
209
|
* // => false
|
|
209
210
|
*/
|
|
210
211
|
var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
|
|
211
|
-
return isObjectLike_1(value) && hasOwnProperty$
|
|
212
|
+
return isObjectLike_1(value) && hasOwnProperty$7.call(value, 'callee') &&
|
|
212
213
|
!propertyIsEnumerable$1.call(value, 'callee');
|
|
213
214
|
};
|
|
214
215
|
|
|
@@ -499,17 +500,17 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
499
500
|
|
|
500
501
|
/** Used for built-in method references. */
|
|
501
502
|
var funcProto = Function.prototype,
|
|
502
|
-
objectProto$
|
|
503
|
+
objectProto$8 = Object.prototype;
|
|
503
504
|
|
|
504
505
|
/** Used to resolve the decompiled source of functions. */
|
|
505
506
|
var funcToString = funcProto.toString;
|
|
506
507
|
|
|
507
508
|
/** Used to check objects for own properties. */
|
|
508
|
-
var hasOwnProperty$
|
|
509
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
509
510
|
|
|
510
511
|
/** Used to detect if a method is native. */
|
|
511
512
|
var reIsNative = RegExp('^' +
|
|
512
|
-
funcToString.call(hasOwnProperty$
|
|
513
|
+
funcToString.call(hasOwnProperty$6).replace(reRegExpChar, '\\$&')
|
|
513
514
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
514
515
|
);
|
|
515
516
|
|
|
@@ -601,10 +602,10 @@ var _hashDelete = hashDelete;
|
|
|
601
602
|
var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
|
|
602
603
|
|
|
603
604
|
/** Used for built-in method references. */
|
|
604
|
-
var objectProto$
|
|
605
|
+
var objectProto$7 = Object.prototype;
|
|
605
606
|
|
|
606
607
|
/** Used to check objects for own properties. */
|
|
607
|
-
var hasOwnProperty$
|
|
608
|
+
var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
608
609
|
|
|
609
610
|
/**
|
|
610
611
|
* Gets the hash value for `key`.
|
|
@@ -621,16 +622,16 @@ function hashGet(key) {
|
|
|
621
622
|
var result = data[key];
|
|
622
623
|
return result === HASH_UNDEFINED$2 ? undefined : result;
|
|
623
624
|
}
|
|
624
|
-
return hasOwnProperty$
|
|
625
|
+
return hasOwnProperty$5.call(data, key) ? data[key] : undefined;
|
|
625
626
|
}
|
|
626
627
|
|
|
627
628
|
var _hashGet = hashGet;
|
|
628
629
|
|
|
629
630
|
/** Used for built-in method references. */
|
|
630
|
-
var objectProto$
|
|
631
|
+
var objectProto$6 = Object.prototype;
|
|
631
632
|
|
|
632
633
|
/** Used to check objects for own properties. */
|
|
633
|
-
var hasOwnProperty$
|
|
634
|
+
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
|
|
634
635
|
|
|
635
636
|
/**
|
|
636
637
|
* Checks if a hash value for `key` exists.
|
|
@@ -643,7 +644,7 @@ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
|
|
|
643
644
|
*/
|
|
644
645
|
function hashHas(key) {
|
|
645
646
|
var data = this.__data__;
|
|
646
|
-
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$
|
|
647
|
+
return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$4.call(data, key);
|
|
647
648
|
}
|
|
648
649
|
|
|
649
650
|
var _hashHas = hashHas;
|
|
@@ -1792,10 +1793,10 @@ function stubArray() {
|
|
|
1792
1793
|
var stubArray_1 = stubArray;
|
|
1793
1794
|
|
|
1794
1795
|
/** Used for built-in method references. */
|
|
1795
|
-
var objectProto$
|
|
1796
|
+
var objectProto$5 = Object.prototype;
|
|
1796
1797
|
|
|
1797
1798
|
/** Built-in value references. */
|
|
1798
|
-
var propertyIsEnumerable = objectProto$
|
|
1799
|
+
var propertyIsEnumerable = objectProto$5.propertyIsEnumerable;
|
|
1799
1800
|
|
|
1800
1801
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1801
1802
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
@@ -2087,10 +2088,10 @@ var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsType
|
|
|
2087
2088
|
var isTypedArray_1 = isTypedArray;
|
|
2088
2089
|
|
|
2089
2090
|
/** Used for built-in method references. */
|
|
2090
|
-
var objectProto$
|
|
2091
|
+
var objectProto$4 = Object.prototype;
|
|
2091
2092
|
|
|
2092
2093
|
/** Used to check objects for own properties. */
|
|
2093
|
-
var hasOwnProperty$
|
|
2094
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
2094
2095
|
|
|
2095
2096
|
/**
|
|
2096
2097
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
@@ -2110,7 +2111,7 @@ function arrayLikeKeys(value, inherited) {
|
|
|
2110
2111
|
length = result.length;
|
|
2111
2112
|
|
|
2112
2113
|
for (var key in value) {
|
|
2113
|
-
if ((inherited || hasOwnProperty$
|
|
2114
|
+
if ((inherited || hasOwnProperty$3.call(value, key)) &&
|
|
2114
2115
|
!(skipIndexes && (
|
|
2115
2116
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
2116
2117
|
key == 'length' ||
|
|
@@ -2130,7 +2131,7 @@ function arrayLikeKeys(value, inherited) {
|
|
|
2130
2131
|
var _arrayLikeKeys = arrayLikeKeys;
|
|
2131
2132
|
|
|
2132
2133
|
/** Used for built-in method references. */
|
|
2133
|
-
var objectProto$
|
|
2134
|
+
var objectProto$3 = Object.prototype;
|
|
2134
2135
|
|
|
2135
2136
|
/**
|
|
2136
2137
|
* Checks if `value` is likely a prototype object.
|
|
@@ -2141,7 +2142,7 @@ var objectProto$4 = Object.prototype;
|
|
|
2141
2142
|
*/
|
|
2142
2143
|
function isPrototype(value) {
|
|
2143
2144
|
var Ctor = value && value.constructor,
|
|
2144
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$
|
|
2145
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
|
|
2145
2146
|
|
|
2146
2147
|
return value === proto;
|
|
2147
2148
|
}
|
|
@@ -2170,10 +2171,10 @@ var nativeKeys = _overArg(Object.keys, Object);
|
|
|
2170
2171
|
var _nativeKeys = nativeKeys;
|
|
2171
2172
|
|
|
2172
2173
|
/** Used for built-in method references. */
|
|
2173
|
-
var objectProto$
|
|
2174
|
+
var objectProto$2 = Object.prototype;
|
|
2174
2175
|
|
|
2175
2176
|
/** Used to check objects for own properties. */
|
|
2176
|
-
var hasOwnProperty$
|
|
2177
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
2177
2178
|
|
|
2178
2179
|
/**
|
|
2179
2180
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
@@ -2188,7 +2189,7 @@ function baseKeys(object) {
|
|
|
2188
2189
|
}
|
|
2189
2190
|
var result = [];
|
|
2190
2191
|
for (var key in Object(object)) {
|
|
2191
|
-
if (hasOwnProperty$
|
|
2192
|
+
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
2192
2193
|
result.push(key);
|
|
2193
2194
|
}
|
|
2194
2195
|
}
|
|
@@ -2279,10 +2280,10 @@ var _getAllKeys = getAllKeys;
|
|
|
2279
2280
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
2280
2281
|
|
|
2281
2282
|
/** Used for built-in method references. */
|
|
2282
|
-
var objectProto$
|
|
2283
|
+
var objectProto$1 = Object.prototype;
|
|
2283
2284
|
|
|
2284
2285
|
/** Used to check objects for own properties. */
|
|
2285
|
-
var hasOwnProperty$
|
|
2286
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
2286
2287
|
|
|
2287
2288
|
/**
|
|
2288
2289
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
@@ -2310,7 +2311,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
2310
2311
|
var index = objLength;
|
|
2311
2312
|
while (index--) {
|
|
2312
2313
|
var key = objProps[index];
|
|
2313
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
2314
|
+
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
2314
2315
|
return false;
|
|
2315
2316
|
}
|
|
2316
2317
|
}
|
|
@@ -2444,10 +2445,10 @@ var argsTag = '[object Arguments]',
|
|
|
2444
2445
|
objectTag = '[object Object]';
|
|
2445
2446
|
|
|
2446
2447
|
/** Used for built-in method references. */
|
|
2447
|
-
var objectProto
|
|
2448
|
+
var objectProto = Object.prototype;
|
|
2448
2449
|
|
|
2449
2450
|
/** Used to check objects for own properties. */
|
|
2450
|
-
var hasOwnProperty
|
|
2451
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2451
2452
|
|
|
2452
2453
|
/**
|
|
2453
2454
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
@@ -2490,8 +2491,8 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
2490
2491
|
: _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
2491
2492
|
}
|
|
2492
2493
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
2493
|
-
var objIsWrapped = objIsObj && hasOwnProperty
|
|
2494
|
-
othIsWrapped = othIsObj && hasOwnProperty
|
|
2494
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
2495
|
+
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
2495
2496
|
|
|
2496
2497
|
if (objIsWrapped || othIsWrapped) {
|
|
2497
2498
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
@@ -3425,131 +3426,6 @@ var sortBy = _baseRest(function(collection, iteratees) {
|
|
|
3425
3426
|
|
|
3426
3427
|
var sortBy_1 = sortBy;
|
|
3427
3428
|
|
|
3428
|
-
/**
|
|
3429
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
3430
|
-
* value checks.
|
|
3431
|
-
*
|
|
3432
|
-
* @private
|
|
3433
|
-
* @param {Object} object The object to modify.
|
|
3434
|
-
* @param {string} key The key of the property to assign.
|
|
3435
|
-
* @param {*} value The value to assign.
|
|
3436
|
-
*/
|
|
3437
|
-
function baseAssignValue(object, key, value) {
|
|
3438
|
-
if (key == '__proto__' && _defineProperty) {
|
|
3439
|
-
_defineProperty(object, key, {
|
|
3440
|
-
'configurable': true,
|
|
3441
|
-
'enumerable': true,
|
|
3442
|
-
'value': value,
|
|
3443
|
-
'writable': true
|
|
3444
|
-
});
|
|
3445
|
-
} else {
|
|
3446
|
-
object[key] = value;
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
var _baseAssignValue = baseAssignValue;
|
|
3451
|
-
|
|
3452
|
-
/**
|
|
3453
|
-
* A specialized version of `baseAggregator` for arrays.
|
|
3454
|
-
*
|
|
3455
|
-
* @private
|
|
3456
|
-
* @param {Array} [array] The array to iterate over.
|
|
3457
|
-
* @param {Function} setter The function to set `accumulator` values.
|
|
3458
|
-
* @param {Function} iteratee The iteratee to transform keys.
|
|
3459
|
-
* @param {Object} accumulator The initial aggregated object.
|
|
3460
|
-
* @returns {Function} Returns `accumulator`.
|
|
3461
|
-
*/
|
|
3462
|
-
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
3463
|
-
var index = -1,
|
|
3464
|
-
length = array == null ? 0 : array.length;
|
|
3465
|
-
|
|
3466
|
-
while (++index < length) {
|
|
3467
|
-
var value = array[index];
|
|
3468
|
-
setter(accumulator, value, iteratee(value), array);
|
|
3469
|
-
}
|
|
3470
|
-
return accumulator;
|
|
3471
|
-
}
|
|
3472
|
-
|
|
3473
|
-
var _arrayAggregator = arrayAggregator;
|
|
3474
|
-
|
|
3475
|
-
/**
|
|
3476
|
-
* Aggregates elements of `collection` on `accumulator` with keys transformed
|
|
3477
|
-
* by `iteratee` and values set by `setter`.
|
|
3478
|
-
*
|
|
3479
|
-
* @private
|
|
3480
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
3481
|
-
* @param {Function} setter The function to set `accumulator` values.
|
|
3482
|
-
* @param {Function} iteratee The iteratee to transform keys.
|
|
3483
|
-
* @param {Object} accumulator The initial aggregated object.
|
|
3484
|
-
* @returns {Function} Returns `accumulator`.
|
|
3485
|
-
*/
|
|
3486
|
-
function baseAggregator(collection, setter, iteratee, accumulator) {
|
|
3487
|
-
_baseEach(collection, function(value, key, collection) {
|
|
3488
|
-
setter(accumulator, value, iteratee(value), collection);
|
|
3489
|
-
});
|
|
3490
|
-
return accumulator;
|
|
3491
|
-
}
|
|
3492
|
-
|
|
3493
|
-
var _baseAggregator = baseAggregator;
|
|
3494
|
-
|
|
3495
|
-
/**
|
|
3496
|
-
* Creates a function like `_.groupBy`.
|
|
3497
|
-
*
|
|
3498
|
-
* @private
|
|
3499
|
-
* @param {Function} setter The function to set accumulator values.
|
|
3500
|
-
* @param {Function} [initializer] The accumulator object initializer.
|
|
3501
|
-
* @returns {Function} Returns the new aggregator function.
|
|
3502
|
-
*/
|
|
3503
|
-
function createAggregator(setter, initializer) {
|
|
3504
|
-
return function(collection, iteratee) {
|
|
3505
|
-
var func = isArray_1(collection) ? _arrayAggregator : _baseAggregator,
|
|
3506
|
-
accumulator = initializer ? initializer() : {};
|
|
3507
|
-
|
|
3508
|
-
return func(collection, setter, _baseIteratee(iteratee), accumulator);
|
|
3509
|
-
};
|
|
3510
|
-
}
|
|
3511
|
-
|
|
3512
|
-
var _createAggregator = createAggregator;
|
|
3513
|
-
|
|
3514
|
-
/** Used for built-in method references. */
|
|
3515
|
-
var objectProto = Object.prototype;
|
|
3516
|
-
|
|
3517
|
-
/** Used to check objects for own properties. */
|
|
3518
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
3519
|
-
|
|
3520
|
-
/**
|
|
3521
|
-
* Creates an object composed of keys generated from the results of running
|
|
3522
|
-
* each element of `collection` thru `iteratee`. The order of grouped values
|
|
3523
|
-
* is determined by the order they occur in `collection`. The corresponding
|
|
3524
|
-
* value of each key is an array of elements responsible for generating the
|
|
3525
|
-
* key. The iteratee is invoked with one argument: (value).
|
|
3526
|
-
*
|
|
3527
|
-
* @static
|
|
3528
|
-
* @memberOf _
|
|
3529
|
-
* @since 0.1.0
|
|
3530
|
-
* @category Collection
|
|
3531
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
3532
|
-
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
|
|
3533
|
-
* @returns {Object} Returns the composed aggregate object.
|
|
3534
|
-
* @example
|
|
3535
|
-
*
|
|
3536
|
-
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
|
|
3537
|
-
* // => { '4': [4.2], '6': [6.1, 6.3] }
|
|
3538
|
-
*
|
|
3539
|
-
* // The `_.property` iteratee shorthand.
|
|
3540
|
-
* _.groupBy(['one', 'two', 'three'], 'length');
|
|
3541
|
-
* // => { '3': ['one', 'two'], '5': ['three'] }
|
|
3542
|
-
*/
|
|
3543
|
-
var groupBy = _createAggregator(function(result, value, key) {
|
|
3544
|
-
if (hasOwnProperty.call(result, key)) {
|
|
3545
|
-
result[key].push(value);
|
|
3546
|
-
} else {
|
|
3547
|
-
_baseAssignValue(result, key, [value]);
|
|
3548
|
-
}
|
|
3549
|
-
});
|
|
3550
|
-
|
|
3551
|
-
var groupBy_1 = groupBy;
|
|
3552
|
-
|
|
3553
3429
|
var bind = function bind(fn, thisArg) {
|
|
3554
3430
|
return function wrap() {
|
|
3555
3431
|
var args = new Array(arguments.length);
|
|
@@ -5294,6 +5170,11 @@ axios_1.default = _default;
|
|
|
5294
5170
|
|
|
5295
5171
|
var axios = axios_1;
|
|
5296
5172
|
|
|
5173
|
+
const dateTimeFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
5174
|
+
const shortDateYearFormat = 'ddd, MMM DD YYYY';
|
|
5175
|
+
const apiV1Prefix = 'api';
|
|
5176
|
+
const defaultImage = 'https://res.cloudinary.com/reckon-mini-sites/image/upload/v1636477599/FaveSalon%20Social%20Website/default/default--picture_w3jvfh.png';
|
|
5177
|
+
|
|
5297
5178
|
exports.BusinessHourStatus = void 0;
|
|
5298
5179
|
(function (BusinessHourStatus) {
|
|
5299
5180
|
BusinessHourStatus[BusinessHourStatus["Open"] = 0] = "Open";
|
|
@@ -5301,40 +5182,34 @@ exports.BusinessHourStatus = void 0;
|
|
|
5301
5182
|
BusinessHourStatus[BusinessHourStatus["ByAppointment"] = 2] = "ByAppointment";
|
|
5302
5183
|
})(exports.BusinessHourStatus || (exports.BusinessHourStatus = {}));
|
|
5303
5184
|
function createSalon(blob) {
|
|
5304
|
-
const
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
'theme3-layout1': 'd59b76',
|
|
5315
|
-
'theme3-layout2': 'b02858',
|
|
5316
|
-
'theme4-green': '5da826',
|
|
5317
|
-
'theme4': '08b89d',
|
|
5318
|
-
'theme5': 'f64c4d',
|
|
5319
|
-
};
|
|
5185
|
+
const geoLocations = blob.salon_geolocation || [];
|
|
5186
|
+
let salonImages = [];
|
|
5187
|
+
if (blob.salon_miniwebsite) {
|
|
5188
|
+
const activeSite = Array.isArray(blob.salon_miniwebsite) ? blob.salon_miniwebsite[0] : (blob.salon_miniwebsite || {});
|
|
5189
|
+
salonImages = [
|
|
5190
|
+
activeSite.full_small_slider_img1,
|
|
5191
|
+
activeSite.full_small_slider_img2,
|
|
5192
|
+
activeSite.full_small_slider_img3,
|
|
5193
|
+
].filter(image => !!image);
|
|
5194
|
+
}
|
|
5320
5195
|
return {
|
|
5321
5196
|
id: blob.id,
|
|
5322
5197
|
about: blob.about,
|
|
5323
5198
|
email: blob.email,
|
|
5199
|
+
ownerName: blob.owner_name,
|
|
5324
5200
|
fullProfileImage: blob.full_profile_image,
|
|
5325
5201
|
fullCoverImage: blob.full_cover_image,
|
|
5326
|
-
ownerName: blob.owner_name,
|
|
5327
5202
|
subdomain: blob.subdomain,
|
|
5328
5203
|
website: blob.website,
|
|
5329
5204
|
businessName: blob.business_name,
|
|
5330
5205
|
businessPhone: blob.business_phone,
|
|
5331
5206
|
businessAddress: blob.business_address,
|
|
5332
|
-
businessLocationLat:
|
|
5333
|
-
businessLocationLng:
|
|
5207
|
+
businessLocationLat: geoLocations.length > 0 ? geoLocations[0].location_lat : null,
|
|
5208
|
+
businessLocationLng: geoLocations.length > 0 ? geoLocations[0].location_lng : null,
|
|
5334
5209
|
city: blob.city,
|
|
5335
5210
|
state: blob.state,
|
|
5336
5211
|
zipcode: blob.zipcode ? Number(blob.zipcode) : null,
|
|
5337
|
-
businessHours: (blob.business_hours || blob.
|
|
5212
|
+
businessHours: (blob.business_hours || blob.salon_working_time || []).map(bh => {
|
|
5338
5213
|
return {
|
|
5339
5214
|
dayName: bh.day_name,
|
|
5340
5215
|
openTime: bh.open_time,
|
|
@@ -5343,17 +5218,24 @@ function createSalon(blob) {
|
|
|
5343
5218
|
};
|
|
5344
5219
|
}),
|
|
5345
5220
|
rating: Number(blob.rating_point),
|
|
5346
|
-
primaryColor:
|
|
5221
|
+
primaryColor: blob.primary_color || colors.Colors.Primary,
|
|
5222
|
+
salonImages,
|
|
5347
5223
|
};
|
|
5348
5224
|
}
|
|
5225
|
+
function getSalonImage({ salonImages, fullProfileImage }) {
|
|
5226
|
+
if (salonImages && salonImages.length > 0) {
|
|
5227
|
+
return salonImages[0];
|
|
5228
|
+
}
|
|
5229
|
+
if (fullProfileImage) {
|
|
5230
|
+
return fullProfileImage;
|
|
5231
|
+
}
|
|
5232
|
+
return defaultImage;
|
|
5233
|
+
}
|
|
5349
5234
|
|
|
5350
5235
|
var dayjs_min = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
5351
5236
|
!function(t,e){module.exports=e();}(_commonjsHelpers.commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
|
|
5352
5237
|
});
|
|
5353
5238
|
|
|
5354
|
-
const shortDate = 'DD MMM YYYY';
|
|
5355
|
-
const apiDateFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
5356
|
-
|
|
5357
5239
|
function createService(blob) {
|
|
5358
5240
|
const photos = (blob.photo_link || []).map(photo => {
|
|
5359
5241
|
return {
|
|
@@ -5381,13 +5263,15 @@ function createService(blob) {
|
|
|
5381
5263
|
|
|
5382
5264
|
function createStylist(blob) {
|
|
5383
5265
|
const ratingPercentage = blob.rating_percent ? Number(blob.rating_percent) : 0;
|
|
5266
|
+
const { first_name, last_name, mobile_phone, avatar, full_profile_image, } = blob.user || {};
|
|
5267
|
+
const userNames = [first_name, last_name].filter(name => !!name);
|
|
5384
5268
|
return {
|
|
5385
|
-
id: Number(blob.
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
avatar:
|
|
5390
|
-
phone:
|
|
5269
|
+
id: Number(blob.id),
|
|
5270
|
+
firstName: first_name,
|
|
5271
|
+
lastName: last_name,
|
|
5272
|
+
fullName: userNames.length > 0 ? userNames.join(' ') : blob.email,
|
|
5273
|
+
avatar: avatar || full_profile_image,
|
|
5274
|
+
phone: mobile_phone,
|
|
5391
5275
|
expertise: Boolean(blob.expertise),
|
|
5392
5276
|
rating: Math.ceil((ratingPercentage * 5) / 100),
|
|
5393
5277
|
};
|
|
@@ -5395,15 +5279,16 @@ function createStylist(blob) {
|
|
|
5395
5279
|
function createStylistFromLookbook(blob) {
|
|
5396
5280
|
const { user } = blob;
|
|
5397
5281
|
const ratingPercentage = blob.rating_percent ? Number(blob.rating_percent) : 0;
|
|
5282
|
+
const userNames = [user.first_name, user.last_name].filter(name => !!name);
|
|
5398
5283
|
return {
|
|
5399
5284
|
id: Number(blob.id),
|
|
5400
|
-
expertise: Boolean(blob.expertise),
|
|
5401
|
-
rating: Math.ceil((ratingPercentage * 5) / 100),
|
|
5402
|
-
name: [user.first_name, user.last_name].filter(field => !!field).join(' '),
|
|
5403
5285
|
firstName: user.first_name,
|
|
5404
5286
|
lastName: user.last_name,
|
|
5287
|
+
fullName: userNames.length > 0 ? userNames.join(' ') : (blob.fullName || blob.name || blob.title),
|
|
5405
5288
|
avatar: user.full_avatar || user.full_profile_image_thumb,
|
|
5406
5289
|
phone: user.mobile_phone,
|
|
5290
|
+
expertise: Boolean(blob.expertise),
|
|
5291
|
+
rating: Math.ceil((ratingPercentage * 5) / 100),
|
|
5407
5292
|
};
|
|
5408
5293
|
}
|
|
5409
5294
|
|
|
@@ -5411,99 +5296,134 @@ function createUser(blob) {
|
|
|
5411
5296
|
const userNames = [blob.first_name, blob.last_name].filter(name => !!name);
|
|
5412
5297
|
return {
|
|
5413
5298
|
id: blob.user_id,
|
|
5414
|
-
name: userNames.length > 0 ? userNames.join(' ') : blob.username,
|
|
5415
5299
|
firstName: blob.first_name,
|
|
5416
5300
|
lastName: blob.last_name,
|
|
5417
|
-
|
|
5301
|
+
fullName: userNames.length > 0 ? userNames.join(' ') : (blob.fullName || blob.name || blob.username),
|
|
5302
|
+
avatar: blob.avatar || blob.full_profile_image_thumb,
|
|
5418
5303
|
};
|
|
5419
5304
|
}
|
|
5420
5305
|
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5306
|
+
var MediaType;
|
|
5307
|
+
(function (MediaType) {
|
|
5308
|
+
MediaType[MediaType["Photo"] = 0] = "Photo";
|
|
5309
|
+
MediaType[MediaType["Video"] = 1] = "Video";
|
|
5310
|
+
})(MediaType || (MediaType = {}));
|
|
5311
|
+
class AlbumMedia {
|
|
5312
|
+
constructor(fields) {
|
|
5313
|
+
Object.assign(this, fields);
|
|
5314
|
+
}
|
|
5315
|
+
}
|
|
5316
|
+
function createAlbumMedia(blob) {
|
|
5317
|
+
const [createdDay, createdTime] = blob.create_date ? String(blob.create_date).split(' ') : [];
|
|
5318
|
+
const createdDateTime = createdDay && createdTime ? dayjs_min(`${createdDay} ${createdTime}`, dateTimeFormat).valueOf() : null;
|
|
5319
|
+
const [updatedDay, updatedTime] = blob.update_date ? String(blob.update_date).split(' ') : [];
|
|
5320
|
+
const updatedDateTime = updatedDay && updatedTime ? dayjs_min(`${updatedDay} ${updatedTime}`, dateTimeFormat).valueOf() : null;
|
|
5321
|
+
const isVideo = blob.media_type === MediaType.Video || blob.full_image_url.indexOf('.mp4') > -1;
|
|
5322
|
+
return new AlbumMedia({
|
|
5425
5323
|
id: blob.id,
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
createdDate:
|
|
5429
|
-
updatedDate:
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5324
|
+
caption: blob.caption,
|
|
5325
|
+
description: blob.description,
|
|
5326
|
+
createdDate: createdDateTime,
|
|
5327
|
+
updatedDate: updatedDateTime,
|
|
5328
|
+
mediaUrl: blob.full_image_url,
|
|
5329
|
+
imageThumb: !isVideo ? blob.full_image_url_thumb : null,
|
|
5330
|
+
imageThumbMedium: !isVideo ? blob.full_image_url_medium : null,
|
|
5331
|
+
imageWidth: !isVideo ? blob.img_w : 400,
|
|
5332
|
+
imageHeight: !isVideo ? blob.img_h : 300,
|
|
5333
|
+
mediaType: isVideo ? MediaType.Video : blob.media_type,
|
|
5334
|
+
totalLike: blob.total_like,
|
|
5335
|
+
totalDislike: blob.total_dislike,
|
|
5336
|
+
totalShare: blob.total_shared,
|
|
5337
|
+
totalView: blob.view_count,
|
|
5338
|
+
totalBooking: blob.total_booking,
|
|
5339
|
+
});
|
|
5434
5340
|
}
|
|
5435
|
-
|
|
5436
|
-
|
|
5341
|
+
class Album {
|
|
5342
|
+
constructor(fields) {
|
|
5343
|
+
Object.assign(this, fields);
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
function createAlbum(blob) {
|
|
5347
|
+
return new Album({
|
|
5437
5348
|
id: blob.id,
|
|
5438
5349
|
name: blob.name,
|
|
5439
5350
|
caption: blob.caption,
|
|
5440
5351
|
description: blob.description,
|
|
5441
5352
|
tags: blob.tags ? blob.tags.filter(tag => !!tag) : [],
|
|
5442
5353
|
salonId: blob.salon_id,
|
|
5443
|
-
stylistId: blob.
|
|
5354
|
+
stylistId: blob.stylist_id,
|
|
5444
5355
|
totalMedias: blob.total_medias || 0,
|
|
5445
5356
|
service: blob.service ? createService(blob.service) : null,
|
|
5446
5357
|
isPublic: (typeof blob.is_public !== 'undefined') ? Boolean(blob.is_public) : true,
|
|
5447
|
-
};
|
|
5358
|
+
});
|
|
5448
5359
|
}
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5360
|
+
class FaveStyleComment {
|
|
5361
|
+
constructor(fields) {
|
|
5362
|
+
Object.assign(this, fields);
|
|
5363
|
+
}
|
|
5364
|
+
}
|
|
5365
|
+
function createFaveStyleComment(blob) {
|
|
5366
|
+
const [createdDay, createdTime] = blob.create_date ? String(blob.create_date).split(' ') : [];
|
|
5367
|
+
const createdDateTime = createdDay && createdTime ? dayjs_min(`${createdDay} ${createdTime}`, dateTimeFormat).valueOf() : null;
|
|
5368
|
+
const [updatedDay, updatedTime] = blob.update_date ? String(blob.update_date).split(' ') : [];
|
|
5369
|
+
const updatedDateTime = updatedDay && updatedTime ? dayjs_min(`${updatedDay} ${updatedTime}`, dateTimeFormat).valueOf() : null;
|
|
5370
|
+
return new FaveStyleComment({
|
|
5453
5371
|
id: blob.id,
|
|
5454
|
-
|
|
5372
|
+
type: blob.type,
|
|
5373
|
+
title: blob.content,
|
|
5455
5374
|
description: blob.description,
|
|
5456
|
-
createdDate:
|
|
5457
|
-
updatedDate:
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
imgWidth: blob.img_w,
|
|
5463
|
-
imgHeight: blob.img_h,
|
|
5464
|
-
s3ImgWidth: blob.s3_img_w,
|
|
5465
|
-
s3ImgHeight: blob.s3_img_h,
|
|
5466
|
-
totalLike: blob.total_like,
|
|
5467
|
-
totalDislike: blob.total_dislike,
|
|
5468
|
-
totalShare: blob.total_shared,
|
|
5469
|
-
totalView: blob.view_count,
|
|
5470
|
-
totalBooking: blob.total_booking,
|
|
5471
|
-
owner: blob.user ? createUser(blob.user) : null,
|
|
5472
|
-
};
|
|
5375
|
+
createdDate: createdDateTime,
|
|
5376
|
+
updatedDate: updatedDateTime,
|
|
5377
|
+
parentCommentId: blob.parentCommentId,
|
|
5378
|
+
childComments: blob.child_comment ? blob.child_comment.map(createFaveStyleComment) : [],
|
|
5379
|
+
user: createUser(blob.user),
|
|
5380
|
+
});
|
|
5473
5381
|
}
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
let albumPhotos = blob.style_in_album ? blob.style_in_album.map(createFavesalonStyle) : [];
|
|
5478
|
-
if (!albumPhotos.find(ap => ap.id === blob.id)) {
|
|
5479
|
-
const currentPhoto = createFavesalonStyle(blob);
|
|
5480
|
-
albumPhotos = [currentPhoto].concat(albumPhotos);
|
|
5382
|
+
class FaveStyle {
|
|
5383
|
+
constructor(fields) {
|
|
5384
|
+
Object.assign(this, fields);
|
|
5481
5385
|
}
|
|
5482
|
-
|
|
5386
|
+
}
|
|
5387
|
+
function createFaveStyle(blob) {
|
|
5388
|
+
const [createdDay, createdTime] = blob.create_date ? String(blob.create_date).split(' ') : [];
|
|
5389
|
+
const createdDateTime = createdDay && createdTime ? dayjs_min(`${createdDay} ${createdTime}`, dateTimeFormat).valueOf() : null;
|
|
5390
|
+
const [updatedDay, updatedTime] = blob.update_date ? String(blob.update_date).split(' ') : [];
|
|
5391
|
+
const updatedDateTime = updatedDay && updatedTime ? dayjs_min(`${updatedDay} ${updatedTime}`, dateTimeFormat).valueOf() : null;
|
|
5392
|
+
const albumMedias = [createAlbumMedia(blob)].concat(blob.album_medias ? blob.album_medias.map(createAlbumMedia).filter(ap => ap.id !== blob.id) : []);
|
|
5393
|
+
const { total_booked: totalBooked, total_like: totalLike, total_share: totalShare, total_view: totalView, } = blob.style_activity || {};
|
|
5394
|
+
return new FaveStyle({
|
|
5483
5395
|
id: blob.id,
|
|
5484
5396
|
caption: blob.caption,
|
|
5485
5397
|
description: blob.description,
|
|
5486
|
-
createdDate:
|
|
5487
|
-
updatedDate:
|
|
5398
|
+
createdDate: createdDateTime,
|
|
5399
|
+
updatedDate: updatedDateTime,
|
|
5400
|
+
imageUrl: blob.full_image_url,
|
|
5401
|
+
imageThumb: blob.full_image_url_thumb,
|
|
5402
|
+
imageThumbMedium: blob.full_image_url_medium,
|
|
5403
|
+
imageWidth: blob.img_w,
|
|
5404
|
+
imageHeight: blob.img_h,
|
|
5488
5405
|
mediaType: blob.media_type,
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
totalDislike: blob.total_dislike,
|
|
5498
|
-
totalShare: blob.total_shared,
|
|
5499
|
-
totalView: blob.view_count,
|
|
5500
|
-
totalBooking: blob.total_booking,
|
|
5406
|
+
isPublic: (typeof blob.is_public !== 'undefined') ? Boolean(blob.is_public) : true,
|
|
5407
|
+
totalBooking: totalBooked || 0,
|
|
5408
|
+
totalLike: totalLike || 0,
|
|
5409
|
+
totalDislike: blob.total_dislike || 0,
|
|
5410
|
+
totalShare: totalShare || 0,
|
|
5411
|
+
totalView: totalView || 0,
|
|
5412
|
+
albumMedias,
|
|
5413
|
+
album: blob.album ? createAlbum(blob.album) : null,
|
|
5501
5414
|
owner: blob.user ? createUser(blob.user) : null,
|
|
5415
|
+
salonId: blob.salon_id ? Number(blob.salon_id) : null,
|
|
5502
5416
|
salon: blob.salon ? createSalon(blob.salon) : null,
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5417
|
+
stylistId: blob.stylist_id ? Number(blob.stylist_id) : null,
|
|
5418
|
+
stylist: blob.stylist ? createStylistFromLookbook(blob.stylist) : null,
|
|
5419
|
+
isLiked: blob.my_activity && blob.my_activity.liked,
|
|
5420
|
+
serviceId: blob.service_id ? Number(blob.service_id) : null,
|
|
5421
|
+
salonServiceId: blob.category_service_id ? Number(blob.category_service_id) : null,
|
|
5422
|
+
productBrand: blob.product_brand_used || '',
|
|
5423
|
+
});
|
|
5424
|
+
}
|
|
5425
|
+
function isVideoMedia({ mediaType }) {
|
|
5426
|
+
return mediaType === MediaType.Video;
|
|
5507
5427
|
}
|
|
5508
5428
|
|
|
5509
5429
|
function createReviewPhoto(blob) {
|
|
@@ -5515,15 +5435,15 @@ function createReviewPhoto(blob) {
|
|
|
5515
5435
|
};
|
|
5516
5436
|
}
|
|
5517
5437
|
function createReview(blob) {
|
|
5518
|
-
const reviewPhotos = blob.
|
|
5438
|
+
const reviewPhotos = blob.review_photo || [];
|
|
5519
5439
|
const [createdDay, createdTime] = String(blob.create_date).split(' ');
|
|
5520
5440
|
const [updatedDay, updatedTime] = String(blob.update_date).split(' ');
|
|
5521
5441
|
return {
|
|
5522
5442
|
title: blob.title,
|
|
5523
|
-
point: Math.ceil(Number(blob.avg_point)),
|
|
5524
5443
|
description: blob.comment,
|
|
5525
|
-
createdDate: dayjs_min(`${createdDay} ${createdTime}`,
|
|
5526
|
-
updatedDate: dayjs_min(`${updatedDay} ${updatedTime}`,
|
|
5444
|
+
createdDate: dayjs_min(`${createdDay} ${createdTime}`, dateTimeFormat).valueOf(),
|
|
5445
|
+
updatedDate: dayjs_min(`${updatedDay} ${updatedTime}`, dateTimeFormat).valueOf(),
|
|
5446
|
+
point: Math.ceil(Number(blob.avg_point)),
|
|
5527
5447
|
pointView: blob.view_point,
|
|
5528
5448
|
pointPrice: blob.price_point,
|
|
5529
5449
|
pointProduct: blob.product_point,
|
|
@@ -5533,69 +5453,58 @@ function createReview(blob) {
|
|
|
5533
5453
|
helpful: blob.helpful,
|
|
5534
5454
|
recommend: blob.recommend,
|
|
5535
5455
|
user: blob.user ? createUser(blob.user) : null,
|
|
5456
|
+
salon: blob.salon ? createSalon(blob.salon) : null,
|
|
5457
|
+
stylist: blob.stylist && blob.stylist.user ? createStylist(blob.stylist) : null,
|
|
5536
5458
|
photos: reviewPhotos.map(createReviewPhoto),
|
|
5537
5459
|
};
|
|
5538
5460
|
}
|
|
5539
5461
|
|
|
5540
|
-
|
|
5541
|
-
var t = {};
|
|
5542
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5543
|
-
t[p] = s[p];
|
|
5544
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
5545
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5546
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
5547
|
-
t[p[i]] = s[p[i]];
|
|
5548
|
-
}
|
|
5549
|
-
return t;
|
|
5550
|
-
};
|
|
5462
|
+
const apiV2Prefix = 'api-ver2';
|
|
5551
5463
|
class HttpService {
|
|
5552
5464
|
constructor() {
|
|
5553
5465
|
this.http = null;
|
|
5554
5466
|
this.http = axios.create({
|
|
5555
5467
|
baseURL: 'https://favesalon.com',
|
|
5468
|
+
// baseURL: 'http://13.57.216.170',
|
|
5556
5469
|
headers: {},
|
|
5557
5470
|
});
|
|
5558
5471
|
}
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
return this.http.post(url, { salon_id: salonId })
|
|
5562
|
-
.then((response) => {
|
|
5563
|
-
const { status, data } = response.data;
|
|
5564
|
-
return status && data ? createSalon(data.Salon) : null;
|
|
5565
|
-
})
|
|
5566
|
-
.catch(() => (null));
|
|
5567
|
-
}
|
|
5568
|
-
fetchReviews(url, options, allReviews) {
|
|
5569
|
-
const { noLoop } = options, restOptions = __rest(options, ["noLoop"]);
|
|
5570
|
-
return this.http.post(url, restOptions)
|
|
5472
|
+
fetchStyleDetail(styleId) {
|
|
5473
|
+
return this.http.get(`${apiV2Prefix}/style/${styleId}/detail`)
|
|
5571
5474
|
.then((response) => {
|
|
5572
5475
|
const { status, data } = response.data;
|
|
5573
5476
|
if (status) {
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5477
|
+
let styleInfo = null, similarStyles = [];
|
|
5478
|
+
try {
|
|
5479
|
+
styleInfo = createFaveStyle(data);
|
|
5480
|
+
similarStyles = (data.style_similars || []).map(createFaveStyle);
|
|
5578
5481
|
}
|
|
5579
|
-
|
|
5580
|
-
return {
|
|
5581
|
-
totalReviews: finalReviews.length || 0,
|
|
5582
|
-
allReviews: finalReviews,
|
|
5583
|
-
};
|
|
5482
|
+
catch (e) { }
|
|
5483
|
+
return { styleInfo, similarStyles };
|
|
5584
5484
|
}
|
|
5585
|
-
return {
|
|
5485
|
+
return { styleInfo: null, similarStyles: [] };
|
|
5486
|
+
})
|
|
5487
|
+
.catch(() => {
|
|
5488
|
+
return { styleInfo: null, similarStyles: [] };
|
|
5586
5489
|
});
|
|
5587
5490
|
}
|
|
5588
|
-
|
|
5589
|
-
const url =
|
|
5590
|
-
return this.
|
|
5491
|
+
fetchSalonInfo(salonId) {
|
|
5492
|
+
const url = `${apiV2Prefix}/salon/${salonId}/detail`;
|
|
5493
|
+
return this.http.get(url)
|
|
5494
|
+
.then((response) => {
|
|
5495
|
+
const { status, data } = response.data;
|
|
5496
|
+
return status && data ? createSalon(data) : null;
|
|
5497
|
+
})
|
|
5498
|
+
.catch(() => (null));
|
|
5499
|
+
}
|
|
5500
|
+
fetchSalonLatestStyles(salonId, options) {
|
|
5501
|
+
const url = `${apiV2Prefix}/salon/${salonId}/styles`;
|
|
5502
|
+
return this.http.post(url, Object.assign(Object.assign({}, options), { sort: 'newest' }))
|
|
5591
5503
|
.then(response => {
|
|
5592
|
-
const {
|
|
5593
|
-
return
|
|
5594
|
-
total: totalReviews,
|
|
5595
|
-
allItems: allReviews,
|
|
5596
|
-
};
|
|
5504
|
+
const { data } = response.data;
|
|
5505
|
+
return (data || []).slice(0, options.limit).map(createFaveStyle);
|
|
5597
5506
|
})
|
|
5598
|
-
.catch(() => (
|
|
5507
|
+
.catch(() => ([]));
|
|
5599
5508
|
}
|
|
5600
5509
|
decorateServiceGroups(groups) {
|
|
5601
5510
|
return groups.map((cate, index) => {
|
|
@@ -5622,7 +5531,7 @@ class HttpService {
|
|
|
5622
5531
|
});
|
|
5623
5532
|
}
|
|
5624
5533
|
fetchSalonServices(salonId) {
|
|
5625
|
-
const url =
|
|
5534
|
+
const url = `${apiV1Prefix}/salon/services?v=2&id=${salonId}`;
|
|
5626
5535
|
return this.http.get(url)
|
|
5627
5536
|
.then(response => {
|
|
5628
5537
|
const { status, data } = response.data;
|
|
@@ -5633,34 +5542,42 @@ class HttpService {
|
|
|
5633
5542
|
})
|
|
5634
5543
|
.catch(() => ([]));
|
|
5635
5544
|
}
|
|
5636
|
-
fetchSalonStylists(salonId) {
|
|
5637
|
-
const
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
const { status, data } = response.data;
|
|
5646
|
-
return status ? (data || []).map(blob => (Object.assign(Object.assign({}, blob), { id: blob.stylist_id }))) : [];
|
|
5545
|
+
fetchSalonStylists(salonId, options = { page: 1, limit: 12 }) {
|
|
5546
|
+
const url = `${apiV2Prefix}/salon/${salonId}/stylists?page=${options.page}&limit=${options.limit}`;
|
|
5547
|
+
return this.http.get(url)
|
|
5548
|
+
.then(response => {
|
|
5549
|
+
const { paging, data } = response.data;
|
|
5550
|
+
return {
|
|
5551
|
+
total: paging.total_item || data.length,
|
|
5552
|
+
data: data.map(createStylist),
|
|
5553
|
+
};
|
|
5647
5554
|
})
|
|
5648
|
-
.catch(() => ([]));
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5555
|
+
.catch(() => ({ total: 0, data: [] }));
|
|
5556
|
+
}
|
|
5557
|
+
fetchSalonReviews(salonId, options) {
|
|
5558
|
+
const url = `${apiV2Prefix}/salon/${salonId}/reviews`;
|
|
5559
|
+
return this.http.post(url, Object.assign({ avg_point_greater_than: 0 }, options))
|
|
5560
|
+
.then(response => {
|
|
5561
|
+
const { data, paging } = response.data || {};
|
|
5562
|
+
const { total_1star: onestar, total_2star: twoStar, total_3star: threeStar, total_4star: fourStar, total_5star: fiveStar, total_review: totalReviews, avg_point: reviewPoint, } = paging.review_detail || {};
|
|
5563
|
+
return {
|
|
5564
|
+
total: paging.total_item || 0,
|
|
5565
|
+
stats: {
|
|
5566
|
+
totalReviews,
|
|
5567
|
+
reviewPoint: reviewPoint ? Math.ceil(reviewPoint) : 0,
|
|
5568
|
+
'1': onestar ? Math.ceil(onestar) : 0,
|
|
5569
|
+
'2': twoStar ? Math.ceil(twoStar) : 0,
|
|
5570
|
+
'3': threeStar ? Math.ceil(threeStar) : 0,
|
|
5571
|
+
'4': fourStar ? Math.ceil(fourStar) : 0,
|
|
5572
|
+
'5': fiveStar ? Math.ceil(fiveStar) : 0,
|
|
5573
|
+
},
|
|
5574
|
+
data: data.map(createReview),
|
|
5575
|
+
};
|
|
5659
5576
|
})
|
|
5660
|
-
.catch(() => []);
|
|
5577
|
+
.catch(() => ({ total: 0, stats: {}, data: [] }));
|
|
5661
5578
|
}
|
|
5662
5579
|
fetchSalonCategories() {
|
|
5663
|
-
return this.http.post(
|
|
5580
|
+
return this.http.post(`${apiV2Prefix}/search/get-services`, { limit: 50 })
|
|
5664
5581
|
.then((response) => {
|
|
5665
5582
|
const { status, data } = response.data;
|
|
5666
5583
|
if (status) {
|
|
@@ -5679,84 +5596,39 @@ class HttpService {
|
|
|
5679
5596
|
}
|
|
5680
5597
|
fetchSalonLookbooks(salonId, options) {
|
|
5681
5598
|
const noResult = { total: 0, allLookbooks: [] };
|
|
5682
|
-
|
|
5683
|
-
|
|
5599
|
+
const url = `${apiV2Prefix}/salon/${salonId}/styles`;
|
|
5600
|
+
const postData = Object.assign({ page: 1, limit: 20 }, options);
|
|
5601
|
+
return this.http.post(url, postData)
|
|
5602
|
+
.then(response => {
|
|
5684
5603
|
const { status, data, paging } = response.data;
|
|
5685
5604
|
if (status) {
|
|
5686
5605
|
return {
|
|
5687
5606
|
total: paging.total_item || 0,
|
|
5688
|
-
allLookbooks: (data || []).map(
|
|
5607
|
+
allLookbooks: (data || []).map(createFaveStyle),
|
|
5689
5608
|
};
|
|
5690
5609
|
}
|
|
5691
5610
|
return noResult;
|
|
5692
5611
|
})
|
|
5693
5612
|
.catch(() => (noResult));
|
|
5694
5613
|
}
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
page: 1,
|
|
5699
|
-
limit: 20,
|
|
5700
|
-
salon_id: salonId,
|
|
5701
|
-
})
|
|
5702
|
-
.then((response) => {
|
|
5703
|
-
const { status, data } = response.data;
|
|
5704
|
-
if (status) {
|
|
5705
|
-
return (data || []).map(createFavesalonStyle);
|
|
5706
|
-
}
|
|
5707
|
-
return [];
|
|
5708
|
-
})
|
|
5709
|
-
.catch(() => {
|
|
5710
|
-
return [];
|
|
5711
|
-
});
|
|
5712
|
-
}
|
|
5713
|
-
fetchAllStyles(url, options, allStyles) {
|
|
5714
|
-
return this.http.post(url, options)
|
|
5715
|
-
.then((response) => {
|
|
5716
|
-
const { status, data } = response.data;
|
|
5717
|
-
if (status) {
|
|
5718
|
-
const styles = (data || []).map(createFavesalonStyle);
|
|
5719
|
-
// fetch next page styles
|
|
5720
|
-
if (styles.length >= options.limit) {
|
|
5721
|
-
return this.fetchAllStyles(url, Object.assign(Object.assign({}, options), { page: options.page + 1 }), allStyles.concat(styles));
|
|
5722
|
-
}
|
|
5723
|
-
return options.page === 1 ? styles : allStyles;
|
|
5724
|
-
}
|
|
5725
|
-
return allStyles;
|
|
5726
|
-
});
|
|
5727
|
-
}
|
|
5728
|
-
fetchAllSalonPhotos(salonId, options) {
|
|
5729
|
-
return this.fetchAllStyles('api/style/filter', Object.assign({ page: 1, limit: 20, salon_id: salonId }, options), []).catch(() => {
|
|
5730
|
-
return [];
|
|
5731
|
-
});
|
|
5732
|
-
}
|
|
5733
|
-
fetchStyleDetail(styleId) {
|
|
5734
|
-
return this.http.post('api/home/style-info', { photo_id: styleId })
|
|
5735
|
-
.then((response) => {
|
|
5736
|
-
const { status, data } = response.data;
|
|
5737
|
-
if (status) {
|
|
5738
|
-
return createFavesalonLookbook(data);
|
|
5739
|
-
}
|
|
5740
|
-
return null;
|
|
5741
|
-
})
|
|
5742
|
-
.catch(() => (null));
|
|
5743
|
-
}
|
|
5744
|
-
fetchStyleComments(options) {
|
|
5745
|
-
return this.http.post('api/comment/filter', options)
|
|
5614
|
+
fetchStyleComments(styleId) {
|
|
5615
|
+
const url = `${apiV2Prefix}/style/comment?photo_id=${styleId}`;
|
|
5616
|
+
return this.http.get(url)
|
|
5746
5617
|
.then(response => {
|
|
5747
|
-
const {
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5618
|
+
const { paging, data } = response.data;
|
|
5619
|
+
return {
|
|
5620
|
+
total: paging.total_item || 0,
|
|
5621
|
+
data: data.map(createFaveStyleComment),
|
|
5622
|
+
};
|
|
5752
5623
|
})
|
|
5753
|
-
.catch(() => ([]));
|
|
5624
|
+
.catch(() => ({ total: 0, data: [] }));
|
|
5754
5625
|
}
|
|
5755
5626
|
}
|
|
5756
5627
|
const HttpService$1 = () => new HttpService();
|
|
5757
5628
|
|
|
5758
5629
|
exports.HttpService = HttpService$1;
|
|
5759
5630
|
exports.dayjs_min = dayjs_min;
|
|
5760
|
-
exports.
|
|
5761
|
-
exports.
|
|
5631
|
+
exports.getSalonImage = getSalonImage;
|
|
5632
|
+
exports.isVideoMedia = isVideoMedia;
|
|
5633
|
+
exports.shortDateYearFormat = shortDateYearFormat;
|
|
5762
5634
|
exports.sortBy_1 = sortBy_1;
|