@configuratorware/configurator-admingui 1.35.2 → 1.36.0-beta.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.
package/App/Main.js CHANGED
@@ -287,7 +287,7 @@ var Main = /*#__PURE__*/function (_Component) {
287
287
  });
288
288
 
289
289
  var credentials = this.props.credentials;
290
- var showLicenseError = !this.props.license || ['creator', 'designer', 'creator+designer'].indexOf(this.props.license) < 0;
290
+ var showLicenseError = !this.props.license || ['creator', 'designer', 'creator+designer', 'finder'].indexOf(this.props.license) === -1;
291
291
  return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_AppBar["default"], {
292
292
  title: (0, _i18n.T)('header.title'),
293
293
  licenseInfo: /*#__PURE__*/_react["default"].createElement(_LicenseInfo["default"], {
@@ -15,7 +15,8 @@ require("./i18n").use({
15
15
  infoUrl: 'https://www.configuratorware.com/eula',
16
16
  creator_designer: 'creator and designer',
17
17
  creator: 'creator',
18
- designer: 'designer'
18
+ designer: 'designer',
19
+ finder: 'finder'
19
20
  },
20
21
  // MENUPOINTS
21
22
  users: 'Users',
@@ -81,7 +82,8 @@ require("./i18n").use({
81
82
  infoUrl: 'https://www.configuratorware.de/eula',
82
83
  creator_designer: 'creator und designer',
83
84
  creator: 'creator',
84
- designer: 'designer'
85
+ designer: 'designer',
86
+ finder: 'finder'
85
87
  },
86
88
  // MENUPOINTS
87
89
  users: 'Benutzer',
@@ -73,7 +73,7 @@ var MonacoEditor = (0, _withStyles["default"])({
73
73
  var editor;
74
74
  Promise.resolve().then(function () {
75
75
  return _interopRequireWildcard(require('monaco-editor/esm/vs/editor/editor.api'));
76
- }).then(function () {
76
+ }).then(function (monaco) {
77
77
  if (ref.current) {
78
78
  editor = monaco.editor.create(ref.current, {
79
79
  value: value,
@@ -25,12 +25,6 @@ var initialState = _objectSpread({}, (0, _Reducer.getDefaultEntityState)({
25
25
  identifier: true
26
26
  }
27
27
  },
28
- email: {
29
- value: '',
30
- constraints: {
31
- presence: true
32
- }
33
- },
34
28
  users: {
35
29
  value: [],
36
30
  schema: {
@@ -62,6 +62,7 @@ var License = function License(props) {
62
62
 
63
63
  var isCreator = uploadedLicense === null && (license === 'creator' || license === 'creator+designer') || uploadedLicense === 'creator' || uploadedLicense === 'creator+designer';
64
64
  var isDesigner = uploadedLicense === null && (license === 'designer' || license === 'creator+designer') || uploadedLicense === 'designer' || uploadedLicense === 'creator+designer';
65
+ var isFinder = uploadedLicense === null && license && license.indexOf('finder') !== -1 || uploadedLicense && uploadedLicense.indexOf('finder') !== -1;
65
66
  var styles = {
66
67
  success: {
67
68
  color: 'green'
@@ -104,7 +105,12 @@ var License = function License(props) {
104
105
  }, /*#__PURE__*/_react["default"].createElement(_core.Typography, {
105
106
  className: "label",
106
107
  variant: "body1"
107
- }, (0, _i18n.T)('license.designer')), /*#__PURE__*/_react["default"].createElement(_core.IconButton, null, isDesigner ? /*#__PURE__*/_react["default"].createElement(_CheckmarkIcon["default"], null) : /*#__PURE__*/_react["default"].createElement(_Cancel["default"], null)))));
108
+ }, (0, _i18n.T)('license.designer')), /*#__PURE__*/_react["default"].createElement(_core.IconButton, null, isDesigner ? /*#__PURE__*/_react["default"].createElement(_CheckmarkIcon["default"], null) : /*#__PURE__*/_react["default"].createElement(_Cancel["default"], null))), /*#__PURE__*/_react["default"].createElement("div", {
109
+ className: isFinder ? 'row success' : 'row invalid'
110
+ }, /*#__PURE__*/_react["default"].createElement(_core.Typography, {
111
+ className: "label",
112
+ variant: "body1"
113
+ }, (0, _i18n.T)('license.finder')), /*#__PURE__*/_react["default"].createElement(_core.IconButton, null, isFinder ? /*#__PURE__*/_react["default"].createElement(_CheckmarkIcon["default"], null) : /*#__PURE__*/_react["default"].createElement(_Cancel["default"], null)))));
108
114
  };
109
115
 
110
116
  var mapStateToProps = function mapStateToProps(state) {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-admingui",
3
- "version": "1.35.2",
3
+ "version": "1.36.0-beta.0",
4
4
  "license": "UNLICENSED",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@babel/polyfill": "^7.12.1",
8
- "@hot-loader/react-dom": "^16.14.0",
8
+ "@hot-loader/react-dom": "^17.0.2",
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.20.0",
19
- "monaco-editor-webpack-plugin": "^1.9.1",
18
+ "monaco-editor": "^0.33.0",
19
+ "monaco-editor-webpack-plugin": "^7.0.1",
20
20
  "prop-types": "^15.7.2",
21
21
  "qs": "^6.10.1",
22
- "react": "^16.14.0",
23
- "react-dom": "^16.14.0",
24
- "react-file-drop": "^0.2.8",
22
+ "react": "^17.0.2",
23
+ "react-dom": "^17.0.2",
24
+ "react-file-drop": "^3.1.5",
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": "^1.11.0",
32
- "redhotmagma-visualization": "1.35.2",
31
+ "react-sortable-hoc": "^2.0.0",
32
+ "redhotmagma-visualization": "1.36.0-beta.0",
33
33
  "redux": "^4.1.0",
34
34
  "redux-logger": "^3.0.6",
35
35
  "redux-persist": "^5.10.0",
@@ -39,23 +39,17 @@
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",
48
42
  "babel-loader": "^8.0.5",
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",
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",
54
47
  "optimize-css-assets-webpack-plugin": "^5.0.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"
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"
59
53
  },
60
54
  "scripts": {
61
55
  "copy-public": "node ./scripts/cpFavicon.js",
@@ -23,11 +23,19 @@ const moduleRules = [
23
23
  },
24
24
  {
25
25
  test: /\.(png|jpg|gif|svg)$/,
26
- loader: 'url-loader?limit=16384&name=images/[name].[hash].[ext]',
26
+ loader: 'url-loader',
27
+ options: {
28
+ limit: 16384,
29
+ name: 'images/[name].[hash].[ext]',
30
+ },
27
31
  },
28
32
  {
29
33
  test: /\.ttf$/,
30
- loader: 'url-loader?limit=16384&name=fonts/[name].[hash].[ext]',
34
+ loader: 'url-loader',
35
+ options: {
36
+ limit: 16384,
37
+ name: 'fonts/[name].[hash].[ext]',
38
+ },
31
39
  },
32
40
  ];
33
41
 
@@ -65,7 +73,7 @@ function getDevConfig(dirname, options = {}) {
65
73
  filename: 'bundle.js',
66
74
  publicPath: '/',
67
75
  },
68
- devtool: 'cheap-module-eval-source-map',
76
+ devtool: 'eval-cheap-module-source-map',
69
77
  devServer: {
70
78
  hot: true,
71
79
  contentBase: BUILD_DIR,
@@ -104,7 +112,10 @@ function getDevConfig(dirname, options = {}) {
104
112
  'react/lib/ExecutionEnvironment': true,
105
113
  'react/lib/ReactContext': true,
106
114
  },
107
- plugins: [new webpack.HotModuleReplacementPlugin(), new webpack.NamedModulesPlugin(), monaco],
115
+ optimization: {
116
+ moduleIds: 'named',
117
+ },
118
+ plugins: [new webpack.HotModuleReplacementPlugin(), monaco],
108
119
  };
109
120
  }
110
121
 
@@ -112,17 +123,17 @@ function importPluginsForBuild() {
112
123
  try {
113
124
  const TerserPlugin = require('terser-webpack-plugin');
114
125
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
115
- const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
126
+ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
116
127
  return {
117
128
  TerserPlugin,
118
129
  MiniCssExtractPlugin,
119
- OptimizeCSSAssetsPlugin,
130
+ CssMinimizerPlugin,
120
131
  };
121
132
  } catch (e) {
122
133
  const packages = [
123
134
  'terser-webpack-plugin',
124
135
  'mini-css-extract-plugin',
125
- 'optimize-css-assets-webpack-plugin',
136
+ 'css-minimizer-webpack-plugin',
126
137
  ];
127
138
  console.error(
128
139
  'To use the build script, please install the following packages: ' + packages.join(', ')
@@ -135,14 +146,14 @@ function getProdConfig(dirname) {
135
146
  const BUILD_DIR = path.resolve(dirname, 'public');
136
147
  const APP_DIR = path.resolve(dirname, 'src');
137
148
 
138
- const { TerserPlugin, MiniCssExtractPlugin, OptimizeCSSAssetsPlugin } = importPluginsForBuild();
149
+ const { TerserPlugin, MiniCssExtractPlugin, CssMinimizerPlugin } = importPluginsForBuild();
139
150
 
140
151
  const extractSass = new MiniCssExtractPlugin({
141
152
  filename: 'bundle.css',
142
153
  chunkFilename: 'bundle.[name].css',
143
154
  });
144
155
 
145
- const optimizeCss = new OptimizeCSSAssetsPlugin({});
156
+ const optimizeCss = new CssMinimizerPlugin();
146
157
 
147
158
  const minimizer = new TerserPlugin({
148
159
  extractComments: true,
@@ -188,9 +199,9 @@ function getProdConfig(dirname) {
188
199
  ],
189
200
  noParse: moduleNoParse,
190
201
  },
191
- plugins: [env, extractSass, optimizeCss, monaco],
202
+ plugins: [env, extractSass, monaco],
192
203
  optimization: {
193
- minimizer: [minimizer],
204
+ minimizer: [minimizer, optimizeCss],
194
205
  },
195
206
  };
196
207
  }
package/src/App/Main.js CHANGED
@@ -148,7 +148,7 @@ class Main extends Component {
148
148
  const { credentials } = this.props;
149
149
  const showLicenseError =
150
150
  !this.props.license ||
151
- ['creator', 'designer', 'creator+designer'].indexOf(this.props.license) < 0;
151
+ ['creator', 'designer', 'creator+designer', 'finder'].indexOf(this.props.license) === -1;
152
152
 
153
153
  return (
154
154
  <div>
@@ -16,6 +16,7 @@ require('./i18n').use(
16
16
  creator_designer: 'creator and designer',
17
17
  creator: 'creator',
18
18
  designer: 'designer',
19
+ finder: 'finder',
19
20
  },
20
21
  // MENUPOINTS
21
22
 
@@ -88,6 +89,7 @@ require('./i18n').use(
88
89
  creator_designer: 'creator und designer',
89
90
  creator: 'creator',
90
91
  designer: 'designer',
92
+ finder: 'finder',
91
93
  },
92
94
  // MENUPOINTS
93
95
 
@@ -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(() => {
30
+ .then((monaco) => {
31
31
  if (ref.current) {
32
32
  editor = monaco.editor.create(ref.current, {
33
33
  value,
@@ -7,7 +7,6 @@ const initialState = {
7
7
  {
8
8
  id: null,
9
9
  identifier: { value: '', constraints: { identifier: true } },
10
- email: { value: '', constraints: { presence: true } },
11
10
  users: {
12
11
  value: [],
13
12
  schema: {
@@ -26,6 +26,10 @@ const License = props => {
26
26
  (uploadedLicense === null && (license === 'designer' || license === 'creator+designer')) ||
27
27
  uploadedLicense === 'designer' ||
28
28
  uploadedLicense === 'creator+designer';
29
+
30
+ const isFinder =
31
+ (uploadedLicense === null && license && license.indexOf('finder') !== -1) ||
32
+ (uploadedLicense && uploadedLicense.indexOf('finder') !== -1);
29
33
 
30
34
  const styles = {
31
35
  success: {
@@ -85,6 +89,13 @@ const License = props => {
85
89
  </Typography>
86
90
  <IconButton>{isDesigner ? <CheckCircleIcon /> : <CancelIcon />}</IconButton>
87
91
  </div>
92
+
93
+ <div className={isFinder ? 'row success' : 'row invalid'}>
94
+ <Typography className="label" variant="body1">
95
+ {T('license.finder')}
96
+ </Typography>
97
+ <IconButton>{isFinder ? <CheckCircleIcon /> : <CancelIcon />}</IconButton>
98
+ </div>
88
99
  </div>
89
100
  </div>
90
101
  );
@@ -7,7 +7,7 @@ import { initConnectedComponent } from '../../../App/TestHelpers';
7
7
  const ConnectedScreen = initConnectedComponent(License);
8
8
 
9
9
  // Labels to be shown
10
- const licenseTypes = ['creator', 'designer'];
10
+ const licenseTypes = ['creator', 'designer', 'finder'];
11
11
 
12
12
  describe('License / Screen', () => {
13
13
  it('INTEGRATION - renders the screen', () => {
@@ -178,6 +178,42 @@ exports[`License / Screen INTEGRATION - renders the screen 1`] = `
178
178
  </span>
179
179
  </button>
180
180
  </div>
181
+ <div
182
+ class="row invalid"
183
+ >
184
+ <p
185
+ class="MuiTypography-root-19 MuiTypography-body1-28 label"
186
+ >
187
+ <span>
188
+ license.finder
189
+ </span>
190
+ </p>
191
+ <button
192
+ class="MuiButtonBase-root-7 MuiIconButton-root-1"
193
+ tabindex="0"
194
+ type="button"
195
+ >
196
+ <span
197
+ class="MuiIconButton-label-6"
198
+ >
199
+ <svg
200
+ aria-hidden="true"
201
+ class="MuiSvgIcon-root-10"
202
+ focusable="false"
203
+ role="presentation"
204
+ viewBox="0 0 24 24"
205
+ >
206
+ <path
207
+ d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
208
+ />
209
+ <path
210
+ d="M0 0h24v24H0z"
211
+ fill="none"
212
+ />
213
+ </svg>
214
+ </span>
215
+ </button>
216
+ </div>
181
217
  </div>
182
218
  </div>
183
219
  `;