@strapi/admin 4.5.3 → 4.5.5

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 (245) hide show
  1. package/admin/src/components/AuthenticatedApp/index.js +13 -2
  2. package/admin/src/components/GlobalStyle/index.js +0 -11
  3. package/admin/src/content-manager/components/ComponentIcon/ComponentIcon.js +49 -0
  4. package/admin/src/content-manager/components/ComponentIcon/index.js +1 -0
  5. package/admin/src/content-manager/components/DynamicZone/components/ComponentCard.js +17 -31
  6. package/admin/src/content-manager/components/DynamicZone/components/ComponentCategory.js +2 -2
  7. package/admin/src/content-manager/components/DynamicZone/components/DynamicComponent.js +3 -3
  8. package/admin/src/content-manager/components/EditViewDataManagerProvider/index.js +39 -3
  9. package/admin/src/content-manager/components/EditViewDataManagerProvider/reducer.js +24 -3
  10. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/findLeafByPathAndReplace.js +2 -1
  11. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/recursivelyFindPathsBasedOnCondition.js +8 -1
  12. package/admin/src/content-manager/components/InputJSON/FieldWrapper.js +10 -2
  13. package/admin/src/content-manager/components/InputJSON/Label.js +2 -18
  14. package/admin/src/content-manager/components/InputJSON/index.js +7 -3
  15. package/admin/src/content-manager/components/NonRepeatableComponent/index.js +4 -0
  16. package/admin/src/content-manager/components/RelationInput/RelationInput.js +6 -13
  17. package/admin/src/content-manager/components/RelationInputDataManager/RelationInputDataManager.js +1 -1
  18. package/admin/src/content-manager/components/RepeatableComponent/AccordionGroupCustom/index.js +0 -1
  19. package/admin/src/content-manager/components/RepeatableComponent/DraggedItem/index.js +4 -0
  20. package/admin/src/content-manager/components/RepeatableComponent/index.js +1 -3
  21. package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +1 -1
  22. package/admin/src/content-manager/components/Wysiwyg/Editor.js +1 -1
  23. package/admin/src/content-manager/hooks/useLazyComponents/index.js +40 -15
  24. package/admin/src/content-manager/pages/EditSettingsView/components/DynamicZoneList.js +18 -38
  25. package/admin/src/content-manager/pages/EditView/Header/index.js +1 -1
  26. package/admin/src/content-manager/sharedReducers/crudReducer/actions.js +5 -0
  27. package/admin/src/content-manager/sharedReducers/crudReducer/constants.js +2 -0
  28. package/admin/src/content-manager/sharedReducers/crudReducer/reducer.js +7 -0
  29. package/admin/src/core/utils/axiosInstance.js +4 -2
  30. package/admin/src/hooks/index.js +1 -0
  31. package/admin/src/hooks/useFetchClient/index.js +23 -0
  32. package/admin/src/pages/Admin/Onboarding/index.js +42 -44
  33. package/admin/src/pages/App/index.js +20 -13
  34. package/admin/src/pages/AuthPage/components/Register/index.js +1 -1
  35. package/admin/src/pages/AuthPage/components/ResetPassword/index.js +1 -1
  36. package/admin/src/pages/HomePage/SocialLinks.js +4 -4
  37. package/admin/src/pages/ProfilePage/index.js +1 -1
  38. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +2 -3
  39. package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +23 -18
  40. package/admin/src/translations/ca.json +2 -3
  41. package/admin/src/translations/dk.json +2 -2
  42. package/admin/src/translations/en.json +2 -1
  43. package/admin/src/translations/es.json +2 -2
  44. package/admin/src/translations/fr.json +2 -2
  45. package/admin/src/translations/hu.json +2 -2
  46. package/admin/src/translations/ja.json +2 -2
  47. package/admin/src/translations/nl.json +2 -2
  48. package/admin/src/translations/sk.json +274 -52
  49. package/admin/src/translations/tr.json +485 -5
  50. package/admin/src/translations/zh-Hans.json +1 -1
  51. package/admin/src/translations/zh.json +2 -2
  52. package/admin/src/utils/fetchClient.js +45 -0
  53. package/admin/src/utils/getFetchClient.js +10 -0
  54. package/admin/src/utils/index.js +1 -0
  55. package/admin/src/utils/uniqueAdminHash.js +22 -0
  56. package/build/2235.06c13219.chunk.js +106 -0
  57. package/build/{1233.80b05d66.chunk.js → 2473.45658149.chunk.js} +67 -67
  58. package/build/2598.962797b2.chunk.js +159 -0
  59. package/build/4318.0bbd3f4b.chunk.js +30 -0
  60. package/build/4958.7c118f5e.chunk.js +276 -0
  61. package/build/5052.712419ea.chunk.js +65 -0
  62. package/build/7295.e12e5587.chunk.js +114 -0
  63. package/build/805.ddcead70.chunk.js +138 -0
  64. package/build/{8633.8da5488a.chunk.js → 8633.19be8f45.chunk.js} +1 -1
  65. package/build/874.bde3ea04.chunk.js +104 -0
  66. package/build/9707.77e475ee.chunk.js +101 -0
  67. package/build/Admin-authenticatedApp.59063c5f.chunk.js +72 -0
  68. package/build/{Admin_homePage.54e33c2d.chunk.js → Admin_homePage.8945f71a.chunk.js} +5 -5
  69. package/build/{Admin_marketplace.8219fda6.chunk.js → Admin_marketplace.615343fb.chunk.js} +6 -6
  70. package/build/Admin_pluginsPage.67728975.chunk.js +6 -0
  71. package/build/{Admin_profilePage.e9fcce92.chunk.js → Admin_profilePage.175c6516.chunk.js} +2 -2
  72. package/build/Admin_settingsPage.ba0605a2.chunk.js +178 -0
  73. package/build/Upload_ConfigureTheView.7cb2a3fd.chunk.js +1 -0
  74. package/build/admin-app.77b9f2b9.chunk.js +112 -0
  75. package/build/admin-edit-roles-page.f407538c.chunk.js +1 -0
  76. package/build/admin-edit-users.5547b126.chunk.js +10 -0
  77. package/build/{admin-users.a0748674.chunk.js → admin-users.4b6b47f8.chunk.js} +2 -2
  78. package/build/api-tokens-create-page.dd4ddfcb.chunk.js +1 -0
  79. package/build/api-tokens-edit-page.821c5a6c.chunk.js +1 -0
  80. package/build/{api-tokens-list-page.700e575f.chunk.js → api-tokens-list-page.50519ed7.chunk.js} +1 -1
  81. package/build/ca-json.fa3e6f48.chunk.js +1 -0
  82. package/build/{codemirror-css.4e2bbed3.chunk.js → codemirror-css.aa4c2de2.chunk.js} +2 -3
  83. package/build/codemirror-theme.c1d2b07c.chunk.js +33 -0
  84. package/build/content-manager.d89dcc40.chunk.js +1184 -0
  85. package/build/content-type-builder-list-view.4aea46fa.chunk.js +198 -0
  86. package/build/content-type-builder-translation-de-json.a52482c7.chunk.js +1 -0
  87. package/build/content-type-builder-translation-dk-json.a8616510.chunk.js +1 -0
  88. package/build/content-type-builder-translation-en-json.1d9a3c14.chunk.js +1 -0
  89. package/build/content-type-builder-translation-es-json.c3ea46fb.chunk.js +1 -0
  90. package/build/content-type-builder-translation-ko-json.3fb7ddc8.chunk.js +1 -0
  91. package/build/content-type-builder-translation-pl-json.9b2993b2.chunk.js +1 -0
  92. package/build/content-type-builder-translation-pt-BR-json.6d255441.chunk.js +1 -0
  93. package/build/content-type-builder-translation-sv-json.c608b9ca.chunk.js +1 -0
  94. package/build/content-type-builder-translation-tr-json.949e22eb.chunk.js +1 -0
  95. package/build/content-type-builder-translation-zh-json.b79513e4.chunk.js +1 -0
  96. package/build/content-type-builder.3b1a75a2.chunk.js +127 -0
  97. package/build/dk-json.ab5dd6ac.chunk.js +1 -0
  98. package/build/email-settings-page.d7165683.chunk.js +15 -0
  99. package/build/email-translation-tr-json.8aa034bb.chunk.js +1 -0
  100. package/build/en-json.d268c039.chunk.js +1 -0
  101. package/build/es-json.8fe19fb3.chunk.js +1 -0
  102. package/build/fr-json.7ba93468.chunk.js +1 -0
  103. package/build/highlight.js.aea3bcf9.chunk.js +85 -0
  104. package/build/hu-json.459334f8.chunk.js +1 -0
  105. package/build/{i18n-settings-page.195d42fe.chunk.js → i18n-settings-page.ee572037.chunk.js} +1 -1
  106. package/build/i18n-translation-tr-json.34ca9d61.chunk.js +1 -0
  107. package/build/index.html +1 -1
  108. package/build/ja-json.e69860d6.chunk.js +1 -0
  109. package/build/main.1a19193b.js +4417 -0
  110. package/build/nl-json.02de2e84.chunk.js +1 -0
  111. package/build/runtime~main.2e5b4723.js +2 -0
  112. package/build/sk-json.2af48064.chunk.js +1 -0
  113. package/build/sso-settings-page.91924df1.chunk.js +41 -0
  114. package/build/tr-json.eac8bd79.chunk.js +1 -0
  115. package/build/upload-settings.5fd96cda.chunk.js +89 -0
  116. package/build/upload-translation-en-json.32cf9aff.chunk.js +1 -0
  117. package/build/upload-translation-sk-json.fe86c53b.chunk.js +1 -0
  118. package/build/upload-translation-tr-json.b173223a.chunk.js +1 -0
  119. package/build/upload.9993c14f.chunk.js +38 -0
  120. package/build/users-advanced-settings-page.c4431a05.chunk.js +13 -0
  121. package/build/users-email-settings-page.d8a0bf10.chunk.js +28 -0
  122. package/build/{users-permissions-translation-dk-json.fe39c74b.chunk.js → users-permissions-translation-dk-json.bad0b786.chunk.js} +1 -1
  123. package/build/{users-permissions-translation-en-json.765abf48.chunk.js → users-permissions-translation-en-json.aeab388a.chunk.js} +1 -1
  124. package/build/{users-permissions-translation-es-json.1bb9cde2.chunk.js → users-permissions-translation-es-json.152a923f.chunk.js} +1 -1
  125. package/build/{users-permissions-translation-ko-json.3be77775.chunk.js → users-permissions-translation-ko-json.6bd0ae22.chunk.js} +1 -1
  126. package/build/{users-permissions-translation-pl-json.1dbdd4a1.chunk.js → users-permissions-translation-pl-json.c6a02992.chunk.js} +1 -1
  127. package/build/{users-permissions-translation-sv-json.d5d11648.chunk.js → users-permissions-translation-sv-json.370d6eee.chunk.js} +1 -1
  128. package/build/users-permissions-translation-tr-json.9bebc250.chunk.js +1 -0
  129. package/build/{users-permissions-translation-zh-json.92f406f9.chunk.js → users-permissions-translation-zh-json.1fea833f.chunk.js} +1 -1
  130. package/build/users-providers-settings-page.47a69fe9.chunk.js +1 -0
  131. package/build/{users-roles-settings-page.445e5e16.chunk.js → users-roles-settings-page.0a87ba15.chunk.js} +3 -3
  132. package/build/{webhook-edit-page.14ad1e6e.chunk.js → webhook-edit-page.dcc3d145.chunk.js} +4 -4
  133. package/build/{webhook-list-page.b87821f2.chunk.js → webhook-list-page.894e6959.chunk.js} +1 -1
  134. package/build/zh-Hans-json.1b3b4a64.chunk.js +1 -0
  135. package/build/zh-json.2d46108e.chunk.js +1 -0
  136. package/package.json +17 -22
  137. package/server/controllers/admin.js +2 -0
  138. package/server/index.js +2 -0
  139. package/server/middlewares/index.js +7 -0
  140. package/server/middlewares/rateLimit.js +43 -0
  141. package/server/routes/admin.js +1 -1
  142. package/server/routes/authentication.js +4 -1
  143. package/server/routes/roles.js +0 -8
  144. package/server/services/metrics.js +5 -2
  145. package/server/services/role.js +1 -0
  146. package/utils/get-plugins-path.js +17 -3
  147. package/webpack.alias.js +0 -2
  148. package/admin/src/content-manager/components/BackHeader/index.js +0 -8
  149. package/admin/src/content-manager/components/Block/components.js +0 -28
  150. package/admin/src/content-manager/components/Block/index.js +0 -43
  151. package/admin/src/content-manager/components/Container/index.js +0 -7
  152. package/admin/src/content-manager/components/CustomInputCheckbox/components.js +0 -77
  153. package/admin/src/content-manager/components/CustomInputCheckbox/index.js +0 -53
  154. package/admin/src/content-manager/components/DynamicComponentCard/Wrapper.js +0 -63
  155. package/admin/src/content-manager/components/FilterOptionsCTA/index.js +0 -14
  156. package/admin/src/content-manager/components/FormTitle/index.js +0 -22
  157. package/admin/src/content-manager/components/FormWrapper/index.js +0 -20
  158. package/admin/src/content-manager/components/InputJSON/FieldError.js +0 -38
  159. package/admin/src/content-manager/components/LayoutTitle/index.js +0 -19
  160. package/admin/src/content-manager/components/PlusButton/index.js +0 -52
  161. package/admin/src/content-manager/components/PreviewCarret/components.js +0 -27
  162. package/admin/src/content-manager/components/PreviewCarret/index.js +0 -22
  163. package/admin/src/content-manager/components/SectionTitle/Title.js +0 -11
  164. package/admin/src/content-manager/components/SectionTitle/index.js +0 -26
  165. package/build/1551f4f60c37af51121f.woff2 +0 -0
  166. package/build/1920.74a262e7.chunk.js +0 -245
  167. package/build/1e59d2330b4c6deb84b3.ttf +0 -0
  168. package/build/20fd1704ea223900efa9.woff2 +0 -0
  169. package/build/2285773e6b4b172f07d9.woff +0 -0
  170. package/build/23f19bb08961f37aaf69.eot +0 -0
  171. package/build/2438.61291207.chunk.js +0 -2183
  172. package/build/2517.9b4940f3.chunk.js +0 -117
  173. package/build/2f517e09eb2ca6650ff5.svg +0 -3717
  174. package/build/4306.f03c2b46.chunk.js +0 -98
  175. package/build/4318.7931eee7.chunk.js +0 -30
  176. package/build/4689f52cc96215721344.svg +0 -801
  177. package/build/491974d108fe4002b2aa.ttf +0 -0
  178. package/build/4986.3820d11d.chunk.js +0 -145
  179. package/build/504.9aeff724.chunk.js +0 -758
  180. package/build/527940b104eb2ea366c8.ttf +0 -0
  181. package/build/77206a6bb316fa0aded5.eot +0 -0
  182. package/build/7a3337626410ca2f4071.woff2 +0 -0
  183. package/build/7a8b4f130182d19a2d7c.svg +0 -5034
  184. package/build/805.e991a370.chunk.js +0 -138
  185. package/build/8b43027f47b20503057d.eot +0 -0
  186. package/build/9707.a0cc4ad8.chunk.js +0 -70
  187. package/build/9bbb245e67a133f6e486.eot +0 -0
  188. package/build/Admin-authenticatedApp.1e1d3bdd.chunk.js +0 -80
  189. package/build/Admin_pluginsPage.3c872de7.chunk.js +0 -6
  190. package/build/Admin_settingsPage.a1a5218b.chunk.js +0 -178
  191. package/build/admin-app.9cb0abc7.chunk.js +0 -112
  192. package/build/admin-edit-roles-page.23f15909.chunk.js +0 -1
  193. package/build/admin-edit-users.283b49ed.chunk.js +0 -10
  194. package/build/api-tokens-create-page.93dd0689.chunk.js +0 -1
  195. package/build/api-tokens-edit-page.b0adac81.chunk.js +0 -1
  196. package/build/bb58e57c48a3e911f15f.woff +0 -0
  197. package/build/be9ee23c0c6390141475.ttf +0 -0
  198. package/build/c1e38fd9e0e74ba58f7a.svg +0 -2671
  199. package/build/ca-json.07ae0f2c.chunk.js +0 -1
  200. package/build/codemirror-theme.a82cae4e.chunk.js +0 -34
  201. package/build/content-manager.01e04e11.chunk.js +0 -1200
  202. package/build/content-type-builder-list-view.4412efc3.chunk.js +0 -201
  203. package/build/content-type-builder-translation-de-json.0d7696b9.chunk.js +0 -1
  204. package/build/content-type-builder-translation-dk-json.4729f055.chunk.js +0 -1
  205. package/build/content-type-builder-translation-en-json.f985c9c4.chunk.js +0 -1
  206. package/build/content-type-builder-translation-es-json.333cf47f.chunk.js +0 -1
  207. package/build/content-type-builder-translation-ko-json.51201b12.chunk.js +0 -1
  208. package/build/content-type-builder-translation-pl-json.4a42349b.chunk.js +0 -1
  209. package/build/content-type-builder-translation-pt-BR-json.6fe3b8d1.chunk.js +0 -1
  210. package/build/content-type-builder-translation-sv-json.6deff030.chunk.js +0 -1
  211. package/build/content-type-builder-translation-tr-json.2e52bc60.chunk.js +0 -1
  212. package/build/content-type-builder-translation-zh-json.3b0afd31.chunk.js +0 -1
  213. package/build/content-type-builder.848a9610.chunk.js +0 -145
  214. package/build/cropper-css.12fe038c.chunk.js +0 -306
  215. package/build/d878b0a6a1144760244f.woff2 +0 -0
  216. package/build/dk-json.144c6a8e.chunk.js +0 -1
  217. package/build/eeccf4f66002c6f2ba24.woff +0 -0
  218. package/build/email-settings-page.d44a57cb.chunk.js +0 -15
  219. package/build/email-translation-tr-json.87f2feb3.chunk.js +0 -1
  220. package/build/en-json.7dd57947.chunk.js +0 -1
  221. package/build/es-json.6d123a82.chunk.js +0 -1
  222. package/build/f691f37e57f04c152e23.woff +0 -0
  223. package/build/fontawesome-css-all.15068c6e.chunk.js +0 -4618
  224. package/build/fontawesome-css.418f40da.chunk.js +0 -6
  225. package/build/fontawesome-js.252cc5f3.chunk.js +0 -7
  226. package/build/fr-json.28ab54cb.chunk.js +0 -1
  227. package/build/highlight.js.af2de364.chunk.js +0 -86
  228. package/build/hu-json.c4b641bb.chunk.js +0 -1
  229. package/build/ja-json.1c9eeeec.chunk.js +0 -1
  230. package/build/main.f31112a5.js +0 -2034
  231. package/build/nl-json.26f39180.chunk.js +0 -1
  232. package/build/runtime~main.f91e75cd.js +0 -2
  233. package/build/sk-json.7ba4b330.chunk.js +0 -1
  234. package/build/sso-settings-page.9f091262.chunk.js +0 -1
  235. package/build/tr-json.9c44ea0c.chunk.js +0 -1
  236. package/build/upload-settings.450cab1a.chunk.js +0 -18
  237. package/build/upload-translation-en-json.86da7b0a.chunk.js +0 -1
  238. package/build/upload-translation-sk-json.b03d4904.chunk.js +0 -1
  239. package/build/upload.a73936d9.chunk.js +0 -64
  240. package/build/users-advanced-settings-page.dc23bc56.chunk.js +0 -13
  241. package/build/users-email-settings-page.6541d372.chunk.js +0 -28
  242. package/build/users-permissions-translation-tr-json.cdc49a3c.chunk.js +0 -1
  243. package/build/users-providers-settings-page.e11a2f64.chunk.js +0 -33
  244. package/build/zh-Hans-json.21617c24.chunk.js +0 -1
  245. package/build/zh-json.2ecc6b99.chunk.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const { join, resolve } = require('path');
