@licklist/design 0.71.18-dev.17 → 0.71.18-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events/edit-event-modal/IntervalInput.d.ts +1 -2
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +4 -4
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -2
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +2 -12
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +0 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +1 -5
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +3 -5
- package/dist/events/event-statistic-modal/utils/index.js +3 -3
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts +1 -3
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +7 -10
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +1 -5
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +1 -12
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +0 -4
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +2 -29
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +2 -106
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -3
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -95
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +10 -83
- package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/index.js +0 -15
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +2 -2
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -4
- package/dist/index.js +2 -2
- package/dist/product-set/form/ProductSetForm.d.ts +1 -3
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +4 -6
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +5 -24
- package/dist/product-set/form/context.d.ts +1 -3
- package/dist/product-set/form/context.d.ts.map +1 -1
- package/dist/product-set/form/context.js +1 -2
- package/dist/product-set/product/ProductControl.d.ts +0 -8
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -25
- package/dist/product-set/utils/index.d.ts +0 -88
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -19
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
- package/dist/sales/coupon/utils/index.d.ts +1 -2
- package/dist/sales/coupon/utils/index.d.ts.map +1 -1
- package/dist/sales/modals/refund-modal/RefundModal.d.ts +2 -6
- package/dist/sales/modals/refund-modal/RefundModal.d.ts.map +1 -1
- package/dist/sales/modals/refund-modal/RefundModal.js +4 -8
- package/dist/sales/modals/refund-modal/index.d.ts +2 -2
- package/dist/sales/modals/refund-modal/index.d.ts.map +1 -1
- package/dist/styles/date-time-button/DateTimeButton.scss +1 -8
- package/dist/styles/events/EditEventModal.scss +0 -2
- package/dist/styles/iframe-page/Page.scss +0 -16
- package/dist/styles/iframe-page/PageBody.scss +0 -4
- package/dist/styles/modals/Modals.scss +0 -16
- package/dist/styles/product-set/EditProductSetElement.scss +0 -1
- package/dist/styles/product-set/ProductSetForm.scss +0 -11
- package/dist/styles/sales/ManualBooking.scss +0 -6
- package/dist/styles/themes/bookedit/index.scss +0 -19
- package/package.json +6 -6
- package/src/events/edit-event-modal/IntervalInput.tsx +3 -8
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -13
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -9
- package/src/events/event-statistic-modal/utils/index.ts +4 -4
- package/src/iframe/event/ticket-description/TicketDescription.tsx +4 -11
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +0 -2
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +2 -24
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -1
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +1 -42
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +75 -155
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -58
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +14 -84
- package/src/iframe/payment/order-items-table/utils/index.ts +0 -23
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +2 -2
- package/src/iframe/payment/payment-page/PaymentPage.tsx +10 -8
- package/src/product-set/form/ProductSetForm.tsx +3 -11
- package/src/product-set/form/ProductsControl.tsx +15 -33
- package/src/product-set/form/context.tsx +0 -5
- package/src/product-set/product/ProductControl.tsx +1 -37
- package/src/product-set/utils/index.ts +0 -19
- package/src/recurrence-input/RecurrenceInput.tsx +5 -3
- package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +2 -2
- package/src/sales/coupon/utils/index.ts +3 -5
- package/src/sales/modals/refund-modal/RefundModal.tsx +6 -15
- package/src/sales/modals/refund-modal/index.ts +2 -7
- package/src/styles/date-time-button/DateTimeButton.scss +1 -8
- package/src/styles/events/EditEventModal.scss +0 -2
- package/src/styles/iframe-page/Page.scss +0 -16
- package/src/styles/iframe-page/PageBody.scss +0 -4
- package/src/styles/modals/Modals.scss +0 -16
- package/src/styles/product-set/EditProductSetElement.scss +0 -1
- package/src/styles/product-set/ProductSetForm.scss +0 -11
- package/src/styles/sales/ManualBooking.scss +0 -6
- package/src/styles/themes/bookedit/index.scss +0 -19
- package/yarn.lock +376 -377
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +0 -18
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +0 -295
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts +0 -15
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +0 -90
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts +0 -14
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +0 -404
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts +0 -10
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +0 -87
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts +0 -2
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/index.d.ts +0 -2
- package/dist/iframe/ProductWithModifierModal/index.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/utils.d.ts +0 -5
- package/dist/iframe/ProductWithModifierModal/utils.d.ts.map +0 -1
- package/dist/iframe/ProductWithModifierModal/utils.js +0 -21
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts +0 -23
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +0 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.js +0 -62
- package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts +0 -2
- package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts.map +0 -1
- package/dist/iframe/order-process/components/CategoryProduct/constants.js +0 -4
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts +0 -6
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts.map +0 -1
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.js +0 -18
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +0 -212
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +0 -76
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +0 -393
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +0 -98
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/index.ts +0 -1
- package/src/iframe/ProductWithModifierModal/index.ts +0 -1
- package/src/iframe/ProductWithModifierModal/utils.ts +0 -29
- package/src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx +0 -86
- package/src/iframe/order-process/components/CategoryProduct/constants.ts +0 -1
- package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +0 -25
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { MenuStep } from '@licklist/plugins/dist/types/context/sale/menuSteps';
|
|
2
|
-
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
|
|
3
|
-
import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps';
|
|
4
|
-
import { ProductCategory } from 'dist/product-set/types';
|
|
5
|
-
import { FormOrderItem } from '../../order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput';
|
|
6
|
-
export interface ManualBookingFormValues {
|
|
7
|
-
steps: MenuStep[];
|
|
8
|
-
}
|
|
9
|
-
interface ProductWithModifierSetFormProps {
|
|
10
|
-
onHide: () => void;
|
|
11
|
-
product: Product;
|
|
12
|
-
category: ProductCategory;
|
|
13
|
-
editOrderModifier?: OrderModifierByProduct;
|
|
14
|
-
onChange: (product: FormOrderItem) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare const ProductWithModifierSetForm: ({ product, category, editOrderModifier, onChange, }: ProductWithModifierSetFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=ProductWithModifierSetForm.d.ts.map
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProductWithModifierSetForm.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAA;AAI7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,qGAAqG,CAAA;AAInI,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,QAAQ,EAAE,CAAA;CAClB;AAED,UAAU,+BAA+B;IACvC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;CAC3C;AAkBD,eAAO,MAAM,0BAA0B,wDAKpC,+BAA+B,4CA+JjC,CAAA"}
|
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { useForm, FormProvider, Controller } from 'react-hook-form';
|
|
4
|
-
import { Form, Button } from 'react-bootstrap';
|
|
5
|
-
import { isEmpty, uniqBy } from 'lodash';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { useIntl } from 'react-intl';
|
|
8
|
-
import { Currency } from '@licklist/core/dist/Config';
|
|
9
|
-
import 'recharts';
|
|
10
|
-
import 'react-loader';
|
|
11
|
-
import '@licklist/plugins/dist/hooks/Media/useWindowDimensions';
|
|
12
|
-
import clsx from 'clsx';
|
|
13
|
-
import 'moment';
|
|
14
|
-
import '@react-aria/utils';
|
|
15
|
-
import 'react-date-range';
|
|
16
|
-
import 'react-use';
|
|
17
|
-
import 'react-icons/fa';
|
|
18
|
-
import 'luxon';
|
|
19
|
-
import 'react-date-range/dist/styles.css';
|
|
20
|
-
import 'react-date-range/dist/theme/default.css';
|
|
21
|
-
import '@licklist/core/dist/DataMapper/User/UserDetailDataMapper';
|
|
22
|
-
import 'react-bootstrap/Col';
|
|
23
|
-
import 'react-bootstrap/Row';
|
|
24
|
-
import '@licklist/plugins/dist/services/Media/MediaService';
|
|
25
|
-
import '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
26
|
-
import '@licklist/core/dist/DataMapper/Product/CouponDataMapper';
|
|
27
|
-
import '@licklist/plugins/dist/validation/Rules/couponCodeRules';
|
|
28
|
-
import 'react-select';
|
|
29
|
-
import 'rrule';
|
|
30
|
-
import '@licklist/core/dist/Services';
|
|
31
|
-
import { NumberInputHorizontal } from '../../../sales/manual-booking/number-input-horizontal/NumberInputHorizontal.js';
|
|
32
|
-
import '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper';
|
|
33
|
-
import '@licklist/plugins/dist/utils/relyOnPeople';
|
|
34
|
-
import 'react-highlighter';
|
|
35
|
-
import '@licklist/plugins/dist';
|
|
36
|
-
import '@licklist/core/dist/Config/DefaultUser';
|
|
37
|
-
import '../../../typeahead-helper/TypeaheadHelperComponent.js';
|
|
38
|
-
import 'react-bootstrap/ModalHeader';
|
|
39
|
-
import 'react-bootstrap/ModalTitle';
|
|
40
|
-
import '../../../sales/constants.js';
|
|
41
|
-
import '../../../static/CurrencyNumberInput.js';
|
|
42
|
-
import '@licklist/core/dist/DataMapper/Order/OrderPaymentDataMapper';
|
|
43
|
-
import '@licklist/plugins/dist/context/sale/SalePaymentFormContext';
|
|
44
|
-
import '@licklist/core/dist/Services/Date';
|
|
45
|
-
import 'react-router-dom';
|
|
46
|
-
import '../../../static/index.js';
|
|
47
|
-
import '@licklist/core/dist/DataMapper/Order/OrderDataMapper';
|
|
48
|
-
import '@licklist/plugins/dist/utils/formatDate';
|
|
49
|
-
import '@licklist/plugins/dist/utils/sourceTitle';
|
|
50
|
-
import 'react-bootstrap/ModalBody';
|
|
51
|
-
import 'react-bootstrap/ModalFooter';
|
|
52
|
-
import 'react-bootstrap/Modal';
|
|
53
|
-
import 'react-bootstrap/PageItem';
|
|
54
|
-
import '@licklist/plugins/dist/services/Table/PaginationService';
|
|
55
|
-
import '@licklist/plugins/dist/services/Table/TableService';
|
|
56
|
-
import '@licklist/plugins/dist/hooks/Query/useQuery';
|
|
57
|
-
import '@licklist/plugins/dist/services/Route/RouteService';
|
|
58
|
-
import '../../../table/utils/index.js';
|
|
59
|
-
import '@tanstack/react-table';
|
|
60
|
-
import { MAX_PRODUCT_NUMBER } from '../../order-process/components/CategoryProduct/constants.js';
|
|
61
|
-
import { getOrderProductModifiersPrice } from '../../order-process/components/BookingSummary/utils/index.js';
|
|
62
|
-
import { ProductControl } from './controll/ProductControll.js';
|
|
63
|
-
|
|
64
|
-
function _define_property(obj, key, value) {
|
|
65
|
-
if (key in obj) {
|
|
66
|
-
Object.defineProperty(obj, key, {
|
|
67
|
-
value: value,
|
|
68
|
-
enumerable: true,
|
|
69
|
-
configurable: true,
|
|
70
|
-
writable: true
|
|
71
|
-
});
|
|
72
|
-
} else {
|
|
73
|
-
obj[key] = value;
|
|
74
|
-
}
|
|
75
|
-
return obj;
|
|
76
|
-
}
|
|
77
|
-
function _object_spread(target) {
|
|
78
|
-
for(var i = 1; i < arguments.length; i++){
|
|
79
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
80
|
-
var ownKeys = Object.keys(source);
|
|
81
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
82
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
83
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
ownKeys.forEach(function(key) {
|
|
87
|
-
_define_property(target, key, source[key]);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
return target;
|
|
91
|
-
}
|
|
92
|
-
function ownKeys(object, enumerableOnly) {
|
|
93
|
-
var keys = Object.keys(object);
|
|
94
|
-
if (Object.getOwnPropertySymbols) {
|
|
95
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
96
|
-
if (enumerableOnly) {
|
|
97
|
-
symbols = symbols.filter(function(sym) {
|
|
98
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
keys.push.apply(keys, symbols);
|
|
102
|
-
}
|
|
103
|
-
return keys;
|
|
104
|
-
}
|
|
105
|
-
function _object_spread_props(target, source) {
|
|
106
|
-
source = source != null ? source : {};
|
|
107
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
108
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
109
|
-
} else {
|
|
110
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
111
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return target;
|
|
115
|
-
}
|
|
116
|
-
var filteredOrderModifierSets = function(modifiersSet) {
|
|
117
|
-
if (!modifiersSet) return [];
|
|
118
|
-
var orderModifier = modifiersSet === null || modifiersSet === void 0 ? void 0 : modifiersSet.flat().filter(function(modifier) {
|
|
119
|
-
return !!(modifier === null || modifier === void 0 ? void 0 : modifier.quantity);
|
|
120
|
-
});
|
|
121
|
-
var filteredOrderModifier = uniqBy(orderModifier, function(item) {
|
|
122
|
-
return "".concat(item.modifierId, "-").concat(item.modifierSetId);
|
|
123
|
-
});
|
|
124
|
-
return filteredOrderModifier || [];
|
|
125
|
-
};
|
|
126
|
-
var ProductWithModifierSetForm = function(param) {
|
|
127
|
-
var product = param.product, category = param.category, editOrderModifier = param.editOrderModifier, onChange = param.onChange;
|
|
128
|
-
var _valuesOrder_product, _valuesOrder_;
|
|
129
|
-
var form = useForm({
|
|
130
|
-
mode: 'onChange'
|
|
131
|
-
});
|
|
132
|
-
var t = useTranslation([
|
|
133
|
-
'App',
|
|
134
|
-
'Sale',
|
|
135
|
-
'Validation'
|
|
136
|
-
]).t;
|
|
137
|
-
var _form_formState = form.formState, errors = _form_formState.errors, isSubmitting = _form_formState.isSubmitting, isValid = _form_formState.isValid, control = form.control, trigger = form.trigger, watch = form.watch;
|
|
138
|
-
var _editOrderModifier_productQuantity;
|
|
139
|
-
var defaultProductQuantity = (_editOrderModifier_productQuantity = editOrderModifier === null || editOrderModifier === void 0 ? void 0 : editOrderModifier.productQuantity) !== null && _editOrderModifier_productQuantity !== void 0 ? _editOrderModifier_productQuantity : 0;
|
|
140
|
-
var valuesOrder = watch();
|
|
141
|
-
var _valuesOrder_product_quantity;
|
|
142
|
-
var productQuantity = (_valuesOrder_product_quantity = valuesOrder === null || valuesOrder === void 0 ? void 0 : (_valuesOrder_product = valuesOrder.product) === null || _valuesOrder_product === void 0 ? void 0 : _valuesOrder_product.quantity) !== null && _valuesOrder_product_quantity !== void 0 ? _valuesOrder_product_quantity : defaultProductQuantity;
|
|
143
|
-
var orderModifiersSets = ((_valuesOrder_ = valuesOrder["".concat(product.id)]) === null || _valuesOrder_ === void 0 ? void 0 : _valuesOrder_.orderProductModifiers) || [];
|
|
144
|
-
var filteredOrderModifiers = filteredOrderModifierSets(orderModifiersSets);
|
|
145
|
-
var orderModifierSets = useMemo(function() {
|
|
146
|
-
return [
|
|
147
|
-
{
|
|
148
|
-
productQuantity: productQuantity !== null && productQuantity !== void 0 ? productQuantity : 1,
|
|
149
|
-
modifiers: filteredOrderModifiers
|
|
150
|
-
}
|
|
151
|
-
];
|
|
152
|
-
}, [
|
|
153
|
-
filteredOrderModifiers,
|
|
154
|
-
productQuantity
|
|
155
|
-
]);
|
|
156
|
-
var onSubmit = function(event) {
|
|
157
|
-
event.preventDefault();
|
|
158
|
-
trigger("".concat(product.id));
|
|
159
|
-
if (!isValid) return undefined;
|
|
160
|
-
var productOrder = {
|
|
161
|
-
id: product.id,
|
|
162
|
-
name: product.name,
|
|
163
|
-
deposit: product === null || product === void 0 ? void 0 : product.deposit,
|
|
164
|
-
hasDeposit: category.allowDeposits && (product === null || product === void 0 ? void 0 : product.deposit) < product.price,
|
|
165
|
-
price: product.price,
|
|
166
|
-
productCategoryId: category.id,
|
|
167
|
-
quantity: productQuantity,
|
|
168
|
-
capacity: product === null || product === void 0 ? void 0 : product.capacity,
|
|
169
|
-
orderModifiersSets: orderModifierSets
|
|
170
|
-
};
|
|
171
|
-
if (productOrder) {
|
|
172
|
-
return onChange(productOrder);
|
|
173
|
-
}
|
|
174
|
-
return undefined;
|
|
175
|
-
};
|
|
176
|
-
var handleProductQuantityChange = function(value, onChange) {
|
|
177
|
-
if (value < 0) {
|
|
178
|
-
onChange(0);
|
|
179
|
-
} else if (value > MAX_PRODUCT_NUMBER) {
|
|
180
|
-
onChange(MAX_PRODUCT_NUMBER);
|
|
181
|
-
} else {
|
|
182
|
-
onChange(value);
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
var disabledAddButton = useMemo(function() {
|
|
186
|
-
if (defaultProductQuantity) return false;
|
|
187
|
-
return !productQuantity || !isEmpty(errors);
|
|
188
|
-
}, [
|
|
189
|
-
defaultProductQuantity,
|
|
190
|
-
productQuantity,
|
|
191
|
-
errors
|
|
192
|
-
]);
|
|
193
|
-
var modifierPrice = getOrderProductModifiersPrice(orderModifierSets[0]);
|
|
194
|
-
var productWithModifierPrice = (product.price * productQuantity || 0) + modifierPrice;
|
|
195
|
-
var formatNumber = useIntl().formatNumber;
|
|
196
|
-
var formatToCurrency = function(value) {
|
|
197
|
-
return formatNumber(value, {
|
|
198
|
-
style: 'currency',
|
|
199
|
-
currency: Currency.GBP
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
return /*#__PURE__*/ jsx(FormProvider, _object_spread_props(_object_spread({}, form), {
|
|
203
|
-
children: /*#__PURE__*/ jsx(Form, {
|
|
204
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
205
|
-
className: "manual-booking-form",
|
|
206
|
-
children: [
|
|
207
|
-
/*#__PURE__*/ jsx(ProductControl, {
|
|
208
|
-
product: product,
|
|
209
|
-
editOrderModifier: editOrderModifier
|
|
210
|
-
}),
|
|
211
|
-
/*#__PURE__*/ jsxs("div", {
|
|
212
|
-
className: "bg-light m-2 p-2 rounded",
|
|
213
|
-
children: [
|
|
214
|
-
/*#__PURE__*/ jsx(Controller, {
|
|
215
|
-
control: control,
|
|
216
|
-
name: "product.quantity",
|
|
217
|
-
rules: {
|
|
218
|
-
min: {
|
|
219
|
-
value: 1,
|
|
220
|
-
message: t('Validation:fieldMinNumber', {
|
|
221
|
-
attribute: t('product'),
|
|
222
|
-
min: 1
|
|
223
|
-
})
|
|
224
|
-
},
|
|
225
|
-
max: {
|
|
226
|
-
value: !product.isUnlimited ? product.maxQuantity : MAX_PRODUCT_NUMBER,
|
|
227
|
-
message: t('Validation:fieldMaxNumber', {
|
|
228
|
-
attribute: t('product'),
|
|
229
|
-
max: product.maxQuantity
|
|
230
|
-
})
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
render: function(param) {
|
|
234
|
-
var _param_field = param.field, onChange = _param_field.onChange, value = _param_field.value, ref = _param_field.ref, _param_fieldState = param.fieldState, invalid = _param_fieldState.invalid, error = _param_fieldState.error;
|
|
235
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
236
|
-
className: "mb-8 d-flex flex-column",
|
|
237
|
-
children: [
|
|
238
|
-
/*#__PURE__*/ jsx("div", {
|
|
239
|
-
className: "quantity-container-product w-100",
|
|
240
|
-
children: /*#__PURE__*/ jsx(NumberInputHorizontal, {
|
|
241
|
-
ref: ref,
|
|
242
|
-
size: "big",
|
|
243
|
-
onChange: function(val) {
|
|
244
|
-
return handleProductQuantityChange(val, onChange);
|
|
245
|
-
},
|
|
246
|
-
onMinusClick: function(val) {
|
|
247
|
-
return handleProductQuantityChange(val, onChange);
|
|
248
|
-
},
|
|
249
|
-
onPlusClick: function(val) {
|
|
250
|
-
handleProductQuantityChange(val, onChange);
|
|
251
|
-
},
|
|
252
|
-
min: 0,
|
|
253
|
-
max: 100,
|
|
254
|
-
value: value || defaultProductQuantity,
|
|
255
|
-
className: clsx(invalid && 'error'),
|
|
256
|
-
isLoading: isSubmitting
|
|
257
|
-
})
|
|
258
|
-
}),
|
|
259
|
-
/*#__PURE__*/ jsxs("div", {
|
|
260
|
-
className: " d-flex flex-column align-items-center justify-content-center",
|
|
261
|
-
children: [
|
|
262
|
-
/*#__PURE__*/ jsx("div", {
|
|
263
|
-
className: "modifier-price pb-4 pl-5",
|
|
264
|
-
children: formatToCurrency(product.price)
|
|
265
|
-
}),
|
|
266
|
-
(error === null || error === void 0 ? void 0 : error.message) && /*#__PURE__*/ jsx("div", {
|
|
267
|
-
className: "d-flex justify-content-center mt-3 w-100",
|
|
268
|
-
children: /*#__PURE__*/ jsx("p", {
|
|
269
|
-
className: "iframe-event__message-error",
|
|
270
|
-
children: error.message
|
|
271
|
-
})
|
|
272
|
-
})
|
|
273
|
-
]
|
|
274
|
-
})
|
|
275
|
-
]
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
}),
|
|
279
|
-
/*#__PURE__*/ jsx(Button, {
|
|
280
|
-
as: "button",
|
|
281
|
-
variant: "primary",
|
|
282
|
-
className: "w-100",
|
|
283
|
-
disabled: disabledAddButton,
|
|
284
|
-
onClick: onSubmit,
|
|
285
|
-
children: "".concat(t('Design:add')).concat(modifierPrice ? " (".concat(formatToCurrency(productWithModifierPrice), ")") : '')
|
|
286
|
-
})
|
|
287
|
-
]
|
|
288
|
-
})
|
|
289
|
-
]
|
|
290
|
-
})
|
|
291
|
-
})
|
|
292
|
-
}));
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export { ProductWithModifierSetForm };
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
|
|
2
|
-
import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps';
|
|
3
|
-
import { ProductCategory } from 'dist/product-set/types';
|
|
4
|
-
import { FormOrderItem } from '../../order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput';
|
|
5
|
-
interface ProductWithModifierSetModalProps {
|
|
6
|
-
show: boolean;
|
|
7
|
-
onHide: () => void;
|
|
8
|
-
product: Product;
|
|
9
|
-
category: ProductCategory;
|
|
10
|
-
editOrderModifier?: OrderModifierByProduct;
|
|
11
|
-
onChange: (product: FormOrderItem) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const ProductWithModifierSetModal: ({ show, onHide, product, category, onChange, editOrderModifier, }: ProductWithModifierSetModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=ProductWithModifierSetModal.d.ts.map
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProductWithModifierSetModal.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAA;AAG7E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qGAAqG,CAAA;AAInI,UAAU,gCAAgC;IACxC,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;IAC1C,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;CAC3C;AAED,eAAO,MAAM,2BAA2B,sEAOrC,gCAAgC,4CAgDlC,CAAA"}
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import 'react';
|
|
3
|
-
import { Modal } from 'react-bootstrap';
|
|
4
|
-
import 'react-i18next';
|
|
5
|
-
import 'react-bootstrap/ModalHeader';
|
|
6
|
-
import 'react-bootstrap/ModalTitle';
|
|
7
|
-
import 'react-bootstrap/ModalBody';
|
|
8
|
-
import 'react-bootstrap/ModalFooter';
|
|
9
|
-
import 'react-bootstrap/Modal';
|
|
10
|
-
import 'react-icons/fa';
|
|
11
|
-
import { useDialogContext, DialogContextProvider } from '../../../modals/dialog/DialogContext.js';
|
|
12
|
-
import 'react-swipeable';
|
|
13
|
-
import 'react-bootstrap/Button';
|
|
14
|
-
import '@licklist/plugins/dist/services/Route/RouteService';
|
|
15
|
-
import 'react-intl';
|
|
16
|
-
import clsx from 'clsx';
|
|
17
|
-
import '../../../tiptap-editor/TipTapEditor.js';
|
|
18
|
-
import '@licklist/core/dist/Config';
|
|
19
|
-
import 'luxon';
|
|
20
|
-
import '../../event/event-card/IframeEventCardSkeleton.js';
|
|
21
|
-
import { TicketDescription } from '../../event/ticket-description/TicketDescription.js';
|
|
22
|
-
import 'react-bootstrap/Accordion';
|
|
23
|
-
import 'react-bootstrap/Card';
|
|
24
|
-
import 'react-bootstrap/AccordionToggle';
|
|
25
|
-
import 'react-bootstrap/AccordionContext';
|
|
26
|
-
import '../../../static/index.js';
|
|
27
|
-
import '@licklist/plugins/dist/services/Media/MediaService';
|
|
28
|
-
import '../../event/event-venue-map/IframeEventVenueMap.js';
|
|
29
|
-
import { useOnWindowUnmount } from '../../order-process/components/utils/useOnWindowUnmount.js';
|
|
30
|
-
import { ProductWithModifierSetForm } from './ProductWithModifierSetForm.js';
|
|
31
|
-
|
|
32
|
-
var ProductWithModifierSetModal = function(param) {
|
|
33
|
-
var show = param.show, onHide = param.onHide, product = param.product, category = param.category, onChange = param.onChange, editOrderModifier = param.editOrderModifier;
|
|
34
|
-
var _useDialogContext = useDialogContext(), onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState;
|
|
35
|
-
useOnWindowUnmount({
|
|
36
|
-
onBeforeUnload: onBeforeUnload,
|
|
37
|
-
onPopState: onPopState
|
|
38
|
-
});
|
|
39
|
-
return /*#__PURE__*/ jsx(DialogContextProvider, {
|
|
40
|
-
children: /*#__PURE__*/ jsxs(Modal, {
|
|
41
|
-
onHide: onHide,
|
|
42
|
-
show: show,
|
|
43
|
-
className: "m-0 manual-booking-form-modal mt-0 h-100 p-0",
|
|
44
|
-
dialogClassName: "manual-booking-dialog mt-0",
|
|
45
|
-
children: [
|
|
46
|
-
/*#__PURE__*/ jsx("div", {
|
|
47
|
-
className: "close-button",
|
|
48
|
-
children: /*#__PURE__*/ jsx("button", {
|
|
49
|
-
type: "button",
|
|
50
|
-
onClick: onHide,
|
|
51
|
-
onKeyPress: onHide,
|
|
52
|
-
className: "btn btn-light rounded-circle position-absolute top-0 end-0 m-2",
|
|
53
|
-
children: "\xd7"
|
|
54
|
-
})
|
|
55
|
-
}),
|
|
56
|
-
/*#__PURE__*/ jsx("div", {
|
|
57
|
-
className: "right-block",
|
|
58
|
-
id: "select-event-container",
|
|
59
|
-
children: /*#__PURE__*/ jsxs("div", {
|
|
60
|
-
className: clsx('manual-booking-container', !product.images.length && 'tw-mt-8'),
|
|
61
|
-
children: [
|
|
62
|
-
/*#__PURE__*/ jsx("div", {
|
|
63
|
-
className: "manual-booking-header",
|
|
64
|
-
children: /*#__PURE__*/ jsx(TicketDescription, {
|
|
65
|
-
title: product.name,
|
|
66
|
-
description: product.description,
|
|
67
|
-
className: clsx('iframe-event__product-description', !product.images.length && 'mt-6'),
|
|
68
|
-
classNameProductModal: "d-block",
|
|
69
|
-
images: product.images,
|
|
70
|
-
isRequired: product.isRequired,
|
|
71
|
-
canExpand: true,
|
|
72
|
-
isModal: true
|
|
73
|
-
})
|
|
74
|
-
}),
|
|
75
|
-
/*#__PURE__*/ jsx(ProductWithModifierSetForm, {
|
|
76
|
-
product: product,
|
|
77
|
-
onHide: onHide,
|
|
78
|
-
editOrderModifier: editOrderModifier,
|
|
79
|
-
onChange: onChange,
|
|
80
|
-
category: category
|
|
81
|
-
})
|
|
82
|
-
]
|
|
83
|
-
})
|
|
84
|
-
})
|
|
85
|
-
]
|
|
86
|
-
})
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { ProductWithModifierSetModal };
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { OrderModifier } from '@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper';
|
|
2
|
-
import { Modifier } from '@licklist/core/dist/DataMapper/Product/ModifierDataMapper';
|
|
3
|
-
import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper';
|
|
4
|
-
interface ModifiersSetControllProps {
|
|
5
|
-
modifiers?: Modifier[];
|
|
6
|
-
modifierSet: ModifierSet;
|
|
7
|
-
isLoading?: boolean;
|
|
8
|
-
isEditMode?: boolean;
|
|
9
|
-
productId: number;
|
|
10
|
-
orderProductModifierSets?: OrderModifier[];
|
|
11
|
-
}
|
|
12
|
-
export declare const ModifiersSetControl: ({ modifierSet, modifiers, productId, isLoading, isEditMode, orderProductModifierSets, }: ModifiersSetControllProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=ModifierSetControll.d.ts.map
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModifierSetControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAY1F,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB,CAAC,EAAE,aAAa,EAAE,CAAA;CAC3C;AAED,eAAO,MAAM,mBAAmB,4FAO7B,yBAAyB,4CA4U3B,CAAA"}
|