@configuratorware/configurator-frontendgui 1.49.9 → 1.50.0

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.
Files changed (107) hide show
  1. package/App/Error/ProductionErrorPage/index.js +5 -1
  2. package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +2 -1
  3. package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +2 -1
  4. package/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
  5. package/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +8 -31
  6. package/App/Modules/Creator/Components/Option/index.js +18 -14
  7. package/App/Modules/Creator/Components/OptionAmount/index.js +11 -7
  8. package/App/Modules/Creator/Components/ProductPart/index.js +20 -25
  9. package/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
  10. package/App/Modules/Creator/Layouts/DefaultLayout.js +8 -9
  11. package/App/Modules/Designer/Components/AddGalleryImage/index.js +5 -2
  12. package/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
  13. package/App/Modules/Designer/Components/Dialog/index.js +1 -3
  14. package/App/Modules/Designer/Components/ImageControlbox/index.js +1 -3
  15. package/App/Reducers/Reducer.js +8 -2
  16. package/App/Screens/Configurator/Components/Confirm/index.js +1 -5
  17. package/App/Screens/Configurator/Components/Error/index.js +0 -3
  18. package/App/Screens/Configurator/Components/FullScreenView/index.js +2 -5
  19. package/App/Screens/Configurator/Components/FullScreenView/index.test.js +1 -1
  20. package/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -28
  21. package/App/Screens/Configurator/Components/Thumbnail/index.js +9 -6
  22. package/App/Screens/Configurator/ThemeProvider.js +7 -4
  23. package/App/Shared/Components/AccessibleButton/AccessibleButton.js +40 -0
  24. package/App/Shared/Components/AlertDialog/index.js +0 -3
  25. package/App/Shared/Components/AmountPrice/index.js +29 -20
  26. package/App/Shared/Components/Analytics/AnalyticsWrapper.js +7 -1
  27. package/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.js +71 -0
  28. package/App/Shared/Components/BulkNames/index.js +9 -6
  29. package/App/Shared/Components/LoadConfiguration/index.js +0 -2
  30. package/App/Shared/Components/PdfDownload/index.js +0 -2
  31. package/App/Shared/Components/SaveConfiguration/index.js +3 -4
  32. package/App/Shared/Components/SendEmail/index.js +0 -2
  33. package/App/Shared/Components/ToolbarList/index.js +18 -16
  34. package/App/Shared/Hooks/useDialogId.js +19 -0
  35. package/Shared/Components/CustomDialog.js +77 -56
  36. package/package.json +4 -4
  37. package/public/invoke.js +1 -1
  38. package/public/translations/de_DE.json +2 -1
  39. package/public/translations/en_GB.json +2 -1
  40. package/scripts/utils/fileSystem.js +6 -1
  41. package/src/App/Error/ProductionErrorPage/index.js +27 -24
  42. package/src/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +1 -1
  43. package/src/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +1 -1
  44. package/src/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
  45. package/src/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +10 -27
  46. package/src/App/Modules/Creator/Components/Option/__snapshots__/index.test.js.snap +142 -90
  47. package/src/App/Modules/Creator/Components/Option/index.js +30 -14
  48. package/src/App/Modules/Creator/Components/OptionAmount/__snapshots__/index.test.js.snap +31 -18
  49. package/src/App/Modules/Creator/Components/OptionAmount/index.js +7 -2
  50. package/src/App/Modules/Creator/Components/ProductPart/__snapshots__/index.test.js.snap +32 -24
  51. package/src/App/Modules/Creator/Components/ProductPart/index.js +20 -27
  52. package/src/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
  53. package/src/App/Modules/Creator/Layouts/DefaultLayout.js +12 -13
  54. package/src/App/Modules/Designer/Components/AddGalleryImage/__snapshots__/index.test.jsx.snap +1 -0
  55. package/src/App/Modules/Designer/Components/AddGalleryImage/index.js +4 -1
  56. package/src/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
  57. package/src/App/Modules/Designer/Components/Dialog/index.js +1 -1
  58. package/src/App/Modules/Designer/Components/ImageControlbox/index.js +0 -2
  59. package/src/App/Reducers/Reducer.js +7 -0
  60. package/src/App/Screens/Configurator/Components/Confirm/index.js +1 -3
  61. package/src/App/Screens/Configurator/Components/Error/index.js +2 -11
  62. package/src/App/Screens/Configurator/Components/FullScreenView/__snapshots__/index.test.jsx.snap +3 -4
  63. package/src/App/Screens/Configurator/Components/FullScreenView/index.js +17 -17
  64. package/src/App/Screens/Configurator/Components/FullScreenView/index.test.jsx +1 -1
  65. package/src/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -32
  66. package/src/App/Screens/Configurator/Components/Thumbnail/__snapshots__/index.test.jsx.snap +32 -8
  67. package/src/App/Screens/Configurator/Components/Thumbnail/index.js +8 -5
  68. package/src/App/Screens/Configurator/ThemeProvider.js +6 -3
  69. package/src/App/Shared/Components/AccessibleButton/AccessibleButton.js +29 -0
  70. package/src/App/Shared/Components/AlertDialog/index.js +1 -6
  71. package/src/App/Shared/Components/AmountPrice/__snapshots__/index.test.jsx.snap +15 -15
  72. package/src/App/Shared/Components/AmountPrice/index.js +31 -21
  73. package/src/App/Shared/Components/Analytics/AnalyticsWrapper.js +6 -0
  74. package/src/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.jsx +52 -0
  75. package/src/App/Shared/Components/BulkNames/index.js +11 -6
  76. package/src/App/Shared/Components/LoadConfiguration/index.js +0 -2
  77. package/src/App/Shared/Components/PdfDownload/index.js +0 -2
  78. package/src/App/Shared/Components/SaveConfiguration/index.js +6 -4
  79. package/src/App/Shared/Components/SendEmail/index.js +0 -2
  80. package/src/App/Shared/Components/ToolbarList/__snapshots__/ToolbarList.test.js.snap +44 -20
  81. package/src/App/Shared/Components/ToolbarList/index.js +30 -27
  82. package/src/App/Shared/Hooks/useDialogId.js +11 -0
  83. package/src/Shared/Components/CustomDialog.js +60 -43
  84. package/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
  85. package/App/Modules/Creator/Components/LoginForm/index.js +0 -91
  86. package/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
  87. package/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -50
  88. package/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
  89. package/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -165
  90. package/App/Modules/Creator/Components/StockInformation/index.js +0 -62
  91. package/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
  92. package/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -86
  93. package/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
  94. package/App/Modules/Creator/Components/ValidationResult/index.js +0 -119
  95. package/App/Modules/Creator/Components/index.js +0 -57
  96. package/src/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
  97. package/src/App/Modules/Creator/Components/LoginForm/index.js +0 -69
  98. package/src/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
  99. package/src/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -37
  100. package/src/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
  101. package/src/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -161
  102. package/src/App/Modules/Creator/Components/StockInformation/index.js +0 -39
  103. package/src/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
  104. package/src/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -73
  105. package/src/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
  106. package/src/App/Modules/Creator/Components/ValidationResult/index.js +0 -89
  107. package/src/App/Modules/Creator/Components/index.js +0 -51
