@licklist/design 0.69.3-dev.2 → 0.69.3-dev.4
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/iframe/activity-card/ActivityCard.d.ts +3 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +8 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +3 -3
- package/dist/product-set/control/ProductSetControl.js +2 -2
- package/dist/product-set/form/MobileFooter.d.ts.map +1 -1
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/package.json +1 -1
- package/src/iframe/activity-card/ActivityCard.tsx +6 -0
- package/src/iframe/ryft/RyftPaymentForm.tsx +2 -5
- package/src/iframe/ryft/utils/ryft-form.ts +5 -3
- package/src/product-set/control/ProductSetControl.tsx +2 -2
- package/src/product-set/form/MobileFooter.tsx +1 -3
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
3
|
+
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
3
4
|
export declare const LAYOUT_GRID = "grid";
|
|
4
5
|
export declare const LAYOUT_LIST = "list";
|
|
5
6
|
export type ActivityCardProps = {
|
|
@@ -12,6 +13,7 @@ export type ActivityCardProps = {
|
|
|
12
13
|
layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST;
|
|
13
14
|
availableTimes?: string | null;
|
|
14
15
|
image?: Image | null;
|
|
16
|
+
resources?: ZoneResourcesAvailability;
|
|
15
17
|
};
|
|
16
|
-
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
//# sourceMappingURL=ActivityCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;
|
|
1
|
+
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AAGpH,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,6GAWtB,iBAAiB,4CAmDnB,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { AvailabilityIndicator } from '../../availability-indicator/AvailabilityIndicator.js';
|
|
3
4
|
|
|
4
5
|
var LAYOUT_GRID = 'grid';
|
|
5
6
|
var LAYOUT_LIST = 'list';
|
|
6
7
|
var ActivityCard = function(param) {
|
|
7
|
-
var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout;
|
|
8
|
+
var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, resources = param.resources;
|
|
8
9
|
if (layout === LAYOUT_GRID) {
|
|
9
10
|
return /*#__PURE__*/ jsxs("button", {
|
|
10
11
|
type: "button",
|
|
@@ -32,6 +33,9 @@ var ActivityCard = function(param) {
|
|
|
32
33
|
description && /*#__PURE__*/ jsx("div", {
|
|
33
34
|
className: "mt-2 activity-card-description",
|
|
34
35
|
children: description
|
|
36
|
+
}),
|
|
37
|
+
resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
38
|
+
resources: resources
|
|
35
39
|
})
|
|
36
40
|
]
|
|
37
41
|
})
|
|
@@ -68,6 +72,9 @@ var ActivityCard = function(param) {
|
|
|
68
72
|
description && /*#__PURE__*/ jsx("div", {
|
|
69
73
|
className: "mt-2 activity-card-description",
|
|
70
74
|
children: description
|
|
75
|
+
}),
|
|
76
|
+
resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
77
|
+
resources: resources
|
|
71
78
|
})
|
|
72
79
|
]
|
|
73
80
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CA8KtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU,0BACR,SAAQ,IAAI,CACV,oBAAoB,EACpB,uBAAuB,GAAG,oBAAoB,CAC/C;IACD,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,eAAO,MAAM,0BAA0B,wGAMpC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU,0BACR,SAAQ,IAAI,CACV,oBAAoB,EACpB,uBAAuB,GAAG,oBAAoB,CAC/C;IACD,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,eAAO,MAAM,0BAA0B,wGAMpC,0BAA0B,SA8E5B,CAAA"}
|
|
@@ -39,14 +39,14 @@ var injectComponentsInRyftForm = function(param) {
|
|
|
39
39
|
divider.id = 'mobile-pay-divider';
|
|
40
40
|
container.id = 'mobile-pay-divider-container';
|
|
41
41
|
container.append(dividerText, divider);
|
|
42
|
-
var payIframe = document.getElementById(
|
|
42
|
+
var payIframe = document.getElementById('ryft-pay-iframe');
|
|
43
43
|
if (payIframe) {
|
|
44
44
|
var formBox = document.getElementById('form-disable-box');
|
|
45
45
|
if (formBox) {
|
|
46
|
-
formBox.style.display = isDisableButton ?
|
|
46
|
+
formBox.style.display = isDisableButton ? 'block' : 'none';
|
|
47
47
|
}
|
|
48
48
|
var googleButton = document.getElementById('gpay-button-online-api-id');
|
|
49
|
-
var appleButton = document.getElementById(
|
|
49
|
+
var appleButton = document.getElementById('ryft-pay-apple-pay-button');
|
|
50
50
|
if (googleButton) {
|
|
51
51
|
googleButton.disabled = isDisableButton;
|
|
52
52
|
googleButton.style.opacity = isDisableButton ? '1' : '0.6';
|
|
@@ -153,9 +153,9 @@ function ProductSetControl(param) {
|
|
|
153
153
|
/*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({}, register('description', {
|
|
154
154
|
maxLength: {
|
|
155
155
|
value: MAX_DESCRIPTION_LENGTH,
|
|
156
|
-
message: t('Validation:
|
|
156
|
+
message: t('Validation:fieldMaxLength', {
|
|
157
157
|
attribute: t('description'),
|
|
158
|
-
|
|
158
|
+
max: MAX_DESCRIPTION_LENGTH
|
|
159
159
|
})
|
|
160
160
|
}
|
|
161
161
|
})), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileFooter.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/MobileFooter.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"MobileFooter.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/MobileFooter.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,4CAU3B"}
|
|
@@ -102,7 +102,6 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.ryft-payment-form {
|
|
105
|
-
|
|
106
105
|
.form-disable-box {
|
|
107
106
|
display: none;
|
|
108
107
|
position: absolute;
|
|
@@ -176,7 +175,6 @@
|
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
@include media-breakpoint-up(md) {
|
|
179
|
-
|
|
180
178
|
.ryft-payment-form,
|
|
181
179
|
.form-disable-box {
|
|
182
180
|
height: 50%;
|
|
@@ -205,4 +203,4 @@
|
|
|
205
203
|
.divider {
|
|
206
204
|
display: none !important;
|
|
207
205
|
}
|
|
208
|
-
}
|
|
206
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react'
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
4
|
+
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
5
|
+
import { AvailabilityIndicator } from '../../availability-indicator'
|
|
4
6
|
|
|
5
7
|
export const LAYOUT_GRID = 'grid'
|
|
6
8
|
export const LAYOUT_LIST = 'list'
|
|
@@ -15,6 +17,7 @@ export type ActivityCardProps = {
|
|
|
15
17
|
layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST
|
|
16
18
|
availableTimes?: string | null
|
|
17
19
|
image?: Image | null
|
|
20
|
+
resources?: ZoneResourcesAvailability
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
export const ActivityCard = ({
|
|
@@ -27,6 +30,7 @@ export const ActivityCard = ({
|
|
|
27
30
|
onSelect,
|
|
28
31
|
isSelected,
|
|
29
32
|
layout = LAYOUT_GRID,
|
|
33
|
+
resources,
|
|
30
34
|
}: ActivityCardProps) => {
|
|
31
35
|
if (layout === LAYOUT_GRID) {
|
|
32
36
|
return (
|
|
@@ -46,6 +50,7 @@ export const ActivityCard = ({
|
|
|
46
50
|
{description && (
|
|
47
51
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
48
52
|
)}
|
|
53
|
+
{resources && <AvailabilityIndicator resources={resources} />}
|
|
49
54
|
</div>
|
|
50
55
|
</button>
|
|
51
56
|
)
|
|
@@ -71,6 +76,7 @@ export const ActivityCard = ({
|
|
|
71
76
|
{description && (
|
|
72
77
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
73
78
|
)}
|
|
79
|
+
{resources && <AvailabilityIndicator resources={resources} />}
|
|
74
80
|
</div>
|
|
75
81
|
|
|
76
82
|
<hr className='list-activity-card-hr' />
|
|
@@ -219,12 +219,9 @@ export const RyftPaymentForm = ({
|
|
|
219
219
|
onSubmit={methods.handleSubmit(handleSubmit)}
|
|
220
220
|
className='ryft-payment-form'
|
|
221
221
|
>
|
|
222
|
-
<div className='form-disable-box' id=
|
|
222
|
+
<div className='form-disable-box' id='form-disable-box' />
|
|
223
223
|
<div className='submit-button-wrapper mt-4 p-1'>
|
|
224
|
-
<Button
|
|
225
|
-
type='submit'
|
|
226
|
-
disabled={isBtnDisabled || !isValid}
|
|
227
|
-
>
|
|
224
|
+
<Button type='submit' disabled={isBtnDisabled || !isValid}>
|
|
228
225
|
{isBtnDisabled && <ButtonLoader />}
|
|
229
226
|
{t('Design:buyNow')}
|
|
230
227
|
</Button>
|
|
@@ -61,17 +61,19 @@ export const injectComponentsInRyftForm = ({
|
|
|
61
61
|
divider.id = 'mobile-pay-divider'
|
|
62
62
|
container.id = 'mobile-pay-divider-container'
|
|
63
63
|
container.append(dividerText, divider)
|
|
64
|
-
const payIframe = document.getElementById(
|
|
64
|
+
const payIframe = document.getElementById('ryft-pay-iframe')
|
|
65
65
|
if (payIframe) {
|
|
66
66
|
const formBox = document.getElementById('form-disable-box')
|
|
67
67
|
if (formBox) {
|
|
68
|
-
formBox.style.display = isDisableButton ?
|
|
68
|
+
formBox.style.display = isDisableButton ? 'block' : 'none'
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const googleButton = document.getElementById(
|
|
72
72
|
'gpay-button-online-api-id',
|
|
73
73
|
) as HTMLButtonElement
|
|
74
|
-
const appleButton =document.getElementById(
|
|
74
|
+
const appleButton = document.getElementById(
|
|
75
|
+
'ryft-pay-apple-pay-button',
|
|
76
|
+
) as HTMLButtonElement
|
|
75
77
|
if (googleButton) {
|
|
76
78
|
googleButton.disabled = isDisableButton
|
|
77
79
|
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
@@ -186,9 +186,9 @@ export function ProductSetControl({
|
|
|
186
186
|
{...register('description', {
|
|
187
187
|
maxLength: {
|
|
188
188
|
value: MAX_DESCRIPTION_LENGTH,
|
|
189
|
-
message: t('Validation:
|
|
189
|
+
message: t('Validation:fieldMaxLength', {
|
|
190
190
|
attribute: t('description'),
|
|
191
|
-
|
|
191
|
+
max: MAX_DESCRIPTION_LENGTH,
|
|
192
192
|
}),
|
|
193
193
|
},
|
|
194
194
|
})}
|
|
@@ -6,9 +6,7 @@ export function MobileFooter() {
|
|
|
6
6
|
|
|
7
7
|
return (
|
|
8
8
|
<div className='container product-set-mobile-footer'>
|
|
9
|
-
<div
|
|
10
|
-
className={`d-block d-sm-none bg-white border-top fixed-bottom py-4 px-5 d-flex justify-content-between flex-row-reverse`}
|
|
11
|
-
>
|
|
9
|
+
<div className='d-block d-sm-none bg-white border-top fixed-bottom py-4 px-5 d-flex justify-content-between flex-row-reverse'>
|
|
12
10
|
<Button type='submit'>{t('save')}</Button>
|
|
13
11
|
</div>
|
|
14
12
|
</div>
|
|
@@ -102,7 +102,6 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.ryft-payment-form {
|
|
105
|
-
|
|
106
105
|
.form-disable-box {
|
|
107
106
|
display: none;
|
|
108
107
|
position: absolute;
|
|
@@ -176,7 +175,6 @@
|
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
@include media-breakpoint-up(md) {
|
|
179
|
-
|
|
180
178
|
.ryft-payment-form,
|
|
181
179
|
.form-disable-box {
|
|
182
180
|
height: 50%;
|
|
@@ -205,4 +203,4 @@
|
|
|
205
203
|
.divider {
|
|
206
204
|
display: none !important;
|
|
207
205
|
}
|
|
208
|
-
}
|
|
206
|
+
}
|