@licklist/design 0.71.18-dev.5 → 0.71.18-dev.6
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.
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +10 -3
- package/dist/styles/product-set/EditProductSetElement.scss +1 -0
- package/dist/styles/product-set/ProductSetForm.scss +1 -0
- package/package.json +3 -3
- package/src/product-set/form/ProductsControl.tsx +13 -4
- package/src/styles/product-set/EditProductSetElement.scss +1 -0
- package/src/styles/product-set/ProductSetForm.scss +1 -0
- package/yarn.lock +48 -20
|
@@ -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,CAAA;AAC/F,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQhD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA+BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAA;AAC/F,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQhD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA+BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,2CAkPtB"}
|
|
@@ -168,6 +168,12 @@ function ProductsControl(param) {
|
|
|
168
168
|
return "".concat(productControlFieldName, ".").concat(index, ".isUnlimited");
|
|
169
169
|
}))
|
|
170
170
|
});
|
|
171
|
+
var modifierSets = useWatch({
|
|
172
|
+
control: control,
|
|
173
|
+
name: _to_consumable_array(fields.map(function(_, index) {
|
|
174
|
+
return "".concat(productControlFieldName, ".").concat(index, ".modifiersSet");
|
|
175
|
+
}))
|
|
176
|
+
});
|
|
171
177
|
var categoryProductErrors = errors === null || errors === void 0 ? void 0 : (_errors_steps = errors.steps) === null || _errors_steps === void 0 ? void 0 : (_errors_steps_stepIndex = _errors_steps[stepIndex]) === null || _errors_steps_stepIndex === void 0 ? void 0 : (_errors_steps_stepIndex_productCategories = _errors_steps_stepIndex.productCategories) === null || _errors_steps_stepIndex_productCategories === void 0 ? void 0 : (_errors_steps_stepIndex_productCategories_productCategoryIndex = _errors_steps_stepIndex_productCategories[productCategoryIndex]) === null || _errors_steps_stepIndex_productCategories_productCategoryIndex === void 0 ? void 0 : _errors_steps_stepIndex_productCategories_productCategoryIndex.products;
|
|
172
178
|
var isFirstProductAdded = fields.length === 1;
|
|
173
179
|
var mouseSensor = useSensor(MouseSensor, {
|
|
@@ -211,9 +217,10 @@ function ProductsControl(param) {
|
|
|
211
217
|
mouseSensor
|
|
212
218
|
],
|
|
213
219
|
children: fields.map(function(product, index) {
|
|
220
|
+
var _modifierSets_index;
|
|
214
221
|
var isOverridesProductSet = isEventEditProductSet ? !!product.id : isOverrides && !!product.originalProductId;
|
|
215
|
-
var modifierSets = (product === null || product === void 0 ? void 0 : product.modifiersSet.length) || 0;
|
|
216
222
|
var isNewProductOverrides = isCreateNewOverrides && !!product.id;
|
|
223
|
+
var modifiersSets = ((_modifierSets_index = modifierSets[index]) === null || _modifierSets_index === void 0 ? void 0 : _modifierSets_index.length) || 0;
|
|
217
224
|
return /*#__PURE__*/ jsx(Controller, {
|
|
218
225
|
control: control,
|
|
219
226
|
name: "".concat(productControlFieldName, ".").concat(index, ".name"),
|
|
@@ -256,9 +263,9 @@ function ProductsControl(param) {
|
|
|
256
263
|
})
|
|
257
264
|
]
|
|
258
265
|
}),
|
|
259
|
-
!!
|
|
266
|
+
!!modifiersSets && /*#__PURE__*/ jsx(Badge, {
|
|
260
267
|
className: "modifier-badge",
|
|
261
|
-
children: "".concat(
|
|
268
|
+
children: "".concat(modifiersSets, " ").concat(t('modifiersSets'))
|
|
262
269
|
})
|
|
263
270
|
]
|
|
264
271
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.71.18-dev.
|
|
3
|
+
"version": "0.71.18-dev.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.31.2-dev.
|
|
45
|
+
"@licklist/core": "0.31.2-dev.11",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
47
|
"@licklist/plugins": "0.35.1-dev.8",
|
|
48
48
|
"lodash": "4.17.21",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@licklist/core": "0.31.2-dev.
|
|
64
|
+
"@licklist/core": "0.31.2-dev.11",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
66
|
"@licklist/plugins": "0.35.1-dev.8",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
@@ -141,6 +141,16 @@ export function ProductsControl({
|
|
|
141
141
|
],
|
|
142
142
|
})
|
|
143
143
|
|
|
144
|
+
const modifierSets = useWatch({
|
|
145
|
+
control,
|
|
146
|
+
name: [
|
|
147
|
+
...fields.map(
|
|
148
|
+
(_, index) =>
|
|
149
|
+
`${productControlFieldName}.${index}.modifiersSet` as const,
|
|
150
|
+
),
|
|
151
|
+
],
|
|
152
|
+
})
|
|
153
|
+
|
|
144
154
|
const categoryProductErrors =
|
|
145
155
|
errors?.steps?.[stepIndex]?.productCategories?.[productCategoryIndex]
|
|
146
156
|
?.products
|
|
@@ -200,9 +210,8 @@ export function ProductsControl({
|
|
|
200
210
|
? !!product.id
|
|
201
211
|
: isOverrides && !!product.originalProductId
|
|
202
212
|
|
|
203
|
-
const modifierSets = product?.modifiersSet.length || 0
|
|
204
|
-
|
|
205
213
|
const isNewProductOverrides = isCreateNewOverrides && !!product.id
|
|
214
|
+
const modifiersSets = modifierSets[index]?.length || 0
|
|
206
215
|
|
|
207
216
|
return (
|
|
208
217
|
<Controller
|
|
@@ -247,8 +256,8 @@ export function ProductsControl({
|
|
|
247
256
|
} `}
|
|
248
257
|
</span>
|
|
249
258
|
</div>
|
|
250
|
-
{!!
|
|
251
|
-
<Badge className='modifier-badge'>{`${
|
|
259
|
+
{!!modifiersSets && (
|
|
260
|
+
<Badge className='modifier-badge'>{`${modifiersSets} ${t('modifiersSets')}`}</Badge>
|
|
252
261
|
)}
|
|
253
262
|
</div>
|
|
254
263
|
}
|
package/yarn.lock
CHANGED
|
@@ -2481,6 +2481,34 @@ __metadata:
|
|
|
2481
2481
|
languageName: node
|
|
2482
2482
|
linkType: hard
|
|
2483
2483
|
|
|
2484
|
+
"@licklist/core@npm:0.31.2-dev.11":
|
|
2485
|
+
version: 0.31.2-dev.11
|
|
2486
|
+
resolution: "@licklist/core@npm:0.31.2-dev.11"
|
|
2487
|
+
dependencies:
|
|
2488
|
+
"@sentry/browser": "npm:6.2.0"
|
|
2489
|
+
axios: "npm:0.26.0"
|
|
2490
|
+
i18next: "npm:19.4.5"
|
|
2491
|
+
luxon: "npm:3.5.0"
|
|
2492
|
+
react: "npm:17.0.2"
|
|
2493
|
+
react-dom: "npm:17.0.2"
|
|
2494
|
+
react-i18next: "npm:11.8.8"
|
|
2495
|
+
react-intl: "npm:6.6.8"
|
|
2496
|
+
uuid: "npm:9.0.0"
|
|
2497
|
+
wait-for-expect: "npm:3.0.2"
|
|
2498
|
+
zustand: "npm:3.7.2"
|
|
2499
|
+
peerDependencies:
|
|
2500
|
+
"@licklist/eslint-config": 0.5.6
|
|
2501
|
+
axios: 0.26.0
|
|
2502
|
+
luxon: 3.5.0
|
|
2503
|
+
react: 17.0.2
|
|
2504
|
+
react-dom: 17.0.2
|
|
2505
|
+
react-i18next: 11.8.8
|
|
2506
|
+
react-intl: 6.6.8
|
|
2507
|
+
zustand: 3.7.2
|
|
2508
|
+
checksum: 10c0/eabcc95fb4a12a60c00c5b15060a89495f7c6980a53d27fc3dc7325eccb4a5d604e49aa148b68ae0bcb98f5e78f0dc2695833342756a3d5d9d2640bbd93dfaaf
|
|
2509
|
+
languageName: node
|
|
2510
|
+
linkType: hard
|
|
2511
|
+
|
|
2484
2512
|
"@licklist/design@workspace:.":
|
|
2485
2513
|
version: 0.0.0-use.local
|
|
2486
2514
|
resolution: "@licklist/design@workspace:."
|
|
@@ -2492,7 +2520,7 @@ __metadata:
|
|
|
2492
2520
|
"@dnd-kit/utilities": "npm:2.0.0"
|
|
2493
2521
|
"@fortawesome/fontawesome-svg-core": "npm:1.2.34"
|
|
2494
2522
|
"@fortawesome/free-solid-svg-icons": "npm:5.15.2"
|
|
2495
|
-
"@licklist/core": "npm:0.31.2-dev.
|
|
2523
|
+
"@licklist/core": "npm:0.31.2-dev.11"
|
|
2496
2524
|
"@licklist/eslint-config": "npm:0.5.6"
|
|
2497
2525
|
"@licklist/plugins": "npm:0.35.1-dev.8"
|
|
2498
2526
|
"@mantine/core": "npm:6.0.22"
|
|
@@ -2623,7 +2651,7 @@ __metadata:
|
|
|
2623
2651
|
vite-plugin-svgr: "npm:4.2.0"
|
|
2624
2652
|
vite-tsconfig-paths: "npm:5.0.1"
|
|
2625
2653
|
peerDependencies:
|
|
2626
|
-
"@licklist/core": 0.31.2-dev.
|
|
2654
|
+
"@licklist/core": 0.31.2-dev.11
|
|
2627
2655
|
"@licklist/eslint-config": 0.5.6
|
|
2628
2656
|
"@licklist/plugins": 0.35.1-dev.8
|
|
2629
2657
|
lodash: 4.17.21
|
|
@@ -5147,14 +5175,14 @@ __metadata:
|
|
|
5147
5175
|
linkType: hard
|
|
5148
5176
|
|
|
5149
5177
|
"@tiptap/extension-bubble-menu@npm:^2.0.0-beta.56":
|
|
5150
|
-
version: 2.11.
|
|
5151
|
-
resolution: "@tiptap/extension-bubble-menu@npm:2.11.
|
|
5178
|
+
version: 2.11.5
|
|
5179
|
+
resolution: "@tiptap/extension-bubble-menu@npm:2.11.5"
|
|
5152
5180
|
dependencies:
|
|
5153
5181
|
tippy.js: "npm:^6.3.7"
|
|
5154
5182
|
peerDependencies:
|
|
5155
5183
|
"@tiptap/core": ^2.7.0
|
|
5156
5184
|
"@tiptap/pm": ^2.7.0
|
|
5157
|
-
checksum: 10c0/
|
|
5185
|
+
checksum: 10c0/a9112df35a19c875085c4065cee36228aec68c2336ddcff25a4e741e25625397325762abce045ede53c18b58df9235216ef909a099f9ac8f5783d137615e3252
|
|
5158
5186
|
languageName: node
|
|
5159
5187
|
linkType: hard
|
|
5160
5188
|
|
|
@@ -5177,14 +5205,14 @@ __metadata:
|
|
|
5177
5205
|
linkType: hard
|
|
5178
5206
|
|
|
5179
5207
|
"@tiptap/extension-floating-menu@npm:^2.0.0-beta.51":
|
|
5180
|
-
version: 2.11.
|
|
5181
|
-
resolution: "@tiptap/extension-floating-menu@npm:2.11.
|
|
5208
|
+
version: 2.11.5
|
|
5209
|
+
resolution: "@tiptap/extension-floating-menu@npm:2.11.5"
|
|
5182
5210
|
dependencies:
|
|
5183
5211
|
tippy.js: "npm:^6.3.7"
|
|
5184
5212
|
peerDependencies:
|
|
5185
5213
|
"@tiptap/core": ^2.7.0
|
|
5186
5214
|
"@tiptap/pm": ^2.7.0
|
|
5187
|
-
checksum: 10c0/
|
|
5215
|
+
checksum: 10c0/45013b8e7ea13950a76bf62498d48b0d681aeaa88e49b3027f45ec42a42b5006e9f8af25251712cb6ed73a732989e2f95d293b905ba83aa82e2c17aabcfed0b0
|
|
5188
5216
|
languageName: node
|
|
5189
5217
|
linkType: hard
|
|
5190
5218
|
|
|
@@ -8217,8 +8245,8 @@ __metadata:
|
|
|
8217
8245
|
linkType: hard
|
|
8218
8246
|
|
|
8219
8247
|
"chromatic@npm:^11.4.0":
|
|
8220
|
-
version: 11.25.
|
|
8221
|
-
resolution: "chromatic@npm:11.25.
|
|
8248
|
+
version: 11.25.2
|
|
8249
|
+
resolution: "chromatic@npm:11.25.2"
|
|
8222
8250
|
peerDependencies:
|
|
8223
8251
|
"@chromatic-com/cypress": ^0.*.* || ^1.0.0
|
|
8224
8252
|
"@chromatic-com/playwright": ^0.*.* || ^1.0.0
|
|
@@ -8231,7 +8259,7 @@ __metadata:
|
|
|
8231
8259
|
chroma: dist/bin.js
|
|
8232
8260
|
chromatic: dist/bin.js
|
|
8233
8261
|
chromatic-cli: dist/bin.js
|
|
8234
|
-
checksum: 10c0/
|
|
8262
|
+
checksum: 10c0/2cb4bb40a062005292a4cd606321f6c9bdaa31e255e66bae12c780bca9b72e883c017ebe48c5a9228db88a010f5977571ef7dfdcdd4195ad0e7b955f9966d7df
|
|
8235
8263
|
languageName: node
|
|
8236
8264
|
linkType: hard
|
|
8237
8265
|
|
|
@@ -10975,11 +11003,11 @@ __metadata:
|
|
|
10975
11003
|
linkType: hard
|
|
10976
11004
|
|
|
10977
11005
|
"fastq@npm:^1.6.0":
|
|
10978
|
-
version: 1.
|
|
10979
|
-
resolution: "fastq@npm:1.
|
|
11006
|
+
version: 1.19.0
|
|
11007
|
+
resolution: "fastq@npm:1.19.0"
|
|
10980
11008
|
dependencies:
|
|
10981
11009
|
reusify: "npm:^1.0.4"
|
|
10982
|
-
checksum: 10c0/
|
|
11010
|
+
checksum: 10c0/d6a001638f1574a696660fcbba5300d017760432372c801632c325ca7c16819604841c92fd3ccadcdacec0966ca336363a5ff57bc5f0be335d8ea7ac6087b98f
|
|
10983
11011
|
languageName: node
|
|
10984
11012
|
linkType: hard
|
|
10985
11013
|
|
|
@@ -13775,9 +13803,9 @@ __metadata:
|
|
|
13775
13803
|
linkType: hard
|
|
13776
13804
|
|
|
13777
13805
|
"libphonenumber-js@npm:^1.9.11":
|
|
13778
|
-
version: 1.11.
|
|
13779
|
-
resolution: "libphonenumber-js@npm:1.11.
|
|
13780
|
-
checksum: 10c0/
|
|
13806
|
+
version: 1.11.19
|
|
13807
|
+
resolution: "libphonenumber-js@npm:1.11.19"
|
|
13808
|
+
checksum: 10c0/cf02204746dd89cacbd5830c32e6ea4a7e4593efa84b0707207900d79bb0bbd19bd38eb6da7544f49638d609b8c4b9dcbd7e50ea6506e957cd149f6a3c2c7b2b
|
|
13781
13809
|
languageName: node
|
|
13782
13810
|
linkType: hard
|
|
13783
13811
|
|
|
@@ -17007,15 +17035,15 @@ __metadata:
|
|
|
17007
17035
|
linkType: hard
|
|
17008
17036
|
|
|
17009
17037
|
"prosemirror-tables@npm:^1.3.0":
|
|
17010
|
-
version: 1.6.
|
|
17011
|
-
resolution: "prosemirror-tables@npm:1.6.
|
|
17038
|
+
version: 1.6.3
|
|
17039
|
+
resolution: "prosemirror-tables@npm:1.6.3"
|
|
17012
17040
|
dependencies:
|
|
17013
17041
|
prosemirror-keymap: "npm:^1.2.2"
|
|
17014
17042
|
prosemirror-model: "npm:^1.24.1"
|
|
17015
17043
|
prosemirror-state: "npm:^1.4.3"
|
|
17016
17044
|
prosemirror-transform: "npm:^1.10.2"
|
|
17017
17045
|
prosemirror-view: "npm:^1.37.1"
|
|
17018
|
-
checksum: 10c0/
|
|
17046
|
+
checksum: 10c0/09ded9ffae5c2a9e274cf89c2ff1ba6400bd3d0ad9e68a0de9a4154c9b9210239c90db50e3081487615899eae3b2c7228e097df73acd42150d9cc91076da239b
|
|
17019
17047
|
languageName: node
|
|
17020
17048
|
linkType: hard
|
|
17021
17049
|
|