@@ -16,6 +16,7 @@ var _Menu = _interopRequireDefault(require("@material-ui/core/Menu"));
16
16
  var _AnalyticsWrapper = _interopRequireDefault(require("../Analytics/AnalyticsWrapper"));
17
17
  var _customClassName = _interopRequireDefault(require("../../../Utils/customClassName"));
18
18
  var _i18n = require("../../../../Framework/i18n");
19
+ var _AccessibleButton = _interopRequireDefault(require("../AccessibleButton/AccessibleButton"));
19
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
21
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
21
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -119,24 +120,26 @@ var ToolbarList = /*#__PURE__*/function (_React$Component) {
119
120
  return /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
120
121
  key: tool.key,
121
122
  targetId: tool.key
123
+ }, /*#__PURE__*/_react["default"].createElement(_AccessibleButton["default"], {
124
+ onClick: tool["function"]
122
125
  }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
123
126
  title: tool.title && (0, _i18n.t)(tool.title),
124
127
  key: tool.key,
125
- className: classes.iconHover,
126
- onClick: tool["function"]
127
- }, tool.identifier));
128
+ className: classes.iconHover
129
+ }, tool.identifier)));
128
130
  })), /*#__PURE__*/_react["default"].createElement(_Hidden["default"], {
129
131
  smUp: true
130
132
  }, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
131
133
  "aria-label": "Menu",
132
134
  "aria-haspopup": "true",
135
+ "aria-controls": "toolbar-menu",
133
136
  classes: {
134
137
  root: classes.ToolbarButton,
135
138
  label: classes.ToolbarIconButton
136
139
  },
137
140
  onClick: this.handleClick
138
141
  }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, toolbarMobileIcon)), /*#__PURE__*/_react["default"].createElement(_Menu["default"], {
139
- id: "long-menu",
142
+ id: "toolbar-menu",
140
143
  anchorEl: anchorEl,
141
144
  open: open,
142
145
  getContentAnchorEl: null,
@@ -149,6 +152,7 @@ var ToolbarList = /*#__PURE__*/function (_React$Component) {
149
152
  horizontal: 'center'
150
153
  },
151
154
  onClose: this.handleClose,
155
+ keepMounted: true,
152
156
  PaperProps: {
153
157
  style: {
154
158
  maxHeight: ITEM_HEIGHT * 4.5,
@@ -156,25 +160,23 @@ var ToolbarList = /*#__PURE__*/function (_React$Component) {
156
160
  }
157
161
  }
158
162
  }, tools && tools.map(function (tool) {
159
- return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
160
- className: classes.MenuItemOption,
161
- key: tool.key,
162
- onClick: _this2.handleClose
163
- }, /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
163
+ return /*#__PURE__*/_react["default"].createElement(_AnalyticsWrapper["default"], {
164
164
  key: tool.key,
165
165
  targetId: tool.key
166
- }, /*#__PURE__*/_react["default"].createElement("div", {
167
- style: {
168
- display: 'flex',
169
- width: '100%'
170
- },
171
- onClick: tool["function"]
166
+ }, /*#__PURE__*/_react["default"].createElement(_AccessibleButton["default"], {
167
+ component: _MenuItem["default"],
168
+ className: classes.MenuItemOption,
169
+ key: tool.key,
170
+ onClick: function onClick(evt) {
171
+ tool["function"](evt);
172
+ _this2.handleClose();
173
+ }
172
174
  }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
173
175
  key: tool.key,
174
176
  className: classes.iconHover
175
177
  }, tool.identifier), /*#__PURE__*/_react["default"].createElement("div", {
176
178
  className: classes.toolTitle
177
- }, tool.title && (0, _i18n.t)(tool.title)))));
179
+ }, tool.title && (0, _i18n.t)(tool.title))));
178
180
  })))));
