@configuratorware/configurator-admingui 1.26.5 → 1.27.2

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 (44) hide show
  1. package/package.json +2 -2
  2. package/src/App/Data.js +9 -0
  3. package/src/App/Reducers/Common/OrderList/Actions.js +11 -3
  4. package/src/App/Reducers/Common/OrderList/Listener.js +2 -2
  5. package/src/App/Reducers/Common/OrderList/Reducer.js +22 -3
  6. package/src/App/Styles.scss +19 -1
  7. package/src/Components/DefaultConnectedScreen.js +3 -2
  8. package/src/Components/DefaultScreen.js +10 -2
  9. package/src/Components/Form.js +4 -0
  10. package/src/Components/FormFragments/HintText.js +14 -0
  11. package/src/Components/FormFragments/InputArray.js +42 -13
  12. package/src/Components/FormFragments/SimpleTable.js +18 -2
  13. package/src/Components/FormFragments/Styles.scss +4 -0
  14. package/src/Components/FormFragments/Text.js +1 -0
  15. package/src/Components/FormFragments/index.js +3 -0
  16. package/src/Components/List.js +1 -0
  17. package/src/Components/OrderList.js +15 -7
  18. package/src/Components/Pagination.js +8 -0
  19. package/src/Components/SplitContainer.js +25 -2
  20. package/src/Components/Styles.scss +2 -0
  21. package/src/Components/Translations.js +6 -0
  22. package/src/Screens/ColorPalettes/Components/DefaultColorSwitch.js +54 -0
  23. package/src/Screens/ColorPalettes/Containers/Edit.js +39 -21
  24. package/src/Screens/ColorPalettes/Translations.js +1 -0
  25. package/src/Screens/Creator/Reducers/ConfigurationActions.js +1 -1
  26. package/src/Screens/DesignProductionMethods/Containers/Edit.js +0 -5
  27. package/src/Screens/DesignProductionMethods/Reducers/DesignProductionMethodsReducer.js +0 -1
  28. package/src/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +339 -256
  29. package/src/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +26 -3
  30. package/src/Screens/Designer/SubScreens/DesignAreas/Translations.js +16 -2
  31. package/src/Screens/Designer/__tests__/FormProductionMethods.test.js +0 -2
  32. package/src/Screens/Designer/__tests__/__snapshots__/FormProductionMethods.test.js.snap +167 -50
  33. package/src/Screens/DesignerGlobalItemPrices/Containers/Edit.js +34 -6
  34. package/src/Screens/DesignerGlobalItemPrices/Reducers/Actions.js +1 -1
  35. package/src/Screens/DesignerGlobalItemPrices/Screen.js +3 -1
  36. package/src/Screens/DesignerGlobalItemPrices/Translations.js +8 -0
  37. package/src/Screens/Font/Containers/List.js +14 -3
  38. package/src/Screens/Item/Containers/Styles.scss +3 -0
  39. package/src/Screens/OptionPools/Containers/Edit.js +20 -0
  40. package/src/Screens/OptionPools/Reducers/Reducer.js +3 -2
  41. package/src/Screens/Setting/Containers/Edit.js +6 -0
  42. package/src/Screens/Setting/Reducers/Reducer.js +1 -0
  43. package/src/Screens/Setting/Translations.js +4 -0
  44. package/src/Screens/ColorPalettes/Components/DefaultColorRadio.js +0 -35
@@ -1,25 +1,34 @@
1
1
  import React from 'react';
2
2
  import Actions, { COLORPALETTES_REDUCER_NAME } from '../Reducers/Actions';
3
- import DefaultColorRadio from '../Components/DefaultColorRadio';
4
- const { setFieldData, postData } = Actions;
3
+ import DefaultColorSwitch from '../Components/DefaultColorSwitch';
4
+ const { setFieldData, postData, detailsAction } = Actions;
5
+
6
+ function withLoadDetails(Component) {
7
+ return connect(() => ({}), {
8
+ reloadPalette: id => detailsAction({ id }),
9
+ })(Component);
10
+ }
11
+
12
+ const ConnectedOrderedButton = ({ value, reloadPalette, ...props }) => {
13
+ return (
14
+ <OrderList
15
+ listUrl={`/colorpalettes/${value}`}
16
+ saveListUrl={`/colorpalettes/${value}/colors/savesequencenumbers`}
17
+ entity={'colorpalettes.colors'}
18
+ orderSequenceNumber={'sequence_number'}
19
+ listField={'colors'}
20
+ onListSaved={() => {
21
+ reloadPalette(value);
22
+ }}
23
+ />
24
+ );
25
+ };
5
26
 
