@strapi/admin 4.6.0-beta.2 → 4.6.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 (228) hide show
  1. package/.browserslistrc +2 -1
  2. package/admin/src/components/AuthenticatedApp/utils/api.js +5 -4
  3. package/admin/src/components/ConfigurationsProvider/index.js +21 -18
  4. package/admin/src/components/ConfigurationsProvider/reducer.js +1 -0
  5. package/admin/src/components/LeftMenu/index.js +62 -53
  6. package/admin/src/components/UnauthenticatedLogo/index.js +1 -1
  7. package/admin/src/content-manager/components/CollectionTypeFormWrapper/index.js +20 -16
  8. package/admin/src/content-manager/components/DynamicTable/CellContent/RelationMultiple/index.js +5 -5
  9. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/findLeafByPathAndReplace.js +1 -3
  10. package/admin/src/content-manager/components/EditViewDataManagerProvider/utils/schema.js +6 -5
  11. package/admin/src/content-manager/components/Hint/index.js +4 -17
  12. package/admin/src/content-manager/components/InputUID/index.js +7 -18
  13. package/admin/src/content-manager/components/Inputs/index.js +0 -2
  14. package/admin/src/content-manager/components/PreviewWysiwyg/Wrapper.js +22 -27
  15. package/admin/src/content-manager/components/SingleTypeFormWrapper/index.js +35 -14
  16. package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +19 -28
  17. package/admin/src/content-manager/components/Wysiwyg/index.js +4 -8
  18. package/admin/src/content-manager/hooks/useFetchContentTypeLayout/index.js +4 -3
  19. package/admin/src/content-manager/hooks/useLazyComponents/index.js +9 -13
  20. package/admin/src/content-manager/hooks/useRelation/useRelation.js +4 -4
  21. package/admin/src/content-manager/pages/App/LeftMenu/index.js +3 -8
  22. package/admin/src/content-manager/pages/App/LeftMenu/utils/index.js +1 -0
  23. package/admin/src/content-manager/pages/App/LeftMenu/utils/matchByTitle.js +24 -0
  24. package/admin/src/content-manager/pages/App/useModels.js +8 -3
  25. package/admin/src/content-manager/pages/App/utils/getContentTypeLinks.js +3 -2
  26. package/admin/src/content-manager/pages/ComponentSetttingsView/index.js +4 -4
  27. package/admin/src/content-manager/pages/EditSettingsView/utils/api.js +4 -2
  28. package/admin/src/content-manager/pages/EditView/{Informations → Information}/index.js +55 -39
  29. package/admin/src/content-manager/pages/EditView/{Informations → Information}/utils/getUnits.js +0 -0
  30. package/admin/src/content-manager/pages/EditView/index.js +3 -3
  31. package/admin/src/content-manager/pages/ListSettingsView/utils/api.js +4 -2
  32. package/admin/src/content-manager/pages/ListView/index.js +9 -9
  33. package/admin/src/core/store/configureStore.js +22 -4
  34. package/admin/src/core/utils/index.js +0 -1
  35. package/admin/src/hooks/useFetchEnabledPlugins/utils/api.js +3 -2
  36. package/admin/src/hooks/useInjectReducer/index.js +1 -0
  37. package/admin/src/hooks/useInjectReducer/useInjectReducer.js +19 -0
  38. package/admin/src/hooks/useRegenerate/index.js +3 -3
  39. package/admin/src/hooks/useRolesList/index.js +5 -3
  40. package/admin/src/hooks/useSettingsMenu/init.js +2 -25
  41. package/admin/src/hooks/useSettingsMenu/utils/adminLinks.js +4 -0
  42. package/admin/src/hooks/useSettingsMenu/utils/customAdminLinks.js +1 -0
  43. package/admin/src/hooks/useSettingsMenu/utils/defaultAdminLinks.js +21 -0
  44. package/admin/src/index.js +5 -4
  45. package/admin/src/pages/App/index.js +6 -2
  46. package/admin/src/pages/ProfilePage/utils/api.js +5 -3
  47. package/admin/src/pages/SettingsPage/{pages/Users/ListPage → components}/Filters/index.js +0 -0
  48. package/admin/src/pages/SettingsPage/pages/ApiTokens/EditView/index.js +6 -5
  49. package/admin/src/pages/SettingsPage/pages/ApiTokens/ListView/index.js +4 -3
  50. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/CustomizationInfos/index.js +142 -0
  51. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/{Form → CustomizationInfos}/init.js +3 -0
  52. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/{Form → CustomizationInfos}/reducer.js +20 -0
  53. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/LogoInput/index.js +21 -17
  54. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/index.js +68 -42
  55. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/utils/api.js +9 -3
  56. package/admin/src/pages/SettingsPage/pages/Users/EditPage/utils/api.js +6 -3
  57. package/admin/src/pages/SettingsPage/pages/Users/ListPage/ModalForm/index.js +9 -3
  58. package/admin/src/pages/SettingsPage/pages/Users/ListPage/index.js +1 -1
  59. package/admin/src/pages/SettingsPage/pages/Users/ListPage/utils/api.js +6 -3
  60. package/admin/src/pages/SettingsPage/pages/Users/components/SelectRoles/index.js +3 -2
  61. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/components/EventInput/index.js +1 -1
  62. package/admin/src/pages/SettingsPage/pages/Webhooks/EditView/index.js +3 -2
  63. package/admin/src/pages/SettingsPage/utils/defaultRoutes.js +0 -11
  64. package/admin/src/permissions/defaultPermissions.js +4 -0
  65. package/admin/src/translations/en.json +29 -21
  66. package/admin/src/translations/eu.json +796 -0
  67. package/admin/src/translations/languageNativeNames.js +1 -0
  68. package/admin/src/translations/ru.json +9 -9
  69. package/build/1412.936ed920.chunk.js +159 -0
  70. package/build/1683.c8aa7b7c.chunk.js +268 -0
  71. package/build/2607.2e48dbf8.chunk.js +66 -0
  72. package/build/2743.6d1632f9.chunk.js +45 -0
  73. package/build/3075.dc3894fe.chunk.js +108 -0
  74. package/build/3632.0317b618.chunk.js +138 -0
  75. package/build/4318.f96a9d4d.chunk.js +30 -0
  76. package/build/{3557.e7115160.chunk.js → 4855.bd092921.chunk.js} +131 -91
  77. package/build/{5015.f5e15fdb.chunk.js → 5015.8e3fe50b.chunk.js} +1 -1
  78. package/build/8633.00ccd382.chunk.js +1 -0
  79. package/build/9707.7290fd92.chunk.js +96 -0
  80. package/build/Admin-authenticatedApp.ce646f66.chunk.js +75 -0
  81. package/build/Admin_homePage.b1730882.chunk.js +77 -0
  82. package/build/Admin_marketplace.ea0316c2.chunk.js +26 -0
  83. package/build/Admin_pluginsPage.5c24f963.chunk.js +6 -0
  84. package/build/Admin_profilePage.59af1978.chunk.js +15 -0
  85. package/build/Admin_settingsPage.d1493824.chunk.js +178 -0
  86. package/build/{Upload_ConfigureTheView.9bdf41b5.chunk.js → Upload_ConfigureTheView.3f2b6e6a.chunk.js} +1 -1
  87. package/build/admin-app.25934eaa.chunk.js +112 -0
  88. package/build/admin-edit-roles-page.446b69dc.chunk.js +1 -0
  89. package/build/admin-edit-users.2ed69bfd.chunk.js +10 -0
  90. package/build/admin-users.fc003b10.chunk.js +11 -0
  91. package/build/{api-tokens-create-page.0e686c30.chunk.js → api-tokens-create-page.d248362d.chunk.js} +1 -1
  92. package/build/{api-tokens-edit-page.d6c7487b.chunk.js → api-tokens-edit-page.8516fa20.chunk.js} +1 -1
  93. package/build/api-tokens-list-page.44a79fda.chunk.js +16 -0
  94. package/build/audit-logs-settings-page.c3dce30d.chunk.js +1 -0
  95. package/build/content-manager.35ff9726.chunk.js +1139 -0
  96. package/build/content-type-builder-list-view.79e84b36.chunk.js +193 -0
  97. package/build/{content-type-builder-translation-de-json.29df67b8.chunk.js → content-type-builder-translation-de-json.0979cccb.chunk.js} +1 -1
  98. package/build/{content-type-builder-translation-dk-json.e22d2527.chunk.js → content-type-builder-translation-dk-json.e05583e9.chunk.js} +1 -1
  99. package/build/content-type-builder-translation-en-json.e577d595.chunk.js +1 -0
  100. package/build/{content-type-builder-translation-es-json.1044b252.chunk.js → content-type-builder-translation-es-json.fe4daad8.chunk.js} +1 -1
  101. package/build/{content-type-builder-translation-fr-json.2183e6b3.chunk.js → content-type-builder-translation-fr-json.b1eb52f6.chunk.js} +1 -1
  102. package/build/{content-type-builder-translation-id-json.ba3e8891.chunk.js → content-type-builder-translation-id-json.ee3b36bb.chunk.js} +1 -1
  103. package/build/{content-type-builder-translation-it-json.d4661201.chunk.js → content-type-builder-translation-it-json.13b3c26a.chunk.js} +1 -1
  104. package/build/{content-type-builder-translation-ko-json.57ff7f51.chunk.js → content-type-builder-translation-ko-json.8a274be5.chunk.js} +1 -1
  105. package/build/{content-type-builder-translation-pl-json.a057b51e.chunk.js → content-type-builder-translation-pl-json.24a34349.chunk.js} +1 -1
  106. package/build/{content-type-builder-translation-pt-BR-json.446df9da.chunk.js → content-type-builder-translation-pt-BR-json.97f71a9d.chunk.js} +1 -1
  107. package/build/{content-type-builder-translation-ru-json.8c51843e.chunk.js → content-type-builder-translation-ru-json.54d11230.chunk.js} +1 -1
  108. package/build/{content-type-builder-translation-sv-json.af6ecca1.chunk.js → content-type-builder-translation-sv-json.59f5e1e5.chunk.js} +1 -1
  109. package/build/{content-type-builder-translation-tr-json.da83a07e.chunk.js → content-type-builder-translation-tr-json.cea4d226.chunk.js} +1 -1
  110. package/build/{content-type-builder-translation-zh-json.42f94cb3.chunk.js → content-type-builder-translation-zh-json.faedd610.chunk.js} +1 -1
  111. package/build/content-type-builder.855db321.chunk.js +126 -0
  112. package/build/email-settings-page.d1fcc7a3.chunk.js +10 -0
  113. package/build/en-json.1f137a90.chunk.js +1 -0
  114. package/build/eu-json.fceecd8b.chunk.js +1 -0
  115. package/build/i18n-settings-page.b8d8753e.chunk.js +60 -0
  116. package/build/{i18n-translation-de-json.dc876c08.chunk.js → i18n-translation-de-json.362384a6.chunk.js} +1 -1
  117. package/build/{i18n-translation-dk-json.49aaf933.chunk.js → i18n-translation-dk-json.89401417.chunk.js} +1 -1
  118. package/build/{i18n-translation-en-json.ac9ebc1b.chunk.js → i18n-translation-en-json.60af6722.chunk.js} +1 -1
  119. package/build/{i18n-translation-es-json.57072ed3.chunk.js → i18n-translation-es-json.87b494d1.chunk.js} +1 -1
  120. package/build/{i18n-translation-fr-json.84733f34.chunk.js → i18n-translation-fr-json.57ddc77e.chunk.js} +1 -1
  121. package/build/{i18n-translation-ko-json.fc73fe20.chunk.js → i18n-translation-ko-json.ef4f9471.chunk.js} +1 -1
  122. package/build/{i18n-translation-pl-json.16e5df90.chunk.js → i18n-translation-pl-json.dfac513d.chunk.js} +1 -1
  123. package/build/{i18n-translation-tr-json.cb39c048.chunk.js → i18n-translation-tr-json.10f0600d.chunk.js} +1 -1
  124. package/build/{i18n-translation-zh-Hans-json.2cf82d2d.chunk.js → i18n-translation-zh-Hans-json.757ce62d.chunk.js} +1 -1
  125. package/build/{i18n-translation-zh-json.ed1d272e.chunk.js → i18n-translation-zh-json.bef2dc07.chunk.js} +1 -1
  126. package/build/index.html +1 -1
  127. package/build/main.7b151630.js +4377 -0
  128. package/build/ru-json.aa5cd123.chunk.js +1 -0
  129. package/build/runtime~main.a20d633b.js +2 -0
  130. package/build/sso-settings-page.b85ad080.chunk.js +41 -0
  131. package/build/upload-settings.ef64bbf9.chunk.js +84 -0
  132. package/build/upload.c5730dfa.chunk.js +33 -0
  133. package/build/users-advanced-settings-page.fce9908e.chunk.js +8 -0
  134. package/build/users-email-settings-page.343d0ad2.chunk.js +23 -0
  135. package/build/users-providers-settings-page.e5a9a3f1.chunk.js +99 -0
  136. package/build/users-roles-settings-page.66312f31.chunk.js +30 -0
  137. package/build/webhook-edit-page.73e51e64.chunk.js +75 -0
  138. package/build/webhook-list-page.1134f130.chunk.js +42 -0
  139. package/ee/admin/hooks/useSettingsMenu/utils/customAdminLinks.js +17 -0
  140. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/ComboboxFilter/index.js +41 -0
  141. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionBody.js +1 -3
  142. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/Modal/ActionItem.js +0 -0
  143. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/Modal/index.js +5 -1
  144. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/PaginationFooter/index.js +0 -0
  145. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/TableRows/index.js +1 -1
  146. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useAuditLogsData.js +47 -0
  147. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/hooks/useFormatTimeStamp.js +0 -0
  148. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/index.js +35 -36
  149. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/utils/getActionTypesDefaultMessages.js +10 -9
  150. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getDisplayedFilters.js +88 -0
  151. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ListView/utils/tableHeaders.js +0 -0
  152. package/{admin/src → ee/admin}/pages/SettingsPage/pages/AuditLogs/ProtectedListPage/index.js +1 -1
  153. package/ee/admin/pages/SettingsPage/pages/Roles/ListPage/index.js +4 -2
  154. package/ee/admin/pages/SettingsPage/{SingleSignOn → pages/SingleSignOn}/index.js +3 -3
  155. package/ee/admin/pages/SettingsPage/{SingleSignOn → pages/SingleSignOn}/utils/schema.js +0 -0
  156. package/ee/admin/pages/SettingsPage/utils/customRoutes.js +28 -16
  157. package/ee/server/bootstrap.js +2 -0
  158. package/ee/server/migrations/audit-logs-table.js +45 -0
  159. package/ee/server/register.js +2 -0
  160. package/ee/server/routes/index.js +94 -10
  161. package/ee/server/services/audit-logs.js +30 -2
  162. package/ee/server/services/passport/sso.js +13 -1
  163. package/ee/server/services/passport.js +1 -4
  164. package/package.json +27 -32
  165. package/server/controllers/admin.js +19 -2
  166. package/server/register.js +7 -7
  167. package/server/services/project-settings.js +10 -6
  168. package/server/services/user.js +3 -1
  169. package/server/validation/project-settings.js +19 -10
  170. package/strapi-server.js +1 -1
  171. package/admin/src/content-manager/components/InputJSON/FieldWrapper.js +0 -40
  172. package/admin/src/content-manager/components/InputJSON/Label.js +0 -35
  173. package/admin/src/content-manager/components/InputJSON/components.js +0 -36
  174. package/admin/src/content-manager/components/InputJSON/index.js +0 -223
  175. package/admin/src/content-manager/components/InputJSON/jsonlint.js +0 -680
  176. package/admin/src/core/store/createReducer.js +0 -5
  177. package/admin/src/core/utils/axiosInstance.js +0 -38
  178. package/admin/src/pages/SettingsPage/pages/ApplicationInfosPage/components/Form/index.js +0 -85
  179. package/build/2235.746d3cf7.chunk.js +0 -106
  180. package/build/2598.01c96bd5.chunk.js +0 -159
  181. package/build/2743.692b1f21.chunk.js +0 -42
  182. package/build/4318.87affaf2.chunk.js +0 -30
  183. package/build/4958.1979bbf5.chunk.js +0 -276
  184. package/build/5052.c2eacff2.chunk.js +0 -65
  185. package/build/7295.4e2dfbbb.chunk.js +0 -114
  186. package/build/805.da20168c.chunk.js +0 -138
  187. package/build/8633.6f546066.chunk.js +0 -1
  188. package/build/874.be41e4b3.chunk.js +0 -104
  189. package/build/9707.a07db355.chunk.js +0 -101
  190. package/build/Admin-authenticatedApp.9933974c.chunk.js +0 -75
  191. package/build/Admin_homePage.045bb0c8.chunk.js +0 -77
  192. package/build/Admin_marketplace.bf3ac090.chunk.js +0 -26
  193. package/build/Admin_pluginsPage.d2a9a619.chunk.js +0 -6
  194. package/build/Admin_profilePage.5e830ceb.chunk.js +0 -15
  195. package/build/Admin_settingsPage.53fa00a4.chunk.js +0 -178
  196. package/build/admin-app.8ed108ca.chunk.js +0 -112
  197. package/build/admin-audit-logs.68f833bf.chunk.js +0 -1
  198. package/build/admin-edit-roles-page.32bfe5ea.chunk.js +0 -1
  199. package/build/admin-edit-users.795f155c.chunk.js +0 -10
  200. package/build/admin-users.cbd9bcf7.chunk.js +0 -11
  201. package/build/api-tokens-list-page.a55e427c.chunk.js +0 -16
  202. package/build/codemirror-addon-closebrackets.71aa4bbd.chunk.js +0 -2
  203. package/build/codemirror-addon-lint-js.405f70fb.chunk.js +0 -1
  204. package/build/codemirror-addon-lint.8487ad3d.chunk.js +0 -1
  205. package/build/codemirror-addon-mark-selection.1928c849.chunk.js +0 -1
  206. package/build/codemirror-css.359a2a4b.chunk.js +0 -345
  207. package/build/codemirror-javacript.af237b68.chunk.js +0 -1
  208. package/build/codemirror-theme.2fe63a16.chunk.js +0 -33
  209. package/build/content-manager.ad929a94.chunk.js +0 -1174
  210. package/build/content-type-builder-list-view.3048854d.chunk.js +0 -198
  211. package/build/content-type-builder-translation-en-json.08e28f4e.chunk.js +0 -1
  212. package/build/content-type-builder.4edd1c22.chunk.js +0 -127
  213. package/build/email-settings-page.7c9e6c5e.chunk.js +0 -15
  214. package/build/en-json.d65a13ef.chunk.js +0 -1
  215. package/build/i18n-settings-page.fbccdf12.chunk.js +0 -1
  216. package/build/main.6bbf9950.js +0 -4417
  217. package/build/ru-json.3b411a39.chunk.js +0 -1
  218. package/build/runtime~main.c2bf62af.js +0 -2
  219. package/build/sso-settings-page.4031de9e.chunk.js +0 -41
  220. package/build/upload-settings.657790fd.chunk.js +0 -89
  221. package/build/upload.608a9856.chunk.js +0 -38
  222. package/build/users-advanced-settings-page.e3ab865f.chunk.js +0 -13
  223. package/build/users-email-settings-page.57adf9b7.chunk.js +0 -28
  224. package/build/users-providers-settings-page.7d1fb45c.chunk.js +0 -1
  225. package/build/users-roles-settings-page.ad28ab42.chunk.js +0 -30
  226. package/build/webhook-edit-page.1dd6d040.chunk.js +0 -75
  227. package/build/webhook-list-page.98afa3ea.chunk.js +0 -42
  228. package/ee/server/routes/features-routes.js +0 -66
