@licklist/design 0.66.10-dev.0 → 0.66.10-dev.4

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 (66) hide show
  1. package/dist/auth/Login/LoginComponent.js +2 -1
  2. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +7 -2
  3. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  4. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +22 -9
  5. package/dist/layout/DropDown.d.ts +2 -1
  6. package/dist/layout/DropDown.d.ts.map +1 -1
  7. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  8. package/dist/product-set/control/ProductSetControl.js +3 -3
  9. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  10. package/dist/product-set/form/ProductCategoriesControl.js +1 -3
  11. package/dist/product-set/form/ProductZonesControl.d.ts +9 -0
  12. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -0
  13. package/dist/product-set/form/ProductZonesControl.js +214 -0
  14. package/dist/product-set/form/ProductsControl.d.ts +1 -3
  15. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  16. package/dist/product-set/form/ProductsControl.js +2 -13
  17. package/dist/product-set/product/ProductControl.d.ts +5 -8
  18. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  19. package/dist/product-set/product/ProductControl.js +19 -301
  20. package/dist/product-set/product/advanced-options/AdvancedOptions.d.ts +8 -0
  21. package/dist/product-set/product/advanced-options/AdvancedOptions.d.ts.map +1 -0
  22. package/dist/product-set/product/advanced-options/AdvancedOptions.js +264 -0
  23. package/dist/product-set/product/advanced-options/index.d.ts +2 -0
  24. package/dist/product-set/product/advanced-options/index.d.ts.map +1 -0
  25. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.js +1 -0
  26. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -2
  27. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  28. package/dist/product-set/product-category/ProductCategoryControl.js +2 -57
  29. package/dist/product-set/product-zone/ProductZoneControl.d.ts +15 -0
  30. package/dist/product-set/product-zone/ProductZoneControl.d.ts.map +1 -0
  31. package/dist/product-set/product-zone/ProductZoneControl.js +263 -0
  32. package/dist/product-set/product-zone/index.d.ts +2 -0
  33. package/dist/product-set/product-zone/index.d.ts.map +1 -0
  34. package/dist/product-set/utils/index.d.ts.map +1 -1
  35. package/dist/product-set/utils/index.js +3 -1
  36. package/dist/sales/booking/results/BookingResults.js +1 -1
  37. package/dist/sortable-tree/SortableTreeItem.d.ts +3 -1
  38. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  39. package/dist/sortable-tree/SortableTreeItem.js +15 -5
  40. package/dist/styles/product-set/CreateProductSetItem.scss +8 -0
  41. package/dist/styles/product-set/EditZoneSettingModal.scss +16 -0
  42. package/dist/styles/product-set/ProductSetForm.scss +14 -1
  43. package/dist/styles/product-set/_index.scss +2 -1
  44. package/package.json +1 -1
  45. package/src/auth/Login/LoginComponent.tsx +1 -1
  46. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -4
  47. package/src/layout/DropDown.tsx +1 -1
  48. package/src/product-set/control/ProductSetControl.tsx +2 -1
  49. package/src/product-set/form/ProductCategoriesControl.tsx +0 -3
  50. package/src/product-set/form/ProductZonesControl.tsx +178 -0
  51. package/src/product-set/form/ProductsControl.tsx +0 -17
  52. package/src/product-set/product/ProductControl.tsx +23 -268
  53. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +168 -0
  54. package/src/product-set/product/advanced-options/index.ts +1 -0
  55. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +1 -1
  56. package/src/product-set/product-category/ProductCategoryControl.tsx +1 -60
  57. package/src/product-set/product-zone/ProductZoneControl.tsx +247 -0
  58. package/src/product-set/product-zone/index.ts +1 -0
  59. package/src/product-set/utils/index.ts +5 -1
  60. package/src/sales/booking/results/BookingResults.tsx +1 -1
  61. package/src/sortable-tree/SortableTreeItem.tsx +59 -45
  62. package/src/styles/product-set/CreateProductSetItem.scss +8 -0
  63. package/src/styles/product-set/EditZoneSettingModal.scss +16 -0
  64. package/src/styles/product-set/ProductSetForm.scss +14 -1
  65. package/src/styles/product-set/_index.scss +2 -1
  66. package/yarn.lock +120 -99