179
181
  }
180
182
  }]);
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogId = void 0;
7
+ var _react = require("react");
8
+ var _v = _interopRequireDefault(require("uuid/v4"));
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ var useDialogId = exports.useDialogId = function useDialogId() {
11
+ var dialogId = (0, _react.useMemo)(function () {
12
+ return (0, _v["default"])();
13
+ }, []);
14
+ var dialogTitleId = "dialog-title-".concat(dialogId);
15
+ return {
16
+ dialogId: dialogId,
17
+ dialogTitleId: dialogTitleId
18
+ };
19
+ };
@@ -3,24 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports["default"] = exports.customDialogStyle = void 0;
6
+ exports["default"] = exports.customDialogStyle = exports.CustomDialogHeader = exports.CustomDialog = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _styles = require("@material-ui/core/styles");
9
9
  var _withWidth = _interopRequireDefault(require("@material-ui/core/withWidth"));
10
10
  var _Dialog = _interopRequireDefault(require("@material-ui/core/Dialog"));
11
11
  var _DialogTitle = _interopRequireDefault(require("@material-ui/core/DialogTitle"));
12
12
  var _Icon = _interopRequireDefault(require("@material-ui/core/Icon"));
13
+ var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
14
+ var _AutoFocusDialogContentContainer = _interopRequireDefault(require("../../App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer"));
15
+ var _useDialogId2 = require("../../App/Shared/Hooks/useDialogId");
13
16
  var _excluded = ["className", "classes", "width", "dialogTitle", "onCancel", "children", "fullScreen"];
