@strapi/admin 4.5.0 → 4.5.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.
Files changed (157) hide show
  1. package/admin/src/components/LeftMenu/index.js +22 -4
  2. package/admin/src/content-manager/components/DynamicTable/CellContent/RelationMultiple/index.js +4 -3
  3. package/admin/src/content-manager/components/DynamicZone/components/{AddComponentButton/index.js → AddComponentButton.js} +12 -6
  4. package/admin/src/content-manager/components/DynamicZone/components/{ComponentPicker/Category/ComponentCard/index.js → ComponentCard.js} +8 -19
  5. package/admin/src/content-manager/components/DynamicZone/components/{ComponentPicker/Category/index.js → ComponentCategory.js} +19 -18
  6. package/admin/src/content-manager/components/DynamicZone/components/{ComponentPicker/index.js → ComponentPicker.js} +36 -38
  7. package/admin/src/content-manager/components/DynamicZone/components/DynamicComponent.js +195 -0
  8. package/admin/src/content-manager/components/DynamicZone/components/{DzLabel/index.js → DynamicZoneLabel.js} +13 -5
  9. package/admin/src/content-manager/components/DynamicZone/index.js +33 -118
  10. package/admin/src/content-manager/pages/ListSettingsView/components/Settings.js +79 -76
  11. package/admin/src/pages/HomePage/index.js +1 -1
  12. package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/FilterSelect.js +2 -1
  13. package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/index.js +1 -0
  14. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormApiTokenContainer/index.js +2 -2
  15. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormBody/index.js +1 -1
  16. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/components/FormHead/index.js +1 -1
  17. package/admin/src/translations/nl.json +210 -23
  18. package/admin/src/translations/pt-BR.json +14 -14
  19. package/admin/src/translations/pt.json +33 -32
  20. package/admin/src/translations/sv.json +117 -85
  21. package/admin/src/translations/zh.json +280 -95
  22. package/build/{7692.a36fb2c2.chunk.js → 1233.bddaaa76.chunk.js} +144 -445
  23. package/build/1920.208c77f8.chunk.js +245 -0
  24. package/build/2438.afe24949.chunk.js +2525 -0
  25. package/build/2517.5cc235ba.chunk.js +117 -0
  26. package/build/4306.e62b841c.chunk.js +98 -0
  27. package/build/4318.7931eee7.chunk.js +30 -0
  28. package/build/4986.3820d11d.chunk.js +145 -0
  29. package/build/{8469.41c8d25f.chunk.js → 5015.f080b64e.chunk.js} +6 -1
  30. package/build/504.9aeff724.chunk.js +758 -0
  31. package/build/805.a1894307.chunk.js +138 -0
  32. package/build/8633.8da5488a.chunk.js +1 -0
  33. package/build/9707.932a3c12.chunk.js +70 -0
  34. package/build/Admin-authenticatedApp.7484bdf1.chunk.js +80 -0
  35. package/build/Admin_InternalErrorPage.e0317a5e.chunk.js +1 -0
  36. package/build/Admin_homePage.54e33c2d.chunk.js +77 -0
  37. package/build/Admin_marketplace.ff012eb2.chunk.js +26 -0
  38. package/build/Admin_pluginsPage.3c872de7.chunk.js +6 -0
  39. package/build/Admin_profilePage.e9fcce92.chunk.js +15 -0
  40. package/build/Admin_settingsPage.a1a5218b.chunk.js +178 -0
  41. package/build/admin-app.9cb0abc7.chunk.js +112 -0
  42. package/build/admin-edit-roles-page.23f15909.chunk.js +1 -0
  43. package/build/admin-edit-users.283b49ed.chunk.js +10 -0
  44. package/build/admin-users.a0748674.chunk.js +11 -0
  45. package/build/api-tokens-list-page.700e575f.chunk.js +16 -0
  46. package/build/content-manager.577fddcb.chunk.js +1200 -0
  47. package/build/content-type-builder-list-view.95012cf0.chunk.js +201 -0
  48. package/build/content-type-builder-translation-pt-BR-json.6fe3b8d1.chunk.js +1 -0
  49. package/build/content-type-builder-translation-pt-json.96a31576.chunk.js +1 -0
  50. package/build/content-type-builder-translation-zh-json.3b0afd31.chunk.js +1 -0
  51. package/build/content-type-builder.95b9d6a2.chunk.js +145 -0
  52. package/build/email-settings-page.4bb3606f.chunk.js +15 -0
  53. package/build/email-translation-en-json.ebad8943.chunk.js +1 -0
  54. package/build/email-translation-pt-json.159505ab.chunk.js +1 -0
  55. package/build/email-translation-zh-json.62b1c6fe.chunk.js +1 -0
  56. package/build/i18n-settings-page.195d42fe.chunk.js +1 -0
  57. package/build/i18n-translation-zh-json.eeebb849.chunk.js +1 -0
  58. package/build/index.html +1 -1
  59. package/build/main.23670c4c.js +2026 -0
  60. package/build/nl-json.26f39180.chunk.js +1 -0
  61. package/build/pt-BR-json.2b72b1d6.chunk.js +1 -0
  62. package/build/pt-json.cd67ba86.chunk.js +1 -0
  63. package/build/runtime~main.4dc8c7c6.js +2 -0
  64. package/build/sso-settings-page.9f091262.chunk.js +1 -0
  65. package/build/sv-json.fb1081ff.chunk.js +1 -0
  66. package/build/upload-settings.3010911f.chunk.js +18 -0
  67. package/build/upload-translation-pt-json.5c452b48.chunk.js +1 -0
  68. package/build/upload-translation-zh-json.ac5711de.chunk.js +1 -0
  69. package/build/upload.9f19f2e8.chunk.js +64 -0
  70. package/build/users-advanced-settings-page.9df41d67.chunk.js +13 -0
  71. package/build/users-email-settings-page.56d82eaf.chunk.js +28 -0
  72. package/build/users-permissions-translation-sv-json.d5d11648.chunk.js +1 -0
  73. package/build/users-permissions-translation-zh-json.92f406f9.chunk.js +1 -0
  74. package/build/users-providers-settings-page.96bb7da0.chunk.js +33 -0
  75. package/build/users-roles-settings-page.445e5e16.chunk.js +30 -0
  76. package/build/webhook-edit-page.3285abc4.chunk.js +75 -0
  77. package/build/webhook-list-page.b87821f2.chunk.js +42 -0
  78. package/build/zh-json.2ecc6b99.chunk.js +1 -0
  79. package/jest.config.front.js +0 -1
  80. package/package.json +17 -16
  81. package/server/content-types/api-token.js +1 -1
  82. package/webpack.alias.js +3 -2
  83. package/webpack.config.js +13 -1
  84. package/admin/src/content-manager/components/DynamicZone/components/Component/Rectangle.js +0 -19
  85. package/admin/src/content-manager/components/DynamicZone/components/Component/index.js +0 -191
  86. package/admin/src/content-manager/icons/Bold/index.js +0 -22
  87. package/admin/src/content-manager/icons/Code/index.js +0 -13
  88. package/admin/src/content-manager/icons/Cross/index.js +0 -28
  89. package/admin/src/content-manager/icons/Italic/index.js +0 -23
  90. package/admin/src/content-manager/icons/Link/index.js +0 -21
  91. package/admin/src/content-manager/icons/Media/index.js +0 -14
  92. package/admin/src/content-manager/icons/Na/index.js +0 -39
  93. package/admin/src/content-manager/icons/Ol/index.js +0 -13
  94. package/admin/src/content-manager/icons/Quote/index.js +0 -13
  95. package/admin/src/content-manager/icons/Striked/index.js +0 -24
  96. package/admin/src/content-manager/icons/Ul/index.js +0 -15
  97. package/admin/src/content-manager/icons/Underline/index.js +0 -22
  98. package/build/1856.172d5fa0.chunk.js +0 -174
  99. package/build/2077.058590f4.chunk.js +0 -206
  100. package/build/2912.2c42c07b.chunk.js +0 -259
  101. package/build/4318.5e670740.chunk.js +0 -30
  102. package/build/4715.22747b59.chunk.js +0 -387
  103. package/build/4800.a6935af6.chunk.js +0 -1
  104. package/build/4982.1b75ddb1.chunk.js +0 -325
  105. package/build/6925.f5c8b6fc.chunk.js +0 -761
  106. package/build/7379.d246dd38.chunk.js +0 -1
  107. package/build/7841.c50e9509.chunk.js +0 -259
  108. package/build/7866.ba215f99.chunk.js +0 -505
  109. package/build/8380.e53e7207.chunk.js +0 -299
  110. package/build/8549.832ed79d.chunk.js +0 -159
  111. package/build/8738.0fe8a61e.chunk.js +0 -463
  112. package/build/9066.eaf76ff3.chunk.js +0 -101
  113. package/build/9166.90876521.chunk.js +0 -342
  114. package/build/9420.5292d1d2.chunk.js +0 -505
  115. package/build/9649.468667d9.chunk.js +0 -199
  116. package/build/Admin-authenticatedApp.c4f68103.chunk.js +0 -80
  117. package/build/Admin_InternalErrorPage.12e24216.chunk.js +0 -1
  118. package/build/Admin_homePage.26d32e30.chunk.js +0 -72
  119. package/build/Admin_marketplace.32375885.chunk.js +0 -22
  120. package/build/Admin_pluginsPage.4d59785a.chunk.js +0 -1
  121. package/build/Admin_profilePage.da32abbc.chunk.js +0 -15
  122. package/build/Admin_settingsPage.bf2234e1.chunk.js +0 -178
  123. package/build/admin-app.9049056c.chunk.js +0 -112
  124. package/build/admin-edit-roles-page.69d9fcb2.chunk.js +0 -1
  125. package/build/admin-edit-users.c585212f.chunk.js +0 -10
  126. package/build/admin-users.d71f198a.chunk.js +0 -11
  127. package/build/api-tokens-list-page.bb36535f.chunk.js +0 -16
  128. package/build/content-manager.ff998bed.chunk.js +0 -1204
  129. package/build/content-type-builder-list-view.5b3cd768.chunk.js +0 -194
  130. package/build/content-type-builder-translation-pt-BR-json.d6c7fcc1.chunk.js +0 -1
  131. package/build/content-type-builder-translation-pt-json.766bd747.chunk.js +0 -1
  132. package/build/content-type-builder-translation-zh-json.2cc55621.chunk.js +0 -1
  133. package/build/content-type-builder.16af63a6.chunk.js +0 -145
  134. package/build/email-settings-page.c3469093.chunk.js +0 -103
  135. package/build/email-translation-en-json.3d74ff95.chunk.js +0 -1
  136. package/build/email-translation-pt-json.959ea070.chunk.js +0 -1
  137. package/build/email-translation-zh-json.3455468b.chunk.js +0 -1
  138. package/build/i18n-settings-page.46d894ff.chunk.js +0 -101
  139. package/build/main.91328e7a.js +0 -9381
  140. package/build/nl-json.2b8cc3a0.chunk.js +0 -1
  141. package/build/pt-BR-json.7852f808.chunk.js +0 -1
  142. package/build/pt-json.3161ca22.chunk.js +0 -1
  143. package/build/runtime~main.c9c319c0.js +0 -2
  144. package/build/sso-settings-page.9ceb0140.chunk.js +0 -1
  145. package/build/sv-json.8e5a7911.chunk.js +0 -1
  146. package/build/upload-settings.53b690f3.chunk.js +0 -101
  147. package/build/upload-translation-zh-json.ee8fba96.chunk.js +0 -1
  148. package/build/upload.7084cea6.chunk.js +0 -7
  149. package/build/users-advanced-settings-page.3f4ee86e.chunk.js +0 -101
  150. package/build/users-email-settings-page.73c41236.chunk.js +0 -1
  151. package/build/users-permissions-translation-sv-json.83c60841.chunk.js +0 -1
  152. package/build/users-permissions-translation-zh-json.e03ae2a4.chunk.js +0 -1
  153. package/build/users-providers-settings-page.f8e78537.chunk.js +0 -1
  154. package/build/users-roles-settings-page.b33ec5e5.chunk.js +0 -30
  155. package/build/webhook-edit-page.dc9442ce.chunk.js +0 -23
  156. package/build/webhook-list-page.02191138.chunk.js +0 -134
  157. package/build/zh-json.608aaf24.chunk.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/admin",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "Strapi Admin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,18 +46,18 @@