3
+ const { join, resolve, sep, posix } = require('path');
4
4
  const fs = require('fs-extra');
5
5
  // eslint-disable-next-line import/no-extraneous-dependencies
6
6
  const glob = require('glob');
@@ -8,8 +8,22 @@ const glob = require('glob');
8
8
  // Only for dev environement
9
9
  const getPluginsPath = () => {
10
10
  const rootPath = resolve(__dirname, '..', join('..', '..', '..', 'packages'));
11
- const corePath = join(rootPath, 'core', '*');
12
- const pluginsPath = join(rootPath, 'plugins', '*');
11
+ /**
12
+ * So `glob` only supports '/' as a path separator, so we need to replace
13
+ * the path separator for the current OS with '/'. e.g. on windows it's `\`.
14
+ *
15
+ * see https://github.com/isaacs/node-glob/#windows for more information
16
+ *
17
+ * and see https://github.com/isaacs/node-glob/issues/467#issuecomment-1114240501 for the recommended fix.
18
+ */
19
+ let corePath = join(rootPath, 'core', '*');
20
+ let pluginsPath = join(rootPath, 'plugins', '*');
21
+
22
+ if (process.platform === 'win32') {
23
+ corePath = corePath.split(sep).join(posix.sep);
24
+ pluginsPath = pluginsPath.split(sep).join(posix.sep);
25
+ }
26
+
13
27
  const corePackageDirs = glob.sync(corePath);
14
28
  const pluginsPackageDirs = glob.sync(pluginsPath);
15
29
 
package/webpack.alias.js CHANGED
@@ -7,8 +7,6 @@ const aliasExactMatch = [
7
7
  '@strapi/design-system',
8
8
  '@strapi/helper-plugin',
9
9
  '@strapi/icons',
10
- '@fortawesome/fontawesome-svg-core',
11
- '@fortawesome/free-solid-svg-icons',
12
10
  'date-fns',
13
11
  'formik',
14
12
  'history',
@@ -1,8 +0,0 @@
1
- import styled from 'styled-components';
2
- import { BackHeader as BaseBackHeader } from '@strapi/helper-plugin';
3
-
4
- const BackHeader = styled(BaseBackHeader)`
5
- left: 24rem;
6
- `;
7
-
8
- export default BackHeader;
@@ -1,28 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const Wrapper = styled.div`
4
- margin-bottom: 35px;
5
- background: #ffffff;
6
- padding: 22px 28px 18px;
7
- padding-bottom: 13px;
8
- border-radius: 2px;
9
- box-shadow: 0 2px 4px #e3e9f3;
10
- -webkit-font-smoothing: antialiased;
11
- `;
12
-
13
- const Sub = styled.div`
14
- padding-top: 0px;
15
- line-height: 18px;
16
- > p:first-child {
17
- margin-bottom: 1px;
18
- font-weight: 700;
19
- color: #333740;
20
- font-size: 1.8rem;
21
- }
22
- > p {
23
- color: #787e8f;
24
- font-size: 13px;
25
- }
26
- `;
27
-
28
- export { Wrapper, Sub };
@@ -1,43 +0,0 @@
1
- /**
2
- *
3
- * Block
4
- */
5
-
6
- import React, { memo } from 'react';
7
- import PropTypes from 'prop-types';
8
- import { FormattedMessage } from 'react-intl';
9
- import { Wrapper, Sub } from './components';
10
-
11
- const renderMsg = (msg) => <p>{msg}</p>;
12
-
13
- const Block = ({ children, description, style, title }) => (
14
- <div className="col-md-12">
15
- <Wrapper style={style}>
16
- <Sub>
17
- {!!title && (
18
- <p>
19
- <FormattedMessage id={title} />
20
- </p>
21
- )}
22
- {!!description && <FormattedMessage id={description}>{renderMsg}</FormattedMessage>}
23
- </Sub>
24
- {children}
25
- </Wrapper>
26
- </div>
27
- );
28
-
29
- Block.defaultProps = {
30
- children: null,
31
- description: null,
32
- style: {},
33
- title: null,
34
- };
35
-
36
- Block.propTypes = {
37
- children: PropTypes.any,
38
- description: PropTypes.string,
39
- style: PropTypes.object,
40
- title: PropTypes.string,
41
- };
42
-
43
- export default memo(Block);
@@ -1,7 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const Container = styled.div`
4
- padding: 18px 30px 66px 30px;
5
- `;
6
-
7
- export default Container;
@@ -1,77 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
- /* eslint-disable */
3
-
4
- const Label = styled.label`
5
- cursor: pointer;
6
- position: relative;
7
- vertical-align: middle;
8
- > input {
9
- display: none;
10
- }
11
- &:before {
12
- content: '';
13
- position: absolute;
14
- left: 15px;
15
- top: calc(50% - 8px);
16
- width: 14px;
17
- height: 14px;
18
- border: 1px solid rgba(16, 22, 34, 0.15);
19
- background-color: #fdfdfd;
20
- border-radius: 3px;
21
- }
22
-
23
- ${({ shouldDisplaySomeChecked }) => {
24
- if (shouldDisplaySomeChecked) {
25
- return css`
26
- &:after {
27
- content: '\f068';
28
- position: absolute;
29
- top: calc(50% - 8px);
30
- left: 18px;
31
- font-size: 10px;
32
- font-family: 'FontAwesome';
33
- font-weight: 100;
34
- color: #1c5de7;
35
- }
36
- `;
37
- }
38
- }}
39
-
40
- ${({ shouldDisplayAllChecked }) => {
41
- if (shouldDisplayAllChecked) {
42
- return css`
43
- &:after {
44
- content: '\f00c';
45
- position: absolute;
46
- top: calc(50% - 9px);
47
- left: 17px;
48
- font-size: 10px;
49
- font-family: 'FontAwesome';
50
- font-weight: 100;
51
- color: #1c5de7;
52
- transition: all 0.2s;
53
- }
54
- `;
55
- }
56
- }}
57
-
58
- ${({ isChecked }) => {
59
- if (isChecked) {
60
- return css`
61
- &:after {
62
- content: '\f00c';
63
- position: absolute;
64
- top: calc(50% - 11px);
65
- left: 17px;
66
- font-size: 10px;
67
- font-family: 'FontAwesome';
68
- font-weight: 100;
69
- color: #1c5de7;
70
- transition: all 0.2s;
71
- }
72
- `;
73
- }
74
- }}
75
- `;
76
-
77
- export { Label };
@@ -1,53 +0,0 @@
1
- /**
2
- *
3
- * CustomInputCheckbox
4
- */
5
-
6
- import React, { memo } from 'react';
7
- import PropTypes from 'prop-types';
8
- import { Label } from './components';
9
-
10
- function CustomInputCheckbox({ entriesToDelete, isAll, name, onChange, value }) {
11
- const shouldDisplaySomeChecked = isAll && entriesToDelete.length > 0 && !value;
12
-
13
- const shouldDisplayAllChecked = isAll && value;
14
-
15
- return (
16
- <span className="form-check" style={{ marginLeft: '-15px' }}>
17
- <Label
18
- className="form-check-label"
19
- isAll={isAll}
20
- shouldDisplaySomeChecked={shouldDisplaySomeChecked}
21
- shouldDisplayAllChecked={shouldDisplayAllChecked}
22
- isChecked={value && !isAll}
23
- htmlFor={name}
24
- >
25
- <input
26
- className="form-check-input"
27
- checked={value}
28
- id={name}
29
- name={name}
30
- onChange={onChange}
31
- type="checkbox"
32
- />
33
- </Label>
34
- </span>
35
- );
36
- }
37
-
38
- CustomInputCheckbox.defaultProps = {
39
- entriesToDelete: [],
40
- isAll: false,
41
- name: '',
42
- value: false,
43
- };
44
-
45
- CustomInputCheckbox.propTypes = {
46
- entriesToDelete: PropTypes.array,
47
- isAll: PropTypes.bool,
48
- name: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
49
- onChange: PropTypes.func.isRequired,
50
- value: PropTypes.bool,
51
- };
52
-
53
- export default memo(CustomInputCheckbox);
@@ -1,63 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const Wrapper = styled.div`
4
- position: relative;
5
- height: 90px;
6
- width: 139px !important;
7
- margin: 0 10px 10px 0;
8
- padding: 18px 10px;
9
- background-color: #ffffff;
10
- color: #919bae;
11
- text-align: center;
12
- border-radius: 2px;
13
- cursor: pointer;
14
- border: 1px solid #ffffff;
15
-
16
- button {
17
- outline: 0;
18
- }
19
-
20
- .component-uid {
21
- width: 119px;
22
- text-overflow: ellipsis;
23
- overflow: hidden;
24
- white-space: nowrap;
25
- color: #919bae;
26
- font-weight: 500;
27
- font-size: 13px;
28
- line-height: normal;
29
- }
30
-
31
- .component-icon {
32
- width: 35px;
33
- height: 35px;
34
- margin-bottom: 5px;
35
- line-height: 35px;
36
- align-self: center;
37
- border-radius: 50%;
38
- background-color: #e9eaeb;
39
- color: #b4b6ba;
40
- padding: 0;
41
- i,
42
- svg {
43
- margin: auto;
44
- display: block;
45
- }
46
- }
47
-
48
- &:hover {
49
- background-color: #e6f0fb;
50
- color: #007eff;
51
- border: 1px solid #aed4fb;
52
-
53
- .component-icon {
54
- background-color: #aed4fb;
55
- color: #007eff;
56
- }
57
- .component-uid {
58
- color: #007eff;
59
- }
60
- }
61
- `;
62
-
63
- export default Wrapper;
@@ -1,14 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const FilterOptionsCTA = styled.button`
4
- display: flex;
5
- justify-content: center;
6
- height: 20px;
7
- width: 20px;
8
- margin: 8px 5px 0px 0px;
9
- border-radius: 50%;
10
- border: 1px solid #e3e9f3;
11
- cursor: pointer;
12
- `;
13
-
14
- export default FilterOptionsCTA;
@@ -1,22 +0,0 @@
1
- import React, { memo } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { FormattedMessage } from 'react-intl';
4
-
5
- const FormTitle = ({ description, title }) => (
6
- <>
7
- {!!title && <FormattedMessage id={title} />}
8
- {!!description && <FormattedMessage id={description}>{(msg) => <p>{msg}</p>}</FormattedMessage>}
9
- </>
10
- );
11
-
12
- FormTitle.propTypes = {
13
- description: PropTypes.string,
14
- title: PropTypes.string,
15
- };
16
-
17
- FormTitle.defaultProps = {
18
- description: null,
19
- title: null,
20
- };
21
-
22
- export default memo(FormTitle);
@@ -1,20 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const FormWrapper = styled.div`
4
- padding: 22px 10px 0 10px;
5
- background: #ffffff;
6
- border-radius: 2px;
7
- box-shadow: 0 2px 4px #e3e9f3;
8
- margin-bottom: 17px;
9
- > div {
10
- margin-right: 0;
11
- margin-left: 0;
12
- }
13
- .row {
14
- &:last-of-type {
15
- margin-bottom: 0;
16
- }
17
- }
18
- `;
19
-
20
- export default FormWrapper;
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { useIntl } from 'react-intl';
4
- import { Typography } from '@strapi/design-system/Typography';
5
-
6
- export const FieldError = ({ id, error, name }) => {
7
- const { formatMessage } = useIntl();
8
- const errorMessage = error ? formatMessage({ id: error, defaultMessage: error }) : '';
9
-
10
- if (!error) {
11
- return null;
12
- }
13
-
14
- return (
15
- <Typography
16
- as="p"
17
- variant="pi"
18
- id={`${id || name}-error`}
19
- textColor="danger600"
20
- data-strapi-field-error
21
- >
22
- {errorMessage}
23
- </Typography>
24
- );
25
- };
26
-
27
- FieldError.defaultProps = {
28
- id: undefined,
29
- error: undefined,
30
- };
31
-
32
- FieldError.propTypes = {
33
- error: PropTypes.string,
34
- id: PropTypes.string,
35
- name: PropTypes.string.isRequired,
36
- };
37
-
38
- export default FieldError;
@@ -1,19 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const LayoutTitle = styled.div`
4
- color: #333740;
5
- font-size: 13px;
6
- font-weight: 500;
7
- line-height: 18px;
8
-
9
- p {
10
- margin-top: 2px;
11
- margin-bottom: 13px;
12
- color: #9ea7b8;
13
- font-size: 12px;
14
- font-weight: 400;
15
- line-height: normal;
16
- }
17
- `;
18
-
19
- export default LayoutTitle;
@@ -1,52 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const beforeStyle = `
4
- content: ' ';
5
- position: absolute;
6
- display: block;
7
- width: 14px;
8
- height: 2px;
9
- left: 11px;
10
- top: 17px;
11
- bottom: 10px;
12
- z-index: 9;
13
- `;
14
-
15
- const afterStyle = `
16
- content: ' ';
17
- position: absolute;
18
- display: block;
19
- height: 14px;
20
- width: 2px;
21
- left: 17px;
22
- top: 11px;
23
- right: 10px;
24
- z-index: 9;
25
- `;
26
-
27
- const Button = styled.button`
28
- position: relative;
29
- height: 36px;
30
- width: 36px;
31
- background-color: #f3f4f4;
32
- border-radius: 50%;
33
- text-align: center;
34
-
35
- :focus {
36
- outline: 0;
37
- }
38
-
39
- :before {
40
- ${beforeStyle}
41
- }
42
- :after {
43
- ${afterStyle}
44
- }
45
-
46
- :before,
47
- :after {
48
- background-color: #b4b6ba;
49
- }
50
- `;
51
-
52
- export default Button;
@@ -1,27 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- /* eslint-disable indent */
4
- const Wrapper = styled.div`
5
- display: flex;
6
- flex-direction: column;
7
- justify-content: space-around;
8
- height: 30px;
9
- width: 100%;
10
- padding: 0 5px;
11
-
12
- ${({ isComponent }) =>
13
- isComponent &&
14
- `
15
- height: 34px;
16
- padding: 0;
17
- `}
18
-
19
- border-radius: 2px;
20
- > div {
21
- width: 100%;
22
- height: 2px;
23
- background: #007eff;
24
- }
25
- `;
26
-
27
- export default Wrapper;
@@ -1,22 +0,0 @@
1
- import React, { memo } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import Wrapper from './components';
5
-
6
- const PreviewCarret = ({ isComponent, style }) => (
7
- <Wrapper isComponent={isComponent} style={style}>
8
- <div />
9
- </Wrapper>
10
- );
11
-
12
- PreviewCarret.defaultProps = {
13
- isComponent: false,
14
- style: {},
15
- };
16
-
17
- PreviewCarret.propTypes = {
18
- isComponent: PropTypes.bool,
19
- style: PropTypes.object,
20
- };
21
-
22
- export default memo(PreviewCarret);
@@ -1,11 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const Title = styled.div`
4
- color: #787e8f;
5
- font-size: 11px;
6
- font-weight: 700;
7
- letter-spacing: 0.77px;
8
- text-transform: uppercase;
9
- `;
10
-
11
- export default Title;
@@ -1,26 +0,0 @@
1
- import React, { memo } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { FormattedMessage } from 'react-intl';
4
- import { getTrad } from '../../utils';
5
- import Title from './Title';
6
-
7
- const SectionTitle = ({ isSettings }) => {
8
- const suffix = isSettings ? 'settings' : 'view';
9
- const msgId = getTrad(`containers.SettingPage.${suffix}`);
10
-
11
- return (
12
- <div style={{ marginBottom: '18px' }}>
13
- <FormattedMessage id={msgId}>{(msg) => <Title>{msg}</Title>}</FormattedMessage>
14
- </div>
15
- );
16
- };
17
-
18
- SectionTitle.propTypes = {
19
- isSettings: PropTypes.bool,
20
- };
21
-
22
- SectionTitle.defaultProps = {
23
- isSettings: false,
24
- };
25
-
26
- export default memo(SectionTitle);
Binary file