6
27
  const formFields = [
7
28
  {
8
29
  name: 'identifier',
9
30
  label: 'Identifier',
10
31
  type: 'text',
11
- /*type: 'autocompleteEntity',
12
- sourceConfig: {
13
- value: 'id',
14
- text: 'identifier'
15
- },
16
- dynSource: {
17
- listKey: COLORPALETTES_LIST_KEY,
18
- url: COLORPALETTES_LIST_URL
19
- },
20
- loadEntity: Actions.loadEntity,
21
- entityReducerName: COLORPALETTES_REDUCER_NAME,
22
- equalityCheckAttribute: 'identifier'*/
23
32
  },
24
33
  {
25
34
  name: 'texts',
@@ -34,14 +43,17 @@ const formFields = [
34
43
  name: 'colors',
35
44
  label: 'Colors',
36
45
  type: 'array',
46
+ buttonsPosition: 'top',
47
+ showPopup: true,
37
48
  array: {
38
49
  columns: [
39
50
  {
40
- name: 'defaultColorRadio',
51
+ name: 'defaultColorSwitch',
41
52
  label: 'defaultColor',
42
53
  renderValue: (value, rowData) => {
43
- return <DefaultColorRadio color={rowData} />;
54
+ return <DefaultColorSwitch color={rowData} />;
44
55
  },
56
+ disableSelection: true,
45
57
  },
46
58
  {
47
59
  name: 'identifier',
@@ -56,16 +68,16 @@ const formFields = [
56
68
  },
57
69
  {
58
70
  name: 'hex_value',
59
- label: 'Value',
71
+ label: 'Hex value',
60
72
  renderValue: value => (
61
- <span>
73
+ <span style={{ display: 'flex', alignItems: 'center', minWidth: 95 }}>
62
74
  <div
63
75
  style={{
64
76
  background: '#' + value,
65
- width: 30,
66
- height: 30,
77
+ minWidth: 20,
78
+ height: 20,
67
79
  outline: '1px solid black',
68
- margin: 13,
80
+ marginRight: 8,
69
81
  }}
70
82
  />
71
83
  {'#' + value}
@@ -96,8 +108,14 @@ const formFields = [
96
108
  ],
97
109
  },
98
110
  },
111
+ {
112
+ type: withLoadDetails(ConnectedOrderedButton),
113
+ name: 'id',
114
+ },
99
115
  ];
100
116
 
101
117
  import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
102
118
  import TranslationFinder from '../../../Components/TranslationFinder';
119
+ import OrderList from '../../../Components/OrderList';
120
+ import { connect } from 'react-redux';
103
121
  export default generateConnectedEdit(formFields, COLORPALETTES_REDUCER_NAME, setFieldData, postData);
@@ -18,6 +18,7 @@ require('../../App/i18n').use(
18
18
  },
19
19
  Colors: 'Farben',
20
20
  defaultColor: 'Standard-</br>farbe',
21
+ 'Hex value': 'Hex Wert',
21
22
  },
22
23
  },
23
24
  true
@@ -1,6 +1,6 @@
1
1
  import get from 'lodash/get';
2
2
 
3
- export const CONFIGURATION_LIST_KEY = 'items';
3
+ export const CONFIGURATION_LIST_KEY = 'creator_items';
4
4
  export const CONFIGURATION_DATA_KEY = 'base_configuration';
5
5
  export const CONFIGURATION_REDUCER_NAME = 'baseConfigurationData';
6
6
  export const CONFIGURATION_POST_URL = 'constructionpatterns';
@@ -65,11 +65,6 @@ const formFields = [
65
65
  type: 'number',
66
66
  helperText: T('designProductionMethod.minimumFontSizeHint'),
67
67
  },
68
- {
69
- name: 'hasEngravingBackgroundColors',
70
- label: 'Has Engraving Background Colors',
71
- type: 'checkbox',
72
- },
73
68
  ],
74
69
  },
75
70
  {
@@ -25,7 +25,6 @@ const initialState = {
25
25
  numericality: { strict: true, onlyInteger: true, greaterThanOrEqualTo: 1 },
26
26
  },
27
27
  },
28
- hasEngravingBackgroundColors: { value: false },
29
28
  },
30
29
  },
31
30
  colorPalettes: {