@eeacms/volto-eea-website-theme 1.34.0 → 2.0.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 (54) hide show
  1. package/.eslintrc.js +7 -2
  2. package/CHANGELOG.md +53 -1
  3. package/docker-compose.yml +1 -1
  4. package/jest-addon.config.js +3 -0
  5. package/package.json +2 -1
  6. package/src/components/manage/Blocks/LayoutSettings/index.js +3 -1
  7. package/src/components/manage/Blocks/Title/index.js +3 -1
  8. package/src/components/manage/Blocks/Title/schema.js +3 -1
  9. package/src/components/theme/Banner/View.jsx +12 -5
  10. package/src/components/theme/DraftBackground/DraftBackground.jsx +30 -21
  11. package/src/components/theme/DraftBackground/DraftBackground.test.jsx +85 -0
  12. package/src/config.js +2 -0
  13. package/src/customizations/@plone/volto-slate/blocks/Text/TextBlockView.jsx +32 -0
  14. package/src/customizations/@plone/volto-slate/editor/render.jsx +75 -0
  15. package/src/customizations/@plone/volto-slate/elementEditor/utils.js +76 -75
  16. package/src/customizations/volto/components/manage/Blocks/Grid/Edit.jsx +70 -0
  17. package/src/customizations/volto/components/manage/Blocks/Grid/View.jsx +61 -0
  18. package/src/customizations/volto/components/manage/Blocks/Grid/readme.md +1 -0
  19. package/src/customizations/volto/components/manage/Blocks/Image/Edit.jsx +82 -23
  20. package/src/customizations/volto/components/manage/Blocks/Image/Edit.test.jsx +10 -3
  21. package/src/customizations/volto/components/manage/Blocks/Image/View.jsx +110 -111
  22. package/src/customizations/volto/components/manage/Blocks/Image/schema.js +17 -2
  23. package/src/customizations/volto/components/manage/Blocks/LeadImage/Edit.jsx +35 -14
  24. package/src/customizations/volto/components/manage/Blocks/LeadImage/View.jsx +65 -79
  25. package/src/customizations/volto/components/manage/Display/Display.jsx +306 -0
  26. package/src/customizations/volto/components/manage/Display/Readme.md +1 -0
  27. package/src/customizations/volto/components/manage/Sidebar/SidebarPopup copy.jsx +82 -0
  28. package/src/customizations/volto/components/manage/Toolbar/More.jsx +541 -0
  29. package/src/customizations/volto/components/manage/UniversalLink/UniversalLink.jsx +3 -1
  30. package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.jsx +24 -14
  31. package/src/customizations/volto/components/manage/Widgets/README.md +1 -0
  32. package/src/customizations/volto/components/manage/Workflow/README.txt +1 -0
  33. package/src/customizations/volto/components/manage/Workflow/Workflow.jsx +324 -0
  34. package/src/customizations/volto/components/manage/Workflow/Workflow.test.jsx +81 -0
  35. package/src/customizations/volto/components/theme/Comments/Comments.jsx +1 -2
  36. package/src/customizations/volto/components/theme/ContactForm/ContactForm.jsx +1 -1
  37. package/src/customizations/volto/components/theme/EventDetails/EventDetails.jsx +1 -0
  38. package/src/index.js +21 -16
  39. package/src/middleware/ok.js +4 -2
  40. package/src/middleware/voltoCustom.js +4 -2
  41. package/src/slate.js +10 -8
  42. package/src/customizations/@plone/volto-slate/editor/plugins/StyleMenu/README.txt +0 -1
  43. package/src/customizations/@plone/volto-slate/editor/plugins/StyleMenu/StyleMenu.jsx +0 -157
  44. package/src/customizations/@plone/volto-slate/editor/plugins/StyleMenu/utils.js +0 -168
  45. package/src/customizations/volto/components/manage/Add/Add.jsx +0 -498
  46. package/src/customizations/volto/components/manage/Add/readme.md +0 -1
  47. package/src/customizations/volto/components/manage/Contents/ContentsPropertiesModal.jsx +0 -232
  48. package/src/customizations/volto/components/manage/Form/Form.jsx +0 -810
  49. package/src/customizations/volto/components/manage/Form/Form.test.jsx +0 -1124
  50. package/src/customizations/volto/components/manage/Form/ModalForm.jsx +0 -326
  51. package/src/customizations/volto/components/manage/Sharing/Sharing.jsx +0 -528
  52. package/src/customizations/volto/components/manage/Sharing/Sharing.test.jsx +0 -72
  53. package/src/customizations/volto/components/manage/Widgets/ObjectBrowserWidget.test.jsx +0 -193
  54. package/src/customizations/volto/components/theme/AppExtras/AppExtras.jsx +0 -27
