@configuratorware/configurator-frontendgui 1.44.8 → 1.44.10

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.
@@ -1098,7 +1098,7 @@ var DesignDataService = exports["default"] = /*#__PURE__*/function () {
1098
1098
  key: "designAreaListChangeListener",
1099
1099
  value: function designAreaListChangeListener(filteredDesignAreas, prevDesignAreas) {
1100
1100
  // apply pre-selection only after loading the design areas
1101
- if (filteredDesignAreas.length && !prevDesignAreas.length) {
1101
+ if (filteredDesignAreas.length && !(prevDesignAreas !== null && prevDesignAreas !== void 0 && prevDesignAreas.length)) {
1102
1102
  this.applyDesignAreaPreSelection(filteredDesignAreas);
1103
1103
  }
1104
1104
  _ServiceLocator.Services.visualization.updateDesignAreaList(filteredDesignAreas);
@@ -625,6 +625,9 @@ var VisualizationService = exports["default"] = /*#__PURE__*/function (_Abstract
625
625
  value: function restrictUserMovement() {
626
626
  var _this5 = this;
627
627
  var component = this.getComponent();
628
+ if (!component) {
629
+ return;
630
+ }
628
631
  var zoomHandler = function zoomHandler(_ref4) {
629
632
  var direction = _ref4.data.direction;
630
633
  if (direction === 'out') {
@@ -729,6 +729,13 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
729
729
  optionclassifications: userConfiguration.optionclassifications
730
730
  }))));
731
731
  }
732
+ }, {
733
+ key: "renderDialogTitle",
734
+ value: function renderDialogTitle() {
735
+ return this.props.renderDialogTitle ? this.props.renderDialogTitle(this.props) : /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
736
+ variant: "body1"
737
+ }, /*#__PURE__*/_react["default"].createElement("b", null, (0, _i18n.t)(this.props.showReceiveOfferForm ? 'receiveOfferForm.sendButton' : 'amountPrice.intoCart')));
738
+ }
732
739
  }, {
733
740
  key: "renderPriceOverview",
734
741
  value: function renderPriceOverview() {
@@ -801,9 +808,7 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
801
808
  classes: {
802
809
  root: classes.dialogTitleRoot
803
810
  }
804
- }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
805
- variant: "body1"
806
- }, /*#__PURE__*/_react["default"].createElement("b", null, (0, _i18n.t)(showReceiveOfferForm ? 'receiveOfferForm.sendButton' : 'amountPrice.intoCart'))), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
811
+ }, this.renderDialogTitle(), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
807
812
  className: classes.closeIcon,
808
813
  onClick: this.handleClose.bind(this)
809
814
  }, "close")), /*#__PURE__*/_react["default"].createElement(_RootRef["default"], {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.44.8",
3
+ "version": "1.44.10",
4
4
  "license": "UNLICENSED",
5
5
  "private": false,
6
6
  "main": "./index.js",
7
7
  "dependencies": {
8
8
  "@babel/polyfill": "^7.12.1",
9
- "@configuratorware/scripts": "1.44.8",
9
+ "@configuratorware/scripts": "1.44.10",
10
10
  "@material-ui/core": "^4.12.4",
11
11
  "@material-ui/icons": "^4.11.3",
12
12
  "@material-ui/lab": "^4.0.0-alpha.61",
@@ -36,8 +36,8 @@
36
36
  "react-router-dom": "^5.3.4",
37
37
  "react-swipeable": "^5.5.1",
38
38
  "react-zoom-pan-pinch": "^2.1.3",
39
- "redhotmagma-graphics-editor": "1.44.8",
40
- "redhotmagma-visualization": "1.44.8",
39
+ "redhotmagma-graphics-editor": "1.44.10",
40
+ "redhotmagma-visualization": "1.44.10",
41
41
  "redux": "^4.1.0",
42
42
  "redux-logger": "^3.0.6",
43
43
  "redux-persist": "^5.10.0",
@@ -809,7 +809,7 @@ export default class DesignDataService {
809
809
 
810
810
  designAreaListChangeListener(filteredDesignAreas, prevDesignAreas) {
811
811
  // apply pre-selection only after loading the design areas
812
- if (filteredDesignAreas.length && !prevDesignAreas.length) {
812
+ if (filteredDesignAreas.length && !prevDesignAreas?.length) {
813
813
  this.applyDesignAreaPreSelection(filteredDesignAreas);
814
814
  }
815
815
 
@@ -442,6 +442,9 @@ export default class VisualizationService extends AbstractVisualizationService {
442
442
 
443
443
  restrictUserMovement() {
444
444
  const component = this.getComponent();
445
+ if (!component) {
446
+ return;
447
+ }
445
448
  const zoomHandler = ({ data: { direction } }) => {
446
449
  if (direction === 'out') {
447
450
  this._removeRestrictedUserMovementZoomHandler &&
@@ -307,6 +307,7 @@ class AmountPrice extends React.Component {
307
307
  skipPriceOverview: PropTypes.bool,
308
308
  toggleGlobalLoader: PropTypes.func.isRequired,
309
309
  isCreator: PropTypes.bool,
310
+ renderDialogTitle: PropTypes.func,
310
311
  };
311
312
 
312
313
  static defaultProps = {
@@ -596,6 +597,22 @@ class AmountPrice extends React.Component {
596
597
  );
597
598
  }
598
599
 
600
+ renderDialogTitle() {
601
+ return this.props.renderDialogTitle ? (
602
+ this.props.renderDialogTitle(this.props)
603
+ ) : (
604
+ <Typography variant="body1">
605
+ <b>
606
+ {t(
607
+ this.props.showReceiveOfferForm
608
+ ? 'receiveOfferForm.sendButton'
609
+ : 'amountPrice.intoCart'
610
+ )}
611
+ </b>
612
+ </Typography>
613
+ );
614
+ }
615
+
599
616
  renderPriceOverview() {
600
617
  const {
601
618
  notice,
@@ -665,11 +682,7 @@ class AmountPrice extends React.Component {
665
682
  >
666
683
  <LoadingOverlay show={this.props.addToCartPopUpLoader} />
667
684
  <DialogTitle classes={{ root: classes.dialogTitleRoot }}>
668
- <Typography variant="body1">
669
- <b>
670
- {t(showReceiveOfferForm ? 'receiveOfferForm.sendButton' : 'amountPrice.intoCart')}
671
- </b>
672
- </Typography>
685
+ {this.renderDialogTitle()}
673
686
  <Icon className={classes.closeIcon} onClick={this.handleClose.bind(this)}>
674
687
  close
675
688
  </Icon>