46
46
  "@casl/ability": "^5.4.3",
47
47
  "@fingerprintjs/fingerprintjs": "3.3.3",
48
48
  "@fortawesome/fontawesome-free": "^5.15.3",
49
- "@fortawesome/fontawesome-svg-core": "6.1.2",
49
+ "@fortawesome/fontawesome-svg-core": "6.2.0",
50
50
  "@fortawesome/free-brands-svg-icons": "^5.15.3",
51
51
  "@fortawesome/free-solid-svg-icons": "^5.15.3",
52
52
  "@fortawesome/react-fontawesome": "^0.2.0",
53
53
  "@pmmmwh/react-refresh-webpack-plugin": "0.5.7",
54
- "@strapi/babel-plugin-switch-ee-ce": "4.5.0",
55
- "@strapi/design-system": "1.2.7",
56
- "@strapi/helper-plugin": "4.5.0",
57
- "@strapi/icons": "1.2.7",
58
- "@strapi/permissions": "4.5.0",
59
- "@strapi/typescript-utils": "4.5.0",
60
- "@strapi/utils": "4.5.0",
54
+ "@strapi/babel-plugin-switch-ee-ce": "4.5.2",
55
+ "@strapi/design-system": "1.3.1",
56
+ "@strapi/helper-plugin": "4.5.2",
57
+ "@strapi/icons": "1.3.1",
58
+ "@strapi/permissions": "4.5.2",
59
+ "@strapi/typescript-utils": "4.5.2",
60
+ "@strapi/utils": "4.5.2",
61
61
  "axios": "0.27.2",
