@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
@@ -249,6 +249,44 @@ exports[`Unit- FormProductionMethods renders correctly 1`] = `
249
249
  </span>
250
250
  </label>
251
251
  </div>
252
+ <div
253
+ class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
254
+ >
255
+ <label
256
+ class="MuiFormControlLabel-root-205"
257
+ >
258
+ <span
259
+ class="MuiButtonBase-root-227 MuiIconButton-root-221 MuiPrivateSwitchBase-root-217 MuiCheckbox-root-211 MuiCheckbox-colorPrimary-215"
260
+ >
261
+ <span
262
+ class="MuiIconButton-label-226"
263
+ >
264
+ <svg
265
+ aria-hidden="true"
266
+ class="MuiSvgIcon-root-184"
267
+ focusable="false"
268
+ role="presentation"
269
+ viewBox="0 0 24 24"
270
+ >
271
+ <path
272
+ d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
273
+ />
274
+ </svg>
275
+ <input
276
+ class="MuiPrivateSwitchBase-input-220"
277
+ data-indeterminate="false"
278
+ type="checkbox"
279
+ value="oneLineText"
280
+ />
281
+ </span>
282
+ </span>
283
+ <span
284
+ class="MuiTypography-root-230 MuiTypography-body1-239 MuiFormControlLabel-label-210"
285
+ >
286
+ oneLineText
287
+ </span>
288
+ </label>
289
+ </div>
252
290
  <div
253
291
  class="MuiGrid-item-44 MuiGrid-grid-xs-12-83 FormProductionMethods-checkboxGrid-1"
254
292
  >
@@ -10,6 +10,7 @@ import { SET_DATA } from '../../../App/Reducers/Entity/Actions';
10
10
 
11
11
  import { generateDefaultActions } from '../../../App/Reducers/Entity/Actions';
12
12
  import { dispatchPostData } from '../../../App/Reducers/Api/Helpers';
13
+ import { whiteSpacePattern } from "../../../App/Data";
13
14
 
14
15
  const actions = generateDefaultActions(LIST_KEY, DATA_KEY, REDUCER_NAME, 'fonts');
15
16
 
@@ -45,24 +46,28 @@ actions.postData = () => (dispatch, getState) => {
45
46
  const fontsToUpload = [];
46
47
 
47
48
  const fontName = state.data.name.value;
48
-
49
- if (fontName) {
49
+ if (fontName && fontName.match(whiteSpacePattern) && fontName.match(whiteSpacePattern)[0] === fontName) {
50
50
  const fontTypeMap = {
51
51
  fileNameRegular: 'regular',
52
52
  fileNameBold: 'bold',
53
53
  fileNameItalic: 'italic',
54
54
  fileNameBoldItalic: 'bolditalic',
55
55
  };
56
-
56
+
57
57
  for (const fontType in fontTypeMap) {
58
58
  const fontFile = state.data[fontType].value;
59
-
60
- if (fontFile && !isString(fontFile)) {
61
- fontsToUpload.push({
62
- name: fontType,
63
- value: fontFile,
64
- filename: fontName + '-' + fontTypeMap[fontType] + '.ttf',
65
- });
59
+ if (fontFile) {
60
+ const filename = fontName + '-' + fontTypeMap[fontType] + '.ttf';
61
+ if (!isString(fontFile)) {
62
+ fontsToUpload.push({
63
+ name: fontType,
64
+ value: fontFile,
65
+ filename
66
+ });
67
+ }
68
+ else {
69
+ dispatch(setFilenameField(fontType, filename));
70
+ }
66
71
  }
67
72
  }
68
73
  }
@@ -82,7 +87,7 @@ actions.postData = () => (dispatch, getState) => {
82
87
  });
83
88
 
84
89
  checkFontsToUpload();
85
- });
90
+ });
86
91
  };
87
92
 
88
93
  checkFontsToUpload();
@@ -8,7 +8,7 @@ const initialState = {
8
8
  ...getDefaultEntityState(
9
9
  {
10
10
  id: null,
11
- name: { value: '', constraints: { presence: true } },
11
+ name: { value: '', constraints: { noWhitespace: true, presence: true } },
12
12
  active: false,
13
13
  isDefault: { value: false },
14
14
  fileNameRegular: null,
@@ -235,6 +235,27 @@ const formFields = [
235
235
  type: 'toggle',
236
236
  shouldRender: schema => schema.children.value.length > 0,
237
237
  },
238
+ {
239
+ name: 'itemclassifications',
240
+ label: 'itemclassifications',
241
+ type: 'dynSource',
242
+ sourceConfig: {
243
+ value: 'id',
244
+ text: 'translated_title',
245
+ },
246
+ dynSource: {
247
+ type: 'chip',
248
+ listKey: ITEMCLASSIFICATION_LIST_KEY,
249
+ url: ITEMCLASSIFICATIONS_URL,
250
+ autoLoad: false,
251
+ maxSearchResults: 25,
252
+ mapItems: item => ({ ...item, label: `${item.translated_title}` }),
253
+ },
254
+ openOnFocus: true,
255
+ loadEntity: Actions.loadEntity,
256
+ entityReducerName: 'itemclassificationData',
257
+ equalityCheckAttribute: 'identifier',
258
+ },
238
259
  {
239
260
  name: 'minimumOrderAmount',
240
261
  label: 'MinimumOrderAmount',
@@ -357,7 +378,8 @@ import { LOGIN_REDUCER_NAME } from '../../Login/Reducers/Actions';
357
378
  import CheckData from '../../Creator/Components/CheckData/CheckData';
358
379
  import LocalizedPriceValue from '../../../Components/LocalizedPriceValue';
359
380
  import { LocalizedPriceTextField } from '../../../Components/LocalizedPriceTextField';
360
- import {CallToActionField} from "../../../Components/CallToActionField";
381
+ import { CallToActionField } from "../../../Components/CallToActionField";
382
+ import { ITEMCLASSIFICATION_LIST_KEY, ITEMCLASSIFICATIONS_URL } from "../../Itemclassification/Reducers/Actions";
361
383
 
362
384
  const styles = theme => ({
363
385
  root: {
@@ -18,6 +18,7 @@ require('../../App/i18n').use(
18
18
  editDialogTitle: 'Edit selected entries',
19
19
  editDialogHint:
20
20
  'Use the checkboxes to select one or more entries in the list</br>and then click this icon to set the item status for them.',
21
+ itemclassifications: 'Product categories',
21
22
  visualizationData: {
22
23
  '2d': "2D",
23
24
  '3d': "3D",
@@ -99,6 +100,7 @@ require('../../App/i18n').use(
99
100
  editDialogTitle: 'Gewählte Einträge bearbeiten',
100
101
  editDialogHint:
101
102
  'Nutze die Checkboxen in der Liste und klicke dann dieses Icon,</br>um den Status für einen oder mehrere Einträge zu setzen.',
103
+ itemclassifications: 'Produktkategorien',
102
104
  visualizationData: {
103
105
  '2d': "2D",
104
106
  '3d': "3D",
@@ -1,10 +1,11 @@
1
1
  import Screen from './Screen';
2
2
  import itemData from './Reducers/ItemReducer';
3
3
  import variantData from './Reducers/Variant/Reducer';
4
+ import itemClassificationData from './../Itemclassification/Reducers/Reducer';
4
5
 
5
6
  import { addReducers } from '../../App/FeatureReducers';
6
7
 
7
- addReducers([itemData, variantData]);
8
+ addReducers([itemData, variantData, itemClassificationData]);
8
9
 
9
10
  export default {
10
11
  Screen,
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import Actions, { ITEMCLASSIFICATION_REDUCER_NAME } from '../Reducers/Actions';
3
+
4
+ const { setFieldData, postData, customAction } = Actions;
5
+ import attributesDataStructure from '../../Item/DataStructures/Attributes/Editor';
6
+
7
+ const formFields = [
8
+ {
9
+ name: 'identifier',
10
+ label: 'Identifier',
11
+ type: 'text',
12
+ },
13
+ {
14
+ name: 'texts',
15
+ label: 'Title',
16
+ type: 'intl',
17
+ intl: {
18
+ name: 'title',
19
+ type: 'text',
20
+ },
21
+ },
22
+ {
23
+ name: 'minimumOrderAmount',
24
+ label: 'Minimum order amount',
25
+ type: 'text',
26
+ },
27
+ ...attributesDataStructure,
28
+ ];
29
+
30
+ import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
31
+ import EditorPopup from '../../Item/Components/AttributeEditorPopup';
32
+
33
+ const BaseDataForm = generateConnectedEdit(
34
+ formFields,
35
+ ITEMCLASSIFICATION_REDUCER_NAME,
36
+ setFieldData,
37
+ postData,
38
+ false,
39
+ customAction
40
+ );
41
+
42
+ const ItemClassificationForm = () => (
43
+ <div>
44
+ <BaseDataForm />
45
+ <EditorPopup />
46
+ </div>
47
+ );
48
+
49
+ export default ItemClassificationForm;
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import Actions, {
3
+ ITEMCLASSIFICATION_LIST_KEY,
4
+ ITEMCLASSIFICATIONS_URL,
5
+ ITEMCLASSIFICATION_REDUCER_NAME,
6
+ } from '../Reducers/Actions';
7
+ const { detailsAction, hideDetails, showDetails, createEntity, listAction, deleteEntities } = Actions;
8
+
9
+ const columns = [
10
+ {
11
+ name: 'identifier',
12
+ label: 'Identifier',
13
+ filterable: true,
14
+ sortable: true,
15
+ filterKey: 'itemclassification.identifier',
16
+ sortKey: 'itemclassification.identifier',
17
+ },
18
+ {
19
+ name: 'translated_title',
20
+ label: 'Title',
21
+ filterable: true,
22
+ sortable: true,
23
+ filterKey: 'itemclassification.itemClassificationText.title',
24
+ sortKey: 'itemclassification.itemClassificationText.title',
25
+ },
26
+ ];
27
+
28
+ const listParams = {
29
+ entity: 'itemclassifications',
30
+ addButtonLabel: 'itemclassifications.addButtonLabel',
31
+ };
32
+
33
+ import generateConnectedList from '../../../Components/DefaultConnectedList';
34
+ import OrderList from '../../../Components/OrderList';
35
+
36
+ export const ConnectedList = generateConnectedList(
37
+ columns,
38
+ listParams,
39
+ ITEMCLASSIFICATION_LIST_KEY,
40
+ listAction,
41
+ detailsAction,
42
+ hideDetails,
43
+ showDetails,
44
+ createEntity,
45
+ deleteEntities,
46
+ {
47
+ reducerName: ITEMCLASSIFICATION_REDUCER_NAME,
48
+ }
49
+ );
50
+
51
+ const list = () => {
52
+ return (
53
+ <div>
54
+ <ConnectedList />
55
+ <OrderList
56
+ listUrl={ITEMCLASSIFICATIONS_URL}
57
+ entity={'itemclassification'}
58
+ orderSequenceNumber={'sequencenumber'}
59
+ />
60
+ </div>
61
+ );
62
+ };
63
+
64
+ export default list;
@@ -0,0 +1,17 @@
1
+ export const ITEMCLASSIFICATION_LIST_KEY = 'itemclassifications';
2
+ export const ITEMCLASSIFICATION_DATA_KEY = 'itemclassification';
3
+ export const ITEMCLASSIFICATION_REDUCER_NAME = 'itemclassificationData';
4
+ export const ITEMCLASSIFICATIONS_URL = 'itemclassifications';
5
+
6
+ import { generateDefaultActions } from '../../../App/Reducers/Entity/Actions';
7
+
8
+ const actions = generateDefaultActions(
9
+ ITEMCLASSIFICATION_LIST_KEY,
10
+ ITEMCLASSIFICATION_DATA_KEY,
11
+ ITEMCLASSIFICATION_REDUCER_NAME,
12
+ ITEMCLASSIFICATIONS_URL
13
+ );
14
+
15
+ export const { hideDetails, loadEntity, postData } = actions;
16
+
17
+ export default actions;
@@ -0,0 +1,43 @@
1
+ import { ITEMCLASSIFICATION_DATA_KEY, ITEMCLASSIFICATION_REDUCER_NAME } from './Actions';
2
+ import { defaultEntityReducer, getDefaultEntityState } from '../../../App/Reducers/Entity/Reducer';
3
+ import { createFeatureReducer } from '../../../App/FeatureReducers';
4
+ import attributesDataStructure from '../../Item/DataStructures/Attributes/Reducer';
5
+
6
+ const initialState = {
7
+ ...getDefaultEntityState(
8
+ {
9
+ id: null,
10
+ identifier: { value: '', constraints: { identifier: true } },
11
+ sequencenumber: {
12
+ value: null,
13
+ constraints: { numericality: { strict: true, onlyInteger: true } },
14
+ },
15
+ texts: [],
16
+ minimumOrderAmount: {
17
+ value: null,
18
+ constraints: { numericality: { strict: true, onlyInteger: true } },
19
+ },
20
+ ...attributesDataStructure,
21
+ },
22
+ {
23
+ source: 'itemclassifications',
24
+ dependencies: [
25
+ {
26
+ name: 'itemclassifications',
27
+ dataKey: 'parent_itemclassifications',
28
+ source: 'itemclassifications',
29
+ },
30
+ ],
31
+ },
32
+ ITEMCLASSIFICATION_DATA_KEY
33
+ ),
34
+ };
35
+
36
+ export const itemClassificationData = createFeatureReducer(
37
+ ITEMCLASSIFICATION_REDUCER_NAME,
38
+ (state = initialState, action) => {
39
+ return defaultEntityReducer(state, action, initialState);
40
+ }
41
+ );
42
+
43
+ export default itemClassificationData;
@@ -0,0 +1,19 @@
1
+ import Actions, { ITEMCLASSIFICATION_REDUCER_NAME } from './Reducers/Actions';
2
+ const { invalidateList, triggerUnsavedEntity, hideDetails } = Actions;
3
+
4
+ import List from './Containers/List';
5
+ import Edit from './Containers/Edit';
6
+
7
+ import './Translations';
8
+
9
+ import { generateConnectedSplitScreen } from '../../Components/DefaultConnectedScreen';
10
+
11
+ export default generateConnectedSplitScreen(
12
+ 'item_classifications',
13
+ List,
14
+ Edit,
15
+ ITEMCLASSIFICATION_REDUCER_NAME,
16
+ invalidateList,
17
+ triggerUnsavedEntity,
18
+ hideDetails
19
+ );
@@ -0,0 +1,22 @@
1
+ require('../../App/i18n').use(
2
+ {
3
+ en: {
4
+ itemclassifications: {
5
+ addButtonLabel: 'Add Product category',
6
+ menuLabel: 'Product Categories',
7
+ },
8
+ item_classifications: 'Product categories',
9
+ 'Minimum order amount': 'Minimum order amount',
10
+ },
11
+ de: {
12
+ itemclassifications: {
13
+ addButtonLabel: 'Produktkategorie hinzufügen',
14
+ menuLabel: 'Produktkategorien',
15
+ },
16
+ 'Sequence number': 'Reihenfolge',
17
+ item_classifications: 'Produktkategorien',
18
+ 'Minimum order amount': 'Mindestbestellmenge',
19
+ },
20
+ },
21
+ true
22
+ );
@@ -0,0 +1,9 @@
1
+ import Screen from './Screen';
2
+ import Reducer from './Reducers/Reducer';
3
+ import { addReducers } from '../../App/FeatureReducers';
4
+
5
+ addReducers(Reducer);
6
+
7
+ export default {
8
+ Screen,
9
+ };
@@ -19,7 +19,8 @@ import Savedconfigurations from './Savedconfigurations';
19
19
  import SoftwareUpdates from './SoftwareUpdates';
20
20
  import TrackingCodes from './TrackingCodes';
21
21
  import User from './User';
22
- import Finder from './Finder'
22
+ import Itemclassification from './Itemclassification';
23
+ import Finder from './Finder';
23
24
 
24
25
  export { Dashboard };
25
26
  export { Login };
@@ -36,6 +37,7 @@ export const features = {
36
37
  designer: Designer,
37
38
  design_production_methods: DesignProductionMethods,
38
39
  items: Item,
40
+ item_classifications: Itemclassification,
39
41
  licenses: License,
40
42
  options: Option,
41
43
  option_classifications: Optionclassification,