@@ -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) {
@@ -29,19 +29,20 @@ import 'react-bootstrap/OverlayTrigger';
29
29
  import 'react-bootstrap/Popover';
30
30
  import '@licklist/plugins/dist/services/Form/HookFormService';
31
31
  import '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
32
- import '@licklist/core/dist/DataMapper/Product/ProductDataMapper';
33
32
  import 'react-bootstrap/Collapse';
34
33
  import '@licklist/plugins/dist/hooks/Media/useImages';
35
34
  import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
35
+ import '@licklist/plugins';
36
36
  import '@licklist/plugins/dist/context/app/hooks/useNotification';
37
37
  import '../../../../../static/index.js';
38
+ import '../../../../../tiptap-editor/TipTapEditor.js';
39
+ import '@licklist/core/dist/DataMapper/Product/ProductDataMapper';
38
40
  import '@licklist/core/dist/DataMapper/Provider/SnippetTemplateDataMapper';
39
41
  import 'react-color';
40
42
  import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
41
43
  import '../../../../../calendar/Calendar.js';
42
44
  import 'luxon';
43
45
  import 'react-intl';
44
- import '../../../../../tiptap-editor/TipTapEditor.js';
45
46
  import '@licklist/core/dist/Config';
46
47
  import '../../../../../iframe/event/event-card/IframeEventCardSkeleton.js';
47
48
  import '../../../../../iframe/page/Page.js';
@@ -70,6 +71,10 @@ import '../../../../../iframe/order-process/components/CalendarStepsForm/Calenda
70
71
  import '../../../../../iframe/payment/payment-status-page/PaymentStatusPage.js';
71
72
  import '../../../../../static/manual-date-picker/constants/index.js';
72
73
  import '../../../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js';
74
+ import '../../../../../sortable-tree/SortableTree.js';
75
+ import '@dnd-kit/core';
76
+ import '@dnd-kit/sortable';
77
+ import '@dnd-kit/utilities';
73
78
  import 'framer-motion';
74
79
  import '../../../../../product-set/tabs/ProductSetTabs.js';
75
80
  import { getDefaultValues } from '../../../utils/getDefaultProductSet.js';
@@ -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,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAsCD,CAAC"}
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,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAoCD,CAAC"}
@@ -14,6 +14,24 @@ function _define_property(obj, key, value) {
14
14
  }
15
15
  return obj;
16
16
  }
