@licklist/design 0.50.1-dev.9 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/dashboard/addImage.svg.js +1 -1
- package/dist/assets/dashboard/chartBar.svg.js +1 -1
- package/dist/assets/dashboard/genderFemale.svg.js +1 -1
- package/dist/assets/dashboard/genderMale.svg.js +1 -1
- package/dist/assets/dashboard/increment.svg.js +1 -1
- package/dist/assets/dashboard/info.svg.js +1 -1
- package/dist/assets/dashboard/managerRole.svg.js +1 -1
- package/dist/assets/dashboard/subManagerRole.svg.js +1 -1
- package/dist/assets/dashboard/viewerRole.svg.js +1 -1
- package/dist/assets/dashboard/visitedProviderLink.svg.js +1 -1
- package/dist/assets/dashboard/warning.svg.js +1 -1
- package/dist/assets/editor/bold.svg.js +1 -1
- package/dist/assets/editor/double-quotes-l.svg.js +1 -1
- package/dist/assets/editor/format-clear.svg.js +1 -1
- package/dist/assets/editor/h1.svg.js +1 -1
- package/dist/assets/editor/h2.svg.js +1 -1
- package/dist/assets/editor/italic.svg.js +1 -1
- package/dist/assets/editor/paragraph.svg.js +1 -1
- package/dist/assets/editor/separator.svg.js +1 -1
- package/dist/assets/editor/strikethrough.svg.js +1 -1
- package/dist/assets/editor/text-wrap.svg.js +1 -1
- package/dist/assets/iframe/available.svg.js +1 -1
- package/dist/assets/iframe/calendar.svg.js +1 -1
- package/dist/assets/iframe/clock.svg.js +1 -1
- package/dist/assets/iframe/close.svg.js +1 -1
- package/dist/assets/iframe/limited.svg.js +1 -1
- package/dist/assets/iframe/selectArrow.svg.js +1 -1
- package/dist/assets/iframe/soldOut.svg.js +1 -1
- package/dist/assets/iframe/success.svg.js +1 -1
- package/dist/assets/iframe/ticket.svg.js +1 -1
- package/dist/assets/logo/bookedit.svg.js +1 -1
- package/dist/assets/logo/licklist.sm.svg.js +1 -1
- package/dist/assets/logo/licklist.svg.js +1 -1
- package/dist/calendar/Calendar.d.ts +0 -3
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/calendar/utils/index.d.ts +1 -2
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +1 -1
- package/dist/date-time-button/DateTimeButton.d.ts +2 -3
- 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-card/EventCard.d.ts +1 -2
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
- package/dist/iframe/event/event-booking-products/EventBookingProducts.js +1 -1
- package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts +2 -2
- package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
- 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/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/components/ProductSummary/ProductSummary.d.ts +1 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts +1 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -1
- 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/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +2 -3
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
- 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/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/manual-booking/select-event/SelectEvent.d.ts.map +1 -1
- package/dist/sales/manual-booking/select-event/SelectEvent.js +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -2
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
- package/dist/static/date-range-input/DateRangeInput.js +1 -1
- package/dist/styles/affiliate/AffiliateCard.scss +6 -26
- package/dist/styles/events/EventCard.scss +6 -3
- package/dist/styles/product-set/ProductSetCard.scss +0 -4
- package/dist/styles/resources-blocking/_index.scss +0 -6
- package/dist/styles/sales/BookingFilter.scss +0 -18
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +5 -63
- package/dist/styles/sales/LifeTimeSales.scss +0 -1
- package/dist/styles/sales/ManualBooking.scss +3 -62
- package/dist/styles/sales/SourceOfSales.scss +0 -3
- package/dist/styles/snippet-templates/SnippetTemplateCard.scss +2 -3
- package/dist/styles/static/Tabs.scss +0 -6
- package/dist/styles/themes/bookedit/_index.scss +8 -9
- package/dist/table/TableHelperComponent.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/calendar/Calendar.tsx +0 -5
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +3 -3
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +2 -5
- package/src/calendar/utils/index.ts +6 -15
- package/src/date-time-button/DateTimeButton.tsx +3 -16
- package/src/events/edit-event-modal/IntervalInput.tsx +80 -8
- package/src/events/event-card/EventCard.stories.tsx +0 -1
- package/src/events/event-card/EventCard.tsx +2 -27
- package/src/iframe/event/event-booking-products/EventBookingProducts.tsx +1 -1
- package/src/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.tsx +8 -8
- package/src/iframe/event/event-card/IframeEventCard.tsx +1 -3
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +5 -5
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +0 -2
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +6 -12
- package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +2 -5
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +4 -2
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +23 -13
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +5 -11
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +1 -1
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +15 -5
- package/src/sales/booking/results/components/ResultCard.tsx +4 -6
- package/src/sales/manual-booking/select-event/SelectEvent.tsx +1 -4
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +1 -9
- package/src/static/date-range-input/DateRangeInput.tsx +2 -23
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/affiliate/AffiliateCard.scss +6 -26
- package/src/styles/events/EventCard.scss +6 -3
- package/src/styles/product-set/ProductSetCard.scss +0 -4
- package/src/styles/resources-blocking/_index.scss +0 -6
- package/src/styles/sales/BookingFilter.scss +0 -18
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +5 -63
- package/src/styles/sales/LifeTimeSales.scss +0 -1
- package/src/styles/sales/ManualBooking.scss +3 -62
- package/src/styles/sales/SourceOfSales.scss +0 -3
- package/src/styles/snippet-templates/SnippetTemplateCard.scss +2 -3
- package/src/styles/static/Tabs.scss +0 -6
- package/src/styles/themes/bookedit/_index.scss +8 -9
- package/src/table/TableHelperComponent.tsx +13 -11
- package/dist/events/edit-event-modal/hooks/index.d.ts +0 -3
- package/dist/events/edit-event-modal/hooks/index.d.ts.map +0 -1
- package/dist/events/edit-event-modal/hooks/useFormattedDuration.d.ts +0 -2
- package/dist/events/edit-event-modal/hooks/useFormattedDuration.d.ts.map +0 -1
- package/dist/events/edit-event-modal/hooks/useFormattedDuration.js +0 -1
- package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts +0 -11
- package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts.map +0 -1
- package/dist/events/edit-event-modal/hooks/useValidationOptions.js +0 -1
- package/src/events/edit-event-modal/hooks/index.ts +0 -2
- package/src/events/edit-event-modal/hooks/useFormattedDuration.tsx +0 -40
- package/src/events/edit-event-modal/hooks/useValidationOptions.tsx +0 -36
|
@@ -173,18 +173,20 @@ function TableHelperComponent(props: TableHelperComponentProps) {
|
|
|
173
173
|
};
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
} else if (filteredOrdersOptions) {
|
|
177
|
-
filteredOrdersOptions((prevOptions) => ({
|
|
178
|
-
...prevOptions,
|
|
179
|
-
sortKey: key,
|
|
180
|
-
sortDirection: nextDirection,
|
|
181
|
-
}));
|
|
182
176
|
} else {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
177
|
+
if (filteredOrdersOptions) {
|
|
178
|
+
filteredOrdersOptions((prevOptions) => ({
|
|
179
|
+
...prevOptions,
|
|
180
|
+
sortKey: key,
|
|
181
|
+
sortDirection: nextDirection,
|
|
182
|
+
}));
|
|
183
|
+
} else {
|
|
184
|
+
setOptions((prevOptions) => ({
|
|
185
|
+
...prevOptions,
|
|
186
|
+
sortKey: key,
|
|
187
|
+
sortDirection: nextDirection,
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
188
190
|
}
|
|
189
191
|
};
|
|
190
192
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFormattedDuration.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/hooks/useFormattedDuration.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,cAiChC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),u=((e=r)&&"object"==typeof e&&"default"in e&&e.default,require("react-hook-form")),n=require("luxon"),o=require("react-intl");exports.useFormattedDuration=function(){var e=u.useFormContext().control,a=u.useWatch({control:e,name:"start"}),i=u.useWatch({control:e,name:"end"}),s=o.useIntl(),l=s.formatList,m=s.formatNumber,f=r.useMemo((function(){var e=n.Interval.fromDateTimes(n.DateTime.fromISO(a),n.DateTime.fromISO(i)).toDuration(["days","hours","minutes"]);if(e.isValid){var r=function(e,t){return m(e,{style:"unit",unit:t,unitDisplay:"long"})},u=[[e.days,"day"],[e.hours,"hour"],[e.minutes,"minute"]].filter((function(e){return t.__read(e,1)[0]}));return l(u.map((function(e){return r.apply(void 0,t.__spreadArray([],t.__read(e),!1))})),{style:"long",type:"unit"})}}),[a,i]);return f};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const useValidationOptions: () => {
|
|
2
|
-
start: {
|
|
3
|
-
required: string;
|
|
4
|
-
validate: (value: any) => string | true;
|
|
5
|
-
};
|
|
6
|
-
end: {
|
|
7
|
-
required: string;
|
|
8
|
-
validate: (value: any) => string | true;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=useValidationOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useValidationOptions.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/hooks/useValidationOptions.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;;;;;;;CA+BhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react-i18next"),t=require("react-hook-form"),i=require("luxon");exports.useValidationOptions=function(){var r=t.useFormContext().control,a=e.useTranslation(["Design","Validation"]).t,n=t.useWatch({control:r,name:"start"});return{start:{required:a("Validation:fieldRequired",{attribute:a("start")}),validate:function(e){return i.DateTime.fromISO(e).diffNow().toMillis()>0||a("Validation:fieldValidEventStart")}},end:{required:a("Validation:fieldRequired",{attribute:a("end")}),validate:function(e){return!e||(i.DateTime.fromISO(e).diff(i.DateTime.fromISO(n)).toMillis()>0||a("Validation:fieldValidEventEnd"))}}}};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { useFormContext, useWatch } from "react-hook-form";
|
|
3
|
-
import { useIntl } from "react-intl";
|
|
4
|
-
import { DateTime, Interval } from "luxon";
|
|
5
|
-
import { IntervalInputValues } from "../IntervalInput";
|
|
6
|
-
|
|
7
|
-
export const useFormattedDuration = () => {
|
|
8
|
-
const { control } = useFormContext<IntervalInputValues>();
|
|
9
|
-
const start = useWatch({ control, name: "start" });
|
|
10
|
-
const end = useWatch({ control, name: "end" });
|
|
11
|
-
const { formatList, formatNumber } = useIntl();
|
|
12
|
-
|
|
13
|
-
const duration = useMemo(() => {
|
|
14
|
-
const interval = Interval.fromDateTimes(
|
|
15
|
-
DateTime.fromISO(start),
|
|
16
|
-
DateTime.fromISO(end)
|
|
17
|
-
).toDuration(["days", "hours", "minutes"]);
|
|
18
|
-
|
|
19
|
-
if (!interval.isValid) return undefined;
|
|
20
|
-
|
|
21
|
-
const formatUnit = (value: number, unit: string) =>
|
|
22
|
-
formatNumber(value, { style: "unit", unit, unitDisplay: "long" });
|
|
23
|
-
|
|
24
|
-
const units = (
|
|
25
|
-
[
|
|
26
|
-
[interval.days, "day"],
|
|
27
|
-
[interval.hours, "hour"],
|
|
28
|
-
[interval.minutes, "minute"],
|
|
29
|
-
] as Parameters<typeof formatUnit>[]
|
|
30
|
-
).filter(([value]) => value);
|
|
31
|
-
|
|
32
|
-
return formatList(
|
|
33
|
-
units.map((args) => formatUnit(...args)),
|
|
34
|
-
{ style: "long", type: "unit" }
|
|
35
|
-
);
|
|
36
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
-
}, [start, end]);
|
|
38
|
-
|
|
39
|
-
return duration;
|
|
40
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
|
-
import { useFormContext, useWatch } from "react-hook-form";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
|
|
5
|
-
export const useValidationOptions = () => {
|
|
6
|
-
const { control } = useFormContext();
|
|
7
|
-
const { t } = useTranslation(["Design", "Validation"]);
|
|
8
|
-
const start = useWatch({ control, name: "start" });
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
start: {
|
|
12
|
-
required: t("Validation:fieldRequired", {
|
|
13
|
-
attribute: t("start"),
|
|
14
|
-
}) as string,
|
|
15
|
-
// TODO: uncomment when event splitting is implemented
|
|
16
|
-
// and extract into plugins
|
|
17
|
-
validate: (value) =>
|
|
18
|
-
DateTime.fromISO(value).diffNow().toMillis() > 0 ||
|
|
19
|
-
(t("Validation:fieldValidEventStart") as string),
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
end: {
|
|
23
|
-
required: t("Validation:fieldRequired", {
|
|
24
|
-
attribute: t("end"),
|
|
25
|
-
}) as string,
|
|
26
|
-
// TODO: uncomment when event splitting is implemented
|
|
27
|
-
// and extract into plugins
|
|
28
|
-
validate: (value) =>
|
|
29
|
-
// endAt not required
|
|
30
|
-
value
|
|
31
|
-
? DateTime.fromISO(value).diff(DateTime.fromISO(start)).toMillis() >
|
|
32
|
-
0 || (t("Validation:fieldValidEventEnd") as string)
|
|
33
|
-
: true,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
};
|