@@ -1,680 +0,0 @@
1
- /* Jison generated parser */
2
- /* eslint-disable */
3
- var jsonlint = (function () {
4
- var parser = {
5
- trace: function trace() {},
6
- yy: {},
7
- symbols_: {
8
- error: 2,
9
- JSONString: 3,
10
- STRING: 4,
11
- JSONNumber: 5,
12
- NUMBER: 6,
13
- JSONNullLiteral: 7,
14
- NULL: 8,
15
- JSONBooleanLiteral: 9,
16
- TRUE: 10,
17
- FALSE: 11,
18
- JSONText: 12,
19
- JSONValue: 13,
20
- EOF: 14,
21
- JSONObject: 15,
22
- JSONArray: 16,
23
- '{': 17,
24
- '}': 18,
25
- JSONMemberList: 19,
26
- JSONMember: 20,
27
- ':': 21,
28
- ',': 22,
29
- '[': 23,
30
- ']': 24,
31
- JSONElementList: 25,
32
- $accept: 0,
33
- $end: 1,
34
- },
35
- terminals_: {
36
- 2: 'error',
37
- 4: 'STRING',
38
- 6: 'NUMBER',
39
- 8: 'NULL',
40
- 10: 'TRUE',
41
- 11: 'FALSE',
42
- 14: 'EOF',
43
- 17: '{',
44
- 18: '}',
45
- 21: ':',
46
- 22: ',',
47
- 23: '[',
48
- 24: ']',
49
- },
50
- productions_: [
51
- 0,
52
- [3, 1],
53
- [5, 1],
54
- [7, 1],
55
- [9, 1],
56
- [9, 1],
57
- [12, 2],
58
- [13, 1],
59
- [13, 1],
60
- [13, 1],
61
- [13, 1],
62
- [13, 1],
63
- [13, 1],
64
- [15, 2],
65
- [15, 3],
66
- [20, 3],
67
- [19, 1],
68
- [19, 3],
69
- [16, 2],
70
- [16, 3],
71
- [25, 1],
72
- [25, 3],
73
- ],
74
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
75
- var $0 = $$.length - 1;
76
- switch (yystate) {
77
- case 1: // replace escaped characters with actual character
78
- this.$ = yytext
79
- .replace(/\\(\\|")/g, '$' + '1')
80
- .replace(/\\n/g, '\n')
81
- .replace(/\\r/g, '\r')
82
- .replace(/\\t/g, '\t')
83
- .replace(/\\v/g, '\v')
84
- .replace(/\\f/g, '\f')
85
- .replace(/\\b/g, '\b');
86
-
87
- break;
88
- case 2:
89
- this.$ = Number(yytext);
90
- break;
91
- case 3:
92
- this.$ = null;
93
- break;
94
- case 4:
95
- this.$ = true;
96
- break;
97
- case 5:
98
- this.$ = false;
99
- break;
100
- case 6:
101
- return (this.$ = $$[$0 - 1]);
102
- break;
103
- case 13:
104
- this.$ = {};
105
- break;
106
- case 14:
107
- this.$ = $$[$0 - 1];
108
- break;
109
- case 15:
110
- this.$ = [$$[$0 - 2], $$[$0]];
111
- break;
112
- case 16:
113
- this.$ = {};
114
- this.$[$$[$0][0]] = $$[$0][1];
115
- break;
116
- case 17:
117
- this.$ = $$[$0 - 2];
118
- $$[$0 - 2][$$[$0][0]] = $$[$0][1];
119
- break;
120
- case 18:
121
- this.$ = [];
122
- break;
123
- case 19:
124
- this.$ = $$[$0 - 1];
125
- break;
126
- case 20:
127
- this.$ = [$$[$0]];
128
- break;
129
- case 21:
130
- this.$ = $$[$0 - 2];
131
- $$[$0 - 2].push($$[$0]);
132
- break;
133
- }
134
- },
135
- table: [
136
- {
137
- 3: 5,
138
- 4: [1, 12],
139
- 5: 6,
140
- 6: [1, 13],
141
- 7: 3,
142
- 8: [1, 9],
143
- 9: 4,
144
- 10: [1, 10],
145
- 11: [1, 11],
146
- 12: 1,
147
- 13: 2,
148
- 15: 7,
149
- 16: 8,
150
- 17: [1, 14],
151
- 23: [1, 15],
152
- },
153
- { 1: [3] },
154
- { 14: [1, 16] },
155
- { 14: [2, 7], 18: [2, 7], 22: [2, 7], 24: [2, 7] },
156
- { 14: [2, 8], 18: [2, 8], 22: [2, 8], 24: [2, 8] },
157
- { 14: [2, 9], 18: [2, 9], 22: [2, 9], 24: [2, 9] },
158
- { 14: [2, 10], 18: [2, 10], 22: [2, 10], 24: [2, 10] },
159
- { 14: [2, 11], 18: [2, 11], 22: [2, 11], 24: [2, 11] },
160
- { 14: [2, 12], 18: [2, 12], 22: [2, 12], 24: [2, 12] },
161
- { 14: [2, 3], 18: [2, 3], 22: [2, 3], 24: [2, 3] },
162
- { 14: [2, 4], 18: [2, 4], 22: [2, 4], 24: [2, 4] },
163
- { 14: [2, 5], 18: [2, 5], 22: [2, 5], 24: [2, 5] },
164
- { 14: [2, 1], 18: [2, 1], 21: [2, 1], 22: [2, 1], 24: [2, 1] },
165
- { 14: [2, 2], 18: [2, 2], 22: [2, 2], 24: [2, 2] },
166
- { 3: 20, 4: [1, 12], 18: [1, 17], 19: 18, 20: 19 },
167
- {
168
- 3: 5,
169
- 4: [1, 12],
170
- 5: 6,
171
- 6: [1, 13],
172
- 7: 3,
173
- 8: [1, 9],
174
- 9: 4,
175
- 10: [1, 10],
176
- 11: [1, 11],
177
- 13: 23,
178
- 15: 7,
179
- 16: 8,
180
- 17: [1, 14],
181
- 23: [1, 15],
182
- 24: [1, 21],
183
- 25: 22,
184
- },
185
- { 1: [2, 6] },
186
- { 14: [2, 13], 18: [2, 13], 22: [2, 13], 24: [2, 13] },
187
- { 18: [1, 24], 22: [1, 25] },
188
- { 18: [2, 16], 22: [2, 16] },
189
- { 21: [1, 26] },
190
- { 14: [2, 18], 18: [2, 18], 22: [2, 18], 24: [2, 18] },
191
- { 22: [1, 28], 24: [1, 27] },
192
- { 22: [2, 20], 24: [2, 20] },
193
- { 14: [2, 14], 18: [2, 14], 22: [2, 14], 24: [2, 14] },
194
- { 3: 20, 4: [1, 12], 20: 29 },
195
- {
196
- 3: 5,
197
- 4: [1, 12],
198
- 5: 6,
199
- 6: [1, 13],
200
- 7: 3,
201
- 8: [1, 9],
202
- 9: 4,
203
- 10: [1, 10],
204
- 11: [1, 11],
205
- 13: 30,
206
- 15: 7,
207
- 16: 8,
208
- 17: [1, 14],
209
- 23: [1, 15],
210
- },
211
- { 14: [2, 19], 18: [2, 19], 22: [2, 19], 24: [2, 19] },
212
- {
213
- 3: 5,
214
- 4: [1, 12],
215
- 5: 6,
216
- 6: [1, 13],
217
- 7: 3,
218
- 8: [1, 9],
219
- 9: 4,
220
- 10: [1, 10],
221
- 11: [1, 11],
222
- 13: 31,
223
- 15: 7,
224
- 16: 8,
225
- 17: [1, 14],
226
- 23: [1, 15],
227
- },
228
- { 18: [2, 17], 22: [2, 17] },
229
- { 18: [2, 15], 22: [2, 15] },
230
- { 22: [2, 21], 24: [2, 21] },
231
- ],
232
- defaultActions: { 16: [2, 6] },
233
- parseError: function parseError(str, hash) {
234
- throw new Error(str);
235
- },
236
- parse: function parse(input) {
237
- var self = this,
238
- stack = [0],
239
- vstack = [null], // semantic value stack
240
- lstack = [], // location stack
241
- table = this.table,
242
- yytext = '',
243
- yylineno = 0,
244
- yyleng = 0,
245
- recovering = 0,
246
- TERROR = 2,
247
- EOF = 1;
248
-
249
- //this.reductionCount = this.shiftCount = 0;
250
-
251
- this.lexer.setInput(input);
252
- this.lexer.yy = this.yy;
253
- this.yy.lexer = this.lexer;
254
- if (typeof this.lexer.yylloc == 'undefined') this.lexer.yylloc = {};
255
- var yyloc = this.lexer.yylloc;
256
- lstack.push(yyloc);
257
-
258
- if (typeof this.yy.parseError === 'function') this.parseError = this.yy.parseError;
259
-
260
- function popStack(n) {
261
- stack.length = stack.length - 2 * n;
262
- vstack.length = vstack.length - n;
263
- lstack.length = lstack.length - n;
264
- }
265
-
266
- function lex() {
267
- var token;
268
- token = self.lexer.lex() || 1; // $end = 1
269
- // if token isn't its numeric value, convert
270
- if (typeof token !== 'number') {
271
- token = self.symbols_[token] || token;
272
- }
273
- return token;
274
- }
275
-
276
- var symbol,
277
- preErrorSymbol,
278
- state,
279
- action,
280
- a,
281
- r,
282
- yyval = {},
283
- p,
284
- len,
285
- newState,
286
- expected;
287
- while (true) {
288
- // retreive state number from top of stack
289
- state = stack[stack.length - 1];
290
-
291
- // use default actions if available
292
- if (this.defaultActions[state]) {
293
- action = this.defaultActions[state];
294
- } else {
295
- if (symbol == null) symbol = lex();
296
- // read action for current state and first input
297
- action = table[state] && table[state][symbol];
298
- }
299
-
300
- // handle parse error
301
- _handle_error: if (typeof action === 'undefined' || !action.length || !action[0]) {
302
- if (!recovering) {
303
- // Report error
304
- expected = [];
305
- for (p in table[state])
306
- if (this.terminals_[p] && p > 2) {
307
- expected.push("'" + this.terminals_[p] + "'");
308
- }
309
- var errStr = '';
310
- if (this.lexer.showPosition) {
311
- errStr =
312
- 'Parse error on line ' +
313
- (yylineno + 1) +
314
- ':\n' +
315
- this.lexer.showPosition() +
316
- '\nExpecting ' +
317
- expected.join(', ') +
318
- ", got '" +
319
- this.terminals_[symbol] +
320
- "'";
321
- } else {
322
- errStr =
323
- 'Parse error on line ' +
324
- (yylineno + 1) +
325
- ': Unexpected ' +
326
- (symbol == 1 /*EOF*/
327
- ? 'end of input'
328
- : "'" + (this.terminals_[symbol] || symbol) + "'");
329
- }
330
- this.parseError(errStr, {
331
- text: this.lexer.match,
332
- token: this.terminals_[symbol] || symbol,
333
- line: this.lexer.yylineno,
334
- loc: yyloc,
335
- expected: expected,
336
- });
337
- }
338
-
339
- // just recovered from another error
340
- if (recovering == 3) {
341
- if (symbol == EOF) {
342
- throw new Error(errStr || 'Parsing halted.');
343
- }
344
-
345
- // discard current lookahead and grab another
346
- yyleng = this.lexer.yyleng;
347
- yytext = this.lexer.yytext;
348
- yylineno = this.lexer.yylineno;
349
- yyloc = this.lexer.yylloc;
350
- symbol = lex();
351
- }
352
-
353
- // try to recover from error
354
- while (1) {
355
- // check for error recovery rule in this state
356
- if (TERROR.toString() in table[state]) {
357
- break;
358
- }
359
- if (state == 0) {
360
- throw new Error(errStr || 'Parsing halted.');
361
- }
362
- popStack(1);
363
- state = stack[stack.length - 1];
364
- }
365
-
366
- preErrorSymbol = symbol; // save the lookahead token
367
- symbol = TERROR; // insert generic error symbol as new lookahead
368
- state = stack[stack.length - 1];
369
- action = table[state] && table[state][TERROR];
370
- recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
371
- }
372
-
373
- // this shouldn't happen, unless resolve defaults are off
374
- if (action[0] instanceof Array && action.length > 1) {
375
- throw new Error(
376
- 'Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol
377
- );
378
- }
379
-
380
- switch (action[0]) {
381
- case 1: // shift
382
- //this.shiftCount++;
383
-
384
- stack.push(symbol);
385
- vstack.push(this.lexer.yytext);
386
- lstack.push(this.lexer.yylloc);
387
- stack.push(action[1]); // push state
388
- symbol = null;
389
- if (!preErrorSymbol) {
390
- // normal execution/no error
391
- yyleng = this.lexer.yyleng;
392
- yytext = this.lexer.yytext;
393
- yylineno = this.lexer.yylineno;
394
- yyloc = this.lexer.yylloc;
395
- if (recovering > 0) recovering--;
396
- } else {
397
- // error just occurred, resume old lookahead f/ before error
398
- symbol = preErrorSymbol;
399
- preErrorSymbol = null;
400
- }
401
- break;
402
-
403
- case 2: // reduce
404
- //this.reductionCount++;
405
-
406
- len = this.productions_[action[1]][1];
407
-
408
- // perform semantic action
409
- yyval.$ = vstack[vstack.length - len]; // default to $$ = $1
410
- // default location, uses first token for firsts, last for lasts
411
- yyval._$ = {
412
- first_line: lstack[lstack.length - (len || 1)].first_line,
413
- last_line: lstack[lstack.length - 1].last_line,
414
- first_column: lstack[lstack.length - (len || 1)].first_column,
415
- last_column: lstack[lstack.length - 1].last_column,
416
- };
417
- r = this.performAction.call(
418
- yyval,
419
- yytext,
420
- yyleng,
421
- yylineno,
422
- this.yy,
423
- action[1],
424
- vstack,
425
- lstack
426
- );
427
-
428
- if (typeof r !== 'undefined') {
429
- return r;
430
- }
431
-
432
- // pop off stack
433
- if (len) {
434
- stack = stack.slice(0, -1 * len * 2);
435
- vstack = vstack.slice(0, -1 * len);
436
- lstack = lstack.slice(0, -1 * len);
437
- }
438
-
439
- stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
440
- vstack.push(yyval.$);
441
- lstack.push(yyval._$);
442
- // goto new state = table[STATE][NONTERMINAL]
443
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
444
- stack.push(newState);
445
- break;
446
-
447
- case 3: // accept
448
- return true;
449
- }
450
- }
451
-
452
- return true;
453
- },
454
- };
455
- /* Jison generated lexer */
456
- var lexer = (function () {
457
- var lexer = {
458
- EOF: 1,
459
- parseError: function parseError(str, hash) {
460
- if (this.yy.parseError) {
461
- this.yy.parseError(str, hash);
462
- } else {
463
- throw new Error(str);
464
- }
465
- },
466
- setInput: function (input) {
467
- this._input = input;
468
- this._more = this._less = this.done = false;
469
- this.yylineno = this.yyleng = 0;
470
- this.yytext = this.matched = this.match = '';
471
- this.conditionStack = ['INITIAL'];
472
- this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
473
- return this;
474
- },
475
- input: function () {
476
- var ch = this._input[0];
477
- this.yytext += ch;
478
- this.yyleng++;
479
- this.match += ch;
480
- this.matched += ch;
481
- var lines = ch.match(/\n/);
482
- if (lines) this.yylineno++;
483
- this._input = this._input.slice(1);
484
- return ch;
485
- },
486
- unput: function (ch) {
487
- this._input = ch + this._input;
488
- return this;
489
- },
490
- more: function () {
491
- this._more = true;
492
- return this;
493
- },
494
- less: function (n) {
495
- this._input = this.match.slice(n) + this._input;
496
- },
497
- pastInput: function () {
498
- var past = this.matched.substr(0, this.matched.length - this.match.length);
499
- return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, '');
500
- },
501
- upcomingInput: function () {
502
- var next = this.match;
503
- if (next.length < 20) {
504
- next += this._input.substr(0, 20 - next.length);
505
- }
506
- return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, '');
507
- },
508
- showPosition: function () {
509
- var pre = this.pastInput();
510
- var c = new Array(pre.length + 1).join('-');
511
- return pre + this.upcomingInput() + '\n' + c + '^';
512
- },
513
- next: function () {
514
- if (this.done) {
515
- return this.EOF;
516
- }
517
- if (!this._input) this.done = true;
518
-
519
- var token, match, tempMatch, index, col, lines;
520
- if (!this._more) {
521
- this.yytext = '';
522
- this.match = '';
523
- }
524
- var rules = this._currentRules();
525
- for (var i = 0; i < rules.length; i++) {
526
- tempMatch = this._input.match(this.rules[rules[i]]);
527
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
528
- match = tempMatch;
529
- index = i;
530
- if (!this.options.flex) break;
531
- }
532
- }
533
- if (match) {
534
- lines = match[0].match(/\n.*/g);
535
- if (lines) this.yylineno += lines.length;
536
- this.yylloc = {
537
- first_line: this.yylloc.last_line,
538
- last_line: this.yylineno + 1,
539
- first_column: this.yylloc.last_column,
540
- last_column: lines
541
- ? lines[lines.length - 1].length - 1
542
- : this.yylloc.last_column + match[0].length,
543
- };
544
- this.yytext += match[0];
545
- this.match += match[0];
546
- this.yyleng = this.yytext.length;
547
- this._more = false;
548
- this._input = this._input.slice(match[0].length);
549
- this.matched += match[0];
550
- token = this.performAction.call(
551
- this,
552
- this.yy,
553
- this,
554
- rules[index],
555
- this.conditionStack[this.conditionStack.length - 1]
556
- );
557
- if (this.done && this._input) this.done = false;
558
- if (token) return token;
559
- else return;
560
- }
561
- if (this._input === '') {
562
- return this.EOF;
563
- } else {
564
- this.parseError(
565
- 'Lexical error on line ' +
566
- (this.yylineno + 1) +
567
- '. Unrecognized text.\n' +
568
- this.showPosition(),
569
- { text: '', token: null, line: this.yylineno }
570
- );
571
- }
572
- },
573
- lex: function lex() {
574
- var r = this.next();
575
- if (typeof r !== 'undefined') {
576
- return r;
577
- } else {
578
- return this.lex();
579
- }
580
- },
581
- begin: function begin(condition) {
582
- this.conditionStack.push(condition);
583
- },
584
- popState: function popState() {
585
- return this.conditionStack.pop();
586
- },
587
- _currentRules: function _currentRules() {
588
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
589
- },
590
- topState: function () {
591
- return this.conditionStack[this.conditionStack.length - 2];
592
- },
593
- pushState: function begin(condition) {
594
- this.begin(condition);
595
- },
596
- };
597
- lexer.options = {};
598
- lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
599
- var YYSTATE = YY_START;
600
- switch ($avoiding_name_collisions) {
601
- case 0 /* skip whitespace */:
602
- break;
603
- case 1:
604
- return 6;
605
- break;
606
- case 2:
607
- yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2);
608
- return 4;
609
- break;
610
- case 3:
611
- return 17;
612
- break;
613
- case 4:
614
- return 18;
615
- break;
616
- case 5:
617
- return 23;
618
- break;
619
- case 6:
620
- return 24;
621
- break;
622
- case 7:
623
- return 22;
624
- break;
625
- case 8:
626
- return 21;
627
- break;
628
- case 9:
629
- return 10;
630
- break;
631
- case 10:
632
- return 11;
633
- break;
634
- case 11:
635
- return 8;
636
- break;
637
- case 12:
638
- return 14;
639
- break;
640
- case 13:
641
- return 'INVALID';
642
- break;
643
- }
644
- };
645
- lexer.rules = [
646
- /^(?:\s+)/,
647
- /^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,
648
- /^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,
649
- /^(?:\{)/,
650
- /^(?:\})/,
651
- /^(?:\[)/,
652
- /^(?:\])/,
653
- /^(?:,)/,
654
- /^(?::)/,
655
- /^(?:true\b)/,
656
- /^(?:false\b)/,
657
- /^(?:null\b)/,
658
- /^(?:$)/,
659
- /^(?:.)/,
660
- ];
661
- lexer.conditions = {
662
- INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], inclusive: true },
663
- };
664
-
665
- return lexer;
666
- })();
667
- parser.lexer = lexer;
668
- return parser;
669
- })();
670
- if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
671
- exports.parser = jsonlint;
672
- exports.parse = function () {
673
- return jsonlint.parse.apply(jsonlint, arguments);
674
- };
675
- exports.main = function commonjsMain(args) {
676
- if (!args[1]) {
677
- throw new Error('Usage: ' + args[0] + ' FILE');
678
- }
679
- };
680
- }
@@ -1,5 +0,0 @@
1
- import { combineReducers } from 'redux';
2
-
3
- const createReducer = (reducers) => combineReducers(reducers);
4
-
5
- export default createReducer;
@@ -1,38 +0,0 @@
1
- import axios from 'axios';
2
- import { auth, wrapAxiosInstance } from '@strapi/helper-plugin';
3
-
4
- const instance = axios.create({
5
- baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
6
- });
7
-
8
- instance.interceptors.request.use(
9
- async (config) => {
10
- config.headers = {
11
- Authorization: `Bearer ${auth.getToken()}`,
12
- Accept: 'application/json',
13
- 'Content-Type': 'application/json',
14
- };
15
-
16
- return config;
17
- },
18
- (error) => {
19
- Promise.reject(error);
20
- }
21
- );
22
-
23
- instance.interceptors.response.use(
24
- (response) => response,
25
- (error) => {
26
- // whatever you want to do with the error
27
- if (error?.response?.status === 401) {
28
- auth.clearAppStorage();
29
- window.location.reload();
30
- }
31
-
32
- throw error;
33
- }
34
- );
35
-
36
- const wrapper = wrapAxiosInstance(instance);
37
-
38
- export default wrapper;