@licklist/design 0.72.0 → 0.72.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.
@@ -31,6 +31,7 @@ import { ProductWithModifierSetForm } from './ProductWithModifierSetForm.js';
31
31
 
32
32
  var ProductWithModifierSetModal = function(param) {
33
33
  var show = param.show, onHide = param.onHide, product = param.product, category = param.category, onChange = param.onChange, editOrderModifier = param.editOrderModifier;
34
+ var _product_images, _product_images1;
34
35
  var _useDialogContext = useDialogContext(), onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState;
35
36
  useOnWindowUnmount({
36
37
  onBeforeUnload: onBeforeUnload,
@@ -57,14 +58,14 @@ var ProductWithModifierSetModal = function(param) {
57
58
  className: "right-block",
58
59
  id: "select-event-container",
59
60
  children: /*#__PURE__*/ jsxs("div", {
60
- className: clsx('manual-booking-container', !product.images.length && 'tw-mt-8'),
61
+ className: clsx('manual-booking-container', !(product === null || product === void 0 ? void 0 : (_product_images = product.images) === null || _product_images === void 0 ? void 0 : _product_images.length) && 'tw-mt-8'),
61
62
  children: [
62
63
  /*#__PURE__*/ jsx("div", {
63
64
  className: "manual-booking-header",
64
65
  children: /*#__PURE__*/ jsx(TicketDescription, {
65
66
  title: product.name,
66
67
  description: product.description,
67
- className: clsx('iframe-event__product-description', !product.images.length && 'mt-6'),
68
+ className: clsx('iframe-event__product-description', !(product === null || product === void 0 ? void 0 : (_product_images1 = product.images) === null || _product_images1 === void 0 ? void 0 : _product_images1.length) && 'mt-6'),
68
69
  classNameProductModal: "d-block",
69
70
  images: product.images,
70
71
  isRequired: product.isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,UAAU,aAAc,SAAQ,SAAS;IACvC,qBAAqB,CAAC,EAAG,sBAAsB,EAAE,GAAG,IAAI,CAAC;CAC1D;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,aAAa,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,cAAc,kDAIxB,mBAAmB,4CAyCrB,CAAA"}
1
+ {"version":3,"file":"ProductSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAIrG,UAAU,aAAc,SAAQ,SAAS;IACvC,qBAAqB,CAAC,EAAG,sBAAsB,EAAE,GAAG,IAAI,CAAC;CAC1D;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,aAAa,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,cAAc,kDAIxB,mBAAmB,4CAyCrB,CAAA"}
@@ -9,7 +9,7 @@ var ProductSummary = function(param) {
9
9
  var t = useTranslation('Design').t;
10
10
  var formatNumber = useIntl().formatNumber;
11
11
  var priceForOneProduct = orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.price;
12
- var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers);
12
+ var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers) || [];
13
13
  var fullPrice = formatNumber(priceForOneProduct * (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.quantity), {
14
14
  style: 'currency',
15
15
  currency: Config.Currency.GBP
@@ -38,7 +38,7 @@ var ProductSummary = function(param) {
38
38
  })
39
39
  ]
40
40
  }),
41
- !!modifiersSets.length && /*#__PURE__*/ jsx(Fragment, {
41
+ !!(modifiersSets === null || modifiersSets === void 0 ? void 0 : modifiersSets.length) && /*#__PURE__*/ jsx(Fragment, {
42
42
  children: modifiersSets.map(function(modifier, index) {
43
43
  return /*#__PURE__*/ jsx(ProductWithModifier, {
44
44
  modifier: modifier,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.72.0",
3
+ "version": "0.72.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -48,12 +48,12 @@ export const ProductWithModifierSetModal = ({
48
48
  </button>
49
49
  </div>
50
50
  <div className='right-block' id='select-event-container'>
51
- <div className={clsx('manual-booking-container', !product.images.length && 'tw-mt-8')}>
51
+ <div className={clsx('manual-booking-container', !product?.images?.length && 'tw-mt-8')}>
52
52
  <div className='manual-booking-header'>
53
53
  <TicketDescription
54
54
  title={product.name}
55
55
  description={product.description}
56
- className={clsx('iframe-event__product-description', !product.images.length && 'mt-6')}
56
+ className={clsx('iframe-event__product-description', !product?.images?.length && 'mt-6')}
57
57
  classNameProductModal='d-block'
58
58
  images={product.images}
59
59
  isRequired={product.isRequired}
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl'
3
3
  import * as Config from '@licklist/core/dist/Config'
4
4
  import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems'
5
5
  import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct'
6
- import { calculateTotalModifiersPrice } from '../../utils'
7
6
  import { ProductWithModifier } from '../../../CategoryProduct/components/ProductWithModifier/ProductWithModifier'
8
7
 
9
8
 
@@ -26,7 +25,7 @@ export const ProductSummary = ({
26
25
  const { formatNumber } = useIntl()
27
26
  const priceForOneProduct = orderProduct?.price
28
27
 
29
- const modifiersSets = orderProduct?.orderModifiersSets || orderProduct?.orderProductModifiers
28
+ const modifiersSets = orderProduct?.orderModifiersSets || orderProduct?.orderProductModifiers || []
30
29
 
31
30
  const fullPrice = formatNumber(priceForOneProduct * orderProduct?.quantity, {
32
31
  style: 'currency',
@@ -44,7 +43,7 @@ export const ProductSummary = ({
44
43
  <p className='price'>{fullPrice}</p>
45
44
  </div>
46
45
 
47
- {!!modifiersSets.length && (
46
+ {!!modifiersSets?.length && (
48
47
  <>
49
48
  {modifiersSets.map((modifier, index) => (
50
49
  <ProductWithModifier
package/yarn.lock CHANGED
@@ -5664,11 +5664,11 @@ __metadata:
5664
5664
  linkType: hard
5665
5665
 
5666
5666
  "@types/node@npm:*":
5667
- version: 22.13.4
5668
- resolution: "@types/node@npm:22.13.4"
5667
+ version: 22.13.5
5668
+ resolution: "@types/node@npm:22.13.5"
5669
5669
  dependencies:
5670
5670
  undici-types: "npm:~6.20.0"
5671
- checksum: 10c0/3a234fa7766a3efc382cf81f66f474c26cdab2f54f43f757634c81c0444eb2160c2dabbde9741e4983078a318a88515b65416b5f1ab5478548579d7b3ead1d95
5671
+ checksum: 10c0/a2e7ed7bb0690e439004779baedeb05159c5cc41ef6d81c7a6ebea5303fde4033669e1c0e41ff7453b45fd2fea8dbd55fddfcd052950c7fcae3167c970bca725
5672
5672
  languageName: node
5673
5673
  linkType: hard
5674
5674
 
@@ -9861,9 +9861,9 @@ __metadata:
9861
9861
  linkType: hard
9862
9862
 
9863
9863
  "electron-to-chromium@npm:^1.3.564, electron-to-chromium@npm:^1.5.73":
9864
- version: 1.5.102
9865
- resolution: "electron-to-chromium@npm:1.5.102"
9866
- checksum: 10c0/db07dab3ee3b7fbc39ad26203925669ade86b12a62d09fa14ae48a354a0f34d162ac9a2ca9d6f70ceb1b16821b01b155e56467702bcc915da1e1dd147dd034b4
9864
+ version: 1.5.103
9865
+ resolution: "electron-to-chromium@npm:1.5.103"
9866
+ checksum: 10c0/3b297311b9266ec3ad00eaa8566901603afedc2e19310a16ab9e7217e62f54dda83120ca5f2f75fe64a214d1ba6f6cbb52d7a1692e28de03fcba8bebf7bfc4d5
9867
9867
  languageName: node
9868
9868
  linkType: hard
9869
9869
 
@@ -14901,11 +14901,11 @@ __metadata:
14901
14901
  linkType: hard
14902
14902
 
14903
14903
  "nan@npm:^2.12.1":
14904
- version: 2.22.0
14905
- resolution: "nan@npm:2.22.0"
14904
+ version: 2.22.1
14905
+ resolution: "nan@npm:2.22.1"
14906
14906
  dependencies:
14907
14907
  node-gyp: "npm:latest"
14908
- checksum: 10c0/d5d31aefdb218deba308d44867c5f432b4d3aabeb57c70a2b236d62652e9fee7044e5d5afd380d9fef022fe7ebb2f2d6c85ca3cbcac5031aaca3592c844526bb
14908
+ checksum: 10c0/582c3cce9cf436cc577d57d3362aeaf891dd5b62616c337ec9f4009b2c5f77f82f79707e6d4b68a34e6a443f1d34a61a586d1bf16cdde9eeba5259f45116d569
14909
14909
  languageName: node
14910
14910
  linkType: hard
14911
14911
 
@@ -19026,11 +19026,11 @@ __metadata:
19026
19026
  linkType: hard
19027
19027
 
19028
19028
  "rxjs@npm:^7.5.5":
19029
- version: 7.8.1
19030
- resolution: "rxjs@npm:7.8.1"
19029
+ version: 7.8.2
19030
+ resolution: "rxjs@npm:7.8.2"
19031
19031
  dependencies:
19032
19032
  tslib: "npm:^2.1.0"
19033
- checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68
19033
+ checksum: 10c0/1fcd33d2066ada98ba8f21fcbbcaee9f0b271de1d38dc7f4e256bfbc6ffcdde68c8bfb69093de7eeb46f24b1fb820620bf0223706cff26b4ab99a7ff7b2e2c45
19034
19034
  languageName: node
19035
19035
  linkType: hard
19036
19036