14
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
16
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
19
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
20
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
19
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
21
  var customDialogStyle = exports.customDialogStyle = function customDialogStyle(theme) {
23
- var _closeIcon;
24
22
  var _theme$smallScreen = theme.smallScreen,
25
23
  smallScreen = _theme$smallScreen === void 0 ? {
26
24
  centeredDialogPadding: 0
@@ -35,17 +33,24 @@ var customDialogStyle = exports.customDialogStyle = function customDialogStyle(t
35
33
  maxWidth: 720
36
34
  },
37
35
  '& .MuiDialogTitle-root': {
38
- paddingTop: 20,
39
- paddingBottom: 15,
40
- '& p, h2': {
36
+ paddingTop: theme.spacing(2),
37
+ paddingBottom: theme.spacing(2),
38
+ '& .MuiTypography-root': {
41
39
  fontSize: 24,
42
40
  fontWeight: 'bold',
43
41
  letterSpacing: 'normal',
44
- marginRight: 28
42
+ display: 'flex',
43
+ justifyContent: 'space-between',
44
+ alignItems: 'center'
45
45
  }
46
46
  },
47
47
  '& .MuiDialogActions-root': {
48
- paddingBottom: 24
48
+ paddingBottom: 24,
49
+ '& .MuiButton-root': {
50
+ height: 40,
51
+ textTransform: 'none',
52
+ minWidth: 140
53
+ }
49
54
  },
50
55
  '& .MuiDialogTitle-root, .MuiDialogContent-root, .MuiDialogActions-root': {
51
56
  paddingLeft: smallScreen.centeredDialogPadding,
@@ -55,51 +60,63 @@ var customDialogStyle = exports.customDialogStyle = function customDialogStyle(t
55
60
  letterSpacing: 'normal'
56
61
  }
57
62
  }
58
- },
59
- '& .MuiButton-root': {
60
- height: 40,
61
- textTransform: 'none',
62
- minWidth: 140
63
63
  }
64
+ }
65
+ };
66
+ };
67
+ var customDialogHeaderStyle = function customDialogHeaderStyle(theme) {
68
+ return {
69
+ closeButton: {
70
+ marginLeft: 'auto',
71
+ marginRight: theme.spacing(1),
72
+ marginTop: theme.spacing(1)
64
73
  },
65
- stickyDialog: {
66
- '& .MuiDialog-container': {
67
- '& .MuiDialogTitle-root': {
68
- paddingTop: 25,
69
- paddingBottom: 8
70
- }
71
- },
72
- '& .MuiButton-root': {
73
- width: '100%',
74
- height: 56,
75
- minWidth: 64
76
- }
74
+ dialogHeader: {
75
+ display: 'flex',
76
+ alignItems: 'start'
77
77
  },
78
- closeIcon: (_closeIcon = {
79
- position: 'absolute',
80
- right: 28,
81
- top: 28
82
- }, _defineProperty(_closeIcon, theme.breakpoints.down('xs'), {
83
- right: 20,
84
- top: 30
85
- }), _defineProperty(_closeIcon, '&:hover', {
86
- cursor: 'pointer'
87
- }), _closeIcon)
78
+ dialogTitle: {
79
+ flex: 1
80
+ }
88
81
  };
89
82
  };
90
- var _default = exports["default"] = (0, _withWidth["default"])({
83
+ var CustomDialogHeader = exports.CustomDialogHeader = (0, _styles.withStyles)(customDialogHeaderStyle, {
84
+ name: 'CustomDialogHeader'
85
+ })(function (_ref) {
86
+ var classes = _ref.classes,
87
+ dialogTitle = _ref.dialogTitle,
88
+ dialogTitleId = _ref.dialogTitleId,
89
+ onClose = _ref.onClose,
90
+ children = _ref.children;
91
+ return /*#__PURE__*/_react["default"].createElement("div", {
92
+ className: classes.dialogHeader
93
+ }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
94
+ className: classes.dialogTitle,
95
+ id: dialogTitleId
96
+ }, dialogTitle), children, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
97
+ onClick: onClose,
98
+ className: classes.closeButton
99
+ }, /*#__PURE__*/_react["default"].createElement(CustomDialogHeader.IconComponent, null)));
100
+ });
101
+ CustomDialogHeader.IconComponent = function CloseIcon() {
102
+ return /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "close");
103
+ };
104
+ var CustomDialog = exports.CustomDialog = (0, _withWidth["default"])({
91
105
  initialWidth: 'xl'
92
106
  })((0, _styles.withStyles)(customDialogStyle, {
93
107
  name: 'CustomDialog'
94
- })(function (_ref) {
95
- var className = _ref.className,
96
- classes = _ref.classes,
97
- width = _ref.width,
98
- dialogTitle = _ref.dialogTitle,
99
- onCancel = _ref.onCancel,
100
- children = _ref.children,
101
- fullScreen = _ref.fullScreen,
102
- props = _objectWithoutProperties(_ref, _excluded);
108
+ })(function (_ref2) {
109
+ var className = _ref2.className,
110
+ classes = _ref2.classes,
111
+ width = _ref2.width,
112
+ dialogTitle = _ref2.dialogTitle,
113
+ onCancel = _ref2.onCancel,
114
+ children = _ref2.children,
115
+ fullScreen = _ref2.fullScreen,
116
+ props = _objectWithoutProperties(_ref2, _excluded);
117
+ var open = props.open;
118
+ var _useDialogId = (0, _useDialogId2.useDialogId)(),
119
+ dialogTitleId = _useDialogId.dialogTitleId;
103
120
  return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], _extends({
104
121
  maxWidth: width === 'md' || width === 'lg' || width === 'xl' ? 'md' : 'sm',
105
122
  fullWidth: true,
@@ -108,11 +125,15 @@ var _default = exports["default"] = (0, _withWidth["default"])({
108
125
  root: classes.MuiStyledDialog
109
126
  },
110
127
  className: className + ' ' + (width === 'xs' ? classes.stickyDialog : ''),
111
- fullScreen: fullScreen
112
- }, props), /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
113
- id: "alert-dialog-title"
114
- }, dialogTitle, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
115
- className: classes.closeIcon,
116
- onClick: onCancel
117
- }, "close")), children);
118
- }));
128
+ fullScreen: fullScreen,
129
+ "aria-labelledby": dialogTitleId
130
+ }, props), /*#__PURE__*/_react["default"].createElement(CustomDialog.DialogHeaderComponent, {
131
+ dialogTitle: dialogTitle,
132
+ dialogTitleId: dialogTitleId,
133
+ onClose: onCancel
134
+ }), /*#__PURE__*/_react["default"].createElement(_AutoFocusDialogContentContainer["default"], {
135
+ open: open
136
+ }, children));
137
+ }));
138
+ CustomDialog.DialogHeaderComponent = CustomDialogHeader;
139
+ var _default = exports["default"] = CustomDialog;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.49.9",
3
+ "version": "1.50.0",
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.49.9",
9
+ "@configuratorware/scripts": "1.50.0",
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.49.9",
40
- "redhotmagma-visualization": "1.49.9",
39
+ "redhotmagma-graphics-editor": "1.50.0",
40
+ "redhotmagma-visualization": "1.50.0",
41
41
  "redux": "^4.1.0",
