@configuratorware/configurator-admingui 1.38.7 → 1.39.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.
- package/Components/Form.js +3 -0
- package/Components/FormFragments/AttributeValueChip.js +262 -0
- package/Components/FormFragments/InputArray.js +6 -4
- package/Components/FormFragments/InputWithSource.js +14 -2
- package/Components/FormFragments/Select.js +5 -3
- package/Components/FormFragments/index.js +9 -0
- package/Components/LocalizedPriceTextField.js +6 -4
- package/Components/LocalizedPriceValue.js +1 -1
- package/Screens/Attribute/Containers/Edit.js +7 -0
- package/Screens/Attribute/Reducers/Reducer.js +4 -1
- package/Screens/Attribute/Translations.js +6 -2
- package/Screens/Client/Containers/Edit.js +4 -0
- package/Screens/Client/Reducers/Reducer.js +3 -0
- package/Screens/Client/Translations.js +1 -0
- package/Screens/CurrentClient/Containers/Edit.js +4 -0
- package/Screens/CurrentClient/Reducers/Reducer.js +3 -0
- package/Screens/DefaultClient/Containers/Edit.js +4 -0
- package/Screens/DefaultClient/Reducers/Reducer.js +3 -0
- package/Screens/Designer/SubScreens/Visualization/Containers/Edit/Edit.js +17 -10
- package/Screens/ImageGallery/Containers/Edit.js +59 -0
- package/Screens/ImageGallery/Reducers/Reducer.js +36 -2
- package/Screens/Item/DataStructures/Attributes/Editor.js +3 -4
- package/Screens/Item/Translations.js +4 -2
- package/Screens/PriceTypes/Containers/Edit.js +36 -10
- package/Screens/PriceTypes/Reducers/Reducer.js +2 -2
- package/Screens/PriceTypes/Translations.js +14 -0
- package/UIComponents/ChipInput.js +29 -3
- package/package.json +3 -3
- package/scripts/cpPublic.js +32 -0
- package/src/Components/Form.js +2 -0
- package/src/Components/FormFragments/AttributeValueChip.js +140 -0
- package/src/Components/FormFragments/InputArray.js +8 -2
- package/src/Components/FormFragments/InputWithSource.js +3 -0
- package/src/Components/FormFragments/Select.js +10 -4
- package/src/Components/FormFragments/index.js +3 -0
- package/src/Components/LocalizedPriceTextField.js +5 -3
- package/src/Components/LocalizedPriceValue.js +5 -3
- package/src/Screens/Attribute/Containers/Edit.js +7 -0
- package/src/Screens/Attribute/Reducers/Reducer.js +1 -0
- package/src/Screens/Attribute/Translations.js +4 -0
- package/src/Screens/Client/Containers/Edit.js +7 -2
- package/src/Screens/Client/Reducers/Reducer.js +1 -0
- package/src/Screens/Client/Translations.js +5 -2
- package/src/Screens/CurrentClient/Containers/Edit.js +9 -4
- package/src/Screens/CurrentClient/Reducers/Reducer.js +1 -0
- package/src/Screens/DefaultClient/Containers/Edit.js +6 -1
- package/src/Screens/DefaultClient/Reducers/Reducer.js +1 -0
- package/src/Screens/Designer/SubScreens/Visualization/Containers/Edit/Edit.js +10 -3
- package/src/Screens/ImageGallery/Containers/Edit.js +46 -1
- package/src/Screens/ImageGallery/Reducers/Reducer.js +18 -1
- package/src/Screens/Item/DataStructures/Attributes/Editor.js +2 -4
- package/src/Screens/Item/Translations.js +5 -1
- package/src/Screens/PriceTypes/Containers/Edit.js +32 -9
- package/src/Screens/PriceTypes/Reducers/Reducer.js +1 -1
- package/src/Screens/PriceTypes/Translations.js +14 -0
- package/src/UIComponents/ChipInput.js +23 -0
- package/scripts/cpFavicon.js +0 -28
|
@@ -2,9 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { connect } from 'react-redux';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
4
|
|
|
5
|
-
let LocalizedPriceValue = ({data = '', decimalSeparators, language, defaultSeparator}) => {
|
|
6
|
-
const localeSeparator = get(decimalSeparators, language, defaultSeparator
|
|
7
|
-
return
|
|
5
|
+
let LocalizedPriceValue = ({ data = '', decimalSeparators, language, defaultSeparator }) => {
|
|
6
|
+
const localeSeparator = get(decimalSeparators, language, defaultSeparator);
|
|
7
|
+
return data && localeSeparator !== defaultSeparator
|
|
8
|
+
? `${data}`.replace(defaultSeparator, localeSeparator)
|
|
9
|
+
: data;
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
const mapStateToProps = ({ i18n, language }) => ({
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ATTRIBUTE_LIST_KEY,
|
|
7
7
|
ATTRIBUTE_LIST_URL,
|
|
8
8
|
} from '../Reducers/Actions';
|
|
9
|
+
import { t } from '../../../App/i18n';
|
|
9
10
|
|
|
10
11
|
const formFields = [
|
|
11
12
|
{
|
|
@@ -39,6 +40,12 @@ const formFields = [
|
|
|
39
40
|
type: 'select',
|
|
40
41
|
source: ['string', 'integer', 'number', 'boolean', 'text'],
|
|
41
42
|
},
|
|
43
|
+
{
|
|
44
|
+
name: 'writeProtected',
|
|
45
|
+
label: t('attribute.writeProtected'),
|
|
46
|
+
type: 'checkbox',
|
|
47
|
+
helperText: t('attribute.writeProtectedInfo'),
|
|
48
|
+
},
|
|
42
49
|
];
|
|
43
50
|
|
|
44
51
|
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
@@ -7,6 +7,8 @@ require('../../App/i18n').use(
|
|
|
7
7
|
Variants: 'Variants',
|
|
8
8
|
attribute: {
|
|
9
9
|
addButtonLabel: 'Add Attribute',
|
|
10
|
+
writeProtected: 'Write protected',
|
|
11
|
+
writeProtectedInfo: 'Attribute won’t be deleted by the importer',
|
|
10
12
|
},
|
|
11
13
|
},
|
|
12
14
|
de: {
|
|
@@ -16,6 +18,8 @@ require('../../App/i18n').use(
|
|
|
16
18
|
Variants: 'Varianten',
|
|
17
19
|
attribute: {
|
|
18
20
|
addButtonLabel: 'Attribute hinzufügen',
|
|
21
|
+
writeProtected: 'Schreibgeschützt',
|
|
22
|
+
writeProtectedInfo: 'Das Attribut wird beim Import nicht gelöscht',
|
|
19
23
|
},
|
|
20
24
|
},
|
|
21
25
|
},
|
|
@@ -54,7 +54,7 @@ const formFields = [
|
|
|
54
54
|
accept: '.ttf',
|
|
55
55
|
showFileName: true,
|
|
56
56
|
deleteEnabled: true,
|
|
57
|
-
warningMessage: T('clientFontMessage')
|
|
57
|
+
warningMessage: T('clientFontMessage'),
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
name: 'logo',
|
|
@@ -127,6 +127,11 @@ const formFields = [
|
|
|
127
127
|
type: 'text',
|
|
128
128
|
helperText: t('emailHint'),
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
name: 'sendOfferRequestMailToCustomer',
|
|
132
|
+
label: 'Send offer request email to customer',
|
|
133
|
+
type: 'checkbox',
|
|
134
|
+
},
|
|
130
135
|
{
|
|
131
136
|
type: CallToActionField,
|
|
132
137
|
fields: [
|
|
@@ -136,7 +141,7 @@ const formFields = [
|
|
|
136
141
|
type: 'select',
|
|
137
142
|
},
|
|
138
143
|
],
|
|
139
|
-
dynamicDefaultLabel: false
|
|
144
|
+
dynamicDefaultLabel: false,
|
|
140
145
|
},
|
|
141
146
|
{
|
|
142
147
|
name: 'texts',
|
|
@@ -16,7 +16,8 @@ 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:
|
|
19
|
+
clientFontMessage:
|
|
20
|
+
'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.',
|
|
20
21
|
},
|
|
21
22
|
de: {
|
|
22
23
|
clients: 'Klienten',
|
|
@@ -35,6 +36,7 @@ require('../../App/i18n').use(
|
|
|
35
36
|
'E-Mail sender for request offer': 'Absender E-Mail für die Angebotsanfrage',
|
|
36
37
|
'CC E-Mail(s) receiver for request offer': 'CC E-Mail(s) für die Angebotsanfrage',
|
|
37
38
|
'BCC E-Mail(s) receiver for request offer': 'BCC E-Mail(s) für die Angebotsanfrage',
|
|
39
|
+
'Send offer request email to customer': 'Angebotsanfrage per E-Mail an den Kunden senden',
|
|
38
40
|
'Client logo': 'Kunden Logo',
|
|
39
41
|
Texts: 'Texte',
|
|
40
42
|
themeColorError: 'Bitte gib einen hexadezimalen Farbwert ein (z.B. #0000ff)',
|
|
@@ -47,7 +49,8 @@ require('../../App/i18n').use(
|
|
|
47
49
|
headerInfo: 'Bitte überprüfe Deine Änderungen in einem generierten PDF',
|
|
48
50
|
footerInfo: 'Bitte überprüfe Deine Änderungen in einem generierten PDF',
|
|
49
51
|
emailHint: 'trenne mehrere Adressen mit einem Semikolon',
|
|
50
|
-
clientFontMessage:
|
|
52
|
+
clientFontMessage:
|
|
53
|
+
'Für eine korrekte Darstellung der Schrift im configuratorware Fronted darf der Dateiname keine Leerzeichen enthalten und muss dem internen Namen der Schriftart entsprechen.',
|
|
51
54
|
},
|
|
52
55
|
},
|
|
53
56
|
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, 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,7 +23,7 @@ const formFields = [
|
|
|
23
23
|
accept: '.ttf',
|
|
24
24
|
showFileName: true,
|
|
25
25
|
deleteEnabled: true,
|
|
26
|
-
warningMessage: T('clientFontMessage')
|
|
26
|
+
warningMessage: T('clientFontMessage'),
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
name: 'logo',
|
|
@@ -96,6 +96,11 @@ const formFields = [
|
|
|
96
96
|
type: 'text',
|
|
97
97
|
helperText: t('emailHint'),
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
name: 'sendOfferRequestMailToCustomer',
|
|
101
|
+
label: 'Send offer request email to customer',
|
|
102
|
+
type: 'checkbox',
|
|
103
|
+
},
|
|
99
104
|
{
|
|
100
105
|
type: CallToActionField,
|
|
101
106
|
fields: [
|
|
@@ -103,9 +108,9 @@ const formFields = [
|
|
|
103
108
|
name: 'callToAction',
|
|
104
109
|
label: 'callToAction.callToAction',
|
|
105
110
|
type: 'select',
|
|
106
|
-
}
|
|
111
|
+
},
|
|
107
112
|
],
|
|
108
|
-
dynamicDefaultLabel: false
|
|
113
|
+
dynamicDefaultLabel: false,
|
|
109
114
|
},
|
|
110
115
|
{
|
|
111
116
|
name: 'texts',
|
|
@@ -22,7 +22,7 @@ const formFields = [
|
|
|
22
22
|
accept: '.ttf',
|
|
23
23
|
showFileName: true,
|
|
24
24
|
deleteEnabled: true,
|
|
25
|
-
warningMessage: T('clientFontMessage')
|
|
25
|
+
warningMessage: T('clientFontMessage'),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
name: 'logo',
|
|
@@ -95,6 +95,11 @@ const formFields = [
|
|
|
95
95
|
type: 'text',
|
|
96
96
|
helperText: t('emailHint'),
|
|
97
97
|
},
|
|
98
|
+
{
|
|
99
|
+
name: 'sendOfferRequestMailToCustomer',
|
|
100
|
+
label: 'Send offer request email to customer',
|
|
101
|
+
type: 'checkbox',
|
|
102
|
+
},
|
|
98
103
|
{
|
|
99
104
|
name: 'callToAction',
|
|
100
105
|
label: 'callToAction.callToAction',
|
|
@@ -31,6 +31,7 @@ const initialState = {
|
|
|
31
31
|
fromEmailAddress: { value: '', constraints: { presence: true } },
|
|
32
32
|
ccEmailAddresses: { value: '', constraints: { presence: true } },
|
|
33
33
|
bccEmailAddresses: { value: '', constraints: { presence: true } },
|
|
34
|
+
sendOfferRequestMailToCustomer: { value: '' },
|
|
34
35
|
callToAction: 'addToCart',
|
|
35
36
|
customCss: '',
|
|
36
37
|
},
|
|
@@ -58,7 +58,9 @@ const styles = theme => {
|
|
|
58
58
|
editorRoot: {
|
|
59
59
|
display: 'flex',
|
|
60
60
|
flexDirection: 'row',
|
|
61
|
-
|
|
61
|
+
'&.fullHeight': {
|
|
62
|
+
height: 'calc(100vh - 180px)',
|
|
63
|
+
},
|
|
62
64
|
'& > $header': {
|
|
63
65
|
display: 'none',
|
|
64
66
|
[breakPoint.max]: {
|
|
@@ -146,6 +148,11 @@ const styles = theme => {
|
|
|
146
148
|
maxWidth: 600,
|
|
147
149
|
},
|
|
148
150
|
visualizationRoot: {
|
|
151
|
+
display: 'flex',
|
|
152
|
+
flexDirection: 'row',
|
|
153
|
+
[breakPoint.max]: {
|
|
154
|
+
flexDirection: 'column',
|
|
155
|
+
},
|
|
149
156
|
'& > $leftSide': {
|
|
150
157
|
width: '70%',
|
|
151
158
|
[breakPoint.max]: {
|
|
@@ -634,7 +641,7 @@ export class VisualizationSettingsEdit extends Component {
|
|
|
634
641
|
const { three } = this;
|
|
635
642
|
if (isKindOf2D(mode)) {
|
|
636
643
|
return (
|
|
637
|
-
<div className={
|
|
644
|
+
<div className={classes.visualizationRoot}>
|
|
638
645
|
<div className={classes.leftSide}>
|
|
639
646
|
<VisualizationContainer three={three} className={classes.visualizationContainer} />
|
|
640
647
|
</div>
|
|
@@ -688,7 +695,7 @@ export class VisualizationSettingsEdit extends Component {
|
|
|
688
695
|
}
|
|
689
696
|
|
|
690
697
|
return (
|
|
691
|
-
<div className={classes.editorRoot}>
|
|
698
|
+
<div className={`${classes.editorRoot} ${isKindOf3D(mode) ? 'fullHeight' : ''}`}>
|
|
692
699
|
{loading && <LoadingComponent fullSize />}
|
|
693
700
|
|
|
694
701
|
{isKindOf3D(mode) ? this.renderHeader3D(data) : this.renderHeader()}
|
|
@@ -6,6 +6,8 @@ import EditorPopup from '../../ImageGallery/ImageTags/TagsEditorPopup';
|
|
|
6
6
|
import connect from 'react-redux/es/connect/connect';
|
|
7
7
|
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
8
8
|
import { T } from '../../../App/i18n';
|
|
9
|
+
import LocalizedPriceTextField from '../../../Components/LocalizedPriceTextField';
|
|
10
|
+
import LocalizedPriceValue from '../../../Components/LocalizedPriceValue';
|
|
9
11
|
|
|
10
12
|
const formFields = [
|
|
11
13
|
{
|
|
@@ -38,7 +40,50 @@ const formFields = [
|
|
|
38
40
|
showFileName: true,
|
|
39
41
|
warningMessage: T('UploadFailureMessage', {
|
|
40
42
|
url: `<a href="http://svg.enshrined.co.uk/"
|
|
41
|
-
target="_blank">http://svg.enshrined.co.uk/</a
|
|
43
|
+
target="_blank">http://svg.enshrined.co.uk/</a>`,
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'prices',
|
|
48
|
+
label: 'Prices',
|
|
49
|
+
type: 'dynSource',
|
|
50
|
+
sourceConfig: {
|
|
51
|
+
text: ({ identifier, currency }) => `${identifier} / ${currency.symbol} (${currency.iso})`,
|
|
52
|
+
},
|
|
53
|
+
dynSource: {
|
|
54
|
+
type: 'tabs',
|
|
55
|
+
reducerName: IMAGE_GALLERY_REDUCER_NAME,
|
|
56
|
+
dataSource: 'channels',
|
|
57
|
+
},
|
|
58
|
+
tabs: {
|
|
59
|
+
filterValues: (channel, value) => +channel.id === +value.channel,
|
|
60
|
+
assignTabValue: (tabValue, data) => (data.channel = tabValue),
|
|
61
|
+
name: 'prices',
|
|
62
|
+
type: 'array',
|
|
63
|
+
layout: 'groups',
|
|
64
|
+
className: 'table',
|
|
65
|
+
array: {
|
|
66
|
+
columns: null,
|
|
67
|
+
disableAdd: ({ value }) => {
|
|
68
|
+
// limit to one price item, since "amount from" is not available
|
|
69
|
+
return value.length > 0;
|
|
70
|
+
},
|
|
71
|
+
fields: [
|
|
72
|
+
{
|
|
73
|
+
name: 'price',
|
|
74
|
+
label: 'price',
|
|
75
|
+
type: LocalizedPriceTextField,
|
|
76
|
+
renderValue: value => <LocalizedPriceValue data={value} />,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'priceNet',
|
|
80
|
+
label: 'price Net',
|
|
81
|
+
type: LocalizedPriceTextField,
|
|
82
|
+
renderValue: value => <LocalizedPriceValue data={value} />,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
42
87
|
},
|
|
43
88
|
];
|
|
44
89
|
|
|
@@ -13,8 +13,25 @@ const initialState = {
|
|
|
13
13
|
thumbUrl: '',
|
|
14
14
|
texts: [],
|
|
15
15
|
...tagsDataStructure,
|
|
16
|
+
prices: {
|
|
17
|
+
value: [],
|
|
18
|
+
schema: {
|
|
19
|
+
id: { value: null },
|
|
20
|
+
price: { value: null, constraints: { presence: true, decimalPoint: true } },
|
|
21
|
+
priceNet: { value: 0, constraints: { presence: true } },
|
|
22
|
+
channel: { value: null, constraints: { presence: true } },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
dependencies: [
|
|
28
|
+
{
|
|
29
|
+
name: 'channels',
|
|
30
|
+
dataKey: 'channels',
|
|
31
|
+
source: 'channels',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
16
34
|
},
|
|
17
|
-
null,
|
|
18
35
|
IMAGE_GALLERY_DATA_KEY
|
|
19
36
|
),
|
|
20
37
|
imageFile: null,
|
|
@@ -38,7 +38,6 @@ export default [
|
|
|
38
38
|
property="translation"
|
|
39
39
|
fallback={translated_value}
|
|
40
40
|
/>
|
|
41
|
-
<span> ({value})</span>
|
|
42
41
|
</span>
|
|
43
42
|
))}
|
|
44
43
|
</Join>
|
|
@@ -76,18 +75,17 @@ export default [
|
|
|
76
75
|
name: 'values',
|
|
77
76
|
label: 'Values',
|
|
78
77
|
type: 'dynSource',
|
|
79
|
-
placeholderFocused: 'item.attributes.searchOrAddAttributeValue',
|
|
80
78
|
sourceConfig: {
|
|
81
79
|
value: 'value',
|
|
82
80
|
text: 'label',
|
|
83
81
|
},
|
|
84
82
|
dynSource: {
|
|
85
|
-
type: '
|
|
83
|
+
type: 'attributeValueChip',
|
|
86
84
|
listKey: 'attributevalues',
|
|
87
85
|
url: 'attributevalues',
|
|
88
86
|
autoLoad: false,
|
|
89
87
|
maxSearchResults: 25,
|
|
90
|
-
mapItems: item => ({ ...item, label: `${item.translated_value} (${item.value})` }),
|
|
88
|
+
mapItems: item => ({ ...item, label: item.value === item.translated_value ? item.translated_value : `${item.translated_value} (${item.value})` }),
|
|
91
89
|
},
|
|
92
90
|
openOnFocus: true,
|
|
93
91
|
addButton: isFeatureAvailable('attribute_values') && {
|
|
@@ -40,7 +40,9 @@ require('../../App/i18n').use(
|
|
|
40
40
|
searchOrAddAttribute:
|
|
41
41
|
'Search for an existing attribute or add a new one by clicking on +',
|
|
42
42
|
searchOrAddAttributeValue:
|
|
43
|
-
'Search for
|
|
43
|
+
'Search for an existing value or add a new one by clicking on +',
|
|
44
|
+
searchOrAddNumbericAttributeValue:
|
|
45
|
+
'Search for an existing value or add a new with enter',
|
|
44
46
|
},
|
|
45
47
|
headline: 'This product is defined as follows:',
|
|
46
48
|
editorPopup: {
|
|
@@ -125,6 +127,8 @@ require('../../App/i18n').use(
|
|
|
125
127
|
addButtonLabel: 'Attribut hinzufügen',
|
|
126
128
|
searchOrAddAttribute: 'Suche ein vorhandenes Attribut oder lege ein neues mit dem + an',
|
|
127
129
|
searchOrAddAttributeValue: 'Suche einen Attributwert oder lege einen neuen mit dem + an',
|
|
130
|
+
searchOrAddNumbericAttributeValue:
|
|
131
|
+
'Suche einen Attributwert oder lege einen neuen mit der Eingabetaste an',
|
|
128
132
|
},
|
|
129
133
|
headline: 'Dieses Produkt ist folgendermaßen definiert:',
|
|
130
134
|
copyCreatorItemDialogTitle: 'Gewähltes Produkt kopieren',
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { T } from '../../../App/i18n';
|
|
3
|
+
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
4
|
+
import { LocalizedPriceTextField } from '../../../Components/LocalizedPriceTextField';
|
|
5
|
+
import LocalizedPriceValue from '../../../Components/LocalizedPriceValue';
|
|
1
6
|
import Actions, { REDUCER_NAME } from '../Reducers/Actions';
|
|
2
7
|
const { setFieldData, postData } = Actions;
|
|
3
8
|
|
|
@@ -23,9 +28,31 @@ const formFields = [
|
|
|
23
28
|
type: 'toggle',
|
|
24
29
|
},
|
|
25
30
|
{
|
|
26
|
-
name: '
|
|
27
|
-
label: '
|
|
28
|
-
type: '
|
|
31
|
+
name: 'imageDependent',
|
|
32
|
+
label: 'imageDependent.label',
|
|
33
|
+
type: 'select',
|
|
34
|
+
sourceConfig: {
|
|
35
|
+
text: ({ label }) => T(label),
|
|
36
|
+
value: 'value',
|
|
37
|
+
},
|
|
38
|
+
source: [
|
|
39
|
+
{ value: null, label: 'imageDependent.no', id: 'print' },
|
|
40
|
+
{
|
|
41
|
+
value: 'image_data_dependent',
|
|
42
|
+
label: 'imageDependent.imageDataDependent',
|
|
43
|
+
id: 'image_data_dependent',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: 'user_image_dependent',
|
|
47
|
+
label: 'imageDependent.userImageDependent',
|
|
48
|
+
id: 'user_image_dependent',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: 'gallery_image_dependent',
|
|
52
|
+
label: 'imageDependent.galleryImageDependent',
|
|
53
|
+
id: 'gallery_image_dependent',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
29
56
|
},
|
|
30
57
|
{
|
|
31
58
|
name: 'texts',
|
|
@@ -75,13 +102,13 @@ const formFields = [
|
|
|
75
102
|
name: 'price',
|
|
76
103
|
label: 'price',
|
|
77
104
|
type: LocalizedPriceTextField,
|
|
78
|
-
renderValue: value => <LocalizedPriceValue data={value}/>,
|
|
105
|
+
renderValue: value => <LocalizedPriceValue data={value} />,
|
|
79
106
|
},
|
|
80
107
|
{
|
|
81
108
|
name: 'priceNet',
|
|
82
109
|
label: 'price Net',
|
|
83
110
|
type: LocalizedPriceTextField,
|
|
84
|
-
renderValue: value => <LocalizedPriceValue data={value}/>,
|
|
111
|
+
renderValue: value => <LocalizedPriceValue data={value} />,
|
|
85
112
|
},
|
|
86
113
|
],
|
|
87
114
|
},
|
|
@@ -89,8 +116,4 @@ const formFields = [
|
|
|
89
116
|
},
|
|
90
117
|
];
|
|
91
118
|
|
|
92
|
-
import generateConnectedEdit from '../../../Components/DefaultConnectedForm';
|
|
93
|
-
import {LocalizedPriceTextField} from "../../../Components/LocalizedPriceTextField";
|
|
94
|
-
import LocalizedPriceValue from "../../../Components/LocalizedPriceValue";
|
|
95
|
-
import React from "react";
|
|
96
119
|
export default generateConnectedEdit(formFields, REDUCER_NAME, setFieldData, postData);
|
|
@@ -15,6 +15,13 @@ require('../../App/i18n').use(
|
|
|
15
15
|
addButtonLabel: 'Add Price',
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
|
+
imageDependent: {
|
|
19
|
+
label: 'Depending on the image data',
|
|
20
|
+
no: 'No',
|
|
21
|
+
imageDataDependent: 'Image data dependent (uploaded + images from image gallery)',
|
|
22
|
+
userImageDependent: 'Uploaded Image Data Dependent',
|
|
23
|
+
galleryImageDependent: 'Image gallery Data Dependent',
|
|
24
|
+
},
|
|
18
25
|
},
|
|
19
26
|
de: {
|
|
20
27
|
designer_global_calculation_types: 'Globale Kalkulationsposten',
|
|
@@ -31,6 +38,13 @@ require('../../App/i18n').use(
|
|
|
31
38
|
addButtonLabel: 'Preis hinzufügen',
|
|
32
39
|
},
|
|
33
40
|
},
|
|
41
|
+
imageDependent: {
|
|
42
|
+
label: 'Abhängig von den Bilddaten',
|
|
43
|
+
no: 'Nein',
|
|
44
|
+
imageDataDependent: 'Abhängig von Bilddaten (hochgeladene + Bildern aus der Bildergalerie)',
|
|
45
|
+
userImageDependent: 'Abhängig von hochgeladenen Bildern',
|
|
46
|
+
galleryImageDependent: 'Abhängig von Bildern aus der Bildergalerie',
|
|
47
|
+
},
|
|
34
48
|
},
|
|
35
49
|
},
|
|
36
50
|
true
|
|
@@ -30,6 +30,17 @@ const styles = theme => ({
|
|
|
30
30
|
},
|
|
31
31
|
inputRoot: {
|
|
32
32
|
flexWrap: 'wrap',
|
|
33
|
+
'& input[type=number]': {
|
|
34
|
+
'-moz-appearance': 'textfield'
|
|
35
|
+
},
|
|
36
|
+
'& input[type=number]::-webkit-outer-spin-button': {
|
|
37
|
+
'-webkit-appearance': 'none',
|
|
38
|
+
margin: 0
|
|
39
|
+
},
|
|
40
|
+
'& input[type=number]::-webkit-inner-spin-button': {
|
|
41
|
+
'-webkit-appearance': 'none',
|
|
42
|
+
margin: 0
|
|
43
|
+
}
|
|
33
44
|
},
|
|
34
45
|
inputInput: {
|
|
35
46
|
flexGrow: 1,
|
|
@@ -110,6 +121,9 @@ class ChipInput extends React.Component {
|
|
|
110
121
|
onFocus,
|
|
111
122
|
placeholder,
|
|
112
123
|
filter,
|
|
124
|
+
onInputEnterKey,
|
|
125
|
+
resetOnInputEnterKey,
|
|
126
|
+
textFieldType,
|
|
113
127
|
} = this.props;
|
|
114
128
|
const { selectedItem, inputValue } = this.state;
|
|
115
129
|
const textLabel = floatingLabelText;
|
|
@@ -143,6 +157,15 @@ class ChipInput extends React.Component {
|
|
|
143
157
|
onFocus,
|
|
144
158
|
}),
|
|
145
159
|
classes,
|
|
160
|
+
type: textFieldType,
|
|
161
|
+
onKeyDown: (evt) => {
|
|
162
|
+
if (!highlightedIndex && onInputEnterKey && evt.keyCode === 13) {
|
|
163
|
+
onInputEnterKey(evt);
|
|
164
|
+
if (resetOnInputEnterKey) {
|
|
165
|
+
this.setState({ inputValue: '' });
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
146
169
|
})}
|
|
147
170
|
|
|
148
171
|
{isOpen ? (
|
package/scripts/cpFavicon.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* eslint no-console: 0 */
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This script is made to copy the favicon from public folder
|
|
5
|
-
* into the same destination in the client projects
|
|
6
|
-
*
|
|
7
|
-
* Runs only when installing this package as a dependency in client projects
|
|
8
|
-
*
|
|
9
|
-
* usage: node ./scripts/cpFavicon.js
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
const path = require('path');
|
|
14
|
-
const fs = require('fs');
|
|
15
|
-
const { isDependency } = require('./utils/process');
|
|
16
|
-
|
|
17
|
-
if (isDependency()) {
|
|
18
|
-
const dir = path.resolve(__dirname, '../../../../public');
|
|
19
|
-
if (!fs.existsSync(dir)) {
|
|
20
|
-
fs.mkdirSync(dir);
|
|
21
|
-
}
|
|
22
|
-
const src = path.resolve(__dirname, '../public/favicon.ico');
|
|
23
|
-
const dst = path.resolve(dir, 'favicon.ico');
|
|
24
|
-
// copy it only if there is no favicon.ico (which can be already a custom one) in the target location
|
|
25
|
-
if (!fs.existsSync(dst)) {
|
|
26
|
-
fs.createReadStream(src).pipe(fs.createWriteStream(dst));
|
|
27
|
-
}
|
|
28
|
-
}
|