@configuratorware/configurator-admingui 1.36.0-beta.0 → 1.36.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.
Files changed (61) hide show
  1. package/App/Config/defaultConfig.js +3 -0
  2. package/App/Data.js +12 -1
  3. package/App/Reducers/Common/OrderList/Actions.js +3 -1
  4. package/App/Translations.js +4 -2
  5. package/Components/FormFragments/MonacoEditor.js +1 -1
  6. package/Screens/Client/Containers/Edit.js +2 -1
  7. package/Screens/Client/Translations.js +4 -2
  8. package/Screens/CurrentClient/Containers/Edit.js +2 -1
  9. package/Screens/DefaultClient/Containers/Edit.js +2 -1
  10. package/Screens/DesignProductionMethods/Containers/Edit.js +1 -0
  11. package/Screens/Designer/Components/TemplateList.js +1 -1
  12. package/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +13 -1
  13. package/Screens/Designer/SubScreens/DesignAreas/Reducers/Actions.js +7 -1
  14. package/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +3 -0
  15. package/Screens/Designer/SubScreens/Designviews/Reducers/Actions.js +20 -7
  16. package/Screens/Designer/Translations.js +3 -1
  17. package/Screens/Font/Reducers/Actions.js +15 -7
  18. package/Screens/Font/Reducers/Reducer.js +1 -0
  19. package/Screens/Item/Containers/Edit.js +30 -0
  20. package/Screens/Item/Translations.js +2 -0
  21. package/Screens/Item/index.js +3 -1
  22. package/Screens/Itemclassification/Containers/Edit.js +65 -0
  23. package/Screens/Itemclassification/Containers/List.js +63 -0
  24. package/Screens/Itemclassification/Reducers/Actions.js +26 -0
  25. package/Screens/Itemclassification/Reducers/Reducer.js +67 -0
  26. package/Screens/Itemclassification/Screen.js +32 -0
  27. package/Screens/Itemclassification/Translations.js +21 -0
  28. package/Screens/Itemclassification/index.js +20 -0
  29. package/Screens/index.js +3 -0
  30. package/package.json +24 -18
  31. package/scripts/getDefaultWebpackConfig.js +11 -22
  32. package/src/App/Config/defaultConfig.js +13 -9
  33. package/src/App/Data.js +14 -0
  34. package/src/App/Reducers/Common/OrderList/Actions.js +1 -1
  35. package/src/App/Translations.js +2 -0
  36. package/src/Components/FormFragments/MonacoEditor.js +1 -1
  37. package/src/Screens/Client/Containers/Edit.js +2 -1
  38. package/src/Screens/Client/Translations.js +2 -0
  39. package/src/Screens/CurrentClient/Containers/Edit.js +2 -1
  40. package/src/Screens/DefaultClient/Containers/Edit.js +1 -0
  41. package/src/Screens/DesignProductionMethods/Containers/Edit.js +1 -0
  42. package/src/Screens/Designer/Components/TemplateList.js +1 -1
  43. package/src/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +15 -1
  44. package/src/Screens/Designer/SubScreens/DesignAreas/Reducers/Actions.js +2 -1
  45. package/src/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +1 -0
  46. package/src/Screens/Designer/SubScreens/Designviews/Reducers/Actions.js +12 -3
  47. package/src/Screens/Designer/Translations.js +2 -0
  48. package/src/Screens/Designer/__tests__/__snapshots__/FormProductionMethods.test.js.snap +38 -0
  49. package/src/Screens/Font/Reducers/Actions.js +16 -11
  50. package/src/Screens/Font/Reducers/Reducer.js +1 -1
  51. package/src/Screens/Item/Containers/Edit.js +23 -1
  52. package/src/Screens/Item/Translations.js +2 -0
  53. package/src/Screens/Item/index.js +2 -1
  54. package/src/Screens/Itemclassification/Containers/Edit.js +49 -0
  55. package/src/Screens/Itemclassification/Containers/List.js +64 -0
  56. package/src/Screens/Itemclassification/Reducers/Actions.js +17 -0
  57. package/src/Screens/Itemclassification/Reducers/Reducer.js +43 -0
  58. package/src/Screens/Itemclassification/Screen.js +19 -0
  59. package/src/Screens/Itemclassification/Translations.js +22 -0
  60. package/src/Screens/Itemclassification/index.js +9 -0
  61. package/src/Screens/index.js +3 -1
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.itemClassificationData = void 0;
7
+
8
+ var _Actions = require("./Actions");
9
+
10
+ var _Reducer = require("../../../App/Reducers/Entity/Reducer");
11
+
12
+ var _FeatureReducers = require("../../../App/FeatureReducers");
13
+
14
+ var _Reducer2 = _interopRequireDefault(require("../../Item/DataStructures/Attributes/Reducer"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
19
+
20
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
21
+
22
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
+
24
+ var initialState = _objectSpread({}, (0, _Reducer.getDefaultEntityState)(_objectSpread({
25
+ id: null,
26
+ identifier: {
27
+ value: '',
28
+ constraints: {
29
+ identifier: true
30
+ }
31
+ },
32
+ sequencenumber: {
33
+ value: null,
34
+ constraints: {
35
+ numericality: {
36
+ strict: true,
37
+ onlyInteger: true
38
+ }
39
+ }
40
+ },
41
+ texts: [],
42
+ minimumOrderAmount: {
43
+ value: null,
44
+ constraints: {
45
+ numericality: {
46
+ strict: true,
47
+ onlyInteger: true
48
+ }
49
+ }
50
+ }
51
+ }, _Reducer2["default"]), {
52
+ source: 'itemclassifications',
53
+ dependencies: [{
54
+ name: 'itemclassifications',
55
+ dataKey: 'parent_itemclassifications',
56
+ source: 'itemclassifications'
57
+ }]
58
+ }, _Actions.ITEMCLASSIFICATION_DATA_KEY));
59
+
60
+ var itemClassificationData = (0, _FeatureReducers.createFeatureReducer)(_Actions.ITEMCLASSIFICATION_REDUCER_NAME, function () {
61
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
62
+ var action = arguments.length > 1 ? arguments[1] : undefined;
63
+ return (0, _Reducer.defaultEntityReducer)(state, action, initialState);
64
+ });
65
+ exports.itemClassificationData = itemClassificationData;
66
+ var _default = itemClassificationData;
67
+ exports["default"] = _default;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _Actions = _interopRequireWildcard(require("./Reducers/Actions"));
11
+
12
+ var _List = _interopRequireDefault(require("./Containers/List"));
13
+
14
+ var _Edit = _interopRequireDefault(require("./Containers/Edit"));
15
+
16
+ require("./Translations");
17
+
18
+ var _DefaultConnectedScreen = require("../../Components/DefaultConnectedScreen");
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ var invalidateList = _Actions["default"].invalidateList,
27
+ triggerUnsavedEntity = _Actions["default"].triggerUnsavedEntity,
28
+ hideDetails = _Actions["default"].hideDetails;
29
+
30
+ var _default = (0, _DefaultConnectedScreen.generateConnectedSplitScreen)('item_classifications', _List["default"], _Edit["default"], _Actions.ITEMCLASSIFICATION_REDUCER_NAME, invalidateList, triggerUnsavedEntity, hideDetails);
31
+
32
+ exports["default"] = _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ require("../../App/i18n").use({
4
+ en: {
5
+ itemclassifications: {
6
+ addButtonLabel: 'Add Product category',
7
+ menuLabel: 'Product Categories'
8
+ },
9
+ item_classifications: 'Product categories',
10
+ 'Minimum order amount': 'Minimum order amount'
11
+ },
12
+ de: {
13
+ itemclassifications: {
14
+ addButtonLabel: 'Produktkategorie hinzufügen',
15
+ menuLabel: 'Produktkategorien'
16
+ },
17
+ 'Sequence number': 'Reihenfolge',
18
+ item_classifications: 'Produktkategorien',
19
+ 'Minimum order amount': 'Mindestbestellmenge'
20
+ }
21
+ }, true);
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _Screen = _interopRequireDefault(require("./Screen"));
9
+
10
+ var _Reducer = _interopRequireDefault(require("./Reducers/Reducer"));
11
+
12
+ var _FeatureReducers = require("../../App/FeatureReducers");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ (0, _FeatureReducers.addReducers)(_Reducer["default"]);
17
+ var _default = {
18
+ Screen: _Screen["default"]
19
+ };
20
+ exports["default"] = _default;
package/Screens/index.js CHANGED
@@ -70,6 +70,8 @@ var _TrackingCodes = _interopRequireDefault(require("./TrackingCodes"));
70
70
 
71
71
  var _User = _interopRequireDefault(require("./User"));
72
72
 
73
+ var _Itemclassification = _interopRequireDefault(require("./Itemclassification"));
74
+
73
75
  var _Finder = _interopRequireDefault(require("./Finder"));
74
76
 
75
77
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -90,6 +92,7 @@ var features = {
90
92
  designer: _Designer["default"],
91
93
  design_production_methods: _DesignProductionMethods["default"],
92
94
  items: _Item["default"],
95
+ item_classifications: _Itemclassification["default"],
93
96
  licenses: _Screen2["default"],
94
97
  options: _Option["default"],
95
98
  option_classifications: _Optionclassification["default"],
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-admingui",
3
- "version": "1.36.0-beta.0",
3
+ "version": "1.36.1",
4
4
  "license": "UNLICENSED",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@babel/polyfill": "^7.12.1",
8
- "@hot-loader/react-dom": "^17.0.2",
8
+ "@hot-loader/react-dom": "^16.14.0",
9
9
  "@material-ui/core": "^3.9.4",
10
10
  "@material-ui/icons": "^3.0.2",
11
11
  "@tweenjs/tween.js": "^17.6.0",
@@ -15,21 +15,21 @@
15
15
  "css-element-queries": "^1.2.3",
16
16
  "downshift": "^3.4.8",
17
17
  "lodash": "^4.17.21",
18
- "monaco-editor": "^0.33.0",
19
- "monaco-editor-webpack-plugin": "^7.0.1",
18
+ "monaco-editor": "^0.20.0",
19
+ "monaco-editor-webpack-plugin": "^1.9.1",
20
20
  "prop-types": "^15.7.2",
21
21
  "qs": "^6.10.1",
22
- "react": "^17.0.2",
23
- "react-dom": "^17.0.2",
24
- "react-file-drop": "^3.1.5",
22
+ "react": "^16.14.0",
23
+ "react-dom": "^16.14.0",
24
+ "react-file-drop": "^0.2.8",
25
25
  "react-hot-loader": "^4.13.0",
26
26
  "react-i18nify": "^1.11.18",
27
27
  "react-mde": "^11.5.0",
28
28
  "react-redux": "^7.2.4",
29
29
  "react-redux-i18n": "^1.9.3",
30
30
  "react-router": "^3.2.6",
31
- "react-sortable-hoc": "^2.0.0",
32
- "redhotmagma-visualization": "1.36.0-beta.0",
31
+ "react-sortable-hoc": "^1.11.0",
32
+ "redhotmagma-visualization": "1.36.1",
33
33
  "redux": "^4.1.0",
34
34
  "redux-logger": "^3.0.6",
35
35
  "redux-persist": "^5.10.0",
@@ -39,17 +39,23 @@
39
39
  "validate.js": "^0.12.0"
40
40
  },
41
41
  "peerDependencies": {
42
+ "@babel/cli": "^7.2.3",
43
+ "@babel/core": "^7.2.2",
44
+ "@babel/plugin-proposal-class-properties": "^7.2.3",
45
+ "@babel/plugin-syntax-dynamic-import": "^7.2.0",
46
+ "@babel/preset-env": "^7.2.3",
47
+ "@babel/preset-react": "^7.0.0",
42
48
  "babel-loader": "^8.0.5",
43
- "css-loader": "^5.2.7",
44
- "css-minimizer-webpack-plugin": "^4.0.0",
45
- "file-loader": "^6.2.0",
46
- "mini-css-extract-plugin": "^2.1.0",
49
+ "babel-plugin-module-resolver": "^4.1.0",
50
+ "css-loader": "^2.1.0",
51
+ "file-loader": "^3.0.1",
52
+ "mini-css-extract-plugin": "^0.5.0",
53
+ "node-sass": "^4.11.0",
47
54
  "optimize-css-assets-webpack-plugin": "^5.0.1",
48
- "sass": "^1.53.0",
49
- "sass-loader": "^13.0.2",
50
- "style-loader": "^2.0.0",
51
- "terser-webpack-plugin": "^5.1.4",
52
- "url-loader": "^4.1.1"
55
+ "sass-loader": "^7.1.0",
56
+ "style-loader": "^0.23.1",
57
+ "terser-webpack-plugin": "^1.2.1",
58
+ "url-loader": "^1.1.2"
53
59
  },
54
60
  "scripts": {
55
61
  "copy-public": "node ./scripts/cpFavicon.js",
@@ -23,19 +23,11 @@ const moduleRules = [
23
23
  },
24
24
  {
25
25
  test: /\.(png|jpg|gif|svg)$/,
26
- loader: 'url-loader',
27
- options: {
28
- limit: 16384,
29
- name: 'images/[name].[hash].[ext]',
30
- },
26
+ loader: 'url-loader?limit=16384&name=images/[name].[hash].[ext]',
31
27
  },
32
28
  {
33
29
  test: /\.ttf$/,
34
- loader: 'url-loader',
35
- options: {
36
- limit: 16384,
37
- name: 'fonts/[name].[hash].[ext]',
38
- },
30
+ loader: 'url-loader?limit=16384&name=fonts/[name].[hash].[ext]',
39
31
  },
40
32
  ];
41
33
 
@@ -73,7 +65,7 @@ function getDevConfig(dirname, options = {}) {
73
65
  filename: 'bundle.js',
74
66
  publicPath: '/',
75
67
  },
76
- devtool: 'eval-cheap-module-source-map',
68
+ devtool: 'cheap-module-eval-source-map',
77
69
  devServer: {
78
70
  hot: true,
79
71
  contentBase: BUILD_DIR,
@@ -112,10 +104,7 @@ function getDevConfig(dirname, options = {}) {
112
104
  'react/lib/ExecutionEnvironment': true,
113
105
  'react/lib/ReactContext': true,
114
106
  },
115
- optimization: {
116
- moduleIds: 'named',
117
- },
118
- plugins: [new webpack.HotModuleReplacementPlugin(), monaco],
107
+ plugins: [new webpack.HotModuleReplacementPlugin(), new webpack.NamedModulesPlugin(), monaco],
119
108
  };
120
109
  }
121
110
 
@@ -123,17 +112,17 @@ function importPluginsForBuild() {
123
112
  try {
124
113
  const TerserPlugin = require('terser-webpack-plugin');
125
114
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
126
- const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
115
+ const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
127
116
  return {
128
117
  TerserPlugin,
129
118
  MiniCssExtractPlugin,
130
- CssMinimizerPlugin,
119
+ OptimizeCSSAssetsPlugin,
131
120
  };
132
121
  } catch (e) {
133
122
  const packages = [
134
123
  'terser-webpack-plugin',
135
124
  'mini-css-extract-plugin',
136
- 'css-minimizer-webpack-plugin',
125
+ 'optimize-css-assets-webpack-plugin',
137
126
  ];
138
127
  console.error(
139
128
  'To use the build script, please install the following packages: ' + packages.join(', ')
@@ -146,14 +135,14 @@ function getProdConfig(dirname) {
146
135
  const BUILD_DIR = path.resolve(dirname, 'public');
147
136
  const APP_DIR = path.resolve(dirname, 'src');
148
137
 
149
- const { TerserPlugin, MiniCssExtractPlugin, CssMinimizerPlugin } = importPluginsForBuild();
138
+ const { TerserPlugin, MiniCssExtractPlugin, OptimizeCSSAssetsPlugin } = importPluginsForBuild();
150
139
 
151
140
  const extractSass = new MiniCssExtractPlugin({
152
141
  filename: 'bundle.css',
153
142
  chunkFilename: 'bundle.[name].css',
154
143
  });
155
144
 
156
- const optimizeCss = new CssMinimizerPlugin();
145
+ const optimizeCss = new OptimizeCSSAssetsPlugin({});
157
146
 
158
147
  const minimizer = new TerserPlugin({
159
148
  extractComments: true,
@@ -199,9 +188,9 @@ function getProdConfig(dirname) {
199
188
  ],
200
189
  noParse: moduleNoParse,
201
190
  },
202
- plugins: [env, extractSass, monaco],
191
+ plugins: [env, extractSass, optimizeCss, monaco],
203
192
  optimization: {
204
- minimizer: [minimizer, optimizeCss],
193
+ minimizer: [minimizer],
205
194
  },
206
195
  };
207
196
  }
@@ -27,6 +27,10 @@ export default {
27
27
  {
28
28
  name: 'group_entries',
29
29
  },
30
+ {
31
+ name: 'item_classifications',
32
+ label: 'itemclassifications.menuLabel',
33
+ },
30
34
  ],
31
35
  },
32
36
  {
@@ -95,15 +99,15 @@ export default {
95
99
  ],
96
100
  },
97
101
  {
98
- name: 'finderitems',
99
- label: 'finder',
100
- credentials: ['question_trees'],
101
- items: [
102
- {
103
- name: 'finder',
104
- label: 'question_trees',
105
- },
106
- ]
102
+ name: 'finderitems',
103
+ label: 'finder',
104
+ credentials: ['question_trees'],
105
+ items: [
106
+ {
107
+ name: 'finder',
108
+ label: 'question_trees',
109
+ },
110
+ ],
107
111
  },
108
112
  {
109
113
  name: 'configurations',
package/src/App/Data.js CHANGED
@@ -3,6 +3,8 @@ import { validate } from 'validate.js';
3
3
  import isArray from 'lodash/isArray';
4
4
  import { t } from './i18n';
5
5
 
6
+ export const whiteSpacePattern = /^[\S]+$/;
7
+
6
8
  validate.validators.nonEmptyArray = function(value, options) {
7
9
  if (options && options === true && isArray(value) && value.length !== 0) {
8
10
  return null;
@@ -67,6 +69,18 @@ validate.validators.color = function(value, options) {
67
69
  return true;
68
70
  };
69
71
 
72
+ validate.validators.noWhitespace = function(value, options) {
73
+ if (
74
+ options === true &&
75
+ typeof value === 'string' &&
76
+ value.match(whiteSpacePattern) &&
77
+ value.match(whiteSpacePattern)[0] === value
78
+ ) {
79
+ return null;
80
+ }
81
+ return t('customValidators.noWhitespace');
82
+ }
83
+
70
84
  export default class Data {
71
85
  static EventTypes = {
72
86
  init: 'init',
@@ -13,7 +13,7 @@ export const loadList = dispatch => (url, entity, orderSequenceNumber, filters =
13
13
  dispatch(setDataField(dataField));
14
14
  return dispatchFetchData(dispatch)(COMPONENT_KEY, {
15
15
  url,
16
- params: { orderby: `${entity}.${orderSequenceNumber}`, filters: { ...filters } },
16
+ params: { orderby: `${entity}.${orderSequenceNumber}`, filters: { ...filters }, offset: 0, limit: 1000 },
17
17
  });
18
18
  };
19
19
 
@@ -65,6 +65,7 @@ require('./i18n').use(
65
65
  'Identifiers should only contain lowercase letters, numbers, underscores, periods and dashes.',
66
66
  blankError: "Can't be blank",
67
67
  decimalPoint: 'Please use dot (".") as decimal separator',
68
+ noWhitespace: "Name should not contain whitespaces.",
68
69
  },
69
70
  callToActionDefault: {
70
71
  addToCart: 'Use default setting (Add to cart)',
@@ -160,6 +161,7 @@ require('./i18n').use(
160
161
  'Der Identifier darf nur aus Kleinbuchstaben, Zahlen, Unterstrichen, Punkten und Bindestrichen bestehen.',
161
162
  blankError: 'Kann nicht leer sein',
162
163
  decimalPoint: 'Bitte Punkt (".") als Dezimaltrennzeichen verwenden',
164
+ noWhitespace: "Name darf keine Leerzeichen enthalten.",
163
165
  },
164
166
  callToActionDefault: {
165
167
  addToCart: 'Default (In den Warenkorb)',
@@ -27,7 +27,7 @@ const MonacoEditor = withStyles({
27
27
  useEffect(() => {
28
28
  let editor;
29
29
  import('monaco-editor/esm/vs/editor/editor.api')
30
- .then((monaco) => {
30
+ .then(() => {
31
31
  if (ref.current) {
32
32
  editor = monaco.editor.create(ref.current, {
33
33
  value,
@@ -2,7 +2,7 @@ import Actions, { REDUCER_NAME } from '../Reducers/Actions';
2
2
  import SimpleNestedData from '../../../Components/FormFragments/SimpleNestedData';
3
3
  import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
4
4
  import ColorTextField from '../Components/ColorTextField';
5
- import { t } from '../../../App/i18n';
5
+ import { T, t } from '../../../App/i18n';
6
6
  import React from 'react';
7
7
  import { CallToActionField } from '../../../Components/CallToActionField';
8
8
  import { PdfMarkDownField } from '../Components/PdfMarkdownField';
@@ -54,6 +54,7 @@ const formFields = [
54
54
  accept: '.ttf',
55
55
  showFileName: true,
56
56
  deleteEnabled: true,
57
+ warningMessage: T('clientFontMessage')
57
58
  },
58
59
  {
59
60
  name: 'logo',
@@ -16,6 +16,7 @@ require('../../App/i18n').use(
16
16
  headerInfo: 'Please check your changes in a generated pdf to make sure it looks as expected',
17
17
  footerInfo: 'Please check your changes in a generated pdf to make sure it looks as expected',
18
18
  emailHint: 'separate multiple addresses with a semicolon',
19
+ clientFontMessage: 'For the font to be rendered correctly in the configuratorware frontend, make sure the filename does not contain any spaces and matches the fonts internal name.'
19
20
  },
20
21
  de: {
21
22
  clients: 'Klienten',
@@ -46,6 +47,7 @@ require('../../App/i18n').use(
46
47
  headerInfo: 'Bitte überprüfe Deine Änderungen in einem generierten PDF',
47
48
  footerInfo: 'Bitte überprüfe Deine Änderungen in einem generierten PDF',
48
49
  emailHint: 'trenne mehrere Adressen mit einem Semikolon',
50
+ clientFontMessage: 'Für eine korrekte Darstellung der Schrift im configuratorware Fronted darf der Dateiname keine Leerzeichen enthalten und muss dem internen Namen der Schriftart entsprechen.'
49
51
  },
50
52
  },
51
53
  true
@@ -2,7 +2,7 @@ import Actions, { REDUCER_NAME } from '../Reducers/Actions';
2
2
  import SimpleNestedData from '../../../Components/FormFragments/SimpleNestedData';
3
3
  import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
4
4
  import { withLoadAction } from '../../../Components/withLoadAction';
5
- import { t } from '../../../App/i18n';
5
+ import {T, t } from '../../../App/i18n';
6
6
  import { CallToActionField } from '../../../Components/CallToActionField';
7
7
  import PdfMarkDownField from '../../Client/Components/PdfMarkdownField';
8
8
 
@@ -23,6 +23,7 @@ const formFields = [
23
23
  accept: '.ttf',
24
24
  showFileName: true,
25
25
  deleteEnabled: true,
26
+ warningMessage: T('clientFontMessage')
26
27
  },
27
28
  {
28
29
  name: 'logo',
@@ -22,6 +22,7 @@ const formFields = [
22
22
  accept: '.ttf',
23
23
  showFileName: true,
24
24
  deleteEnabled: true,
25
+ warningMessage: T('clientFontMessage')
25
26
  },
26
27
  {
27
28
  name: 'logo',
@@ -79,6 +79,7 @@ const formFields = [
79
79
  type: 'chip',
80
80
  listKey: 'colorpalettes_autocomplete',
81
81
  url: 'colorpalettes',
82
+ maxSearchResults: 1000,
82
83
  mapItems: (item, idx, collection, locale) => {
83
84
  return {
84
85
  ...item,
@@ -114,7 +114,7 @@ export default class TemplateList extends Component {
114
114
 
115
115
  onSearchChange = delay(data => {
116
116
  _.isFunction(this.props.onSearchChange) && this.props.onSearchChange(data);
117
- });
117
+ }, 500);
118
118
 
119
119
  renderAddItemButton = () => this.props.onAddItem && <AddItemButton onClick={this.props.onAddItem} />;
120
120
 
@@ -121,7 +121,7 @@ class FormProductionMethods extends React.Component {
121
121
  let { value } = e.target;
122
122
  const nextData = {};
123
123
 
124
- if (key === 'allowBulkNames' || key === 'isDefault' || key === 'designElementsLocked') {
124
+ if (key === 'allowBulkNames' || key === 'isDefault' || key === 'designElementsLocked' || key === 'oneLineText') {
125
125
  value = e.target.checked;
126
126
  }
127
127
 
@@ -893,6 +893,19 @@ class FormProductionMethods extends React.Component {
893
893
  label={t('designElementsLocked')}
894
894
  />
895
895
  </Grid>
896
+ <Grid item xs={12} className={classes.checkboxGrid}>
897
+ <FormControlLabel
898
+ control={
899
+ <Checkbox
900
+ checked={productionMethod.oneLineText}
901
+ onChange={this.onChange('oneLineText')}
902
+ value={'oneLineText'}
903
+ color="primary"
904
+ />
905
+ }
906
+ label={t('oneLineText')}
907
+ />
908
+ </Grid>
896
909
  <Grid item xs={12} className={classes.checkboxGrid}>
897
910
  <TextField
898
911
  label={t('minimumOrderAmount')}
@@ -903,6 +916,7 @@ class FormProductionMethods extends React.Component {
903
916
  {...this.getErrorProps('minimumOrderAmount')}
904
917
  />
905
918
  </Grid>
919
+
906
920
  <Grid item xs={12} className={classes.checkboxGrid}>
907
921
  <div className={classes.inputWithLabel}>
908
922
  <FormLabel component="legend"> {t('maxTextElements')} </FormLabel>
@@ -17,7 +17,8 @@ const listAction = params => (dispatch, getState) => {
17
17
  const { designerData } = getState();
18
18
  const id = designerData.data.id.value;
19
19
  const filters = (params && params.filters) || {};
20
- dispatch(DesignAreaActions.listAction({ ...params, filters: { ...filters, 'designarea.item.id': id } }));
20
+ const paramsWithLimit = {...params, offset: 0, limit: 1000}
21
+ dispatch(DesignAreaActions.listAction({ ...paramsWithLimit, filters: { ...filters, 'designarea.item.id': id } }));
21
22
  };
22
23
  const invalidateList = () => (dispatch, getState) => {
23
24
  const { entity } = getState();
@@ -70,6 +70,7 @@ const initialState = {
70
70
  numericOrEmpty: { strict: true, onlyInteger: true, greaterThanOrEqualTo: 1 },
71
71
  },
72
72
  },
73
+ oneLineText: { value: false },
73
74
  mask: { value: {} },
74
75
  calculationTypes: {
75
76
  value: [],
@@ -19,6 +19,13 @@ import {
19
19
  } from '../../../../../App/Reducers/Entity/Actions';
20
20
  import { dispatchPostData } from '../../../../../App/Reducers/Api/Helpers';
21
21
 
22
+ const renameFile = (originalFile, newName) => {
23
+ return new File([originalFile], newName, {
24
+ type: originalFile.type,
25
+ lastModified: originalFile.lastModified,
26
+ });
27
+ };
28
+
22
29
  const beforeApiStateHandler = apiAction => (dispatch, getState) => {
23
30
  return new Promise(resolve => {
24
31
  const state = getState()[REDUCER_NAME];
@@ -31,8 +38,9 @@ const beforeApiStateHandler = apiAction => (dispatch, getState) => {
31
38
  return Promise.all(
32
39
  keys.map(async key => {
33
40
  const { file, type, id } = viewImages[key];
41
+ const renamedFile = renameFile(file, file.name.replace(/\s/g, ''));
34
42
  const files = new FormData();
35
- files.append('file', file);
43
+ files.append('file', renamedFile);
36
44
  //const itemId = get(state, 'source.item.id');
37
45
  const url = `/designviews/${apiAction.data.id}/${type}/upload/detail_image/${id}`;
38
46
  const result = await dispatchPostData(dispatch)(`designview/images/${key}`, url, files);
@@ -89,14 +97,15 @@ const listAction = params => (dispatch, getState) => {
89
97
  const { designerData } = getState();
90
98
  const id = designerData.data.id.value;
91
99
  const filters = (params && params.filters) || {};
100
+ const paramsWithLimit = {...params, offset: 0, limit: 1000}
92
101
 
93
102
  if (isCreatorDesignerModeWith2DVisualization(designerData)) {
94
103
  dispatch(
95
- CreatorViewActions.listAction({ ...params, filters: { ...filters, 'creatorview.item.id': id } })
104
+ CreatorViewActions.listAction({ ...paramsWithLimit, filters: { ...filters, 'creatorview.item.id': id } })
96
105
  );
97
106
  } else {
98
107
  dispatch(
99
- DesignViewActions.listAction({ ...params, filters: { ...filters, 'designview.item.id': id } })
108
+ DesignViewActions.listAction({ ...paramsWithLimit, filters: { ...filters, 'designview.item.id': id } })
100
109
  );
101
110
  }
102
111
  };
@@ -7,6 +7,7 @@ require('../../App/i18n').use(
7
7
  visualMaintenance: 'Visual maintenance',
8
8
  pleaseUseVisualMaintanance: 'please use visual maintanance',
9
9
  modeChangeConfirm: 'The views and visual maintanance data will be lost. Do you want to proceed?',
10
+ oneLineText: 'Restrict textinput to one line',
10
11
  designDataTransfer: {
11
12
  buttonUseAsTemplate: 'Use as template',
12
13
  dialogTitle: 'Transfer of design settings',
@@ -47,6 +48,7 @@ require('../../App/i18n').use(
47
48
  itemStatus: 'Status',
48
49
  },
49
50
  Hint: 'Hinweis',
51
+ oneLineText: 'Texteingabe auf eine Zeile beschränken',
50
52
  },
51
53
  },
52
54
  true