@plone/volto 15.2.0 → 15.2.3

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 (41) hide show
  1. package/.github/workflows/docs.yml +2 -2
  2. package/CHANGELOG.md +46 -1
  3. package/dist/assets.json +1 -1
  4. package/dist/chunks.json +6 -6
  5. package/dist/loadable-stats.json +29 -29
  6. package/dist/public/static/css/{14.803b450c.chunk.css → 14.a04d758b.chunk.css} +1 -1
  7. package/dist/public/static/css/{client.596efd64.chunk.css → client.e92d281f.chunk.css} +1 -1
  8. package/dist/public/static/js/14.a04d758b.chunk.js +3 -0
  9. package/dist/public/static/js/{14.803b450c.chunk.js.LICENSE.txt → 14.a04d758b.chunk.js.LICENSE.txt} +0 -0
  10. package/dist/public/static/js/client.e92d281f.chunk.js +2 -0
  11. package/dist/server.js +1 -1
  12. package/netlify.toml +3 -0
  13. package/package.json +2 -2
  14. package/src/components/manage/Blocks/Video/Edit.jsx +3 -13
  15. package/src/components/manage/Blocks/Video/View.jsx +3 -13
  16. package/src/components/manage/Multilingual/ManageTranslations.jsx +7 -2
  17. package/src/components/manage/Widgets/EmailWidget.jsx +14 -1
  18. package/src/components/manage/Widgets/NumberWidget.jsx +3 -0
  19. package/src/components/manage/Widgets/PasswordWidget.jsx +12 -1
  20. package/src/components/manage/Widgets/UrlWidget.jsx +13 -1
  21. package/src/config/RichTextEditor/index.js +1 -0
  22. package/src/config/index.js +0 -1
  23. package/src/express-middleware/sitemap.js +11 -4
  24. package/src/helpers/Sitemap/Sitemap.js +2 -1
  25. package/src/helpers/Vocabularies/Vocabularies.js +6 -3
  26. package/src/helpers/index.js +2 -0
  27. package/src/icons/annotation.svg +3 -0
  28. package/src/icons/asterisk.svg +6 -0
  29. package/src/icons/cards.svg +5 -0
  30. package/src/icons/chunk.svg +3 -0
  31. package/src/icons/enterprise.svg +7 -7
  32. package/src/icons/grid.svg +8 -0
  33. package/src/icons/map.svg +3 -0
  34. package/src/icons/page.svg +5 -5
  35. package/src/icons/showcase.svg +9 -0
  36. package/src/icons/spy.svg +1 -4
  37. package/src/icons/strickthrough.svg +3 -0
  38. package/src/icons/verified.svg +3 -3
  39. package/src/middleware/api.js +24 -23
  40. package/dist/public/static/js/14.803b450c.chunk.js +0 -3
  41. package/dist/public/static/js/client.596efd64.chunk.js +0 -2
package/netlify.toml CHANGED
@@ -1,2 +1,5 @@
1
1
  [build.environment]
2
2
  PYTHON_VERSION = "3.8"
3
+
4
+ [build]
5
+ ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./docs/"
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "15.2.0",
12
+ "version": "15.2.3",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -417,7 +417,7 @@
417
417
  "tlds": "1.203.1",
418
418
  "undoo": "0.5.0",
419
419
  "universal-cookie-express": "4.0.3",
420
- "use-deep-compare-effect": "1.6.1",
420
+ "use-deep-compare-effect": "1.8.1",
421
421
  "xmlrpc": "1.3.2",
422
422
  "yarn-deduplicate": "3.1.0",
423
423
  "yarnhook": "0.5.1"
@@ -14,12 +14,7 @@ import { Icon, SidebarPortal, VideoSidebar } from '@plone/volto/components';
14
14
  import clearSVG from '@plone/volto/icons/clear.svg';
15
15
  import aheadSVG from '@plone/volto/icons/ahead.svg';
16
16
  import videoBlockSVG from '@plone/volto/components/manage/Blocks/Video/block-video.svg';