17
+ function _extends() {
18
+ _extends = Object.assign || function(target) {
19
+ for(var i = 1; i < arguments.length; i++){
20
+ var source = arguments[i];
21
+ for(var key in source){
22
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
23
+ target[key] = source[key];
24
+ }
25
+ }
26
+ }
27
+ return target;
28
+ };
29
+ return _extends.apply(this, arguments);
30
+ }
31
+ function _object_destructuring_empty(o) {
32
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
33
+ return o;
34
+ }
17
35
  function _object_spread(target) {
18
36
  for(var i = 1; i < arguments.length; i++){
19
37
  var source = arguments[i] != null ? arguments[i] : {};
@@ -108,22 +126,17 @@ var getDefaultValues = function(productSet, hasNoRecurrences) {
108
126
  var _products_map;
109
127
  return _object_spread_props(_object_spread({}, productCategory), {
110
128
  products: (_products_map = products === null || products === void 0 ? void 0 : products.map(function(_param) {
111
- var zoneId = _param.zoneId, subProducts = _param.subProducts, product = _object_without_properties(_param, [
112
- "zoneId",
129
+ var subProducts = _param.subProducts, product = _object_without_properties(_param, [
113
130
  "subProducts"
114
131
  ]);
115
132
  return _object_spread_props(_object_spread({}, product), {
116
133
  subProducts: subProducts === null || subProducts === void 0 ? void 0 : subProducts.map(function(_param) {
117
- var zoneId = _param.zoneId, subProducts = _object_without_properties(_param, [
118
- "zoneId"
119
- ]);
134
+ var subProducts = _extends({}, _object_destructuring_empty(_param));
120
135
  return _object_spread_props(_object_spread({}, subProducts), {
121
- productCategoryId: undefined,
122
- zoneId: zoneId
136
+ productCategoryId: undefined
123
137
  });
124
138
  }),
125
- productCategoryId: undefined,
126
- zoneId: zoneId
139
+ productCategoryId: undefined
127
140
  });
128
141
  })) !== null && _products_map !== void 0 ? _products_map : []
129
142
  });
@@ -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: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<unknown>>;
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":"AAEA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,iBAAiB,CAAC,EAAE,GAAG,CAAC;CACzB;AAED,QAAA,MAAM,QAAQ,2FAcZ,CAAC;AAIH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../src/layout/DropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,iBAAiB,CAAC,EAAE,GAAG,CAAC;CACzB;AAED,QAAA,MAAM,QAAQ,uEAcZ,CAAC;AAIH,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAIA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;A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CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,EACpC,WAAmB,EACnB,oBAA4B,GAC7B,EAAE,sBAAsB,2CA0TxB"}
1
+ {"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAIA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EA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AAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,EACpC,WAAmB,EACnB,oBAA4B,GAC7B,EAAE,sBAAsB,2CA0TxB"}
@@ -7,6 +7,7 @@ import { OPERATIONAL_COST_PROVIDER, OPERATIONAL_COST_CUSTOMER, RELY_ON_PEOPLE_PR
7
7
  import { useId } from '@react-aria/utils';
8
8
  import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
9
9
  import { ruleForUrlWithProtocol } from '@licklist/plugins/dist/validation/Rules/urlRule';
10
+ import { checkIfZoneCategory } from '@licklist/plugins';
10
11
  import '../../static/index.js';
11
12
  import { DateAndRecurrenceInput } from './DateAndRecurrenceInput.js';
12
13
  import TutorialGifCard from './TutorialGifCard.js';
@@ -89,9 +90,8 @@ function ProductSetControl(param) {
89
90
  var showDateSelector = !isEventEditProductSet && isOverrides;
90
91
  var isZoneAdded = steps === null || steps === void 0 ? void 0 : steps.some(function(param) {
91
92
  var productCategories = param.productCategories;
92
- return productCategories === null || productCategories === void 0 ? void 0 : productCategories.some(function(param) {
93
- var zoneId = param.zoneId;
94
- return zoneId;
93
+ return productCategories === null || productCategories === void 0 ? void 0 : productCategories.some(function(category) {
94
+ return checkIfZoneCategory(category === null || category === void 0 ? void 0 : category.type);
95
95
  });
96
96
  });
97
97
  return /*#__PURE__*/ jsxs(Row, {
@@ -1 +1 @@
1
- {"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"AAYA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA2BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,6BAA6B,2CAsT/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAczC,CAAC"}
1
+ {"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"AAYA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA0BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,6BAA6B,2CAoT/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAczC,CAAC"}
@@ -136,7 +136,6 @@ var getCategoryDefaultValue = function(categoryType, sort) {
136
136
  isReusable: false,
137
137
  hasSubEvents: false,
138
138
  products: [],
139
- zoneId: null,
140
139
  sort: sort
141
140
  };
142
141
  };
@@ -144,7 +143,7 @@ function ProductCategoriesControl(param) {
144
143
  var isLoading = param.isLoading, stepIndex = param.stepIndex, isOverrides = param.isOverrides, isEventEditProductSet = param.isEventEditProductSet, isCreateNewOverrides = param.isCreateNewOverrides;
145
144
  var _errors_steps_stepIndex, _errors_steps, _errors_steps_stepIndex1, _errors_steps1, _errors_steps_stepIndex2, _errors_steps2;
146
145
  var t = useTranslation("Design").t;
147
- var _useContext = useContext(ProductSetLoadingContext), providerHasMap = _useContext.providerHasMap, expandedProductCategories = _useContext.expandedProductCategories, setExpandedProductCategories = _useContext.setExpandedProductCategories, zones = _useContext.zones;
146
+ var _useContext = useContext(ProductSetLoadingContext), providerHasMap = _useContext.providerHasMap, expandedProductCategories = _useContext.expandedProductCategories, setExpandedProductCategories = _useContext.setExpandedProductCategories;
148
147
  var form = useFormContext();
149
148
  var _useState = _sliced_to_array(useState(false), 2), isSelectCategoryVisible = _useState[0], setIsSelectCategoryVisible = _useState[1];
150
149
  var _useState1 = _sliced_to_array(useState(false), 2), isVenueMapSetModalVisible = _useState1[0], setIsVenueMapSetModalVisible = _useState1[1];
@@ -328,7 +327,6 @@ function ProductCategoriesControl(param) {
328
327
  quantityType: productCategory.quantityType,
329
328
  hasTicket: productCategory === null || productCategory === void 0 ? void 0 : productCategory.hasTicket,
330
329
  stepIndex: stepIndex,
331
- zones: zones,
332
330
  productCategoryIndex: index,
333
331
  categoryType: productCategory.type,
334
332
  isOverrides: isOverrides,
@@ -0,0 +1,9 @@
1
+ import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
2
+ import { FieldNamePrefixPath, FormValues } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
3
+ interface ProductZonesControlProps<T> extends FieldNamePrefixPath<T> {
4
+ isOverrides: boolean;
5
+ categoryType?: CategoryType;
6
+ }
7
+ export declare const ProductZonesControl: <T extends FormValues>({ isOverrides, fieldNamePrefix, categoryType, }: ProductZonesControlProps<T>) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=ProductZonesControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAQtE,UAAU,wBAAwB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAaD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,UAAU,mDAIrD,wBAAwB,CAAC,CAAC,CAAC,4CAqI7B,CAAC"}
@@ -0,0 +1,214 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { useState, useContext } from 'react';
3
+ import { useFormContext, useFieldArray, useWatch, Controller } from 'react-hook-form';
4
+ import { Badge } from 'react-bootstrap';
5
+ import { HookFormService } from '@licklist/plugins';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { ProductSetLoadingContext } from './context.js';
8
+ import { useSortableTreeFunctions } from '../hooks/useSortableTreeFunctions.js';
9
+ import { ProductZoneControl } from '../product-zone/ProductZoneControl.js';
10
+ import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
11
+ import { SortableTree } from '../../sortable-tree/SortableTree.js';
12
+ import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js';
13
+
14
+ function _array_like_to_array(arr, len) {
15
+ if (len == null || len > arr.length) len = arr.length;
16
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
17
+ return arr2;
18
+ }
19
+ function _array_with_holes(arr) {
20
+ if (Array.isArray(arr)) return arr;
21
+ }
22
+ function _array_without_holes(arr) {
23
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
24
+ }
25
+ function _iterable_to_array(iter) {
26
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
27
+ }
28
+ function _iterable_to_array_limit(arr, i) {
29
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
30
+ if (_i == null) return;
31
+ var _arr = [];
32
+ var _n = true;
33
+ var _d = false;
34
+ var _s, _e;
35
+ try {
36
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
37
+ _arr.push(_s.value);
38
+ if (i && _arr.length === i) break;
39
+ }
40
+ } catch (err) {
41
+ _d = true;
42
+ _e = err;
43
+ } finally{
44
+ try {
45
+ if (!_n && _i["return"] != null) _i["return"]();
46
+ } finally{
47
+ if (_d) throw _e;
48
+ }
49
+ }
50
+ return _arr;
51
+ }
52
+ function _non_iterable_rest() {
53
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
54
+ }
55
+ function _non_iterable_spread() {
56
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57
+ }
58
+ function _sliced_to_array(arr, i) {
59
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
60
+ }
61
+ function _to_consumable_array(arr) {
62
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
63
+ }
64
+ function _unsupported_iterable_to_array(o, minLen) {
65
+ if (!o) return;
66
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
67
+ var n = Object.prototype.toString.call(o).slice(8, -1);
68
+ if (n === "Object" && o.constructor) n = o.constructor.name;
69
+ if (n === "Map" || n === "Set") return Array.from(n);
70
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
71
+ }
72
+ var getDefaultProductZone = function() {
73
+ return {
74
+ id: null,
75
+ zoneId: null,
76
+ capacity: null,
77
+ duration: null,
78
+ subSlots: null,
79
+ offset: null,
80
+ pause: null,
81
+ serviceTime: null
82
+ };
83
+ };
84
+ var ProductZonesControl = function(param) {
85
+ var isOverrides = param.isOverrides, fieldNamePrefix = param.fieldNamePrefix, categoryType = param.categoryType;
86
+ var _useState = _sliced_to_array(useState(false), 2), showProductZoneModal = _useState[0], setShowProductZoneModal = _useState[1];
87
+ var t = useTranslation([
88
+ "Design",
89
+ "Validation",
90
+ "ProductSet"
91
+ ]).t;
92
+ var _useFormContext = useFormContext(), control = _useFormContext.control, errors = _useFormContext.formState.errors, trigger = _useFormContext.trigger, clearErrors = _useFormContext.clearErrors;
93
+ var productZonesFieldName = "".concat(fieldNamePrefix, ".productZones");
94
+ var _useFieldArray = useFieldArray({
95
+ name: productZonesFieldName,
96
+ control: control,
97
+ keyName: "_id",
98
+ rules: {
99
+ required: t("Validation:fieldMinNumber", {
100
+ attribute: t("zones"),
101
+ min: 1
102
+ }),
103
+ minLength: 1
104
+ }
105
+ }), fields = _useFieldArray.fields, append = _useFieldArray.append, remove = _useFieldArray.remove;
106
+ var _useContext = useContext(ProductSetLoadingContext), _useContext_zones = _useContext.zones, zones = _useContext_zones === void 0 ? [] : _useContext_zones;
107
+ var _useSortableTreeFunctions = useSortableTreeFunctions({
108
+ fieldName: productZonesFieldName,
109
+ remove: remove,
110
+ isOverrides: isOverrides
111
+ }), edit = _useSortableTreeFunctions.edit, saveValidField = _useSortableTreeFunctions.saveValidField, cancelChanges = _useSortableTreeFunctions.cancelChanges;
112
+ var productZonesError = HookFormService.getErrors("".concat(productZonesFieldName, ".root"), errors);
113
+ var zoneCapacity = useWatch({
114
+ control: control,
115
+ name: _to_consumable_array(fields.map(function(_, index) {
116
+ return "".concat(productZonesFieldName, ".").concat(index, ".capacity");
117
+ }))
118
+ });
119
+ var zoneDuration = useWatch({
120
+ control: control,
121
+ name: _to_consumable_array(fields.map(function(_, index) {
122
+ return "".concat(productZonesFieldName, ".").concat(index, ".duration");
123
+ }))
124
+ });
125
+ var onZoneSettingRemove = function(index) {
126
+ remove(index);
127
+ };
128
+ return /*#__PURE__*/ jsxs(Fragment, {
129
+ children: [
130
+ fields.map(function(productZones, index) {
131
+ return /*#__PURE__*/ jsx(Controller, {
132
+ control: control,
133
+ name: "".concat(productZonesFieldName, ".").concat(index, ".zoneId"),
134
+ rules: {
135
+ required: t("Validation:fieldRequired", {
136
+ attribute: t("zone")
137
+ })
138
+ },
139
+ render: function(param) {
140
+ var value = param.field.value;
141
+ var _zones_find;
142
+ return /*#__PURE__*/ jsx(SortableTree.Item, {
143
+ id: String(productZones._id),
144
+ title: (_zones_find = zones.find(function(zone) {
145
+ return zone.id === Number(value);
146
+ })) === null || _zones_find === void 0 ? void 0 : _zones_find.name,
147
+ badge: /*#__PURE__*/ jsx(Badge, {
148
+ className: "product-zone-badge",
149
+ children: t("productZone")
150
+ }),
151
+ isIconInHeader: false,
152
+ cancelChanges: function() {
153
+ return cancelChanges(index);
154
+ },
155
+ edit: function() {
156
+ return edit(index);
157
+ },
158
+ subTitle: /*#__PURE__*/ jsxs("div", {
159
+ className: "product-set-badges-container",
160
+ children: [
161
+ /*#__PURE__*/ jsx("div", {
162
+ className: "product-set-subtitle-dot product-set-subtitle-product-dot"
163
+ }),
164
+ /*#__PURE__*/ jsxs("span", {
165
+ children: [
166
+ zoneCapacity[index] && "".concat(t("Cap"), ": ").concat(zoneCapacity[index], "; "),
167
+ "".concat(t("Dur"), ": ").concat(zoneDuration[index])
168
+ ]
169
+ })
170
+ ]
171
+ }),
172
+ modalLabel: t("addAZone"),
173
+ modalClass: ProductSetModalClasses.productZones,
174
+ isNewAdded: showProductZoneModal,
175
+ shouldExpand: false,
176
+ body: /*#__PURE__*/ jsx(ProductZoneControl, {
177
+ isOverrides: isOverrides,
178
+ categoryType: categoryType,
179
+ productZonesFieldName: productZonesFieldName,
180
+ fieldNamePrefix: "".concat(productZonesFieldName, ".").concat(index)
181
+ }),
182
+ onDelete: function() {
183
+ return onZoneSettingRemove(index);
184
+ },
185
+ validate: function() {
186
+ return trigger("".concat(productZonesFieldName, ".").concat(index));
187
+ },
188
+ saveValidField: saveValidField
189
+ }, "productZones-".concat(productZones._id));
190
+ }
191
+ }, productZones._id);
192
+ }),
193
+ /*#__PURE__*/ jsx(CreateProductSetItem, {
194
+ title: t("addZone"),
195
+ onClick: function() {
196
+ // @TODO after updating react hook form fix issue with this type
197
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
198
+ // @ts-expect-error
199
+ append(getDefaultProductZone());
200
+ setShowProductZoneModal(true);
201
+ if (productZonesError) {
202
+ clearErrors(productZonesFieldName);
203
+ }
204
+ }
205
+ }),
206
+ /*#__PURE__*/ jsx("div", {
207
+ className: "manual-form-error",
208
+ children: productZonesError
209
+ })
210
+ ]
211
+ });
212
+ };
213
+
214
+ export { ProductZonesControl };
@@ -1,5 +1,4 @@
1
1
  import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
2
- import { Zone } from "@licklist/core/dist/DataMapper/Provider/ZoneDataMapper";
3
2
  import { ProductControlProps, ProductSetFormValues } from "..";
4
3
  import { WithIsLoading } from "./ProductSetForm";
5
4
  interface ProductsControlProps extends WithIsLoading {
@@ -8,11 +7,10 @@ interface ProductsControlProps extends WithIsLoading {
8
7
  productCategoryIndex: number;
9
8
  hasTicket?: boolean;
10
9
  categoryType: CategoryType;
11
- zones?: Zone[];
12
10
  isOverrides?: boolean;
13
11
  isEventEditProductSet?: boolean;
14
12
  isCreateNewOverrides?: boolean;
15
13
  }
16
- export declare function ProductsControl({ isLoading, quantityType, stepIndex, productCategoryIndex, hasTicket, categoryType, zones, isOverrides, isEventEditProductSet, isCreateNewOverrides, }: ProductsControlProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function ProductsControl({ isLoading, quantityType, stepIndex, productCategoryIndex, hasTicket, categoryType, isOverrides, isEventEditProductSet, isCreateNewOverrides, }: ProductsControlProps): import("react/jsx-runtime").JSX.Element;
17
15
  export {};
18
16
  //# sourceMappingURL=ProductsControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAChG,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAI/E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAoCD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,KAAK,EACL,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,2CAyOtB"}
1
+ {"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAChG,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAI/E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAQjD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA6BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,2CAkOtB"}
@@ -23,6 +23,7 @@ import 'react-bootstrap/Col';
23
23
  import 'react-bootstrap/InputGroup';
24
24
  import 'react-bootstrap/Row';
25
25
  import '@licklist/plugins/dist/services/Form/FormErrorService';
26
+ import '@licklist/plugins';
26
27
  import 'react-bootstrap/Button';
27
28
  import 'react-bootstrap/OverlayTrigger';
28
29
  import 'react-bootstrap/Popover';
@@ -108,8 +109,6 @@ var getDefaultProductValue = function(sort) {
108
109
  minQuantity: null,
109
110
  maxQuantity: null,
110
111
  totalQuantity: 0,
111
- capacity: 0,
112
- duration: 0,
113
112
  isAvailable: true,
114
113
  isSoldOut: false,
115
114
  isRequired: false,
@@ -120,28 +119,19 @@ var getDefaultProductValue = function(sort) {
120
119
  originalProductId: null,
121
120
  type: DEFAULT_PRODUCT_TYPE,
122
121
  tierId: Number(uniqueId()),
123
- zoneId: null,
124
122
  subProducts: [],
125
123
  images: [],
126
124
  uuid: generateUuid(),
127
- subSlots: null,
128
- offset: null,
129
- pause: null,
130
- serviceTime: null,
131
125
  sort: sort
132
126
  };
133
127
  };
134
128
  function ProductsControl(param) {
135
- var isLoading = param.isLoading, quantityType = param.quantityType, stepIndex = param.stepIndex, productCategoryIndex = param.productCategoryIndex, hasTicket = param.hasTicket, categoryType = param.categoryType, zones = param.zones, isOverrides = param.isOverrides, isEventEditProductSet = param.isEventEditProductSet, isCreateNewOverrides = param.isCreateNewOverrides;
129
+ var isLoading = param.isLoading, quantityType = param.quantityType, stepIndex = param.stepIndex, productCategoryIndex = param.productCategoryIndex, hasTicket = param.hasTicket, categoryType = param.categoryType, isOverrides = param.isOverrides, isEventEditProductSet = param.isEventEditProductSet, isCreateNewOverrides = param.isCreateNewOverrides;
136
130
  var _errors_steps_stepIndex_productCategories_productCategoryIndex, _errors_steps_stepIndex_productCategories, _errors_steps_stepIndex, _errors_steps;
137
131
  var t = useTranslation("Design").t;
138
132
  var form = useFormContext();
139
133
  var _useState = _sliced_to_array(useState(false), 2), showProductModal = _useState[0], setShowProductModal = _useState[1];
140
134
  var control = form.control, errors = form.formState.errors, clearErrors = form.clearErrors, trigger = form.trigger, setValue = form.setValue, watch = form.watch, getValues = form.getValues;
141
- var zoneId = watch("steps.".concat(stepIndex, ".productCategories.").concat(productCategoryIndex, ".zoneId"));
142
- var catergoryZone = zones === null || zones === void 0 ? void 0 : zones.find(function(zone) {
143
- return zone.id === Number(zoneId);
144
- });
145
135
  var productControlFieldName = "steps.".concat(stepIndex, ".productCategories.").concat(productCategoryIndex, ".products");
146
136
  var productPointsKey = "steps.".concat(stepIndex, ".pointProducts");
147
137
  var _useFieldArray = useFieldArray({
@@ -271,7 +261,6 @@ function ProductsControl(param) {
271
261
  onProductNameChange: onChange,
272
262
  hasTicket: hasTicket,
273
263
  categoryType: categoryType,
274
- zoneDuration: catergoryZone === null || catergoryZone === void 0 ? void 0 : catergoryZone.defaultDuration,
275
264
  isOverrides: isNewProductOverrides || isOverridesProductSet
276
265
  }),
277
266
  onDelete: function() {
@@ -3,10 +3,11 @@ import { ProductType } from "@licklist/core/dist/DataMapper/Product/ProductDataM
3
3
  import { FieldNamePrefixPath, FormValues } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
4
4
  import { ChangeEvent } from "react";
5
5
  import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
6
- import { ProductBookingManagementControlProps, ProductBookingManagementControlValues } from "./booking-management/ProductBookingManagementControl";
6
+ import { ProductBookingManagementControlProps } from "./booking-management/ProductBookingManagementControl";
7
7
  import { ProductDepositControlValues } from "./deposit/ProductDepositControl";
8
8
  import { IsDeletableEvent } from "../types";
9
- export interface ProductControlValues extends FormValues, ProductDepositControlValues, ProductBookingManagementControlValues {
9
+ import { ProductZoneControlValues } from "../product-zone";
10
+ export interface ProductControlValues extends FormValues, ProductDepositControlValues {
10
11
  name: string;
11
12
  productGroupId: number;
12
13
  description: string;
@@ -29,12 +30,9 @@ export interface ProductControlValues extends FormValues, ProductDepositControlV
29
30
  tierId?: number;
30
31
  images: Image[] | null;
31
32
  uuid: string;
32
- subSlots: number;
33
- pause: number;
34
- offset: number;
35
- serviceTime: number;
36
33
  sort: number | null;
37
34
  color?: string;
35
+ productZones?: ProductZoneControlValues[];
38
36
  }
39
37
  export interface ProductControlProps<T> extends IsDeletableEvent, FieldNamePrefixPath<T>, ProductBookingManagementControlProps<T> {
40
38
  isLoading: boolean;
@@ -47,7 +45,6 @@ export interface ProductControlProps<T> extends IsDeletableEvent, FieldNamePrefi
47
45
  hasTicket?: boolean;
48
46
  categoryType?: CategoryType;
49
47
  isOverrides?: boolean;
50
- zoneDuration?: number;
51
48
  }
52
- export declare function ProductControl<T extends FormValues>({ isLoading, fieldNamePrefix, allowDeposits, hasBookingManagement, zoneList, onCopy, onProductNameChange, productName, hasTicket, categoryType, zoneDuration, isOverrides, }: ProductControlProps<T>): import("react/jsx-runtime").JSX.Element;
49
+ 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;
53
50
  //# sourceMappingURL=ProductControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/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,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,CACpC,SAAQ,gBAAgB,EACtB,mBAAmB,CAAC,CAAC,CAAC,EACtB,oCAAoC,CAAC,CAAC,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;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,YAAY,EACZ,WAAmB,GACpB,EAAE,mBAAmB,CAAC,CAAC,CAAC,2CAslBxB"}
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,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE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