42
42
  "redux-logger": "^3.0.6",
43
43
  "redux-persist": "^5.10.0",
package/public/invoke.js CHANGED
@@ -2,7 +2,7 @@ var clientParam = new URL(window.location.href).searchParams.get("_client");
2
2
  var file = location.pathname.split("/").pop();
3
3
  var link = document.createElement("link");
4
4
 
5
- link.href = file.substr(0, file.lastIndexOf(".")) + "/dynamic_file/custom_css" + (typeof clientParam == 'string' ? "/" + clientParam : '');
5
+ link.href = file.substr(0, file.lastIndexOf(".")) + "/frontendapi/dynamic_file/custom_css" + (typeof clientParam == 'string' ? "/" + clientParam : '');
6
6
  link.type = "text/css";
7
7
  link.rel = "stylesheet";
8
8
  link.media = "screen,print";
@@ -349,7 +349,8 @@
349
349
  "title": "Oooops!",
350
350
  "errorTexts": {
351
351
  "first": "Wir haben uns verkonfiguriert...",
352
- "second": "Leider ist ein Fehler aufgetreten."
352
+ "second": "Leider ist ein Fehler aufgetreten.",
353
+ "404": "Die angeforderte Ressource konnte nicht gefunden werden."
353
354
  },
354
355
  "reloadButton": "Seite neu laden"