62
62
  "babel-loader": "8.2.5",
63
63
  "babel-plugin-styled-components": "2.0.2",
@@ -66,12 +66,13 @@
66
66
  "chokidar": "^3.5.1",
67
67
  "codemirror": "^5.65.8",
68
68
  "cross-env": "^7.0.3",
69
- "css-loader": "6.7.1",
69
+ "css-loader": "6.7.2",
70
70
  "date-fns": "2.29.2",
71
71
  "dotenv": "8.5.1",
72
72
  "esbuild-loader": "^2.20.0",
73
73
  "execa": "^1.0.0",
74
74
  "fast-deep-equal": "3.1.3",
75
+ "find-root": "1.1.0",
75
76
  "font-awesome": "^4.7.0",
76
77
  "fork-ts-checker-webpack-plugin": "7.2.1",
77
78
  "formik": "^2.2.6",
@@ -127,7 +128,7 @@
127
128
  "reselect": "^4.0.0",
128
129
  "rimraf": "3.0.2",
129
130
  "sanitize-html": "2.7.1",
130
- "semver": "7.3.7",
131
+ "semver": "7.3.8",
131
132
  "sift": "16.0.0",
132
133
  "style-loader": "3.3.1",
133
134
  "styled-components": "5.3.3",
@@ -139,10 +140,10 @@
139
140
  "yup": "^0.32.9"
