@licklist/design 0.69.4 → 0.69.6-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/auth/Login/LoginComponent.js +2 -1
- 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/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +2 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +3 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +31 -28
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +14 -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-card/utils.d.ts +1 -0
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-card/utils.js +6 -2
- 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 +8 -1
- 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/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts +2 -2
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +8 -2
- package/dist/iframe/ryft/utils/ryft-form.d.ts +2 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +20 -1
- package/dist/index.js +1 -0
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts +3 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.js +172 -8
- 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/card/ProductSetCard.d.ts +6 -2
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +20 -11
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +4 -3
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +2 -2
- 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 +64 -1
- package/dist/product-set/form/ProductSetNameControl.d.ts +6 -0
- package/dist/product-set/form/ProductSetNameControl.d.ts.map +1 -0
- package/dist/product-set/form/ProductSetNameControl.js +35 -0
- 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/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/form/index.d.ts +1 -0
- package/dist/product-set/form/index.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +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/product-set/utils/index.d.ts +7 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +10 -1
- 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 +6 -0
- 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/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +22 -0
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +25 -0
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +5 -1
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +9 -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 -7
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/calendar/utils/index.ts +17 -26
- package/src/date-time-button/DateContent.tsx +3 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +3 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +88 -85
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +11 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/events/event-card/utils.ts +5 -1
- package/src/iframe/activity-card/ActivityCard.tsx +6 -0
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/iframe/ryft/RyftPaymentForm.tsx +9 -4
- package/src/iframe/ryft/utils/ryft-form.ts +28 -2
- package/src/layout/DropDown.tsx +1 -1
- package/src/modals/confirmation/ConfirmModal.tsx +19 -3
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
- package/src/product-set/card/ProductSetCard.tsx +32 -6
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -1
- package/src/product-set/control/DateInput.tsx +2 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
- package/src/product-set/form/ProductSetForm.tsx +24 -2
- package/src/product-set/form/ProductSetNameControl.tsx +27 -0
- 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/VenueMapsControl.tsx +0 -3
- package/src/product-set/form/index.ts +1 -0
- 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/product-set/utils/index.ts +11 -0
- 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 +6 -0
- 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/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +22 -0
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +25 -0
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +15 -1
- package/src/zone/form/components/GameDurationControl.tsx +1 -0
- package/src/zone/form/components/SortControl.tsx +1 -0
- package/yarn.lock +20 -62
|
@@ -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"}
|
|
@@ -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,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
|
|
|
@@ -35,6 +35,7 @@ export interface EditEventFormProps extends HasPermissionProp {
|
|
|
35
35
|
isExternalPaymentLinkEnabled?: boolean;
|
|
36
36
|
timeZone: string;
|
|
37
37
|
eventProductSet?: ProductSet;
|
|
38
|
+
overrideNameError?: string;
|
|
38
39
|
}
|
|
39
|
-
export declare const EditEventForm: ({ disabled, categories, title, hasPermission, defaultEventValues, serverErrors, onSaveEvent, productSets, createProductSet, setEditProductSetId, isExternalPaymentLinkEnabled, timeZone, eventProductSet, }: EditEventFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export declare const EditEventForm: ({ disabled, categories, title, hasPermission, defaultEventValues, serverErrors, onSaveEvent, productSets, createProductSet, setEditProductSetId, isExternalPaymentLinkEnabled, timeZone, eventProductSet, overrideNameError, }: EditEventFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
41
|
//# sourceMappingURL=EditEventForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAA;AAM7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAG3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAGlF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAClD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACtD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAA;AAM7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAG3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAGlF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAClD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACtD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAOD,eAAO,MAAM,aAAa,mOAevB,kBAAkB,4CAwVpB,CAAA"}
|
|
@@ -139,7 +139,7 @@ var eventImageTypes = {
|
|
|
139
139
|
uploadCover: IMAGE_TYPE_MAP[IMAGE_TYPE_COVER]
|
|
140
140
|
};
|
|
141
141
|
var EditEventForm = function(param) {
|
|
142
|
-
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, categories = param.categories, title = param.title, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, defaultEventValues = param.defaultEventValues, serverErrors = param.serverErrors, onSaveEvent = param.onSaveEvent, productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, isExternalPaymentLinkEnabled = param.isExternalPaymentLinkEnabled, timeZone = param.timeZone, eventProductSet = param.eventProductSet;
|
|
142
|
+
var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, categories = param.categories, title = param.title, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, defaultEventValues = param.defaultEventValues, serverErrors = param.serverErrors, onSaveEvent = param.onSaveEvent, productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, isExternalPaymentLinkEnabled = param.isExternalPaymentLinkEnabled, timeZone = param.timeZone, eventProductSet = param.eventProductSet, overrideNameError = param.overrideNameError;
|
|
143
143
|
var _errors_name, _errors_externalPaymentLink, _errors_integrationUrl;
|
|
144
144
|
var t = useTranslation([
|
|
145
145
|
'Design',
|
|
@@ -467,7 +467,8 @@ var EditEventForm = function(param) {
|
|
|
467
467
|
setShowEditProductSet: setShowEditProductSet,
|
|
468
468
|
showEditProductSet: showEditProductSet,
|
|
469
469
|
timeZone: timeZone,
|
|
470
|
-
eventProductSet: eventProductSet
|
|
470
|
+
eventProductSet: eventProductSet,
|
|
471
|
+
overrideNameError: overrideNameError
|
|
471
472
|
}),
|
|
472
473
|
hasPermission && !showEditProductSet && /*#__PURE__*/ jsx(Button, {
|
|
473
474
|
disabled: disabled || formState.isSubmitting || isImagesLoading || isCoverImagesLoading,
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
9
9
|
setEditProductSetId: (value: string) => void;
|
|
10
10
|
timeZone: string;
|
|
11
11
|
eventProductSet?: ProductSet;
|
|
12
|
+
overrideNameError?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const SelectEventProductSet: ({ productSets: _productSets, createProductSet, setEditProductSetId, showEditProductSet, setShowEditProductSet, timeZone, eventProductSet, }: SelectEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const SelectEventProductSet: ({ productSets: _productSets, createProductSet, setEditProductSetId, showEditProductSet, setShowEditProductSet, timeZone, eventProductSet, overrideNameError, }: SelectEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=SelectEventProductSet.d.ts.map
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;
|
|
1
|
+
{"version":3,"file":"SelectEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAIxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAIpE,UAAU,0BAA2B,SAAQ,iBAAiB;IAC5D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAC/C,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACtD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,eAAO,MAAM,qBAAqB,mKAS/B,0BAA0B,4CA4L5B,CAAA"}
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js
CHANGED
|
@@ -4,8 +4,11 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import { Form, Button } from 'react-bootstrap';
|
|
5
5
|
import { useId } from '@react-aria/utils';
|
|
6
6
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
7
|
+
import { uniqBy } from 'lodash';
|
|
8
|
+
import { getTypeHeadItemsFromMenus } from '../../../../product-set/utils/index.js';
|
|
7
9
|
import { ConfirmModal } from '../../../../modals/confirmation/ConfirmModal.js';
|
|
8
10
|
import { EditEventProductSet } from './component/EditEventProductSet.js';
|
|
11
|
+
import { Typeahead } from '../../../../typeahead/Typeahead.js';
|
|
9
12
|
|
|
10
13
|
function _array_like_to_array(arr, len) {
|
|
11
14
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -157,7 +160,7 @@ function _ts_generator(thisArg, body) {
|
|
|
157
160
|
}
|
|
158
161
|
}
|
|
159
162
|
var SelectEventProductSet = function(param) {
|
|
160
|
-
var _productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, showEditProductSet = param.showEditProductSet, setShowEditProductSet = param.setShowEditProductSet, timeZone = param.timeZone, eventProductSet = param.eventProductSet;
|
|
163
|
+
var _productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, showEditProductSet = param.showEditProductSet, setShowEditProductSet = param.setShowEditProductSet, timeZone = param.timeZone, eventProductSet = param.eventProductSet, overrideNameError = param.overrideNameError;
|
|
161
164
|
var _productSets_find;
|
|
162
165
|
var productSets = eventProductSet ? _to_consumable_array(_productSets).concat([
|
|
163
166
|
eventProductSet
|
|
@@ -170,6 +173,14 @@ var SelectEventProductSet = function(param) {
|
|
|
170
173
|
var productSetsId = useId();
|
|
171
174
|
var productSetId = watch('productSetId');
|
|
172
175
|
var editedProductSet = watch('editedProductSet');
|
|
176
|
+
var typeheadValues = uniqBy(getTypeHeadItemsFromMenus(editedProductSet ? productSets.map(function(productSet) {
|
|
177
|
+
return productSet.id === editedProductSet.id ? editedProductSet : productSet;
|
|
178
|
+
}) : productSets), function(item) {
|
|
179
|
+
return item.id;
|
|
180
|
+
});
|
|
181
|
+
var selectedProductSetTypeheadValue = productSetId ? typeheadValues === null || typeheadValues === void 0 ? void 0 : typeheadValues.find(function(typeheadValue) {
|
|
182
|
+
return typeheadValue.id === productSetId;
|
|
183
|
+
}) : undefined;
|
|
173
184
|
var onEditProductSet = useCallback(function() {
|
|
174
185
|
setEditProductSetId(String(productSetId));
|
|
175
186
|
setShowEditProductSet(true);
|
|
@@ -238,6 +249,7 @@ var SelectEventProductSet = function(param) {
|
|
|
238
249
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
239
250
|
var onSubmit = function(value) {
|
|
240
251
|
setShowEditProductSet(false);
|
|
252
|
+
setValue('productSetId', value.id);
|
|
241
253
|
setValue('editedProductSet', value);
|
|
242
254
|
};
|
|
243
255
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -254,10 +266,8 @@ var SelectEventProductSet = function(param) {
|
|
|
254
266
|
/*#__PURE__*/ jsx(Controller, {
|
|
255
267
|
control: control,
|
|
256
268
|
name: "productSetId",
|
|
257
|
-
render: function(
|
|
258
|
-
var field = param.field;
|
|
269
|
+
render: function() {
|
|
259
270
|
var _errors_productSetId;
|
|
260
|
-
var fieldValue = String(field.value);
|
|
261
271
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
262
272
|
children: [
|
|
263
273
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -265,27 +275,19 @@ var SelectEventProductSet = function(param) {
|
|
|
265
275
|
children: [
|
|
266
276
|
/*#__PURE__*/ jsx(ConfirmModal, {
|
|
267
277
|
children: function(confirm) {
|
|
268
|
-
return /*#__PURE__*/
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
278
|
+
return /*#__PURE__*/ jsx(Typeahead, {
|
|
279
|
+
name: "productSetId",
|
|
280
|
+
value: selectedProductSetTypeheadValue,
|
|
281
|
+
containerStyles: {
|
|
282
|
+
width: '100%'
|
|
283
|
+
},
|
|
284
|
+
onChangeValue: function(typeheadValue) {
|
|
285
|
+
onChangeProductSet(Number(typeheadValue.id), confirm);
|
|
272
286
|
},
|
|
273
|
-
isInvalid:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
value: "",
|
|
278
|
-
hidden: true,
|
|
279
|
-
children: t('Design:chooseProductSet')
|
|
280
|
-
}),
|
|
281
|
-
productSets === null || productSets === void 0 ? void 0 : productSets.map(function(productSet) {
|
|
282
|
-
var isCurrentEditedProductSet = editedProductSet && (editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.id) === (productSet === null || productSet === void 0 ? void 0 : productSet.id);
|
|
283
|
-
return /*#__PURE__*/ jsx("option", {
|
|
284
|
-
value: productSet.id,
|
|
285
|
-
children: isCurrentEditedProductSet || productSet.isOverride ? "[".concat(t('edited'), "] ").concat(isCurrentEditedProductSet ? editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.name : productSet.name) : productSet.name
|
|
286
|
-
}, productSet.id);
|
|
287
|
-
})
|
|
288
|
-
]
|
|
287
|
+
isInvalid: !!overrideNameError,
|
|
288
|
+
options: typeheadValues,
|
|
289
|
+
placeholder: t('Design:choose'),
|
|
290
|
+
noOptionsMessage: t('Design:noAvailableProductSets')
|
|
289
291
|
});
|
|
290
292
|
}
|
|
291
293
|
}),
|
|
@@ -320,9 +322,9 @@ var SelectEventProductSet = function(param) {
|
|
|
320
322
|
})
|
|
321
323
|
]
|
|
322
324
|
}),
|
|
323
|
-
/*#__PURE__*/ jsx(
|
|
324
|
-
|
|
325
|
-
children: errors === null || errors === void 0 ? void 0 : (_errors_productSetId = errors.productSetId) === null || _errors_productSetId === void 0 ? void 0 : _errors_productSetId.message
|
|
325
|
+
/*#__PURE__*/ jsx("div", {
|
|
326
|
+
className: "manual-form-error",
|
|
327
|
+
children: (errors === null || errors === void 0 ? void 0 : (_errors_productSetId = errors.productSetId) === null || _errors_productSetId === void 0 ? void 0 : _errors_productSetId.message) || overrideNameError
|
|
326
328
|
})
|
|
327
329
|
]
|
|
328
330
|
});
|
|
@@ -334,7 +336,8 @@ var SelectEventProductSet = function(param) {
|
|
|
334
336
|
showEditProductSet && productSetId && /*#__PURE__*/ jsx(EditEventProductSet, {
|
|
335
337
|
onSubmit: onSubmit,
|
|
336
338
|
defaultValues: productSetId === (editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.id) && editedProductSet,
|
|
337
|
-
timeZone: timeZone
|
|
339
|
+
timeZone: timeZone,
|
|
340
|
+
overrideNameError: overrideNameError
|
|
338
341
|
})
|
|
339
342
|
]
|
|
340
343
|
});
|
|
@@ -9,7 +9,8 @@ interface EditEventProductSetProps {
|
|
|
9
9
|
onSubmit: (value: EditEventFormValues['editedProductSet']) => void;
|
|
10
10
|
defaultValues?: EditEventFormValues['editedProductSet'];
|
|
11
11
|
timeZone: string;
|
|
12
|
+
overrideNameError?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const EditEventProductSet: ({ onSubmit, defaultValues, timeZone, }: EditEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const EditEventProductSet: ({ onSubmit, defaultValues, timeZone, overrideNameError, }: EditEventProductSetProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=EditEventProductSet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../../src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGzD,eAAO,MAAM,WAAW,IAAI,CAAA;AAE5B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AACD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAA;IAClE,aAAa,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;IACvD,QAAQ,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"EditEventProductSet.d.ts","sourceRoot":"","sources":["../../../../../../src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGzD,eAAO,MAAM,WAAW,IAAI,CAAA;AAE5B,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AACD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAA;IAClE,aAAa,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;IACvD,QAAQ,EAAE,MAAM,CAAA;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,eAAO,MAAM,mBAAmB,8DAK7B,wBAAwB,4CA2H1B,CAAA"}
|
|
@@ -22,6 +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/dist/utils/error';
|
|
25
26
|
import { ProductSetContextProvider } from '../../../../../product-set/form/context.js';
|
|
26
27
|
import { getFilteredTemplates } from '../../../../../product-set/utils/index.js';
|
|
27
28
|
import 'react-bootstrap/Button';
|
|
@@ -133,7 +134,7 @@ function _object_spread_props(target, source) {
|
|
|
133
134
|
}
|
|
134
135
|
var DEFAULT_FEE = 5;
|
|
135
136
|
var EditEventProductSet = function(param) {
|
|
136
|
-
var onSubmit = param.onSubmit, defaultValues = param.defaultValues, timeZone = param.timeZone;
|
|
137
|
+
var onSubmit = param.onSubmit, defaultValues = param.defaultValues, timeZone = param.timeZone, overrideNameError = param.overrideNameError;
|
|
137
138
|
var companyId = useParams().companyId;
|
|
138
139
|
var _useEventEditProductSetContext = useEventEditProductSetContext(), companies = _useEventEditProductSetContext.companies, isLoading = _useEventEditProductSetContext.isLoading, settings = _useEventEditProductSetContext.settings, smsTemplates = _useEventEditProductSetContext.smsTemplates, systemSettings = _useEventEditProductSetContext.systemSettings, productGroupsData = _useEventEditProductSetContext.productGroupsData, productSetData = _useEventEditProductSetContext.productSetData, venueMapSets = _useEventEditProductSetContext.venueMapSets, emailTemplates = _useEventEditProductSetContext.emailTemplates, fieldSetsData = _useEventEditProductSetContext.fieldSetsData;
|
|
139
140
|
var t = useTranslation('Design').t;
|
|
@@ -153,7 +154,18 @@ var EditEventProductSet = function(param) {
|
|
|
153
154
|
defaultValues: defaultValues,
|
|
154
155
|
mode: 'onChange'
|
|
155
156
|
});
|
|
156
|
-
var reset = form.reset, handleSubmit = form.handleSubmit, watch = form.watch;
|
|
157
|
+
var reset = form.reset, handleSubmit = form.handleSubmit, watch = form.watch, setError = form.setError;
|
|
158
|
+
useEffect(function() {
|
|
159
|
+
if (!overrideNameError) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
setError('name', {
|
|
163
|
+
message: overrideNameError
|
|
164
|
+
});
|
|
165
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
166
|
+
}, [
|
|
167
|
+
overrideNameError
|
|
168
|
+
]);
|
|
157
169
|
var formValues = watch();
|
|
158
170
|
useEffect(function() {
|
|
159
171
|
if (!defaultFormValues || isEqual(defaultFormValues, formValues)) {
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
import { EventStatistic } from '@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper';
|
|
2
2
|
export declare function formatContent(content: any, maxSymbols: any): any;
|
|
3
3
|
export declare const formatContentWithoutTags: (content: any, maxLength?: number) => any;
|
|
4
|
+
export declare const MIN_EVENT_DESCRIPTION_SIZE = 150;
|
|
4
5
|
export declare const EVENT_DESCRIPTION_SIZE = 350;
|
|
5
6
|
/**
|
|
6
7
|
* Calculate the total number of views from the given dates and event statistic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/events/event-card/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AAGjG,wBAAgB,aAAa,CAAC,OAAO,KAAA,EAAE,UAAU,KAAA,OAIhD;AAED,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/events/event-card/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AAGjG,wBAAgB,aAAa,CAAC,OAAO,KAAA,EAAE,UAAU,KAAA,OAIhD;AAED,eAAO,MAAM,wBAAwB,2CAkBpC,CAAA;AAED,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAC7C,eAAO,MAAM,sBAAsB,MAAM,CAAA;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,UACvB,MAAM,EAAE,kBACC,cAAc,KAC7B,MAIA,CAAA;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,UAC/B,MAAM,EAAE,kBACC,cAAc,KAC7B,CAAC,MAAM,EAAE,MAAM,CAejB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,mBACX,cAAc,GAAG,IAAI,QAC/B,MAAM,KACX;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;CA4BpB,CAAA"}
|
|
@@ -59,9 +59,13 @@ var formatContentWithoutTags = function(content) {
|
|
|
59
59
|
var text = content.replace(/<[^>]*>/g, '');
|
|
60
60
|
var trimmedText = text.trim().replace(/ |[^a-zA-Z0-9\s]/g, '').replace(/\s\s+/g, ' ');
|
|
61
61
|
var words = trimmedText.slice(0, maxLength).split(' ');
|
|
62
|
+
var contentWithMinLength = content.slice(0, MIN_EVENT_DESCRIPTION_SIZE);
|
|
62
63
|
var index = String(content).indexOf(words[words.length - 2]);
|
|
63
|
-
|
|
64
|
+
var slicedContent = content.slice(0, index);
|
|
65
|
+
var contentWithMinSize = contentWithMinLength.length > slicedContent.length ? contentWithMinLength : slicedContent;
|
|
66
|
+
return contentWithMinSize.concat('...');
|
|
64
67
|
};
|
|
68
|
+
var MIN_EVENT_DESCRIPTION_SIZE = 150;
|
|
65
69
|
var EVENT_DESCRIPTION_SIZE = 350;
|
|
66
70
|
/**
|
|
67
71
|
* Calculate the total number of views from the given dates and event statistic.
|
|
@@ -136,4 +140,4 @@ var EVENT_DESCRIPTION_SIZE = 350;
|
|
|
136
140
|
};
|
|
137
141
|
};
|
|
138
142
|
|
|
139
|
-
export { EVENT_DESCRIPTION_SIZE, calculateTotalSoldAndAmount, calculateTotalViews, formatContent, formatContentWithoutTags, getStatisticInfo };
|
|
143
|
+
export { EVENT_DESCRIPTION_SIZE, MIN_EVENT_DESCRIPTION_SIZE, calculateTotalSoldAndAmount, calculateTotalViews, formatContent, formatContentWithoutTags, getStatisticInfo };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
3
|
+
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
|
|
3
4
|
export declare const LAYOUT_GRID = "grid";
|
|
4
5
|
export declare const LAYOUT_LIST = "list";
|
|
5
6
|
export type ActivityCardProps = {
|
|
@@ -12,6 +13,7 @@ export type ActivityCardProps = {
|
|
|
12
13
|
layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST;
|
|
13
14
|
availableTimes?: string | null;
|
|
14
15
|
image?: Image | null;
|
|
16
|
+
resources?: ZoneResourcesAvailability;
|
|
15
17
|
};
|
|
16
|
-
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
//# 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;
|
|
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;AAGpH,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;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,6GAWtB,iBAAiB,4CAmDnB,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
+
import { AvailabilityIndicator } from '../../availability-indicator/AvailabilityIndicator.js';
|
|
3
4
|
|
|
4
5
|
var LAYOUT_GRID = 'grid';
|
|
5
6
|
var LAYOUT_LIST = 'list';
|
|
6
7
|
var ActivityCard = function(param) {
|
|
7
|
-
var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout;
|
|
8
|
+
var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, resources = param.resources;
|
|
8
9
|
if (layout === LAYOUT_GRID) {
|
|
9
10
|
return /*#__PURE__*/ jsxs("button", {
|
|
10
11
|
type: "button",
|
|
@@ -32,6 +33,9 @@ var ActivityCard = function(param) {
|
|
|
32
33
|
description && /*#__PURE__*/ jsx("div", {
|
|
33
34
|
className: "mt-2 activity-card-description",
|
|
34
35
|
children: description
|
|
36
|
+
}),
|
|
37
|
+
resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
38
|
+
resources: resources
|
|
35
39
|
})
|
|
36
40
|
]
|
|
37
41
|
})
|
|
@@ -68,6 +72,9 @@ var ActivityCard = function(param) {
|
|
|
68
72
|
description && /*#__PURE__*/ jsx("div", {
|
|
69
73
|
className: "mt-2 activity-card-description",
|
|
70
74
|
children: description
|
|
75
|
+
}),
|
|
76
|
+
resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
|
|
77
|
+
resources: resources
|
|
71
78
|
})
|
|
72
79
|
]
|
|
73
80
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,+
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,WAAW,+GAyGvB,CAAA"}
|
package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js
CHANGED
|
@@ -54,6 +54,9 @@ var NumberInput = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
54
54
|
onChange: function(e) {
|
|
55
55
|
return handleChangeValue(Number(e.target.value));
|
|
56
56
|
},
|
|
57
|
+
onWheel: function(event) {
|
|
58
|
+
return event.currentTarget.blur();
|
|
59
|
+
},
|
|
57
60
|
value: value,
|
|
58
61
|
min: 0,
|
|
59
62
|
max: max,
|
|
@@ -66,6 +69,16 @@ var NumberInput = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
66
69
|
/*#__PURE__*/ jsx("button", {
|
|
67
70
|
type: "button",
|
|
68
71
|
onClick: handleArrowUpClick,
|
|
72
|
+
onWheel: function(event) {
|
|
73
|
+
return event.currentTarget.blur();
|
|
74
|
+
},
|
|
75
|
+
onFocus: function(event) {
|
|
76
|
+
return event.target.addEventListener('wheel', function(event) {
|
|
77
|
+
return event.preventDefault();
|
|
78
|
+
}, {
|
|
79
|
+
passive: false
|
|
80
|
+
});
|
|
81
|
+
},
|
|
69
82
|
className: "payment-number-input__btn-up ".concat(plusButtonGreyedOut && 'disabled-number-input-button'),
|
|
70
83
|
disabled: disabled,
|
|
71
84
|
children: "+"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAkE3B,CAAA"}
|
|
@@ -8,6 +8,7 @@ var ProductQuantityInput = function(param) {
|
|
|
8
8
|
var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid;
|
|
9
9
|
var t = useTranslation('Design').t;
|
|
10
10
|
var onChange = function(quantity) {
|
|
11
|
+
var _category_zone;
|
|
11
12
|
_onChange({
|
|
12
13
|
id: product.id,
|
|
13
14
|
name: product.name,
|
|
@@ -15,6 +16,7 @@ var ProductQuantityInput = function(param) {
|
|
|
15
16
|
hasDeposit: category.allowDeposits && (product === null || product === void 0 ? void 0 : product.deposit) < product.price,
|
|
16
17
|
price: product.price,
|
|
17
18
|
productCategoryId: category.id,
|
|
19
|
+
zoneId: (_category_zone = category.zone) === null || _category_zone === void 0 ? void 0 : _category_zone.id,
|
|
18
20
|
quantity: quantity,
|
|
19
21
|
capacity: product === null || product === void 0 ? void 0 : product.capacity
|
|
20
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/utils/paymentSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EAEpB,WAAW,EAEZ,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"paymentSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/utils/paymentSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EAEpB,WAAW,EAEZ,MAAM,UAAU,CAAA;AA4FjB,eAAO,MAAM,oBAAoB,oEAK9B,oBAAoB,KAAG,WAAW,EAUpC,CAAA"}
|
|
@@ -7,11 +7,11 @@ export interface RyftPaymentFormProps {
|
|
|
7
7
|
isCreateLoading: boolean;
|
|
8
8
|
isAppUsingInIframe?: boolean;
|
|
9
9
|
onApplePayButtonClick?: () => void;
|
|
10
|
-
|
|
10
|
+
payButtonDisabled?: boolean;
|
|
11
11
|
initRyft: (onSuccess: () => void, onFailure: (error?: string) => void) => Promise<void>;
|
|
12
12
|
onSubmit: () => Promise<AttemptPaymentResponse>;
|
|
13
13
|
resetReferrer?: () => void;
|
|
14
14
|
providerPaymentSettings?: ProviderPaymentSettings;
|
|
15
15
|
}
|
|
16
|
-
export declare const RyftPaymentForm: ({ accountId, isCreateLoading, isAppUsingInIframe, providerPaymentSettings, onApplePayButtonClick, initRyft, resetReferrer, onSubmit, }: RyftPaymentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const RyftPaymentForm: ({ accountId, isCreateLoading, isAppUsingInIframe, providerPaymentSettings, onApplePayButtonClick, initRyft, resetReferrer, onSubmit, payButtonDisabled, }: RyftPaymentFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
//# sourceMappingURL=RyftPaymentForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CA8KtB,CAAA"}
|
|
@@ -196,7 +196,7 @@ var ryftErrorMap = {
|
|
|
196
196
|
unknown_error: 'unknownError'
|
|
197
197
|
};
|
|
198
198
|
var RyftPaymentForm = function(param) {
|
|
199
|
-
var accountId = param.accountId, isCreateLoading = param.isCreateLoading, isAppUsingInIframe = param.isAppUsingInIframe, providerPaymentSettings = param.providerPaymentSettings, onApplePayButtonClick = param.onApplePayButtonClick, initRyft = param.initRyft, resetReferrer = param.resetReferrer, onSubmit = param.onSubmit;
|
|
199
|
+
var accountId = param.accountId, isCreateLoading = param.isCreateLoading, isAppUsingInIframe = param.isAppUsingInIframe, providerPaymentSettings = param.providerPaymentSettings, onApplePayButtonClick = param.onApplePayButtonClick, initRyft = param.initRyft, resetReferrer = param.resetReferrer, onSubmit = param.onSubmit, payButtonDisabled = param.payButtonDisabled;
|
|
200
200
|
var _formRef_current_childNodes, _formRef_current, _accountId_data;
|
|
201
201
|
var t = useTranslation([
|
|
202
202
|
'Design',
|
|
@@ -303,12 +303,14 @@ var RyftPaymentForm = function(param) {
|
|
|
303
303
|
t: t,
|
|
304
304
|
isAppUsingInIframe: isAppUsingInIframe,
|
|
305
305
|
onApplePayButtonClick: onApplePayButtonClick,
|
|
306
|
+
isDisableButton: !payButtonDisabled,
|
|
306
307
|
additionalPaymentMethodsEnabled: providerPaymentSettings === null || providerPaymentSettings === void 0 ? void 0 : providerPaymentSettings.additionalPaymentMethodsEnabled
|
|
307
308
|
});
|
|
308
309
|
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
309
310
|
[
|
|
310
311
|
(_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length,
|
|
311
|
-
showApplePayButton
|
|
312
|
+
showApplePayButton,
|
|
313
|
+
payButtonDisabled
|
|
312
314
|
]);
|
|
313
315
|
useEffect(function() {
|
|
314
316
|
var _accountId_data;
|
|
@@ -375,6 +377,10 @@ var RyftPaymentForm = function(param) {
|
|
|
375
377
|
onSubmit: methods.handleSubmit(handleSubmit),
|
|
376
378
|
className: "ryft-payment-form",
|
|
377
379
|
children: [
|
|
380
|
+
/*#__PURE__*/ jsx("div", {
|
|
381
|
+
className: "form-disable-box",
|
|
382
|
+
id: "form-disable-box"
|
|
383
|
+
}),
|
|
378
384
|
/*#__PURE__*/ jsx("div", {
|
|
379
385
|
className: "submit-button-wrapper mt-4 p-1",
|
|
380
386
|
children: /*#__PURE__*/ jsxs(Button, {
|
|
@@ -2,8 +2,9 @@ import { TFunction } from 'react-i18next';
|
|
|
2
2
|
import { RyftPaymentFormProps } from '../RyftPaymentForm';
|
|
3
3
|
interface InjectComponentsInRyftForm extends Pick<RyftPaymentFormProps, 'onApplePayButtonClick' | 'isAppUsingInIframe'> {
|
|
4
4
|
t: TFunction<string[]>;
|
|
5
|
+
isDisableButton?: boolean;
|
|
5
6
|
additionalPaymentMethodsEnabled?: boolean;
|
|
6
7
|
}
|
|
7
|
-
export declare const injectComponentsInRyftForm: ({ t, additionalPaymentMethodsEnabled, isAppUsingInIframe, onApplePayButtonClick, }: InjectComponentsInRyftForm) => void;
|
|
8
|
+
export declare const injectComponentsInRyftForm: ({ t, additionalPaymentMethodsEnabled, isAppUsingInIframe, isDisableButton, onApplePayButtonClick, }: InjectComponentsInRyftForm) => void;
|
|
8
9
|
export {};
|
|
9
10
|
//# sourceMappingURL=ryft-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU,0BACR,SAAQ,IAAI,CACV,oBAAoB,EACpB,uBAAuB,GAAG,oBAAoB,CAC/C;IACD,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACtB,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEzD,UAAU,0BACR,SAAQ,IAAI,CACV,oBAAoB,EACpB,uBAAuB,GAAG,oBAAoB,CAC/C;IACD,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,+BAA+B,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED,eAAO,MAAM,0BAA0B,wGAMpC,0BAA0B,SA8E5B,CAAA"}
|