355
356
  },
@@ -340,7 +340,8 @@
340
340
  "title": "Oooops!",
341
341
  "errorTexts": {
342
342
  "first": "We messed something up...",
343
- "second": "Sorry, an error has occurred."
343
+ "second": "Sorry, an error has occurred.",
344
+ "404": "The requested ressource could not be found on the server."
344
345
  },
345
346
  "reloadButton": "Reload page"
346
347
  },
@@ -45,7 +45,12 @@ function cpDirDeep(src, dst, testFn) {
45
45
  console.log('Copy file: ' + file + ' -> ' + tp);
46
46
  fs.createReadStream(file).pipe(fs.createWriteStream(tp));
47
47
  } else if (!fs.existsSync(tp)) {
48
- fs.mkdirSync(tp);
48
+ try {
49
+ fs.mkdirSync(tp);
50
+ } catch (e) {
51
+ console.log('Could not create directory:', tp);
52
+ console.log(e.message)
53
+ }
49
54
  }
50
55
  });
51
56
  }
@@ -1,34 +1,37 @@
1
1
  import React from 'react';
2
2
  import Typography from '@material-ui/core/Typography';
3
3
  import Button from '@material-ui/core/Button';
4
-
5
4
  import { T } from 'Framework/i18n';
6
-
7
5
  import './Style.scss';
6
+ import { store } from './../../Store';
8
7
 
9
- const ErrorPage = () => (
10
- <div className="error-wrapper">
11
- <div className="error-icon" />
8
+ const ErrorPage = () => {
9
+ const is404Error = store.getState().api.has404Error;
10
+ return (
11
+ <div className="error-wrapper">
12
+ <div className="error-icon" />
12
13
 
13
- <div>
14
- <Typography variant="h1" className="header">
15
- {T('errorPage.title')}
16
- </Typography>
17
- <Typography className="text">{T('errorPage.errorTexts.first')}</Typography>
18
- <Typography className="text">{T('errorPage.errorTexts.second')}</Typography>
19
- </div>
14
+ <div>
15
+ <Typography variant="h1" className="header">
16
+ {T('errorPage.title')}
17
+ </Typography>
18
+ <Typography className="text">{T('errorPage.errorTexts.first')}</Typography>
19
+ <Typography className="text">{T('errorPage.errorTexts.second')}</Typography>
20
+ {is404Error && <Typography className="text">{T('errorPage.errorTexts.404')}</Typography>}
21
+ </div>
20
22
 
21
- <Button
22
- variant="contained"
23
- color="secondary"
24
- className="button"
25
- onClick={() => {
26
- window.location.reload();
27
- }}
28
- >
29
- {T('errorPage.reloadButton')}
30
- </Button>
31
- </div>
32
- );
23
+ <Button
24
+ variant="contained"
25
+ color="secondary"
26
+ className="button"
27
+ onClick={() => {
28
+ window.location.reload();
29
+ }}
30
+ >
31
+ {T('errorPage.reloadButton')}
32
+ </Button>
33
+ </div>
34
+ );
35
+ };
33
36
 
34
37
  export default ErrorPage;
@@ -22,7 +22,7 @@ export const decorateOptionlistitem = memoize(OptionlistitemComponent =>
22
22
  return null;
23
23
  }
24
24
 
25
- return <OptionlistitemComponent {...props} OptionAmountComponent={null} />;
25
+ return <OptionlistitemComponent {...props} OptionAmountComponent={null} notAccessible />;
26
26
  })
27
27
  );
28
28
 
@@ -21,7 +21,7 @@ export const decorateOptionlistitem = memoize(OptionlistitemComponent =>
21
21
  return null;
22
22
  }
23
23
 
24
- return <OptionlistitemComponent {...props} OptionAmountComponent={null} />;
24
+ return <OptionlistitemComponent {...props} OptionAmountComponent={null} notAccessible />;
25
25
  })
