@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.
- package/package.json +2 -2
- package/src/App/Data.js +9 -0
- package/src/App/Reducers/Common/OrderList/Actions.js +11 -3
- package/src/App/Reducers/Common/OrderList/Listener.js +2 -2
- package/src/App/Reducers/Common/OrderList/Reducer.js +22 -3
- package/src/App/Styles.scss +19 -1
- package/src/Components/DefaultConnectedScreen.js +3 -2
- package/src/Components/DefaultScreen.js +10 -2
- package/src/Components/Form.js +4 -0
- package/src/Components/FormFragments/HintText.js +14 -0
- package/src/Components/FormFragments/InputArray.js +42 -13
- package/src/Components/FormFragments/SimpleTable.js +18 -2
- package/src/Components/FormFragments/Styles.scss +4 -0
- package/src/Components/FormFragments/Text.js +1 -0
- package/src/Components/FormFragments/index.js +3 -0
- package/src/Components/List.js +1 -0
- package/src/Components/OrderList.js +15 -7
- package/src/Components/Pagination.js +8 -0
- package/src/Components/SplitContainer.js +25 -2
- package/src/Components/Styles.scss +2 -0
- package/src/Components/Translations.js +6 -0
- package/src/Screens/ColorPalettes/Components/DefaultColorSwitch.js +54 -0
- package/src/Screens/ColorPalettes/Containers/Edit.js +39 -21
- package/src/Screens/ColorPalettes/Translations.js +1 -0
- package/src/Screens/Creator/Reducers/ConfigurationActions.js +1 -1
- package/src/Screens/DesignProductionMethods/Containers/Edit.js +0 -5
- package/src/Screens/DesignProductionMethods/Reducers/DesignProductionMethodsReducer.js +0 -1
- package/src/Screens/Designer/SubScreens/DesignAreas/Containers/FormProductionMethods.js +339 -256
- package/src/Screens/Designer/SubScreens/DesignAreas/Reducers/Reducer.js +26 -3
- package/src/Screens/Designer/SubScreens/DesignAreas/Translations.js +16 -2
- package/src/Screens/Designer/__tests__/FormProductionMethods.test.js +0 -2
- package/src/Screens/Designer/__tests__/__snapshots__/FormProductionMethods.test.js.snap +167 -50
- package/src/Screens/DesignerGlobalItemPrices/Containers/Edit.js +34 -6
- package/src/Screens/DesignerGlobalItemPrices/Reducers/Actions.js +1 -1
- package/src/Screens/DesignerGlobalItemPrices/Screen.js +3 -1
- package/src/Screens/DesignerGlobalItemPrices/Translations.js +8 -0
- package/src/Screens/Font/Containers/List.js +14 -3
- package/src/Screens/Item/Containers/Styles.scss +3 -0
- package/src/Screens/OptionPools/Containers/Edit.js +20 -0
- package/src/Screens/OptionPools/Reducers/Reducer.js +3 -2
- package/src/Screens/Setting/Containers/Edit.js +6 -0
- package/src/Screens/Setting/Reducers/Reducer.js +1 -0
- package/src/Screens/Setting/Translations.js +4 -0
- 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
|
|
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: '
|
|
51
|
+
name: 'defaultColorSwitch',
|
|
41
52
|
label: 'defaultColor',
|
|
42
53
|
renderValue: (value, rowData) => {
|
|
43
|
-
return <
|
|
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: '
|
|
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
|
-
|
|
66
|
-
height:
|
|
77
|
+
minWidth: 20,
|
|
78
|
+
height: 20,
|
|
67
79
|
outline: '1px solid black',
|
|
68
|
-
|
|
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);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import get from 'lodash/get';
|
|
2
2
|
|
|
3
|
-
export const CONFIGURATION_LIST_KEY = '
|
|
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';
|