@strapi/plugin-documentation 4.0.0-next.7 → 4.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 (72) hide show
  1. package/admin/src/components/FieldActionWrapper/index.js +14 -0
  2. package/admin/src/components/PluginIcon/index.js +12 -0
  3. package/admin/src/index.js +27 -12
  4. package/admin/src/pages/PluginPage/index.js +199 -0
  5. package/admin/src/pages/PluginPage/tests/index.test.js +873 -0
  6. package/admin/src/pages/PluginPage/tests/server.js +23 -0
  7. package/admin/src/pages/SettingsPage/index.js +181 -0
  8. package/admin/src/pages/SettingsPage/tests/index.test.js +612 -0
  9. package/admin/src/pages/SettingsPage/tests/server.js +18 -0
  10. package/admin/src/pages/{HomePage/utils → utils}/api.js +5 -4
  11. package/admin/src/pages/{HomePage/utils → utils}/schema.js +0 -0
  12. package/admin/src/pages/utils/useReactQuery.js +46 -0
  13. package/admin/src/translations/ar.json +0 -3
  14. package/admin/src/translations/cs.json +0 -3
  15. package/admin/src/translations/de.json +0 -3
  16. package/admin/src/translations/en.json +14 -3
  17. package/admin/src/translations/es.json +0 -3
  18. package/admin/src/translations/fr.json +0 -3
  19. package/admin/src/translations/id.json +0 -3
  20. package/admin/src/translations/it.json +0 -3
  21. package/admin/src/translations/ko.json +41 -22
  22. package/admin/src/translations/ms.json +0 -3
  23. package/admin/src/translations/nl.json +0 -3
  24. package/admin/src/translations/pl.json +0 -3
  25. package/admin/src/translations/pt-BR.json +0 -3
  26. package/admin/src/translations/pt.json +0 -3
  27. package/admin/src/translations/ru.json +0 -3
  28. package/admin/src/translations/sk.json +0 -3
  29. package/admin/src/translations/th.json +0 -3
  30. package/admin/src/translations/tr.json +0 -3
  31. package/admin/src/translations/uk.json +0 -3
  32. package/admin/src/translations/vi.json +0 -3
  33. package/admin/src/translations/zh-Hans.json +3 -6
  34. package/admin/src/translations/zh.json +0 -3
  35. package/package.json +32 -47
  36. package/server/bootstrap.js +19 -105
  37. package/server/config/default-config.js +12 -15
  38. package/server/config/index.js +10 -2
  39. package/server/controllers/documentation.js +61 -127
  40. package/server/index.js +17 -0
  41. package/server/middlewares/documentation.js +18 -41
  42. package/server/{policies/index-policy.js → middlewares/restrict-access.js} +5 -16
  43. package/{public → server/public}/index.html +0 -0
  44. package/{public → server/public}/login.html +0 -0
  45. package/server/register.js +11 -0
  46. package/server/routes/index.js +81 -3
  47. package/server/services/documentation.js +125 -1835
  48. package/server/utils/builders/build-api-endpoint-path.js +174 -0
  49. package/server/utils/builders/build-api-requests.js +41 -0
  50. package/server/utils/builders/build-api-responses.js +108 -0
  51. package/server/utils/builders/index.js +11 -0
  52. package/server/utils/clean-schema-attributes.js +205 -0
  53. package/server/utils/error-response.js +22 -0
  54. package/server/utils/get-schema-data.js +32 -0
  55. package/server/utils/query-params.js +84 -0
  56. package/strapi-admin.js +3 -0
  57. package/strapi-server.js +1 -19
  58. package/admin/src/assets/images/logo.svg +0 -1
  59. package/admin/src/components/Block/components.js +0 -26
  60. package/admin/src/components/Block/index.js +0 -39
  61. package/admin/src/components/Copy/index.js +0 -36
  62. package/admin/src/components/Header/index.js +0 -72
  63. package/admin/src/components/Row/ButtonContainer.js +0 -67
  64. package/admin/src/components/Row/components.js +0 -83
  65. package/admin/src/components/Row/index.js +0 -51
  66. package/admin/src/pages/App/index.js +0 -21
  67. package/admin/src/pages/HomePage/components.js +0 -59
  68. package/admin/src/pages/HomePage/index.js +0 -168
  69. package/admin/src/pages/HomePage/useHomePage.js +0 -56
  70. package/server/policies/index.js +0 -7
  71. package/server/routes/routes.json +0 -74
  72. package/server/services/utils/forms.json +0 -29
@@ -1,74 +0,0 @@
1
- {
2
- "routes": [
3
- {
4
- "method": "GET",
5
- "path": "/",
6
- "handler": "Documentation.index",
7
- "config": {
8
- "policies": [
9
- "plugin::documentation.index",
10
- ["admin::hasPermissions", ["plugin::documentation.read"]]
11
- ]
12
- }
13
- },
14
- {
15
- "method": "GET",
16
- "path": "/v:major(\\d+).:minor(\\d+).:patch(\\d+)",
17
- "handler": "Documentation.index",
18
- "config": {
19
- "policies": [
20
- "plugin::documentation.index",
21
- ["admin::hasPermissions", ["plugin::documentation.read"]]
22
- ]
23
- }
24
- },
25
- {
26
- "method": "GET",
27
- "path": "/login",
28
- "handler": "Documentation.loginView",
29
- "config": {
30
- "policies": [["admin::hasPermissions", ["plugin::documentation.read"]]]
31
- }
32
- },
33
- {
34
- "method": "POST",
35
- "path": "/login",
36
- "handler": "Documentation.login",
37
- "config": {
38
- "policies": [["admin::hasPermissions", ["plugin::documentation.read"]]]
39
- }
40
- },
41
- {
42
- "method": "GET",
43
- "path": "/getInfos",
44
- "handler": "Documentation.getInfos",
45
- "config": {
46
- "policies": [["admin::hasPermissions", ["plugin::documentation.read"]]]
47
- }
48
- },
49
- {
50
- "method": "POST",
51
- "path": "/regenerateDoc",
52
- "handler": "Documentation.regenerateDoc",
53
- "config": {
54
- "policies": [["admin::hasPermissions", ["plugin::documentation.settings.regenerate"]]]
55
- }
56
- },
57
- {
58
- "method": "PUT",
59
- "path": "/updateSettings",
60
- "handler": "Documentation.updateSettings",
61
- "config": {
62
- "policies": [["admin::hasPermissions", ["plugin::documentation.settings.update"]]]
63
- }
64
- },
65
- {
66
- "method": "DELETE",
67
- "path": "/deleteDoc/:version",
68
- "handler": "Documentation.deleteDoc",
69
- "config": {
70
- "policies": []
71
- }
72
- }
73
- ]
74
- }
@@ -1,29 +0,0 @@
1
- [
2
- [
3
- {
4
- "name": "restrictedAccess",
5
- "label": {
6
- "id": "documentation.containers.HomePage.form.restrictedAccess"
7
- },
8
- "type": "toggle",
9
- "inputDescription": {
10
- "id": "documentation.containers.HomePage.form.restrictedAccess.inputDescription"
11
- },
12
- "inputDescriptionStyle": { "marginBottom": "2px"},
13
- "value": false
14
- },
15
- {
16
- "name": "password",
17
- "label": {
18
- "id": "documentation.containers.HomePage.form.password"
19
- },
20
- "customBootstrapClass": "col-md-4",
21
- "type": "password",
22
- "inputDescription": {
23
- "id": "documentation.containers.HomePage.form.password.inputDescription"
24
- },
25
- "validations": { "required": true },
26
- "value": ""
27
- }
28
- ]
29
- ]