favesalon-embed 1.0.28 → 1.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/dist/custom-elements/index.d.ts +6 -0
- package/dist/favesalon-embed/activate-form.entry.js +1 -1
- package/dist/favesalon-embed/app-globals-8f27cbc0.js +7 -0
- package/dist/favesalon-embed/buy-giftcard-form.entry.js +123 -262
- package/dist/favesalon-embed/buy-giftcard-verification.entry.js +9 -6
- package/dist/favesalon-embed/change-password-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-box.entry.js +1 -1
- package/dist/favesalon-embed/chat-button.entry.js +1 -1
- package/dist/favesalon-embed/chat-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-messages.entry.js +1 -1
- package/dist/favesalon-embed/chat-rooms.entry.js +1 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- package/dist/favesalon-embed/index-761e92c1.js +3371 -0
- package/dist/favesalon-embed/login-form.entry.js +1 -1
- package/dist/favesalon-embed/magensa-payment.entry.js +136 -0
- package/dist/favesalon-embed/register-form.entry.js +1 -1
- package/dist/favesalon-embed/reset-password-form.entry.js +1 -1
- package/dist/favesalon-embed/salon-info.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-reviews.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-styles.entry.js +1 -1
- package/dist/favesalon-embed/salon-locations.entry.js +1 -1
- 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-392da128.js → services-48c99e41.js} +20 -5
- package/dist/favesalon-embed/style-detail.entry.js +1 -1
- package/dist/favesalon-embed/wizard-existing-user.entry.js +7 -1
- package/dist/favesalon-embed/wizard-new-user.entry.js +7 -1
- package/dist/types/components/buy-giftcard-form/buy-giftcard-form.d.ts +2 -5
- package/dist/types/components/buy-giftcard-verification/buy-giftcard-verification.d.ts +2 -2
- package/dist/types/components/magensa-payment/magensa-payment.d.ts +19 -0
- package/dist/types/components.d.ts +25 -0
- package/dist/types/services/services.d.ts +3 -0
- package/dist/types/types/giftcard.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService } from './services-
|
|
3
|
+
import { H as HttpService } from './services-48c99e41.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
6
6
|
const loginFormCss = ".form--user-login .form--login-label{cursor:pointer;display:block;margin-top:0;margin-bottom:6px}.form--user-login input,.form--user-login button{border:1px solid #cecece;box-sizing:border-box;display:inline-block;width:100%;padding:4px 11px;height:44px;-moz-transition:all 0.3s;-webkit-transition:all 0.3s;transition:all 0.3s;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.form--user-login button{background-color:#001529;border:1px solid #001529;color:#fff;cursor:pointer;height:44px}.form--user-login button:disabled{background-color:#cecece;border:1px solid #cecece;color:#212121}";
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
+
import { I as Inputmask } from './inputmask-afacb9e0.js';
|
|
3
|
+
import { H as HttpService, g as get_1 } from './services-48c99e41.js';
|
|
4
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
5
|
+
import './_commonjsHelpers-9bc404fc.js';
|
|
6
|
+
|
|
7
|
+
const magensaPaymentCss = "magensa-payment{display:block;width:100%}.magensa-payment--form *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.magensa-payment--form input[type=\"number\"]{padding:8px 16px 8px 28px !important}";
|
|
8
|
+
|
|
9
|
+
const MagensaPayment = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.isProcessing = undefined;
|
|
13
|
+
this.processingError = undefined;
|
|
14
|
+
this.salonId = undefined;
|
|
15
|
+
this.paymentAmount = undefined;
|
|
16
|
+
this.onPaymentSuccess = undefined;
|
|
17
|
+
this.onPaymentError = undefined;
|
|
18
|
+
this.isSubmitting = undefined;
|
|
19
|
+
this.errorMessage = undefined;
|
|
20
|
+
this.cardNumber = undefined;
|
|
21
|
+
this.cardExpiry = undefined;
|
|
22
|
+
this.cardCCV = undefined;
|
|
23
|
+
this.cardName = undefined;
|
|
24
|
+
}
|
|
25
|
+
componentDidRender() {
|
|
26
|
+
this.cardNumberInput && Inputmask({ mask: '9999 9999 9999 9999' }).mask(this.cardNumberInput);
|
|
27
|
+
this.cardExpiryInput && Inputmask({ mask: '99/99' }).mask(this.cardExpiryInput);
|
|
28
|
+
}
|
|
29
|
+
async onSubmit() {
|
|
30
|
+
this.isSubmitting = true;
|
|
31
|
+
this.errorMessage = null;
|
|
32
|
+
try {
|
|
33
|
+
const [expiryMonth, expiryYear] = String(this.cardExpiry || '').split('/');
|
|
34
|
+
if (!!this.cardName && !!this.cardNumber && !!this.cardCCV && !!expiryMonth && !!expiryYear) {
|
|
35
|
+
const { queueId } = await HttpService().magensaCreateQueue(this.salonId, {
|
|
36
|
+
ManualEntryInput: {
|
|
37
|
+
AddressLine1: null,
|
|
38
|
+
AddressLine2: null,
|
|
39
|
+
Country: null,
|
|
40
|
+
State: null,
|
|
41
|
+
City: null,
|
|
42
|
+
Zip: null,
|
|
43
|
+
NameOnCard: this.cardName,
|
|
44
|
+
PAN: Number(String(this.cardNumber).split(' ').join('')),
|
|
45
|
+
ExpirationDate: `${expiryYear}${expiryMonth}`,
|
|
46
|
+
CVV: this.cardCCV,
|
|
47
|
+
},
|
|
48
|
+
Amount: this.paymentAmount,
|
|
49
|
+
});
|
|
50
|
+
this.onPaymentSuccess(queueId);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
const errorMessage = 'Please input all credit card info before submitting';
|
|
54
|
+
this.errorMessage = errorMessage;
|
|
55
|
+
this.onPaymentError(errorMessage, {});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (reponse) {
|
|
59
|
+
const errorMessage = get_1(reponse, 'message') || get_1(reponse, 'error.message') || get_1(reponse, 'response.data.message') || `Something went wrong with your credit card`;
|
|
60
|
+
this.errorMessage = errorMessage;
|
|
61
|
+
this.onPaymentError(errorMessage, reponse.response || reponse);
|
|
62
|
+
}
|
|
63
|
+
this.isSubmitting = false;
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
const isSubmitting = this.isSubmitting || this.isProcessing;
|
|
67
|
+
const errorMessage = this.errorMessage || this.processingError;
|
|
68
|
+
return (h("div", { class: "magensa-payment--form" }, h("div", { style: { fontSize: '20px', fontWeight: '700', marginTop: '32px' } }, "Payment"), h("div", { style: { marginTop: '8px', marginLeft: '-6px' } }, h("credit-card-types", null)), h("div", { style: { marginTop: '24px' } }, h("div", { style: { fontSize: '18px' } }, "Card number"), h("div", { style: { marginTop: '8px' } }, h("input", { type: "text", placeholder: "#### #### #### ####", autoComplete: "new-password", ref: el => this.cardNumberInput = el, onInput: (evt) => this.cardNumber = evt.target.value, style: {
|
|
69
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
70
|
+
backgroundColor: Colors.White,
|
|
71
|
+
color: Colors.TextColor,
|
|
72
|
+
borderRadius: '8px',
|
|
73
|
+
padding: '8px 16px',
|
|
74
|
+
height: '48px',
|
|
75
|
+
width: '100%',
|
|
76
|
+
fontSize: '22px',
|
|
77
|
+
fontWeight: '700',
|
|
78
|
+
} }))), h("div", { style: { display: 'flex', alignItems: 'center', marginTop: '24px' } }, h("div", { style: { width: '48%' } }, h("div", { style: { fontSize: '18px' } }, "Expire date"), h("div", { style: { marginTop: '8px' } }, h("input", { type: "text", placeholder: "MM/YY", autoComplete: "new-password", ref: el => this.cardExpiryInput = el, onInput: (evt) => this.cardExpiry = evt.target.value, style: {
|
|
79
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
80
|
+
backgroundColor: Colors.White,
|
|
81
|
+
color: Colors.TextColor,
|
|
82
|
+
borderRadius: '8px',
|
|
83
|
+
padding: '8px 16px',
|
|
84
|
+
height: '48px',
|
|
85
|
+
width: '100%',
|
|
86
|
+
fontSize: '22px',
|
|
87
|
+
fontWeight: '700',
|
|
88
|
+
} }))), h("div", { style: { width: '48%', marginLeft: '4%' } }, h("div", { style: { fontSize: '18px' } }, "CCV"), h("div", { style: { marginTop: '8px' } }, h("input", { type: "text", autoComplete: "new-password", onInput: (evt) => this.cardCCV = evt.target.value, style: {
|
|
89
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
90
|
+
backgroundColor: Colors.White,
|
|
91
|
+
color: Colors.TextColor,
|
|
92
|
+
borderRadius: '8px',
|
|
93
|
+
padding: '8px 16px',
|
|
94
|
+
height: '48px',
|
|
95
|
+
width: '100%',
|
|
96
|
+
fontSize: '22px',
|
|
97
|
+
fontWeight: '700',
|
|
98
|
+
} })))), h("div", { style: { marginTop: '24px' } }, h("div", { style: { fontSize: '18px' } }, "Card name"), h("div", { style: { marginTop: '8px' } }, h("input", { type: "text", autoComplete: "new-password", onInput: (evt) => this.cardName = evt.target.value, style: {
|
|
99
|
+
border: `1px solid ${Colors.Gray03}`,
|
|
100
|
+
backgroundColor: Colors.White,
|
|
101
|
+
color: Colors.TextColor,
|
|
102
|
+
borderRadius: '8px',
|
|
103
|
+
padding: '8px 16px',
|
|
104
|
+
height: '48px',
|
|
105
|
+
width: '100%',
|
|
106
|
+
fontSize: '22px',
|
|
107
|
+
fontWeight: '700',
|
|
108
|
+
} }))), h("div", { style: { marginTop: '24px' } }, !isSubmitting && errorMessage && (h("div", { style: {
|
|
109
|
+
color: Colors.Red03,
|
|
110
|
+
marginBottom: '16px',
|
|
111
|
+
} }, errorMessage)), h("button", { type: "button", disabled: isSubmitting, style: {
|
|
112
|
+
border: `1px solid ${Colors.Secondary}`,
|
|
113
|
+
backgroundColor: Colors.Secondary,
|
|
114
|
+
color: Colors.White,
|
|
115
|
+
borderRadius: '8px',
|
|
116
|
+
cursor: 'pointer',
|
|
117
|
+
fontSize: '16px',
|
|
118
|
+
fontWeight: '700',
|
|
119
|
+
paddingLeft: '24px',
|
|
120
|
+
paddingRight: '24px',
|
|
121
|
+
height: '44px',
|
|
122
|
+
width: '100%',
|
|
123
|
+
...isSubmitting ? {
|
|
124
|
+
color: Colors.TextColor,
|
|
125
|
+
borderColor: Colors.Gray03,
|
|
126
|
+
backgroundColor: Colors.Gray03,
|
|
127
|
+
display: 'flex',
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
justifyContent: 'center',
|
|
130
|
+
} : {},
|
|
131
|
+
}, onClick: () => this.onSubmit() }, "Submit ", isSubmitting && (h("span", { style: { marginLeft: '4px' } }, h("icon-loading", null)))))));
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
MagensaPayment.style = magensaPaymentCss;
|
|
135
|
+
|
|
136
|
+
export { MagensaPayment as magensa_payment };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, g as get_1 } from './services-
|
|
2
|
+
import { H as HttpService, g as get_1 } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, g as get_1 } from './services-
|
|
2
|
+
import { H as HttpService, g as get_1 } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, d as dayjs_min, h as shortDateYearFormat } from './services-
|
|
2
|
+
import { H as HttpService, d as dayjs_min, h as shortDateYearFormat } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import { g as getRatingText } from './utils-359c37f7.js';
|
|
5
5
|
import './_commonjsHelpers-9bc404fc.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService, k as isVideoMedia } from './services-
|
|
3
|
+
import { H as HttpService, k as isVideoMedia } from './services-48c99e41.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
6
6
|
const indexCss = "salon-latest-styles .view--salon-styles--item{width:120px;height:120px}@media (min-width: 1024px){salon-latest-styles .view--salon-styles--item{width:200px;height:200px}}";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { a as formatWebsiteUrl, b as formatFullAddress } from './utils-359c37f7.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
|
-
import { H as HttpService } from './services-
|
|
4
|
+
import { H as HttpService } from './services-48c99e41.js';
|
|
5
5
|
import './_commonjsHelpers-9bc404fc.js';
|
|
6
6
|
|
|
7
7
|
const indexCss = "@media (min-width: 768px){salon-locations .salon-contact--links{overflow:hidden;margin-left:-32px}salon-locations .salon-contact--links-item{float:left;display:flex;flex-direction:row;align-items:center;font-size:16px;min-width:300px;padding-left:32px}salon-locations .salon-contact--links-item:nth-child(2n+1){clear:left}salon-locations .salon-contact--links-item+.salon-contact--links-item{margin-top:8px}}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService } from './services-
|
|
3
|
+
import { H as HttpService } from './services-48c99e41.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
6
6
|
const indexCss = "@media (max-width: 768px){salon-lookbook .view-header{display:block !important}salon-lookbook .salon-loobook--serch-result{margin-bottom:16px}salon-lookbook .salon-loobook--filter-wrapper>label,salon-lookbook .salon-loobook--sort-wrapper>label{display:none !important}}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, d as dayjs_min, h as shortDateYearFormat } from './services-
|
|
2
|
+
import { H as HttpService, d as dayjs_min, h as shortDateYearFormat } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, B as BusinessHourStatus } from './services-
|
|
2
|
+
import { H as HttpService, B as BusinessHourStatus } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, j as sortBy_1 } from './services-
|
|
2
|
+
import { H as HttpService, j as sortBy_1 } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService } from './services-
|
|
3
|
+
import { H as HttpService } from './services-48c99e41.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
6
6
|
const indexCss = ".view--salon-stylists{overflow:hidden;margin-left:-12px;margin-top:-12px}.view--salon-stylists .salon-stylist{float:left;padding-left:12px;padding-top:12px;width:50%}.view--salon-stylists .salon-stylist--avatar{height:180px}@media (min-width: 576px){.view--salon-stylists .salon-stylist{width:33.33%;max-width:240px}}@media (min-width: 768px){.view--salon-stylists{margin-left:-24px;margin-top:-24px}.view--salon-stylists .salon-stylist{padding-left:24px;padding-top:24px;width:264px;max-width:none}.view--salon-stylists .salon-stylist--avatar{height:240px}}";
|
|
@@ -23674,7 +23674,6 @@ class GiftCardSettings {
|
|
|
23674
23674
|
}
|
|
23675
23675
|
function createGiftCardSettings(blob) {
|
|
23676
23676
|
return {
|
|
23677
|
-
isMagensaPayment: false,
|
|
23678
23677
|
acceptCustomAmount: Boolean(blob.accept_custom_amount),
|
|
23679
23678
|
acceptPaymentOnline: Boolean(blob.accept_payment_online),
|
|
23680
23679
|
giftCardTerms: blob.gift_card_terms,
|
|
@@ -23687,6 +23686,9 @@ function createGiftCardSettings(blob) {
|
|
|
23687
23686
|
blob.recommend_amount3,
|
|
23688
23687
|
blob.recommend_amount4,
|
|
23689
23688
|
],
|
|
23689
|
+
// POS settings
|
|
23690
|
+
isDuoPricingEnabled: Boolean((blob.pos_setting || {}).enable_duo_pricing),
|
|
23691
|
+
paymentFeeRate: (blob.pos_setting || {}).interchange_rate || 0,
|
|
23690
23692
|
};
|
|
23691
23693
|
}
|
|
23692
23694
|
|
|
@@ -24080,10 +24082,7 @@ class HttpService {
|
|
|
24080
24082
|
return this.http.get(url)
|
|
24081
24083
|
.then(response => {
|
|
24082
24084
|
const blob = get_1(response, 'data.data', {});
|
|
24083
|
-
return
|
|
24084
|
-
...createGiftCardSettings(blob),
|
|
24085
|
-
isMagensaPayment: salonId === 49989,
|
|
24086
|
-
};
|
|
24085
|
+
return createGiftCardSettings(blob);
|
|
24087
24086
|
})
|
|
24088
24087
|
.catch(() => (null));
|
|
24089
24088
|
}
|
|
@@ -24110,6 +24109,22 @@ class HttpService {
|
|
|
24110
24109
|
}
|
|
24111
24110
|
return Promise.resolve({});
|
|
24112
24111
|
}
|
|
24112
|
+
magensaCreateQueue(salonId, options) {
|
|
24113
|
+
const message = 'Failed to process your payment. Please try again or contact us for assistance';
|
|
24114
|
+
const url = `${apiV2Prefix}/magensa/${salonId}/create-queue`;
|
|
24115
|
+
return this.http.post(url, options)
|
|
24116
|
+
.then(response => {
|
|
24117
|
+
const queueId = get_1(response, 'data.magensa_queue', null);
|
|
24118
|
+
const dataQueueId = get_1(response, 'data.data.magensa_queue', null);
|
|
24119
|
+
if (dataQueueId || queueId) {
|
|
24120
|
+
return Promise.resolve({ queueId: dataQueueId || queueId });
|
|
24121
|
+
}
|
|
24122
|
+
return Promise.reject({ message, response });
|
|
24123
|
+
})
|
|
24124
|
+
.catch(response => {
|
|
24125
|
+
return Promise.reject({ message, response });
|
|
24126
|
+
});
|
|
24127
|
+
}
|
|
24113
24128
|
magensaProcessToken(salonId, options) {
|
|
24114
24129
|
const url = `${apiV2Prefix}/magensa/${salonId}/process-token`;
|
|
24115
24130
|
return this.http.post(url, options)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { d as dayjs_min, H as HttpService, k as isVideoMedia, e as getSalonImage, h as shortDateYearFormat } from './services-
|
|
2
|
+
import { d as dayjs_min, H as HttpService, k as isVideoMedia, e as getSalonImage, h as shortDateYearFormat } from './services-48c99e41.js';
|
|
3
3
|
import { r as relativeTime } from './relativeTime-15477f02.js';
|
|
4
4
|
import { C as Colors } from './colors-ea36347a.js';
|
|
5
5
|
import './_commonjsHelpers-9bc404fc.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, g as get_1 } from './services-
|
|
2
|
+
import { H as HttpService, g as get_1 } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -102,6 +102,9 @@ const WizardExistingUser = class {
|
|
|
102
102
|
color: Colors.Black,
|
|
103
103
|
borderColor: Colors.Gray03,
|
|
104
104
|
backgroundColor: Colors.Gray03,
|
|
105
|
+
display: 'flex',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
justifyContent: 'center',
|
|
105
108
|
} : {},
|
|
106
109
|
}, onClick: () => this.activateAccount() }, "Submit ", this.isSubmitting && (h("span", { style: { marginLeft: '4px' } }, h("icon-loading", null))))), h("div", { style: { marginTop: '16px' } }, h("button", { type: "button", disabled: this.isSubmitting, style: {
|
|
107
110
|
border: `1px solid ${Colors.Gray03}`,
|
|
@@ -158,6 +161,9 @@ const WizardExistingUser = class {
|
|
|
158
161
|
color: Colors.Black,
|
|
159
162
|
borderColor: Colors.Gray03,
|
|
160
163
|
backgroundColor: Colors.Gray03,
|
|
164
|
+
display: 'flex',
|
|
165
|
+
alignItems: 'center',
|
|
166
|
+
justifyContent: 'center',
|
|
161
167
|
} : {},
|
|
162
168
|
}, onClick: () => this.sendLoginCode() }, "Verify now ", this.isSubmitting && (h("span", { style: { marginLeft: '4px' } }, h("icon-loading", null)))))));
|
|
163
169
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, g as get_1 } from './services-
|
|
2
|
+
import { H as HttpService, g as get_1 } from './services-48c99e41.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-9bc404fc.js';
|
|
5
5
|
|
|
@@ -134,6 +134,9 @@ const WizardNewUser = class {
|
|
|
134
134
|
color: Colors.Black,
|
|
135
135
|
borderColor: Colors.Gray03,
|
|
136
136
|
backgroundColor: Colors.Gray03,
|
|
137
|
+
display: 'flex',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
justifyContent: 'center',
|
|
137
140
|
} : {},
|
|
138
141
|
}, onClick: () => this.activateAccount() }, "Submit ", this.isSubmitting && (h("span", { style: { marginLeft: '4px' } }, h("icon-loading", null))))), h("div", { style: { marginTop: '16px' } }, h("button", { type: "button", disabled: this.isSubmitting, style: {
|
|
139
142
|
border: `1px solid ${Colors.Gray02}`,
|
|
@@ -190,6 +193,9 @@ const WizardNewUser = class {
|
|
|
190
193
|
color: Colors.Black,
|
|
191
194
|
borderColor: Colors.Gray03,
|
|
192
195
|
backgroundColor: Colors.Gray03,
|
|
196
|
+
display: 'flex',
|
|
197
|
+
alignItems: 'center',
|
|
198
|
+
justifyContent: 'center',
|
|
193
199
|
} : {},
|
|
194
200
|
}, onClick: () => this.verifyAccount() }, "Verify now ", this.isSubmitting && (h("span", { style: { marginLeft: '4px' } }, h("icon-loading", null)))))));
|
|
195
201
|
}
|
|
@@ -14,7 +14,6 @@ export declare class BuyGiftcardForm {
|
|
|
14
14
|
deliveryInput?: HTMLInputElement;
|
|
15
15
|
deliveryReenterInput?: HTMLInputElement;
|
|
16
16
|
salonId: string;
|
|
17
|
-
teConnect: any;
|
|
18
17
|
isLoading: boolean;
|
|
19
18
|
isSubmitting: boolean;
|
|
20
19
|
errorMessage: string;
|
|
@@ -39,10 +38,8 @@ export declare class BuyGiftcardForm {
|
|
|
39
38
|
isTermsAccepted: boolean;
|
|
40
39
|
componentDidLoad(): Promise<void>;
|
|
41
40
|
private saveTrackingData;
|
|
42
|
-
private fetchMagensaCredentials;
|
|
43
41
|
private fetchSalonInfo;
|
|
44
42
|
private fetchGiftCardSettings;
|
|
45
|
-
private initMagensaPayment;
|
|
46
43
|
private onClickDeliveryDone;
|
|
47
44
|
private renderPaymentOnlineDisabled;
|
|
48
45
|
private renderUserVerificationForm;
|
|
@@ -51,8 +48,8 @@ export declare class BuyGiftcardForm {
|
|
|
51
48
|
private onSubmitGiftCardForm;
|
|
52
49
|
private renderGiftCardForm;
|
|
53
50
|
private renderPaymentSucceed;
|
|
54
|
-
private
|
|
55
|
-
private
|
|
51
|
+
private onPaymentSuccess;
|
|
52
|
+
private onPaymentError;
|
|
56
53
|
private renderPaymentForm;
|
|
57
54
|
private renderSalonInfo;
|
|
58
55
|
private renderSkeletons;
|
|
@@ -6,7 +6,7 @@ declare enum FormStep {
|
|
|
6
6
|
UserRegister = "Booking Register"
|
|
7
7
|
}
|
|
8
8
|
export declare class BuyGiftcardVerification {
|
|
9
|
-
|
|
9
|
+
phoneInputRef?: HTMLInputElement;
|
|
10
10
|
salonId: string;
|
|
11
11
|
onSuccess: (user: User) => void;
|
|
12
12
|
step: FormStep;
|
|
@@ -14,7 +14,7 @@ export declare class BuyGiftcardVerification {
|
|
|
14
14
|
inputtedPhone: string;
|
|
15
15
|
isSearchingUser: boolean;
|
|
16
16
|
errorMessage: string;
|
|
17
|
-
|
|
17
|
+
componentDidRender(): void;
|
|
18
18
|
private onSubmitUserInfo;
|
|
19
19
|
private renderUserInfoForm;
|
|
20
20
|
private onSearchClient;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class MagensaPayment {
|
|
2
|
+
cardNumberInput?: HTMLInputElement;
|
|
3
|
+
cardExpiryInput?: HTMLInputElement;
|
|
4
|
+
isProcessing: boolean;
|
|
5
|
+
processingError: string;
|
|
6
|
+
salonId: string;
|
|
7
|
+
paymentAmount: string;
|
|
8
|
+
onPaymentSuccess: (queueId: any) => void;
|
|
9
|
+
onPaymentError: (message: any, response: any) => void;
|
|
10
|
+
isSubmitting: boolean;
|
|
11
|
+
errorMessage: string;
|
|
12
|
+
cardNumber: string;
|
|
13
|
+
cardExpiry: string;
|
|
14
|
+
cardCCV: string;
|
|
15
|
+
cardName: string;
|
|
16
|
+
componentDidRender(): void;
|
|
17
|
+
private onSubmit;
|
|
18
|
+
render(): any;
|
|
19
|
+
}
|
|
@@ -94,6 +94,14 @@ export namespace Components {
|
|
|
94
94
|
"onSubmit": (evt: any) => Promise<void>;
|
|
95
95
|
"onSuccess": (user: User) => void;
|
|
96
96
|
}
|
|
97
|
+
interface MagensaPayment {
|
|
98
|
+
"isProcessing": boolean;
|
|
99
|
+
"onPaymentError": (message, response) => void;
|
|
100
|
+
"onPaymentSuccess": (queueId) => void;
|
|
101
|
+
"paymentAmount": string;
|
|
102
|
+
"processingError": string;
|
|
103
|
+
"salonId": string;
|
|
104
|
+
}
|
|
97
105
|
interface NotifySounds {
|
|
98
106
|
}
|
|
99
107
|
interface PoweredByFavesalon {
|
|
@@ -323,6 +331,12 @@ declare global {
|
|
|
323
331
|
prototype: HTMLLoginFormElement;
|
|
324
332
|
new (): HTMLLoginFormElement;
|
|
325
333
|
};
|
|
334
|
+
interface HTMLMagensaPaymentElement extends Components.MagensaPayment, HTMLStencilElement {
|
|
335
|
+
}
|
|
336
|
+
var HTMLMagensaPaymentElement: {
|
|
337
|
+
prototype: HTMLMagensaPaymentElement;
|
|
338
|
+
new (): HTMLMagensaPaymentElement;
|
|
339
|
+
};
|
|
326
340
|
interface HTMLNotifySoundsElement extends Components.NotifySounds, HTMLStencilElement {
|
|
327
341
|
}
|
|
328
342
|
var HTMLNotifySoundsElement: {
|
|
@@ -480,6 +494,7 @@ declare global {
|
|
|
480
494
|
"icon-location-marker": HTMLIconLocationMarkerElement;
|
|
481
495
|
"icon-phone": HTMLIconPhoneElement;
|
|
482
496
|
"login-form": HTMLLoginFormElement;
|
|
497
|
+
"magensa-payment": HTMLMagensaPaymentElement;
|
|
483
498
|
"notify-sounds": HTMLNotifySoundsElement;
|
|
484
499
|
"powered-by-favesalon": HTMLPoweredByFavesalonElement;
|
|
485
500
|
"register-form": HTMLRegisterFormElement;
|
|
@@ -582,6 +597,14 @@ declare namespace LocalJSX {
|
|
|
582
597
|
interface LoginForm {
|
|
583
598
|
"onSuccess"?: (user: User) => void;
|
|
584
599
|
}
|
|
600
|
+
interface MagensaPayment {
|
|
601
|
+
"isProcessing"?: boolean;
|
|
602
|
+
"onPaymentError"?: (message, response) => void;
|
|
603
|
+
"onPaymentSuccess"?: (queueId) => void;
|
|
604
|
+
"paymentAmount"?: string;
|
|
605
|
+
"processingError"?: string;
|
|
606
|
+
"salonId"?: string;
|
|
607
|
+
}
|
|
585
608
|
interface NotifySounds {
|
|
586
609
|
}
|
|
587
610
|
interface PoweredByFavesalon {
|
|
@@ -705,6 +728,7 @@ declare namespace LocalJSX {
|
|
|
705
728
|
"icon-location-marker": IconLocationMarker;
|
|
706
729
|
"icon-phone": IconPhone;
|
|
707
730
|
"login-form": LoginForm;
|
|
731
|
+
"magensa-payment": MagensaPayment;
|
|
708
732
|
"notify-sounds": NotifySounds;
|
|
709
733
|
"powered-by-favesalon": PoweredByFavesalon;
|
|
710
734
|
"register-form": RegisterForm;
|
|
@@ -752,6 +776,7 @@ declare module "@stencil/core" {
|
|
|
752
776
|
"icon-location-marker": LocalJSX.IconLocationMarker & JSXBase.HTMLAttributes<HTMLIconLocationMarkerElement>;
|
|
753
777
|
"icon-phone": LocalJSX.IconPhone & JSXBase.HTMLAttributes<HTMLIconPhoneElement>;
|
|
754
778
|
"login-form": LocalJSX.LoginForm & JSXBase.HTMLAttributes<HTMLLoginFormElement>;
|
|
779
|
+
"magensa-payment": LocalJSX.MagensaPayment & JSXBase.HTMLAttributes<HTMLMagensaPaymentElement>;
|
|
755
780
|
"notify-sounds": LocalJSX.NotifySounds & JSXBase.HTMLAttributes<HTMLNotifySoundsElement>;
|
|
756
781
|
"powered-by-favesalon": LocalJSX.PoweredByFavesalon & JSXBase.HTMLAttributes<HTMLPoweredByFavesalonElement>;
|
|
757
782
|
"register-form": LocalJSX.RegisterForm & JSXBase.HTMLAttributes<HTMLRegisterFormElement>;
|
|
@@ -130,6 +130,9 @@ declare class HttpService {
|
|
|
130
130
|
fetchGiftCardSettings(salonId: any): Promise<any>;
|
|
131
131
|
fetchSalonClientInfo(salonId: any, mobilePhone: any): Promise<{} | {}>;
|
|
132
132
|
fetchMagensaCredentials(salonId: any): Promise<{}>;
|
|
133
|
+
magensaCreateQueue(salonId: any, options: any): Promise<{
|
|
134
|
+
queueId: any;
|
|
135
|
+
}>;
|
|
133
136
|
magensaProcessToken(salonId: any, options: any): Promise<any>;
|
|
134
137
|
magensaConfirmTransaction(options: any): Promise<any>;
|
|
135
138
|
private fetchAWSPresigned;
|
|
@@ -3,11 +3,12 @@ export declare class GiftCardStyle {
|
|
|
3
3
|
imageUrl: string;
|
|
4
4
|
}
|
|
5
5
|
export declare class GiftCardSettings {
|
|
6
|
-
isMagensaPayment: boolean;
|
|
7
6
|
acceptCustomAmount: boolean;
|
|
8
7
|
acceptPaymentOnline: boolean;
|
|
9
8
|
giftCardTerms: string;
|
|
10
9
|
recommendAmounts: number[];
|
|
11
10
|
giftCardStyles: GiftCardStyle[];
|
|
11
|
+
isDuoPricingEnabled: boolean;
|
|
12
|
+
paymentFeeRate: number;
|
|
12
13
|
}
|
|
13
14
|
export declare function createGiftCardSettings(blob: any): GiftCardSettings;
|