@licklist/design 0.44.485-dev.86 → 0.44.485-dev.88
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/date-time-button/DateTimeButton.d.ts +12 -0
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -0
- package/dist/date-time-button/DateTimeButton.js +1 -0
- package/dist/date-time-button/index.d.ts +2 -0
- package/dist/date-time-button/index.d.ts.map +1 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +12 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-cards/activity-card/ActivityCard.js +1 -0
- package/dist/iframe/activity-cards/index.d.ts +3 -0
- package/dist/iframe/activity-cards/index.d.ts.map +1 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +12 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +1 -0
- package/dist/iframe/index.d.ts +2 -3
- package/dist/iframe/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.d.ts +7 -6
- package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.d.ts.map +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/index.d.ts +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/index.d.ts.map +1 -1
- package/dist/iframe/order-process/index.d.ts +1 -2
- package/dist/iframe/order-process/index.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/PageBody.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts +2 -2
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentTimer.js +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/styles/iframe-customers-journey/ActivitiesCard.scss +17 -35
- package/dist/styles/iframe-customers-journey/ActivitiesSelectedCard.scss +48 -43
- package/dist/styles/iframe-customers-journey/DateTimeButton.scss +84 -0
- package/dist/styles/iframe-customers-journey/_index.scss +1 -1
- package/dist/types/iframe.d.ts +1 -1
- package/dist/types/iframe.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/package.json +1 -1
- package/src/date-time-button/DateTimeButton.stories.tsx +68 -0
- package/src/date-time-button/DateTimeButton.tsx +106 -0
- package/src/date-time-button/index.ts +1 -0
- package/src/iframe/activity-cards/activity-card/ActivityCard.stories.tsx +52 -0
- package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +38 -0
- package/src/iframe/activity-cards/index.ts +2 -0
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +52 -0
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +49 -0
- package/src/iframe/index.ts +2 -7
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +8 -6
- package/src/iframe/order-process/components/NavigationSteps/index.ts +1 -1
- package/src/iframe/order-process/index.ts +1 -2
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +4 -4
- package/src/index.ts +1 -0
- package/src/styles/iframe-customers-journey/ActivitiesCard.scss +17 -35
- package/src/styles/iframe-customers-journey/ActivitiesSelectedCard.scss +48 -43
- package/src/styles/iframe-customers-journey/DateTimeButton.scss +84 -0
- package/src/styles/iframe-customers-journey/_index.scss +1 -1
- package/src/types/iframe.ts +1 -1
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +1 -1
- package/dist/assets/iframe/dateInfo/available.svg.js +0 -1
- package/dist/assets/iframe/dateInfo/limited.svg.js +0 -1
- package/dist/assets/iframe/dateInfo/soldOut.svg.js +0 -1
- package/dist/iframe/activities-card-page/components/activities-card/ActivitiesCard.d.ts +0 -8
- package/dist/iframe/activities-card-page/components/activities-card/ActivitiesCard.d.ts.map +0 -1
- package/dist/iframe/activities-card-page/components/activities-card/ActivitiesCard.js +0 -1
- package/dist/iframe/activities-card-page/components/activities-selected-card/ActivitiesSelectedCard.d.ts +0 -9
- package/dist/iframe/activities-card-page/components/activities-selected-card/ActivitiesSelectedCard.d.ts.map +0 -1
- package/dist/iframe/activities-card-page/components/activities-selected-card/ActivitiesSelectedCard.js +0 -1
- package/dist/iframe/activities-card-page/index.d.ts +0 -3
- package/dist/iframe/activities-card-page/index.d.ts.map +0 -1
- package/dist/iframe/data-time-view-selector/DateAndTimeAndCalendar.d.ts +0 -8
- package/dist/iframe/data-time-view-selector/DateAndTimeAndCalendar.d.ts.map +0 -1
- package/dist/iframe/data-time-view-selector/constants.d.ts +0 -7
- package/dist/iframe/data-time-view-selector/constants.d.ts.map +0 -1
- package/dist/iframe/data-time-view-selector/constants.js +0 -1
- package/dist/iframe/data-time-view-selector/index.d.ts +0 -2
- package/dist/iframe/data-time-view-selector/index.d.ts.map +0 -1
- package/dist/iframe/order-process/components/Category/Category.d.ts +0 -13
- package/dist/iframe/order-process/components/Category/Category.d.ts.map +0 -1
- package/dist/iframe/order-process/components/Category/Category.js +0 -1
- package/dist/iframe/order-process/components/Category/index.d.ts +0 -2
- package/dist/iframe/order-process/components/Category/index.d.ts.map +0 -1
- package/dist/iframe/select-date-time/SelectDateAndTimeList.d.ts +0 -3
- package/dist/iframe/select-date-time/SelectDateAndTimeList.d.ts.map +0 -1
- package/dist/iframe/select-date-time/SelectDateAndTimeList.js +0 -1
- package/dist/iframe/select-date-time/SelectDateOrTimeList.d.ts +0 -8
- package/dist/iframe/select-date-time/SelectDateOrTimeList.d.ts.map +0 -1
- package/dist/iframe/select-date-time/SelectDateOrTimeList.js +0 -1
- package/dist/iframe/select-date-time/component/date-container/DateTimeSelector.d.ts +0 -10
- package/dist/iframe/select-date-time/component/date-container/DateTimeSelector.d.ts.map +0 -1
- package/dist/iframe/select-date-time/component/date-container/DateTimeSelector.js +0 -1
- package/dist/iframe/select-date-time/component/date-container/SelectorDateAndTimeList.d.ts +0 -11
- package/dist/iframe/select-date-time/component/date-container/SelectorDateAndTimeList.d.ts.map +0 -1
- package/dist/iframe/select-date-time/component/date-container/SelectorDateAndTimeList.js +0 -1
- package/dist/iframe/select-date-time/constants.d.ts +0 -6
- package/dist/iframe/select-date-time/constants.d.ts.map +0 -1
- package/dist/iframe/select-date-time/constants.js +0 -1
- package/dist/iframe/select-date-time/index.d.ts +0 -4
- package/dist/iframe/select-date-time/index.d.ts.map +0 -1
- package/dist/styles/iframe-customers-journey/SelectDateAndTime.scss +0 -126
- package/src/iframe/activities-card-page/components/activities-card/ActivitiesCard.tsx +0 -68
- package/src/iframe/activities-card-page/components/activities-card/ActivitiesCardList.stories.tsx +0 -120
- package/src/iframe/activities-card-page/components/activities-selected-card/ActivitiesSelectedCard.stories.tsx +0 -67
- package/src/iframe/activities-card-page/components/activities-selected-card/ActivitiesSelectedCard.tsx +0 -57
- package/src/iframe/activities-card-page/index.ts +0 -2
- package/src/iframe/data-time-view-selector/DateAndTimeAndCalendar.tsx +0 -37
- package/src/iframe/data-time-view-selector/constants.ts +0 -6
- package/src/iframe/data-time-view-selector/index.ts +0 -1
- package/src/iframe/order-process/components/Category/Category.stories.tsx +0 -118
- package/src/iframe/order-process/components/Category/Category.tsx +0 -51
- package/src/iframe/order-process/components/Category/index.ts +0 -1
- package/src/iframe/select-date-time/SelectDateAndTimeList.tsx +0 -39
- package/src/iframe/select-date-time/SelectDateOrTimeList.tsx +0 -42
- package/src/iframe/select-date-time/component/date-container/DateTimeSelector.tsx +0 -79
- package/src/iframe/select-date-time/component/date-container/SelectorDateAndTimeList.stories.tsx +0 -164
- package/src/iframe/select-date-time/component/date-container/SelectorDateAndTimeList.tsx +0 -41
- package/src/iframe/select-date-time/constants.ts +0 -5
- package/src/iframe/select-date-time/index.ts +0 -4
- package/src/styles/iframe-customers-journey/SelectDateAndTime.scss +0 -126
|
@@ -1,52 +1,57 @@
|
|
|
1
1
|
@import "../snippet-templates/snippetVariables";
|
|
2
2
|
|
|
3
|
-
.
|
|
3
|
+
.list-activity-card {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
height: 5rem;
|
|
9
|
+
border: 2px solid transparent;
|
|
10
|
+
border: 2px solid transparent;
|
|
11
|
+
background-color: $snippet-product-set-background-color;
|
|
12
|
+
color: $snippet-product-set-font-color;
|
|
13
|
+
transition: $color-transition;
|
|
14
|
+
|
|
15
|
+
&.active {
|
|
16
|
+
border: 2px solid #0e8be1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
p {
|
|
20
|
+
margin-bottom: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.description {
|
|
24
|
+
width: 70%;
|
|
25
|
+
font-size: 0.81rem;
|
|
4
26
|
display: flex;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
height: 5rem;
|
|
9
|
-
border: 1px solid $snippet-product-set-border-color;
|
|
10
|
-
background-color: $snippet-product-set-background-color;
|
|
11
|
-
color: $snippet-product-set-font-color;
|
|
12
|
-
transition: $color-transition;
|
|
13
|
-
|
|
14
|
-
p {
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
}
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
}
|
|
17
29
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
30
|
+
.title {
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
font-size: 0.875rem;
|
|
33
|
+
line-height: 1.5rem;
|
|
34
|
+
}
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
36
|
+
.image-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: start;
|
|
39
|
+
height: 100%;
|
|
30
40
|
|
|
31
|
-
.image
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
margin-left: 3rem;
|
|
42
|
-
background-repeat: no-repeat;
|
|
43
|
-
background-size: cover;
|
|
44
|
-
background-position: center;
|
|
45
|
-
border-radius: 0.5rem;
|
|
46
|
-
}
|
|
41
|
+
.image {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: start;
|
|
44
|
+
width: 7rem;
|
|
45
|
+
height: 4rem;
|
|
46
|
+
margin-left: 3rem;
|
|
47
|
+
background-repeat: no-repeat;
|
|
48
|
+
background-size: cover;
|
|
49
|
+
background-position: center;
|
|
50
|
+
border-radius: 0.5rem;
|
|
47
51
|
}
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
.
|
|
51
|
-
|
|
52
|
-
}
|
|
55
|
+
.list-activity-card-hr {
|
|
56
|
+
margin-top: 0;
|
|
57
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.date-time-button {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
font-size: 0.82rem;
|
|
7
|
+
line-height: 1.3rem;
|
|
8
|
+
font-weight: 600;
|
|
9
|
+
background-color: $snippet-calendar-button-background-color;
|
|
10
|
+
border-radius: 0.4rem;
|
|
11
|
+
text-align: center;
|
|
12
|
+
border: 2px solid $snippet-calendar-button-border-color;
|
|
13
|
+
color: $snippet-calendar-button-font-color;
|
|
14
|
+
flex-grow: 1;
|
|
15
|
+
transition: $color-transition;
|
|
16
|
+
min-width: 6rem;
|
|
17
|
+
max-width: 7.25rem;
|
|
18
|
+
min-height: 3.3rem;
|
|
19
|
+
max-height: 8.375rem;
|
|
20
|
+
|
|
21
|
+
&.disabled {
|
|
22
|
+
border: 2px solid $snippet-calendar-disabled-button-border-color;
|
|
23
|
+
background-color: $snippet-calendar-disabled-button-background-color;
|
|
24
|
+
color: $snippet-calendar-disabled-button-font-color;
|
|
25
|
+
|
|
26
|
+
.descriptions {
|
|
27
|
+
color: $snippet-calendar-disabled-button-font-color;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.selected {
|
|
32
|
+
border: 2px solid $snippet-calendar-active-button-border-color;
|
|
33
|
+
background-color: $snippet-calendar-active-button-background-color;
|
|
34
|
+
color: $snippet-calendar-active-button-font-color;
|
|
35
|
+
transition: $color-transition;
|
|
36
|
+
|
|
37
|
+
.descriptions {
|
|
38
|
+
color: $snippet-calendar-active-button-font-color;
|
|
39
|
+
background-color: $snippet-calendar-active-button-background-color;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
transition: $color-transition;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.time {
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.time-button {
|
|
50
|
+
min-width: 4.75rem;
|
|
51
|
+
max-width: 4.75rem;
|
|
52
|
+
min-height: 2.75rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.only-time-container {
|
|
56
|
+
min-width: 5.3rem;
|
|
57
|
+
max-width: 5.3rem;
|
|
58
|
+
min-height: 2.75rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.time {
|
|
63
|
+
font-size: 0.875rem;
|
|
64
|
+
font-weight: 300;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.descriptions {
|
|
68
|
+
font-size: 0.7rem;
|
|
69
|
+
line-height: 1.03rem;
|
|
70
|
+
font-weight: 300;
|
|
71
|
+
color: $snippet-calendar-button-font-color;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.info {
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
font-weight: 300;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
|
|
80
|
+
.logo {
|
|
81
|
+
width: 0.5rem;
|
|
82
|
+
margin-right: 0.5rem;
|
|
83
|
+
}
|
|
84
|
+
}
|
package/dist/types/iframe.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/types/iframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAElG,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,eAAe,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/types/iframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAElG,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,eAAe,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAID,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EACC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACrB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAC5D,IAAI,CAAC;AAEV,MAAM,MAAM,gBAAgB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("tslib"),t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-i18next"),a=require("react-bootstrap"),o=require("../../../static/Icon.js"),u=require("react-hook-form"),l=require("@react-aria/utils"),c=require("react-use");require("../../../static/index.js");var s=require("@dnd-kit/core"),d=require("@dnd-kit/sortable"),m=require("../../../modals/confirmation/ConfirmModal.js"),v=require("../../../recurring-date-picker-input/RecurringDatePickerInput.js"),f=require("../../../product-set/control/DateAndRecurrenceInput.js"),g=require("./ZoneRecurrenceControl.js"),p=require("./AvailableTimesControl.js");exports.ZoneRecurrencesControl=function(e){var _,E,b=e.workHours,q=e.isLoading,C=void 0!==q&&q,x=u.useFormContext(),R=x.control,D=x.register,k=x.formState.errors,y=x.getValues,S=x.setValue,I=x.clearErrors,T=u.useFieldArray({name:"zoneRecurrences",control:R,keyName:"_id"}),h=T.fields,z=T.append,N=T.update,j=T.move,w=r.__read(t.useState(!1),2),A=w[0],F=w[1],M=r.__read(t.useState({index:null,values:null}),2),P=M[0],V=M[1],L=function(){return V({index:null,values:null})},O=r.__read(t.useState([]),2),Z=O[0],H=O[1],G=t.useRef(),K=t.useRef();c.useClickAway(G,(function(e){var r,t,n;m.CONFIRM_MODAL_ACTIONS.includes(null===(n=null===(t=null===(r=e.target)||void 0===r?void 0:r.attributes)||void 0===t?void 0:t.getNamedItem("data-id"))||void 0===n?void 0:n.value)||(F(!1),L())}));var W=l.useId(),B=i.useTranslation("Design").t,J=function(){L(),F((function(e){return!e}))};return t.useEffect((function(){h.length&&I("zoneRecurrences")}),[h,I]),n.createElement(a.Form.Group,null,n.createElement(a.Form.Label,null,B("zoneAvailable")),n.createElement(a.OverlayTrigger,{show:A,overlay:n.createElement(a.Popover,{id:W,className:"rounded"},n.createElement(a.Popover.Content,{className:"shadow-lg rounded",ref:G},n.createElement(v.RecurringDatePickerInput,{defaultValues:P.values,onChange:function(e){return r.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a;return r.__generator(this,(function(o){switch(o.label){case 0:return[4,null===(n=K.current)||void 0===n?void 0:n.trigger()];case 1:return o.sent()?(t=r.__assign({rrule:e.rrule,startDate:e.startDate,endDate:e.endDate,startTime:e.startTime,endTime:e.endTime},K.current.getValues()),(null===(i=P.values)||void 0===i?void 0:i.id)&&(t.id=null===(a=P.values)||void 0===a?void 0:a.id),null!==P.index?N(P.index,t):z(t),F((function(){return!1})),L(),[2]):[2]}}))}))},onDelete:function(){var e=P.index;F(!1),L(),setTimeout((function(){var r=y().zoneRecurrences;S("zoneRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)},setInitialStartDateAfterSelect:!0},n.createElement(p.AvailableTimesControl,{workHours:b,isLoading:C,defaultValues:Z,ref:K})))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[f.sameWidthPopperModifier]}},n.createElement("div",{className:"zone-recurrences"},n.createElement(s.DndContext,{onDragEnd:function(e){var r=e.over,t=e.active;if(r.id!==t.id){var n=h.findIndex((function(e){return String(e._id)===t.id})),i=h.findIndex((function(e){return String(e._id)===r.id}));j(n,i)}}},n.createElement(d.SortableContext,{items:null!==(_=null==h?void 0:h.map((function(e){return String(e._id)})))&&void 0!==_?_:[],strategy:d.verticalListSortingStrategy},h.map((function(e,r){return n.createElement(g.ZoneRecurrenceControl,{key:e._id,zoneRecurrence:e,onEdit:function(){return function(e,r){L(),setTimeout((function(){V({index:r,values:e}),H(e.availableTimes||[]),F((function(){return!0}))}),100)}(e,r)}})})))),n.createElement("div",{className:"zone-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:J,onKeyDown:J},n.createElement(o.default,{type:"plus-circle",height:"1rem",className:"zone-recurrence-icon-add mr-2"}),B("addDates")),n.createElement(a.Form.Control,r.__assign({type:"hidden"},D("zoneRecurrences",{required:{value:!0,message:B("Validation:fieldMinNumber",{attribute:B("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(E=k.zoneRecurrences)||void 0===E?void 0:E.message))))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("tslib"),t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-i18next"),a=require("react-bootstrap"),o=require("../../../static/Icon.js"),u=require("react-hook-form"),l=require("@react-aria/utils"),c=require("react-use");require("../../../static/index.js");var s=require("@dnd-kit/core"),d=require("@dnd-kit/sortable"),m=require("../../../modals/confirmation/ConfirmModal.js"),v=require("../../../recurring-date-picker-input/RecurringDatePickerInput.js"),f=require("../../../product-set/control/DateAndRecurrenceInput.js"),g=require("./ZoneRecurrenceControl.js"),p=require("./AvailableTimesControl.js");exports.ZoneRecurrencesControl=function(e){var _,E,b=e.workHours,q=e.isLoading,C=void 0!==q&&q,x=u.useFormContext(),R=x.control,D=x.register,k=x.formState.errors,y=x.getValues,S=x.setValue,I=x.clearErrors,T=u.useFieldArray({name:"zoneRecurrences",control:R,keyName:"_id"}),h=T.fields,z=T.append,N=T.update,j=T.move,w=r.__read(t.useState(!1),2),A=w[0],F=w[1],M=r.__read(t.useState({index:null,values:null}),2),P=M[0],V=M[1],L=function(){return V({index:null,values:null})},O=r.__read(t.useState([]),2),Z=O[0],H=O[1],G=t.useRef(),K=t.useRef();c.useClickAway(G,(function(e){var r,t,n;m.CONFIRM_MODAL_ACTIONS.includes(null===(n=null===(t=null===(r=e.target)||void 0===r?void 0:r.attributes)||void 0===t?void 0:t.getNamedItem("data-id"))||void 0===n?void 0:n.value)||(F(!1),L())}));var W=l.useId(),B=i.useTranslation("Design").t,J=function(){L(),F((function(e){return!e}))};return t.useEffect((function(){h.length&&I("zoneRecurrences")}),[h,I]),n.createElement(a.Form.Group,null,n.createElement(a.Form.Label,null,B("zoneAvailable")),n.createElement(a.OverlayTrigger,{show:A,overlay:n.createElement(a.Popover,{id:W,className:"rounded"},n.createElement(a.Popover.Content,{className:"shadow-lg rounded",ref:G},n.createElement(v.RecurringDatePickerInput,{defaultValues:P.values,onChange:function(e){return r.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a;return r.__generator(this,(function(o){switch(o.label){case 0:return[4,null===(n=K.current)||void 0===n?void 0:n.trigger()];case 1:return o.sent()?(t=r.__assign({rrule:e.rrule,startDate:e.startDate,endDate:e.endDate,startTime:e.startTime,endTime:e.endTime},K.current.getValues()),(null===(i=P.values)||void 0===i?void 0:i.id)&&(t.id=null===(a=P.values)||void 0===a?void 0:a.id),null!==P.index?N(P.index,t):z(t),F((function(){return!1})),L(),[2]):[2]}}))}))},onDelete:function(){var e=P.index;F(!1),L(),setTimeout((function(){var r=y().zoneRecurrences;S("zoneRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)},setInitialStartDateAfterSelect:!0},n.createElement(p.AvailableTimesControl,{workHours:b,isLoading:C,defaultValues:Z,ref:K})))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[f.sameWidthPopperModifier]}},n.createElement("div",{className:"zone-recurrences"},n.createElement(s.DndContext,{onDragEnd:function(e){var r=e.over,t=e.active;if(r.id!==t.id){var n=h.findIndex((function(e){return String(e._id)===t.id})),i=h.findIndex((function(e){return String(e._id)===r.id}));j(n,i)}}},n.createElement(d.SortableContext,{items:null!==(_=null==h?void 0:h.map((function(e){return String(e._id)})))&&void 0!==_?_:[],strategy:d.verticalListSortingStrategy},null==h?void 0:h.map((function(e,r){return n.createElement(g.ZoneRecurrenceControl,{key:e._id,zoneRecurrence:e,onEdit:function(){return function(e,r){L(),setTimeout((function(){V({index:r,values:e}),H(e.availableTimes||[]),F((function(){return!0}))}),100)}(e,r)}})})))),n.createElement("div",{className:"zone-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:J,onKeyDown:J},n.createElement(o.default,{type:"plus-circle",height:"1rem",className:"zone-recurrence-icon-add mr-2"}),B("addDates")),n.createElement(a.Form.Control,r.__assign({type:"hidden"},D("zoneRecurrences",{required:{value:!0,message:B("Validation:fieldMinNumber",{attribute:B("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(E=k.zoneRecurrences)||void 0===E?void 0:E.message))))};
|
package/package.json
CHANGED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
4
|
+
import { DateTimeButton, DateTimeButtonProps } from "./DateTimeButton";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "DateTimeButton",
|
|
8
|
+
component: DateTimeButton,
|
|
9
|
+
} as Meta;
|
|
10
|
+
|
|
11
|
+
const date = DateTime.fromISO("2023-12-28T10:10:10.000Z");
|
|
12
|
+
|
|
13
|
+
export const Default: Story<DateTimeButtonProps> = (args) => {
|
|
14
|
+
return <DateTimeButton {...args} />;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
Default.args = {
|
|
18
|
+
date,
|
|
19
|
+
isSelected: false,
|
|
20
|
+
isDisabled: false,
|
|
21
|
+
onSelect: () => null,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Selected: Story<DateTimeButtonProps> = (args) => {
|
|
25
|
+
return <DateTimeButton {...args} />;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
Selected.args = {
|
|
29
|
+
date,
|
|
30
|
+
isSelected: true,
|
|
31
|
+
isDisabled: false,
|
|
32
|
+
onSelect: () => null,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const Disabled: Story<DateTimeButtonProps> = (args) => {
|
|
36
|
+
return <DateTimeButton {...args} />;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
Disabled.args = {
|
|
40
|
+
date,
|
|
41
|
+
isSelected: false,
|
|
42
|
+
isDisabled: true,
|
|
43
|
+
onSelect: () => null,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const Time: Story<DateTimeButtonProps> = (args) => {
|
|
47
|
+
return <DateTimeButton {...args} />;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
Time.args = {
|
|
51
|
+
date,
|
|
52
|
+
isSelected: false,
|
|
53
|
+
isDisabled: true,
|
|
54
|
+
onSelect: () => null,
|
|
55
|
+
isTimeButton: true,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const OnlyTime: Story<DateTimeButtonProps> = (args) => {
|
|
59
|
+
return <DateTimeButton {...args} />;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
OnlyTime.args = {
|
|
63
|
+
date,
|
|
64
|
+
isSelected: false,
|
|
65
|
+
isDisabled: true,
|
|
66
|
+
onSelect: () => null,
|
|
67
|
+
isOnlyTimeContainer: true,
|
|
68
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
4
|
+
import { DAY_NUMBER_WITH_MONTH, DAY_OF_WEEK } from "@licklist/core/dist/Config";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { isToday, isTomorrow } from "date-fns";
|
|
7
|
+
|
|
8
|
+
export type DateTimeButtonProps = {
|
|
9
|
+
date?: DateTime;
|
|
10
|
+
time?: string;
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
onSelect: (date: DateTime | string) => void;
|
|
14
|
+
isOnlyTimeContainer?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const DateTimeButton = ({
|
|
18
|
+
date,
|
|
19
|
+
isDisabled,
|
|
20
|
+
time,
|
|
21
|
+
isSelected,
|
|
22
|
+
onSelect,
|
|
23
|
+
isOnlyTimeContainer,
|
|
24
|
+
}: DateTimeButtonProps) => {
|
|
25
|
+
const onClick = () => {
|
|
26
|
+
if (isDisabled) return;
|
|
27
|
+
onSelect(date || time);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// const infoLogo = useMemo(() => {
|
|
31
|
+
// if (info?.logo === infoLogoType.LIMIT) {
|
|
32
|
+
// return <LimitedSvg />;
|
|
33
|
+
// }
|
|
34
|
+
// if (info?.logo === infoLogoType.AVAILABLE) {
|
|
35
|
+
// return <AvailableSvg />;
|
|
36
|
+
// }
|
|
37
|
+
// if (info?.logo === infoLogoType.SOLD_OUT) {
|
|
38
|
+
// return <SoldOutSvg />;
|
|
39
|
+
// }
|
|
40
|
+
// return null;
|
|
41
|
+
// }, [info]);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div
|
|
45
|
+
role="button"
|
|
46
|
+
onClick={onClick}
|
|
47
|
+
onKeyPress={onClick}
|
|
48
|
+
className={clsx(
|
|
49
|
+
"date-time-button",
|
|
50
|
+
isDisabled && "disabled",
|
|
51
|
+
isSelected && "selected",
|
|
52
|
+
time && "time-button",
|
|
53
|
+
isOnlyTimeContainer && "only-time-container"
|
|
54
|
+
)}
|
|
55
|
+
tabIndex={0}
|
|
56
|
+
>
|
|
57
|
+
{date ? (
|
|
58
|
+
<DateContent
|
|
59
|
+
date={date}
|
|
60
|
+
isDisabled={isDisabled}
|
|
61
|
+
isSelected={isSelected}
|
|
62
|
+
/>
|
|
63
|
+
) : (
|
|
64
|
+
time
|
|
65
|
+
)}
|
|
66
|
+
|
|
67
|
+
{/* TODO fix info props */}
|
|
68
|
+
{/* {info && (
|
|
69
|
+
<div className="info">
|
|
70
|
+
{info.logo && <Logo className="logo" logo={infoLogo} />}
|
|
71
|
+
<div>{info.description}</div>
|
|
72
|
+
</div>
|
|
73
|
+
)} */}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const DateContent = ({
|
|
79
|
+
date,
|
|
80
|
+
isDisabled,
|
|
81
|
+
isSelected,
|
|
82
|
+
}: Pick<DateTimeButtonProps, "date" | "isDisabled" | "isSelected">) => {
|
|
83
|
+
const { t } = useTranslation("Design");
|
|
84
|
+
|
|
85
|
+
const getDate = () => {
|
|
86
|
+
if (isToday(date.toJSDate())) return t("today");
|
|
87
|
+
if (isTomorrow(date.toJSDate())) return t("tomorrow");
|
|
88
|
+
return date.toFormat(DAY_OF_WEEK);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<>
|
|
93
|
+
{getDate()}
|
|
94
|
+
<div
|
|
95
|
+
className={clsx(
|
|
96
|
+
"descriptions",
|
|
97
|
+
isSelected && "selected",
|
|
98
|
+
isDisabled && "disabled"
|
|
99
|
+
)}
|
|
100
|
+
>
|
|
101
|
+
{/* TODO add ordinal to date format */}
|
|
102
|
+
{date.toFormat(DAY_NUMBER_WITH_MONTH)}
|
|
103
|
+
</div>
|
|
104
|
+
</>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DateTimeButton";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import { ActivityCard, ActivityCardProps } from "./ActivityCard";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Iframe/ActivityCard",
|
|
7
|
+
component: ActivityCard,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
export const Default: Story<ActivityCardProps> = (props) => {
|
|
11
|
+
return <ActivityCard {...props} />;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
Default.args = {
|
|
15
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
16
|
+
duration: "60 mins",
|
|
17
|
+
price: "from £20",
|
|
18
|
+
image: {
|
|
19
|
+
hash: "0b37b130e22aa2d3",
|
|
20
|
+
id: 195,
|
|
21
|
+
imageType: "cover",
|
|
22
|
+
imageableId: 25,
|
|
23
|
+
imageableType: "zone",
|
|
24
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
25
|
+
// eslint-disable-next-line max-len
|
|
26
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
27
|
+
},
|
|
28
|
+
onSelect: () => null,
|
|
29
|
+
isSelected: false,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Selected: Story<ActivityCardProps> = (props) => {
|
|
33
|
+
return <ActivityCard {...props} />;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
Selected.args = {
|
|
37
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
38
|
+
duration: "60 mins",
|
|
39
|
+
price: "from £20",
|
|
40
|
+
image: {
|
|
41
|
+
hash: "0b37b130e22aa2d3",
|
|
42
|
+
id: 195,
|
|
43
|
+
imageType: "cover",
|
|
44
|
+
imageableId: 25,
|
|
45
|
+
imageableType: "zone",
|
|
46
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
47
|
+
// eslint-disable-next-line max-len
|
|
48
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
49
|
+
},
|
|
50
|
+
onSelect: () => null,
|
|
51
|
+
isSelected: true,
|
|
52
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
4
|
+
|
|
5
|
+
export interface ActivityCardProps {
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
duration: ReactNode;
|
|
8
|
+
price: ReactNode;
|
|
9
|
+
image?: Image | null;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
isSelected: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ActivityCard = ({
|
|
15
|
+
title,
|
|
16
|
+
duration,
|
|
17
|
+
price,
|
|
18
|
+
image,
|
|
19
|
+
onSelect,
|
|
20
|
+
isSelected,
|
|
21
|
+
}: ActivityCardProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
className={clsx("activity-card", isSelected && "active")}
|
|
26
|
+
onClick={onSelect}
|
|
27
|
+
>
|
|
28
|
+
{image && <img className="activity-card-image" alt="" src={image.url} />}
|
|
29
|
+
<div className={clsx("d-flex", "flex-column", !image && "no-image")}>
|
|
30
|
+
<div className="activity-card-title">{title}</div>
|
|
31
|
+
|
|
32
|
+
{duration && <div>{duration}</div>}
|
|
33
|
+
|
|
34
|
+
{price && <div>{price}</div>}
|
|
35
|
+
</div>
|
|
36
|
+
</button>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Meta, Story } from "@storybook/react";
|
|
3
|
+
import { ListActivityCardProps, ListActivityCard } from "./ListActivityCard";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Iframe/ListActivityCard",
|
|
7
|
+
component: ListActivityCard,
|
|
8
|
+
} as Meta;
|
|
9
|
+
|
|
10
|
+
export const Default: Story<ListActivityCardProps> = (props) => {
|
|
11
|
+
return <ListActivityCard {...props} />;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
Default.args = {
|
|
15
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
16
|
+
duration: "60 mins",
|
|
17
|
+
price: "from £20",
|
|
18
|
+
image: {
|
|
19
|
+
hash: "0b37b130e22aa2d3",
|
|
20
|
+
id: 195,
|
|
21
|
+
imageType: "cover",
|
|
22
|
+
imageableId: 25,
|
|
23
|
+
imageableType: "zone",
|
|
24
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
25
|
+
// eslint-disable-next-line max-len
|
|
26
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
27
|
+
},
|
|
28
|
+
onSelect: () => null,
|
|
29
|
+
isSelected: false,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Selected: Story<ListActivityCardProps> = (props) => {
|
|
33
|
+
return <ListActivityCard {...props} />;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
Selected.args = {
|
|
37
|
+
title: "Clay Pigeons & Axe Thowing",
|
|
38
|
+
duration: "60 mins",
|
|
39
|
+
price: "from £20",
|
|
40
|
+
image: {
|
|
41
|
+
hash: "0b37b130e22aa2d3",
|
|
42
|
+
id: 195,
|
|
43
|
+
imageType: "cover",
|
|
44
|
+
imageableId: 25,
|
|
45
|
+
imageableType: "zone",
|
|
46
|
+
path: "images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
47
|
+
// eslint-disable-next-line max-len
|
|
48
|
+
url: "https://cdn.lickli.st/doNktZRze1yuz3Uo2OPrLSvXVtUcdUsF/images/original/000/000/000/000/195-0b37b130e22aa2d3.jpeg",
|
|
49
|
+
},
|
|
50
|
+
onSelect: () => null,
|
|
51
|
+
isSelected: true,
|
|
52
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
4
|
+
|
|
5
|
+
export interface ListActivityCardProps {
|
|
6
|
+
title: string;
|
|
7
|
+
duration: string;
|
|
8
|
+
price: string;
|
|
9
|
+
image?: Image | null;
|
|
10
|
+
onSelect: () => void;
|
|
11
|
+
isSelected: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const ListActivityCard = ({
|
|
15
|
+
title,
|
|
16
|
+
duration,
|
|
17
|
+
price,
|
|
18
|
+
image,
|
|
19
|
+
onSelect,
|
|
20
|
+
isSelected,
|
|
21
|
+
}: ListActivityCardProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<div role="button" onClick={onSelect} onKeyPress={onSelect} tabIndex={0}>
|
|
24
|
+
<div
|
|
25
|
+
className={clsx("list-activity-card", {
|
|
26
|
+
active: isSelected,
|
|
27
|
+
})}
|
|
28
|
+
>
|
|
29
|
+
<div className="description">
|
|
30
|
+
<div className="title">{title}</div>
|
|
31
|
+
{duration && (
|
|
32
|
+
<div>
|
|
33
|
+
<p>{duration}</p>
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
|
|
37
|
+
{price && <div>{price}</div>}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
{image && (
|
|
41
|
+
<div className="image-container">
|
|
42
|
+
<img className="image" src={image.url} alt="" />
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
</div>
|
|
46
|
+
<hr className="list-activity-card-hr" />
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
package/src/iframe/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ export {
|
|
|
29
29
|
export {
|
|
30
30
|
BookingSummary,
|
|
31
31
|
NavigationSteps,
|
|
32
|
+
NavigationStep,
|
|
32
33
|
Timer,
|
|
33
34
|
NavigationFooter,
|
|
34
35
|
PaymentCard,
|
|
@@ -36,16 +37,10 @@ export {
|
|
|
36
37
|
BookingSummaryFooterProps,
|
|
37
38
|
CalendarStepsForm,
|
|
38
39
|
CalendarStepsFormProps,
|
|
39
|
-
Category,
|
|
40
40
|
ErrorModal,
|
|
41
41
|
useCategoryVerification,
|
|
42
42
|
} from "./order-process";
|
|
43
43
|
export { PoweredBy } from "./powered-by";
|
|
44
44
|
export * from "./page";
|
|
45
|
-
export
|
|
45
|
+
export * from "./activity-cards";
|
|
46
46
|
export { CustomDateField, CustomDateFieldProps } from "./custom-fields";
|
|
47
|
-
export {
|
|
48
|
-
DateTimeSelector,
|
|
49
|
-
SelectDateAndTimeList,
|
|
50
|
-
SelectDateOrTimeList,
|
|
51
|
-
} from "./select-date-time";
|
|
@@ -10,13 +10,15 @@ import clsx from "clsx";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { SnippetLoader } from "../../../../static";
|
|
12
12
|
|
|
13
|
+
export type NavigationStep = {
|
|
14
|
+
pathname: string;
|
|
15
|
+
key: string;
|
|
16
|
+
name: string;
|
|
17
|
+
queryParams?: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
type NavigationStepsProps = {
|
|
14
|
-
steps:
|
|
15
|
-
pathname: string;
|
|
16
|
-
key: string;
|
|
17
|
-
name: string;
|
|
18
|
-
queryParams?: Record<string, string>;
|
|
19
|
-
}[];
|
|
21
|
+
steps: NavigationStep[];
|
|
20
22
|
isLoading?: boolean;
|
|
21
23
|
};
|
|
22
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { NavigationSteps } from "./NavigationSteps";
|
|
1
|
+
export { NavigationSteps, NavigationStep } from "./NavigationSteps";
|