17
- import {
18
- isInternalURL,
19
- getParentUrl,
20
- flattenToAppURL,
21
- } from '@plone/volto/helpers';
22
- import config from '@plone/volto/registry';
17
+ import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
23
18
 
24
19
  const messages = defineMessages({
25
20
  VideoFormDescription: {
@@ -257,13 +252,8 @@ class Edit extends Component {
257
252
  // eslint-disable-next-line jsx-a11y/media-has-caption
258
253
  <video
259
254
  src={
260
- isInternalURL(
261
- data.url.replace(
262
- getParentUrl(config.settings.apiPath),
263
- '',
264
- ),
265
- )
266
- ? `${data.url}/@@download/file`
255
+ isInternalURL(data.url)
256
+ ? `${flattenToAppURL(data.url)}/@@download/file`
267
257
  : data.url
268
258
  }
269
259
  controls
@@ -7,12 +7,7 @@ import React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import { Embed } from 'semantic-ui-react';
9
9
  import cx from 'classnames';
10
- import {
11
- isInternalURL,
12
- getParentUrl,
13
- flattenToAppURL,
14
- } from '@plone/volto/helpers';
15
- import config from '@plone/volto/registry';
10
+ import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
16
11
 
17
12
  /**
18
13
  * View video block class.
@@ -121,13 +116,8 @@ const View = ({ data }) => (
121
116
  // eslint-disable-next-line jsx-a11y/media-has-caption
122
117
  <video
123
118
  src={
124
- isInternalURL(
125
- data.url.replace(
126
- getParentUrl(config.settings.apiPath),
127
- '',
128
- ),
129
- )
130
- ? `${data.url}/@@download/file`
119
+ isInternalURL(data.url)
120
+ ? `${flattenToAppURL(data.url)}/@@download/file`
131
121
  : data.url
132
122
  }
133
123
  controls
@@ -78,7 +78,12 @@ const ManageTranslations = (props) => {
78
78
  // Only execute the link API call on the final item selected, once the ObjectBrowser
79
79
  // is closed
80
80
  if (!isObjectBrowserOpen && currentSelectedItem.current) {
81
- dispatch(linkTranslation(content['@id'], currentSelectedItem.current))
81
+ dispatch(
82
+ linkTranslation(
83
+ flattenToAppURL(content['@id']),
84
+ currentSelectedItem.current,
85
+ ),
86
+ )
82
87
  .then((resp) => {
83
88
  toast.success(
84
89
  <Toast
@@ -128,7 +133,7 @@ const ManageTranslations = (props) => {
128
133
  }
129
134
 
130
135
  function onDeleteTranslation(lang) {
131
- dispatch(deleteLinkTranslation(content['@id'], lang))
136
+ dispatch(deleteLinkTranslation(flattenToAppURL(content['@id']), lang))
132
137
  .then((resp) => {
133
138
  toast.success(
134
139
  <Toast
@@ -20,7 +20,17 @@ import { Input } from 'semantic-ui-react';
20
20
  * ```
21
21
  */
22
22
  const EmailWidget = (props) => {
23
- const { id, value, onChange, onBlur, onClick, minLength, maxLength } = props;
23
+ const {
24
+ id,
25
+ value,
26
+ onChange,
27
+ onBlur,
28
+ onClick,
29
+ minLength,
30
+ maxLength,
31
+ placeholder,
32
+ isDisabled,
33
+ } = props;
24
34
  const inputId = `field-${id}`;
25
35
 
26
36
  return (
@@ -30,6 +40,8 @@ const EmailWidget = (props) => {
30
40
  name={id}
31
41
  type="email"
32
42
  value={value || ''}
43
+ disabled={isDisabled}
44
+ placeholder={placeholder}
33
45
  onChange={({ target }) =>
34
46
  onChange(id, target.value === '' ? undefined : target.value)
35
47
  }
@@ -61,6 +73,7 @@ EmailWidget.propTypes = {
61
73
  onClick: PropTypes.func,
62
74
  minLength: PropTypes.number,
63
75
  maxLength: PropTypes.number,
76
+ placeholder: PropTypes.string,
64
77
  };
65
78
 
66
79
  /**
@@ -32,6 +32,7 @@ const NumberWidget = (props) => {
32
32
  isDisabled,
33
33
  maximum,
34
34
  minimum,
35
+ placeholder,
35
36
  } = props;
36
37
 
37
38
  return (
@@ -44,6 +45,7 @@ const NumberWidget = (props) => {
44
45
  min={minimum || null}
45
46
  max={maximum || null}
46
47
  value={value || defaultValue}
48
+ placeholder={placeholder}
47
49
  onChange={({ target }) =>
48
50
  onChange(id, target.value === '' ? undefined : target.value)
49
51
  }
@@ -72,6 +74,7 @@ NumberWidget.propTypes = {
72
74
  wrapped: PropTypes.bool,
73
75
  maximum: PropTypes.number,
74
76
  minimum: PropTypes.number,
77
+ placeholder: PropTypes.string,
75
78
  };
76
79
 
77
80
  /**
@@ -22,7 +22,16 @@ import { injectIntl } from 'react-intl';
22
22
  * ```
23
23
  */
24
24
  const PasswordWidget = (props) => {
25
- const { id, value, onChange, onBlur, onClick, minLength, maxLength } = props;
25
+ const {
26
+ id,
27
+ value,
28
+ onChange,
29
+ onBlur,
30
+ onClick,
31
+ minLength,
32
+ maxLength,
33
+ placeholder,
34
+ } = props;
26
35
 
27
36
  return (
28
37
  <FormFieldWrapper {...props}>
@@ -32,6 +41,7 @@ const PasswordWidget = (props) => {
32
41
  type="password"
33
42
  disabled={props.isDisabled}
34
43
  value={value || ''}
44
+ placeholder={placeholder}
35
45
  onChange={({ target }) =>
36
46
  onChange(id, target.value === '' ? undefined : target.value)
37
47
  }
@@ -64,6 +74,7 @@ PasswordWidget.propTypes = {
64
74
  minLength: PropTypes.number,
65
75
  maxLength: PropTypes.number,
66
76
  wrapped: PropTypes.bool,
77
+ placeholder: PropTypes.string,
67
78
  };
68
79
 
69
80
  /**
@@ -31,7 +31,16 @@ import navTreeSVG from '@plone/volto/icons/nav.svg';
31
31
  * ```
32
32
  */
33
33
  export const UrlWidget = (props) => {
34
- const { id, onChange, onBlur, onClick, minLength, maxLength } = props;
34
+ const {
35
+ id,
36
+ onChange,
37
+ onBlur,
38
+ onClick,
39
+ minLength,
40
+ maxLength,
41
+ placeholder,
42
+ isDisabled,
43
+ } = props;
35
44
  const inputId = `field-${id}`;
36
45
 
37
46
  const [value, setValue] = useState(flattenToAppURL(props.value));
@@ -87,6 +96,8 @@ export const UrlWidget = (props) => {
87
96
  name={id}
88
97
  type="url"
89
98
  value={value || ''}
99
+ disabled={isDisabled}
100
+ placeholder={placeholder}
90
101
  onChange={({ target }) => onChangeValue(target.value)}
91
102
  onBlur={({ target }) =>
92
103
  onBlur(id, target.value === '' ? undefined : target.value)
@@ -156,6 +167,7 @@ UrlWidget.propTypes = {
156
167
  minLength: PropTypes.number,
157
168
  maxLength: PropTypes.number,
158
169
  openObjectBrowser: PropTypes.func.isRequired,
170
+ placeholder: PropTypes.string,
159
171
  };
160
172
 
161
173
  /**
@@ -16,6 +16,7 @@ export const richtextEditorSettings = (props) => {
16
16
  richTextEditorPlugins: plugins,
17
17
  richTextEditorInlineToolbarButtons: inlineToolbarButtons,
18
18
  FromHTMLCustomBlockFn,
19
+ customStyleMap: null,
19
20
  };
20
21
  };
21
22
 
@@ -97,7 +97,6 @@ let config = {
97
97
  reservedIds: ['login', 'layout', 'plone', 'zip', 'properties'],
98
98
  downloadableObjects: ['File'], //list of content-types for which the direct download of the file will be carried out if the user is not authenticated
99
99
  listingPreviewImageField: 'image', // deprecated from Volto 14 onwards
100
- customStyleMap: null,
101
100
  notSupportedBrowsers: ['ie'],
102
101
  defaultPageSize: 25,
103
102
  isMultilingual: false,
@@ -3,10 +3,17 @@ import { generateSitemap } from '@plone/volto/helpers';
3
3
 
4
4
  export const sitemap = function (req, res, next) {
5
5
  generateSitemap(req).then((sitemap) => {
6
- res.set('Content-Type', 'application/x-gzip');
7
- res.set('Content-Encoding', 'gzip');
8
- res.set('Content-Disposition', 'attachment; filename="sitemap.xml.gz"');
9
- res.send(sitemap);
6
+ if (Buffer.isBuffer(sitemap)) {
7
+ res.set('Content-Type', 'application/x-gzip');
8
+ res.set('Content-Encoding', 'gzip');
9
+ res.set('Content-Disposition', 'attachment; filename="sitemap.xml.gz"');
10
+ res.send(sitemap);
11
+ } else {
12
+ // {"errno":-111, "code":"ECONNREFUSED", "host": ...}
13
+ res.status(500);
14
+ // Some data, such as the internal API address, may be sensitive to be published
15
+ res.send(`Sitemap generation error: ${sitemap.code ?? '-'}`);
16
+ }
10
17
  });
11
18
  };
12
19
 
@@ -19,8 +19,9 @@ import config from '@plone/volto/registry';
19
19
  export const generateSitemap = (_req) =>
20
20
  new Promise((resolve) => {
21
21
  const { settings } = config;
22
+ const apiPath = settings.internalApiPath ?? settings.apiPath;
22
23
  const request = superagent.get(
23
- `${settings.apiPath}/@search?metadata_fields=modified&b_size=100000000&use_site_search_settings=1`,
24
+ `${apiPath}/@search?metadata_fields=modified&b_size=100000000&use_site_search_settings=1`,
24
25
  );
25
26
  request.set('Accept', 'application/json');
26
27
  const authToken = _req.universalCookies.get('auth_token');
@@ -60,9 +60,12 @@ export function getVocabFromItems(props) {
60
60
  * @returns {string} Vocabulary name
61
61
  */
62
62
  export function getVocabName(vocabNameOrURL) {
63
- return vocabNameOrURL.indexOf('@vocabularies') > -1
64
- ? vocabNameOrURL.split('@vocabularies/')[1]
65
- : vocabNameOrURL;
63
+ if (vocabNameOrURL) {
64
+ return vocabNameOrURL.indexOf('@vocabularies') > -1
65
+ ? vocabNameOrURL.split('@vocabularies/')[1]
66
+ : vocabNameOrURL;
67
+ }
68
+ return vocabNameOrURL;
66
69
  }
67
70
 
68
71
  /**
@@ -59,6 +59,7 @@ export BodyClass from '@plone/volto/helpers/BodyClass/BodyClass';
59
59
  export ScrollToTop from '@plone/volto/helpers/ScrollToTop/ScrollToTop';
60
60
  export {
61
61
  getBoolean,
62
+ getVocabName,
62
63
  getVocabFromHint,
63
64
  getVocabFromField,
64
65
  getVocabFromItems,
@@ -78,6 +79,7 @@ export {
78
79
  parseDateTime,
79
80
  normalizeLanguageName,
80
81
  hasApiExpander,
82
+ replaceItemOfArray,
81
83
  } from '@plone/volto/helpers/Utils/Utils';
82
84
  export { messages } from './MessageLabels/MessageLabels';
83
85
  export {
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <path fill-rule="evenodd" d="M29,22 L29,10 C29,9.448 28.551,9 28,9 L8,9 C7.449,9 7,9.448 7,10 L7,22 C7,22.552 7.449,23 8,23 L9,23 L9,24.586 L10.586,23 L28,23 C28.551,23 29,22.552 29,22 Z M28,7 C29.654,7 31,8.346 31,10 L31,22 C31,23.654 29.654,25 28,25 L11.414,25 L7,29.414 L7,24.829 C5.836,24.416 5,23.304 5,22 L5,10 C5,8.346 6.346,7 8,7 L28,7 Z M9,21 L9,19 L23,19 L23,21 L9,21 Z M9,13 L9,11 L27,11 L27,13 L9,13 Z M9,17 L9,15 L27,15 L27,17 L9,17 Z"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <polygon fill="currentcolor" points="19.848 16.152 29.628 12.101 30.393 13.949 20.613 17.999 30.393 22.051 29.628 23.899 19.847 19.847 23.899 29.628 22.051 30.393 18 20.613 13.949 30.393 12.101 29.628 16.153 19.847 6.372 23.899 5.607 22.051 15.387 17.999 5.607 13.949 6.372 12.101 16.152 16.152 12.101 6.372 13.949 5.607 18 15.387 22.051 5.607 23.899 6.372 19.848 16.152"/>
4
+ <rect width="36" height="36"/>
5
+ </g>
6
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <g fill-rule="evenodd">
3
+ <path d="M6 27L10 27 10 21 6 21 6 27zM4 29L12 29 12 19 4 19 4 29zM16 27L20 27 20 21 16 21 16 27zM14 29L22 29 22 19 14 19 14 29zM26 27L30 27 30 21 26 21 26 27zM24 29L32 29 32 19 24 19 24 29zM6 15L10 15 10 9 6 9 6 15zM4 17L12 17 12 7 4 7 4 17zM16 15L20 15 20 9 16 9 16 15zM14 17L22 17 22 7 14 7 14 17zM26 15L30 15 30 9 26 9 26 15zM24 17L32 17 32 7 24 7 24 17z"/>
4
+ </g>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <path d="M3,29 L3,3 L29,3 L29,17 L17,17 L17,29 L3,29 Z M5,17 L5,27 L15,27 L15,17 L5,17 Z M5,15 L15,15 L15,5 L5,5 L5,15 Z M17,5 L17,15 L27,15 L27,5 L17,5 Z M19,19 L33,19 L33,33 L19,33 L19,19 Z M21,21 L21,31 L31,31 L31,21 L21,21 Z"/>
3
+ </svg>
@@ -1,12 +1,12 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
2
  <g fill-rule="evenodd">
3
3
  <path d="M25,31 L27,31 L27,19 L21,19 L21,31 L23,31 L23,29 L25,29 L25,31 Z M27.5,17 L29,17 L29,31 L31,31 L31,33 L5,33 L5,31 L7,31 L7,7 L11,7 L11,3 L17,3 L17,7 L21,7 L21,17 L27.5,17 Z M13,5 L13,7 L15,7 L15,5 L13,5 Z M19,9 L9,9 L9,31 L19,31 L19,9 Z"/>
4
- <rect width="6" height="2" x="11" y="11"/>
5
- <rect width="6" height="2" x="11" y="15"/>
6
- <rect width="6" height="2" x="11" y="19"/>
7
- <rect width="2" height="2" x="23" y="21"/>
8
- <rect width="2" height="2" x="23" y="25"/>
9
- <rect width="6" height="2" x="11" y="23"/>
10
- <rect width="6" height="2" x="11" y="27"/>
4
+ <rect width="6" height="2" x="11" y="11" />
5
+ <rect width="6" height="2" x="11" y="15" />
6
+ <rect width="6" height="2" x="11" y="19" />
7
+ <rect width="2" height="2" x="23" y="21" />
8
+ <rect width="2" height="2" x="23" y="25" />
9
+ <rect width="6" height="2" x="11" y="23" />
10
+ <rect width="6" height="2" x="11" y="27" />
11
11
  </g>
12
12
  </svg>
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="12" height="12" x="6" y="6" stroke="#000" stroke-width="2"/>
4
+ <rect width="12" height="12" x="18" y="6" stroke="#000" stroke-width="2"/>
5
+ <rect width="12" height="12" x="6" y="18" stroke="#000" stroke-width="2"/>
6
+ <rect width="12" height="12" x="18" y="18" stroke="#000" stroke-width="2"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <path d="M18,32 C11.3333333,23.6818983 8,17.6818983 8,14 C8,8.4771525 12.4771525,4 18,4 C23.5228475,4 28,8.4771525 28,14 C28,17.6818983 24.6666667,23.6818983 18,32 Z M26,14 C26,9.581722 22.418278,6 18,6 C13.581722,6 10,9.581722 10,14 C10,16.8065316 12.6565091,21.827053 18,28.7642044 C23.3434909,21.827053 26,16.8065316 26,14 Z M18,11 C19.656,11 21,12.344 21,14 C21,15.656 19.656,17 18,17 C16.344,17 15,15.656 15,14 C15,12.344 16.344,11 18,11 Z"/>
3
+ </svg>
@@ -1,8 +1,8 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
- <g fill="none" fill-rule="evenodd">
3
- <path fill="currentColor" d="M6.9996,3.0003 L6.9996,33.0003 L29.0006,33.0003 L29.0006,11.5863 L20.4136,3.0003 L6.9996,3.0003 Z M9.0006,5.0003 L19.0006,5.0003 L19.0006,13.0003 L27.0006,13.0003 L27.0006,31.0003 L9.0006,31.0003 L9.0006,5.0003 Z M20.9996,6.4143 L25.5856,11.0003 L20.9996,11.0003 L20.9996,6.4143 Z"/>
4
- <polygon fill="currentColor" points="11 27 25 27 25 25 11 25"/>
5
- <polygon fill="currentColor" points="11 23 25 23 25 21 11 21"/>
6
- <polygon fill="currentColor" points="11 19 18 19 18 17 11 17"/>
2
+ <g fill-rule="evenodd">
3
+ <path d="M6.9996,3.0003 L6.9996,33.0003 L29.0006,33.0003 L29.0006,11.5863 L20.4136,3.0003 L6.9996,3.0003 Z M9.0006,5.0003 L19.0006,5.0003 L19.0006,13.0003 L27.0006,13.0003 L27.0006,31.0003 L9.0006,31.0003 L9.0006,5.0003 Z M20.9996,6.4143 L25.5856,11.0003 L20.9996,11.0003 L20.9996,6.4143 Z"/>
4
+ <polygon points="11 27 25 27 25 25 11 25"/>
5
+ <polygon points="11 23 25 23 25 21 11 21"/>
6
+ <polygon points="11 19 18 19 18 17 11 17"/>
7
7
  </g>
8
8
  </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <g fill-rule="evenodd">
3
+ <path d="M17,6.999 L17,5 L19,5 L19,6.999 L33,6.999 L33,24.999 L3,24.999 L3,6.999 L17,6.999 Z M14.5500002,25 L21.4500008,25 L24.707,28.293 L23.293,29.707 L19,25.414 L19,30 L17,30 L17,25.414 L12.707,29.707 L11.293,28.293 L14.5500002,25 Z M5,23 L31,23 L31,9 L5,9 L5,23 Z"/>
4
+ <polygon points="19 13 25 13 25 11 19 11"/>
5
+ <polygon points="19 17 29 17 29 15 19 15"/>
6
+ <polygon points="19 21 29 21 29 19 19 19"/>
7
+ <path d="M7,21 L17,21 L17,11 L7,11 L7,21 Z M9,19.001 L15.001,19.001 L15.001,13 L9,13 L9,19.001 Z"/>
8
+ </g>
9
+ </svg>
package/src/icons/spy.svg CHANGED
@@ -1,8 +1,5 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
2
  <g fill-rule="evenodd">
3
- <circle cx="10" cy="26" r="5" stroke="#000" stroke-width="2"/>
4
- <path stroke="#000" stroke-width="2" d="M16,23 C18.209139,23 20,24.790861 20,27" transform="rotate(-45 18 25)"/>
5
- <circle cx="26" cy="26" r="5" stroke="#000" stroke-width="2"/>
6
- <path stroke="#000" stroke-width="2" d="M4 17L32 17M8 17L8.90486158 6.14166109C8.95072633 5.59128406 9.43407579 5.18229606 9.98445281 5.22816081 10.0294899 5.2319139 10.0742208 5.23871573 10.1183378 5.24851951L18 7 25.8816622 5.24851951C26.4207954 5.12871213 26.9549723 5.46864289 27.0747797 6.00777611 27.0845835 6.05189313 27.0913853 6.096624 27.0951384 6.14166109L28 17"/>
3
+ <path fill-rule="nonzero" d="M10 30C12.209139 30 14 28.209139 14 26 14 23.790861 12.209139 22 10 22 7.790861 22 6 23.790861 6 26 6 28.209139 7.790861 30 10 30zM20.0247734 25.4510771C18.8742663 24.7712087 17.3673056 24.9255876 16.3786797 25.9142136L15.9807873 25.5163212C15.9935144 25.6758698 16 25.8371775 16 26 16 29.3137085 13.3137085 32 10 32 6.6862915 32 4 29.3137085 4 26 4 22.6862915 6.6862915 20 10 20 12.588563 20 14.7942615 21.639238 15.6356566 23.9362753 17.0923234 22.9158907 18.97143 22.7624459 20.5551493 23.4759408 21.5082758 21.4233395 23.5879185 20 26 20 29.3137085 20 32 22.6862915 32 26 32 29.3137085 29.3137085 32 26 32 22.6862915 32 20 29.3137085 20 26 20 25.8149495 20.0083773 25.6318557 20.0247734 25.4510771zM26 30C28.209139 30 30 28.209139 30 26 30 23.790861 28.209139 22 26 22 23.790861 22 22 23.790861 22 26 22 28.209139 23.790861 30 26 30zM7.07986712 16L7.90831582 6.05861561C8.00004532 4.95786156 8.96674424 4.13988555 10.0674983 4.23161505 10.1575725 4.23912123 10.2470342 4.25272489 10.3352682 4.27233245L18 5.97560617 25.6647318 4.27233245C26.7429982 4.03271768 27.811352 4.7125792 28.0509668 5.79084565 28.0705743 5.87907969 28.084178 5.96854143 28.0916842 6.05861561L28.9201329 16 32 16 32 18 4 18 4 16 7.07986712 16zM9.08679955 16L26.9132005 16 26.0985927 6.22470657 18 8.02439383 9.90140733 6.22470657 9.08679955 16z"/>
7
4
  </g>
8
5
  </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
+ <path fill-rule="evenodd" d="M31,17 L19.114,17 C18.533,16.863 15.451,16.107 13.666,15.066 C13.115,14.746 12.68,14.223 12.441,13.594 C11.776,11.844 11.589,9.432 14.551,7.834 C14.579,7.816 17.423,5.99 21.531,7.883 C21.556,7.897 24.074,9.269 24,11.911 L24,12 L25,12 L26,12.041 L26,12 L26,6 L24,6 L24,7.281 C23.227,6.53 22.507,6.138 22.419,6.092 C17.265,3.714 13.603,6.064 13.526,6.119 C8.981,8.563 9.946,12.657 10.572,14.304 C10.973,15.36 11.714,16.245 12.659,16.795 C12.779,16.865 12.905,16.933 13.033,17 L5,17 L5,19 L18.863,19 C23.002,20.084 24.039,22.3 24.057,22.333 C25.122,25.348 23.361,27.222 23.323,27.264 C20.638,29.732 16.212,29.021 16.103,29.005 C11.896,28.569 11.02,24.017 10.984,23.824 L10,24 L9,24 L9,30 L11,30 L11,28.359 C12.089,29.669 13.657,30.761 15.831,30.985 C15.909,30.999 16.631,31.118 17.683,31.118 C19.562,31.118 22.498,30.739 24.708,28.706 C24.821,28.593 27.438,25.9 25.924,21.617 C25.889,21.534 25.338,20.264 23.608,19 L31,19 L31,17 Z"/>
3
+ </svg>
@@ -1,7 +1,7 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
2
- <g fill-rule="evenodd">
3
- <path fill-rule="nonzero" d="M9,7 L9,19 C9,22.0882936 10.6396023,24.9790035 13.4704001,27.5888035 C14.5157234,28.5525194 15.6524847,29.4093151 16.8018493,30.146736 C17.2691065,30.4465236 17.6752545,30.6875246 17.9999067,30.8684028 C18.3261057,30.6867175 18.7316757,30.4460217 19.1981507,30.146736 C20.3475153,29.4093151 21.4842766,28.5525194 22.5295999,27.5888035 C25.3603977,24.9790035 27,22.0882936 27,19 L27,7 L9,7 Z M7,5 L29,5 L29,19 C29,27.514 18.878,32.679 18.448,32.895 L18,33.118 L17.552,32.895 C17.122,32.679 7,27.514 7,19 L7,5 Z"/>
4
- <polygon points="16 22.414 11.293 17.707 12.707 16.293 16 19.586 23.293 12.293 24.707 13.707"/>
2
+ <g fill="none" fill-rule="evenodd">
3
+ <path fill="currentcolor" fill-rule="nonzero" d="M9,7 L9,19 C9,22.0882936 10.6396023,24.9790035 13.4704001,27.5888035 C14.5157234,28.5525194 15.6524847,29.4093151 16.8018493,30.146736 C17.2691065,30.4465236 17.6752545,30.6875246 17.9999067,30.8684028 C18.3261057,30.6867175 18.7316757,30.4460217 19.1981507,30.146736 C20.3475153,29.4093151 21.4842766,28.5525194 22.5295999,27.5888035 C25.3603977,24.9790035 27,22.0882936 27,19 L27,7 L9,7 Z M7,5 L29,5 L29,19 C29,27.514 18.878,32.679 18.448,32.895 L18,33.118 L17.552,32.895 C17.122,32.679 7,27.514 7,19 L7,5 Z"/>
4
+ <polygon fill="currentcolor" points="16 22.414 11.293 17.707 12.707 16.293 16 19.586 23.293 12.293 24.707 13.707"/>
5
5
  <rect width="36" height="36"/>
6
6
  </g>
7
7
  </svg>
@@ -248,31 +248,32 @@ export default (api) => ({ dispatch, getState }) => (next) => (action) => {
248
248
  });
249
249
  }
250
250
 
251
- // Gateway timeout
252
- else if (error?.response?.statusCode === 504) {
253
- next({
254
- ...rest,
255
- error,
256
- statusCode: error.code,
257
- connectionRefused: true,
258
- type: SET_APIERROR,
259
- });
260
- }
251
+ // Check for actions who can raise api errors
252
+ if (settings.actions_raising_api_errors.includes(action.type)) {
253
+ // Gateway timeout
254
+ if (error?.response?.statusCode === 504) {
255
+ next({
256
+ ...rest,
257
+ error,
258
+ statusCode: error.code,
259
+ connectionRefused: true,
260
+ type: SET_APIERROR,
261
+ });
262
+ }
261
263
 
262
- // Redirect
263
- else if (error?.code === 301) {
264
- next({
265
- ...rest,
266
- error,
267
- statusCode: error.code,
268
- connectionRefused: false,
269
- type: SET_APIERROR,
270
- });
271
- }
264
+ // Redirect
265
+ else if (error?.code === 301) {
266
+ next({
267
+ ...rest,
268
+ error,
269
+ statusCode: error.code,
270
+ connectionRefused: false,
271
+ type: SET_APIERROR,
272
+ });
273
+ }
272
274
 
273
- // The rest
274
- else if (settings.actions_raising_api_errors.includes(action.type)) {
275
- if (error?.response?.statusCode === 401) {
275
+ // Unauthorized
276
+ else if (error?.response?.statusCode === 401) {
276
277
  next({
277
278
  ...rest,
278
279
  error,