@licklist/design 0.71.18-dev.7 → 0.71.18-dev.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ModifierSetControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAY1F,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB,CAAC,EAAE,aAAa,EAAE,CAAA;CAC3C;AAED,eAAO,MAAM,mBAAmB,4FAO7B,yBAAyB,4CAiV3B,CAAA"}
1
+ {"version":3,"file":"ModifierSetControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAY1F,UAAU,yBAAyB;IACjC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,wBAAwB,CAAC,EAAE,aAAa,EAAE,CAAA;CAC3C;AAED,eAAO,MAAM,mBAAmB,4FAO7B,yBAAyB,4CA4U3B,CAAA"}
@@ -66,7 +66,6 @@ var ModifiersSetControl = function(param) {
66
66
  var _useFormContext = useFormContext(), control = _useFormContext.control, watch = _useFormContext.watch, setValue = _useFormContext.setValue, trigger = _useFormContext.trigger;
67
67
  var t = useTranslation('App').t;
68
68
  var orderModifiersSets = watch("".concat(productId, ".orderProductModifiers"));
69
- console.log(orderModifiersSets, 'orderModifiersSets');
70
69
  var formatNumber = useIntl().formatNumber;
71
70
  var formatToCurrency = function(value) {
72
71
  return formatNumber(value, {
@@ -91,7 +90,6 @@ var ModifiersSetControl = function(param) {
91
90
  var checkSelectedModifier = (orderModifiersSets === null || orderModifiersSets === void 0 ? void 0 : (_orderModifiersSets_find = orderModifiersSets.find(function(modifier) {
92
91
  return (modifier === null || modifier === void 0 ? void 0 : modifier.modifierId) === (selectedModifier === null || selectedModifier === void 0 ? void 0 : selectedModifier.id);
93
92
  })) === null || _orderModifiersSets_find === void 0 ? void 0 : _orderModifiersSets_find.quantity) === 1;
94
- console.log(orderModifiersSets, 'orderModifiersSets -1');
95
93
  if (selectedModifier && type === 'radio') {
96
94
  modifiers.forEach(function(modifier) {
97
95
  var isSelected = modifier.id === selectedModifier.id;
@@ -103,7 +101,6 @@ var ModifiersSetControl = function(param) {
103
101
  quantity: isSelected ? 1 : 0,
104
102
  modifierSetId: modifierSet.id
105
103
  };
106
- console.log(orderModifiers, 'orderModifiers');
107
104
  setValue("".concat(productId, ".orderProductModifiers.").concat(modifierSet.id, ".").concat(orderModifiers.modifierId), orderModifiers);
108
105
  });
109
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ProductControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAA;AAK7E,UAAU,mBAAmB;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;CAC3C;AAED,eAAO,MAAM,cAAc,+CAIxB,mBAAmB,4CA6ErB,CAAA"}
1
+ {"version":3,"file":"ProductControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAA;AAK7E,UAAU,mBAAmB;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;CAC3C;AAED,eAAO,MAAM,cAAc,+CAIxB,mBAAmB,4CA+ErB,CAAA"}
@@ -11,7 +11,7 @@ var ProductControl = function(param) {
11
11
  .t;
12
12
  var _useFormContext = useFormContext(), control = _useFormContext.control, watch = _useFormContext.watch, isValid = _useFormContext.formState.isValid, clearErrors = _useFormContext.clearErrors;
13
13
  var modifiersSet = (product === null || product === void 0 ? void 0 : product.modifiersSet) || [];
14
- var orderModifiersSets = watch("".concat(product.id, ".orderProductModifier"));
14
+ var orderModifiersSets = watch("".concat(product.id, ".orderProductModifiers"));
15
15
  useEffect(function() {
16
16
  if (!isValid) return;
17
17
  clearErrors();
@@ -24,7 +24,7 @@ var ProductWithModifier = function(param) {
24
24
  className: "d-flex",
25
25
  children: [
26
26
  /*#__PURE__*/ jsx("p", {
27
- className: "font-weight-bold w-25 pr-4",
27
+ className: "font-weight-bold min-vw-20 pr-4",
28
28
  children: "".concat(orderModifierDescription, " x")
29
29
  }),
30
30
  /*#__PURE__*/ jsx("p", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.71.18-dev.7",
3
+ "version": "0.71.18-dev.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -36,8 +36,6 @@ export const ModifiersSetControl = ({
36
36
 
37
37
  const orderModifiersSets = watch(`${productId}.orderProductModifiers`)
38
38
 
39
- console.log(orderModifiersSets, 'orderModifiersSets')
40
-
41
39
  const { formatNumber } = useIntl()
42
40
  const formatToCurrency = (value: number) =>
43
41
  formatNumber(value, { style: 'currency', currency: Currency.GBP })
@@ -64,7 +62,7 @@ export const ModifiersSetControl = ({
64
62
  orderModifiersSets?.find(
65
63
  (modifier) => modifier?.modifierId === selectedModifier?.id,
66
64
  )?.quantity === 1
67
- console.log(orderModifiersSets, 'orderModifiersSets -1')
65
+
68
66
  if (selectedModifier && type === 'radio') {
69
67
  modifiers.forEach((modifier) => {
70
68
  const isSelected = modifier.id === selectedModifier.id
@@ -77,8 +75,6 @@ export const ModifiersSetControl = ({
77
75
  modifierSetId: modifierSet.id,
78
76
  }
79
77
 
80
- console.log(orderModifiers, 'orderModifiers')
81
-
82
78
  setValue(
83
79
  `${productId}.orderProductModifiers.${modifierSet.id}.${orderModifiers.modifierId}`,
84
80
  orderModifiers,
@@ -133,8 +129,6 @@ export const ModifiersSetControl = ({
133
129
  modifierSet.modifiers.some((rl) => rl.id === modifier.modifierId)
134
130
  )?.modifierId.toString();
135
131
 
136
-
137
-
138
132
  return (
139
133
  <>
140
134
  {modifierSet?.maxItems === 1 &&
@@ -154,6 +148,7 @@ export const ModifiersSetControl = ({
154
148
  onChangeModifiers(e, 'radio')
155
149
  field.onChange(e.target.id)
156
150
  }
151
+
157
152
  return (
158
153
  <>
159
154
  {modifiers.map((modifier) => {
@@ -25,7 +25,7 @@ export const ProductControl = ({
25
25
  clearErrors,
26
26
  } = useFormContext()
27
27
  const modifiersSet = product?.modifiersSet || []
28
- const orderModifiersSets = watch(`${product.id}.orderProductModifier`)
28
+ const orderModifiersSets = watch(`${product.id}.orderProductModifiers`)
29
29
 
30
30
  useEffect(() => {
31
31
  if (!isValid) return
@@ -69,23 +69,25 @@ export const ProductControl = ({
69
69
  return true
70
70
  },
71
71
  }}
72
- render={({ fieldState: { error } }) => (
73
- <>
74
- <ModifiersSetControl
75
- modifierSet={modifierSet}
76
- productId={product.id}
77
- modifiers={modifierSet.modifiers}
78
- isEditMode={!!editOrderModifier?.modifiers}
79
- orderProductModifierSets={editOrderModifier?.modifiers}
80
- isLoading={isLoading}
81
- />
82
- {error?.message && (
83
- <div className='invalid-feedback d-flex pl-4'>
84
- {error?.message}!
85
- </div>
86
- )}
87
- </>
88
- )}
72
+ render={({ fieldState: { error } }) => {
73
+ return(
74
+ <>
75
+ <ModifiersSetControl
76
+ modifierSet={modifierSet}
77
+ productId={product.id}
78
+ modifiers={modifierSet.modifiers}
79
+ isEditMode={!!editOrderModifier?.modifiers}
80
+ orderProductModifierSets={editOrderModifier?.modifiers}
81
+ isLoading={isLoading}
82
+ />
83
+ {error?.message && (
84
+ <div className='invalid-feedback d-flex pl-4'>
85
+ {error?.message}!
86
+ </div>
87
+ )}
88
+ </>,
89
+ )
90
+ }}
89
91
  />
90
92
  </div>
91
93
  )
@@ -57,7 +57,7 @@ export const ProductWithModifier = ({
57
57
  className='d-flex p-2 justify-content-between align-items-center'
58
58
  >
59
59
  <div className='d-flex'>
60
- <p className='font-weight-bold w-25 pr-4'>{`${orderModifierDescription} x`}</p>
60
+ <p className='font-weight-bold min-vw-20 pr-4'>{`${orderModifierDescription} x`}</p>
61
61
  <p>{modifierName ? ` ${modifierName}` : t('withoutModifier')}</p>
62
62
  </div>
63
63
  {isManualBooking || isSummary ? (
package/yarn.lock CHANGED
@@ -8818,9 +8818,9 @@ __metadata:
8818
8818
  linkType: hard
8819
8819
 
8820
8820
  "country-flag-icons@npm:^1.0.2":
8821
- version: 1.5.14
8822
- resolution: "country-flag-icons@npm:1.5.14"
8823
- checksum: 10c0/95c3f22521e4602ba1ce17dbc652d6936c55e71e0070fdcd6cf64a13224c0d1002112562b7be11a7bb6b291e45d7311301de0502115d409b918bd5c4a15fc8b8
8821
+ version: 1.5.16
8822
+ resolution: "country-flag-icons@npm:1.5.16"
8823
+ checksum: 10c0/98ae352dbe5ed143b15d422816e5435de1329013de58aae028753a35d4a00c0e8b413626f05377e26ee96b588cca6b21f15d46b99cff0fe583db5a19e7d1da8b
8824
8824
  languageName: node
8825
8825
  linkType: hard
8826
8826
 
@@ -17035,15 +17035,15 @@ __metadata:
17035
17035
  linkType: hard
17036
17036
 
17037
17037
  "prosemirror-tables@npm:^1.3.0":
17038
- version: 1.6.3
17039
- resolution: "prosemirror-tables@npm:1.6.3"
17038
+ version: 1.6.4
17039
+ resolution: "prosemirror-tables@npm:1.6.4"
17040
17040
  dependencies:
17041
17041
  prosemirror-keymap: "npm:^1.2.2"
17042
17042
  prosemirror-model: "npm:^1.24.1"
17043
17043
  prosemirror-state: "npm:^1.4.3"
17044
17044
  prosemirror-transform: "npm:^1.10.2"
17045
- prosemirror-view: "npm:^1.37.1"
17046
- checksum: 10c0/09ded9ffae5c2a9e274cf89c2ff1ba6400bd3d0ad9e68a0de9a4154c9b9210239c90db50e3081487615899eae3b2c7228e097df73acd42150d9cc91076da239b
17045
+ prosemirror-view: "npm:^1.37.2"
17046
+ checksum: 10c0/a19e6c30467885147ac2bdac20701ed82ccd980d56f28ba329132667759b9ab2e7f8d1e96342b099503ab21f949783e29a45cf9c98a97d4d1afdf5ba1f831eb2
17047
17047
  languageName: node
17048
17048
  linkType: hard
17049
17049
 
@@ -17070,7 +17070,7 @@ __metadata:
17070
17070
  languageName: node
17071
17071
  linkType: hard
17072
17072
 
17073
- "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.1":
17073
+ "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":
17074
17074
  version: 1.37.2
17075
17075
  resolution: "prosemirror-view@npm:1.37.2"
17076
17076
  dependencies:
@@ -20297,9 +20297,9 @@ __metadata:
20297
20297
  linkType: hard
20298
20298
 
20299
20299
  "stylis@npm:^4.3.0":
20300
- version: 4.3.5
20301
- resolution: "stylis@npm:4.3.5"
20302
- checksum: 10c0/da2976e05a9bacd87450b59d64c17669e4a1043c01a91213420d88baeb4f3bcc58409335e5bbce316e3ba570e15d63e1393ec56cf1e60507782897ab3bb04872
20300
+ version: 4.3.6
20301
+ resolution: "stylis@npm:4.3.6"
20302
+ checksum: 10c0/e736d484983a34f7c65d362c67dc79b7bce388054b261c2b7b23d02eaaf280617033f65d44b1ea341854f4331a5074b885668ac8741f98c13a6cfd6443ae85d0
20303
20303
  languageName: node
20304
20304
  linkType: hard
20305
20305
 
@@ -20813,8 +20813,8 @@ __metadata:
20813
20813
  linkType: hard
20814
20814
 
20815
20815
  "tsconfck@npm:^3.0.3":
20816
- version: 3.1.4
20817
- resolution: "tsconfck@npm:3.1.4"
20816
+ version: 3.1.5
20817
+ resolution: "tsconfck@npm:3.1.5"
20818
20818
  peerDependencies:
20819
20819
  typescript: ^5.0.0
20820
20820
  peerDependenciesMeta:
@@ -20822,7 +20822,7 @@ __metadata:
20822
20822
  optional: true
20823
20823
  bin:
20824
20824
  tsconfck: bin/tsconfck.js
20825
- checksum: 10c0/5120e91b3388574b449d57d08f45d05d9966cf4b9d6aa1018652c1fff6d7d37b1ed099b07e6ebf6099aa40b8a16968dd337198c55b7274892849112b942861ed
20825
+ checksum: 10c0/9b62cd85d5702aa23ea50ea578d7124f3d59cc4518fcc7eacc04f4f9c9c481f720738ff8351bd4472247c0723a17dfd01af95a5b60ad623cdb8727fbe4881847
20826
20826
  languageName: node
20827
20827
  linkType: hard
20828
20828