@licklist/design 0.72.72-dev.0 → 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.
Files changed (36) hide show
  1. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
  2. package/dist/index.js +0 -2
  3. package/dist/product-set/product/ProductControl.d.ts +2 -2
  4. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  5. package/dist/product-set/product/ProductControl.js +4 -53
  6. package/dist/product-set/utils/index.d.ts +1 -1
  7. package/dist/setting/index.d.ts +0 -2
  8. package/dist/setting/index.d.ts.map +1 -1
  9. package/package.json +1 -1
  10. package/src/product-set/product/Product.stories.tsx +1 -1
  11. package/src/product-set/product/ProductControl.tsx +3 -55
  12. package/src/setting/index.ts +0 -2
  13. package/yarn.lock +26 -26
  14. package/dist/setting/admin/AdminSettingForm.d.ts +0 -25
  15. package/dist/setting/admin/AdminSettingForm.d.ts.map +0 -1
  16. package/dist/setting/admin/AdminSettingForm.js +0 -220
  17. package/dist/setting/admin/PaymentFeeForm.d.ts +0 -13
  18. package/dist/setting/admin/PaymentFeeForm.d.ts.map +0 -1
  19. package/dist/setting/admin/PaymentFeeForm.js +0 -439
  20. package/dist/setting/admin/index.d.ts +0 -2
  21. package/dist/setting/admin/index.d.ts.map +0 -1
  22. package/dist/setting/system/SystemSettingForm.d.ts +0 -10
  23. package/dist/setting/system/SystemSettingForm.d.ts.map +0 -1
  24. package/dist/setting/system/SystemSettingForm.js +0 -95
  25. package/dist/setting/system/index.d.ts +0 -2
  26. package/dist/setting/system/index.d.ts.map +0 -1
  27. package/dist/types/currency.d.ts +0 -5
  28. package/dist/types/currency.d.ts.map +0 -1
  29. package/src/setting/admin/AdminSetting.stories.tsx +0 -52
  30. package/src/setting/admin/AdminSettingForm.tsx +0 -196
  31. package/src/setting/admin/PaymentFeeForm.tsx +0 -309
  32. package/src/setting/admin/index.ts +0 -1
  33. package/src/setting/system/SystemSetting.stories.tsx +0 -26
  34. package/src/setting/system/SystemSettingForm.tsx +0 -62
  35. package/src/setting/system/index.ts +0 -1
  36. package/src/types/currency.ts +0 -4
@@ -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';
package/dist/index.js CHANGED
@@ -136,8 +136,6 @@ export { RyftPayment } from './sales/payment-form/components/RyftPayment/RyftPay
136
136
  export { BookingResults } from './sales/booking/results/BookingResults.js';
137
137
  export { BACKGROUND_COLOR_CLASSNAMES } from './sales/booking/results/constants.js';
138
138
  export { NotesTable } from './sales/notes/NotesTable.js';
139
- export { SystemSettingForm } from './setting/system/SystemSettingForm.js';
140
- export { AdminSettingForm } from './setting/admin/AdminSettingForm.js';
141
139
  export { DashboardSettingForm } from './setting/dashboard/DashboardSettingForm.js';
142
140
  export { SnippetCard } from './setting/dashboard/snippets/card/SnippetCard.js';
143
141
  export { SnippetTemplateCard } from './setting/dashboard/snippet-templates/card/SnippetTemplateCard.js';