26
26
  );
27
27
 
@@ -150,7 +150,6 @@ class Incompatibility extends React.Component {
150
150
  onClose={onClose}
151
151
  onCancel={onClose}
152
152
  className={classes.incompatibilityDialog}
153
- refValue={checkResults}
154
153
  >
155
154
  <DialogContent className={'incompatibility'}>{this.renderRules()}</DialogContent>
156
155
  {this.renderFooter()}
@@ -160,7 +159,7 @@ class Incompatibility extends React.Component {
160
159
  }
161
160
 
162
161
  Incompatibility.propTypes = {
163
- checkResults: PropTypes.func,
162
+ checkResults: PropTypes.object,
164
163
  ruleComponentProps: PropTypes.any,
165
164
  optionclassifications: PropTypes.array,
166
165
  classes: PropTypes.object,
@@ -2,13 +2,9 @@ import React, { Fragment, useEffect, useRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import useMediaQuery from '@material-ui/core/useMediaQuery';
4
4
  import { useTheme } from '@material-ui/core/styles';
5
- import Dialog from '@material-ui/core/Dialog';
6
- import DialogTitle from '@material-ui/core/DialogTitle';
7
5
  import DialogContent from '@material-ui/core/DialogContent';
8
6
  import DialogActions from '@material-ui/core/DialogActions';
9
- import IconButton from '@material-ui/core/IconButton';
10
7
  import Typography from '@material-ui/core/Typography';
11
- import CloseIcon from '@material-ui/icons/Close';
12
8
  import MainButton from 'Shared/Components/MainButton';
13
9
  import { makeStyles } from '@material-ui/core/styles';
14
10
  import List from '@material-ui/core/List';
@@ -16,25 +12,13 @@ import ListItem from '@material-ui/core/ListItem';
16
12
  import ListItemText from '@material-ui/core/ListItemText';
17
13
  import Divider from '@material-ui/core/Divider';
18
14
  import { T } from 'Framework/i18n';
15
+ import CustomDialog from '../../../../../Shared/Components/CustomDialog';
19
16
 
20
17
  const useStyles = makeStyles(
21
18
  theme => ({
22
19
  root: {
23
20
  borderTop: `7px solid ${theme.palette.primary.main}`,
24
21
  },
25
- titleRoot: {
26
- margin: 0,
27
- padding: theme.spacing(2),
28
- },
29
- title: {
30
- marginRight: 40,
31
- },
32
- closeButton: {
33
- position: 'absolute',
34
- right: theme.spacing(1),
35
- top: theme.spacing(1),
36
- color: theme.palette.grey[500],
37
- },
38
22
  contentRoot: {
39
23
  padding: theme.spacing(2),
40
24
  },
@@ -61,15 +45,14 @@ const InvalidConfigurationNotice = ({ validationErrors, show, close, open, admin
61
45
  }, [open, validationErrors, adminMode, initialRender]);
62
46
 
63
47
  return (
64
- <Dialog fullScreen={fullScreen} open={show} classes={{ paper: classes.root }}>
65
- <DialogTitle disableTypography className={classes.titleRoot}>
66
- <Typography variant={'h5'} className={classes.title}>
67
- {T('invalidConfigurationNotice.title')}
68
- </Typography>
69
- <IconButton aria-label="close" className={classes.closeButton} onClick={close}>
70
- <CloseIcon />
71
- </IconButton>
72
- </DialogTitle>
48
+ <CustomDialog
49
+ fullScreen={fullScreen}
50
+ classes={{ paper: classes.root }}
51
+ open={show}
52
+ onClose={close}
53
+ onCancel={close}
54
+ dialogTitle={T('invalidConfigurationNotice.title')}
55
+ >
73
56
  <DialogContent className={classes.contentRoot}>
74
57
  <List>
75
58
  {validationErrors.map(({ title, errors }, index) => (
@@ -111,7 +94,7 @@ const InvalidConfigurationNotice = ({ validationErrors, show, close, open, admin
111
94
  OK
112
95
  </MainButton>
113
96
  </DialogActions>
114
- </Dialog>
97
+ </CustomDialog>
115
98
  );
116
99
  };
117
100