@@ -1,232 +0,0 @@
1
- /**
2
- * Contents properties modal.
3
- * @module components/manage/Contents/ContentsPropertiesModal
4
- */
5
-
6
- import React, { Component } from 'react';
7
- import PropTypes from 'prop-types';
8
- import { connect } from 'react-redux';
9
- import { compose } from 'redux';
10
- import { isEmpty, map } from 'lodash';
11
- import { defineMessages, injectIntl } from 'react-intl';
12
-
13
- import { updateContent } from '@plone/volto/actions';
14
- import { ModalForm } from '@plone/volto/components';
15
-
16
- const messages = defineMessages({
17
- properties: {
18
- id: 'Properties',
19
- defaultMessage: 'Properties',
20
- },
21
- default: {
22
- id: 'Default',
23
- defaultMessage: 'Default',
24
- },
25
- effectiveTitle: {
26
- id: 'Publishing Date',
27
- defaultMessage: 'Publishing Date',
28
- },
29
- effectiveDescription: {
30
- id:
31
- 'If this date is in the future, the content will not show up in listings and searches until this date.',
32
- defaultMessage:
33
- 'If this date is in the future, the content will not show up in listings and searches until this date.',
34
- },
35
- expiresTitle: {
36
- id: 'Expiration Date',
37
- defaultMessage: 'Expiration Date',
38
- },
39
- expiresDescription: {
40
- id:
41
- 'When this date is reached, the content will nolonger be visible in listings and searches.',
42
- defaultMessage:
43
- 'When this date is reached, the content will nolonger be visible in listings and searches.',
44
- },
45
- rightsTitle: {
46
- id: 'Rights',
47
- defaultMessage: 'Rights',
48
- },
49
- rightsDescription: {
50
- id: 'Copyright statement or other rights information on this item.',
51
- defaultMessage:
52
- 'Copyright statement or other rights information on this item.',
53
- },
54
- creatorsTitle: {
55
- id: 'Creators',
56
- defaultMessage: 'Creators',
57
- },
58
- creatorsDescription: {
59
- id:
60
- 'Persons responsible for creating the content of this item. Please enter a list of user names, one per line. The principal creator should come first.',
61
- defaultMessage:
62
- 'Persons responsible for creating the content of this item. Please enter a list of user names, one per line. The principal creator should come first.',
63
- },
64
- excludeFromNavTitle: {
65
- id: 'Exclude from navigation',
66
- defaultMessage: 'Exclude from navigation',
67
- },
68
- excludeFromNavDescription: {
69
- id: 'If selected, this item will not appear in the navigation tree',
70
- defaultMessage:
71
- 'If selected, this item will not appear in the navigation tree',
72
- },
73
- yes: {
74
- id: 'Yes',
75
- defaultMessage: 'Yes',
76
- },
77
- no: {
78
- id: 'No',
79
- defaultMessage: 'No',
80
- },
81
- });
82
-
83
- /**
84
- * ContentsPropertiesModal class.
85
- * @class ContentsPropertiesModal
86
- * @extends Component
87
- */
88
- class ContentsPropertiesModal extends Component {
89
- /**
90
- * Property types.
91
- * @property {Object} propTypes Property types.
92
- * @static
93
- */
94
- static propTypes = {
95
- updateContent: PropTypes.func.isRequired,
96
- items: PropTypes.arrayOf(PropTypes.string).isRequired,
97
- request: PropTypes.shape({
98
- loading: PropTypes.bool,
99
- loaded: PropTypes.bool,
100
- }).isRequired,
101
- open: PropTypes.bool.isRequired,
102
- onOk: PropTypes.func.isRequired,
103
- onCancel: PropTypes.func.isRequired,
104
- };
105
-
106
- /**
107
- * Constructor
108
- * @method constructor
109
- * @param {Object} props Component properties
110
- * @constructs ContentsUploadModal
111
- */
112
- constructor(props) {
113
- super(props);
114
-
115
- this.onSubmit = this.onSubmit.bind(this);
116
- }
117
-
118
- /**
119
- * Component will receive props
120
- * @method componentWillReceiveProps
121
- * @param {Object} nextProps Next properties
122
- * @returns {undefined}
123
- */
124
- UNSAFE_componentWillReceiveProps(nextProps) {
125
- if (this.props.request.loading && nextProps.request.loaded) {
126
- this.props.onOk();
127
- }
128
- }
129
-
130
- /**
131
- * Submit handler
132
- * @method onSubmit
133
- * @param {Object} data Form data
134
- * @returns {undefined}
135
- */
136
- onSubmit(data) {
137
- if (isEmpty(data)) {
138
- this.props.onOk();
139
- } else {
140
- this.props.updateContent(
141
- this.props.items,
142
- map(this.props.items, () => data),
143
- );
144
- }
145
- }
146
-
147
- /**
148
- * Render method.
149
- * @method render
150
- * @returns {string} Markup for the component.
151
- */
152
- render() {
153
- return (
154
- this.props.open && (
155
- <ModalForm
156
- open={this.props.open}
157
- onSubmit={this.onSubmit}
158
- onCancel={this.props.onCancel}
159
- title={this.props.intl.formatMessage(messages.properties)}
160
- schema={{
161
- fieldsets: [
162
- {
163
- id: 'default',
164
- title: this.props.intl.formatMessage(messages.default),
165
- fields: [
166
- 'effective',
167
- 'expires',
168
- 'rights',
169
- 'creators',
170
- 'exclude_from_nav',
171
- ],
172
- },
173
- ],
174
- properties: {
175
- effective: {
176
- description: this.props.intl.formatMessage(
177
- messages.effectiveDescription,
178
- ),
179
- title: this.props.intl.formatMessage(messages.effectiveTitle),
180
- type: 'string',
181
- widget: 'datetime',
182
- },
183
- expires: {
184
- description: this.props.intl.formatMessage(
185
- messages.expiresDescription,
186
- ),
187
- title: this.props.intl.formatMessage(messages.expiresTitle),
188
- type: 'string',
189
- widget: 'datetime',
190
- },
191
- rights: {
192
- description: this.props.intl.formatMessage(
193
- messages.rightsDescription,
194
- ),
195
- title: this.props.intl.formatMessage(messages.rightsTitle),
196
- type: 'string',
197
- widget: 'textarea',
198
- },
199
- creators: {
200
- description: this.props.intl.formatMessage(
201
- messages.creatorsDescription,
202
- ),
203
- title: this.props.intl.formatMessage(messages.creatorsTitle),
204
- type: 'array',
205
- },
206
- exclude_from_nav: {
207
- description: this.props.intl.formatMessage(
208
- messages.excludeFromNavDescription,
209
- ),
210
- title: this.props.intl.formatMessage(
211
- messages.excludeFromNavTitle,
212
- ),
213
- type: 'boolean',
214
- },
215
- },
216
- required: [],
217
- }}
218
- />
219
- )
220
- );
221
- }
222
- }
223
-
224
- export default compose(
225
- injectIntl,
226
- connect(
227
- (state) => ({
228
- request: state.content.update,
229
- }),
230
- { updateContent },
231
- ),
232
- )(ContentsPropertiesModal);