@licklist/design 0.68.4 → 0.68.5-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/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +35 -40
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +7 -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 +0 -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 +24 -23
- 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/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +2 -2
- 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/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/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 +30 -11
- 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 +59 -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/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/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/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- 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/styles/iframe-events/Calendar.scss +0 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +22 -0
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts +2 -0
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts.map +1 -0
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.js +3 -0
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.d.ts +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.d.ts.map +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.js +3 -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/package.json +9 -7
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +29 -28
- package/src/events/edit-event-modal/IntervalInput.tsx +8 -1
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -1
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +82 -85
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/iframe/event/event-card/IframeEventCard.tsx +30 -29
- 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/layout/DropDown.tsx +2 -1
- package/src/modals/confirmation/ConfirmModal.tsx +19 -3
- package/src/product-set/card/ProductSetCard.tsx +47 -8
- 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 +17 -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-zone/ProductZoneControl.tsx +1 -1
- package/src/product-set/utils/index.ts +11 -0
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
- package/src/sortable-tree/SortableTreeItem.tsx +6 -0
- package/src/styles/iframe-events/Calendar.scss +0 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +22 -0
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/tiptap-editor/TipTapMenu/extensions/constants.ts +1 -0
- package/src/tiptap-editor/TipTapMenu/extensions/utils.ts +4 -1
- package/src/typeahead/Typeahead.tsx +15 -1
- package/yarn.lock +40 -14
- package/dist/assets/iframe/selectArrow.svg.js +0 -17
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarButtons.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarButtons/CalendarButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,KAAK,oBAAoB,GAAG,IAAI,CAC9B,aAAa,EACX,WAAW,GACX,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,wBAAwB,CAC3B,CAAA;AAED,eAAO,MAAM,eAAe,sGAOzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CalendarButtons.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarButtons/CalendarButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,KAAK,oBAAoB,GAAG,IAAI,CAC9B,aAAa,EACX,WAAW,GACX,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,wBAAwB,CAC3B,CAAA;AAED,eAAO,MAAM,eAAe,sGAOzB,oBAAoB,4CAkHtB,CAAA"}
|
|
@@ -3,28 +3,27 @@ import { useCallback, useMemo } from 'react';
|
|
|
3
3
|
import { Button } from 'react-bootstrap';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { range } from 'lodash';
|
|
6
|
-
import {
|
|
6
|
+
import { DateTime } from 'luxon';
|
|
7
7
|
import { CalendarSelect } from '../CalendarSelect/CalendarSelect.js';
|
|
8
8
|
|
|
9
9
|
var CalendarButtons = function(param) {
|
|
10
10
|
var _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, initialDate = param.initialDate, currentDate = param.currentDate, setCurrentDate = param.setCurrentDate, setSelectedDate = param.setSelectedDate, getDateTimeButtonProps = param.getDateTimeButtonProps;
|
|
11
11
|
var t = useTranslation('Design').t;
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
-
}, []);
|
|
20
|
-
var onSelectPreviousMonth = useCallback(function() {
|
|
21
|
-
setCurrentDate(function(prevDate) {
|
|
22
|
-
return prevDate.minus({
|
|
23
|
-
month: 1
|
|
24
|
-
});
|
|
12
|
+
var onSelectMonth = useCallback(function(value) {
|
|
13
|
+
var selectedMonth = Number(value);
|
|
14
|
+
var nextDateTime = currentDate.set({
|
|
15
|
+
month: selectedMonth
|
|
25
16
|
});
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
if (nextDateTime <= initialDate) {
|
|
18
|
+
setCurrentDate(initialDate);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
setCurrentDate(nextDateTime);
|
|
22
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
+
[
|
|
24
|
+
setCurrentDate,
|
|
25
|
+
currentDate
|
|
26
|
+
]);
|
|
28
27
|
var yearOptions = useMemo(function() {
|
|
29
28
|
return range(initialDate.year, initialDate.year + 5, 1).map(function(year) {
|
|
30
29
|
return {
|
|
@@ -35,11 +34,21 @@ var CalendarButtons = function(param) {
|
|
|
35
34
|
}, [
|
|
36
35
|
initialDate
|
|
37
36
|
]);
|
|
38
|
-
var
|
|
39
|
-
|
|
37
|
+
var monthOptions = useMemo(function() {
|
|
38
|
+
var initialMonth = currentDate.year > initialDate.year ? 1 : initialDate.month;
|
|
39
|
+
return range(initialMonth, 13).map(function(monthNumber) {
|
|
40
|
+
return {
|
|
41
|
+
label: DateTime.fromObject({
|
|
42
|
+
month: monthNumber
|
|
43
|
+
}).toLocaleString({
|
|
44
|
+
month: 'long'
|
|
45
|
+
}),
|
|
46
|
+
value: monthNumber
|
|
47
|
+
};
|
|
48
|
+
});
|
|
40
49
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
initialDate,
|
|
51
|
+
currentDate
|
|
43
52
|
]);
|
|
44
53
|
var onSelectYear = function(value) {
|
|
45
54
|
var selectedYear = Number(value);
|
|
@@ -96,27 +105,13 @@ var CalendarButtons = function(param) {
|
|
|
96
105
|
/*#__PURE__*/ jsxs("div", {
|
|
97
106
|
className: "calendar-buttons",
|
|
98
107
|
children: [
|
|
99
|
-
/*#__PURE__*/
|
|
108
|
+
/*#__PURE__*/ jsx("div", {
|
|
100
109
|
className: "buttons-wrapper",
|
|
101
|
-
children:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
variant: "link",
|
|
107
|
-
children: /*#__PURE__*/ jsx(SvgSelectArrow, {})
|
|
108
|
-
}),
|
|
109
|
-
/*#__PURE__*/ jsx("div", {
|
|
110
|
-
className: "month-title",
|
|
111
|
-
children: currentDate.toFormat('MMMM')
|
|
112
|
-
}),
|
|
113
|
-
/*#__PURE__*/ jsx(Button, {
|
|
114
|
-
className: "calendar-button",
|
|
115
|
-
onClick: onSelectNextMonth,
|
|
116
|
-
variant: "link",
|
|
117
|
-
children: /*#__PURE__*/ jsx(SvgSelectArrow, {})
|
|
118
|
-
})
|
|
119
|
-
]
|
|
110
|
+
children: /*#__PURE__*/ jsx(CalendarSelect, {
|
|
111
|
+
options: monthOptions,
|
|
112
|
+
onChange: onSelectMonth,
|
|
113
|
+
value: currentDate.month
|
|
114
|
+
})
|
|
120
115
|
}),
|
|
121
116
|
/*#__PURE__*/ jsx(CalendarSelect, {
|
|
122
117
|
options: yearOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntervalInput.d.ts","sourceRoot":"","sources":["../../../src/events/edit-event-modal/IntervalInput.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAIxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,UAAU,kBAAkB;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"IntervalInput.d.ts","sourceRoot":"","sources":["../../../src/events/edit-event-modal/IntervalInput.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAIxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,UAAU,kBAAkB;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,2CA4JpB"}
|
|
@@ -169,6 +169,12 @@ function IntervalInput(param) {
|
|
|
169
169
|
setValue('end', nextEndtDate);
|
|
170
170
|
trigger('end');
|
|
171
171
|
};
|
|
172
|
+
var onChangeRecurrent = function(checked) {
|
|
173
|
+
setRecurrent(checked);
|
|
174
|
+
if (!checked) {
|
|
175
|
+
setValue('rrule', null);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
172
178
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
173
179
|
children: [
|
|
174
180
|
/*#__PURE__*/ jsxs(Form.Row, {
|
|
@@ -249,7 +255,7 @@ function IntervalInput(param) {
|
|
|
249
255
|
checked: recurrent,
|
|
250
256
|
onChange: function(param) {
|
|
251
257
|
var checked = param.target.checked;
|
|
252
|
-
|
|
258
|
+
onChangeRecurrent(checked);
|
|
253
259
|
},
|
|
254
260
|
disabled: disabled || Boolean(editedProductSet)
|
|
255
261
|
}),
|
|
@@ -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;AAI3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAIxE,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;CACjB;AAOD,eAAO,MAAM,aAAa,+LAavB,kBAAkB,
|
|
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;AAI3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAIxE,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;CACjB;AAOD,eAAO,MAAM,aAAa,+LAavB,kBAAkB,4CAsVpB,CAAA"}
|
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;AAGxF,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;CACjB;AAED,eAAO,MAAM,qBAAqB,iHAO/B,0BAA0B,4CAqL5B,CAAA"}
|
package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js
CHANGED
|
@@ -4,8 +4,10 @@ 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 { getTypeHeadItemsFromMenus } from '../../../../product-set/utils/index.js';
|
|
7
8
|
import { ConfirmModal } from '../../../../modals/confirmation/ConfirmModal.js';
|
|
8
9
|
import { EditEventProductSet } from './component/EditEventProductSet.js';
|
|
10
|
+
import { Typeahead } from '../../../../typeahead/Typeahead.js';
|
|
9
11
|
|
|
10
12
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
11
13
|
try {
|
|
@@ -142,6 +144,15 @@ var SelectEventProductSet = function(param) {
|
|
|
142
144
|
var productSetsId = useId();
|
|
143
145
|
var productSetId = watch('productSetId');
|
|
144
146
|
var editedProductSet = watch('editedProductSet');
|
|
147
|
+
var typeheadValues = getTypeHeadItemsFromMenus(editedProductSet ? productSets.map(function(productSet) {
|
|
148
|
+
if (productSet.id === editedProductSet.id) {
|
|
149
|
+
return editedProductSet;
|
|
150
|
+
}
|
|
151
|
+
return productSet;
|
|
152
|
+
}) : productSets);
|
|
153
|
+
var selectedProductSetTypeheadValue = productSetId ? typeheadValues === null || typeheadValues === void 0 ? void 0 : typeheadValues.find(function(typeheadValue) {
|
|
154
|
+
return typeheadValue.id === productSetId;
|
|
155
|
+
}) : undefined;
|
|
145
156
|
var onEditProductSet = useCallback(function() {
|
|
146
157
|
setEditProductSetId(String(productSetId));
|
|
147
158
|
setShowEditProductSet(true);
|
|
@@ -210,6 +221,7 @@ var SelectEventProductSet = function(param) {
|
|
|
210
221
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
211
222
|
var onSubmit = function(value) {
|
|
212
223
|
setShowEditProductSet(false);
|
|
224
|
+
setValue('productSetId', value.id);
|
|
213
225
|
setValue('editedProductSet', value);
|
|
214
226
|
};
|
|
215
227
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -226,10 +238,8 @@ var SelectEventProductSet = function(param) {
|
|
|
226
238
|
/*#__PURE__*/ jsx(Controller, {
|
|
227
239
|
control: control,
|
|
228
240
|
name: "productSetId",
|
|
229
|
-
render: function(
|
|
230
|
-
var field = param.field;
|
|
241
|
+
render: function() {
|
|
231
242
|
var _errors_productSetId;
|
|
232
|
-
var fieldValue = String(field.value);
|
|
233
243
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
234
244
|
children: [
|
|
235
245
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -237,27 +247,18 @@ var SelectEventProductSet = function(param) {
|
|
|
237
247
|
children: [
|
|
238
248
|
/*#__PURE__*/ jsx(ConfirmModal, {
|
|
239
249
|
children: function(confirm) {
|
|
240
|
-
return /*#__PURE__*/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
250
|
+
return /*#__PURE__*/ jsx(Typeahead, {
|
|
251
|
+
name: "productSetId",
|
|
252
|
+
value: selectedProductSetTypeheadValue,
|
|
253
|
+
containerStyles: {
|
|
254
|
+
width: '100%'
|
|
255
|
+
},
|
|
256
|
+
onChangeValue: function(typeheadValue) {
|
|
257
|
+
onChangeProductSet(Number(typeheadValue.id), confirm);
|
|
244
258
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
/*#__PURE__*/ jsx("option", {
|
|
249
|
-
value: "",
|
|
250
|
-
hidden: true,
|
|
251
|
-
children: t('Design:chooseProductSet')
|
|
252
|
-
}),
|
|
253
|
-
productSets === null || productSets === void 0 ? void 0 : productSets.map(function(productSet) {
|
|
254
|
-
var isCurrentEditedProductSet = editedProductSet && (editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.id) === (productSet === null || productSet === void 0 ? void 0 : productSet.id);
|
|
255
|
-
return /*#__PURE__*/ jsx("option", {
|
|
256
|
-
value: productSet.id,
|
|
257
|
-
children: isCurrentEditedProductSet || productSet.isOverride ? "[".concat(t('edited'), "] ").concat(isCurrentEditedProductSet ? editedProductSet === null || editedProductSet === void 0 ? void 0 : editedProductSet.name : productSet.name) : productSet.name
|
|
258
|
-
}, productSet.id);
|
|
259
|
-
})
|
|
260
|
-
]
|
|
259
|
+
options: typeheadValues,
|
|
260
|
+
placeholder: t('Design:choose'),
|
|
261
|
+
noOptionsMessage: t('Design:noAvailableProductSets')
|
|
261
262
|
});
|
|
262
263
|
}
|
|
263
264
|
}),
|
|
@@ -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,oBAoCD,CAAA"}
|
|
@@ -133,7 +133,6 @@ var getDefaultValues = function(productSet, hasNoRecurrences) {
|
|
|
133
133
|
subProducts: subProducts === null || subProducts === void 0 ? void 0 : subProducts.map(function(_param) {
|
|
134
134
|
var subProducts = _extends({}, _object_destructuring_empty(_param));
|
|
135
135
|
return _object_spread_props(_object_spread({}, subProducts), {
|
|
136
|
-
originalProductId: null,
|
|
137
136
|
productCategoryId: undefined
|
|
138
137
|
});
|
|
139
138
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeEventCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/event-card/IframeEventCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAA;AASnF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,cAAc,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAkB,EAClB,SAAS,EACT,SAAS,EACT,OAAO,EACP,aAAa,EACb,cAAc,EACd,YAAY,EACZ,cAAc,GACf,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"IframeEventCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/event-card/IframeEventCard.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAA;AASnF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,cAAc,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAkB,EAClB,SAAS,EACT,SAAS,EACT,OAAO,EACP,aAAa,EACb,cAAc,EACd,YAAY,EACZ,cAAc,GACf,EAAE,oBAAoB,2CAwGtB"}
|
|
@@ -25,7 +25,7 @@ function IframeEventCard(param) {
|
|
|
25
25
|
className: clsx('iframe-event-card', {
|
|
26
26
|
'list-view': isListView
|
|
27
27
|
}, className),
|
|
28
|
-
onClick: goToDetails || !snippetSetting.displayBookingButtonOnEventList ? onClick : undefined,
|
|
28
|
+
onClick: goToDetails || !(snippetSetting === null || snippetSetting === void 0 ? void 0 : snippetSetting.displayBookingButtonOnEventList) ? onClick : undefined,
|
|
29
29
|
children: [
|
|
30
30
|
showMoreInfo && /*#__PURE__*/ jsx("div", {
|
|
31
31
|
className: "iframe-event-card__info-icon",
|
|
@@ -120,7 +120,7 @@ function IframeEventCard(param) {
|
|
|
120
120
|
id: descriptionId
|
|
121
121
|
})
|
|
122
122
|
}),
|
|
123
|
-
!!snippetSetting.displayBookingButtonOnEventList && showMoreInfo && /*#__PURE__*/ jsx(Button, {
|
|
123
|
+
!!(snippetSetting === null || snippetSetting === void 0 ? void 0 : snippetSetting.displayBookingButtonOnEventList) && showMoreInfo && /*#__PURE__*/ jsx(Button, {
|
|
124
124
|
className: "step-save-btn w-25 mt-4",
|
|
125
125
|
type: "button",
|
|
126
126
|
onClick: onClick,
|
|
@@ -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"}
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,7 @@ export { ProductSetControl } from './product-set/control/ProductSetControl.js';
|
|
|
87
87
|
export { ProductSetDepositPaidControl } from './product-set/deposit-paid/ProductSetDepositPaidControl.js';
|
|
88
88
|
export { DeleteFieldButton } from './product-set/elements/DeleteFieldButton.js';
|
|
89
89
|
export { ProductSetForm } from './product-set/form/ProductSetForm.js';
|
|
90
|
+
export { ProductSetNameControl } from './product-set/form/ProductSetNameControl.js';
|
|
90
91
|
export { ProductSetPopover } from './product-set/popover/ProductSetPopover.js';
|
|
91
92
|
export { ProductBookingManagementControl } from './product-set/product/booking-management/ProductBookingManagementControl.js';
|
|
92
93
|
export { ProductDepositControl } from './product-set/product/deposit/ProductDepositControl.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface Props {
|
|
2
3
|
children?: React.ReactNode | React.ReactNode[];
|
|
3
4
|
style?: any;
|
|
4
5
|
className?: any;
|
|
5
6
|
'aria-laballedby'?: any;
|
|
6
7
|
}
|
|
7
|
-
declare const DropDown:
|
|
8
|
+
declare const DropDown: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
8
9
|
export default DropDown;
|
|
9
10
|
//# sourceMappingURL=DropDown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../src/layout/DropDown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../src/layout/DropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAA;IAC9C,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,SAAS,CAAC,EAAE,GAAG,CAAA;IACf,iBAAiB,CAAC,EAAE,GAAG,CAAA;CACxB;AAED,QAAA,MAAM,QAAQ,uEAcZ,CAAA;AAIF,eAAe,QAAQ,CAAA"}
|
|
@@ -8,6 +8,8 @@ export type ConfirmModalTypes = (typeof ConfirmModalType)[keyof typeof ConfirmMo
|
|
|
8
8
|
export interface ConfirmModalProps {
|
|
9
9
|
type?: ConfirmModalTypes;
|
|
10
10
|
children?: (confirm: (action: ConfirmAction) => void) => ReactNode;
|
|
11
|
+
confirmationHandler?: () => Promise<boolean | undefined>;
|
|
12
|
+
disabledButtons?: boolean;
|
|
11
13
|
title?: string;
|
|
12
14
|
content?: string | ReactNode;
|
|
13
15
|
onClose?: () => void;
|
|
@@ -16,5 +18,5 @@ export interface ConfirmModalProps {
|
|
|
16
18
|
export declare const CONFIRM_MODAL_ACTION_DECLINE = "confirm-modal-decline";
|
|
17
19
|
export declare const CONFIRM_MODAL_ACTION_CONFIRM = "confirm-modal-confirm";
|
|
18
20
|
export declare const CONFIRM_MODAL_ACTIONS: readonly string[];
|
|
19
|
-
export declare function ConfirmModal({ type, children, onClose, title, content, hideButtons, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function ConfirmModal({ type, children, onClose, confirmationHandler, title, disabledButtons, content, hideButtons, }: ConfirmModalProps): import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
//# sourceMappingURL=ConfirmModal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/modals/confirmation/ConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAA;AAUnD,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAA;AACtC,eAAO,MAAM,gBAAgB;;;CAGnB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAA;AAE1D,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,KAAK,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/modals/confirmation/ConfirmModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAA;AAUnD,MAAM,MAAM,aAAa,GAAG,MAAM,IAAI,CAAA;AACtC,eAAO,MAAM,gBAAgB;;;CAGnB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAA;AAE1D,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,KAAK,SAAS,CAAA;IAElE,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACxD,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,eAAO,MAAM,4BAA4B,0BAA0B,CAAA;AACnE,eAAO,MAAM,4BAA4B,0BAA0B,CAAA;AACnE,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAGlD,CAAA;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAgB,EAChB,QAAQ,EACR,OAAO,EACP,mBAAmB,EACnB,KAAK,EACL,eAAe,EACf,OAAO,EACP,WAAmB,GACpB,EAAE,iBAAiB,2CA+GnB"}
|
|
@@ -17,6 +17,35 @@ function _array_like_to_array(arr, len) {
|
|
|
17
17
|
function _array_with_holes(arr) {
|
|
18
18
|
if (Array.isArray(arr)) return arr;
|
|
19
19
|
}
|
|
20
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
21
|
+
try {
|
|
22
|
+
var info = gen[key](arg);
|
|
23
|
+
var value = info.value;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
reject(error);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (info.done) {
|
|
29
|
+
resolve(value);
|
|
30
|
+
} else {
|
|
31
|
+
Promise.resolve(value).then(_next, _throw);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function _async_to_generator(fn) {
|
|
35
|
+
return function() {
|
|
36
|
+
var self = this, args = arguments;
|
|
37
|
+
return new Promise(function(resolve, reject) {
|
|
38
|
+
var gen = fn.apply(self, args);
|
|
39
|
+
function _next(value) {
|
|
40
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
41
|
+
}
|
|
42
|
+
function _throw(err) {
|
|
43
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
44
|
+
}
|
|
45
|
+
_next(undefined);
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
}
|
|
20
49
|
function _iterable_to_array_limit(arr, i) {
|
|
21
50
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
22
51
|
if (_i == null) return;
|
|
@@ -55,6 +84,101 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
55
84
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
56
85
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
57
86
|
}
|
|
87
|
+
function _ts_generator(thisArg, body) {
|
|
88
|
+
var f, y, t, g, _ = {
|
|
89
|
+
label: 0,
|
|
90
|
+
sent: function() {
|
|
91
|
+
if (t[0] & 1) throw t[1];
|
|
92
|
+
return t[1];
|
|
93
|
+
},
|
|
94
|
+
trys: [],
|
|
95
|
+
ops: []
|
|
96
|
+
};
|
|
97
|
+
return g = {
|
|
98
|
+
next: verb(0),
|
|
99
|
+
"throw": verb(1),
|
|
100
|
+
"return": verb(2)
|
|
101
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
102
|
+
return this;
|
|
103
|
+
}), g;
|
|
104
|
+
function verb(n) {
|
|
105
|
+
return function(v) {
|
|
106
|
+
return step([
|
|
107
|
+
n,
|
|
108
|
+
v
|
|
109
|
+
]);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function step(op) {
|
|
113
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
+
while(_)try {
|
|
115
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
116
|
+
if (y = 0, t) op = [
|
|
117
|
+
op[0] & 2,
|
|
118
|
+
t.value
|
|
119
|
+
];
|
|
120
|
+
switch(op[0]){
|
|
121
|
+
case 0:
|
|
122
|
+
case 1:
|
|
123
|
+
t = op;
|
|
124
|
+
break;
|
|
125
|
+
case 4:
|
|
126
|
+
_.label++;
|
|
127
|
+
return {
|
|
128
|
+
value: op[1],
|
|
129
|
+
done: false
|
|
130
|
+
};
|
|
131
|
+
case 5:
|
|
132
|
+
_.label++;
|
|
133
|
+
y = op[1];
|
|
134
|
+
op = [
|
|
135
|
+
0
|
|
136
|
+
];
|
|
137
|
+
continue;
|
|
138
|
+
case 7:
|
|
139
|
+
op = _.ops.pop();
|
|
140
|
+
_.trys.pop();
|
|
141
|
+
continue;
|
|
142
|
+
default:
|
|
143
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
144
|
+
_ = 0;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
148
|
+
_.label = op[1];
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
152
|
+
_.label = t[1];
|
|
153
|
+
t = op;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
if (t && _.label < t[2]) {
|
|
157
|
+
_.label = t[2];
|
|
158
|
+
_.ops.push(op);
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (t[2]) _.ops.pop();
|
|
162
|
+
_.trys.pop();
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
op = body.call(thisArg, _);
|
|
166
|
+
} catch (e) {
|
|
167
|
+
op = [
|
|
168
|
+
6,
|
|
169
|
+
e
|
|
170
|
+
];
|
|
171
|
+
y = 0;
|
|
172
|
+
} finally{
|
|
173
|
+
f = t = 0;
|
|
174
|
+
}
|
|
175
|
+
if (op[0] & 5) throw op[1];
|
|
176
|
+
return {
|
|
177
|
+
value: op[0] ? op[1] : void 0,
|
|
178
|
+
done: true
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
58
182
|
var ConfirmModalType = {
|
|
59
183
|
remove: 'remove',
|
|
60
184
|
default: 'default'
|
|
@@ -66,7 +190,7 @@ var CONFIRM_MODAL_ACTIONS = [
|
|
|
66
190
|
CONFIRM_MODAL_ACTION_CONFIRM
|
|
67
191
|
];
|
|
68
192
|
function ConfirmModal(param) {
|
|
69
|
-
var _param_type = param.type, type = _param_type === void 0 ? 'default' : _param_type, children = param.children, onClose = param.onClose, title = param.title, content = param.content, _param_hideButtons = param.hideButtons, hideButtons = _param_hideButtons === void 0 ? false : _param_hideButtons;
|
|
193
|
+
var _param_type = param.type, type = _param_type === void 0 ? 'default' : _param_type, children = param.children, onClose = param.onClose, confirmationHandler = param.confirmationHandler, title = param.title, disabledButtons = param.disabledButtons, content = param.content, _param_hideButtons = param.hideButtons, hideButtons = _param_hideButtons === void 0 ? false : _param_hideButtons;
|
|
70
194
|
var t = useTranslation('Design').t;
|
|
71
195
|
var actionRef = useRef();
|
|
72
196
|
var _useState = _sliced_to_array(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
@@ -76,14 +200,49 @@ function ConfirmModal(param) {
|
|
|
76
200
|
return true;
|
|
77
201
|
});
|
|
78
202
|
};
|
|
79
|
-
var handleConfirmation = function(
|
|
80
|
-
e
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
203
|
+
var handleConfirmation = function() {
|
|
204
|
+
var _ref = _async_to_generator(function(e) {
|
|
205
|
+
var res;
|
|
206
|
+
return _ts_generator(this, function(_state) {
|
|
207
|
+
switch(_state.label){
|
|
208
|
+
case 0:
|
|
209
|
+
e.stopPropagation();
|
|
210
|
+
if (!actionRef.current && !confirmationHandler) return [
|
|
211
|
+
2
|
|
212
|
+
];
|
|
213
|
+
if (!confirmationHandler) return [
|
|
214
|
+
3,
|
|
215
|
+
2
|
|
216
|
+
];
|
|
217
|
+
return [
|
|
218
|
+
4,
|
|
219
|
+
confirmationHandler()
|
|
220
|
+
];
|
|
221
|
+
case 1:
|
|
222
|
+
res = _state.sent();
|
|
223
|
+
if (res) {
|
|
224
|
+
setIsOpen(function() {
|
|
225
|
+
return false;
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
return [
|
|
229
|
+
2
|
|
230
|
+
];
|
|
231
|
+
case 2:
|
|
232
|
+
actionRef.current();
|
|
233
|
+
setIsOpen(function() {
|
|
234
|
+
return false;
|
|
235
|
+
});
|
|
236
|
+
return [
|
|
237
|
+
2
|
|
238
|
+
];
|
|
239
|
+
}
|
|
240
|
+
});
|
|
85
241
|
});
|
|
86
|
-
|
|
242
|
+
return function handleConfirmation(e) {
|
|
243
|
+
return _ref.apply(this, arguments);
|
|
244
|
+
};
|
|
245
|
+
}();
|
|
87
246
|
var handleClose = function(e) {
|
|
88
247
|
e.stopPropagation();
|
|
89
248
|
setIsOpen(function() {
|
|
@@ -113,6 +272,7 @@ function ConfirmModal(param) {
|
|
|
113
272
|
/*#__PURE__*/ jsx(Button, {
|
|
114
273
|
variant: "danger",
|
|
115
274
|
className: "btn-sm rounded",
|
|
275
|
+
disabled: disabledButtons,
|
|
116
276
|
onClick: handleClose,
|
|
117
277
|
"data-id": CONFIRM_MODAL_ACTION_DECLINE,
|
|
118
278
|
children: /*#__PURE__*/ jsx(FaTimes, {
|
|
@@ -133,11 +293,13 @@ function ConfirmModal(param) {
|
|
|
133
293
|
variant: "outline",
|
|
134
294
|
className: "cancel-button",
|
|
135
295
|
onClick: handleClose,
|
|
296
|
+
disabled: disabledButtons,
|
|
136
297
|
"data-id": CONFIRM_MODAL_ACTION_DECLINE,
|
|
137
298
|
children: t('cancel')
|
|
138
299
|
}),
|
|
139
300
|
/*#__PURE__*/ jsx(Button, {
|
|
140
301
|
variant: "danger",
|
|
302
|
+
disabled: disabledButtons,
|
|
141
303
|
onClick: handleConfirmation,
|
|
142
304
|
"data-id": CONFIRM_MODAL_ACTION_CONFIRM,
|
|
143
305
|
children: t('remove')
|
|
@@ -147,12 +309,14 @@ function ConfirmModal(param) {
|
|
|
147
309
|
children: [
|
|
148
310
|
/*#__PURE__*/ jsx(Button, {
|
|
149
311
|
variant: "danger",
|
|
312
|
+
disabled: disabledButtons,
|
|
150
313
|
onClick: handleClose,
|
|
151
314
|
"data-id": CONFIRM_MODAL_ACTION_DECLINE,
|
|
152
315
|
children: t('decline')
|
|
153
316
|
}),
|
|
154
317
|
/*#__PURE__*/ jsx(Button, {
|
|
155
318
|
variant: "success",
|
|
319
|
+
disabled: disabledButtons,
|
|
156
320
|
onClick: handleConfirmation,
|
|
157
321
|
"data-id": CONFIRM_MODAL_ACTION_CONFIRM,
|
|
158
322
|
children: t('confirm')
|