@configuratorware/configurator-admingui 1.40.6 → 1.41.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.
Files changed (39) hide show
  1. package/Components/FormFragments/Checkbox.js +6 -2
  2. package/Screens/Channel/Containers/Edit.js +8 -0
  3. package/Screens/Channel/Reducers/Reducer.js +3 -0
  4. package/Screens/Channel/Translations.js +2 -1
  5. package/Screens/Client/Components/ColorTextField.js +35 -7
  6. package/Screens/Client/Components/PdfMarkdownField.js +0 -2
  7. package/Screens/Client/Translations.js +2 -0
  8. package/Screens/Creator/Components/OptionclassificationEditor.js +89 -12
  9. package/Screens/Creator/Containers/Edit.js +9 -5
  10. package/Screens/Creator/Reducers/ConfigurationActions.js +82 -3
  11. package/Screens/Creator/Reducers/ConfigurationReducer.js +53 -1
  12. package/Screens/Creator/Translations.js +6 -2
  13. package/Screens/CurrentClient/Containers/Edit.js +3 -1
  14. package/Screens/DefaultClient/Containers/Edit.js +3 -1
  15. package/Screens/DesignProductionMethods/Containers/Edit.js +5 -1
  16. package/Screens/DesignProductionMethods/Reducers/DesignProductionMethodsReducer.js +3 -0
  17. package/Screens/DesignProductionMethods/Translations.js +4 -2
  18. package/Screens/Item/Components/Styles.scss +11 -10
  19. package/package.json +2 -2
  20. package/src/Components/Form.js +1 -1
  21. package/src/Components/FormFragments/Checkbox.js +16 -12
  22. package/src/Components/FormFragments/index.js +1 -1
  23. package/src/Screens/Channel/Containers/Edit.js +11 -0
  24. package/src/Screens/Channel/Reducers/Reducer.js +1 -0
  25. package/src/Screens/Channel/Translations.js +1 -0
  26. package/src/Screens/Client/Components/ColorTextField.js +72 -47
  27. package/src/Screens/Client/Components/PdfMarkdownField.js +1 -2
  28. package/src/Screens/Client/Translations.js +4 -0
  29. package/src/Screens/Creator/Components/OptionclassificationEditor.js +93 -17
  30. package/src/Screens/Creator/Containers/Edit.js +7 -3
  31. package/src/Screens/Creator/Reducers/ConfigurationActions.js +40 -0
  32. package/src/Screens/Creator/Reducers/ConfigurationReducer.js +57 -0
  33. package/src/Screens/Creator/Translations.js +4 -0
  34. package/src/Screens/CurrentClient/Containers/Edit.js +2 -1
  35. package/src/Screens/DefaultClient/Containers/Edit.js +2 -1
  36. package/src/Screens/DesignProductionMethods/Containers/Edit.js +17 -8
  37. package/src/Screens/DesignProductionMethods/Reducers/DesignProductionMethodsReducer.js +1 -0
  38. package/src/Screens/DesignProductionMethods/Translations.js +4 -2
  39. package/src/Screens/Item/Components/Styles.scss +11 -10
@@ -22,6 +22,7 @@ import {
22
22
  CONFIGURATION_SHOW_CREATOR_PREVIEW_ERROR,
23
23
  CONFIGURATION_HIDE_DESIGNER_PREVIEW_ERROR,
24
24
  CONFIGURATION_HIDE_CREATOR_PREVIEW_ERROR,
25
+ CONFIGURATION_SET_OVERRIDE_OPTION_ORDER,
25
26
  } from './ConfigurationActions';
26
27
 
27
28
  import { getDefaultEntityState, defaultEntityReducer } from '../../../App/Reducers/Entity/Reducer';
@@ -80,6 +81,7 @@ const initialState = {
80
81
  showConfigurator: false,
81
82
  showOpenDesignerPreviewError: false,
82
83
  showOpenCreatorPreviewError: false,
84
+ showOverrideOptionOrderSaveHint: false,
83
85
  };
84
86
 
85
87
  export const baseConfigurationData = createFeatureReducer(
@@ -129,6 +131,13 @@ export const baseConfigurationData = createFeatureReducer(
129
131
  adminModeHash,
130
132
  };
131
133
  }
134
+
135
+ if (action.key === CONFIGURATION_DATA_KEY) {
136
+ return {
137
+ ...state,
138
+ showOverrideOptionOrderSaveHint: false
139
+ }
140
+ }
132
141
 
133
142
  return state;
134
143
  }
@@ -318,6 +327,54 @@ export const baseConfigurationData = createFeatureReducer(
318
327
  };
319
328
  }
320
329
 