140
141
  },
141
142
  "devDependencies": {
142
- "@testing-library/dom": "8.17.1",
143
- "@testing-library/react": "11.2.7",
144
- "@testing-library/react-hooks": "3.7.0",
145
- "@testing-library/user-event": "13.5.0",
143
+ "@testing-library/dom": "8.19.0",
144
+ "@testing-library/react": "12.1.4",
145
+ "@testing-library/react-hooks": "8.0.1",
146
+ "@testing-library/user-event": "14.4.3",
146
147
  "duplicate-dependencies-webpack-plugin": "^1.0.2",
147
148
  "glob": "8.0.3",
148
149
  "react-test-renderer": "^17.0.2",
@@ -165,5 +166,5 @@
165
166
  }
166
167
  }
167
168
  },
168
- "gitHead": "33debd57010667a3fc5dfa343a673206cfb956e1"
169
+ "gitHead": "bcb1b7f472aae2556a9b59d59ee66d241c497a3e"
169
170
  }
@@ -67,7 +67,7 @@ module.exports = {
67
67
  required: false,
68
68
  },
69
69
  lifespan: {
70
- type: 'integer',
70
+ type: 'biginteger',
71
71
  configurable: false,
72
72
  required: false,
73
73
  },
package/webpack.alias.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const path = require('path');
4
+ const findRoot = require('find-root');
4
5
 
