@configuratorware/configurator-admingui 1.48.13 → 1.49.1
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.
|
@@ -102,18 +102,38 @@ var ImageTile = (0, _withStyles["default"])(function (theme) {
|
|
|
102
102
|
uploadUrl = _ref.uploadUrl,
|
|
103
103
|
removeUrl = _ref.removeUrl,
|
|
104
104
|
onUpdate = _ref.onUpdate;
|
|
105
|
+
var _useState = (0, _react.useState)(0),
|
|
106
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
107
|
+
version = _useState2[0],
|
|
108
|
+
setVersion = _useState2[1];
|
|
109
|
+
var updateHandler = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
110
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
111
|
+
while (1) switch (_context.prev = _context.next) {
|
|
112
|
+
case 0:
|
|
113
|
+
_context.next = 2;
|
|
114
|
+
return onUpdate();
|
|
115
|
+
case 2:
|
|
116
|
+
setVersion(function (v) {
|
|
117
|
+
return v + 1;
|
|
118
|
+
});
|
|
119
|
+
case 3:
|
|
120
|
+
case "end":
|
|
121
|
+
return _context.stop();
|
|
122
|
+
}
|
|
123
|
+
}, _callee);
|
|
124
|
+
})), [onUpdate]);
|
|
105
125
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
126
|
className: classes.imageTile
|
|
107
127
|
}, expectedSrc ? /*#__PURE__*/_react["default"].createElement(_PathStructure["default"], {
|
|
108
128
|
path: expectedSrc
|
|
109
129
|
}) : /*#__PURE__*/_react["default"].createElement(_Image["default"], {
|
|
110
|
-
src: src
|
|
130
|
+
src: src && "".concat(src, "?v=").concat(version)
|
|
111
131
|
}), uploadUrl && removeUrl && /*#__PURE__*/_react["default"].createElement(_ImageEditTools["default"], {
|
|
112
132
|
className: classes.imageEditTools,
|
|
113
133
|
deleteEnabled: !!src,
|
|
114
134
|
uploadUrl: uploadUrl,
|
|
115
135
|
removeUrl: removeUrl,
|
|
116
|
-
onUpdate:
|
|
136
|
+
onUpdate: updateHandler
|
|
117
137
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
118
138
|
className: classes.imageLabel
|
|
119
139
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -141,11 +161,11 @@ var ItemTile = (0, _withStyles["default"])(function (theme) {
|
|
|
141
161
|
},
|
|
142
162
|
titleSubtitle: {}
|
|
143
163
|
};
|
|
144
|
-
})(function (
|
|
145
|
-
var title =
|
|
146
|
-
subTitle =
|
|
147
|
-
children =
|
|
148
|
-
classes =
|
|
164
|
+
})(function (_ref3) {
|
|
165
|
+
var title = _ref3.title,
|
|
166
|
+
subTitle = _ref3.subTitle,
|
|
167
|
+
children = _ref3.children,
|
|
168
|
+
classes = _ref3.classes;
|
|
149
169
|
return /*#__PURE__*/_react["default"].createElement(_Paper["default"], {
|
|
150
170
|
className: classes.root
|
|
151
171
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -184,11 +204,11 @@ var TabTile = (0, _withStyles["default"])(function (theme) {
|
|
|
184
204
|
top: -2
|
|
185
205
|
}
|
|
186
206
|
};
|
|
187
|
-
})(function (
|
|
188
|
-
var title =
|
|
189
|
-
onDeleteClick =
|
|
190
|
-
children =
|
|
191
|
-
classes =
|
|
207
|
+
})(function (_ref4) {
|
|
208
|
+
var title = _ref4.title,
|
|
209
|
+
onDeleteClick = _ref4.onDeleteClick,
|
|
210
|
+
children = _ref4.children,
|
|
211
|
+
classes = _ref4.classes;
|
|
192
212
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
193
213
|
className: classes.root
|
|
194
214
|
}, title && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -344,84 +364,84 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
344
364
|
zIndex: 9999
|
|
345
365
|
}
|
|
346
366
|
};
|
|
347
|
-
})(function (
|
|
348
|
-
var enable2dTools =
|
|
349
|
-
item =
|
|
350
|
-
itemId =
|
|
351
|
-
loadData =
|
|
352
|
-
saveView =
|
|
353
|
-
updateView =
|
|
354
|
-
removeView =
|
|
355
|
-
classes =
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
open =
|
|
359
|
-
setOpen =
|
|
360
|
-
var
|
|
367
|
+
})(function (_ref5) {
|
|
368
|
+
var enable2dTools = _ref5.enable2dTools,
|
|
369
|
+
item = _ref5.item,
|
|
370
|
+
itemId = _ref5.itemId,
|
|
371
|
+
loadData = _ref5.loadData,
|
|
372
|
+
saveView = _ref5.saveView,
|
|
373
|
+
updateView = _ref5.updateView,
|
|
374
|
+
removeView = _ref5.removeView,
|
|
375
|
+
classes = _ref5.classes;
|
|
376
|
+
var _useState3 = (0, _react.useState)(false),
|
|
377
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
378
|
+
open = _useState4[0],
|
|
379
|
+
setOpen = _useState4[1];
|
|
380
|
+
var _useState5 = (0, _react.useState)({
|
|
361
381
|
viewMediaInfo: [],
|
|
362
382
|
componentMediaInfo: [],
|
|
363
383
|
possibleNamingIssues: []
|
|
364
384
|
}),
|
|
365
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
366
|
-
mediaEditData = _useState4[0],
|
|
367
|
-
setMediaEditData = _useState4[1];
|
|
368
|
-
var _useState5 = (0, _react.useState)(false),
|
|
369
385
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
370
|
-
|
|
371
|
-
|
|
386
|
+
mediaEditData = _useState6[0],
|
|
387
|
+
setMediaEditData = _useState6[1];
|
|
372
388
|
var _useState7 = (0, _react.useState)(false),
|
|
373
389
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
var _useState9 = (0, _react.useState)(
|
|
390
|
+
loading = _useState8[0],
|
|
391
|
+
setLoading = _useState8[1];
|
|
392
|
+
var _useState9 = (0, _react.useState)(false),
|
|
377
393
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
var _useState11 = (0, _react.useState)(
|
|
394
|
+
loadingDialog = _useState10[0],
|
|
395
|
+
setLoadingDialog = _useState10[1];
|
|
396
|
+
var _useState11 = (0, _react.useState)(0),
|
|
381
397
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
382
|
-
|
|
383
|
-
|
|
398
|
+
editorMode = _useState12[0],
|
|
399
|
+
setEditorMode = _useState12[1];
|
|
384
400
|
var _useState13 = (0, _react.useState)(false),
|
|
385
401
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
386
|
-
|
|
387
|
-
|
|
402
|
+
selectedDesignView = _useState14[0],
|
|
403
|
+
setSelectedDesignView = _useState14[1];
|
|
388
404
|
var _useState15 = (0, _react.useState)(false),
|
|
389
405
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
390
|
-
|
|
391
|
-
|
|
406
|
+
showAddView = _useState16[0],
|
|
407
|
+
setShowAddView = _useState16[1];
|
|
408
|
+
var _useState17 = (0, _react.useState)(false),
|
|
409
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
410
|
+
idToDelete = _useState18[0],
|
|
411
|
+
setIdToDelete = _useState18[1];
|
|
392
412
|
var currentDesignViewIdentifier = selectedDesignView && selectedDesignView.identifier;
|
|
393
413
|
var viewMediaInfo = mediaEditData.viewMediaInfo,
|
|
394
414
|
componentMediaInfo = mediaEditData.componentMediaInfo,
|
|
395
415
|
possibleNamingIssues = mediaEditData.possibleNamingIssues;
|
|
396
|
-
var
|
|
397
|
-
|
|
398
|
-
orderedViews =
|
|
399
|
-
setOrderedViews =
|
|
416
|
+
var _useState19 = (0, _react.useState)(viewMediaInfo),
|
|
417
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
418
|
+
orderedViews = _useState20[0],
|
|
419
|
+
setOrderedViews = _useState20[1];
|
|
400
420
|
var refreshData = /*#__PURE__*/function () {
|
|
401
|
-
var
|
|
421
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
402
422
|
var data;
|
|
403
|
-
return _regeneratorRuntime().wrap(function
|
|
404
|
-
while (1) switch (
|
|
423
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
424
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
405
425
|
case 0:
|
|
406
|
-
|
|
426
|
+
_context2.prev = 0;
|
|
407
427
|
setLoadingDialog(true);
|
|
408
|
-
|
|
428
|
+
_context2.next = 4;
|
|
409
429
|
return loadData(itemId);
|
|
410
430
|
case 4:
|
|
411
|
-
data =
|
|
431
|
+
data = _context2.sent;
|
|
412
432
|
setMediaEditData(data);
|
|
413
433
|
case 6:
|
|
414
|
-
|
|
434
|
+
_context2.prev = 6;
|
|
415
435
|
setLoadingDialog(false);
|
|
416
|
-
return
|
|
436
|
+
return _context2.finish(6);
|
|
417
437
|
case 9:
|
|
418
438
|
case "end":
|
|
419
|
-
return
|
|
439
|
+
return _context2.stop();
|
|
420
440
|
}
|
|
421
|
-
},
|
|
441
|
+
}, _callee2, null, [[0,, 6, 9]]);
|
|
422
442
|
}));
|
|
423
443
|
return function refreshData() {
|
|
424
|
-
return
|
|
444
|
+
return _ref6.apply(this, arguments);
|
|
425
445
|
};
|
|
426
446
|
}();
|
|
427
447
|
(0, _react.useEffect)(function () {
|
|
@@ -441,40 +461,40 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
441
461
|
}
|
|
442
462
|
}, [viewMediaInfo, editorMode, selectedDesignView]);
|
|
443
463
|
(0, _react.useEffect)(function () {
|
|
444
|
-
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
445
|
-
return _regeneratorRuntime().wrap(function
|
|
446
|
-
while (1) switch (
|
|
464
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
465
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
466
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
447
467
|
case 0:
|
|
448
468
|
if (!open) {
|
|
449
|
-
|
|
469
|
+
_context3.next = 11;
|
|
450
470
|
break;
|
|
451
471
|
}
|
|
452
472
|
setLoading(true);
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
473
|
+
_context3.prev = 2;
|
|
474
|
+
_context3.t0 = setMediaEditData;
|
|
475
|
+
_context3.next = 6;
|
|
456
476
|
return loadData(itemId);
|
|
457
477
|
case 6:
|
|
458
|
-
|
|
459
|
-
(0,
|
|
478
|
+
_context3.t1 = _context3.sent;
|
|
479
|
+
(0, _context3.t0)(_context3.t1);
|
|
460
480
|
case 8:
|
|
461
|
-
|
|
481
|
+
_context3.prev = 8;
|
|
462
482
|
setLoading(false);
|
|
463
|
-
return
|
|
483
|
+
return _context3.finish(8);
|
|
464
484
|
case 11:
|
|
465
485
|
case "end":
|
|
466
|
-
return
|
|
486
|
+
return _context3.stop();
|
|
467
487
|
}
|
|
468
|
-
},
|
|
488
|
+
}, _callee3, null, [[2,, 8, 11]]);
|
|
469
489
|
}))();
|
|
470
490
|
}, [open, loadData, setMediaEditData, itemId]);
|
|
471
491
|
var handleViewSortEnd = /*#__PURE__*/function () {
|
|
472
|
-
var
|
|
492
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref8) {
|
|
473
493
|
var oldIndex, newIndex, views, refreshNeeded;
|
|
474
|
-
return _regeneratorRuntime().wrap(function
|
|
475
|
-
while (1) switch (
|
|
494
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
495
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
476
496
|
case 0:
|
|
477
|
-
oldIndex =
|
|
497
|
+
oldIndex = _ref8.oldIndex, newIndex = _ref8.newIndex;
|
|
478
498
|
views = (0, _arrayMove["default"])(orderedViews, oldIndex, newIndex).map(function (view, index) {
|
|
479
499
|
return _objectSpread(_objectSpread({}, view), {}, {
|
|
480
500
|
sequenceNumber: (0, _padStart["default"])('' + (index + 1), 2, '0')
|
|
@@ -482,9 +502,9 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
482
502
|
});
|
|
483
503
|
setOrderedViews(views);
|
|
484
504
|
refreshNeeded = false;
|
|
485
|
-
|
|
505
|
+
_context4.prev = 4;
|
|
486
506
|
setLoadingDialog(true);
|
|
487
|
-
|
|
507
|
+
_context4.next = 8;
|
|
488
508
|
return Promise.all(views.map(function (view) {
|
|
489
509
|
if (view.sequenceNumber !== orderedViews.sequenceNumber) {
|
|
490
510
|
refreshNeeded = true;
|
|
@@ -494,28 +514,28 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
494
514
|
}
|
|
495
515
|
}));
|
|
496
516
|
case 8:
|
|
497
|
-
|
|
517
|
+
_context4.prev = 8;
|
|
498
518
|
if (!refreshNeeded) {
|
|
499
|
-
|
|
519
|
+
_context4.next = 14;
|
|
500
520
|
break;
|
|
501
521
|
}
|
|
502
|
-
|
|
522
|
+
_context4.next = 12;
|
|
503
523
|
return refreshData();
|
|
504
524
|
case 12:
|
|
505
|
-
|
|
525
|
+
_context4.next = 15;
|
|
506
526
|
break;
|
|
507
527
|
case 14:
|
|
508
528
|
setLoadingDialog(false);
|
|
509
529
|
case 15:
|
|
510
|
-
return
|
|
530
|
+
return _context4.finish(8);
|
|
511
531
|
case 16:
|
|
512
532
|
case "end":
|
|
513
|
-
return
|
|
533
|
+
return _context4.stop();
|
|
514
534
|
}
|
|
515
|
-
},
|
|
535
|
+
}, _callee4, null, [[4,, 8, 16]]);
|
|
516
536
|
}));
|
|
517
537
|
return function handleViewSortEnd(_x) {
|
|
518
|
-
return
|
|
538
|
+
return _ref9.apply(this, arguments);
|
|
519
539
|
};
|
|
520
540
|
}();
|
|
521
541
|
|
|
@@ -585,8 +605,8 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
585
605
|
helperClass: classes.sortable,
|
|
586
606
|
value: currentDesignViewIdentifier || 0,
|
|
587
607
|
onChange: function onChange(evt, value) {
|
|
588
|
-
return setSelectedDesignView(orderedViews.find(function (
|
|
589
|
-
var identifier =
|
|
608
|
+
return setSelectedDesignView(orderedViews.find(function (_ref10) {
|
|
609
|
+
var identifier = _ref10.identifier;
|
|
590
610
|
return identifier === value;
|
|
591
611
|
}));
|
|
592
612
|
},
|
|
@@ -607,11 +627,11 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
607
627
|
"aria-label": 'identifier',
|
|
608
628
|
value: identifier,
|
|
609
629
|
onChange: /*#__PURE__*/function () {
|
|
610
|
-
var
|
|
611
|
-
return _regeneratorRuntime().wrap(function
|
|
612
|
-
while (1) switch (
|
|
630
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(value) {
|
|
631
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
632
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
613
633
|
case 0:
|
|
614
|
-
|
|
634
|
+
_context5.next = 2;
|
|
615
635
|
return updateView({
|
|
616
636
|
id: id,
|
|
617
637
|
itemId: itemId,
|
|
@@ -619,20 +639,20 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
619
639
|
identifier: value
|
|
620
640
|
});
|
|
621
641
|
case 2:
|
|
622
|
-
|
|
623
|
-
|
|
642
|
+
_context5.t0 = setMediaEditData;
|
|
643
|
+
_context5.next = 5;
|
|
624
644
|
return loadData(itemId);
|
|
625
645
|
case 5:
|
|
626
|
-
|
|
627
|
-
(0,
|
|
646
|
+
_context5.t1 = _context5.sent;
|
|
647
|
+
(0, _context5.t0)(_context5.t1);
|
|
628
648
|
case 7:
|
|
629
649
|
case "end":
|
|
630
|
-
return
|
|
650
|
+
return _context5.stop();
|
|
631
651
|
}
|
|
632
|
-
},
|
|
652
|
+
}, _callee5);
|
|
633
653
|
}));
|
|
634
654
|
return function (_x2) {
|
|
635
|
-
return
|
|
655
|
+
return _ref11.apply(this, arguments);
|
|
636
656
|
};
|
|
637
657
|
}()
|
|
638
658
|
}),
|
|
@@ -665,35 +685,35 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
665
685
|
return setShowAddView(false);
|
|
666
686
|
},
|
|
667
687
|
onSubmit: /*#__PURE__*/function () {
|
|
668
|
-
var
|
|
669
|
-
return _regeneratorRuntime().wrap(function
|
|
670
|
-
while (1) switch (
|
|
688
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(data) {
|
|
689
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
690
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
671
691
|
case 0:
|
|
672
|
-
|
|
673
|
-
|
|
692
|
+
_context6.prev = 0;
|
|
693
|
+
_context6.next = 3;
|
|
674
694
|
return saveView(_objectSpread(_objectSpread({}, data), {}, {
|
|
675
695
|
itemId: itemId,
|
|
676
696
|
sequenceNumber: '999'
|
|
677
697
|
}));
|
|
678
698
|
case 3:
|
|
679
|
-
|
|
699
|
+
_context6.next = 8;
|
|
680
700
|
break;
|
|
681
701
|
case 5:
|
|
682
|
-
|
|
683
|
-
|
|
702
|
+
_context6.prev = 5;
|
|
703
|
+
_context6.t0 = _context6["catch"](0);
|
|
684
704
|
// eslint-disable-next-line no-console
|
|
685
|
-
console.error(
|
|
705
|
+
console.error(_context6.t0);
|
|
686
706
|
case 8:
|
|
687
707
|
refreshData();
|
|
688
708
|
setShowAddView(false);
|
|
689
709
|
case 10:
|
|
690
710
|
case "end":
|
|
691
|
-
return
|
|
711
|
+
return _context6.stop();
|
|
692
712
|
}
|
|
693
|
-
},
|
|
713
|
+
}, _callee6, null, [[0, 5]]);
|
|
694
714
|
}));
|
|
695
715
|
return function (_x3) {
|
|
696
|
-
return
|
|
716
|
+
return _ref12.apply(this, arguments);
|
|
697
717
|
};
|
|
698
718
|
}()
|
|
699
719
|
}), /*#__PURE__*/_react["default"].createElement(_ConfirmDelete["default"], {
|
|
@@ -702,25 +722,25 @@ var VisualizationAndMediaData = exports.VisualizationAndMediaData = (0, _withSty
|
|
|
702
722
|
onCancel: function onCancel() {
|
|
703
723
|
return setIdToDelete(false);
|
|
704
724
|
},
|
|
705
|
-
onConfirm: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
706
|
-
return _regeneratorRuntime().wrap(function
|
|
707
|
-
while (1) switch (
|
|
725
|
+
onConfirm: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
726
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
727
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
708
728
|
case 0:
|
|
709
|
-
|
|
729
|
+
_context7.next = 2;
|
|
710
730
|
return removeView(idToDelete);
|
|
711
731
|
case 2:
|
|
712
732
|
setIdToDelete(false);
|
|
713
|
-
|
|
714
|
-
|
|
733
|
+
_context7.t0 = setMediaEditData;
|
|
734
|
+
_context7.next = 6;
|
|
715
735
|
return loadData(itemId);
|
|
716
736
|
case 6:
|
|
717
|
-
|
|
718
|
-
(0,
|
|
737
|
+
_context7.t1 = _context7.sent;
|
|
738
|
+
(0, _context7.t0)(_context7.t1);
|
|
719
739
|
case 8:
|
|
720
740
|
case "end":
|
|
721
|
-
return
|
|
741
|
+
return _context7.stop();
|
|
722
742
|
}
|
|
723
|
-
},
|
|
743
|
+
}, _callee7);
|
|
724
744
|
})),
|
|
725
745
|
title: (0, _i18n.t)('visualizationAndMediaData.viewDeleteConfirm.title'),
|
|
726
746
|
message: (0, _i18n.t)('visualizationAndMediaData.viewDeleteConfirm.message')
|
|
@@ -802,33 +822,33 @@ function mapStateToProps() {
|
|
|
802
822
|
function mapDispatchToProps(dispatch) {
|
|
803
823
|
return {
|
|
804
824
|
loadData: function () {
|
|
805
|
-
var _loadData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
825
|
+
var _loadData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
|
|
806
826
|
var _yield$Api$request, data;
|
|
807
|
-
return _regeneratorRuntime().wrap(function
|
|
808
|
-
while (1) switch (
|
|
827
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
828
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
809
829
|
case 0:
|
|
810
|
-
|
|
811
|
-
|
|
830
|
+
_context8.prev = 0;
|
|
831
|
+
_context8.next = 3;
|
|
812
832
|
return _Api["default"].request("/mediainfo/".concat(id));
|
|
813
833
|
case 3:
|
|
814
|
-
_yield$Api$request =
|
|
834
|
+
_yield$Api$request = _context8.sent;
|
|
815
835
|
data = _yield$Api$request.data;
|
|
816
|
-
return
|
|
836
|
+
return _context8.abrupt("return", _objectSpread(_objectSpread({
|
|
817
837
|
componentMediaInfo: [],
|
|
818
838
|
possibleNamingIssues: []
|
|
819
839
|
}, data), {}, {
|
|
820
840
|
viewMediaInfo: (0, _sortBy["default"])(data.viewMediaInfo, ['sequenceNumber'])
|
|
821
841
|
}));
|
|
822
842
|
case 8:
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
dispatch((0, _Actions.networkError)('mediainfo', 'mediainfo',
|
|
826
|
-
throw
|
|
843
|
+
_context8.prev = 8;
|
|
844
|
+
_context8.t0 = _context8["catch"](0);
|
|
845
|
+
dispatch((0, _Actions.networkError)('mediainfo', 'mediainfo', _context8.t0));
|
|
846
|
+
throw _context8.t0;
|
|
827
847
|
case 12:
|
|
828
848
|
case "end":
|
|
829
|
-
return
|
|
849
|
+
return _context8.stop();
|
|
830
850
|
}
|
|
831
|
-
},
|
|
851
|
+
}, _callee8, null, [[0, 8]]);
|
|
832
852
|
}));
|
|
833
853
|
function loadData(_x4) {
|
|
834
854
|
return _loadData.apply(this, arguments);
|
|
@@ -836,29 +856,29 @@ function mapDispatchToProps(dispatch) {
|
|
|
836
856
|
return loadData;
|
|
837
857
|
}(),
|
|
838
858
|
saveView: function () {
|
|
839
|
-
var _saveView = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
840
|
-
return _regeneratorRuntime().wrap(function
|
|
841
|
-
while (1) switch (
|
|
859
|
+
var _saveView = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(data) {
|
|
860
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
861
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
842
862
|
case 0:
|
|
843
|
-
|
|
844
|
-
|
|
863
|
+
_context9.prev = 0;
|
|
864
|
+
_context9.next = 3;
|
|
845
865
|
return _Api["default"].request({
|
|
846
866
|
method: 'post',
|
|
847
867
|
url: "/creator_views",
|
|
848
868
|
data: data
|
|
849
869
|
});
|
|
850
870
|
case 3:
|
|
851
|
-
return
|
|
871
|
+
return _context9.abrupt("return", _context9.sent);
|
|
852
872
|
case 6:
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
dispatch((0, _Actions.networkError)('views', 'views',
|
|
856
|
-
throw
|
|
873
|
+
_context9.prev = 6;
|
|
874
|
+
_context9.t0 = _context9["catch"](0);
|
|
875
|
+
dispatch((0, _Actions.networkError)('views', 'views', _context9.t0));
|
|
876
|
+
throw _context9.t0;
|
|
857
877
|
case 10:
|
|
858
878
|
case "end":
|
|
859
|
-
return
|
|
879
|
+
return _context9.stop();
|
|
860
880
|
}
|
|
861
|
-
},
|
|
881
|
+
}, _callee9, null, [[0, 6]]);
|
|
862
882
|
}));
|
|
863
883
|
function saveView(_x5) {
|
|
864
884
|
return _saveView.apply(this, arguments);
|
|
@@ -866,29 +886,29 @@ function mapDispatchToProps(dispatch) {
|
|
|
866
886
|
return saveView;
|
|
867
887
|
}(),
|
|
868
888
|
updateView: function () {
|
|
869
|
-
var _updateView = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
870
|
-
return _regeneratorRuntime().wrap(function
|
|
871
|
-
while (1) switch (
|
|
889
|
+
var _updateView = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(data) {
|
|
890
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
891
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
872
892
|
case 0:
|
|
873
|
-
|
|
874
|
-
|
|
893
|
+
_context10.prev = 0;
|
|
894
|
+
_context10.next = 3;
|
|
875
895
|
return _Api["default"].request({
|
|
876
896
|
method: 'post',
|
|
877
897
|
url: "/creator_views",
|
|
878
898
|
data: data
|
|
879
899
|
});
|
|
880
900
|
case 3:
|
|
881
|
-
return
|
|
901
|
+
return _context10.abrupt("return", _context10.sent);
|
|
882
902
|
case 6:
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
dispatch((0, _Actions.networkError)('views', 'views',
|
|
886
|
-
throw
|
|
903
|
+
_context10.prev = 6;
|
|
904
|
+
_context10.t0 = _context10["catch"](0);
|
|
905
|
+
dispatch((0, _Actions.networkError)('views', 'views', _context10.t0));
|
|
906
|
+
throw _context10.t0;
|
|
887
907
|
case 10:
|
|
888
908
|
case "end":
|
|
889
|
-
return
|
|
909
|
+
return _context10.stop();
|
|
890
910
|
}
|
|
891
|
-
},
|
|
911
|
+
}, _callee10, null, [[0, 6]]);
|
|
892
912
|
}));
|
|
893
913
|
function updateView(_x6) {
|
|
894
914
|
return _updateView.apply(this, arguments);
|
|
@@ -909,41 +929,41 @@ function mapDispatchToProps(dispatch) {
|
|
|
909
929
|
};
|
|
910
930
|
}
|
|
911
931
|
var _default = exports["default"] = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)((0, _AsyncProps.withAsyncProps)( /*#__PURE__*/function () {
|
|
912
|
-
var
|
|
932
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(_ref14) {
|
|
913
933
|
var itemId, _item, item;
|
|
914
|
-
return _regeneratorRuntime().wrap(function
|
|
915
|
-
while (1) switch (
|
|
934
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
935
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
916
936
|
case 0:
|
|
917
|
-
itemId =
|
|
918
|
-
|
|
919
|
-
if (
|
|
920
|
-
|
|
937
|
+
itemId = _ref14.itemId, _item = _ref14.item;
|
|
938
|
+
_context11.t0 = _item;
|
|
939
|
+
if (_context11.t0) {
|
|
940
|
+
_context11.next = 9;
|
|
921
941
|
break;
|
|
922
942
|
}
|
|
923
|
-
|
|
924
|
-
if (!
|
|
925
|
-
|
|
943
|
+
_context11.t1 = itemId;
|
|
944
|
+
if (!_context11.t1) {
|
|
945
|
+
_context11.next = 8;
|
|
926
946
|
break;
|
|
927
947
|
}
|
|
928
|
-
|
|
948
|
+
_context11.next = 7;
|
|
929
949
|
return (0, _ApiCalls.loadItemById)(itemId);
|
|
930
950
|
case 7:
|
|
931
|
-
|
|
951
|
+
_context11.t1 = _context11.sent;
|
|
932
952
|
case 8:
|
|
933
|
-
|
|
953
|
+
_context11.t0 = _context11.t1;
|
|
934
954
|
case 9:
|
|
935
|
-
item =
|
|
936
|
-
return
|
|
955
|
+
item = _context11.t0;
|
|
956
|
+
return _context11.abrupt("return", {
|
|
937
957
|
item: item
|
|
938
958
|
});
|
|
939
959
|
case 11:
|
|
940
960
|
case "end":
|
|
941
|
-
return
|
|
961
|
+
return _context11.stop();
|
|
942
962
|
}
|
|
943
|
-
},
|
|
963
|
+
}, _callee11);
|
|
944
964
|
}));
|
|
945
965
|
return function (_x7) {
|
|
946
|
-
return
|
|
966
|
+
return _ref15.apply(this, arguments);
|
|
947
967
|
};
|
|
948
968
|
}(), ['itemIdentifier'], {
|
|
949
969
|
renderError: function renderError() {
|
|
@@ -952,8 +972,8 @@ var _default = exports["default"] = (0, _reactRedux.connect)(mapStateToProps, ma
|
|
|
952
972
|
renderLoading: function renderLoading() {
|
|
953
973
|
return /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], null);
|
|
954
974
|
}
|
|
955
|
-
})((0, _RemappedProps.withRemappedProps)(function (
|
|
956
|
-
var item =
|
|
975
|
+
})((0, _RemappedProps.withRemappedProps)(function (_ref16) {
|
|
976
|
+
var item = _ref16.item;
|
|
957
977
|
return {
|
|
958
978
|
enable2dTools: ['2dVariant', '2dLayer'].indexOf((0, _get["default"])(item, 'visualizationMode.identifier')) !== -1
|
|
959
979
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-admingui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.49.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"private": false,
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@babel/polyfill": "^7.12.1",
|
|
8
|
-
"@configuratorware/scripts": "1.
|
|
8
|
+
"@configuratorware/scripts": "1.49.1",
|
|
9
9
|
"@material-ui/core": "^3.9.4",
|
|
10
10
|
"@material-ui/icons": "^3.0.2",
|
|
11
11
|
"@tweenjs/tween.js": "^17.6.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-redux-i18n": "^1.9.3",
|
|
29
29
|
"react-router": "^3.2.6",
|
|
30
30
|
"react-sortable-hoc": "^1.11.0",
|
|
31
|
-
"redhotmagma-visualization": "1.
|
|
31
|
+
"redhotmagma-visualization": "1.49.1",
|
|
32
32
|
"redux": "^4.1.0",
|
|
33
33
|
"redux-logger": "^3.0.6",
|
|
34
34
|
"redux-persist": "^5.10.0",
|