330
+ case CONFIGURATION_SET_OVERRIDE_OPTION_ORDER: {
331
+ const overrideOptionOrder = action.value;
332
+
333
+ let nextState = state;
334
+ let showOverrideOptionOrderSaveHint = false;
335
+ if (!overrideOptionOrder) {
336
+ showOverrideOptionOrderSaveHint = true;
337
+ // reset options seuqence number -> global sequence number will be used when loading in FE
338
+ const { data } = state;
339
+ const { selectableComponents } = data;
340
+
341
+ const { value: currentOptionclassifications } = selectableComponents;
342
+ currentOptionclassifications.forEach((optionClassification) => optionClassification.selectableOptions.forEach(
343
+ (option) => option.sequenceNumber = null
344
+ ));
345
+
346
+ nextState = {
347
+ ...state,
348
+ data: {
349
+ ...data,
350
+ selectableComponents: {
351
+ ...selectableComponents,
352
+ value: currentOptionclassifications,
353
+ },
354
+ },
355
+ };
356
+ }
357
+
358
+ const { data } = nextState;
359
+ const { item } = data;
360
+ const { value } = item;
361
+
362
+ return {
363
+ ...nextState,
364
+ showOverrideOptionOrderSaveHint,
365
+ data: {
366
+ ...data,
367
+ item: {
368
+ ...item,
369
+ value: {
370
+ ...value,
371
+ overrideOptionOrder,
372
+ },
373
+ },
374
+ },
375
+ };
376
+ }
377
+
321
378
  default:
322
379
  state = defaultEntityReducer(state, action, initialState);
323
380
 
@@ -64,6 +64,8 @@ require('../../App/i18n').use(
64
64
  description: 'Option "%{option}" in Component "%{component}" by Product "%{product}"',
65
65
  addButtonLabel: 'Add price',
66
66
  },
67
+ overrideOptionOrder: 'Edit option order for item</br>(when deactivated, the global option order is used)',
68
+ overrideOptionOrderHint: '</br></br>In order to see the options globally, you have to save your current changes.'
67
69
  },
68
70
  openPreviewError: {
69
71
  title: 'Missing data',
@@ -136,6 +138,8 @@ require('../../App/i18n').use(
136
138
  description: 'Option "%{option}" in Komponente "%{component}" an Produkt "%{product}"',
137
139
  addButtonLabel: 'Preis hinzufügen',
138
140
  },
141
+ overrideOptionOrder: 'Optionsreihenfolge auf Produktebene pflegen </br>(Wenn deaktiviert, greift die globale Optionsreihenfolge)',
142
+ overrideOptionOrderHint: '</br></br>Um die globale Sortierung der Optionen anzuwenden, speichere bitte deine aktuellen Änderungen.'
139
143
  },