5
6
  const aliasExactMatch = [
6
7
  '@strapi/design-system',
@@ -39,8 +40,8 @@ const aliasExactMatch = [
39
40
 
40
41
  // See https://webpack.js.org/configuration/resolve/
41
42
  module.exports = {
42
- ...aliasExactMatch.reduce((acc, name) => {
43
- acc[`${name}$`] = require.resolve(name);
43
+ ...aliasExactMatch.reduce((acc, moduleName) => {
44
+ acc[`${moduleName}$`] = findRoot(require.resolve(moduleName));
44
45
  return acc;
45
46
  }, {}),
46
47
 
package/webpack.config.js CHANGED
@@ -169,7 +169,19 @@ module.exports = ({
169
169
  },
170
170
  },
171
171
  },
172
-
172
+ /**
173
+ * This is used to avoid webpack import errors where
174
+ * the origin is strict EcmaScript Module.
175
+ *
176
+ * e. g. a module with javascript mimetype, a '.mjs' file,
177
+ * or a '.js' file where the package.json contains '"type": "module"'
178
+ */
179
+ {
180
+ test: /\.m?jsx?$/,
181
+ resolve: {
182
+ fullySpecified: false,
183
+ },
184
+ },
173
185
  {
174
186
  test: /\.css$/i,
175
187
  use: ['style-loader', 'css-loader'],
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
- import { Box } from '@strapi/design-system/Box';
4
- import { Flex } from '@strapi/design-system/Flex';
5
-
6
- const StyledBox = styled(Box)`
7
- width: ${({ theme }) => theme.spaces[2]};
8
- height: ${({ theme }) => theme.spaces[4]};
9
- `;
10
-
11
- const Rectangle = () => {
12
- return (
13
- <Flex justifyContent="center">
14
- <StyledBox background="neutral200" />
15
- </Flex>
16
- );
17
- };
18
-
19
- export default Rectangle;
@@ -1,191 +0,0 @@
1
- import React, { memo, Suspense, useMemo } from 'react';
2
- import PropTypes from 'prop-types';
3
- import styled from 'styled-components';
4
- import isEqual from 'react-fast-compare';
5
- import { useIntl } from 'react-intl';
6
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
- import { Accordion, AccordionToggle, AccordionContent } from '@strapi/design-system/Accordion';
8
- import { IconButton } from '@strapi/design-system/IconButton';
9
- import { FocusTrap } from '@strapi/design-system/FocusTrap';
10
- import { Box } from '@strapi/design-system/Box';
11
- import { Flex } from '@strapi/design-system/Flex';
12
- import { Stack } from '@strapi/design-system/Stack';
13
- import { Loader } from '@strapi/design-system/Loader';
14
- import Trash from '@strapi/icons/Trash';
15
- import ArrowDown from '@strapi/icons/ArrowDown';
16
- import ArrowUp from '@strapi/icons/ArrowUp';
17
- import { useContentTypeLayout } from '../../../../hooks';
18
- import { getTrad } from '../../../../utils';
19
- import FieldComponent from '../../../FieldComponent';
20
- import Rectangle from './Rectangle';
21
-
22
- const ActionStack = styled(Stack)`
23
- svg {
24
- path {
25
- fill: ${({ theme, expanded }) =>
26
- expanded ? theme.colors.primary600 : theme.colors.neutral600};
27
- }
28
- }
29
- `;
30
-
31
- const IconButtonCustom = styled(IconButton)`
32
- background-color: transparent;
33
- `;
34
-
35
- const StyledBox = styled(Box)`
36
- > div:first-child {
37
- box-shadow: ${({ theme }) => theme.shadows.tableShadow};
38
- }
39
- `;
40
-
41
- const AccordionContentRadius = styled(Box)`
42
- border-radius: 0 0 ${({ theme }) => theme.spaces[1]} ${({ theme }) => theme.spaces[1]};
43
- `;
44
-
45
- const Component = ({
46
- componentUid,
47
- formErrors,
48
- index,
49
- isOpen,
50
- isFieldAllowed,
51
- moveComponentDown,
52
- moveComponentUp,
53
- name,
54
- onToggle,
55
- removeComponentFromDynamicZone,
56
- showDownIcon,
57
- showUpIcon,
58
- }) => {
59
- const { formatMessage } = useIntl();
60
- const { getComponentLayout } = useContentTypeLayout();
61
- const { icon, friendlyName } = useMemo(() => {
62
- const {
63
- info: { icon, displayName },
64
- } = getComponentLayout(componentUid);
65
-
66
- return { friendlyName: displayName, icon };
67
- }, [componentUid, getComponentLayout]);
68
-
69
- const handleMoveComponentDown = () => moveComponentDown(name, index);
70
-
71
- const handleMoveComponentUp = () => moveComponentUp(name, index);
72
-
73
- const handleRemove = () => removeComponentFromDynamicZone(name, index);
74
-
75
- const downLabel = formatMessage({
76
- id: getTrad('components.DynamicZone.move-down-label'),
77
- defaultMessage: 'Move component down',
78
- });
79
- const upLabel = formatMessage({
80
- id: getTrad('components.DynamicZone.move-up-label'),
81
- defaultMessage: 'Move component down',
82
- });
83
- const deleteLabel = formatMessage(
84
- {
85
- id: getTrad('components.DynamicZone.delete-label'),
86
- defaultMessage: 'Delete {name}',
87
- },
88
- { name: friendlyName }
89
- );
90
-
91
- const formErrorsKeys = Object.keys(formErrors);
92
-
93
- const fieldsErrors = formErrorsKeys.filter((errorKey) => {
94
- const errorKeysArray = errorKey.split('.');
95
-
96
- if (`${errorKeysArray[0]}.${errorKeysArray[1]}` === `${name}.${index}`) {
97
- return true;
98
- }
99
-
100
- return false;
101
- });
102
-
103
- let errorMessage;
104
-
105
- if (fieldsErrors.length > 0) {
106
- errorMessage = formatMessage({
107
- id: getTrad('components.DynamicZone.error-message'),
108
- defaultMessage: 'The component contains error(s)',
109
- });
110
- }
111
-
112
- return (
113
- <Box>
114
- <Rectangle />
115
- <StyledBox hasRadius>
116
- <Accordion expanded={isOpen} onToggle={() => onToggle(index)} size="S" error={errorMessage}>
117
- <AccordionToggle
118
- startIcon={<FontAwesomeIcon icon={icon} />}
119
- action={
120
- <ActionStack horizontal spacing={0} expanded={isOpen}>
121
- {showDownIcon && (
122
- <IconButtonCustom
123
- noBorder
124
- label={downLabel}
125
- onClick={handleMoveComponentDown}
126
- icon={<ArrowDown />}
127
- />
128
- )}
129
- {showUpIcon && (
130
- <IconButtonCustom
131
- noBorder
132
- label={upLabel}
133
- onClick={handleMoveComponentUp}
134
- icon={<ArrowUp />}
135
- />
136
- )}
137
- {isFieldAllowed && (
138
- <IconButtonCustom
139
- noBorder
140
- label={deleteLabel}
141
- onClick={handleRemove}
142
- icon={<Trash />}
143
- />
144
- )}
145
- </ActionStack>
146
- }
147
- title={friendlyName}
148
- togglePosition="left"
149
- />
150
- <AccordionContent>
151
- <AccordionContentRadius background="neutral0">
152
- <Suspense
153
- fallback={
154
- <Flex justifyContent="center" paddingTop={4} paddingBottom={4}>
155
- <Loader>Loading content.</Loader>
156
- </Flex>
157
- }
158
- >
159
- <FocusTrap onEscape={() => onToggle(index)}>
160
- <FieldComponent
161
- componentUid={componentUid}
162
- icon={icon}
163
- name={`${name}.${index}`}
164
- isFromDynamicZone
165
- />
166
- </FocusTrap>
167
- </Suspense>
168
- </AccordionContentRadius>
169
- </AccordionContent>
170
- </Accordion>
171
- </StyledBox>
172
- </Box>
173
- );
174
- };
175
-
176
- Component.propTypes = {
177
- componentUid: PropTypes.string.isRequired,
178
- formErrors: PropTypes.object.isRequired,
179
- index: PropTypes.number.isRequired,
180
- isFieldAllowed: PropTypes.bool.isRequired,
181
- isOpen: PropTypes.bool.isRequired,
182
- moveComponentDown: PropTypes.func.isRequired,
183
- moveComponentUp: PropTypes.func.isRequired,
184
- name: PropTypes.string.isRequired,
185
- onToggle: PropTypes.func.isRequired,
186
- removeComponentFromDynamicZone: PropTypes.func.isRequired,
187
- showDownIcon: PropTypes.bool.isRequired,
188
- showUpIcon: PropTypes.bool.isRequired,
189
- };
190
-
191
- export default memo(Component, isEqual);
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
-
3
- const Bold = () => {
4
- return (
5
- <svg width="9" height="10" xmlns="http://www.w3.org/2000/svg">
6
- <text
7
- transform="translate(-12 -10)"
8
- fill="#333740"
9
- fillRule="evenodd"
10
- fontSize="13"
11
- fontFamily="Baskerville-SemiBold, Baskerville"
12
- fontWeight="500"
13
- >
14
- <tspan x="12" y="20">
15
- B
16
- </tspan>
17
- </text>
18
- </svg>
19
- );
20
- };
21
-
22
- export default Bold;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
-
3
- const Code = () => {
4
- return (
5
- <svg width="12" height="8" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="#333740" fillRule="evenodd">
7
- <path d="M3.653 7.385a.632.632 0 0 1-.452-.191L.214 4.154a.66.66 0 0 1 0-.922L3.201.19a.632.632 0 0 1 .905 0 .66.66 0 0 1 0 .921l-2.534 2.58 2.534 2.58a.66.66 0 0 1 0 .922.632.632 0 0 1-.453.19zM8.347 7.385a.632.632 0 0 0 .452-.191l2.987-3.04a.66.66 0 0 0 0-.922L8.799.19a.632.632 0 0 0-.905 0 .66.66 0 0 0 0 .921l2.534 2.58-2.534 2.58a.66.66 0 0 0 0 .922c.125.127.289.19.453.19z" />
8
- </g>
9
- </svg>
10
- );
11
- };
12
-
13
- export default Code;
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- const Cross = ({ fill, height, width, ...rest }) => {
5
- return (
6
- <svg {...rest} width={width} height={height} xmlns="http://www.w3.org/2000/svg">
7
- <path
8
- d="M7.78 6.72L5.06 4l2.72-2.72a.748.748 0 0 0 0-1.06.748.748 0 0 0-1.06 0L4 2.94 1.28.22a.748.748 0 0 0-1.06 0 .748.748 0 0 0 0 1.06L2.94 4 .22 6.72a.748.748 0 0 0 0 1.06.748.748 0 0 0 1.06 0L4 5.06l2.72 2.72a.748.748 0 0 0 1.06 0 .752.752 0 0 0 0-1.06z"
9
- fill={fill}
10
- fillRule="evenodd"
11
- />
12
- </svg>
13
- );
14
- };
15
-
16
- Cross.defaultProps = {
17
- fill: '#b3b5b9',
18
- height: '8',
19
- width: '8',
20
- };
21
-
22
- Cross.propTypes = {
23
- fill: PropTypes.string,
24
- height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
25
- width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
26
- };
27
-
28
- export default Cross;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
-
3
- const Italic = () => {
4
- return (
5
- <svg width="6" height="9" xmlns="http://www.w3.org/2000/svg">
6
- <text
7
- transform="translate(-13 -11)"
8
- fill="#333740"
9
- fillRule="evenodd"
10
- fontWeight="500"
11
- fontSize="13"
12
- fontFamily="Baskerville-SemiBoldItalic, Baskerville"
13
- fontStyle="italic"
14
- >
15
- <tspan x="13" y="20">
16
- I
17
- </tspan>
18
- </text>
19
- </svg>
20
- );
21
- };
22
-
23
- export default Italic;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
-
3
- const Link = () => {
4
- return (
5
- <svg width="12" height="6" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="none" fillRule="evenodd">
7
- <path d="M6.063 1.5H6h.063z" fill="#000" />
8
- <path
9
- d="M9.516 0H8s.813.531.988 1.5h.528c.55 0 .984.434.984.984v1c0 .55-.434 1.016-.984 1.016h-3.5A1.03 1.03 0 0 1 5 3.484V2.5H3.5v.984A2.518 2.518 0 0 0 6.016 6h3.5C10.896 6 12 4.866 12 3.484v-1A2.473 2.473 0 0 0 9.516 0z"
10
- fill="#333740"
11
- />
12
- <path
13
- d="M8.3 1.5A2.473 2.473 0 0 0 6.016 0h-3.5C1.134 0 0 1.103 0 2.484v1A2.526 2.526 0 0 0 2.516 6H4s-.806-.531-1.003-1.5h-.481A1.03 1.03 0 0 1 1.5 3.484v-1c0-.55.466-.984 1.016-.984h3.5c.55 0 .984.434.984.984V3.5h1.5V2.484c0-.35-.072-.684-.2-.984z"
14
- fill="#333740"
15
- />
16
- </g>
17
- </svg>
18
- );
19
- };
20
-
21
- export default Link;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
-
3
- const Media = () => {
4
- return (
5
- <svg width="12" height="11" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="#333740" fillRule="evenodd">
7
- <path d="M9 4.286a1.286 1.286 0 1 0 0-2.572 1.286 1.286 0 0 0 0 2.572z" />
8
- <path d="M11.25 0H.75C.332 0 0 .34 0 .758v8.77c0 .418.332.758.75.758h10.5c.418 0 .75-.34.75-.758V.758A.752.752 0 0 0 11.25 0zM8.488 5.296a.46.46 0 0 0-.342-.167c-.137 0-.234.065-.343.153l-.501.423c-.105.075-.188.126-.308.126a.443.443 0 0 1-.295-.11 3.5 3.5 0 0 1-.115-.11L5.143 4.054a.59.59 0 0 0-.897.008L.857 8.148V1.171a.353.353 0 0 1 .351-.314h9.581a.34.34 0 0 1 .346.322l.008 6.975-2.655-2.858z" />
9
- </g>
10
- </svg>
11
- );
12
- };
13
-
14
- export default Media;
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- const Na = ({ fill, fontFamily, fontSize, fontWeight, height, textFill, width, ...rest }) => {
5
- return (
6
- <svg {...rest} width={width} height={height} xmlns="http://www.w3.org/2000/svg">
7
- <g fill="none" fillRule="evenodd">
8
- <rect fill={fill} width={width} height={height} rx="17.5" />
9
- <text fontFamily={fontFamily} fontSize={fontSize} fontWeight={fontWeight} fill={textFill}>
10
- <tspan x="6" y="22">
11
- N/A
12
- </tspan>
13
- </text>
14
- </g>
15
- </svg>
16
- );
17
- };
18
-
19
- Na.defaultProps = {
20
- fill: '#fafafb',
21
- fontFamily: 'Lato-Medium, Lato',
22
- fontSize: '12',
23
- fontWeight: '400',
24
- height: '35',
25
- textFill: '#838383',
26
- width: '35',
27
- };
28
-
29
- Na.propTypes = {
30
- fill: PropTypes.string,
31
- fontFamily: PropTypes.string,
32
- fontSize: PropTypes.string,
33
- fontWeight: PropTypes.string,
34
- height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
35
- textFill: PropTypes.string,
36
- width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
37
- };
38
-
39
- export default Na;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
-
3
- const Ol = () => {
4
- return (
5
- <svg width="12" height="8" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="#333740" fillRule="evenodd">
7
- <path d="M2.4 3H.594v-.214h.137c.123 0 .212-.01.266-.032.053-.022.086-.052.1-.092a.67.67 0 0 0 .018-.188V.74a.46.46 0 0 0-.03-.194C1.064.504 1.021.476.955.46A1.437 1.437 0 0 0 .643.435H.539V.23c.332-.035.565-.067.7-.096.135-.03.258-.075.37-.134h.275v2.507c0 .104.023.177.07.218.047.04.14.061.278.061H2.4V3zM2.736 6.695l-.132.528h-.246a.261.261 0 0 0 .015-.074c0-.058-.049-.087-.146-.087H.293v-.198c.258-.173.511-.367.76-.581.25-.215.457-.437.623-.667.166-.23.249-.447.249-.653a.49.49 0 0 0-.321-.478.794.794 0 0 0-.582-.006.482.482 0 0 0-.196.138.284.284 0 0 0-.07.182c0 .074.04.17.12.289.006.008.009.015.009.02 0 .012-.041.03-.123.053l-.19.057a.693.693 0 0 1-.115.03c-.031 0-.067-.038-.108-.114a.516.516 0 0 1 .071-.586.899.899 0 0 1 .405-.238c.18-.058.4-.087.657-.087.317 0 .566.044.749.132.183.087.306.187.37.3a.64.64 0 0 1 .094.312c0 .197-.089.389-.266.575a5.296 5.296 0 0 1-.916.74 62.947 62.947 0 0 1-.62.413h1.843zM4 0h8v1H4zM4 2h8v1H4zM4 4h8v1H4zM4 6h8v1H4z" />
8
- </g>
9
- </svg>
10
- );
11
- };
12
-
13
- export default Ol;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
-
3
- const Quote = () => {
4
- return (
5
- <svg width="9" height="9" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="#333740" fillRule="evenodd">
7
- <path d="M3 0C2.047 0 1.301.263.782.782.263 1.302 0 2.047 0 3v6h3.75V3H1.5c0-.54.115-.93.343-1.157C2.07 1.615 2.46 1.5 3 1.5M8.25 0c-.953 0-1.699.263-2.218.782-.519.52-.782 1.265-.782 2.218v6H9V3H6.75c0-.54.115-.93.343-1.157.227-.228.617-.343 1.157-.343" />
8
- </g>
9
- </svg>
10
- );
11
- };
12
-
13
- export default Quote;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
-
3
- const Striked = () => {
4
- return (
5
- <svg width="19" height="10" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="none" fillRule="evenodd">
7
- <text
8
- fontFamily="Lato-Semibold, Lato"
9
- fontSize="11"
10
- fontWeight="500"
11
- fill="#41464E"
12
- transform="translate(0 -2)"
13
- >
14
- <tspan x="1" y="11">
15
- abc
16
- </tspan>
17
- </text>
18
- <path d="M.5 6.5h18" stroke="#2C3039" strokeLinecap="square" />
19
- </g>
20
- </svg>
21
- );
22
- };
23
-
24
- export default Striked;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
-
3
- const Ul = () => {
4
- return (
5
- <svg width="13" height="7" xmlns="http://www.w3.org/2000/svg">
6
- <g fill="none" fillRule="evenodd">
7
- <path fill="#333740" d="M5 0h8v1H5zM5 2h8v1H5zM5 4h8v1H5zM5 6h8v1H5z" />
8
- <rect stroke="#333740" x=".5" y=".5" width="2" height="2" rx="1" />
9
- <rect stroke="#333740" x=".5" y="4.5" width="2" height="2" rx="1" />
10
- </g>
11
- </svg>
12
- );
13
- };
14
-
15
- export default Ul;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
-
3
- const Underline = () => {
4
- return (
5
- <svg width="10" height="10" xmlns="http://www.w3.org/2000/svg">
6
- <text
7
- transform="translate(-10 -11)"
8
- fill="#101622"
9
- fillRule="evenodd"
10
- fontSize="13"
11
- fontFamily="Baskerville-SemiBold, Baskerville"
12
- fontWeight="500"
13
- >
14
- <tspan x="10" y="20">
15
- U
16
- </tspan>
17
- </text>
18
- </svg>
19
- );
20
- };
21
-
22
- export default Underline;