@licklist/design 0.78.7-stage.23 → 0.78.7-stage.24

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.
@@ -6,7 +6,8 @@ interface CategoryProductProps {
6
6
  canExpandDescription?: boolean;
7
7
  productsWithErrors?: QuantityCheckProductInfo[];
8
8
  soldOutProducts?: QuantityCheckProductInfo[];
9
+ disabled?: boolean;
9
10
  }
10
- export declare const CategoryProduct: ({ product, category, canExpandDescription, productsWithErrors, soldOutProducts, }: CategoryProductProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const CategoryProduct: ({ product, category, canExpandDescription, productsWithErrors, soldOutProducts, disabled }: CategoryProductProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};
12
13
  //# sourceMappingURL=CategoryProduct.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAQ5D,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC7C;AAED,eAAO,MAAM,eAAe,sFAMzB,oBAAoB,4CAoPtB,CAAA"}
1
+ {"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAQ5D,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,eAAe,+FAOzB,oBAAoB,4CAqPtB,CAAA"}
@@ -110,7 +110,7 @@ function _unsupported_iterable_to_array(o, minLen) {
110
110
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
111
111
  }
112
112
  var CategoryProduct = function(param) {
113
- var product = param.product, category = param.category, _param_canExpandDescription = param.canExpandDescription, canExpandDescription = _param_canExpandDescription === void 0 ? true : _param_canExpandDescription, productsWithErrors = param.productsWithErrors, soldOutProducts = param.soldOutProducts;
113
+ var product = param.product, category = param.category, _param_canExpandDescription = param.canExpandDescription, canExpandDescription = _param_canExpandDescription === void 0 ? true : _param_canExpandDescription, productsWithErrors = param.productsWithErrors, soldOutProducts = param.soldOutProducts, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled;
114
114
  var formatNumber = useIntl().formatNumber;
115
115
  var t = useTranslation([
116
116
  'Design',
@@ -256,6 +256,7 @@ var CategoryProduct = function(param) {
256
256
  onChange: onChange,
257
257
  productInfo: productInfo,
258
258
  refCallback: ref,
259
+ disabled: disabled,
259
260
  clearErrors: clearErrors,
260
261
  product: _object_spread_props(_object_spread({}, product), {
261
262
  isSoldOut: (product === null || product === void 0 ? void 0 : product.isSoldOut) || checkIfSoldOutProduct()
@@ -21,7 +21,8 @@ interface ProductQuantityInputProps {
21
21
  refCallback: RefCallBack;
22
22
  invalid: boolean;
23
23
  productInfo: FormOrderItem;
24
+ disabled?: boolean;
24
25
  }
25
- export declare const ProductQuantityInput: ({ product, category, onChange: _onChange, clearErrors, refCallback, productInfo, invalid, }: ProductQuantityInputProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const ProductQuantityInput: ({ product, category, onChange: _onChange, clearErrors, refCallback, productInfo, invalid, disabled }: ProductQuantityInputProps) => import("react/jsx-runtime").JSX.Element;
26
27
  export {};
27
28
  //# sourceMappingURL=ProductQuantityInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAoH3B,CAAA"}
1
+ {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,oBAAoB,yGAS9B,yBAAyB,4CAqH3B,CAAA"}
@@ -54,7 +54,7 @@ function _unsupported_iterable_to_array(o, minLen) {
54
54
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
55
55
  }
56
56
  var ProductQuantityInput = function(param) {
57
- var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid;
57
+ var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled;
58
58
  var t = useTranslation('Design').t;
59
59
  var _useState = _sliced_to_array(useState(false), 2), open = _useState[0], handleOpenModal = _useState[1];
60
60
  var onChange = function(quantity) {
@@ -100,7 +100,7 @@ var ProductQuantityInput = function(param) {
100
100
  children: [
101
101
  /*#__PURE__*/ jsx(Button, {
102
102
  ref: refCallback,
103
- disabled: product.isSoldOut,
103
+ disabled: product.isSoldOut || disabled,
104
104
  className: clsx("iframe-event__".concat((productInfo === null || productInfo === void 0 ? void 0 : productInfo.quantity) ? 'unselect-product' : 'select-product'), invalid && 'error'),
105
105
  onClick: function() {
106
106
  return handleOpenModal(true);
@@ -147,7 +147,7 @@ var ProductQuantityInput = function(param) {
147
147
  min: (product === null || product === void 0 ? void 0 : product.minAmount) ? Number(product.minAmount) : 0,
148
148
  max: (product === null || product === void 0 ? void 0 : product.maxAmount) ? Number(product.maxAmount) : undefined,
149
149
  placeholder: "0",
150
- disabled: product.isSoldOut,
150
+ disabled: product.isSoldOut || disabled,
151
151
  value: productInfo === null || productInfo === void 0 ? void 0 : productInfo.quantity,
152
152
  className: clsx(invalid && 'error')
153
153
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.7-stage.23",
3
+ "version": "0.78.7-stage.24",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "@licklist/core": "0.36.3-stage.5",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.36.4-stage.14",
47
+ "@licklist/plugins": "0.36.4-stage.13",
48
48
  "clsx": "2.1.1",
49
49
  "i18next": "25.3.2",
50
50
  "lodash": "4.17.21",
@@ -66,7 +66,7 @@
66
66
  "@fortawesome/free-solid-svg-icons": "5.15.2",
67
67
  "@licklist/core": "0.36.3-stage.5",
68
68
  "@licklist/eslint-config": "0.5.6",
69
- "@licklist/plugins": "0.36.4-stage.14",
69
+ "@licklist/plugins": "0.36.4-stage.13",
70
70
  "@mantine/core": "6.0.22",
71
71
  "@mantine/hooks": "6.0.22",
72
72
  "@mdx-js/react": "1.6.22",
@@ -23,6 +23,7 @@ interface CategoryProductProps {
23
23
  canExpandDescription?: boolean
24
24
  productsWithErrors?: QuantityCheckProductInfo[]
25
25
  soldOutProducts?: QuantityCheckProductInfo[]
26
+ disabled?: boolean
26
27
  }
27
28
 
28
29
  export const CategoryProduct = ({
@@ -31,6 +32,7 @@ export const CategoryProduct = ({
31
32
  canExpandDescription = true,
32
33
  productsWithErrors,
33
34
  soldOutProducts,
35
+ disabled =false
34
36
  }: CategoryProductProps) => {
35
37
  const { formatNumber } = useIntl()
36
38
  const { t } = useTranslation(['Design', 'Validation'])
@@ -196,6 +198,7 @@ export const CategoryProduct = ({
196
198
  onChange={onChange}
197
199
  productInfo={productInfo}
198
200
  refCallback={ref}
201
+ disabled={disabled}
199
202
  clearErrors={clearErrors}
200
203
  product={{
201
204
  ...product,
@@ -34,6 +34,7 @@ interface ProductQuantityInputProps {
34
34
  refCallback: RefCallBack
35
35
  invalid: boolean
36
36
  productInfo: FormOrderItem
37
+ disabled?: boolean
37
38
  }
38
39
 
39
40
  export const ProductQuantityInput = ({
@@ -44,6 +45,7 @@ export const ProductQuantityInput = ({
44
45
  refCallback,
45
46
  productInfo,
46
47
  invalid,
48
+ disabled = false
47
49
  }: ProductQuantityInputProps) => {
48
50
  const { t } = useTranslation('Design')
49
51
  const [open, handleOpenModal] = useState(false)
@@ -97,7 +99,7 @@ export const ProductQuantityInput = ({
97
99
  <>
98
100
  <Button
99
101
  ref={refCallback}
100
- disabled={product.isSoldOut}
102
+ disabled={product.isSoldOut || disabled}
101
103
  className={clsx(
102
104
  `iframe-event__${
103
105
  productInfo?.quantity ? 'unselect-product' : 'select-product'
@@ -140,6 +142,7 @@ export const ProductQuantityInput = ({
140
142
  return (
141
143
  <NumberInput
142
144
  ref={refCallback}
145
+
143
146
  onChange={(val) => {
144
147
  onChange(val)
145
148
  clearErrors(`${product.id}` as const)
@@ -155,7 +158,7 @@ export const ProductQuantityInput = ({
155
158
  min={product?.minAmount ? Number(product.minAmount) : 0}
156
159
  max={product?.maxAmount ? Number(product.maxAmount) : undefined}
157
160
  placeholder='0'
158
- disabled={product.isSoldOut}
161
+ disabled={product.isSoldOut || disabled}
159
162
  value={productInfo?.quantity}
160
163
  className={clsx(invalid && 'error')}
161
164
  />
package/yarn.lock CHANGED
@@ -2484,7 +2484,7 @@ __metadata:
2484
2484
  "@fortawesome/free-solid-svg-icons": "npm:5.15.2"
2485
2485
  "@licklist/core": "npm:0.36.3-stage.5"
2486
2486
  "@licklist/eslint-config": "npm:0.5.6"
2487
- "@licklist/plugins": "npm:0.36.4-stage.14"
2487
+ "@licklist/plugins": "npm:0.36.4-stage.13"
2488
2488
  "@mantine/core": "npm:6.0.22"
2489
2489
  "@mantine/hooks": "npm:6.0.22"
2490
2490
  "@mdx-js/react": "npm:1.6.22"
@@ -2615,7 +2615,7 @@ __metadata:
2615
2615
  peerDependencies:
2616
2616
  "@licklist/core": 0.36.3-stage.5
2617
2617
  "@licklist/eslint-config": 0.5.6
2618
- "@licklist/plugins": 0.36.4-stage.14
2618
+ "@licklist/plugins": 0.36.4-stage.13
2619
2619
  clsx: 2.1.1
2620
2620
  i18next: 25.3.2
2621
2621
  lodash: 4.17.21
@@ -2648,9 +2648,9 @@ __metadata:
2648
2648
  languageName: node
2649
2649
  linkType: hard
2650
2650
 
2651
- "@licklist/plugins@npm:0.36.4-stage.14":
2652
- version: 0.36.4-stage.14
2653
- resolution: "@licklist/plugins@npm:0.36.4-stage.14"
2651
+ "@licklist/plugins@npm:0.36.4-stage.13":
2652
+ version: 0.36.4-stage.13
2653
+ resolution: "@licklist/plugins@npm:0.36.4-stage.13"
2654
2654
  dependencies:
2655
2655
  "@licklist/core": "npm:0.36.3-stage.5"
2656
2656
  axios: "npm:0.26.0"
@@ -2689,7 +2689,7 @@ __metadata:
2689
2689
  react-loader: 2.4.7
2690
2690
  react-query: 3.34.12
2691
2691
  react-router-dom: 6.30.1
2692
- checksum: 10c0/ac8781d845255fb68eab9918c2d35ae5ff1af93913c5a0051e251d0750cf012bf41757ffd934c716fadf2848831c168f670513d13a36463d94e545e905b871b4
2692
+ checksum: 10c0/7f8b21f17fc4d8bb76bfde0408927e81514d491ecf9b7cacea2494b0db1e48e79c4211cb40a92b36cbf4a6c0da6756f038d65cddb2c7f12a072f2d2e57fb87ab
2693
2693
  languageName: node
2694
2694
  linkType: hard
2695
2695