@licklist/design 0.44.485-dev.63 → 0.44.485-dev.65
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/events/event-venue-map/components/MapPoint/MapPoint.js +1 -1
- package/dist/help/popover/HelpPopover.d.ts +4 -2
- package/dist/help/popover/HelpPopover.d.ts.map +1 -1
- package/dist/help/popover/HelpPopover.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +3 -3
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCardSkeleton.d.ts +3 -3
- package/dist/iframe/event/event-card/IframeEventCardSkeleton.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCardSkeleton.js +1 -1
- package/dist/image-radio-input/ImageRadioInput.d.ts +15 -0
- package/dist/image-radio-input/ImageRadioInput.d.ts.map +1 -0
- package/dist/image-radio-input/ImageRadioInput.js +1 -0
- package/dist/image-radio-input/index.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -1
- package/dist/provider/constants.d.ts +1 -1
- package/dist/provider/constants.js +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/radio-card/RadioCard.d.ts +13 -0
- package/dist/radio-card/RadioCard.d.ts.map +1 -0
- package/dist/radio-card/RadioCard.js +1 -0
- package/dist/radio-card/index.d.ts +2 -0
- package/dist/radio-card/index.d.ts.map +1 -0
- package/dist/setting/dashboard/index.d.ts +0 -2
- package/dist/setting/dashboard/index.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/sorting-select/SortingSelect.d.ts +10 -0
- package/dist/sorting-select/SortingSelect.d.ts.map +1 -0
- package/dist/sorting-select/SortingSelect.js +1 -0
- package/dist/sorting-select/index.d.ts +2 -0
- package/dist/sorting-select/index.d.ts.map +1 -0
- package/{src/styles/widgets/ImageRadioInput.scss → dist/styles/image-radio-input/_index.scss} +12 -0
- package/dist/styles/packages.scss +2 -1
- package/{src/styles/widgets/WidgetTypeRadioButton.scss → dist/styles/radio-card/_index.scss} +8 -1
- package/package.json +2 -2
- package/src/events/event-venue-map/components/MapPoint/MapPoint.tsx +1 -1
- package/src/help/popover/HelpPopover.tsx +13 -5
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +6 -14
- package/src/iframe/event/event-card/IframeEventCard.tsx +6 -10
- package/src/iframe/event/event-card/IframeEventCardSkeleton.tsx +20 -30
- package/src/iframe/event/event-card/IframeEventCards.stories.tsx +2 -3
- package/src/image-radio-input/ImageRadioInput.stories.tsx +67 -0
- package/src/image-radio-input/ImageRadioInput.tsx +53 -0
- package/src/index.ts +3 -0
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -5
- package/src/provider/constants.ts +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +1 -1
- package/src/radio-card/RadioCard.stories.tsx +48 -0
- package/src/radio-card/RadioCard.tsx +49 -0
- package/src/radio-card/index.ts +1 -0
- package/src/setting/dashboard/index.ts +0 -2
- package/src/snippet/snippet-template/preview/Preview.tsx +0 -5
- package/src/sorting-select/SortingSelect.stories.tsx +15 -0
- package/src/sorting-select/SortingSelect.tsx +79 -0
- package/src/sorting-select/index.ts +1 -0
- package/{dist/styles/widgets/ImageRadioInput.scss → src/styles/image-radio-input/_index.scss} +12 -0
- package/src/styles/packages.scss +2 -1
- package/{dist/styles/widgets/WidgetTypeRadioButton.scss → src/styles/radio-card/_index.scss} +8 -1
- package/dist/assets/widgets/circlePlus.svg +0 -4
- package/dist/assets/widgets/inPage.svg +0 -10
- package/dist/assets/widgets/overlay.svg +0 -9
- package/dist/assets/widgets/sidebar.svg +0 -9
- package/dist/setting/dashboard/snippets/control/SnippetControl.d.ts +0 -9
- package/dist/setting/dashboard/snippets/control/SnippetControl.d.ts.map +0 -1
- package/dist/setting/dashboard/snippets/control/SnippetControl.js +0 -1
- package/dist/setting/dashboard/snippets/control/index.d.ts +0 -2
- package/dist/setting/dashboard/snippets/control/index.d.ts.map +0 -1
- package/dist/setting/dashboard/snippets/form/SnippetForm.d.ts +0 -33
- package/dist/setting/dashboard/snippets/form/SnippetForm.d.ts.map +0 -1
- package/dist/setting/dashboard/snippets/form/SnippetForm.js +0 -1
- package/dist/setting/dashboard/snippets/form/context.d.ts +0 -11
- package/dist/setting/dashboard/snippets/form/context.d.ts.map +0 -1
- package/dist/setting/dashboard/snippets/form/context.js +0 -1
- package/dist/setting/dashboard/snippets/form/index.d.ts +0 -2
- package/dist/setting/dashboard/snippets/form/index.d.ts.map +0 -1
- package/dist/setting/dashboard/snippets/modal/SnippetViewTypeModal.d.ts +0 -19
- package/dist/setting/dashboard/snippets/modal/SnippetViewTypeModal.d.ts.map +0 -1
- package/dist/setting/dashboard/snippets/modal/SnippetViewTypeModal.js +0 -1
- package/dist/setting/dashboard/snippets/modal/index.d.ts +0 -3
- package/dist/setting/dashboard/snippets/modal/index.d.ts.map +0 -1
- package/dist/styles/widgets/BookingStyleSelector.scss +0 -14
- package/dist/styles/widgets/CalendarStyleSelector.scss +0 -17
- package/dist/styles/widgets/CheckboxGroup.scss +0 -15
- package/dist/styles/widgets/ProductSetSelector.scss +0 -19
- package/dist/styles/widgets/SnippetCode.scss +0 -18
- package/dist/styles/widgets/WidgetBuilderForm.scss +0 -51
- package/dist/styles/widgets/WidgetTypeSelector.scss +0 -6
- package/dist/styles/widgets/_index.scss +0 -9
- package/dist/widgets/BookingStyleSelector/BookingStyleSelector.d.ts +0 -3
- package/dist/widgets/BookingStyleSelector/BookingStyleSelector.d.ts.map +0 -1
- package/dist/widgets/BookingStyleSelector/index.d.ts +0 -2
- package/dist/widgets/BookingStyleSelector/index.d.ts.map +0 -1
- package/dist/widgets/CalendarStyleSelector/CalendarStyleSelector.d.ts +0 -3
- package/dist/widgets/CalendarStyleSelector/CalendarStyleSelector.d.ts.map +0 -1
- package/dist/widgets/CalendarStyleSelector/index.d.ts +0 -2
- package/dist/widgets/CalendarStyleSelector/index.d.ts.map +0 -1
- package/dist/widgets/CheckboxGroup/CheckboxGroup.d.ts +0 -8
- package/dist/widgets/CheckboxGroup/CheckboxGroup.d.ts.map +0 -1
- package/dist/widgets/CheckboxGroup/index.d.ts +0 -2
- package/dist/widgets/CheckboxGroup/index.d.ts.map +0 -1
- package/dist/widgets/ImageRadioInput/ImageRadioInput.d.ts +0 -9
- package/dist/widgets/ImageRadioInput/ImageRadioInput.d.ts.map +0 -1
- package/dist/widgets/ImageRadioInput/index.d.ts.map +0 -1
- package/dist/widgets/ProductSetSelector/ProductSetSelector.d.ts +0 -3
- package/dist/widgets/ProductSetSelector/ProductSetSelector.d.ts.map +0 -1
- package/dist/widgets/ProductSetSelector/index.d.ts +0 -2
- package/dist/widgets/ProductSetSelector/index.d.ts.map +0 -1
- package/dist/widgets/SnippetCode/SnippetCode.d.ts +0 -6
- package/dist/widgets/SnippetCode/SnippetCode.d.ts.map +0 -1
- package/dist/widgets/SnippetCode/index.d.ts +0 -2
- package/dist/widgets/SnippetCode/index.d.ts.map +0 -1
- package/dist/widgets/WidgetBuilderForm/WidgetBuilderForm.d.ts +0 -12
- package/dist/widgets/WidgetBuilderForm/WidgetBuilderForm.d.ts.map +0 -1
- package/dist/widgets/WidgetTypeRadio/WidgetTypeRadio.d.ts +0 -7
- package/dist/widgets/WidgetTypeRadio/WidgetTypeRadio.d.ts.map +0 -1
- package/dist/widgets/WidgetTypeRadio/index.d.ts +0 -2
- package/dist/widgets/WidgetTypeRadio/index.d.ts.map +0 -1
- package/dist/widgets/WidgetTypeSelector/WidgetTypeSelector.d.ts +0 -3
- package/dist/widgets/WidgetTypeSelector/WidgetTypeSelector.d.ts.map +0 -1
- package/src/assets/widgets/circlePlus.svg +0 -4
- package/src/assets/widgets/inPage.svg +0 -10
- package/src/assets/widgets/overlay.svg +0 -9
- package/src/assets/widgets/sidebar.svg +0 -9
- package/src/setting/dashboard/snippets/control/SnippetControl.tsx +0 -235
- package/src/setting/dashboard/snippets/control/index.ts +0 -1
- package/src/setting/dashboard/snippets/form/SnippetForm.stories.tsx +0 -104
- package/src/setting/dashboard/snippets/form/SnippetForm.tsx +0 -94
- package/src/setting/dashboard/snippets/form/context.tsx +0 -18
- package/src/setting/dashboard/snippets/form/index.ts +0 -1
- package/src/setting/dashboard/snippets/modal/SnippetViewTypeModal.stories.tsx +0 -28
- package/src/setting/dashboard/snippets/modal/SnippetViewTypeModal.tsx +0 -104
- package/src/setting/dashboard/snippets/modal/index.ts +0 -2
- package/src/styles/widgets/BookingStyleSelector.scss +0 -14
- package/src/styles/widgets/CalendarStyleSelector.scss +0 -17
- package/src/styles/widgets/CheckboxGroup.scss +0 -15
- package/src/styles/widgets/ProductSetSelector.scss +0 -19
- package/src/styles/widgets/SnippetCode.scss +0 -18
- package/src/styles/widgets/WidgetBuilderForm.scss +0 -51
- package/src/styles/widgets/WidgetTypeSelector.scss +0 -6
- package/src/styles/widgets/_index.scss +0 -9
- package/src/widgets/BookingStyleSelector/BookingStyleSelector.stories.tsx +0 -12
- package/src/widgets/BookingStyleSelector/BookingStyleSelector.tsx +0 -34
- package/src/widgets/BookingStyleSelector/index.ts +0 -1
- package/src/widgets/CalendarStyleSelector/CalendarStyleSelector.stories.tsx +0 -12
- package/src/widgets/CalendarStyleSelector/CalendarStyleSelector.tsx +0 -29
- package/src/widgets/CalendarStyleSelector/index.ts +0 -1
- package/src/widgets/CheckboxGroup/CheckboxGroup.stories.tsx +0 -16
- package/src/widgets/CheckboxGroup/CheckboxGroup.tsx +0 -64
- package/src/widgets/CheckboxGroup/index.ts +0 -1
- package/src/widgets/ImageRadioInput/ImageRadioInput.stories.tsx +0 -18
- package/src/widgets/ImageRadioInput/ImageRadioInput.tsx +0 -29
- package/src/widgets/ProductSetSelector/ProductSetSelector.stories.tsx +0 -12
- package/src/widgets/ProductSetSelector/ProductSetSelector.tsx +0 -27
- package/src/widgets/ProductSetSelector/index.ts +0 -1
- package/src/widgets/SnippetCode/SnippetCode.stories.tsx +0 -17
- package/src/widgets/SnippetCode/SnippetCode.tsx +0 -27
- package/src/widgets/SnippetCode/index.ts +0 -1
- package/src/widgets/WidgetBuilderForm/WidgetBuilderForm.stories.tsx +0 -12
- package/src/widgets/WidgetBuilderForm/WidgetBuilderForm.tsx +0 -84
- package/src/widgets/WidgetTypeRadio/WidgetTypeRadio.stories.tsx +0 -17
- package/src/widgets/WidgetTypeRadio/WidgetTypeRadio.tsx +0 -43
- package/src/widgets/WidgetTypeRadio/index.ts +0 -1
- package/src/widgets/WidgetTypeSelector/WidgetTypeSelector.stories.tsx +0 -12
- package/src/widgets/WidgetTypeSelector/WidgetTypeSelector.tsx +0 -32
- package/tests/Snippets/Snippets.test.tsx +0 -77
- /package/dist/{widgets/ImageRadioInput → image-radio-input}/index.d.ts +0 -0
- /package/src/{widgets/ImageRadioInput → image-radio-input}/index.ts +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
.widget-builder-form {
|
|
2
|
-
justify-content: space-between;
|
|
3
|
-
|
|
4
|
-
h2 {
|
|
5
|
-
font-size: 1.5rem;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
h3 {
|
|
9
|
-
font-size: 1rem;
|
|
10
|
-
font-weight: 600;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
h4 {
|
|
14
|
-
font-size: 0.875rem;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
p {
|
|
19
|
-
font-size: 0.8125rem;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
input[type="text"],
|
|
23
|
-
select {
|
|
24
|
-
height: 2.5rem;
|
|
25
|
-
border-radius: 0.5rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
button {
|
|
29
|
-
border-radius: 0.75rem;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.form-label {
|
|
33
|
-
font-size: 0.875rem;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&-customizations {
|
|
37
|
-
margin-bottom: 1rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-right-column {
|
|
41
|
-
padding: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&-grey {
|
|
45
|
-
height: fit-content;
|
|
46
|
-
margin-bottom: 2rem;
|
|
47
|
-
padding: 1.5rem;
|
|
48
|
-
background-color: #fafafa;
|
|
49
|
-
border-radius: 0.75rem;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
@import "./WidgetTypeRadioButton";
|
|
2
|
-
@import "./CalendarStyleSelector";
|
|
3
|
-
@import "./CheckboxGroup";
|
|
4
|
-
@import "./ImageRadioInput";
|
|
5
|
-
@import "./BookingStyleSelector";
|
|
6
|
-
@import "./WidgetTypeSelector";
|
|
7
|
-
@import "./WidgetBuilderForm";
|
|
8
|
-
@import "./SnippetCode";
|
|
9
|
-
@import "./ProductSetSelector";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { BookingStyleSelector } from "./BookingStyleSelector";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Booking Style Selector",
|
|
7
|
-
component: BookingStyleSelector,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story = (args) => {
|
|
11
|
-
return <BookingStyleSelector {...args} />;
|
|
12
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { ImageRadioInput } from "../ImageRadioInput";
|
|
4
|
-
import { ReactComponent as Overlay } from "../../assets/widgets/overlay.svg";
|
|
5
|
-
import { ReactComponent as InPage } from "../../assets/widgets/inPage.svg";
|
|
6
|
-
import { ReactComponent as Sidebar } from "../../assets/widgets/sidebar.svg";
|
|
7
|
-
|
|
8
|
-
export const BookingStyleSelector = () => {
|
|
9
|
-
const { t } = useTranslation("Design");
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<div className="widget-booking-style-selector">
|
|
13
|
-
<h4>{t("selectBookingStyle")}</h4>
|
|
14
|
-
|
|
15
|
-
<div className="wrapper">
|
|
16
|
-
<ImageRadioInput
|
|
17
|
-
img={<Overlay />}
|
|
18
|
-
label={t("overlay")}
|
|
19
|
-
name="bookingWidgetStyle"
|
|
20
|
-
/>
|
|
21
|
-
<ImageRadioInput
|
|
22
|
-
img={<InPage />}
|
|
23
|
-
label={t("inPage")}
|
|
24
|
-
name="bookingWidgetStyle"
|
|
25
|
-
/>
|
|
26
|
-
<ImageRadioInput
|
|
27
|
-
img={<Sidebar />}
|
|
28
|
-
label={t("sidebar")}
|
|
29
|
-
name="bookingWidgetStyle"
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BookingStyleSelector } from "./BookingStyleSelector";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { CalendarStyleSelector } from "./CalendarStyleSelector";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Calendar Style Selector",
|
|
7
|
-
component: CalendarStyleSelector,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story = (args) => {
|
|
11
|
-
return <CalendarStyleSelector {...args} />;
|
|
12
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { ReactComponent as MonthIcon } from "../../assets/widgets/monthCalendar.svg";
|
|
4
|
-
import { ReactComponent as WeekIcon } from "../../assets/widgets/weekCalendar.svg";
|
|
5
|
-
import { ImageRadioInput } from "../ImageRadioInput/ImageRadioInput";
|
|
6
|
-
|
|
7
|
-
export const CalendarStyleSelector = () => {
|
|
8
|
-
const { t } = useTranslation("Design");
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<div className="widget-calendar-style-selector">
|
|
12
|
-
<h4>{t("calendarStyle")}</h4>
|
|
13
|
-
<p>{t("calendarStyleDescription")}</p>
|
|
14
|
-
|
|
15
|
-
<div className="controls">
|
|
16
|
-
<ImageRadioInput
|
|
17
|
-
label={t("month")}
|
|
18
|
-
img={<MonthIcon />}
|
|
19
|
-
name="calendarStyle"
|
|
20
|
-
/>
|
|
21
|
-
<ImageRadioInput
|
|
22
|
-
label={t("week")}
|
|
23
|
-
img={<WeekIcon />}
|
|
24
|
-
name="calendarStyle"
|
|
25
|
-
/>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CalendarStyleSelector } from "./CalendarStyleSelector";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { CheckboxGroup, CheckboxGroupProps } from "./CheckboxGroup";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Checkbox Group",
|
|
7
|
-
component: CheckboxGroup,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story<CheckboxGroupProps> = (args) => {
|
|
11
|
-
return <CheckboxGroup {...args} />;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
Default.args = {
|
|
15
|
-
heading: "Include from price",
|
|
16
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { useId } from "@react-aria/utils";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Form } from "react-bootstrap";
|
|
4
|
-
import { useFormContext } from "react-hook-form";
|
|
5
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
-
import { WidgetBuilderFormModel } from "../WidgetBuilderForm/WidgetBuilderForm";
|
|
7
|
-
|
|
8
|
-
export type CheckboxGroupProps = {
|
|
9
|
-
heading: string;
|
|
10
|
-
name: keyof Partial<
|
|
11
|
-
Pick<WidgetBuilderFormModel, "includeFromPrice" | "includeAvailability">
|
|
12
|
-
>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const CheckboxGroup = ({ heading, name }: CheckboxGroupProps) => {
|
|
16
|
-
const { t } = useTranslation();
|
|
17
|
-
|
|
18
|
-
const { register } = useFormContext<WidgetBuilderFormModel>();
|
|
19
|
-
|
|
20
|
-
const onTimeSlotsCheckboxIt = useId();
|
|
21
|
-
const onCalendarCheckboxId = useId();
|
|
22
|
-
const onProductSetsCheckboxId = useId();
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className="widgets-checkbox-group">
|
|
26
|
-
<h3>{heading}</h3>
|
|
27
|
-
|
|
28
|
-
<Form.Group className="custom-checkbox">
|
|
29
|
-
<Form.Check custom type="checkbox" id={onTimeSlotsCheckboxIt}>
|
|
30
|
-
<Form.Check.Input
|
|
31
|
-
type="checkbox"
|
|
32
|
-
value="onTimeSlots"
|
|
33
|
-
{...register(name)}
|
|
34
|
-
/>
|
|
35
|
-
<Form.Check.Label>{t("onTimeSLots")}</Form.Check.Label>
|
|
36
|
-
</Form.Check>
|
|
37
|
-
</Form.Group>
|
|
38
|
-
|
|
39
|
-
<Form.Group className="custom-checkbox">
|
|
40
|
-
<Form.Check custom type="checkbox" id={onCalendarCheckboxId}>
|
|
41
|
-
<Form.Check.Input
|
|
42
|
-
type="checkbox"
|
|
43
|
-
value="onCalendar"
|
|
44
|
-
{...register(name)}
|
|
45
|
-
/>
|
|
46
|
-
<Form.Check.Label>{t("onCalendar")}</Form.Check.Label>
|
|
47
|
-
</Form.Check>
|
|
48
|
-
</Form.Group>
|
|
49
|
-
|
|
50
|
-
<Form.Group className="custom-checkbox">
|
|
51
|
-
<Form.Check custom type="checkbox" id={onProductSetsCheckboxId}>
|
|
52
|
-
<Form.Check.Input
|
|
53
|
-
type="checkbox"
|
|
54
|
-
value="onProductSets"
|
|
55
|
-
{...register(name)}
|
|
56
|
-
/>
|
|
57
|
-
<Form.Check.Label>{t("onProductSets")}</Form.Check.Label>
|
|
58
|
-
</Form.Check>
|
|
59
|
-
</Form.Group>
|
|
60
|
-
|
|
61
|
-
<div className="divider" />
|
|
62
|
-
</div>
|
|
63
|
-
);
|
|
64
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CheckboxGroup } from "./CheckboxGroup";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { ImageRadioInput, ImageRadioInputProps } from "./ImageRadioInput";
|
|
4
|
-
import { ReactComponent as MonthIcon } from "../../assets/widgets/monthCalendar.svg";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Widgets / Image Radio Input",
|
|
8
|
-
component: ImageRadioInput,
|
|
9
|
-
} as Meta;
|
|
10
|
-
|
|
11
|
-
export const Default: Story<ImageRadioInputProps> = (args) => {
|
|
12
|
-
return <ImageRadioInput {...args} />;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
Default.args = {
|
|
16
|
-
img: <MonthIcon />,
|
|
17
|
-
label: "Month",
|
|
18
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { Form } from "react-bootstrap";
|
|
3
|
-
import { useFormContext } from "react-hook-form";
|
|
4
|
-
import { WidgetBuilderFormModel } from "../WidgetBuilderForm/WidgetBuilderForm";
|
|
5
|
-
|
|
6
|
-
export type ImageRadioInputProps = {
|
|
7
|
-
img: ReactNode;
|
|
8
|
-
label: string;
|
|
9
|
-
name: keyof Partial<
|
|
10
|
-
Pick<WidgetBuilderFormModel, "calendarStyle" | "bookingWidgetStyle">
|
|
11
|
-
>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const ImageRadioInput = ({ img, label, name }: ImageRadioInputProps) => {
|
|
15
|
-
const { register } = useFormContext<WidgetBuilderFormModel>();
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Form.Check className="image-radio-input">
|
|
19
|
-
<Form.Check.Label className="image-radio-input-wrapper">
|
|
20
|
-
{img}
|
|
21
|
-
|
|
22
|
-
<div className="image-radio-input-label">
|
|
23
|
-
<Form.Check.Input type="radio" value={label} {...register(name)} />
|
|
24
|
-
<span>{label}</span>
|
|
25
|
-
</div>
|
|
26
|
-
</Form.Check.Label>
|
|
27
|
-
</Form.Check>
|
|
28
|
-
);
|
|
29
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { ProductSetSelector } from "./ProductSetSelector";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Product Set Selector",
|
|
7
|
-
component: ProductSetSelector,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story = (args) => {
|
|
11
|
-
return <ProductSetSelector {...args} />;
|
|
12
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Button, Form } from "react-bootstrap";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { ReactComponent as Icon } from "../../assets/widgets/circlePlus.svg";
|
|
5
|
-
|
|
6
|
-
export const ProductSetSelector = () => {
|
|
7
|
-
const { t } = useTranslation("Design");
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div className="widget-builder-product-set-selector">
|
|
11
|
-
<h4>{t("productSet")}</h4>
|
|
12
|
-
<p>{t("widgetBuilderProductSetDescription")}</p>
|
|
13
|
-
|
|
14
|
-
<Form.Group>
|
|
15
|
-
<Form.Control as="select">
|
|
16
|
-
<option>{1}</option>
|
|
17
|
-
<option>{2}</option>
|
|
18
|
-
</Form.Control>
|
|
19
|
-
</Form.Group>
|
|
20
|
-
|
|
21
|
-
<Button className="">
|
|
22
|
-
<Icon type="circle-plus" />
|
|
23
|
-
{t("addProductSets")}
|
|
24
|
-
</Button>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ProductSetSelector } from "./ProductSetSelector";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Meta, Story } from "@storybook/react";
|
|
4
|
-
import { SnippetCode, SnippetCodeProps } from "./SnippetCode";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Widgets / Snippet Code",
|
|
8
|
-
component: SnippetCode,
|
|
9
|
-
} as Meta;
|
|
10
|
-
|
|
11
|
-
export const Default: Story<SnippetCodeProps> = (args) => {
|
|
12
|
-
return <SnippetCode {...args} />;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
Default.args = {
|
|
16
|
-
code: '<iframe width="1238" height="696" src="https://www.youtube.com/embed/Kddw5pV7RZ0" title="Short Booked it software overview." frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />',
|
|
17
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Button } from "react-bootstrap";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { ReactComponent as CopyIcon } from "../../assets/widgets/copy.svg";
|
|
5
|
-
|
|
6
|
-
export type SnippetCodeProps = {
|
|
7
|
-
code: string;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const copyCode = (code: string) => window.navigator.clipboard.writeText(code);
|
|
11
|
-
|
|
12
|
-
export const SnippetCode = ({ code }: SnippetCodeProps) => {
|
|
13
|
-
const { t } = useTranslation("Design");
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div className="widget-designer-snippet-code">
|
|
17
|
-
<h4>{t("codeSnippet")}</h4>
|
|
18
|
-
|
|
19
|
-
<p className="code-container">{code}</p>
|
|
20
|
-
|
|
21
|
-
<Button onClick={() => copyCode(code)}>
|
|
22
|
-
{t("copyCode")}
|
|
23
|
-
<CopyIcon />
|
|
24
|
-
</Button>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SnippetCode } from "./SnippetCode";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { WidgetBuilderForm } from "./WidgetBuilderForm";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Widget Builder Form",
|
|
7
|
-
component: WidgetBuilderForm,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story = (args) => {
|
|
11
|
-
return <WidgetBuilderForm {...args} />;
|
|
12
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Button, Col, Form, Row } from "react-bootstrap";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { useForm, FormProvider } from "react-hook-form";
|
|
5
|
-
import { WidgetTypeSelector } from "../WidgetTypeSelector/WidgetTypeSelector";
|
|
6
|
-
import { CheckboxGroup } from "../CheckboxGroup";
|
|
7
|
-
import { CalendarStyleSelector } from "../CalendarStyleSelector";
|
|
8
|
-
import { BookingStyleSelector } from "../BookingStyleSelector";
|
|
9
|
-
import { ProductSetSelector } from "../ProductSetSelector";
|
|
10
|
-
import { SnippetCode } from "../SnippetCode";
|
|
11
|
-
|
|
12
|
-
export type WidgetBuilderFormModel = {
|
|
13
|
-
name: string;
|
|
14
|
-
widgetType: string;
|
|
15
|
-
calendarStyle: string;
|
|
16
|
-
includeFromPrice: string[];
|
|
17
|
-
includeAvailability: string[];
|
|
18
|
-
productSets: string[];
|
|
19
|
-
bookingWidgetStyle: string;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const WidgetBuilderForm = () => {
|
|
23
|
-
const { t } = useTranslation("Design");
|
|
24
|
-
|
|
25
|
-
const form = useForm<WidgetBuilderFormModel>({ mode: "onChange" });
|
|
26
|
-
|
|
27
|
-
const onSubmit = () => null;
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<FormProvider {...form}>
|
|
31
|
-
<Row
|
|
32
|
-
as="form"
|
|
33
|
-
className="widget-builder-form"
|
|
34
|
-
onSubmit={form.handleSubmit(onSubmit)}
|
|
35
|
-
>
|
|
36
|
-
<Col lg={6} md={6}>
|
|
37
|
-
<h2>{t("eventPageOverlay")}</h2>
|
|
38
|
-
|
|
39
|
-
<Form.Group>
|
|
40
|
-
<Form.Label>{t("name")}</Form.Label>
|
|
41
|
-
<Form.Control type="text" {...form.register("name")} />
|
|
42
|
-
</Form.Group>
|
|
43
|
-
|
|
44
|
-
<WidgetTypeSelector />
|
|
45
|
-
|
|
46
|
-
<h3 className="widget-builder-form-customizations">
|
|
47
|
-
{t("customizations")}
|
|
48
|
-
</h3>
|
|
49
|
-
|
|
50
|
-
<CalendarStyleSelector />
|
|
51
|
-
|
|
52
|
-
<CheckboxGroup
|
|
53
|
-
heading={t("includeFromPrice")}
|
|
54
|
-
name="includeFromPrice"
|
|
55
|
-
/>
|
|
56
|
-
<CheckboxGroup
|
|
57
|
-
heading={t("includeAvailability")}
|
|
58
|
-
name="includeAvailability"
|
|
59
|
-
/>
|
|
60
|
-
|
|
61
|
-
<ProductSetSelector />
|
|
62
|
-
</Col>
|
|
63
|
-
|
|
64
|
-
<Col lg={5} md={5} className="widget-builder-right-column">
|
|
65
|
-
<div className="widget-builder-form-grey">
|
|
66
|
-
<BookingStyleSelector />
|
|
67
|
-
|
|
68
|
-
<div>
|
|
69
|
-
<h4>{t("stylingTemplate")}</h4>
|
|
70
|
-
|
|
71
|
-
<Form.Group>
|
|
72
|
-
<Form.Control as="select" />
|
|
73
|
-
</Form.Group>
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
|
-
<SnippetCode code="" />
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<Button type="submit">{t("saveAndClose")}</Button>
|
|
80
|
-
</Col>
|
|
81
|
-
</Row>
|
|
82
|
-
</FormProvider>
|
|
83
|
-
);
|
|
84
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { WidgetTypeRadio, WidgetTypeRadioProps } from "./WidgetTypeRadio";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Type Radio Selector",
|
|
7
|
-
component: WidgetTypeRadio,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story<WidgetTypeRadioProps> = (args) => {
|
|
11
|
-
return <WidgetTypeRadio {...args} />;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
Default.args = {
|
|
15
|
-
label: "Venue Map",
|
|
16
|
-
description: ["Date", "Floor", "Table", "Product Sets", "Checkout"],
|
|
17
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Form } from "react-bootstrap";
|
|
3
|
-
import { useFormContext } from "react-hook-form";
|
|
4
|
-
import { WidgetBuilderFormModel } from "../WidgetBuilderForm/WidgetBuilderForm";
|
|
5
|
-
|
|
6
|
-
export type WidgetTypeRadioProps = {
|
|
7
|
-
label: string;
|
|
8
|
-
description: string[];
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const prepareDescription = (description: string[]) =>
|
|
12
|
-
description.map((item, index) => {
|
|
13
|
-
if (index === 0) return item;
|
|
14
|
-
return `> ${item}`;
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const WidgetTypeRadio = ({
|
|
18
|
-
label,
|
|
19
|
-
description,
|
|
20
|
-
}: WidgetTypeRadioProps) => {
|
|
21
|
-
const { register } = useFormContext<WidgetBuilderFormModel>();
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<Form.Check className="widget-type-radio">
|
|
25
|
-
<Form.Check.Label>
|
|
26
|
-
<div className="widget-type-radio-controls">
|
|
27
|
-
<Form.Check.Input
|
|
28
|
-
type="radio"
|
|
29
|
-
value={label}
|
|
30
|
-
{...register("widgetType")}
|
|
31
|
-
/>
|
|
32
|
-
<span>{label}</span>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<p className="widget-type-radio-description">
|
|
36
|
-
{prepareDescription(description).map((item) => (
|
|
37
|
-
<span key={item}> {item}</span>
|
|
38
|
-
))}
|
|
39
|
-
</p>
|
|
40
|
-
</Form.Check.Label>
|
|
41
|
-
</Form.Check>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { WidgetTypeRadio } from "./WidgetTypeRadio";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Meta, Story } from "@storybook/react";
|
|
3
|
-
import { WidgetTypeSelector } from "./WidgetTypeSelector";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Widgets / Widget Type Selector",
|
|
7
|
-
component: WidgetTypeSelector,
|
|
8
|
-
} as Meta;
|
|
9
|
-
|
|
10
|
-
export const Default: Story = (args) => {
|
|
11
|
-
return <WidgetTypeSelector {...args} />;
|
|
12
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useTranslation } from "react-i18next";
|
|
3
|
-
import { Form } from "react-bootstrap";
|
|
4
|
-
import { WidgetTypeRadio } from "../WidgetTypeRadio";
|
|
5
|
-
|
|
6
|
-
const venueMapDescription = [
|
|
7
|
-
"date",
|
|
8
|
-
"floor",
|
|
9
|
-
"table",
|
|
10
|
-
"productSets",
|
|
11
|
-
"checkout",
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
export const WidgetTypeSelector = () => {
|
|
15
|
-
const { t } = useTranslation("Design");
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<div className="widget-type-selector">
|
|
19
|
-
<Form.Label>{t("selectBookingType")}</Form.Label>
|
|
20
|
-
|
|
21
|
-
<WidgetTypeRadio
|
|
22
|
-
label={t("eventList")}
|
|
23
|
-
description={[t("eventListing")]}
|
|
24
|
-
/>
|
|
25
|
-
|
|
26
|
-
<WidgetTypeRadio
|
|
27
|
-
label={t("venueMap")}
|
|
28
|
-
description={venueMapDescription.map((item) => t(item))}
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
);
|
|
32
|
-
};
|