@licklist/design 0.66.10-dev.0 → 0.66.10-dev.3
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/auth/Login/LoginComponent.js +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +7 -2
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +22 -9
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +3 -3
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -3
- package/dist/product-set/form/ProductZonesControl.d.ts +9 -0
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -0
- package/dist/product-set/form/ProductZonesControl.js +214 -0
- package/dist/product-set/form/ProductsControl.d.ts +1 -3
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +2 -13
- package/dist/product-set/product/ProductControl.d.ts +5 -8
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +19 -301
- package/dist/product-set/product/advanced-options/AdvancedOptions.d.ts +8 -0
- package/dist/product-set/product/advanced-options/AdvancedOptions.d.ts.map +1 -0
- package/dist/product-set/product/advanced-options/AdvancedOptions.js +264 -0
- package/dist/product-set/product/advanced-options/index.d.ts +2 -0
- package/dist/product-set/product/advanced-options/index.d.ts.map +1 -0
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -0
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -2
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +2 -57
- package/dist/product-set/product-zone/ProductZoneControl.d.ts +15 -0
- package/dist/product-set/product-zone/ProductZoneControl.d.ts.map +1 -0
- package/dist/product-set/product-zone/ProductZoneControl.js +263 -0
- package/dist/product-set/product-zone/index.d.ts +2 -0
- package/dist/product-set/product-zone/index.d.ts.map +1 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +3 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts +3 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +15 -5
- package/dist/styles/product-set/CreateProductSetItem.scss +8 -0
- package/dist/styles/product-set/EditZoneSettingModal.scss +16 -0
- package/dist/styles/product-set/ProductSetForm.scss +14 -1
- package/dist/styles/product-set/_index.scss +2 -1
- package/package.json +1 -1
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -4
- package/src/layout/DropDown.tsx +1 -1
- package/src/product-set/control/ProductSetControl.tsx +2 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +0 -3
- package/src/product-set/form/ProductZonesControl.tsx +178 -0
- package/src/product-set/form/ProductsControl.tsx +0 -17
- package/src/product-set/product/ProductControl.tsx +23 -268
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +168 -0
- package/src/product-set/product/advanced-options/index.ts +1 -0
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +1 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +1 -60
- package/src/product-set/product-zone/ProductZoneControl.tsx +247 -0
- package/src/product-set/product-zone/index.ts +1 -0
- package/src/product-set/utils/index.ts +5 -1
- package/src/sortable-tree/SortableTreeItem.tsx +59 -45
- package/src/styles/product-set/CreateProductSetItem.scss +8 -0
- package/src/styles/product-set/EditZoneSettingModal.scss +16 -0
- package/src/styles/product-set/ProductSetForm.scss +14 -1
- package/src/styles/product-set/_index.scss +2 -1
- package/yarn.lock +108 -87
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { QUANTITY_TYPE_LIST_DTO, QUANTITY_TYPE_CONSTANT, QUANTITY_TYPE_RECHARGING
|
|
3
|
-
import { PRODUCT_DEfAULT_COLORS } from '@licklist/core/dist/DataMapper/Product/ProductDataMapper';
|
|
2
|
+
import { QUANTITY_TYPE_LIST_DTO, QUANTITY_TYPE_CONSTANT, QUANTITY_TYPE_RECHARGING } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
4
3
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
import { useId } from '@react-aria/utils';
|
|
@@ -14,6 +13,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
14
13
|
import { useImages } from '@licklist/plugins/dist/hooks/Media/useImages';
|
|
15
14
|
import { IMAGE_TYPE_IMAGE } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
16
15
|
import { FaClipboard } from 'react-icons/fa';
|
|
16
|
+
import { checkIfZoneCategory } from '@licklist/plugins';
|
|
17
17
|
import { FileUpload } from '../../file-upload/FileUpload.js';
|
|
18
18
|
import '../../static/index.js';
|
|
19
19
|
import { ProductSetLoadingContext } from '../form/context.js';
|
|
@@ -22,55 +22,11 @@ import { ProductDepositControl } from './deposit/ProductDepositControl.js';
|
|
|
22
22
|
import { ProductQuantityControl } from './quantity/ProductQuantityControl.js';
|
|
23
23
|
import { ProductQuantityConstantControl } from './quantity/ProductQuantityConstantControl.js';
|
|
24
24
|
import { ProductQuantityRechargingControl } from './quantity/ProductQuantityRechargingControl.js';
|
|
25
|
-
import '@licklist/core/dist/DataMapper/Provider/SnippetTemplateDataMapper';
|
|
26
|
-
import { PropertyControl } from '../../snippet/snippet-template/control/PropertyControl.js';
|
|
27
|
-
import 'react-bootstrap/Button';
|
|
28
|
-
import 'lodash';
|
|
29
|
-
import '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
30
|
-
import 'react-router-dom';
|
|
31
|
-
import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
32
|
-
import '../../calendar/Calendar.js';
|
|
33
|
-
import 'luxon';
|
|
34
|
-
import 'react-intl';
|
|
35
25
|
import { TipTapEditor } from '../../tiptap-editor/TipTapEditor.js';
|
|
36
|
-
import '@licklist/core/dist/Config';
|
|
37
|
-
import '../../iframe/event/event-card/IframeEventCardSkeleton.js';
|
|
38
|
-
import '../../iframe/page/Page.js';
|
|
39
|
-
import '../../iframe/page/components/PageBody/PageBody.js';
|
|
40
|
-
import 'react-swipeable';
|
|
41
|
-
import '@licklist/plugins/dist/services/Route/RouteService';
|
|
42
|
-
import '@licklist/plugins/dist/services/Media/MediaService';
|
|
43
|
-
import 'react-bootstrap/Accordion';
|
|
44
|
-
import 'react-bootstrap/Card';
|
|
45
|
-
import 'react-bootstrap/AccordionToggle';
|
|
46
|
-
import 'react-bootstrap/AccordionContext';
|
|
47
|
-
import '../../iframe/event/event-venue-map/IframeEventVenueMap.js';
|
|
48
|
-
import 'react-bootstrap/PageItem';
|
|
49
|
-
import '@licklist/plugins/dist/services/Table/PaginationService';
|
|
50
|
-
import '@licklist/plugins/dist/services/Table/TableService';
|
|
51
|
-
import '@licklist/plugins/dist/hooks/Query/useQuery';
|
|
52
|
-
import 'react-loader';
|
|
53
|
-
import '../../table/utils/index.js';
|
|
54
|
-
import '@tanstack/react-table';
|
|
55
|
-
import '../../iframe/payment/order-items-table/hooks/useTableData.js';
|
|
56
|
-
import '@licklist/plugins/dist/context/payment/PaymentSessionContext';
|
|
57
|
-
import 'react-bootstrap/Alert';
|
|
58
|
-
import '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
|
|
59
|
-
import '@licklist/plugins/dist';
|
|
60
|
-
import '../../iframe/order-process/components/BookingSummary/BookingSummary.js';
|
|
61
|
-
import '../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js';
|
|
62
|
-
import 'react-bootstrap/ModalHeader';
|
|
63
|
-
import 'react-bootstrap/ModalTitle';
|
|
64
|
-
import 'react-bootstrap/ModalBody';
|
|
65
|
-
import 'react-bootstrap/Modal';
|
|
66
|
-
import '../../iframe/payment/payment-status-page/PaymentStatusPage.js';
|
|
67
|
-
import '../../static/manual-date-picker/constants/index.js';
|
|
68
|
-
import '../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js';
|
|
69
|
-
import { FixedDurationOptions } from './fixed-duration-fields/FixedDurationOptions.js';
|
|
70
|
-
import { ProductDurationControl } from './duration/ProductDurationControl.js';
|
|
71
26
|
import { ProductPriceControl } from './price/ProductPriceControl.js';
|
|
72
27
|
import { MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH } from './constants.js';
|
|
73
|
-
import {
|
|
28
|
+
import { AdvancedOptions } from './advanced-options/AdvancedOptions.js';
|
|
29
|
+
import { ProductZonesControl } from '../form/ProductZonesControl.js';
|
|
74
30
|
import { BooleanSwitch } from '../../static/switch/BooleanSwitch.js';
|
|
75
31
|
|
|
76
32
|
function _array_like_to_array(arr, len) {
|
|
@@ -172,9 +128,9 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
172
128
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
173
129
|
}
|
|
174
130
|
function ProductControl(param) {
|
|
175
|
-
var _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, fieldNamePrefix = param.fieldNamePrefix, _param_allowDeposits = param.allowDeposits, allowDeposits = _param_allowDeposits === void 0 ? false : _param_allowDeposits, _param_hasBookingManagement = param.hasBookingManagement, hasBookingManagement = _param_hasBookingManagement === void 0 ? false : _param_hasBookingManagement, _param_zoneList = param.zoneList, zoneList = _param_zoneList === void 0 ? [] : _param_zoneList, onCopy = param.onCopy, onProductNameChange = param.onProductNameChange, productName = param.productName, hasTicket = param.hasTicket, categoryType = param.categoryType,
|
|
176
|
-
var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, setValue = _useFormContext.setValue, getValues = _useFormContext.getValues, watch = _useFormContext.watch
|
|
177
|
-
var
|
|
131
|
+
var _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, fieldNamePrefix = param.fieldNamePrefix, _param_allowDeposits = param.allowDeposits, allowDeposits = _param_allowDeposits === void 0 ? false : _param_allowDeposits, _param_hasBookingManagement = param.hasBookingManagement, hasBookingManagement = _param_hasBookingManagement === void 0 ? false : _param_hasBookingManagement, _param_zoneList = param.zoneList, zoneList = _param_zoneList === void 0 ? [] : _param_zoneList, onCopy = param.onCopy, onProductNameChange = param.onProductNameChange, productName = param.productName, hasTicket = param.hasTicket, categoryType = param.categoryType, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides;
|
|
132
|
+
var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, setValue = _useFormContext.setValue, getValues = _useFormContext.getValues, watch = _useFormContext.watch;
|
|
133
|
+
var setLoading = useContext(ProductSetLoadingContext).setLoading;
|
|
178
134
|
var t = useTranslation([
|
|
179
135
|
"Design",
|
|
180
136
|
"Validation",
|
|
@@ -184,20 +140,14 @@ function ProductControl(param) {
|
|
|
184
140
|
var _useState1 = _sliced_to_array(useState(null), 2), initialImages = _useState1[0], setInitialImages = _useState1[1];
|
|
185
141
|
// @TODO: After checking "isUnlimited" checkbox need to reset field totalQuantity
|
|
186
142
|
var isUnlimited = Boolean(watch("".concat(fieldNamePrefix, ".isUnlimited")));
|
|
187
|
-
var capacity = watch("".concat(fieldNamePrefix, ".capacity"));
|
|
188
|
-
var disabledDuration = capacity === "0" || !capacity;
|
|
189
143
|
var advancedId = useId();
|
|
190
144
|
var nameId = useId();
|
|
191
|
-
var productGroupId = useId();
|
|
192
145
|
var descriptionId = useId();
|
|
193
|
-
var termsAndConditionsId = useId();
|
|
194
146
|
var isAvailableId = useId();
|
|
195
147
|
var isSoldOutId = useId();
|
|
196
|
-
var isRequiredId = useId();
|
|
197
148
|
var quantitySelectorId = useId();
|
|
198
|
-
var hasSpecialNotesId = useId();
|
|
199
149
|
var unlimitedQuantityId = useId();
|
|
200
|
-
var
|
|
150
|
+
var isZoneCategory = checkIfZoneCategory(categoryType);
|
|
201
151
|
var quantitySelectorList = [
|
|
202
152
|
{
|
|
203
153
|
id: 1,
|
|
@@ -223,12 +173,6 @@ function ProductControl(param) {
|
|
|
223
173
|
}, [
|
|
224
174
|
handleImageUploading
|
|
225
175
|
]);
|
|
226
|
-
var onChangeGameCapacity = function(value) {
|
|
227
|
-
if (!zoneDuration) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
setValue("".concat(fieldNamePrefix, ".duration"), /* @ts-expect-error 6385 */ value * zoneDuration);
|
|
231
|
-
};
|
|
232
176
|
var onImageRemove = useCallback(function(id, path) {
|
|
233
177
|
handleImageRemove(String(id), path);
|
|
234
178
|
}, [
|
|
@@ -260,17 +204,6 @@ function ProductControl(param) {
|
|
|
260
204
|
fieldNamePrefix,
|
|
261
205
|
setValue
|
|
262
206
|
]);
|
|
263
|
-
useEffect(function() {
|
|
264
|
-
if (!disabledDuration) {
|
|
265
|
-
trigger("".concat(fieldNamePrefix, ".duration"));
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
setValue("".concat(fieldNamePrefix, ".duration"), /* @ts-expect-error 6385 */ 0);
|
|
269
|
-
clearErrors("".concat(fieldNamePrefix, ".duration"));
|
|
270
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
271
|
-
}, [
|
|
272
|
-
disabledDuration
|
|
273
|
-
]);
|
|
274
207
|
var quantitySelector = quantityValue !== null && quantityValue !== void 0 ? quantityValue : "1";
|
|
275
208
|
var quantity = QUANTITY_TYPE_LIST_DTO[quantitySelector];
|
|
276
209
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
@@ -412,172 +345,17 @@ function ProductControl(param) {
|
|
|
412
345
|
children: HookFormService.getErrors("".concat(fieldNamePrefix, ".quantitySelector"), errors)
|
|
413
346
|
})
|
|
414
347
|
]
|
|
415
|
-
}),
|
|
416
|
-
/*#__PURE__*/ jsx(PropertyControl, {
|
|
417
|
-
item: "".concat(fieldNamePrefix, ".color"),
|
|
418
|
-
label: t("ProductSet:selectColor"),
|
|
419
|
-
isDisabled: isOverrides,
|
|
420
|
-
isRequired: false,
|
|
421
|
-
defaultColors: PRODUCT_DEfAULT_COLORS
|
|
422
|
-
}),
|
|
423
|
-
/*#__PURE__*/ jsxs(Form.Group, {
|
|
424
|
-
controlId: productGroupId,
|
|
425
|
-
children: [
|
|
426
|
-
/*#__PURE__*/ jsx(Form.Label, {
|
|
427
|
-
children: t("productGroup")
|
|
428
|
-
}),
|
|
429
|
-
/*#__PURE__*/ jsxs(Form.Control, _object_spread_props(_object_spread({
|
|
430
|
-
as: "select"
|
|
431
|
-
}, register("".concat(fieldNamePrefix, ".productGroupId"))), {
|
|
432
|
-
isInvalid: HookFormService.isInvalid("".concat(fieldNamePrefix, ".productGroupId"), errors),
|
|
433
|
-
disabled: isLoading || isOverrides,
|
|
434
|
-
defaultValue: "",
|
|
435
|
-
children: [
|
|
436
|
-
/*#__PURE__*/ jsx("option", {
|
|
437
|
-
value: "",
|
|
438
|
-
children: t("Design:selectProductGroup")
|
|
439
|
-
}),
|
|
440
|
-
productGroupList.map(function(productGroup) {
|
|
441
|
-
return /*#__PURE__*/ jsx("option", {
|
|
442
|
-
value: productGroup.id,
|
|
443
|
-
children: productGroup.value
|
|
444
|
-
}, productGroup.id);
|
|
445
|
-
})
|
|
446
|
-
]
|
|
447
|
-
})),
|
|
448
|
-
/*#__PURE__*/ jsx(Form.Control.Feedback, {
|
|
449
|
-
type: "invalid",
|
|
450
|
-
children: HookFormService.getErrors("".concat(fieldNamePrefix, ".productGroupId"), errors)
|
|
451
|
-
})
|
|
452
|
-
]
|
|
453
348
|
})
|
|
454
349
|
]
|
|
455
350
|
})
|
|
456
351
|
}),
|
|
457
|
-
categoryType === CATEGORY_TYPE_FIXED_DURATION && /*#__PURE__*/ jsxs(Row, {
|
|
458
|
-
className: "align-items-start duration-capacity-container",
|
|
459
|
-
children: [
|
|
460
|
-
/*#__PURE__*/ jsx(ProductDurationControl, {
|
|
461
|
-
fieldNamePrefix: fieldNamePrefix,
|
|
462
|
-
disabled: disabledDuration || isOverrides
|
|
463
|
-
}),
|
|
464
|
-
/*#__PURE__*/ jsx(Col, {
|
|
465
|
-
lg: 4,
|
|
466
|
-
md: 4,
|
|
467
|
-
children: /*#__PURE__*/ jsx(FormNumberInput, {
|
|
468
|
-
fieldName: "".concat(fieldNamePrefix, ".capacity"),
|
|
469
|
-
label: t("capacity"),
|
|
470
|
-
disabled: isOverrides,
|
|
471
|
-
rules: {
|
|
472
|
-
min: {
|
|
473
|
-
value: 0,
|
|
474
|
-
message: t("Validation:fieldMinNumber", {
|
|
475
|
-
attribute: t("capacity"),
|
|
476
|
-
min: 0
|
|
477
|
-
})
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
})
|
|
481
|
-
}),
|
|
482
|
-
disabledDuration && /*#__PURE__*/ jsx("div", {
|
|
483
|
-
className: "duration-hint duration-capacity-container",
|
|
484
|
-
children: t("Design:forDurationEditing")
|
|
485
|
-
})
|
|
486
|
-
]
|
|
487
|
-
}),
|
|
488
|
-
categoryType === CATEGORY_TYPE_GAME && /*#__PURE__*/ jsxs(Fragment, {
|
|
489
|
-
children: [
|
|
490
|
-
/*#__PURE__*/ jsxs(Row, {
|
|
491
|
-
className: "align-items-start duration-capacity-container",
|
|
492
|
-
children: [
|
|
493
|
-
/*#__PURE__*/ jsx(Col, {
|
|
494
|
-
lg: 4,
|
|
495
|
-
md: 4,
|
|
496
|
-
children: /*#__PURE__*/ jsx(FormNumberInput, {
|
|
497
|
-
fieldName: "".concat(fieldNamePrefix, ".capacity"),
|
|
498
|
-
label: t("capacity"),
|
|
499
|
-
onChange: onChangeGameCapacity,
|
|
500
|
-
disabled: isOverrides,
|
|
501
|
-
rules: {
|
|
502
|
-
min: {
|
|
503
|
-
value: 0,
|
|
504
|
-
message: t("Validation:fieldMinNumber", {
|
|
505
|
-
attribute: t("capacity"),
|
|
506
|
-
min: 1
|
|
507
|
-
})
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
})
|
|
511
|
-
}),
|
|
512
|
-
/*#__PURE__*/ jsx(Col, {
|
|
513
|
-
lg: 4,
|
|
514
|
-
md: 4,
|
|
515
|
-
children: /*#__PURE__*/ jsx(FormNumberInput, {
|
|
516
|
-
fieldName: "".concat(fieldNamePrefix, ".duration"),
|
|
517
|
-
label: t("durationMinutes"),
|
|
518
|
-
disabled: disabledDuration || isOverrides,
|
|
519
|
-
rules: {
|
|
520
|
-
min: {
|
|
521
|
-
value: 0,
|
|
522
|
-
message: t("Validation:fieldMinNumber", {
|
|
523
|
-
attribute: t("duration"),
|
|
524
|
-
min: 0
|
|
525
|
-
})
|
|
526
|
-
},
|
|
527
|
-
validate: function(val) {
|
|
528
|
-
if (!disabledDuration && (!val || val < 1)) {
|
|
529
|
-
return t("Validation:fieldRequired", {
|
|
530
|
-
attribute: t("duration")
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
return true;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
})
|
|
537
|
-
})
|
|
538
|
-
]
|
|
539
|
-
}),
|
|
540
|
-
disabledDuration && /*#__PURE__*/ jsx("div", {
|
|
541
|
-
className: "duration-hint pl-0",
|
|
542
|
-
children: t("Design:forDurationEditing")
|
|
543
|
-
})
|
|
544
|
-
]
|
|
545
|
-
}),
|
|
546
352
|
/*#__PURE__*/ jsxs(Row, {
|
|
547
|
-
className: "
|
|
353
|
+
className: "my-4 mx-0 d-flex flex-column",
|
|
548
354
|
children: [
|
|
549
|
-
/*#__PURE__*/ jsx(
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
controlId: termsAndConditionsId,
|
|
554
|
-
children: [
|
|
555
|
-
/*#__PURE__*/ jsx(Form.Label, {
|
|
556
|
-
children: t("productTermsConditions")
|
|
557
|
-
}),
|
|
558
|
-
/*#__PURE__*/ jsx(Controller, {
|
|
559
|
-
render: function(param) {
|
|
560
|
-
var _param_field = param.field, value = _param_field.value, onChange = _param_field.onChange, name = _param_field.name, ref = _param_field.ref;
|
|
561
|
-
return /*#__PURE__*/ jsx(Form.Control, {
|
|
562
|
-
ref: ref,
|
|
563
|
-
as: "textarea",
|
|
564
|
-
rows: 3,
|
|
565
|
-
value: value,
|
|
566
|
-
onChange: onChange,
|
|
567
|
-
isInvalid: HookFormService.isInvalid("".concat(fieldNamePrefix, ".termsAndConditions"), errors),
|
|
568
|
-
disabled: isLoading || isOverrides,
|
|
569
|
-
name: name
|
|
570
|
-
});
|
|
571
|
-
},
|
|
572
|
-
control: control,
|
|
573
|
-
name: "".concat(fieldNamePrefix, ".termsAndConditions")
|
|
574
|
-
}),
|
|
575
|
-
/*#__PURE__*/ jsx(Form.Control.Feedback, {
|
|
576
|
-
type: "invalid",
|
|
577
|
-
children: HookFormService.getErrors("".concat(fieldNamePrefix, ".termsAndConditions"), errors)
|
|
578
|
-
})
|
|
579
|
-
]
|
|
580
|
-
})
|
|
355
|
+
isZoneCategory && /*#__PURE__*/ jsx(ProductZonesControl, {
|
|
356
|
+
isOverrides: isOverrides,
|
|
357
|
+
fieldNamePrefix: fieldNamePrefix,
|
|
358
|
+
categoryType: categoryType
|
|
581
359
|
}),
|
|
582
360
|
/*#__PURE__*/ jsx(Col, {
|
|
583
361
|
lg: 4,
|
|
@@ -682,72 +460,12 @@ function ProductControl(param) {
|
|
|
682
460
|
children: [
|
|
683
461
|
/*#__PURE__*/ jsx(Collapse, {
|
|
684
462
|
in: expanded,
|
|
685
|
-
children: /*#__PURE__*/
|
|
686
|
-
children:
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
/*#__PURE__*/ jsx(Form.Label, {
|
|
692
|
-
children: t("isRequired")
|
|
693
|
-
}),
|
|
694
|
-
/*#__PURE__*/ jsx(Controller, {
|
|
695
|
-
render: function(param) {
|
|
696
|
-
var _param_field = param.field, value = _param_field.value, onChange = _param_field.onChange, name = _param_field.name;
|
|
697
|
-
return /*#__PURE__*/ jsx(BooleanSwitch, {
|
|
698
|
-
name: name,
|
|
699
|
-
value: Boolean(value),
|
|
700
|
-
onChange: onChange,
|
|
701
|
-
disabled: isLoading || isOverrides
|
|
702
|
-
});
|
|
703
|
-
},
|
|
704
|
-
control: control,
|
|
705
|
-
name: "".concat(fieldNamePrefix, ".isRequired")
|
|
706
|
-
})
|
|
707
|
-
]
|
|
708
|
-
}),
|
|
709
|
-
/*#__PURE__*/ jsxs(Form.Group, {
|
|
710
|
-
controlId: hasSpecialNotesId,
|
|
711
|
-
className: "advanced-switch-container",
|
|
712
|
-
children: [
|
|
713
|
-
/*#__PURE__*/ jsx(Form.Label, {
|
|
714
|
-
children: t("hasSpecialNotes")
|
|
715
|
-
}),
|
|
716
|
-
/*#__PURE__*/ jsx(Controller, {
|
|
717
|
-
render: function(param) {
|
|
718
|
-
var _param_field = param.field, value = _param_field.value, onChange = _param_field.onChange, name = _param_field.name;
|
|
719
|
-
return /*#__PURE__*/ jsx(BooleanSwitch, {
|
|
720
|
-
name: name,
|
|
721
|
-
value: Boolean(value),
|
|
722
|
-
onChange: onChange,
|
|
723
|
-
disabled: isLoading || isOverrides
|
|
724
|
-
});
|
|
725
|
-
},
|
|
726
|
-
control: control,
|
|
727
|
-
name: "".concat(fieldNamePrefix, ".hasSpecialNotes")
|
|
728
|
-
})
|
|
729
|
-
]
|
|
730
|
-
}),
|
|
731
|
-
[
|
|
732
|
-
CATEGORY_TYPE_GAME,
|
|
733
|
-
CATEGORY_TYPE_FIXED_DURATION
|
|
734
|
-
].includes(categoryType) && /*#__PURE__*/ jsx(FixedDurationOptions, {
|
|
735
|
-
fieldNamePrefix: fieldNamePrefix,
|
|
736
|
-
isOverrides: isOverrides
|
|
737
|
-
}),
|
|
738
|
-
/*#__PURE__*/ jsx(Form.Group, {
|
|
739
|
-
controlId: minSpendId,
|
|
740
|
-
className: "advanced-switch-container",
|
|
741
|
-
children: /*#__PURE__*/ jsx(ProductPriceControl, {
|
|
742
|
-
title: t("minSpend"),
|
|
743
|
-
isRequired: false,
|
|
744
|
-
isMoreThanZero: true,
|
|
745
|
-
allowDeposits: false,
|
|
746
|
-
isLoading: isLoading || isOverrides,
|
|
747
|
-
fieldNamePrefix: "".concat(fieldNamePrefix, ".minSpend")
|
|
748
|
-
})
|
|
749
|
-
})
|
|
750
|
-
]
|
|
463
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
464
|
+
children: /*#__PURE__*/ jsx(AdvancedOptions, {
|
|
465
|
+
isOverrides: isOverrides,
|
|
466
|
+
fieldNamePrefix: fieldNamePrefix,
|
|
467
|
+
isLoading: isLoading
|
|
468
|
+
})
|
|
751
469
|
})
|
|
752
470
|
}),
|
|
753
471
|
/*#__PURE__*/ jsx(Row, {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldNamePrefixPath, FormValues } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
|
|
2
|
+
interface AdvancedOptionsProps<T> extends FieldNamePrefixPath<T> {
|
|
3
|
+
isOverrides: boolean;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const AdvancedOptions: <T extends FormValues>({ fieldNamePrefix, isOverrides, isLoading, }: AdvancedOptionsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=AdvancedOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdvancedOptions.d.ts","sourceRoot":"","sources":["../../../../src/product-set/product/advanced-options/AdvancedOptions.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAOtE,UAAU,oBAAoB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAC9D,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,UAAU,gDAIjD,oBAAoB,CAAC,CAAC,CAAC,4CA6IzB,CAAC"}
|