@licklist/design 0.72.72-dev.1 → 0.72.72-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/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +2 -2
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +4 -53
- package/dist/product-set/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/product-set/product/Product.stories.tsx +1 -1
- package/src/product-set/product/ProductControl.tsx +3 -55
- package/yarn.lock +6 -6
|
@@ -29,7 +29,6 @@ import 'react-bootstrap/Button';
|
|
|
29
29
|
import 'react-bootstrap/OverlayTrigger';
|
|
30
30
|
import 'react-bootstrap/Popover';
|
|
31
31
|
import '@licklist/plugins/dist/services/Form/HookFormService';
|
|
32
|
-
import '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
33
32
|
import 'react-bootstrap/Collapse';
|
|
34
33
|
import '@licklist/plugins/dist/hooks/Media/useImages';
|
|
35
34
|
import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
@@ -74,6 +73,7 @@ import '../../../../../iframe/payment/payment-status-page/PaymentStatusPage.js';
|
|
|
74
73
|
import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
|
|
75
74
|
import '../../../../../static/manual-date-picker/constants/index.js';
|
|
76
75
|
import '../../../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js';
|
|
76
|
+
import '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
77
77
|
import '../../../../../sortable-tree/SortableTree.js';
|
|
78
78
|
import '@dnd-kit/core';
|
|
79
79
|
import '@dnd-kit/sortable';
|
|
@@ -28,7 +28,7 @@ export interface ProductControlValues extends FormValues, ProductDepositControlV
|
|
|
28
28
|
originalProductId: number | null;
|
|
29
29
|
isUnlimited: boolean;
|
|
30
30
|
isRequired: boolean;
|
|
31
|
-
quantitySelector
|
|
31
|
+
quantitySelector?: number;
|
|
32
32
|
hasSpecialNotes: boolean;
|
|
33
33
|
minSpend?: number | null;
|
|
34
34
|
type?: ProductType;
|
|
@@ -54,5 +54,5 @@ export interface ProductControlProps<T> extends IsDeletableEvent, FieldNamePrefi
|
|
|
54
54
|
categoryType?: CategoryType;
|
|
55
55
|
isOverrides?: boolean;
|
|
56
56
|
}
|
|
57
|
-
export declare function ProductControl<T extends FormValues>({ isLoading, fieldNamePrefix, allowDeposits, hasBookingManagement, zoneList, onCopy, onProductNameChange, productName,
|
|
57
|
+
export declare function ProductControl<T extends FormValues>({ isLoading, fieldNamePrefix, allowDeposits, hasBookingManagement, zoneList, onCopy, onProductNameChange, productName, categoryType, isOverrides, }: ProductControlProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
58
58
|
//# sourceMappingURL=ProductControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/ProductControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EAIb,MAAM,kEAAkE,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0DAA0D,CAAA;AAGtF,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAA;AAErE,OAAO,EACL,WAAW,EAKZ,MAAM,OAAO,CAAA;AAed,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/ProductControl.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { QUANTITY_TYPE_LIST_DTO, QUANTITY_TYPE_CONSTANT, QUANTITY_TYPE_RECHARGING } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
3
2
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { useId } from '@react-aria/utils';
|
|
@@ -8,7 +7,7 @@ import { Form, Button } from 'react-bootstrap';
|
|
|
8
7
|
import Col from 'react-bootstrap/Col';
|
|
9
8
|
import Collapse from 'react-bootstrap/Collapse';
|
|
10
9
|
import Row from 'react-bootstrap/Row';
|
|
11
|
-
import { useFormContext,
|
|
10
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
12
11
|
import { useTranslation } from 'react-i18next';
|
|
13
12
|
import { useImages } from '@licklist/plugins/dist/hooks/Media/useImages';
|
|
14
13
|
import { IMAGE_TYPE_IMAGE } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
@@ -22,7 +21,7 @@ import { ProductSetLoadingContext } from '../form/context.js';
|
|
|
22
21
|
import { ProductBookingManagementControl } from './booking-management/ProductBookingManagementControl.js';
|
|
23
22
|
import { ProductDepositControl } from './deposit/ProductDepositControl.js';
|
|
24
23
|
import { ProductQuantityControl } from './quantity/ProductQuantityControl.js';
|
|
25
|
-
import
|
|
24
|
+
import 'react-bootstrap/InputGroup';
|
|
26
25
|
import { ProductQuantityRechargingControl } from './quantity/ProductQuantityRechargingControl.js';
|
|
27
26
|
import { TipTapEditor } from '../../tiptap-editor/TipTapEditor.js';
|
|
28
27
|
import { ProductPriceControl } from './price/ProductPriceControl.js';
|
|
@@ -130,7 +129,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
130
129
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
131
130
|
}
|
|
132
131
|
function ProductControl(param) {
|
|
133
|
-
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,
|
|
132
|
+
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, categoryType = param.categoryType, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides;
|
|
134
133
|
var _useFormContext = useFormContext(), register = _useFormContext.register, control = _useFormContext.control, errors = _useFormContext.formState.errors, setValue = _useFormContext.setValue, getValues = _useFormContext.getValues, watch = _useFormContext.watch;
|
|
135
134
|
var _useContext = useContext(ProductSetLoadingContext), setLoading = _useContext.setLoading, modifiersSetList = _useContext.modifiersSetList;
|
|
136
135
|
var t = useTranslation([
|
|
@@ -147,28 +146,13 @@ function ProductControl(param) {
|
|
|
147
146
|
var descriptionId = useId();
|
|
148
147
|
var isAvailableId = useId();
|
|
149
148
|
var isSoldOutId = useId();
|
|
150
|
-
var quantitySelectorId = useId();
|
|
151
149
|
var unlimitedQuantityId = useId();
|
|
152
150
|
var isZoneCategory = checkIfZoneCategory(categoryType);
|
|
153
|
-
var quantitySelectorList = [
|
|
154
|
-
{
|
|
155
|
-
id: 1,
|
|
156
|
-
value: t('quantitySelector')
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
id: 2,
|
|
160
|
-
value: t('stockControl')
|
|
161
|
-
}
|
|
162
|
-
];
|
|
163
151
|
var handleExpand = useCallback(function() {
|
|
164
152
|
return setExpanded(function(prevExpanded) {
|
|
165
153
|
return !prevExpanded;
|
|
166
154
|
});
|
|
167
155
|
}, []);
|
|
168
|
-
var quantityValue = useWatch({
|
|
169
|
-
control: control,
|
|
170
|
-
name: "".concat(fieldNamePrefix, ".quantitySelector")
|
|
171
|
-
});
|
|
172
156
|
var _useImages = useImages(initialImages), images = _useImages.images, handleImageRemove = _useImages.handleImageRemove, handleImageUploading = _useImages.handleImageUploading, isImageUploading = _useImages.isLoading;
|
|
173
157
|
var onFilesChange = useCallback(function(files) {
|
|
174
158
|
handleImageUploading(files, IMAGE_TYPE_IMAGE);
|
|
@@ -206,8 +190,6 @@ function ProductControl(param) {
|
|
|
206
190
|
fieldNamePrefix,
|
|
207
191
|
setValue
|
|
208
192
|
]);
|
|
209
|
-
var quantitySelector = quantityValue !== null && quantityValue !== void 0 ? quantityValue : '1';
|
|
210
|
-
var quantity = QUANTITY_TYPE_LIST_DTO[quantitySelector];
|
|
211
193
|
var modifierList = convertToTypeaheadOptions(modifiersSetList);
|
|
212
194
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
213
195
|
children: [
|
|
@@ -294,13 +276,7 @@ function ProductControl(param) {
|
|
|
294
276
|
isOverrides: isOverrides,
|
|
295
277
|
onFocus: onFocus
|
|
296
278
|
}),
|
|
297
|
-
|
|
298
|
-
isLoading: isLoading,
|
|
299
|
-
fieldNamePrefix: fieldNamePrefix,
|
|
300
|
-
onFocus: onFocus,
|
|
301
|
-
disabled: isUnlimited
|
|
302
|
-
}),
|
|
303
|
-
quantity === QUANTITY_TYPE_RECHARGING && /*#__PURE__*/ jsx(ProductQuantityRechargingControl, {
|
|
279
|
+
/*#__PURE__*/ jsx(ProductQuantityRechargingControl, {
|
|
304
280
|
isLoading: isLoading,
|
|
305
281
|
fieldNamePrefix: fieldNamePrefix,
|
|
306
282
|
onFocus: onFocus,
|
|
@@ -323,31 +299,6 @@ function ProductControl(param) {
|
|
|
323
299
|
]
|
|
324
300
|
})
|
|
325
301
|
]
|
|
326
|
-
}),
|
|
327
|
-
/*#__PURE__*/ jsxs(Form.Group, {
|
|
328
|
-
controlId: quantitySelectorId,
|
|
329
|
-
children: [
|
|
330
|
-
/*#__PURE__*/ jsx(Form.Label, {
|
|
331
|
-
children: t('quantitySelectorType')
|
|
332
|
-
}),
|
|
333
|
-
/*#__PURE__*/ jsx(Form.Control, _object_spread_props(_object_spread({
|
|
334
|
-
as: "select",
|
|
335
|
-
defaultValue: hasTicket ? quantitySelectorList[0].id : undefined
|
|
336
|
-
}, register("".concat(fieldNamePrefix, ".quantitySelector"))), {
|
|
337
|
-
isInvalid: HookFormService.isInvalid("".concat(fieldNamePrefix, ".quantitySelector"), errors),
|
|
338
|
-
disabled: isLoading || hasTicket || isOverrides,
|
|
339
|
-
children: quantitySelectorList.map(function(selector) {
|
|
340
|
-
return /*#__PURE__*/ jsx("option", {
|
|
341
|
-
value: selector.id,
|
|
342
|
-
children: selector.value
|
|
343
|
-
}, selector.id);
|
|
344
|
-
})
|
|
345
|
-
})),
|
|
346
|
-
/*#__PURE__*/ jsx(Form.Control.Feedback, {
|
|
347
|
-
type: "invalid",
|
|
348
|
-
children: HookFormService.getErrors("".concat(fieldNamePrefix, ".quantitySelector"), errors)
|
|
349
|
-
})
|
|
350
|
-
]
|
|
351
302
|
})
|
|
352
303
|
]
|
|
353
304
|
})
|
|
@@ -44,7 +44,7 @@ export declare const updateModifiersSetAtProductSetForm: (data: ProductSetFormVa
|
|
|
44
44
|
originalProductId: number | null;
|
|
45
45
|
isUnlimited: boolean;
|
|
46
46
|
isRequired: boolean;
|
|
47
|
-
quantitySelector
|
|
47
|
+
quantitySelector?: number;
|
|
48
48
|
hasSpecialNotes: boolean;
|
|
49
49
|
minSpend?: number | null;
|
|
50
50
|
type?: import("@licklist/core/dist/DataMapper/Product/ProductDataMapper").ProductType;
|
package/package.json
CHANGED
|
@@ -44,7 +44,6 @@ import { convertToTypeaheadOptions } from 'src/sales/coupon/utils'
|
|
|
44
44
|
import { checkIfZoneCategory } from '@licklist/plugins'
|
|
45
45
|
import { FileUpload } from '../../file-upload'
|
|
46
46
|
import { BooleanSwitch } from '../../static'
|
|
47
|
-
import { SelectItem } from '../../types/generic/SelectItem'
|
|
48
47
|
import { ProductSetLoadingContext } from '../form/context'
|
|
49
48
|
import {
|
|
50
49
|
ProductBookingManagementControl,
|
|
@@ -55,7 +54,6 @@ import {
|
|
|
55
54
|
ProductDepositControlValues,
|
|
56
55
|
} from './deposit/ProductDepositControl'
|
|
57
56
|
import {
|
|
58
|
-
ProductQuantityConstantControl,
|
|
59
57
|
ProductQuantityControl,
|
|
60
58
|
ProductQuantityRechargingControl,
|
|
61
59
|
} from './quantity'
|
|
@@ -94,7 +92,7 @@ export interface ProductControlValues
|
|
|
94
92
|
originalProductId: number | null
|
|
95
93
|
isUnlimited: boolean
|
|
96
94
|
isRequired: boolean
|
|
97
|
-
quantitySelector
|
|
95
|
+
quantitySelector?: number
|
|
98
96
|
hasSpecialNotes: boolean
|
|
99
97
|
minSpend?: number | null
|
|
100
98
|
type?: ProductType
|
|
@@ -135,7 +133,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
135
133
|
onCopy,
|
|
136
134
|
onProductNameChange,
|
|
137
135
|
productName,
|
|
138
|
-
hasTicket,
|
|
139
136
|
categoryType,
|
|
140
137
|
isOverrides = false,
|
|
141
138
|
}: ProductControlProps<T>) {
|
|
@@ -165,26 +162,15 @@ export function ProductControl<T extends FormValues>({
|
|
|
165
162
|
const descriptionId = useId()
|
|
166
163
|
const isAvailableId = useId()
|
|
167
164
|
const isSoldOutId = useId()
|
|
168
|
-
const quantitySelectorId = useId()
|
|
169
165
|
const unlimitedQuantityId = useId()
|
|
170
166
|
|
|
171
167
|
const isZoneCategory = checkIfZoneCategory(categoryType)
|
|
172
168
|
|
|
173
|
-
const quantitySelectorList: SelectItem[] = [
|
|
174
|
-
{ id: 1, value: t('quantitySelector') },
|
|
175
|
-
{ id: 2, value: t('stockControl') },
|
|
176
|
-
]
|
|
177
|
-
|
|
178
169
|
const handleExpand = useCallback(
|
|
179
170
|
() => setExpanded((prevExpanded) => !prevExpanded),
|
|
180
171
|
[],
|
|
181
172
|
)
|
|
182
173
|
|
|
183
|
-
const quantityValue = useWatch({
|
|
184
|
-
control,
|
|
185
|
-
name: `${fieldNamePrefix}.quantitySelector` as Path<T>,
|
|
186
|
-
})
|
|
187
|
-
|
|
188
174
|
const {
|
|
189
175
|
images,
|
|
190
176
|
handleImageRemove,
|
|
@@ -227,9 +213,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
227
213
|
}
|
|
228
214
|
}, [images, fieldNamePrefix, setValue])
|
|
229
215
|
|
|
230
|
-
const quantitySelector = quantityValue ?? '1'
|
|
231
|
-
const quantity = QUANTITY_TYPE_LIST_DTO[quantitySelector as string]
|
|
232
|
-
|
|
233
216
|
const modifierList = convertToTypeaheadOptions(modifiersSetList)
|
|
234
217
|
|
|
235
218
|
return (
|
|
@@ -315,23 +298,14 @@ export function ProductControl<T extends FormValues>({
|
|
|
315
298
|
isOverrides={isOverrides}
|
|
316
299
|
onFocus={onFocus}
|
|
317
300
|
/>
|
|
318
|
-
|
|
319
|
-
{quantity === QUANTITY_TYPE_CONSTANT && (
|
|
320
|
-
<ProductQuantityConstantControl<T>
|
|
321
|
-
isLoading={isLoading}
|
|
322
|
-
fieldNamePrefix={fieldNamePrefix}
|
|
323
|
-
onFocus={onFocus}
|
|
324
|
-
disabled={isUnlimited}
|
|
325
|
-
/>
|
|
326
|
-
)}
|
|
327
|
-
{quantity === QUANTITY_TYPE_RECHARGING && (
|
|
301
|
+
|
|
328
302
|
<ProductQuantityRechargingControl<T>
|
|
329
303
|
isLoading={isLoading}
|
|
330
304
|
fieldNamePrefix={fieldNamePrefix}
|
|
331
305
|
onFocus={onFocus}
|
|
332
306
|
disabled={isUnlimited}
|
|
333
307
|
/>
|
|
334
|
-
|
|
308
|
+
|
|
335
309
|
<Form.Group
|
|
336
310
|
controlId={unlimitedQuantityId}
|
|
337
311
|
className='custom-checkbox'
|
|
@@ -346,32 +320,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
346
320
|
<Form.Check.Label>{t('isUnlimited')}</Form.Check.Label>
|
|
347
321
|
</Form.Group>
|
|
348
322
|
</div>
|
|
349
|
-
|
|
350
|
-
<Form.Group controlId={quantitySelectorId}>
|
|
351
|
-
<Form.Label>{t('quantitySelectorType')}</Form.Label>
|
|
352
|
-
<Form.Control
|
|
353
|
-
as='select'
|
|
354
|
-
defaultValue={hasTicket ? quantitySelectorList[0].id : undefined}
|
|
355
|
-
{...register(`${fieldNamePrefix}.quantitySelector` as Path<T>)}
|
|
356
|
-
isInvalid={HookFormService.isInvalid<T>(
|
|
357
|
-
`${fieldNamePrefix}.quantitySelector` as Path<T>,
|
|
358
|
-
errors,
|
|
359
|
-
)}
|
|
360
|
-
disabled={isLoading || hasTicket || isOverrides}
|
|
361
|
-
>
|
|
362
|
-
{quantitySelectorList.map((selector) => (
|
|
363
|
-
<option value={selector.id} key={selector.id}>
|
|
364
|
-
{selector.value}
|
|
365
|
-
</option>
|
|
366
|
-
))}
|
|
367
|
-
</Form.Control>
|
|
368
|
-
<Form.Control.Feedback type='invalid'>
|
|
369
|
-
{HookFormService.getErrors<T>(
|
|
370
|
-
`${fieldNamePrefix}.quantitySelector` as Path<T>,
|
|
371
|
-
errors,
|
|
372
|
-
)}
|
|
373
|
-
</Form.Control.Feedback>
|
|
374
|
-
</Form.Group>
|
|
375
323
|
</Col>
|
|
376
324
|
</Row>
|
|
377
325
|
<Row>
|
package/yarn.lock
CHANGED
|
@@ -9867,9 +9867,9 @@ __metadata:
|
|
|
9867
9867
|
linkType: hard
|
|
9868
9868
|
|
|
9869
9869
|
"electron-to-chromium@npm:^1.3.564, electron-to-chromium@npm:^1.5.73":
|
|
9870
|
-
version: 1.5.
|
|
9871
|
-
resolution: "electron-to-chromium@npm:1.5.
|
|
9872
|
-
checksum: 10c0/
|
|
9870
|
+
version: 1.5.134
|
|
9871
|
+
resolution: "electron-to-chromium@npm:1.5.134"
|
|
9872
|
+
checksum: 10c0/ba0c8b3a86e139b142ce797e807f3a7b4b5708d8a550d820cc5467bf22fc62517fa9c2a38c4fec975c96f321f18918be1bcae41687f1715889a0ac6122fbfa6d
|
|
9873
9873
|
languageName: node
|
|
9874
9874
|
linkType: hard
|
|
9875
9875
|
|
|
@@ -21056,9 +21056,9 @@ __metadata:
|
|
|
21056
21056
|
linkType: hard
|
|
21057
21057
|
|
|
21058
21058
|
"ufo@npm:^1.5.4":
|
|
21059
|
-
version: 1.
|
|
21060
|
-
resolution: "ufo@npm:1.
|
|
21061
|
-
checksum: 10c0/
|
|
21059
|
+
version: 1.6.1
|
|
21060
|
+
resolution: "ufo@npm:1.6.1"
|
|
21061
|
+
checksum: 10c0/5a9f041e5945fba7c189d5410508cbcbefef80b253ed29aa2e1f8a2b86f4bd51af44ee18d4485e6d3468c92be9bf4a42e3a2b72dcaf27ce39ce947ec994f1e6b
|
|
21062
21062
|
languageName: node
|
|
21063
21063
|
linkType: hard
|
|
21064
21064
|
|