@licklist/design 0.44.486-dev.2 → 0.44.486-dev.21
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/assets/iframe/available.svg.js +1 -0
- package/dist/assets/iframe/limited.svg.js +1 -0
- package/dist/assets/iframe/soldOut.svg.js +1 -0
- package/dist/collapsible-input-group/CollapsibleInputGroup.js +1 -1
- package/dist/date-time-button/DateTimeButton.d.ts +5 -1
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +1 -1
- package/dist/events/event-venue-map/hooks/useImage.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useImage.js +1 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +17 -0
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -0
- package/dist/iframe/activity-card/ActivityCard.js +1 -0
- package/dist/iframe/activity-card/index.d.ts +2 -0
- package/dist/iframe/activity-card/index.d.ts.map +1 -0
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts +5 -3
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/EventCalendar.js +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +3 -2
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.js +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +5 -3
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/iframe/index.d.ts +1 -1
- package/dist/iframe/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -0
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts +3 -2
- package/dist/iframe/order-process/components/utils/useCategoryVerification.d.ts.map +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
- 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/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts +7 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/types/index.js +1 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts +3 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -0
- package/dist/index.js +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts +3 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +2 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts +2 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts +2 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts +4 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +1 -1
- package/dist/report/form/ReportForm.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/static/CountryCodeSelect.d.ts.map +1 -1
- package/dist/static/CountryCodeSelect.js +1 -1
- package/dist/static/RestrictedAccess.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts +2 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +1 -1
- package/dist/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
- package/dist/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
- package/dist/styles/activity-card/_index.scss +2 -0
- package/dist/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +3 -6
- package/dist/styles/date-time-button/_index.scss +1 -0
- package/dist/styles/iframe-events/Calendar.scss +14 -14
- package/dist/styles/iframe-page/PageBody.scss +3 -2
- package/dist/styles/notification/Notification.scss +4 -0
- package/dist/styles/packages.scss +2 -1
- package/dist/styles/resources-blocking/_index.scss +5 -0
- package/dist/styles/themes/bookedit/_index.scss +1 -0
- package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
- package/dist/zone/form/components/AvailableTimesControl.js +1 -1
- package/dist/zone/form/components/GameDurationControl.d.ts +7 -0
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -0
- package/dist/zone/form/components/GameDurationControl.js +1 -0
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/dist/zone/form/utils/dates.js +1 -1
- package/package.json +1 -1
- package/src/collapsible-input-group/CollapsibleInputGroup.tsx +1 -1
- package/src/date-time-button/DateTimeButton.stories.tsx +17 -0
- package/src/date-time-button/DateTimeButton.tsx +42 -20
- package/src/events/edit-event-modal/IntervalInput.tsx +3 -0
- package/src/events/event-venue-map/hooks/useImage.tsx +17 -8
- package/src/iframe/{activity-cards/activity-card → activity-card}/ActivityCard.stories.tsx +24 -1
- package/src/iframe/activity-card/ActivityCard.tsx +77 -0
- package/src/iframe/activity-card/index.ts +1 -0
- package/src/iframe/event/event-calendar/EventCalendar.stories.tsx +20 -21
- package/src/iframe/event/event-calendar/EventCalendar.tsx +10 -3
- package/src/iframe/event/event-calendar/components/CalendarDate/CalendarDate.tsx +10 -2
- package/src/iframe/event/event-calendar/components/CalendarDates/CalendarDates.tsx +6 -2
- package/src/iframe/index.ts +1 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -0
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -0
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +2 -2
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +28 -29
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +6 -1
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +11 -99
- package/src/iframe/payment/order-items-table/types/index.ts +18 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +118 -0
- package/src/iframe/payment/payment-page/PaymentPage.tsx +4 -4
- package/src/notification/email-template/control/EmailTemplateControl.tsx +26 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +2 -0
- package/src/product-set/form/ProductSetForm.stories.tsx +1 -0
- package/src/product-set/form/ProductsControl.tsx +10 -0
- package/src/product-set/product/ProductControl.tsx +31 -8
- package/src/product-set/product/duration/ProductDurationControl.tsx +1 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +15 -5
- package/src/provider/location-input/LocationInputDescription.tsx +2 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +10 -8
- package/src/recurrence-input/RecurrenceEndInput.tsx +27 -9
- package/src/recurrence-input/RecurrenceInput.tsx +3 -0
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +24 -21
- package/src/report/form/ReportForm.tsx +1 -1
- package/src/static/CountryCodeSelect.tsx +3 -5
- package/src/static/RestrictedAccess.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +8 -1
- package/src/styles/{iframe-customers-journey/ActivitiesCard.scss → activity-card/GridActivitiesCard.scss} +1 -1
- package/src/styles/{iframe-customers-journey/ActivitiesSelectedCard.scss → activity-card/ListActivitiesCard.scss} +2 -1
- package/src/styles/activity-card/_index.scss +2 -0
- package/src/styles/{iframe-customers-journey → date-time-button}/DateTimeButton.scss +3 -6
- package/src/styles/date-time-button/_index.scss +1 -0
- package/src/styles/iframe-events/Calendar.scss +14 -14
- package/src/styles/iframe-page/PageBody.scss +3 -2
- package/src/styles/notification/Notification.scss +4 -0
- package/src/styles/packages.scss +2 -1
- package/src/styles/resources-blocking/_index.scss +5 -0
- package/src/styles/themes/bookedit/_index.scss +1 -0
- package/src/typings.d.ts +11 -0
- package/src/zone/form/components/AvailableTimesControl.tsx +4 -9
- package/src/zone/form/components/GameDurationControl.tsx +46 -0
- package/src/zone/form/components/ZoneControl.tsx +2 -0
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +27 -35
- package/src/zone/form/utils/dates.ts +29 -36
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts +0 -12
- package/dist/iframe/activity-cards/activity-card/ActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-cards/activity-card/ActivityCard.js +0 -1
- package/dist/iframe/activity-cards/index.d.ts +0 -3
- package/dist/iframe/activity-cards/index.d.ts.map +0 -1
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts +0 -12
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.d.ts.map +0 -1
- package/dist/iframe/activity-cards/list-activity-card/ListActivityCard.js +0 -1
- package/dist/styles/iframe-customers-journey/_index.scss +0 -3
- package/src/iframe/activity-cards/activity-card/ActivityCard.tsx +0 -38
- package/src/iframe/activity-cards/index.ts +0 -2
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.stories.tsx +0 -52
- package/src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx +0 -49
- package/src/styles/iframe-customers-journey/_index.scss +0 -3
- /package/dist/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
- /package/dist/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
- /package/dist/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/available.svg → available.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/limited.svg → limited.svg} +0 -0
- /package/src/assets/iframe/{dateInfo/soldOut.svg → soldOut.svg} +0 -0
|
@@ -12,11 +12,8 @@ import {
|
|
|
12
12
|
import { DndContext } from "@dnd-kit/core";
|
|
13
13
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
14
14
|
import { DateTime } from "luxon";
|
|
15
|
-
import { TIME_FORMAT
|
|
16
|
-
|
|
17
|
-
calculateTimeWithOffset,
|
|
18
|
-
DIRECTION_TO_LOCAL,
|
|
19
|
-
} from "@licklist/plugins/dist/utils/time";
|
|
15
|
+
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
16
|
+
|
|
20
17
|
import { CONFIRM_MODAL_ACTIONS } from "../../../modals/confirmation/ConfirmModal";
|
|
21
18
|
import { Icon } from "../../../static";
|
|
22
19
|
import {
|
|
@@ -67,7 +64,6 @@ export const ZoneRecurrencesControl = ({
|
|
|
67
64
|
});
|
|
68
65
|
const clearEditState = () => setEditState({ index: null, values: null });
|
|
69
66
|
const [availableTimes, setAvailableTimes] = useState<string[]>([]);
|
|
70
|
-
|
|
71
67
|
const popoverRef = useRef<HTMLDivElement>();
|
|
72
68
|
const availableTimesFormRef = useRef<AvailableTimesControlRef>();
|
|
73
69
|
|
|
@@ -97,30 +93,29 @@ export const ZoneRecurrencesControl = ({
|
|
|
97
93
|
if (!isAvailableTimesFormValid) {
|
|
98
94
|
return;
|
|
99
95
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
currentAvailableTime.diff(endTime, "minutes").minutes <= 0
|
|
112
|
-
);
|
|
113
|
-
});
|
|
114
|
-
if (!validAvalilableTimes) {
|
|
115
|
-
availableTimesFormRef.current.setError("availableTimes", {
|
|
116
|
-
message: t("Validation:fieldTimeBetween", {
|
|
117
|
-
attribute: t("Design:startTimesSmall"),
|
|
118
|
-
min: startTime.toFormat(TIME_FORMAT),
|
|
119
|
-
max: endTime.toFormat(TIME_FORMAT),
|
|
120
|
-
}),
|
|
96
|
+
if (next?.startTime && next?.endTime) {
|
|
97
|
+
const startTime = DateTime.fromISO(next.startTime);
|
|
98
|
+
const endTime = DateTime.fromISO(next.endTime);
|
|
99
|
+
const { availableTimes } = availableTimesFormRef.current.getValues();
|
|
100
|
+
const validAvalilableTimes = availableTimes.every((time) => {
|
|
101
|
+
const currentAvailableTime = DateTime.fromFormat(time, TIME_FORMAT);
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
currentAvailableTime.diff(startTime, "minutes").minutes >= 0 &&
|
|
105
|
+
currentAvailableTime.diff(endTime, "minutes").minutes <= 0
|
|
106
|
+
);
|
|
121
107
|
});
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
if (!validAvalilableTimes) {
|
|
109
|
+
availableTimesFormRef.current.setError("availableTimes", {
|
|
110
|
+
message: t("Validation:fieldTimeBetween", {
|
|
111
|
+
attribute: t("Design:startTimesSmall"),
|
|
112
|
+
min: startTime.toFormat(TIME_FORMAT),
|
|
113
|
+
max: endTime.toFormat(TIME_FORMAT),
|
|
114
|
+
}),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
124
119
|
}
|
|
125
120
|
const values = {
|
|
126
121
|
rrule: next.rrule,
|
|
@@ -148,12 +143,9 @@ export const ZoneRecurrencesControl = ({
|
|
|
148
143
|
const handleOnEdit = (next: Partial<ZoneRecurrence>, index) => {
|
|
149
144
|
clearEditState();
|
|
150
145
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
setAvailableTimes(next.availableTimes || []);
|
|
155
|
-
setIsDatePopoverVisible(() => true);
|
|
156
|
-
}, 100);
|
|
146
|
+
setEditState({ index, values: next });
|
|
147
|
+
setAvailableTimes(next.availableTimes || []);
|
|
148
|
+
setIsDatePopoverVisible(() => true);
|
|
157
149
|
};
|
|
158
150
|
|
|
159
151
|
const handleOnAdd = () => {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TIME_SEPARATOR } from "@licklist/core/dist/Services/Date";
|
|
2
2
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
3
|
+
import { DateTime } from "luxon";
|
|
4
|
+
import { TIME_FORMAT } from "@licklist/core/dist/Config";
|
|
3
5
|
|
|
4
6
|
const DEFAULT_START_DAY_TIME = "00:00";
|
|
5
7
|
const DEFAULT_END_DAY_TIME = "23:59";
|
|
@@ -13,46 +15,37 @@ export const getTimeCheckboxRanges = (
|
|
|
13
15
|
const [startHour, startMinutes] = startTime.split(TIME_SEPARATOR);
|
|
14
16
|
const [endHour, endMinutes] = endTime.split(TIME_SEPARATOR);
|
|
15
17
|
|
|
16
|
-
let startDate =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
let startDate = DateTime.now()
|
|
19
|
+
.setZone("UTC")
|
|
20
|
+
.set({
|
|
21
|
+
year: today.getFullYear(),
|
|
22
|
+
month: today.getMonth() + 1,
|
|
23
|
+
day: today.getDate(),
|
|
24
|
+
hour: Number(startHour),
|
|
25
|
+
minute: Number(startMinutes),
|
|
26
|
+
second: 0,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const endDate = DateTime.now()
|
|
30
|
+
.setZone("UTC")
|
|
31
|
+
.set({
|
|
32
|
+
year: today.getFullYear(),
|
|
33
|
+
month: today.getMonth() + 1,
|
|
34
|
+
day: today.getDate(),
|
|
35
|
+
hour: Number(endHour),
|
|
36
|
+
minute: Number(endMinutes),
|
|
37
|
+
second: 0,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const checkboxes: string[] = [startDate.toFormat(TIME_FORMAT)];
|
|
35
41
|
let count = 0;
|
|
36
42
|
|
|
37
|
-
while (endDate >=
|
|
38
|
-
startDate =
|
|
43
|
+
while (endDate.diff(startDate, ["minutes"]).minutes >= range) {
|
|
44
|
+
startDate = startDate.plus({ minutes: range });
|
|
39
45
|
count += 1;
|
|
40
|
-
|
|
46
|
+
checkboxes[count] = startDate.toFormat(TIME_FORMAT);
|
|
41
47
|
}
|
|
42
48
|
|
|
43
|
-
const checkboxes = Object.keys(dateSlices)
|
|
44
|
-
.map((key) => {
|
|
45
|
-
const date = dateSlices[key];
|
|
46
|
-
if (date < endDate) {
|
|
47
|
-
const [, time] = date.toISOString().split("T");
|
|
48
|
-
const [selectedHours, selectedMinutes] = time.split(TIME_SEPARATOR);
|
|
49
|
-
|
|
50
|
-
return [selectedHours, selectedMinutes].join(TIME_SEPARATOR);
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
})
|
|
54
|
-
.filter(Boolean);
|
|
55
|
-
|
|
56
49
|
return checkboxes;
|
|
57
50
|
};
|
|
58
51
|
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
3
|
-
export interface ActivityCardProps {
|
|
4
|
-
title: ReactNode;
|
|
5
|
-
duration: ReactNode;
|
|
6
|
-
price: ReactNode;
|
|
7
|
-
image?: Image | null;
|
|
8
|
-
onSelect: () => void;
|
|
9
|
-
isSelected: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const ActivityCard: ({ title, duration, price, image, onSelect, isSelected, }: ActivityCardProps) => JSX.Element;
|
|
12
|
-
//# sourceMappingURL=ActivityCard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/activity-cards/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,6DAOtB,iBAAiB,gBAiBnB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=e(require("clsx"));exports.ActivityCard=function(e){var c=e.title,i=e.duration,r=e.price,l=e.image,n=e.onSelect,u=e.isSelected;return t.createElement("button",{type:"button",className:a("activity-card",u&&"active"),onClick:n},l&&t.createElement("img",{className:"activity-card-image",alt:"",src:l.url}),t.createElement("div",{className:a("d-flex","flex-column",!l&&"no-image")},t.createElement("div",{className:"activity-card-title"},c),i&&t.createElement("div",null,i),r&&t.createElement("div",null,r)))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-cards/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,8BAA8B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
|
|
3
|
-
export interface ListActivityCardProps {
|
|
4
|
-
title: string;
|
|
5
|
-
duration: string;
|
|
6
|
-
price: string;
|
|
7
|
-
image?: Image | null;
|
|
8
|
-
onSelect: () => void;
|
|
9
|
-
isSelected: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const ListActivityCard: ({ title, duration, price, image, onSelect, isSelected, }: ListActivityCardProps) => JSX.Element;
|
|
12
|
-
//# sourceMappingURL=ListActivityCard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListActivityCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/activity-cards/list-activity-card/ListActivityCard.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,6DAO1B,qBAAqB,gBA4BvB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=e(require("clsx"));exports.ListActivityCard=function(e){var r=e.title,i=e.duration,l=e.price,c=e.image,n=e.onSelect,s=e.isSelected;return t.createElement("div",{role:"button",onClick:n,onKeyPress:n,tabIndex:0},t.createElement("div",{className:a("list-activity-card",{active:s})},t.createElement("div",{className:"description"},t.createElement("div",{className:"title"},r),i&&t.createElement("div",null,t.createElement("p",null,i)),l&&t.createElement("div",null,l)),c&&t.createElement("div",{className:"image-container"},t.createElement("img",{className:"image",src:c.url,alt:""}))),t.createElement("hr",{className:"list-activity-card-hr"}))};
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
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
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|