@licklist/design 0.70.6 → 0.70.8-dev.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/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/assets/iframe/available.svg +4 -4
- package/dist/assets/iframe/available.svg.js +16 -18
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +4 -2
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -1
- package/dist/availability-indicator/AvailabilityIndicator.js +112 -18
- package/dist/calendar/Calendar.d.ts +2 -0
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +3 -2
- package/dist/calendar/utils/index.d.ts +8 -2
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +9 -21
- package/dist/date-time-button/DateContent.d.ts.map +1 -1
- package/dist/date-time-button/DateContent.js +3 -3
- package/dist/date-time-button/DateTimeButton.d.ts +3 -1
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +5 -3
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -2
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +1 -0
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
- package/dist/iframe/activity-card/ActivityCard.d.ts +3 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +5 -3
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +43 -32
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +25 -12
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +4 -5
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +3 -0
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +48 -2
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +1 -1
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +0 -2
- package/dist/product-set/form/ProductsControl.js +1 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +0 -3
- package/dist/product-set/form/VenueMapSetModal.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapSetModal.js +7 -7
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +3 -0
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +3 -0
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +3 -0
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +21 -0
- package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.js +16 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +11 -3
- package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +10 -4
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +3 -0
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +3 -0
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +3 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
- package/dist/styles/date-time-button/DateTimeButton.scss +2 -1
- package/dist/styles/iframe-events/TicketDescription.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +22 -0
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/tiptap-editor/TipTapEditor.d.ts +2 -1
- package/dist/tiptap-editor/TipTapEditor.d.ts.map +1 -1
- package/dist/tiptap-editor/TipTapEditor.js +32 -2
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +3 -0
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +3 -0
- package/package.json +8 -6
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/assets/iframe/available.svg +4 -4
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/availability-indicator/AvailabilityIndicator.tsx +92 -17
- package/src/calendar/Calendar.tsx +2 -0
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +3 -0
- package/src/calendar/utils/index.ts +17 -26
- package/src/date-time-button/DateContent.tsx +3 -3
- package/src/date-time-button/DateTimeButton.tsx +7 -3
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
- package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
- package/src/iframe/activity-card/ActivityCard.tsx +15 -2
- package/src/iframe/event/ticket-description/TicketDescription.tsx +35 -22
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/iframe/ryft/RyftPaymentForm.tsx +14 -3
- package/src/iframe/ryft/utils/ryft-form.ts +6 -5
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
- package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
- package/src/product-set/form/ProductSetForm.tsx +6 -2
- package/src/product-set/form/ProductZonesControl.tsx +1 -4
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/product-set/form/SubProductsControl.tsx +0 -3
- package/src/product-set/form/VenueMapSetModal.tsx +8 -9
- package/src/product-set/form/VenueMapsControl.tsx +0 -3
- package/src/product-set/product/ProductControl.tsx +0 -1
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
- package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
- package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
- package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
- package/src/resource/form/components/CapacityControl.tsx +1 -0
- package/src/resource/form/components/SortControl.tsx +1 -0
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
- package/src/setting/admin/PaymentFeeForm.tsx +5 -0
- package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +13 -5
- package/src/sortable-tree/SortableTreeItem.tsx +6 -0
- package/src/static/CurrencyNumberInput.tsx +1 -0
- package/src/static/form-number-input/FormNumberInput.tsx +1 -0
- package/src/static/number-input/NumberInput.tsx +1 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
- package/src/styles/date-time-button/DateTimeButton.scss +2 -1
- package/src/styles/iframe-events/TicketDescription.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +22 -0
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/tiptap-editor/TipTapEditor.tsx +8 -1
- package/src/zone/form/components/GameDurationControl.tsx +1 -0
- package/src/zone/form/components/SortControl.tsx +1 -0
- package/yarn.lock +53 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffiliateForm.d.ts","sourceRoot":"","sources":["../../../src/affiliate/form/AffiliateForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAA;AAEtF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGpE,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,oBAAoB,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,aAAa,8DAKvB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"AffiliateForm.d.ts","sourceRoot":"","sources":["../../../src/affiliate/form/AffiliateForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAA;AAEtF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGpE,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,oBAAoB,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,aAAa,8DAKvB,kBAAkB,4CA+FpB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
4
|
-
<rect x="
|
|
1
|
+
<svg viewBox="auto" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="14%" y="0" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
3
|
+
<rect x="14%" y="33%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
4
|
+
<rect x="14%" y="66%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
5
5
|
</svg>
|
|
@@ -4,33 +4,31 @@ var _rect, _rect2, _rect3;
|
|
|
4
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
5
|
const SvgAvailable = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fill: "none"
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "auto"
|
|
10
9
|
}, props), _rect || (_rect = /*#__PURE__*/React.createElement("rect", {
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
13
|
-
x:
|
|
14
|
-
y: 1.037,
|
|
10
|
+
width: "63%",
|
|
11
|
+
height: "29%",
|
|
12
|
+
x: "14%",
|
|
15
13
|
fill: "#4CF973",
|
|
16
14
|
stroke: "#fff",
|
|
17
|
-
rx:
|
|
15
|
+
rx: "15%"
|
|
18
16
|
})), _rect2 || (_rect2 = /*#__PURE__*/React.createElement("rect", {
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
21
|
-
x:
|
|
22
|
-
y:
|
|
17
|
+
width: "63%",
|
|
18
|
+
height: "29%",
|
|
19
|
+
x: "14%",
|
|
20
|
+
y: "33%",
|
|
23
21
|
fill: "#4CF973",
|
|
24
22
|
stroke: "#fff",
|
|
25
|
-
rx:
|
|
23
|
+
rx: "15%"
|
|
26
24
|
})), _rect3 || (_rect3 = /*#__PURE__*/React.createElement("rect", {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
29
|
-
x:
|
|
30
|
-
y:
|
|
25
|
+
width: "63%",
|
|
26
|
+
height: "29%",
|
|
27
|
+
x: "14%",
|
|
28
|
+
y: "66%",
|
|
31
29
|
fill: "#4CF973",
|
|
32
30
|
stroke: "#fff",
|
|
33
|
-
rx:
|
|
31
|
+
rx: "15%"
|
|
34
32
|
})));
|
|
35
33
|
|
|
36
34
|
export { SvgAvailable as ReactComponent };
|
|
@@ -203,9 +203,10 @@ var LoginComponent = function(param) {
|
|
|
203
203
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
204
204
|
var userApiService = useUserApi(request);
|
|
205
205
|
var handleError = function(error) {
|
|
206
|
+
var _error_response_data, _error_response;
|
|
206
207
|
notification.danger({
|
|
207
208
|
title: 'Error',
|
|
208
|
-
message: error.message
|
|
209
|
+
message: (error === null || error === void 0 ? void 0 : (_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message) || error.message
|
|
209
210
|
});
|
|
210
211
|
};
|
|
211
212
|
var storeSecrets = function(secrets) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
2
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
2
3
|
type AvailabilityIndicatorProps = {
|
|
3
|
-
resources
|
|
4
|
+
resources?: ZoneResourcesAvailability;
|
|
4
5
|
isUnavailable?: boolean;
|
|
5
6
|
isSoldOut?: boolean;
|
|
7
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
6
8
|
};
|
|
7
|
-
export declare const AvailabilityIndicator: ({ resources, isUnavailable, isSoldOut, }: AvailabilityIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const AvailabilityIndicator: ({ resources, isUnavailable, isSoldOut: _isSoldOut, availabilityFormat, }: AvailabilityIndicatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=AvailabilityIndicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvailabilityIndicator.d.ts","sourceRoot":"","sources":["../../src/availability-indicator/AvailabilityIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;
|
|
1
|
+
{"version":3,"file":"AvailabilityIndicator.d.ts","sourceRoot":"","sources":["../../src/availability-indicator/AvailabilityIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAEL,kBAAkB,EACnB,MAAM,2DAA2D,CAAA;AAuFlE,KAAK,0BAA0B,GAAG;IAChC,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,qBAAqB,6EAK/B,0BAA0B,4CAwB5B,CAAA"}
|
|
@@ -1,40 +1,117 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { AVAILABILITY_FORMAT_NUMBER } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
4
|
+
import { useWindowDimensions } from '@licklist/plugins';
|
|
3
5
|
import { ReactComponent as SvgAvailable } from '../assets/iframe/available.svg.js';
|
|
4
6
|
import { ReactComponent as SvgLimited } from '../assets/iframe/limited.svg.js';
|
|
5
7
|
import { ReactComponent as SvgSoldOut } from '../assets/iframe/soldOut.svg.js';
|
|
8
|
+
import { TAB_WIDTH } from '../iframe/page/components/PageBody/constants.js';
|
|
6
9
|
|
|
10
|
+
function _define_property(obj, key, value) {
|
|
11
|
+
if (key in obj) {
|
|
12
|
+
Object.defineProperty(obj, key, {
|
|
13
|
+
value: value,
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true
|
|
17
|
+
});
|
|
18
|
+
} else {
|
|
19
|
+
obj[key] = value;
|
|
20
|
+
}
|
|
21
|
+
return obj;
|
|
22
|
+
}
|
|
23
|
+
function _object_spread(target) {
|
|
24
|
+
for(var i = 1; i < arguments.length; i++){
|
|
25
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
26
|
+
var ownKeys = Object.keys(source);
|
|
27
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
28
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
29
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
ownKeys.forEach(function(key) {
|
|
33
|
+
_define_property(target, key, source[key]);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
}
|
|
38
|
+
function ownKeys(object, enumerableOnly) {
|
|
39
|
+
var keys = Object.keys(object);
|
|
40
|
+
if (Object.getOwnPropertySymbols) {
|
|
41
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
42
|
+
if (enumerableOnly) {
|
|
43
|
+
symbols = symbols.filter(function(sym) {
|
|
44
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
keys.push.apply(keys, symbols);
|
|
48
|
+
}
|
|
49
|
+
return keys;
|
|
50
|
+
}
|
|
51
|
+
function _object_spread_props(target, source) {
|
|
52
|
+
source = source != null ? source : {};
|
|
53
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
54
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
55
|
+
} else {
|
|
56
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
57
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return target;
|
|
61
|
+
}
|
|
7
62
|
var LOTS_OF_SPACE_LIMIT = 0.2;
|
|
8
63
|
var LIMITED_LIMIT = 0.8;
|
|
9
|
-
var
|
|
10
|
-
var bookedResources = param.bookedResources, totalResources = param.totalResources;
|
|
11
|
-
|
|
64
|
+
var getLabelsWithArgument = function(param) {
|
|
65
|
+
var bookedResources = param.bookedResources, totalResources = param.totalResources, availabilityFormat = param.availabilityFormat, label = param.label;
|
|
66
|
+
var availableResources = totalResources - bookedResources;
|
|
67
|
+
if (availabilityFormat !== AVAILABILITY_FORMAT_NUMBER) {
|
|
12
68
|
return {
|
|
13
|
-
label:
|
|
14
|
-
Icon: SvgSoldOut
|
|
69
|
+
label: label
|
|
15
70
|
};
|
|
16
71
|
}
|
|
72
|
+
return availableResources === 1 ? {
|
|
73
|
+
label: 'availableSingleSpace'
|
|
74
|
+
} : {
|
|
75
|
+
label: 'availableMultipleSpaces',
|
|
76
|
+
argument: availableResources
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
var getIconsAndLabelsWithArgument = function(param) {
|
|
80
|
+
var bookedResources = param.bookedResources, totalResources = param.totalResources, availabilityFormat = param.availabilityFormat;
|
|
17
81
|
// lots of space if less than 80% booked
|
|
18
82
|
if (bookedResources / totalResources <= LOTS_OF_SPACE_LIMIT) {
|
|
19
|
-
return {
|
|
20
|
-
|
|
83
|
+
return _object_spread_props(_object_spread({}, getLabelsWithArgument({
|
|
84
|
+
bookedResources: bookedResources,
|
|
85
|
+
totalResources: totalResources,
|
|
86
|
+
availabilityFormat: availabilityFormat,
|
|
87
|
+
label: 'lotsOfSpace'
|
|
88
|
+
})), {
|
|
21
89
|
Icon: SvgAvailable
|
|
22
|
-
};
|
|
90
|
+
});
|
|
23
91
|
}
|
|
24
92
|
if (bookedResources / totalResources >= LIMITED_LIMIT) {
|
|
25
|
-
return {
|
|
26
|
-
|
|
93
|
+
return _object_spread_props(_object_spread({}, getLabelsWithArgument({
|
|
94
|
+
bookedResources: bookedResources,
|
|
95
|
+
totalResources: totalResources,
|
|
96
|
+
availabilityFormat: availabilityFormat,
|
|
97
|
+
label: 'limited'
|
|
98
|
+
})), {
|
|
27
99
|
Icon: SvgLimited
|
|
28
|
-
};
|
|
100
|
+
});
|
|
29
101
|
}
|
|
30
|
-
return {
|
|
31
|
-
|
|
102
|
+
return _object_spread_props(_object_spread({}, getLabelsWithArgument({
|
|
103
|
+
bookedResources: bookedResources,
|
|
104
|
+
totalResources: totalResources,
|
|
105
|
+
availabilityFormat: availabilityFormat,
|
|
106
|
+
label: 'available'
|
|
107
|
+
})), {
|
|
32
108
|
Icon: SvgAvailable
|
|
33
|
-
};
|
|
109
|
+
});
|
|
34
110
|
};
|
|
35
111
|
var AvailabilityIndicator = function(param) {
|
|
36
|
-
var resources = param.resources, isUnavailable = param.isUnavailable, isSoldOut = param.
|
|
112
|
+
var resources = param.resources, isUnavailable = param.isUnavailable, _isSoldOut = param.isSoldOut, availabilityFormat = param.availabilityFormat;
|
|
37
113
|
var t = useTranslation('Design').t;
|
|
114
|
+
var isSoldOut = _isSoldOut || (resources === null || resources === void 0 ? void 0 : resources.bookedResources) === (resources === null || resources === void 0 ? void 0 : resources.totalResources);
|
|
38
115
|
if (isUnavailable) {
|
|
39
116
|
return /*#__PURE__*/ jsx(Indicator, {
|
|
40
117
|
Icon: SvgSoldOut,
|
|
@@ -47,19 +124,36 @@ var AvailabilityIndicator = function(param) {
|
|
|
47
124
|
label: t('soldOut')
|
|
48
125
|
});
|
|
49
126
|
}
|
|
50
|
-
var
|
|
127
|
+
var _getIconsAndLabelsWithArgument = getIconsAndLabelsWithArgument(_object_spread_props(_object_spread({}, resources), {
|
|
128
|
+
availabilityFormat: availabilityFormat
|
|
129
|
+
})), Icon = _getIconsAndLabelsWithArgument.Icon, label = _getIconsAndLabelsWithArgument.label, argument = _getIconsAndLabelsWithArgument.argument;
|
|
51
130
|
return /*#__PURE__*/ jsx(Indicator, {
|
|
52
131
|
Icon: Icon,
|
|
53
|
-
label: t(label
|
|
132
|
+
label: t(label, argument ? {
|
|
133
|
+
argument: argument
|
|
134
|
+
} : undefined)
|
|
54
135
|
});
|
|
55
136
|
};
|
|
56
137
|
var Indicator = function(param) {
|
|
57
138
|
var Icon = param.Icon, label = param.label;
|
|
139
|
+
var width = useWindowDimensions().width;
|
|
140
|
+
var iconSizes = width > TAB_WIDTH ? {
|
|
141
|
+
height: 15,
|
|
142
|
+
width: 11
|
|
143
|
+
} : {
|
|
144
|
+
height: 11,
|
|
145
|
+
width: 7
|
|
146
|
+
};
|
|
58
147
|
return /*#__PURE__*/ jsxs("div", {
|
|
59
148
|
className: "availability-indicator",
|
|
60
149
|
children: [
|
|
61
|
-
/*#__PURE__*/ jsx(Icon, {
|
|
150
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
151
|
+
height: iconSizes.height,
|
|
152
|
+
width: iconSizes.width,
|
|
153
|
+
viewBox: "auto"
|
|
154
|
+
}),
|
|
62
155
|
/*#__PURE__*/ jsx("div", {
|
|
156
|
+
className: "indicator-label",
|
|
63
157
|
children: label
|
|
64
158
|
})
|
|
65
159
|
]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, ReactElement, SetStateAction } from 'react';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
3
4
|
import { DateTimeButtonProps } from 'src/date-time-button';
|
|
4
5
|
export declare const defaultStartDay: DateTime<true>;
|
|
5
6
|
export type CalendarProps = {
|
|
@@ -11,6 +12,7 @@ export type CalendarProps = {
|
|
|
11
12
|
fromPrice?: string | ReactElement | null;
|
|
12
13
|
isLoading?: boolean;
|
|
13
14
|
initialDate?: DateTime;
|
|
15
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
14
16
|
getDateTimeButtonProps: (date: DateTime) => Pick<DateTimeButtonProps, 'resources' | 'showResources' | 'isDisabled'>;
|
|
15
17
|
};
|
|
16
18
|
export declare const Calendar: (props: CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK1D,eAAO,MAAM,eAAe,gBAK1B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,QAAQ,CAAA;IACrB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAA;IAClD,aAAa,EAAE,QAAQ,EAAE,CAAA;IACzB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAW5C,CAAA"}
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK1D,eAAO,MAAM,eAAe,gBAK1B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,QAAQ,CAAA;IACrB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAA;IAClD,aAAa,EAAE,QAAQ,EAAE,CAAA;IACzB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAC9C,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAW5C,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CalendarProps } from '../../Calendar';
|
|
2
|
-
export type CalendarDatesProps = Pick<CalendarProps, 'calendarDates' | 'selectedDate' | 'setSelectedDate' | 'fromPrice' | 'getDateTimeButtonProps'>;
|
|
3
|
-
export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, getDateTimeButtonProps, }: CalendarDatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export type CalendarDatesProps = Pick<CalendarProps, 'calendarDates' | 'selectedDate' | 'setSelectedDate' | 'fromPrice' | 'getDateTimeButtonProps' | 'availabilityFormat'>;
|
|
3
|
+
export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, availabilityFormat, getDateTimeButtonProps, }: CalendarDatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
//# sourceMappingURL=CalendarDates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,
|
|
1
|
+
{"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,GACxB,oBAAoB,CACvB,CAAA;AAED,eAAO,MAAM,aAAa,6GAOvB,kBAAkB,4CA6CpB,CAAA"}
|
|
@@ -57,7 +57,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
57
57
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
58
58
|
}
|
|
59
59
|
var CalendarDates = function(param) {
|
|
60
|
-
var calendarDates = param.calendarDates, selectedDate = param.selectedDate, setSelectedDate = param.setSelectedDate, fromPrice = param.fromPrice, getDateTimeButtonProps = param.getDateTimeButtonProps;
|
|
60
|
+
var calendarDates = param.calendarDates, selectedDate = param.selectedDate, setSelectedDate = param.setSelectedDate, fromPrice = param.fromPrice, availabilityFormat = param.availabilityFormat, getDateTimeButtonProps = param.getDateTimeButtonProps;
|
|
61
61
|
var fillCalendarDates = useMemo(function() {
|
|
62
62
|
var _calendarDates_;
|
|
63
63
|
var _calendarDates__weekday;
|
|
@@ -90,7 +90,8 @@ var CalendarDates = function(param) {
|
|
|
90
90
|
return setSelectedDate(date);
|
|
91
91
|
},
|
|
92
92
|
price: fromPrice,
|
|
93
|
-
variant: Variant.month
|
|
93
|
+
variant: Variant.month,
|
|
94
|
+
availabilityFormat: availabilityFormat
|
|
94
95
|
}, props), +date);
|
|
95
96
|
})
|
|
96
97
|
})
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { TimeZone } from '@licklist/core/dist/DataMapper/Common/TimeZoneDataMapper';
|
|
1
2
|
import { DateTime } from 'luxon';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
type Builder = (args: {
|
|
4
|
+
initialDate?: DateTime;
|
|
5
|
+
timeZone: TimeZone['name'];
|
|
6
|
+
}) => DateTime[];
|
|
7
|
+
export declare const getMonthCalendarDates: Builder;
|
|
8
|
+
export declare const getWeekCalendarDates: Builder;
|
|
9
|
+
export {};
|
|
4
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAA;AAE1C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0DAA0D,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAA;AAE1C,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE;IACpB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAC3B,KAAK,QAAQ,EAAE,CAAA;AAEhB,eAAO,MAAM,qBAAqB,EAAE,OAYnC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,OAQlC,CAAA"}
|
|
@@ -1,39 +1,27 @@
|
|
|
1
|
-
import { Interval } from 'luxon';
|
|
1
|
+
import { DateTime, Interval } from 'luxon';
|
|
2
2
|
|
|
3
|
-
var getMonthCalendarDates = function(
|
|
3
|
+
var getMonthCalendarDates = function(param) {
|
|
4
|
+
var _initialDate = param.initialDate, timeZone = param.timeZone;
|
|
5
|
+
var initialDate = _initialDate || DateTime.now().setZone(timeZone);
|
|
4
6
|
var startOfMonth = initialDate.startOf('month');
|
|
5
7
|
var endOfMonth = initialDate.endOf('month');
|
|
6
|
-
|
|
8
|
+
return Interval.fromDateTimes(startOfMonth, endOfMonth).splitBy({
|
|
7
9
|
day: 1
|
|
8
10
|
}).map(function(d) {
|
|
9
11
|
return d.start;
|
|
10
12
|
});
|
|
11
|
-
if (timeZone) {
|
|
12
|
-
return dateTimes.map(function(date) {
|
|
13
|
-
return date.setZone(timeZone, {
|
|
14
|
-
keepLocalTime: true
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return dateTimes;
|
|
19
13
|
};
|
|
20
|
-
var getWeekCalendarDates = function(
|
|
14
|
+
var getWeekCalendarDates = function(param) {
|
|
15
|
+
var timeZone = param.timeZone;
|
|
16
|
+
var initialDate = DateTime.now().setZone(timeZone);
|
|
21
17
|
var lastDay = initialDate.plus({
|
|
22
18
|
days: 7
|
|
23
19
|
});
|
|
24
|
-
|
|
20
|
+
return Interval.fromDateTimes(initialDate, lastDay).splitBy({
|
|
25
21
|
day: 1
|
|
26
22
|
}).map(function(d) {
|
|
27
23
|
return d.start;
|
|
28
24
|
});
|
|
29
|
-
if (timeZone) {
|
|
30
|
-
return dateTimes.map(function(date) {
|
|
31
|
-
return date.setZone(timeZone, {
|
|
32
|
-
keepLocalTime: true
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return dateTimes;
|
|
37
25
|
};
|
|
38
26
|
|
|
39
27
|
export { getMonthCalendarDates, getWeekCalendarDates };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateContent.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateContent.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGhC,OAAO,EAAE,mBAAmB,EAAW,MAAM,kBAAkB,CAAA;AAE/D,KAAK,gBAAgB,GAAG,IAAI,CAC1B,mBAAmB,EACnB,YAAY,GAAG,YAAY,GAAG,SAAS,CACxC,GAAG;IACF,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA;AAED,eAAO,MAAM,WAAW,+CAKrB,gBAAgB,4CA6BlB,CAAA"}
|
|
@@ -2,8 +2,8 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { TIME_FORMAT, DAY_NUMBER, DAY_NUMBER_WITH_MONTH, DAY_OF_WEEK } from '@licklist/core/dist/Config';
|
|
3
3
|
import { getDayWithOrdinal } from '@licklist/plugins/dist/utils/formatDate';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { isToday, isTomorrow } from 'date-fns';
|
|
6
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { isToday, isTomorrow } from '@licklist/plugins/dist';
|
|
7
7
|
import { Variant } from './DateTimeButton.js';
|
|
8
8
|
|
|
9
9
|
function _array_like_to_array(arr, len) {
|
|
@@ -81,8 +81,8 @@ var DateContent = function(param) {
|
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
var getDate = function(date) {
|
|
84
|
-
if (isToday(date
|
|
85
|
-
if (isTomorrow(date
|
|
84
|
+
if (isToday(date)) return 'today';
|
|
85
|
+
if (isTomorrow(date)) return 'tomorrow';
|
|
86
86
|
return date.toFormat(DAY_OF_WEEK);
|
|
87
87
|
};
|
|
88
88
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
3
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
4
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
4
5
|
export declare enum Variant {
|
|
5
6
|
week = "week",
|
|
6
7
|
month = "month",
|
|
@@ -16,6 +17,7 @@ export type DateTimeButtonProps = {
|
|
|
16
17
|
resources?: ZoneResourcesAvailability | null;
|
|
17
18
|
showResources?: boolean;
|
|
18
19
|
variant: Variant;
|
|
20
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
19
21
|
};
|
|
20
|
-
export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, }: DateTimeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, availabilityFormat, }: DateTimeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
23
|
//# sourceMappingURL=DateTimeButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;
|
|
1
|
+
{"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAI9F,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IAC7C,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,cAAc,kJAWxB,mBAAmB,4CA4CrB,CAAA"}
|
|
@@ -11,11 +11,12 @@ var Variant;
|
|
|
11
11
|
Variant["time"] = "time";
|
|
12
12
|
})(Variant || (Variant = {}));
|
|
13
13
|
var DateTimeButton = function(param) {
|
|
14
|
-
var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant;
|
|
14
|
+
var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant, availabilityFormat = param.availabilityFormat;
|
|
15
15
|
var isSoldOut = _isSoldOut || resources && resources.bookedResources >= resources.totalResources;
|
|
16
16
|
var isTimeVariant = variant === "time";
|
|
17
17
|
var isPast = variant === "time" ? isPastTime(date) : isPastDate(date);
|
|
18
18
|
var isDisabled = _isDisabled || isSoldOut || isPast;
|
|
19
|
+
var isUnavailable = _isDisabled || isPast;
|
|
19
20
|
return /*#__PURE__*/ jsxs("button", {
|
|
20
21
|
type: "button",
|
|
21
22
|
onClick: function() {
|
|
@@ -35,9 +36,10 @@ var DateTimeButton = function(param) {
|
|
|
35
36
|
className: "price",
|
|
36
37
|
children: price
|
|
37
38
|
}),
|
|
38
|
-
showResources && resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
39
|
+
showResources && (resources || isUnavailable) && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
40
|
+
availabilityFormat: availabilityFormat,
|
|
39
41
|
resources: resources,
|
|
40
|
-
isUnavailable:
|
|
42
|
+
isUnavailable: isUnavailable,
|
|
41
43
|
isSoldOut: isSoldOut
|
|
42
44
|
})
|
|
43
45
|
]
|
|
@@ -22,7 +22,7 @@ import 'react-bootstrap/Col';
|
|
|
22
22
|
import 'react-bootstrap/InputGroup';
|
|
23
23
|
import 'react-bootstrap/Row';
|
|
24
24
|
import '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
25
|
-
import '@licklist/plugins';
|
|
25
|
+
import '@licklist/plugins/dist/utils/error';
|
|
26
26
|
import { ProductSetContextProvider } from '../../../../../product-set/form/context.js';
|
|
27
27
|
import { getFilteredTemplates } from '../../../../../product-set/utils/index.js';
|
|
28
28
|
import 'react-bootstrap/Button';
|
|
@@ -33,13 +33,13 @@ import '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
|
33
33
|
import 'react-bootstrap/Collapse';
|
|
34
34
|
import '@licklist/plugins/dist/hooks/Media/useImages';
|
|
35
35
|
import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
36
|
+
import '@licklist/plugins';
|
|
36
37
|
import '@licklist/plugins/dist/context/app/hooks/useNotification';
|
|
37
38
|
import '../../../../../static/index.js';
|
|
38
39
|
import '../../../../../tiptap-editor/TipTapEditor.js';
|
|
39
40
|
import '@licklist/core/dist/DataMapper/Product/ProductDataMapper';
|
|
40
41
|
import '@licklist/core/dist/DataMapper/Provider/SnippetTemplateDataMapper';
|
|
41
42
|
import 'react-color';
|
|
42
|
-
import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
43
43
|
import '../../../../../calendar/Calendar.js';
|
|
44
44
|
import 'luxon';
|
|
45
45
|
import 'react-intl';
|
|
@@ -69,6 +69,7 @@ import '@licklist/plugins/dist';
|
|
|
69
69
|
import '../../../../../iframe/order-process/components/BookingSummary/BookingSummary.js';
|
|
70
70
|
import '../../../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js';
|
|
71
71
|
import '../../../../../iframe/payment/payment-status-page/PaymentStatusPage.js';
|
|
72
|
+
import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
72
73
|
import '../../../../../static/manual-date-picker/constants/index.js';
|
|
73
74
|
import '../../../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js';
|
|
74
75
|
import '../../../../../sortable-tree/SortableTree.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAE/E,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,
|
|
1
|
+
{"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAE/E,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAsCD,CAAA"}
|
|
@@ -135,7 +135,6 @@ var getDefaultValues = function(productSet, hasNoRecurrences) {
|
|
|
135
135
|
subProducts: subProducts === null || subProducts === void 0 ? void 0 : subProducts.map(function(_param) {
|
|
136
136
|
var subProducts = _extends({}, _object_destructuring_empty(_param));
|
|
137
137
|
return _object_spread_props(_object_spread({}, subProducts), {
|
|
138
|
-
originalProductId: null,
|
|
139
138
|
productCategoryId: undefined
|
|
140
139
|
});
|
|
141
140
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventVenueMap.d.ts","sourceRoot":"","sources":["../../../src/events/event-venue-map/EventVenueMap.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,0DAA0D,CAAA;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAG7D,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAA;IACvC,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAA;IACjE,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC7C,GAAG,wBAAwB,CAAA;AAE5B,eAAO,MAAM,aAAa;SAXnB,MAAM;aACF,OAAO,CAAC,KAAK,CAAC,EAAE;WAClB,MAAM;qBACI,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI;eACvC,OAAO;eACP,OAAO,CAAC,OAAO,CAAC,EAAE;oBACb,OAAO,CAAC,YAAY,CAAC,EAAE;4BACf,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI;sBAC/C,wBAAwB,EAAE;
|
|
1
|
+
{"version":3,"file":"EventVenueMap.d.ts","sourceRoot":"","sources":["../../../src/events/event-venue-map/EventVenueMap.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,0DAA0D,CAAA;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAG7D,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAA;IACvC,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAA;IACjE,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC7C,GAAG,wBAAwB,CAAA;AAE5B,eAAO,MAAM,aAAa;SAXnB,MAAM;aACF,OAAO,CAAC,KAAK,CAAC,EAAE;WAClB,MAAM;qBACI,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI;eACvC,OAAO;eACP,OAAO,CAAC,OAAO,CAAC,EAAE;oBACb,OAAO,CAAC,YAAY,CAAC,EAAE;4BACf,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI;sBAC/C,wBAAwB,EAAE;0EAkD7C,CAAA"}
|
|
@@ -58,6 +58,7 @@ function _object_spread_props(target, source) {
|
|
|
58
58
|
}
|
|
59
59
|
var EventVenueMap = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
60
60
|
var url = param.url, points = param.points, _param_editMode = param.editMode, editMode = _param_editMode === void 0 ? false : _param_editMode, name = param.name, onPointsChange = param.onPointsChange, products = param.products, pointProducts = param.pointProducts, onPointProductsChange = param.onPointProductsChange, width = param.width, height = param.height, onPointClick = param.onPointClick, _param_usedInIframe = param.usedInIframe, usedInIframe = _param_usedInIframe === void 0 ? false : _param_usedInIframe, _param_choosedProductUuids = param.choosedProductUuids, choosedProductUuids = _param_choosedProductUuids === void 0 ? [] : _param_choosedProductUuids, _param_errorOnChoosedProductUuids = param.errorOnChoosedProductUuids, errorOnChoosedProductUuids = _param_errorOnChoosedProductUuids === void 0 ? [] : _param_errorOnChoosedProductUuids, soldOutProducts = param.soldOutProducts;
|
|
61
|
+
// TODO fix often updating of canvasSizes, which leads to flashing poingts
|
|
61
62
|
var canvasSizes = useCanvasSize({
|
|
62
63
|
width: width,
|
|
63
64
|
height: height
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCanvasSize.d.ts","sourceRoot":"","sources":["../../../../src/events/event-venue-map/hooks/useCanvasSize.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,wDAGvB,eAAe;;;
|
|
1
|
+
{"version":3,"file":"useCanvasSize.d.ts","sourceRoot":"","sources":["../../../../src/events/event-venue-map/hooks/useCanvasSize.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,wDAGvB,eAAe;;;CAcjB,CAAA"}
|
|
@@ -3,7 +3,17 @@ import { useWindowDimensions } from '@licklist/plugins/dist/hooks/Media/useWindo
|
|
|
3
3
|
|
|
4
4
|
var useCanvasSize = function(param) {
|
|
5
5
|
var componentWidth = param.width, componentHeight = param.height;
|
|
6
|
+
// TODO Fix often updating of width and height
|
|
6
7
|
var _useWindowDimensions = useWindowDimensions(), width = _useWindowDimensions.width, height = _useWindowDimensions.height;
|
|
8
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9
|
+
var memoizedDimensions = useMemo(function() {
|
|
10
|
+
return {
|
|
11
|
+
width: width,
|
|
12
|
+
height: height
|
|
13
|
+
};
|
|
14
|
+
}, [
|
|
15
|
+
width
|
|
16
|
+
]);
|
|
7
17
|
var memoedComponentParameters = useMemo(function() {
|
|
8
18
|
if (!componentWidth && !componentHeight) return null;
|
|
9
19
|
return {
|
|
@@ -14,10 +24,7 @@ var useCanvasSize = function(param) {
|
|
|
14
24
|
componentWidth,
|
|
15
25
|
componentHeight
|
|
16
26
|
]);
|
|
17
|
-
return memoedComponentParameters ||
|
|
18
|
-
width: width,
|
|
19
|
-
height: height
|
|
20
|
-
};
|
|
27
|
+
return memoedComponentParameters || memoizedDimensions;
|
|
21
28
|
};
|
|
22
29
|
|
|
23
30
|
export { useCanvasSize };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
3
3
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
4
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
4
5
|
export declare const LAYOUT_GRID = "grid";
|
|
5
6
|
export declare const LAYOUT_LIST = "list";
|
|
6
7
|
export type ActivityCardProps = {
|
|
@@ -14,6 +15,7 @@ export type ActivityCardProps = {
|
|
|
14
15
|
availableTimes?: string | null;
|
|
15
16
|
image?: Image | null;
|
|
16
17
|
resources?: ZoneResourcesAvailability;
|
|
18
|
+
availabilityFormat?: AvailabilityFormat | null;
|
|
17
19
|
};
|
|
18
|
-
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, availabilityFormat, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
//# sourceMappingURL=ActivityCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;
|
|
1
|
+
{"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAG9F,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,YAAY,iIAYtB,iBAAiB,4CA6DnB,CAAA"}
|