140
144
  openPreviewError: {
141
145
  title: 'Fehlende Daten',
@@ -5,6 +5,7 @@ import { withLoadAction } from '../../../Components/withLoadAction';
5
5
  import { T, t } from '../../../App/i18n';
6
6
  import { CallToActionField } from '../../../Components/CallToActionField';
7
7
  import PdfMarkDownField from '../../Client/Components/PdfMarkdownField';
8
+ import ColorTextField from '../../Client/Components/ColorTextField';
8
9
 
9
10
  const formFields = [
10
11
  {
@@ -14,7 +15,7 @@ const formFields = [
14
15
  {
15
16
  name: 'highlightColor',
16
17
  label: 'Theme - Highlight color',
17
- type: 'text',
18
+ type: ColorTextField,
18
19
  },
19
20
  {
20
21
  name: 'font',
@@ -4,6 +4,7 @@ import { withLoadAction } from '../../../Components/withLoadAction';
4
4
  import SimpleNestedData from '../../../Components/FormFragments/SimpleNestedData';
5
5
  import { t, T } from '../../../App/i18n';
6
6
  import PdfMarkDownField from '../../Client/Components/PdfMarkdownField';
7
+ import ColorTextField from '../../Client/Components/ColorTextField';
7
8
 
8
9
  const formFields = [
9
10
  {
@@ -13,7 +14,7 @@ const formFields = [
13
14
  {
14
15
  name: 'highlightColor',
15
16
  label: 'Theme - Highlight color',
16
- type: 'text',
17
+ type: ColorTextField,
17
18
  },
18
19
  {
19
20
  name: 'font',
@@ -5,8 +5,8 @@ import SimpleNestedData from '../../../Components/FormFragments/SimpleNestedData
5
5
  import Toggle from '../../../Components/FormFragments/Toggle';
6
6
  import { T } from '../../../App/i18n';
7
7
  import TranslationFinder, { findTranslation } from '../../../Components/TranslationFinder';
8
- import {LocalizedPriceTextField} from "../../../Components/LocalizedPriceTextField";
9
- import LocalizedPriceValue from "../../../Components/LocalizedPriceValue";
8
+ import { LocalizedPriceTextField } from '../../../Components/LocalizedPriceTextField';
9
+ import LocalizedPriceValue from '../../../Components/LocalizedPriceValue';
10
10
 
11
11
  const formFields = [
12
12
  {
@@ -29,7 +29,12 @@ const formFields = [
29
29
  fields: [
30
30
  {
31
31
  name: 'vectorsRequired',
32
- label: 'Vectors Required',
32
+ label: 'vectorsRequired',
33
+ type: 'checkbox',
34
+ },
35
+ {
36
+ name: 'vectorizedLogoMandatory',
37
+ label: 'vectorizedLogoMandatory',
33
38
  type: 'checkbox',
34
39
  },
35
40
  {
@@ -192,9 +197,13 @@ const formFields = [
192
197
  className: 'table',
193
198
  array: {
194
199
  disableAdd: ({ parentSchema, value }) => {
195
- const colorAmountDependent = parentSchema.colorAmountDependent && parentSchema.colorAmountDependent.value;
196
- const itemAmountDependent = parentSchema.itemAmountDependent && parentSchema.itemAmountDependent.value;
197
- return !colorAmountDependent && !itemAmountDependent && value.length > 0;
200
+ const colorAmountDependent =
201
+ parentSchema.colorAmountDependent &&
202
+ parentSchema.colorAmountDependent.value;
203
+ const itemAmountDependent =
204
+ parentSchema.itemAmountDependent &&
205
+ parentSchema.itemAmountDependent.value;
206
+ return !colorAmountDependent && !itemAmountDependent && value.length > 0;
198
207
  },
199
208
  addButtonLabel: 'designProductionMethod.prices.addButtonLabel',
200
209
  columns: null,
@@ -203,13 +212,13 @@ const formFields = [
203
212
  name: 'price',
204
213
  label: 'Price',
205
214
  type: LocalizedPriceTextField,
206
- renderValue: value => <LocalizedPriceValue data={value}/>,
215
+ renderValue: value => <LocalizedPriceValue data={value} />,
207
216
  },
208
217
  {
209
218
  name: 'priceNet',
210
219
  label: 'Price Net',
211
220
  type: LocalizedPriceTextField,
212
- renderValue: value => <LocalizedPriceValue data={value}/>,
221
+ renderValue: value => <LocalizedPriceValue data={value} />,
213
222
  },
214
223
  {
215
224
  name: 'colorAmountFrom',
@@ -12,6 +12,7 @@ const initialState = {
12
12
  value: {},
13
13
  schema: {
14
14
  vectorsRequired: { value: false },
15
+ vectorizedLogoMandatory: { value: false },
15
16
  visualizationEffect: { value: 'print', constraints: { presence: false } },
16
17
  maxColorAmount: {
17
18
  value: 0,
@@ -20,7 +20,8 @@ require('../../App/i18n').use(
20
20
  embroidery: 'embroidery',
21
21
  doming: 'doming',
22
22
  },
23
- 'Vectors Required': 'Vectors Required',
23
+ vectorsRequired: 'Colorize step is mandatory',
24
+ vectorizedLogoMandatory: 'Force using vectorized logo',
24
25
  'Maximum Color Amount': 'Maximum Color Amount',
25
26
  'Minimum Font Size': 'Minimum Font Size',
26
27
  'Has Engraving Background Colors': 'Has Engraving Background Colors',
@@ -56,7 +57,8 @@ require('../../App/i18n').use(
56
57
  embroidery: 'Stick',
57
58
  doming: 'Doming',
58
59
  },
59
- 'Vectors Required': 'Erfordert Vektorisierung',
60
+ vectorsRequired: 'Umfärben erzwingen',
61
+ vectorizedLogoMandatory: 'Vektorisierte Bilddaten müssen verwendet werden',
60
62
  'Maximum Color Amount': 'Maximale Farbanzahl',
61
63
  'Minimum Font Size': 'Minimale Schriftgröße',
62
64
  'Has Engraving Background Colors': 'Hat Gravur-Hintergrundfarben',
@@ -63,19 +63,20 @@
63
63
  overflow-y: hidden;
64
64
  height: 250px;
65
65
  white-space: nowrap;
66
-
67
- li {
68
- white-space: normal;
69
- display: inline-block;
70
- width: calc(25% - 10px);
71
- margin-right: 10px;
72
- height: 100%;
73
- vertical-align: top;
74
- padding: 0 10px;
75
- }
76
66
  }
77
67
  }
78
68
 
69
+ .draggable-option-item {
70
+ list-style-type: none;
71
+ white-space: normal;
72
+ display: inline-block;
73
+ width: calc(25% - 10px);
74
+ margin-right: 10px;
75
+ height: 100%;
76
+ vertical-align: top;
77
+ padding: 0 10px;
78
+ }
79
+
79
80
  .optionclassificationEditor-item {
80
81
 
81
82
  .headline {