@@ -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: number;
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, hasTicket, categoryType, isOverrides, }: ProductControlProps<T>): import("react/jsx-runtime").JSX.Element;
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;AAS7D,OAAO,EAEL,oCAAoC,EACrC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,iCAAiC,CAAA;AAOxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAG3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAK1D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CA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AC,CAAC;IACzC,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAA;IACtB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,mBAAmB,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC/D,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;CAEtB;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,EACnD,SAAiB,EACjB,eAAe,EACf,aAAqB,EACrB,oBAA4B,EAC5B,QAAa,EACb,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,YAAY,EACZ,WAAmB,GACpB,EAAE,mBAAmB,CAAC,CAAC,CAAC,2CA+XxB"}
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;AAQ7D,OAAO,EAEL,oCAAoC,EACrC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,iCAAiC,CAAA;AAMxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAG3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAK1D,MAAM,W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AAgB,EACtB,mBAAmB,CAAC,CAAC,CAAC,EACtB,oCAAoC,CAAC,CAAC,CAAC;IACzC,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAA;IACtB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,mBAAmB,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC/D,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAA;CAEtB;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,EACnD,SAAiB,EACjB,eAAe,EACf,aAAqB,EACrB,oBAA4B,EAC5B,QAAa,EACb,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,WAAmB,GACpB,EAAE,mBAAmB,CAAC,CAAC,CAAC,2CA8UxB"}
@@ -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, useWatch, Controller } from 'react-hook-form';
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 { ProductQuantityConstantControl } from './quantity/ProductQuantityConstantControl.js';
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, hasTicket = param.hasTicket, categoryType = param.categoryType, _param_isOverrides = param.isOverrides, isOverrides = _param_isOverrides === void 0 ? false : _param_isOverrides;
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
- quantity === QUANTITY_TYPE_CONSTANT && /*#__PURE__*/ jsx(ProductQuantityConstantControl, {
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: number;
47
+ quantitySelector?: number;
48
48
  hasSpecialNotes: boolean;
49
49
  minSpend?: number | null;
50
50
  type?: import("@licklist/core/dist/DataMapper/Product/ProductDataMapper").ProductType;
@@ -1,4 +1,2 @@
1
- export * from './system';
2
- export * from './admin';
3
1
  export * from './dashboard';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/setting/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/setting/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.72.72-dev.0",
3
+ "version": "0.72.72-dev.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -29,7 +29,7 @@ const defaultValues: Partial<ProductControlValues> = {
29
29
  duration: 30,
30
30
  isAvailable: false,
31
31
  isRequired: false,
32
- quantitySelector: 0,
32
+ quantitySelector: 1,
33
33
  hasSpecialNotes: false,
34
34
  }
35
35
 
@@ -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: number
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>
@@ -1,3 +1 @@
1
- export * from './system'
2
- export * from './admin'
3
1
  export * from './dashboard'
package/yarn.lock CHANGED
@@ -5419,11 +5419,11 @@ __metadata:
5419
5419
  linkType: hard
5420
5420
 
5421
5421
  "@types/babel__generator@npm:*":
5422
- version: 7.6.8
5423
- resolution: "@types/babel__generator@npm:7.6.8"
5422
+ version: 7.27.0
5423
+ resolution: "@types/babel__generator@npm:7.27.0"
5424
5424
  dependencies:
5425
5425
  "@babel/types": "npm:^7.0.0"
5426
- checksum: 10c0/f0ba105e7d2296bf367d6e055bb22996886c114261e2cb70bf9359556d0076c7a57239d019dee42bb063f565bade5ccb46009bce2044b2952d964bf9a454d6d2
5426
+ checksum: 10c0/9f9e959a8792df208a9d048092fda7e1858bddc95c6314857a8211a99e20e6830bdeb572e3587ae8be5429e37f2a96fcf222a9f53ad232f5537764c9e13a2bbd
5427
5427
  languageName: node
5428
5428
  linkType: hard
5429
5429
 
@@ -5699,11 +5699,11 @@ __metadata:
5699
5699
  linkType: hard
5700
5700
 
5701
5701
  "@types/node@npm:*":
5702
- version: 22.13.17
5703
- resolution: "@types/node@npm:22.13.17"
5702
+ version: 22.14.0
5703
+ resolution: "@types/node@npm:22.14.0"
5704
5704
  dependencies:
5705
- undici-types: "npm:~6.20.0"
5706
- checksum: 10c0/77a052fec0fe02f60557e1c5f3f28eb09cd9bee426be88328a94689150a3c0df5b4b6b69fad28157fb34521693dad0b311ecd7f613845d681ff973991310c20e
5705
+ undici-types: "npm:~6.21.0"
5706
+ checksum: 10c0/9d79f3fa1af9c2c869514f419c4a4905b34c10e12915582fd1784868ac4e74c6d306cf5eb47ef889b6750ab85a31be96618227b86739c4a3e0b1c15063f384c6
5707
5707
  languageName: node
5708
5708
  linkType: hard
5709
5709
 
@@ -8078,9 +8078,9 @@ __metadata:
8078
8078
  linkType: hard
8079
8079
 
8080
8080
  "caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001125, caniuse-lite@npm:^1.0.30001646, caniuse-lite@npm:^1.0.30001688":
8081
- version: 1.0.30001707
8082
- resolution: "caniuse-lite@npm:1.0.30001707"
8083
- checksum: 10c0/a1beaf84bad4f6617bbc5616d6bc0c9cab73e73f7e9e09b6466af5195b1bc393e0f6f19643d7a1c88bd3f4bfa122d7bea81cf6225ec3ade57d5b1dd3478c1a1b
8081
+ version: 1.0.30001712
8082
+ resolution: "caniuse-lite@npm:1.0.30001712"
8083
+ checksum: 10c0/b3df8bdcc3335969380c2e47acb36c89bfc7f8fb4ef7ee2a5380e30ba46aa69e9d411654bc29894a06c201a1d60d490ab9b92787f3b66d7a7a38d71360e68215
8084
8084
  languageName: node
8085
8085
  linkType: hard
8086
8086
 
@@ -8223,8 +8223,8 @@ __metadata:
8223
8223
  linkType: hard
8224
8224
 
8225
8225
  "chromatic@npm:^11.4.0":
8226
- version: 11.27.0
8227
- resolution: "chromatic@npm:11.27.0"
8226
+ version: 11.28.0
8227
+ resolution: "chromatic@npm:11.28.0"
8228
8228
  peerDependencies:
8229
8229
  "@chromatic-com/cypress": ^0.*.* || ^1.0.0
8230
8230
  "@chromatic-com/playwright": ^0.*.* || ^1.0.0
@@ -8237,7 +8237,7 @@ __metadata:
8237
8237
  chroma: dist/bin.js
8238
8238
  chromatic: dist/bin.js
8239
8239
  chromatic-cli: dist/bin.js
8240
- checksum: 10c0/500c1a522a48b3ef9188d63693b2602128b4cd7b2b96e5cb5412cdc0e3b7ac2a33c30d8f55f7662de4111e1c7c70bcb970e86782700e02580881400bdd10419b
8240
+ checksum: 10c0/ae0bb035e531852f9a6dbd5be133a2a4759ef39ece13fcbcdf635db4de0129f7bca8f58f7a0411a7eafb4dc09319df6aaece5646d9944ee4347ee0e38de52d65
8241
8241
  languageName: node
8242
8242
  linkType: hard
8243
8243
 
@@ -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.129
9871
- resolution: "electron-to-chromium@npm:1.5.129"
9872
- checksum: 10c0/b497cf5fb53c0b7eb9de39ad529371f934c71eca35091bd36e68874fe02f291c6ef31d5f6c7b0cf13d73911ffea2927276178642a7249684609d17a99af061ff
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
 
@@ -17062,13 +17062,13 @@ __metadata:
17062
17062
  linkType: hard
17063
17063
 
17064
17064
  "prosemirror-view@npm:^1.0.0, prosemirror-view@npm:^1.1.0, prosemirror-view@npm:^1.23.6, prosemirror-view@npm:^1.27.0, prosemirror-view@npm:^1.28.2, prosemirror-view@npm:^1.31.0, prosemirror-view@npm:^1.37.2":
17065
- version: 1.38.1
17066
- resolution: "prosemirror-view@npm:1.38.1"
17065
+ version: 1.39.1
17066
+ resolution: "prosemirror-view@npm:1.39.1"
17067
17067
  dependencies:
17068
17068
  prosemirror-model: "npm:^1.20.0"
17069
17069
  prosemirror-state: "npm:^1.0.0"
17070
17070
  prosemirror-transform: "npm:^1.1.0"
17071
- checksum: 10c0/495833857047a1bb5d8bd88f91b3bfa92e5ba726bb9488e062db2fc2d5d9e01ff9c305aa1a1af3272f7fa763ffc6ac5935841df98b8cb28856228877af42b278
17071
+ checksum: 10c0/44e641a51f741449c4065708ba5d7e28a1d777daf50260563e4fd2072c6d90157a5ac4b0ed18ea97ec8c5805ffa8eda6fa05b0667b71fc244393f45cd4d7c8d0
17072
17072
  languageName: node
17073
17073
  linkType: hard
17074
17074
 
@@ -21056,9 +21056,9 @@ __metadata:
21056
21056
  linkType: hard
21057
21057
 
21058
21058
  "ufo@npm:^1.5.4":
21059
- version: 1.5.4
21060
- resolution: "ufo@npm:1.5.4"
21061
- checksum: 10c0/b5dc4dc435c49c9ef8890f1b280a19ee4d0954d1d6f9ab66ce62ce64dd04c7be476781531f952a07c678d51638d02ad4b98e16237be29149295b0f7c09cda765
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
 
@@ -21095,10 +21095,10 @@ __metadata:
21095
21095
  languageName: node
21096
21096
  linkType: hard
21097
21097
 
21098
- "undici-types@npm:~6.20.0":
21099
- version: 6.20.0
21100
- resolution: "undici-types@npm:6.20.0"
21101
- checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf
21098
+ "undici-types@npm:~6.21.0":
21099
+ version: 6.21.0
21100
+ resolution: "undici-types@npm:6.21.0"
21101
+ checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04
21102
21102
  languageName: node
21103
21103
  linkType: hard
21104
21104
 
@@ -1,25 +0,0 @@
1
- import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission';
2
- import { ProvidableType } from '@licklist/core/dist/DataMapper/Provider/ProvidableDataMapper';
3
- import { PaymentFeeFormFieldValues } from './PaymentFeeForm';
4
- import { Currency } from '../../types/currency';
5
- export type AdminSettingFormFieldValues = {
6
- warningOnNumberOfPeople: string;
7
- currency_id?: number;
8
- providerHasMap: null | boolean;
9
- hasBookingManagement: null | boolean;
10
- additionalPaymentMethodsEnabled: null | boolean;
11
- externalPaymentLinkEnabled: null | boolean;
12
- } & PaymentFeeFormFieldValues;
13
- export interface AdminSettingFormProps extends HasPermissionProp {
14
- isLoading: boolean;
15
- onSubmit?: (data: AdminSettingFormFieldValues) => void;
16
- defaultValues?: Partial<AdminSettingFormFieldValues>;
17
- currencies?: Array<Currency>;
18
- providerMetadata: {
19
- country?: string;
20
- providableId?: number;
21
- providerType?: ProvidableType;
22
- };
23
- }
24
- export declare const AdminSettingForm: ({ isLoading, defaultValues, onSubmit, currencies, hasPermission, providerMetadata, }: AdminSettingFormProps) => import("react/jsx-runtime").JSX.Element;
25
- //# sourceMappingURL=AdminSettingForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AdminSettingForm.d.ts","sourceRoot":"","sources":["../../../src/setting/admin/AdminSettingForm.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAOtF,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAA;AAE7F,OAAO,EAAkB,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAE/C,MAAM,MAAM,2BAA2B,GAAG;IACxC,uBAAuB,EAAE,MAAM,CAAA;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,IAAI,GAAG,OAAO,CAAA;IAC9B,oBAAoB,EAAE,IAAI,GAAG,OAAO,CAAA;IACpC,+BAA+B,EAAE,IAAI,GAAG,OAAO,CAAA;IAC/C,0BAA0B,EAAE,IAAI,GAAG,OAAO,CAAA;CAC3C,GAAG,yBAAyB,CAAA;AAE7B,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAA;IACtD,aAAa,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAA;IACpD,UAAU,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC5B,gBAAgB,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,YAAY,CAAC,EAAE,cAAc,CAAA;KAC9B,CAAA;CACF;AAED,eAAO,MAAM,gBAAgB,yFAO1B,qBAAqB,4CAsJvB,CAAA"}