@crystaldesign/diva-seller 24.12.0-beta.27 → 24.12.0-beta.28
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/build/esm/index.js
CHANGED
|
@@ -6410,8 +6410,6 @@ function useRenderjobDetail (_ref) {
|
|
|
6410
6410
|
var _useDivaCore = useDivaCore(),
|
|
6411
6411
|
organization = _useDivaCore.state.organization,
|
|
6412
6412
|
openModal = _useDivaCore.actions.openModal;
|
|
6413
|
-
var _useSellerState = useSellerState(),
|
|
6414
|
-
currentBasketState = _useSellerState.state.currentBasketState;
|
|
6415
6413
|
var _useTranslation = useTranslation$1(),
|
|
6416
6414
|
t = _useTranslation.t;
|
|
6417
6415
|
var packages = useMemo(function () {
|
|
@@ -6492,32 +6490,14 @@ function useRenderjobDetail (_ref) {
|
|
|
6492
6490
|
setPackageContent([_objectSpread$v({}, packages[index].settings)]);
|
|
6493
6491
|
}, []);
|
|
6494
6492
|
var getDiva3DProject = function getDiva3DProject(product) {
|
|
6495
|
-
var
|
|
6496
|
-
|
|
6497
|
-
var _currentBasketState$b;
|
|
6498
|
-
d3dps = currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b = currentBasketState.basket) === null || _currentBasketState$b === void 0 || (_currentBasketState$b = _currentBasketState$b.OrderSets[0]) === null || _currentBasketState$b === void 0 || (_currentBasketState$b = _currentBasketState$b.ConfigVariants) === null || _currentBasketState$b === void 0 || (_currentBasketState$b = _currentBasketState$b.find(function (variant) {
|
|
6499
|
-
return variant.VariantID === product.variantId;
|
|
6500
|
-
})) === null || _currentBasketState$b === void 0 ? void 0 : _currentBasketState$b.Diva3DProject;
|
|
6501
|
-
}
|
|
6502
|
-
if (!d3dps) {
|
|
6503
|
-
var _currentBasketState$b2;
|
|
6504
|
-
d3dps = currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b2 = currentBasketState.basket) === null || _currentBasketState$b2 === void 0 ? void 0 : _currentBasketState$b2.Diva3DProject;
|
|
6505
|
-
}
|
|
6493
|
+
var _product$configuratio;
|
|
6494
|
+
var d3dps = (_product$configuratio = product.configuration) === null || _product$configuratio === void 0 || (_product$configuratio = _product$configuratio.OrderSets[0]) === null || _product$configuratio === void 0 ? void 0 : _product$configuratio.Diva3DProject;
|
|
6506
6495
|
if (!d3dps) throw new Error('cant order renderjob without diva3dproject');
|
|
6507
6496
|
return atob(d3dps);
|
|
6508
6497
|
};
|
|
6509
6498
|
var getHqRenderScript = function getHqRenderScript(product) {
|
|
6510
|
-
var
|
|
6511
|
-
|
|
6512
|
-
var _currentBasketState$b3;
|
|
6513
|
-
hqRenderScript = currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b3 = currentBasketState.basket) === null || _currentBasketState$b3 === void 0 || (_currentBasketState$b3 = _currentBasketState$b3.OrderSets[0]) === null || _currentBasketState$b3 === void 0 || (_currentBasketState$b3 = _currentBasketState$b3.ConfigVariants) === null || _currentBasketState$b3 === void 0 || (_currentBasketState$b3 = _currentBasketState$b3.find(function (variant) {
|
|
6514
|
-
return variant.VariantID === product.variantId;
|
|
6515
|
-
})) === null || _currentBasketState$b3 === void 0 ? void 0 : _currentBasketState$b3.HQRenderScript;
|
|
6516
|
-
}
|
|
6517
|
-
if (!hqRenderScript) {
|
|
6518
|
-
var _currentBasketState$b4;
|
|
6519
|
-
hqRenderScript = currentBasketState === null || currentBasketState === void 0 || (_currentBasketState$b4 = currentBasketState.basket) === null || _currentBasketState$b4 === void 0 ? void 0 : _currentBasketState$b4.HQRenderScript;
|
|
6520
|
-
}
|
|
6499
|
+
var _product$configuratio2;
|
|
6500
|
+
var hqRenderScript = (_product$configuratio2 = product.configuration) === null || _product$configuratio2 === void 0 || (_product$configuratio2 = _product$configuratio2.OrderSets[0]) === null || _product$configuratio2 === void 0 ? void 0 : _product$configuratio2.HQRenderScript;
|
|
6521
6501
|
if (!hqRenderScript) throw new Error('cant order renderjob without hqrenderscript');
|
|
6522
6502
|
return hqRenderScript;
|
|
6523
6503
|
};
|
|
@@ -6558,9 +6538,8 @@ function useRenderjobDetail (_ref) {
|
|
|
6558
6538
|
}
|
|
6559
6539
|
var createJobs = function createJobs(state) {
|
|
6560
6540
|
if (renderJobs.length) {
|
|
6561
|
-
var
|
|
6541
|
+
var _firstJob$diva3DProje;
|
|
6562
6542
|
if (renderJobs.length > 1) throw new Error('Only one job can be edited at a time');
|
|
6563
|
-
if (!(currentBasketState !== null && currentBasketState !== void 0 && (_currentBasketState$b5 = currentBasketState.basket) !== null && _currentBasketState$b5 !== void 0 && _currentBasketState$b5.Diva3DProject)) throw new Error('cant order renderjob without diva3dproject');
|
|
6564
6543
|
var firstJob = renderJobs[0];
|
|
6565
6544
|
var product = selectedVariants.find(function (product) {
|
|
6566
6545
|
return product._id === firstJob.product;
|
|
@@ -6609,17 +6588,11 @@ function useRenderjobDetail (_ref) {
|
|
|
6609
6588
|
};
|
|
6610
6589
|
var onOrderRenderPackage = /*#__PURE__*/function () {
|
|
6611
6590
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(renderPackage, state) {
|
|
6612
|
-
var
|
|
6591
|
+
var _renderPackage$preset, nrOfAmbRenderingsNeeded, nrAmbrenderingsSelected, promises;
|
|
6613
6592
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
6614
6593
|
while (1) switch (_context.prev = _context.next) {
|
|
6615
6594
|
case 0:
|
|
6616
6595
|
_context.prev = 0;
|
|
6617
|
-
if (currentBasketState !== null && currentBasketState !== void 0 && (_currentBasketState$b6 = currentBasketState.basket) !== null && _currentBasketState$b6 !== void 0 && _currentBasketState$b6.Diva3DProject) {
|
|
6618
|
-
_context.next = 3;
|
|
6619
|
-
break;
|
|
6620
|
-
}
|
|
6621
|
-
throw new Error('cant order renderjob without diva3dproject');
|
|
6622
|
-
case 3:
|
|
6623
6596
|
nrOfAmbRenderingsNeeded = (_renderPackage$preset = renderPackage.presets) === null || _renderPackage$preset === void 0 ? void 0 : _renderPackage$preset.filter(function (p) {
|
|
6624
6597
|
return p.job === 'AMBIENTE';
|
|
6625
6598
|
}).length;
|
|
@@ -6627,7 +6600,7 @@ function useRenderjobDetail (_ref) {
|
|
|
6627
6600
|
return p.renderScene;
|
|
6628
6601
|
}).length;
|
|
6629
6602
|
if (!(nrOfAmbRenderingsNeeded !== nrAmbrenderingsSelected)) {
|
|
6630
|
-
_context.next =
|
|
6603
|
+
_context.next = 6;
|
|
6631
6604
|
break;
|
|
6632
6605
|
}
|
|
6633
6606
|
openModal({
|
|
@@ -6636,7 +6609,7 @@ function useRenderjobDetail (_ref) {
|
|
|
6636
6609
|
text: t('backoffice.table.renderpackages.order.errornrofamb')
|
|
6637
6610
|
});
|
|
6638
6611
|
throw new Error('Please select all ambiente renderings');
|
|
6639
|
-
case
|
|
6612
|
+
case 6:
|
|
6640
6613
|
promises = selectedVariants.map(function (product) {
|
|
6641
6614
|
var d3dps = getDiva3DProject(product);
|
|
6642
6615
|
var productParams = {
|
|
@@ -6654,20 +6627,20 @@ function useRenderjobDetail (_ref) {
|
|
|
6654
6627
|
};
|
|
6655
6628
|
return onSaveRenderPackage(renderPackage, productParams);
|
|
6656
6629
|
});
|
|
6657
|
-
_context.next =
|
|
6630
|
+
_context.next = 9;
|
|
6658
6631
|
return Promise.all(promises);
|
|
6659
|
-
case
|
|
6660
|
-
_context.next =
|
|
6632
|
+
case 9:
|
|
6633
|
+
_context.next = 14;
|
|
6661
6634
|
break;
|
|
6662
|
-
case
|
|
6663
|
-
_context.prev =
|
|
6635
|
+
case 11:
|
|
6636
|
+
_context.prev = 11;
|
|
6664
6637
|
_context.t0 = _context["catch"](0);
|
|
6665
6638
|
console.error(_context.t0);
|
|
6666
|
-
case
|
|
6639
|
+
case 14:
|
|
6667
6640
|
case "end":
|
|
6668
6641
|
return _context.stop();
|
|
6669
6642
|
}
|
|
6670
|
-
}, _callee, null, [[0,
|
|
6643
|
+
}, _callee, null, [[0, 11]]);
|
|
6671
6644
|
}));
|
|
6672
6645
|
return function onOrderRenderPackage(_x, _x2) {
|
|
6673
6646
|
return _ref2.apply(this, arguments);
|
package/build/types/seller/src/components/HQMedia/RenderJobDetail/useRenderjobDetail.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRenderjobDetail.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/HQMedia/RenderJobDetail/useRenderjobDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AASpE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,WAAW,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,IAAI,CAAC;IAC3D,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,WAAW,EAAE,CAAC;IAChC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACpC,mBAAmB,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,KAAK,IAAI,CAAC;CACjF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,EAAE,wBAAwB;;;
|
|
1
|
+
{"version":3,"file":"useRenderjobDetail.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/HQMedia/RenderJobDetail/useRenderjobDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA0B,CAAC;AASpE,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,WAAW,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,IAAI,CAAC;IAC3D,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,WAAW,EAAE,CAAC;IAChC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACpC,mBAAmB,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,KAAK,IAAI,CAAC;CACjF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,EAAE,wBAAwB;;;yBAgFlE,MAAM;;;;;;;iCAuFd,SAAS;0CAKM,aAAa,SAAS,MAAM;EA6ChF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-seller",
|
|
3
|
-
"version": "24.12.0-beta.
|
|
3
|
+
"version": "24.12.0-beta.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"react-dom": "^18.3.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@crystaldesign/analytics": "24.12.0-beta.
|
|
33
|
-
"@crystaldesign/products-component": "24.12.0-beta.
|
|
34
|
-
"@crystaldesign/real-time-viewer": "24.12.0-beta.
|
|
32
|
+
"@crystaldesign/analytics": "24.12.0-beta.28",
|
|
33
|
+
"@crystaldesign/products-component": "24.12.0-beta.28",
|
|
34
|
+
"@crystaldesign/real-time-viewer": "24.12.0-beta.28",
|
|
35
35
|
"@material-ui/core": "^4.12.4",
|
|
36
36
|
"@material-ui/icons": "^4.11.2",
|
|
37
37
|
"react-error-boundary": "^4.0.13",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
},
|
|
42
42
|
"types": "./build/types/seller/src/index.d.ts",
|
|
43
43
|
"module": "build/esm/index.js",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "adf64517c76097a4ff0b4a4efa6f59cfe2f1e460"
|
|
45
45
|
}
|