@strapi/admin 4.13.5 → 4.13.7

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 (122) hide show
  1. package/admin/src/components/RBACProvider/index.js +1 -1
  2. package/admin/src/content-manager/components/RelationInput/RelationInput.js +59 -43
  3. package/admin/src/content-manager/components/Wysiwyg/EditorLayout.js +2 -2
  4. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/ConfirmBulkActionDialog/index.js +3 -0
  5. package/admin/src/content-manager/pages/ListView/components/BulkActionButtons/SelectedEntriesModal/index.js +2 -1
  6. package/admin/src/content-manager/pages/ListView/index.js +1 -0
  7. package/admin/src/pages/MarketplacePage/components/EmptyNpmPackageSearch/index.js +1 -1
  8. package/admin/src/pages/MarketplacePage/components/NpmPackagesFilters/index.js +0 -1
  9. package/admin/src/pages/MarketplacePage/components/NpmPackagesGrid/index.js +1 -1
  10. package/build/1049.bf5230e6.chunk.js +1 -0
  11. package/build/1227.c72e74e9.chunk.js +1 -0
  12. package/build/{1386.ea73b677.chunk.js → 1386.8c070d59.chunk.js} +1 -1
  13. package/build/2225.73c9a224.chunk.js +79 -0
  14. package/build/2237.a7992513.chunk.js +114 -0
  15. package/build/2379.27c6ab54.chunk.js +1 -0
  16. package/build/{2395.0e5e8ded.chunk.js → 2395.120256d6.chunk.js} +2 -2
  17. package/build/{6691.4985ef22.chunk.js → 2659.cb94f1e7.chunk.js} +28 -28
  18. package/build/{2801.8e1aa82a.chunk.js → 2801.fdd4d8a2.chunk.js} +1 -1
  19. package/build/{1387.a86ac314.chunk.js → 2950.216f2e89.chunk.js} +1 -1
  20. package/build/3021.33ad47fb.chunk.js +103 -0
  21. package/build/3911.488fbde3.chunk.js +95 -0
  22. package/build/4174.6efb0dc6.chunk.js +1 -0
  23. package/build/{4546.6dbd695f.chunk.js → 4546.9710f321.chunk.js} +1 -1
  24. package/build/4724.a0ce68f3.chunk.js +6 -0
  25. package/build/{502.7bba43b1.chunk.js → 502.d26ea06b.chunk.js} +1 -1
  26. package/build/{4628.9cbb6df5.chunk.js → 5158.c85f841a.chunk.js} +1 -1
  27. package/build/6715.48e37308.chunk.js +1 -0
  28. package/build/6812.00ef5b0d.chunk.js +26 -0
  29. package/build/{7464.eb057bec.chunk.js → 7464.d3d1414f.chunk.js} +1 -1
  30. package/build/{8276.be3ed581.chunk.js → 8276.b55f4600.chunk.js} +2 -2
  31. package/build/{9806.5d5a0e8d.chunk.js → 9522.ec7df9ac.chunk.js} +25 -25
  32. package/build/{Admin-authenticatedApp.3c6f7f3c.chunk.js → Admin-authenticatedApp.4b762007.chunk.js} +7 -7
  33. package/build/Admin_InternalErrorPage.18ba7fd6.chunk.js +1 -0
  34. package/build/{Admin_homePage.6f128523.chunk.js → Admin_homePage.86c8d4c9.chunk.js} +10 -10
  35. package/build/Admin_marketplace.4cc913f3.chunk.js +55 -0
  36. package/build/Admin_pluginsPage.d1afbf28.chunk.js +6 -0
  37. package/build/{Admin_profilePage.678bce24.chunk.js → Admin_profilePage.079903a3.chunk.js} +2 -2
  38. package/build/Admin_settingsPage.60a3e46e.chunk.js +111 -0
  39. package/build/Upload_ConfigureTheView.949535b8.chunk.js +1 -0
  40. package/build/{admin-app.2a8615ab.chunk.js → admin-app.1fde8f7a.chunk.js} +8 -8
  41. package/build/{admin-edit-roles-page.38a6c863.chunk.js → admin-edit-roles-page.f76cb0aa.chunk.js} +37 -37
  42. package/build/admin-edit-users.186c9d90.chunk.js +10 -0
  43. package/build/admin-roles-list.3a4edfa2.chunk.js +22 -0
  44. package/build/admin-users.e276bd9a.chunk.js +11 -0
  45. package/build/{api-tokens-create-page.e0c15627.chunk.js → api-tokens-create-page.f5a85725.chunk.js} +1 -1
  46. package/build/{api-tokens-edit-page.9f2dce47.chunk.js → api-tokens-edit-page.06a32cef.chunk.js} +1 -1
  47. package/build/api-tokens-list-page.bb27d544.chunk.js +16 -0
  48. package/build/audit-logs-settings-page.a89141d5.chunk.js +1 -0
  49. package/build/content-manager.b2d9e88e.chunk.js +1099 -0
  50. package/build/{content-type-builder-list-view.b71cf240.chunk.js → content-type-builder-list-view.b75fb938.chunk.js} +14 -14
  51. package/build/{content-type-builder.e5669749.chunk.js → content-type-builder.aab7f58d.chunk.js} +17 -17
  52. package/build/email-settings-page.07d417d5.chunk.js +11 -0
  53. package/build/i18n-settings-page.7107e28a.chunk.js +9 -0
  54. package/build/i18n-translation-tr-json.3bfc812f.chunk.js +1 -0
  55. package/build/index.html +1 -1
  56. package/build/main.358b7ea5.js +2665 -0
  57. package/build/review-workflows-settings-create-view.b96b7be1.chunk.js +1 -0
  58. package/build/review-workflows-settings-edit-view.21a682a0.chunk.js +1 -0
  59. package/build/review-workflows-settings-list-view.14212324.chunk.js +56 -0
  60. package/build/{runtime~main.6304468f.js → runtime~main.0324fc31.js} +2 -2
  61. package/build/sso-settings-page.d93bd81f.chunk.js +1 -0
  62. package/build/{transfer-tokens-create-page.ebba16d8.chunk.js → transfer-tokens-create-page.6e7049ff.chunk.js} +1 -1
  63. package/build/{transfer-tokens-edit-page.d7bb2b3e.chunk.js → transfer-tokens-edit-page.449b4502.chunk.js} +1 -1
  64. package/build/transfer-tokens-list-page.34caf827.chunk.js +16 -0
  65. package/build/upload-settings.fede24b9.chunk.js +14 -0
  66. package/build/upload.a96e2452.chunk.js +58 -0
  67. package/build/users-advanced-settings-page.ac7968e7.chunk.js +9 -0
  68. package/build/users-email-settings-page.125a89e2.chunk.js +9 -0
  69. package/build/users-providers-settings-page.ce34951c.chunk.js +14 -0
  70. package/build/{users-roles-settings-page.2b051e6a.chunk.js → users-roles-settings-page.90bad063.chunk.js} +4 -4
  71. package/build/{webhook-edit-page.de45c635.chunk.js → webhook-edit-page.7498417e.chunk.js} +3 -3
  72. package/build/webhook-list-page.1b085c7f.chunk.js +63 -0
  73. package/ee/admin/content-manager/pages/EditView/InformationBox/components/AssigneeSelect/AssigneeSelect.js +5 -15
  74. package/ee/admin/pages/SettingsPage/pages/AuditLogs/ListView/utils/getDisplayedFilters.js +1 -1
  75. package/ee/server/bootstrap.js +2 -2
  76. package/package.json +11 -11
  77. package/scripts/build.js +2 -3
  78. package/scripts/create-dev-plugins-file.js +2 -3
  79. package/server/bootstrap.js +3 -1
  80. package/server/services/metrics.js +17 -0
  81. package/utils/create-cache-dir.js +5 -102
  82. package/utils/plugins.js +217 -0
  83. package/webpack.config.js +2 -2
  84. package/build/1049.ec69f5e0.chunk.js +0 -1
  85. package/build/1227.9f37e1dc.chunk.js +0 -1
  86. package/build/1504.eff012f7.chunk.js +0 -95
  87. package/build/2225.649fb7bc.chunk.js +0 -79
  88. package/build/2237.b832ae6e.chunk.js +0 -114
  89. package/build/2379.1f98a31a.chunk.js +0 -1
  90. package/build/3739.63e352f1.chunk.js +0 -103
  91. package/build/4174.f1f39e40.chunk.js +0 -1
  92. package/build/448.829e1344.chunk.js +0 -1
  93. package/build/4724.aea5c8c1.chunk.js +0 -6
  94. package/build/9944.7af075a5.chunk.js +0 -26
  95. package/build/Admin_InternalErrorPage.38155af3.chunk.js +0 -1
  96. package/build/Admin_marketplace.061a6e5a.chunk.js +0 -55
  97. package/build/Admin_pluginsPage.16f837b8.chunk.js +0 -6
  98. package/build/Admin_settingsPage.af7309e4.chunk.js +0 -111
  99. package/build/Upload_ConfigureTheView.3fc1c100.chunk.js +0 -1
  100. package/build/admin-edit-users.545fc882.chunk.js +0 -10
  101. package/build/admin-roles-list.1e2e814d.chunk.js +0 -22
  102. package/build/admin-users.b8ea5677.chunk.js +0 -11
  103. package/build/api-tokens-list-page.d747051c.chunk.js +0 -16
  104. package/build/audit-logs-settings-page.96f9d608.chunk.js +0 -1
  105. package/build/content-manager.f448efdf.chunk.js +0 -1097
  106. package/build/email-settings-page.2809f0bf.chunk.js +0 -11
  107. package/build/i18n-settings-page.5f716172.chunk.js +0 -9
  108. package/build/i18n-translation-tr-json.10f0600d.chunk.js +0 -1
  109. package/build/main.50652367.js +0 -2863
  110. package/build/review-workflows-settings-create-view.4a156a19.chunk.js +0 -1
  111. package/build/review-workflows-settings-edit-view.ce984d1f.chunk.js +0 -1
  112. package/build/review-workflows-settings-list-view.419b8deb.chunk.js +0 -56
  113. package/build/sso-settings-page.45153df5.chunk.js +0 -1
  114. package/build/transfer-tokens-list-page.cfe1736c.chunk.js +0 -16
  115. package/build/upload-settings.5e55266d.chunk.js +0 -14
  116. package/build/upload.0660a088.chunk.js +0 -58
  117. package/build/users-advanced-settings-page.818d84eb.chunk.js +0 -9
  118. package/build/users-email-settings-page.c1967c09.chunk.js +0 -9
  119. package/build/users-providers-settings-page.11893e08.chunk.js +0 -14
  120. package/build/webhook-list-page.ca91df8b.chunk.js +0 -63
  121. package/utils/create-plugins-exclude-path.js +0 -20
  122. package/utils/get-plugins.js +0 -110
@@ -1,69 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  const path = require('path');
4
- const _ = require('lodash');
5
4
  const fs = require('fs-extra');
6
5
  const tsUtils = require('@strapi/typescript-utils');
7
6
  const getCustomAppConfigFile = require('./get-custom-app-config-file');
7
+ const { filterPluginsByAdminEntry, createPluginFile } = require('./plugins');
8
8
 
9
9
  const getPkgPath = (name) => path.dirname(require.resolve(`${name}/package.json`));
10
10
 
11
- async function createPluginsJs(plugins, dest) {
12
- const pluginsArray = plugins.map(({ pathToPlugin, name, info }) => {
13
- const shortName = _.camelCase(name);
14
-
15
- let realPath = '';
16
-
17
- /**
18
- * We're using a module here so we want to keep using the module resolution procedure.
19
- */
20
- if (info?.packageName || info?.required) {
21
- /**
22
- * path.join, on windows, it uses backslashes to resolve path.
23
- * The problem is that Webpack does not windows paths
24
- * With this tool, we need to rely on "/" and not "\".
25
- * This is the reason why '..\\..\\..\\node_modules\\@strapi\\plugin-content-type-builder/strapi-admin.js' was not working.
26
- * The regexp at line 105 aims to replace the windows backslashes by standard slash so that webpack can deal with them.
27
- * Backslash looks to work only for absolute paths with webpack => https://webpack.js.org/concepts/module-resolution/#absolute-paths
28
- */
29
- realPath = path.join(pathToPlugin, 'strapi-admin').replace(/\\/g, '/');
30
- } else {
31
- realPath = path
32
- .join(path.relative(path.resolve(dest, 'admin', 'src'), pathToPlugin), 'strapi-admin')
33
- .replace(/\\/g, '/');
34
- }
35
-
36
- return {
37
- name,
38
- pathToPlugin: realPath,
39
- shortName,
40
- };
41
- });
42
-
43
- const content = `
44
- ${pluginsArray
45
- .map(({ pathToPlugin, shortName }) => {
46
- const req = `'${pathToPlugin}'`;
47
-
48
- return `import ${shortName} from ${req};`;
49
- })
50
- .join('\n')}
51
-
52
-
53
- const plugins = {
54
- ${[...pluginsArray]
55
- .map(({ name, shortName }) => {
56
- return ` '${name}': ${shortName},`;
57
- })
58
- .join('\n')}
59
- };
60
-
61
- export default plugins;
62
- `;
63
-
64
- return fs.writeFile(path.resolve(dest, 'admin', 'src', 'plugins.js'), content);
65
- }
66
-
67
11
  async function copyAdmin(dest) {
68
12
  const adminPath = getPkgPath('@strapi/admin');
69
13
 
@@ -86,49 +30,8 @@ async function createCacheDir({ appDir, plugins }) {
86
30
  );
87
31
 
88
32
  const pluginsWithFront = Object.entries(plugins)
89
- .filter(([, plugin]) => {
90
- /**
91
- * There are two ways a plugin should be imported, either it's local to the strapi app,
92
- * or it's an actual npm module that's installed and resolved via node_modules.
93
- *
94
- * We first check if the plugin is local to the strapi app, using a regular `resolve` because
95
- * the pathToPlugin will be relative i.e. `/Users/my-name/strapi-app/src/plugins/my-plugin`.
96
- *
97
- * If the file doesn't exist well then it's probably a node_module, so instead we use `require.resolve`
98
- * which will resolve the path to the module in node_modules. If it fails with the specific code `MODULE_NOT_FOUND`
99
- * then it doesn't have an admin part to the package.
100
- *
101
- * NOTE: we should try to move to `./package.json[exports]` map with bundling of our own plugins,
102
- * because these entry files are written in commonjs restricting features e.g. tree-shaking.
103
- */
104
- try {
105
- const isLocalPluginWithLegacyAdminFile = fs.existsSync(
106
- path.resolve(`${plugin.pathToPlugin}/strapi-admin.js`)
107
- );
108
-
109
- if (!isLocalPluginWithLegacyAdminFile) {
110
- const isModulewithLegacyAdminFile = require.resolve(
111
- `${plugin.pathToPlugin}/strapi-admin.js`
112
- );
113
-
114
- return isModulewithLegacyAdminFile;
115
- }
116
-
117
- return isLocalPluginWithLegacyAdminFile;
118
- } catch (err) {
119
- if (err.code === 'MODULE_NOT_FOUND') {
120
- /**
121
- * the plugin does not contain FE code, so we
122
- * don't want to import it anyway
123
- */
124
- return false;
125
- }
126
-
127
- throw err;
128
- }
129
- })
130
- .map(([name, plugin]) => ({ name, ...plugin }));
131
-
33
+ .map(([name, plugin]) => ({ name, ...plugin }))
34
+ .filter(filterPluginsByAdminEntry);
132
35
  // create .cache dir
133
36
  await fs.emptyDir(cacheDir);
134
37
 
@@ -166,7 +69,7 @@ async function createCacheDir({ appDir, plugins }) {
166
69
  }
167
70
 
168
71
  // create plugins.js with plugins requires
169
- await createPluginsJs(pluginsWithFront, cacheDir);
72
+ await createPluginFile(pluginsWithFront, cacheDir);
170
73
 
171
74
  // create the tsconfig.json file so we can develop plugins in ts while being in a JS project
172
75
  if (!useTypeScript) {
@@ -174,4 +77,4 @@ async function createCacheDir({ appDir, plugins }) {
174
77
  }
175
78
  }
176
79
 
177
- module.exports = { createCacheDir, createPluginsJs };
80
+ module.exports = { createCacheDir };
@@ -0,0 +1,217 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+ const asyncFs = require('fs/promises');
6
+ const { camelCase } = require('lodash');
7
+ // eslint-disable-next-line import/no-extraneous-dependencies
8
+ const glob = require('glob');
9
+
10
+ /**
11
+ * @typedef {Object} PluginInfo
12
+ * @property {string} packageName
13
+ * @property {string} description
14
+ * @property {boolean=} required
15
+ */
16
+
17
+ /**
18
+ * @typedef {Object} Plugin
19
+ * @property {string} pathToPlugin
20
+ * @property {string} name
21
+ * @property {PluginInfo} info
22
+ * @property {string=} directory
23
+ */
24
+
25
+ /**
26
+ * @param {string[]} pluginsAllowlist
27
+ * @returns {Plugin[]}
28
+ */
29
+ const getPlugins = (pluginsAllowlist) => {
30
+ const rootPath = path.resolve(__dirname, '..', path.join('..', '..', '..', 'packages'));
31
+ /**
32
+ * So `glob` only supports '/' as a path separator, so we need to replace
33
+ * the path separator for the current OS with '/'. e.g. on windows it's `\`.
34
+ *
35
+ * see https://github.com/isaacs/node-glob/#windows for more information
36
+ *
37
+ * and see https://github.com/isaacs/node-glob/issues/467#issuecomment-1114240501 for the recommended fix.
38
+ */
39
+ let corePath = path.join(rootPath, 'core', '*');
40
+ let pluginsPath = path.join(rootPath, 'plugins', '*');
41
+
42
+ if (process.platform === 'win32') {
43
+ corePath = corePath.split(path.sep).join(path.posix.sep);
44
+ pluginsPath = pluginsPath.split(path.sep).join(path.posix.sep);
45
+ }
46
+
47
+ const corePackageDirs = glob.sync(corePath);
48
+ const pluginsPackageDirs = glob.sync(pluginsPath);
49
+
50
+ const plugins = [...corePackageDirs, ...pluginsPackageDirs]
51
+ .map((directory) => {
52
+ const isCoreAdmin = directory.includes('packages/core/admin');
53
+
54
+ if (isCoreAdmin) {
55
+ return null;
56
+ }
57
+
58
+ const { name, strapi } = require(path.join(directory, 'package.json'));
59
+
60
+ /**
61
+ * this will remove any of our packages that are
62
+ * not actually plugins for the application
63
+ */
64
+ if (!strapi || strapi.kind !== 'plugin') {
65
+ return null;
66
+ }
67
+
68
+ /**
69
+ * we want the name of the node_module
70
+ */
71
+ return {
72
+ pathToPlugin: name,
73
+ name: strapi.name,
74
+ info: { ...strapi, packageName: name },
75
+ directory,
76
+ };
77
+ })
78
+ .filter(filterPluginsByAdminEntry);
79
+
80
+ if (Array.isArray(pluginsAllowlist)) {
81
+ return plugins.filter((plugin) => pluginsAllowlist.includes(plugin.pathToPlugin));
82
+ }
83
+
84
+ return plugins;
85
+ };
86
+
87
+ /**
88
+ * @type {(plugin: Plugin) => boolean}
89
+ */
90
+ const filterPluginsByAdminEntry = (plugin) => {
91
+ if (!plugin) {
92
+ return false;
93
+ }
94
+
95
+ /**
96
+ * There are two ways a plugin should be imported, either it's local to the strapi app,
97
+ * or it's an actual npm module that's installed and resolved via node_modules.
98
+ *
99
+ * We first check if the plugin is local to the strapi app, using a regular `resolve` because
100
+ * the pathToPlugin will be relative i.e. `/Users/my-name/strapi-app/src/plugins/my-plugin`.
101
+ *
102
+ * If the file doesn't exist well then it's probably a node_module, so instead we use `require.resolve`
103
+ * which will resolve the path to the module in node_modules. If it fails with the specific code `MODULE_NOT_FOUND`
104
+ * then it doesn't have an admin part to the package.
105
+ *
106
+ * NOTE: we should try to move to `./package.json[exports]` map with bundling of our own plugins,
107
+ * because these entry files are written in commonjs restricting features e.g. tree-shaking.
108
+ */
109
+ try {
110
+ const isLocalPluginWithLegacyAdminFile = fs.existsSync(
111
+ path.resolve(`${plugin.pathToPlugin}/strapi-admin.js`)
112
+ );
113
+
114
+ if (!isLocalPluginWithLegacyAdminFile) {
115
+ const isModuleWithFE = require.resolve(`${plugin.pathToPlugin}/strapi-admin`);
116
+
117
+ return isModuleWithFE;
118
+ }
119
+
120
+ return isLocalPluginWithLegacyAdminFile;
121
+ } catch (err) {
122
+ if (err.code === 'MODULE_NOT_FOUND') {
123
+ /**
124
+ * the plugin does not contain FE code, so we
125
+ * don't want to import it anyway
126
+ */
127
+ return false;
128
+ }
129
+
130
+ throw err;
131
+ }
132
+ };
133
+
134
+ /**
135
+ *
136
+ * @param {Plugin[]} plugins
137
+ * @param {string} dest
138
+ * @returns {void}
139
+ */
140
+ async function createPluginFile(plugins, dest) {
141
+ const pluginsArray = plugins.map(({ pathToPlugin, name, info }) => {
142
+ const shortName = camelCase(name);
143
+
144
+ let realPath = '';
145
+
146
+ /**
147
+ * We're using a module here so we want to keep using the module resolution procedure.
148
+ */
149
+ if (info?.packageName || info?.required) {
150
+ /**
151
+ * path.join, on windows, it uses backslashes to resolve path.
152
+ * The problem is that Webpack does not windows paths
153
+ * With this tool, we need to rely on "/" and not "\".
154
+ * This is the reason why '..\\..\\..\\node_modules\\@strapi\\plugin-content-type-builder/strapi-admin.js' was not working.
155
+ * The regexp at line 105 aims to replace the windows backslashes by standard slash so that webpack can deal with them.
156
+ * Backslash looks to work only for absolute paths with webpack => https://webpack.js.org/concepts/module-resolution/#absolute-paths
157
+ */
158
+ realPath = path.join(pathToPlugin, 'strapi-admin').replace(/\\/g, '/');
159
+ } else {
160
+ realPath = path
161
+ .join(path.relative(path.resolve(dest, 'admin', 'src'), pathToPlugin), 'strapi-admin')
162
+ .replace(/\\/g, '/');
163
+ }
164
+
165
+ return {
166
+ name,
167
+ pathToPlugin: realPath,
168
+ shortName,
169
+ };
170
+ });
171
+
172
+ const content = `
173
+ ${pluginsArray
174
+ .map(({ pathToPlugin, shortName }) => {
175
+ const req = `'${pathToPlugin}'`;
176
+
177
+ return `import ${shortName} from ${req};`;
178
+ })
179
+ .join('\n')}
180
+
181
+
182
+ const plugins = {
183
+ ${[...pluginsArray]
184
+ .map(({ name, shortName }) => {
185
+ return ` '${name}': ${shortName},`;
186
+ })
187
+ .join('\n')}
188
+ };
189
+
190
+ export default plugins;
191
+ `;
192
+
193
+ return asyncFs.writeFile(path.resolve(dest, 'admin', 'src', 'plugins.js'), content);
194
+ }
195
+
196
+ /**
197
+ * @param {string[]} pluginsPath – an array of paths to the plugins from the user's directory
198
+ * @returns {RegExp} a regex that will exclude _all_ node_modules except for the plugins in the pluginsPath array.
199
+ */
200
+ const createPluginsExcludePath = (pluginsPath = []) => {
201
+ /**
202
+ * If there aren't any plugins in the node_modules array, just return the node_modules regex
203
+ * without complicating it.
204
+ */
205
+ if (pluginsPath.length === 0) {
206
+ return /node_modules/;
207
+ }
208
+
209
+ return new RegExp(`node_modules/(?!(${pluginsPath.join('|')}))`);
210
+ };
211
+
212
+ module.exports = {
213
+ getPlugins,
214
+ filterPluginsByAdminEntry,
215
+ createPluginFile,
216
+ createPluginsExcludePath,
217
+ };
package/webpack.config.js CHANGED
@@ -13,7 +13,7 @@ const browserslistToEsbuild = require('browserslist-to-esbuild');
13
13
 
14
14
  const alias = require('./webpack.alias');
15
15
  const getClientEnvironment = require('./env');
16
- const { createPluginsExcludePath } = require('./utils/create-plugins-exclude-path');
16
+ const { createPluginsExcludePath } = require('./utils/plugins');
17
17
 
18
18
  module.exports = ({
19
19
  dest,
@@ -85,7 +85,7 @@ module.exports = ({
85
85
  module: {
86
86
  rules: [
87
87
  {
88
- test: /\.tsx?$/,
88
+ test: /\.(ts|tsx)$/,
89
89
  loader: require.resolve('esbuild-loader'),
90
90
  exclude: excludeRegex,
91
91
  options: {
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1049],{39404:function(A,T,e){e.d(T,{Z:function(){return M}});var t=e(32735),y=e(82055),c=e(87933),o=e(41415),s=e(45509),a=e(66456),r=e(29439),f=e(60216),n=e.n(f),m=e(67879),u=e(44647),E=e(79652);const d=({onRegenerate:R,idToRegenerate:O,backUrl:L,onError:W})=>{const{formatMessage:i}=(0,m.Z)(),[K,B]=(0,t.useState)(!1),{regenerateData:U,isLoadingConfirmation:x}=(0,E.rW)(L,O,R,W),h=async()=>{U(),B(!1)};return t.createElement(t.Fragment,null,t.createElement(o.z,{startIcon:t.createElement(u.Z,null),type:"button",size:"S",variant:"tertiary",onClick:()=>B(!0),name:"regenerate"},i({id:"Settings.tokens.regenerate",defaultMessage:"Regenerate"})),t.createElement(s.QH,{bodyText:{id:"Settings.tokens.popUpWarning.message",defaultMessage:"Are you sure you want to regenerate this token?"},iconRightButton:t.createElement(u.Z,null),isConfirmButtonLoading:x,isOpen:K,onToggleDialog:()=>B(!1),onConfirm:h,leftButtonText:{id:"Settings.tokens.Button.cancel",defaultMessage:"Cancel"},rightButtonText:{id:"Settings.tokens.Button.regenerate",defaultMessage:"Regenerate"},title:{id:"Settings.tokens.RegenerateDialog.title",defaultMessage:"Regenerate token"}}))};d.defaultProps={onRegenerate(){},onError:void 0},d.propTypes={onRegenerate:n().func,idToRegenerate:n().oneOfType([n().number,n().string]).isRequired,backUrl:n().string.isRequired,onError:n().func};var g=d;const l=({title:R,token:O,setToken:L,canEditInputs:W,canRegenerate:i,isSubmitting:K,backUrl:B,regenerateUrl:U,onErrorRegenerate:x})=>{const{formatMessage:h}=(0,m.Z)(),z=j=>{L({...O,accessKey:j})};return t.createElement(y.T,{title:O?.name||h(R),primaryAction:W?t.createElement(c.k,{gap:2},i&&O?.id&&t.createElement(g,{backUrl:U,onRegenerate:z,idToRegenerate:O?.id,onError:x}),t.createElement(o.z,{disabled:K,loading:K,startIcon:t.createElement(a.Z,null),type:"submit",size:"S"},h({id:"global.save",defaultMessage:"Save"}))):i&&O?.id&&t.createElement(g,{onRegenerate:z,idToRegenerate:O?.id,backUrl:U}),navigationAction:t.createElement(s.rU,{startIcon:t.createElement(r.Z,null),to:B},h({id:"global.back",defaultMessage:"Back"})),ellipsis:!0})};l.propTypes={token:n().shape({id:n().oneOfType([n().number,n().string]),type:n().string,lifespan:n().oneOfType([n().number,n().string]),name:n().string,accessKey:n().string,permissions:n().array,description:n().string,createdAt:n().string}),canEditInputs:n().bool.isRequired,canRegenerate:n().bool.isRequired,setToken:n().func.isRequired,isSubmitting:n().bool.isRequired,backUrl:n().string.isRequired,title:n().shape({id:n().string,label:n().string}).isRequired,regenerateUrl:n().string.isRequired,onErrorRegenerate:n().func},l.defaultProps={token:void 0,onErrorRegenerate:void 0};var M=l},82505:function(A,T,e){var t=e(32735),y=e(68465),c=e(84967),o=e(49372),s=e(60216),a=e.n(s),r=e(67879),f=e(25652);const n=({token:m,errors:u,values:E,onChange:d,isCreating:g})=>{const{formatMessage:l}=(0,r.Z)();return t.createElement(t.Fragment,null,t.createElement(y.P,{name:"lifespan",label:l({id:"Settings.tokens.form.duration",defaultMessage:"Token duration"}),value:E.lifespan!==null?E.lifespan:"0",error:u.lifespan?l(u.lifespan?.id?u.lifespan:{id:u.lifespan,defaultMessage:u.lifespan}):null,onChange:M=>{d({target:{name:"lifespan",value:M}})},required:!0,disabled:!g,placeholder:"Select"},t.createElement(c.W,{value:"604800000"},l({id:"Settings.tokens.duration.7-days",defaultMessage:"7 days"})),t.createElement(c.W,{value:"2592000000"},l({id:"Settings.tokens.duration.30-days",defaultMessage:"30 days"})),t.createElement(c.W,{value:"7776000000"},l({id:"Settings.tokens.duration.90-days",defaultMessage:"90 days"})),t.createElement(c.W,{value:"0"},l({id:"Settings.tokens.duration.unlimited",defaultMessage:"Unlimited"}))),t.createElement(o.Z,{variant:"pi",textColor:"neutral600"},!g&&`${l({id:"Settings.tokens.duration.expiration-date",defaultMessage:"Expiration date"})}: ${(0,f.IX)(m?.createdAt,parseInt(E.lifespan,10))}`))};n.propTypes={errors:a().shape({lifespan:a().string}),onChange:a().func.isRequired,values:a().shape({lifespan:a().oneOfType([a().number,a().string])}).isRequired,isCreating:a().bool.isRequired,token:a().shape({id:a().oneOfType([a().number,a().string]),type:a().string,lifespan:a().string,name:a().string,accessKey:a().string,permissions:a().array,description:a().string,createdAt:a().string})},n.defaultProps={errors:{},token:{}},T.Z=n},7210:function(A,T,e){var t=e(32735),y=e(50563),c=e(45509),o=e(47765),s=e(11631),a=e(60216),r=e.n(a),f=e(67879);const n=({token:m,tokenType:u})=>{const{formatMessage:E}=(0,f.Z)(),d=(0,c.lm)(),{trackUsage:g}=(0,c.rS)(),{copy:l}=(0,c.VP)(),M=R=>async()=>{await l(R)&&(g("didCopyTokenKey",{tokenType:u}),d({type:"success",message:{id:"Settings.tokens.notification.copied"}}))};return t.createElement(c.Y_,{endAction:m&&t.createElement("span",{style:{alignSelf:"start"}},t.createElement(y.h,{label:E({id:"app.component.CopyToClipboard.label",defaultMessage:"Copy to clipboard"}),onClick:M(m),noBorder:!0,icon:t.createElement(o.Z,null),style:{padding:0,height:"1rem"}})),title:m||E({id:"Settings.tokens.copy.editTitle",defaultMessage:"This token isn\u2019t accessible anymore."}),subtitle:E(m?{id:"Settings.tokens.copy.lastWarning",defaultMessage:"Make sure to copy this token, you won\u2019t be able to see it again!"}:{id:"Settings.tokens.copy.editMessage",defaultMessage:"For security reasons, you can only see your token once."}),icon:t.createElement(s.Z,null),iconBackground:"neutral100"})};n.defaultProps={token:null},n.propTypes={token:r().string,tokenType:r().string.isRequired},T.Z=n},58380:function(A,T,e){var t=e(32735),y=e(33475),c=e(60216),o=e.n(c),s=e(67879);const a=({errors:r,values:f,onChange:n,canEditInputs:m})=>{const{formatMessage:u}=(0,s.Z)();return t.createElement(y.g,{label:u({id:"Settings.tokens.form.description",defaultMessage:"Description"}),id:"description",error:r.description?u(r.description?.id?r.description:{id:r.description,defaultMessage:r.description}):null,onChange:n,disabled:!m},f.description)};a.propTypes={errors:o().shape({description:o().string}),onChange:o().func.isRequired,canEditInputs:o().bool.isRequired,values:o().shape({description:o().string}).isRequired},a.defaultProps={errors:{}},T.Z=a},37823:function(A,T,e){var t=e(32735),y=e(10369),c=e(60216),o=e.n(c),s=e(67879);const a=({errors:r,values:f,onChange:n,canEditInputs:m})=>{const{formatMessage:u}=(0,s.Z)();return t.createElement(y.o,{name:"name",error:r.name?u(r.name?.id?r.name:{id:r.name,defaultMessage:r.name}):null,label:u({id:"Settings.tokens.form.name",defaultMessage:"Name"}),onChange:n,value:f.name,disabled:!m,required:!0})};a.propTypes={errors:o().shape({name:o().string}),onChange:o().func.isRequired,canEditInputs:o().bool.isRequired,values:o().shape({name:o().string}).isRequired},a.defaultProps={errors:{}},T.Z=a},32655:function(A,T,e){var t=e(32735),y=e(68465),c=e(84967),o=e(60216),s=e.n(o),a=e(67879);const r=({name:f,errors:n,values:m,onChange:u,canEditInputs:E,options:d,label:g})=>{const{formatMessage:l}=(0,a.Z)();return t.createElement(y.P,{name:f,label:l({id:g.id,defaultMessage:g.defaultMessage}),value:m&&m[f],error:n[f]?l(n[f]?.id?n[f]:{id:n[f],defaultMessage:n[f]}):null,onChange:u,placeholder:"Select",required:!0,disabled:!E},d&&d.map(({value:M,label:R})=>t.createElement(c.W,{key:M,value:M},l(R))))};r.propTypes={name:s().string,options:s().arrayOf(s().shape({label:s().shape({id:s().string,defaultMessage:s().string}),value:s().string})),errors:s().shape({type:s().string}),onChange:s().func.isRequired,canEditInputs:s().bool.isRequired,values:s().shape({type:s().string}).isRequired,label:s().shape({id:s().string,defaultMessage:s().string}).isRequired},r.defaultProps={name:"type",errors:{},options:[]},T.Z=r},49756:function(A,T,e){e.d(T,{Z:function(){return t},f:function(){return y}});const t="api-token",y="transfer-token"},25652:function(A,T,e){e.d(T,{IX:function(){return s},fK:function(){return n},mk:function(){return u}});var t=e(14723),y=e(85544),c=e(76698),s=(E,d,g="en")=>{if(d&&typeof d=="number"){const l=d/24/60/60/1e3;return(0,t.Z)((0,y.Z)(new Date(E),l),"PPP",{locale:c[g]})}return"Unlimited"},a=e(45509),r=e(24346),n=r.Ry().shape({name:r.Z_(a.I0.string).max(100).required(a.I0.required),type:r.Z_(a.I0.string).oneOf(["read-only","full-access","custom"]).required(a.I0.required),description:r.Z_().nullable(),lifespan:r.Rx().integer().min(0).nullable().defined(a.I0.required)}),u=E=>{const d={allActionsIds:[],permissions:[]};return d.permissions=Object.keys(E).map(g=>({apiId:g,label:g.split("::")[1],controllers:Object.keys(E[g].controllers).map(l=>({controller:l,actions:E[g].controllers[l].map(M=>{const R=`${g}.${l}.${M}`;return g.includes("api::")&&d.allActionsIds.push(R),{action:M,actionId:R}}).flat()})).flat()})),d}},1930:function(A,T,e){e.d(T,{Z:function(){return ne}});var t=e(32735),y=e(27649),c=e(17e3),o=e(87933),s=e(45509),a=e(92802),r=e(67879),f=e(20108),n=e(15062),m=e(53038),u=e(90869),E=e(30305),d=e(49756),g=e(39404),l=e(7210),M=e(72850),R=e(49372),O=e(15335),L=e(5803),W=e(60216),i=e.n(W),K=e(82505),B=e(58380),U=e(37823),x=e(32655);const h=({errors:C,onChange:k,canEditInputs:Z,isCreating:D,values:S,transferToken:v})=>{const{formatMessage:F}=(0,r.Z)(),Q=[{value:"push",label:{id:"Settings.transferTokens.types.push",defaultMessage:"Push"}},{value:"pull",label:{id:"Settings.transferTokens.types.pull",defaultMessage:"Pull"}},{value:"push-pull",label:{id:"Settings.transferTokens.types.push-pull",defaultMessage:"Full Access"}}];return t.createElement(M.x,{background:"neutral0",hasRadius:!0,shadow:"filterShadow",paddingTop:6,paddingBottom:6,paddingLeft:7,paddingRight:7},t.createElement(o.k,{direction:"column",alignItems:"stretch",gap:4},t.createElement(R.Z,{variant:"delta",as:"h2"},F({id:"global.details",defaultMessage:"Details"})),t.createElement(O.r,{gap:5},t.createElement(L.P,{key:"name",col:6,xs:12},t.createElement(U.Z,{errors:C,values:S,canEditInputs:Z,onChange:k})),t.createElement(L.P,{key:"description",col:6,xs:12},t.createElement(B.Z,{errors:C,values:S,canEditInputs:Z,onChange:k})),t.createElement(L.P,{key:"lifespan",col:6,xs:12},t.createElement(K.Z,{isCreating:D,errors:C,values:S,onChange:k,token:v})),t.createElement(L.P,{key:"permissions",col:6,xs:12},t.createElement(x.Z,{name:"permissions",values:S,errors:C,label:{id:"Settings.tokens.form.type",defaultMessage:"Token type"},onChange:V=>{k({target:{name:"permissions",value:V}})},options:Q,canEditInputs:Z})))))};h.propTypes={errors:i().shape({name:i().string,description:i().string,lifespan:i().string,type:i().string}),onChange:i().func.isRequired,canEditInputs:i().bool.isRequired,values:i().shape({name:i().string,description:i().string,lifespan:i().oneOfType([i().number,i().string]),type:i().string}).isRequired,isCreating:i().bool.isRequired,transferToken:i().shape({id:i().oneOfType([i().number,i().string]),type:i().string,lifespan:i().string,name:i().string,accessKey:i().string,permissions:i().array,description:i().string,createdAt:i().string})},h.defaultProps={errors:{},transferToken:{}};var z=h,j=e(82055),_=e(41415),q=e(66456);const G=({transferTokenName:C})=>{const{formatMessage:k}=(0,r.Z)();return(0,s.go)(),t.createElement(y.o,{"aria-busy":"true"},t.createElement(s.SL,{name:"Transfer Tokens"}),t.createElement(j.T,{primaryAction:t.createElement(_.z,{disabled:!0,startIcon:t.createElement(q.Z,null),type:"button",size:"L"},k({id:"global.save",defaultMessage:"Save"})),title:C||k({id:"Settings.transferTokens.createPage.title",defaultMessage:"Create Transfer Token"})}),t.createElement(c.D,null,t.createElement(s.dO,null)))};G.defaultProps={transferTokenName:null},G.propTypes={transferTokenName:i().string};var w=G,N=e(24346),ee=N.Ry().shape({name:N.Z_(s.I0.string).max(100).required(s.I0.required),description:N.Z_().nullable(),lifespan:N.Rx().integer().min(0).nullable().defined(s.I0.required),permissions:N.Z_(s.I0.string).required(s.I0.required)});const te="Name already taken";var ne=()=>{(0,s.go)();const{formatMessage:C}=(0,r.Z)(),{lockApp:k,unlockApp:Z}=(0,s.o1)(),D=(0,s.lm)(),S=(0,m.k6)(),[v,F]=(0,t.useState)(S.location.state?.transferToken.accessKey?{...S.location.state.transferToken}:null),{trackUsage:Q}=(0,s.rS)(),V=(0,t.useRef)(Q),{setCurrentStep:se}=(0,s.c1)(),ae=(0,n.v9)(E._),{allowedActions:{canCreate:re,canUpdate:ie,canRegenerate:oe}}=(0,s.ss)(ae.settings["transfer-tokens"]),{params:{id:Y}}=(0,m.$B)("/settings/transfer-tokens/:id"),{get:le,post:de,put:ce}=(0,s.kY)(),P=Y==="create",{formatAPIError:J}=(0,s.So)();(0,t.useEffect)(()=>{V.current(P?"didAddTokenFromList":"didEditTokenFromList",{tokenType:d.f})},[P]);const{status:ue}=(0,f.useQuery)(["transfer-token",Y],async()=>{const{data:{data:p}}=await le(`/admin/transfer/tokens/${Y}`);return F({...p}),p},{enabled:!P&&!v,onError(p){p.response.data.error.details?.code==="INVALID_TOKEN_SALT"?D({type:"warning",message:{id:"notification.error.invalid.configuration",defaultMessage:"You have an invalid configuration, check your server log for more information."}}):D({type:"warning",message:J(p)})}}),ge=async(p,$)=>{V.current(P?"willCreateToken":"willEditToken",{tokenType:d.f}),k();const X=p.lifespan&&parseInt(p.lifespan,10)&&p.lifespan!=="0"?parseInt(p.lifespan,10):null,H=p.permissions.split("-");try{const{data:{data:I}}=P?await de("/admin/transfer/tokens",{...p,lifespan:X,permissions:H}):await ce(`/admin/transfer/tokens/${Y}`,{name:p.name,description:p.description,permissions:H});Z(),P&&(S.replace(`/settings/transfer-tokens/${I.id}`,{transferToken:I}),se("transferTokens.success")),F({...I}),D({type:"success",message:C(P?{id:"notification.success.transfertokencreated",defaultMessage:"Transfer Token successfully created"}:{id:"notification.success.transfertokenedited",defaultMessage:"Transfer Token successfully edited"})}),V.current(P?"didCreateToken":"didEditToken",{type:v?.permissions,tokenType:d.f})}catch(I){const fe=(0,u.Iz)(I.response.data);$.setErrors(fe),I?.response?.data?.error?.message===te?D({type:"warning",message:I.response.data.message||"notification.error.tokennamenotunique"}):I?.response?.data?.error?.details?.code==="INVALID_TOKEN_SALT"?D({type:"warning",message:{id:"notification.error.invalid.configuration",defaultMessage:"You have an invalid configuration, check your server log for more information."}}):D({type:"warning",message:I?.response?.data?.message||"notification.error"}),Z()}},b=ie&&!P||re&&P;if(!P&&!v&&ue!=="success")return t.createElement(w,{transferTokenName:v?.name});const pe=p=>{p?.response?.data?.error?.details?.code==="INVALID_TOKEN_SALT"?D({type:"warning",message:{id:"notification.error.invalid.configuration",defaultMessage:"You have an invalid configuration, check your server log for more information."}}):D({type:"warning",message:J(p)})};return t.createElement(y.o,null,t.createElement(s.SL,{name:"Transfer Tokens"}),t.createElement(a.J9,{validationSchema:ee,validateOnChange:!1,initialValues:{name:v?.name||"",description:v?.description||"",lifespan:v?.lifespan?v.lifespan.toString():v?.lifespan,permissions:v?.permissions.join("-")},enableReinitialize:!0,onSubmit:(p,$)=>ge(p,$)},({errors:p,handleChange:$,isSubmitting:X,values:H})=>t.createElement(s.l0,null,t.createElement(g.Z,{backUrl:"/settings/transfer-tokens",title:{id:"Settings.transferTokens.createPage.title",defaultMessage:"Create Transfer Token"},token:v,setToken:F,canEditInputs:b,canRegenerate:oe,isSubmitting:X,regenerateUrl:"/admin/transfer/tokens/",onErrorRegenerate:pe}),t.createElement(c.D,null,t.createElement(o.k,{direction:"column",alignItems:"stretch",gap:6},Boolean(v?.name)&&t.createElement(l.Z,{token:v?.accessKey,tokenType:d.f}),t.createElement(z,{errors:p,onChange:$,canEditInputs:b,isCreating:P,values:H,transferToken:v}))))))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1227],{21227:function(g,E,t){t.d(E,{ReviewWorkflowsAssigneeEE:function(){return O},ReviewWorkflowsStageEE:function(){return f}});var e=t(32735),s=t(87933),c=t(72850),i=t(49372),r=t(45509),l=t(60216),n=t.n(l),o=t(2121),u=t(68886);function f({color:a,name:A}){const{themeColorName:R}=(0,u.k)(a);return e.createElement(s.k,{alignItems:"center",gap:2,maxWidth:(0,r.Q1)(300)},e.createElement(c.x,{height:2,background:a,borderColor:R==="neutral0"?"neutral150":"transparent",hasRadius:!0,shrink:0,width:2}),e.createElement(i.Z,{fontWeight:"regular",textColor:"neutral700",ellipsis:!0},A))}f.defaultProps={color:o.FT},f.propTypes={color:n().string,name:n().string.isRequired};var T=t(67879),W=t(69997);function O({user:a}){const{formatMessage:A}=(0,T.Z)();return e.createElement(i.Z,{textColor:"neutral800"},(0,W.Gf)(a,A))}O.propTypes={user:n().shape({firstname:n().string,lastname:n().string,username:n().string}).isRequired}},2121:function(g,E,t){t.d(E,{$k:function(){return o},Ef:function(){return O},FT:function(){return T},Nj:function(){return n},Ot:function(){return l},VS:function(){return u},_X:function(){return a},gu:function(){return c},lv:function(){return f},qZ:function(){return i},sN:function(){return s},uL:function(){return W},x4:function(){return r}});var e=t(12301);const s="settings_review-workflows",c="Settings/Review_Workflows/RESET_WORKFLOW",i="Settings/Review_Workflows/SET_WORKFLOW",r="Settings/Review_Workflows/WORKFLOW_DELETE_STAGE",l="Settings/Review_Workflows/WORKFLOW_ADD_STAGE",n="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE",o="Settings/Review_Workflows/WORKFLOW_UPDATE_STAGE_POSITION",u="Settings/Review_Workflows/WORKFLOW_UPDATE",f={primary600:"Blue",primary200:"Lilac",alternative600:"Violet",alternative200:"Lavender",success600:"Green",success200:"Pale Green",danger500:"Cherry",danger200:"Pink",warning600:"Orange",warning200:"Yellow",secondary600:"Teal",secondary200:"Baby Blue",neutral400:"Gray",neutral0:"White"},T=e.W.colors.primary600,W={STAGE:"stage"},O="numberOfWorkflows",a="stagesPerWorkflow"},68886:function(g,E,t){t.d(E,{k:function(){return c},s:function(){return i}});var e=t(12301),s=t(2121);function c(r){if(!r)return null;const n=Object.entries(e.W.colors).filter(([,o])=>o.toUpperCase()===r.toUpperCase()).reduce((o,[u])=>(s.lv?.[u]&&(o=u),o),null);return n?{themeColorName:n,name:s.lv[n]}:null}function i(){return Object.entries(s.lv).map(([r,l])=>({hex:e.W.colors[r].toUpperCase(),name:l}))}}}]);
@@ -1,95 +0,0 @@
1
- (self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[1504],{88058:function(c,u,n){var t=n(87650);function r(e,s){var o=e==null?0:e.length;return!!o&&t(e,s,0)>-1}c.exports=r},37431:function(c){function u(n,t,r){for(var e=-1,s=n==null?0:n.length;++e<s;)if(r(t,n[e]))return!0;return!1}c.exports=u},91096:function(c,u,n){var t=n(61124),r=n(88058),e=n(37431),s=n(26460),o=n(76535),l=n(30555),i=200;function h(m,v,E,g){var a=-1,d=r,p=!0,x=m.length,f=[],j=v.length;if(!x)return f;E&&(v=s(v,o(E))),g?(d=e,p=!1):v.length>=i&&(d=l,p=!1,v=new t(v));n:for(;++a<x;){var _=m[a],M=E==null?_:E(_);if(_=g||_!==0?_:0,p&&M===M){for(var O=j;O--;)if(v[O]===M)continue n;f.push(_)}else d(v,M,g)||f.push(_)}return f}c.exports=h},56671:function(c,u,n){var t=n(35897),r=n(74741),e=r(t);c.exports=e},60528:function(c){function u(n,t,r,e){for(var s=n.length,o=r+(e?1:-1);e?o--:++o<s;)if(t(n[o],o,n))return o;return-1}c.exports=u},87650:function(c,u,n){var t=n(60528),r=n(25556),e=n(54256);function s(o,l,i){return l===l?e(o,l,i):t(o,r,i)}c.exports=s},25556:function(c){function u(n){return n!==n}c.exports=u},52920:function(c,u,n){var t=n(56671),r=n(81580);function e(s,o){var l=-1,i=r(s)?Array(s.length):[];return t(s,function(h,m,v){i[++l]=o(h,m,v)}),i}c.exports=e},50690:function(c,u,n){var t=n(26460),r=n(80166),e=n(88904),s=n(52920),o=n(36024),l=n(76535),i=n(1397),h=n(15362),m=n(77236);function v(E,g,a){g.length?g=t(g,function(x){return m(x)?function(f){return r(f,x.length===1?x[0]:x)}:x}):g=[h];var d=-1;g=t(g,l(e));var p=s(E,function(x,f,j){var _=t(g,function(M){return M(x)});return{criteria:_,index:++d,value:x}});return o(p,function(x,f){return i(x,f,a)})}c.exports=v},36024:function(c){function u(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}c.exports=u},40709:function(c,u,n){var t=n(22945);function r(e,s){if(e!==s){var o=e!==void 0,l=e===null,i=e===e,h=t(e),m=s!==void 0,v=s===null,E=s===s,g=t(s);if(!v&&!g&&!h&&e>s||h&&m&&E&&!v&&!g||l&&m&&E||!o&&E||!i)return 1;if(!l&&!h&&!g&&e<s||g&&o&&i&&!l&&!h||v&&o&&i||!m&&i||!E)return-1}return 0}c.exports=r},1397:function(c,u,n){var t=n(40709);function r(e,s,o){for(var l=-1,i=e.criteria,h=s.criteria,m=i.length,v=o.length;++l<m;){var E=t(i[l],h[l]);if(E){if(l>=v)return E;var g=o[l];return E*(g=="desc"?-1:1)}}return e.index-s.index}c.exports=r},74741:function(c,u,n){var t=n(81580);function r(e,s){return function(o,l){if(o==null)return o;if(!t(o))return e(o,l);for(var i=o.length,h=s?i:-1,m=Object(o);(s?h--:++h<i)&&l(m[h],h,m)!==!1;);return o}}c.exports=r},54256:function(c){function u(n,t,r){for(var e=r-1,s=n.length;++e<s;)if(n[e]===t)return e;return-1}c.exports=u},37213:function(c,u,n){var t=n(26460),r=n(88904),e=n(52920),s=n(77236);function o(l,i){var h=s(l)?t:e;return h(l,r(i,3))}c.exports=o},98978:function(c,u,n){var t=n(40314),r=n(50690),e=n(94569),s=n(63108),o=e(function(l,i){if(l==null)return[];var h=i.length;return h>1&&s(l,i[0],i[1])?i=[]:h>2&&s(i[0],i[1],i[2])&&(i=[i[0]]),r(l,t(i,1),[])});c.exports=o},15738:function(c,u,n){var t=n(4293);function r(e){var s=e==null?0:e.length;return s?t(e,1,s):[]}c.exports=r},88708:function(c,u,n){var t=n(4293),r=n(25225);function e(s,o,l){return s&&s.length?(o=l||o===void 0?1:r(o),t(s,0,o<0?0:o)):[]}c.exports=e},86205:function(c,u,n){var t=n(91096),r=n(94569),e=n(99747),s=r(function(o,l){return e(o)?t(o,l):[]});c.exports=s},83828:function(c,u,n){"use strict";n.d(u,{U:function(){return g},y:function(){return v}});var t=n(74512),r=n(32735),e=n(8471),s=n(91045),o=n(74971),l=n(49372),i=n(87933),h=n(72850);const m=({theme:a,expanded:d,variant:p,disabled:x,error:f})=>f?`1px solid ${a.colors.danger600} !important`:x?`1px solid ${a.colors.neutral150}`:d?`1px solid ${a.colors.primary600}`:p==="primary"?`1px solid ${a.colors.neutral0}`:`1px solid ${a.colors.neutral100}`,v=(0,e.ZP)(l.Z)``,E=(0,e.ZP)(h.x)`
2
- border: ${m};
3
-
4
- &:hover:not([aria-disabled='true']) {
5
- border: 1px solid ${({theme:a})=>a.colors.primary600};
6
-
7
- ${v} {
8
- color: ${({theme:a,expanded:d})=>d?void 0:a.colors.primary700};
9
- }
10
-
11
- ${l.Z} {
12
- color: ${({theme:a,expanded:d})=>d?void 0:a.colors.primary600};
13
- }
14
-
15
- & > ${i.k} {
16
- background: ${({theme:a})=>a.colors.primary100};
17
- }
18
-
19
- [data-strapi-dropdown='true'] {
20
- background: ${({theme:a})=>a.colors.primary200};
21
- }
22
- }
23
- `,g=({children:a,disabled:d=!1,error:p,expanded:x=!1,hasErrorMessage:f=!0,id:j,onToggle:_,toggle:M,size:O="M",variant:P="primary",shadow:B})=>{const y=(0,o.M)(j),A=r.useMemo(()=>({expanded:x,onToggle:_,toggle:M,id:y,size:O,variant:P,disabled:d}),[d,x,y,_,O,M,P]);return(0,t.jsxs)(s.S.Provider,{value:A,children:[(0,t.jsx)(E,{"data-strapi-expanded":x,disabled:d,"aria-disabled":d,expanded:x,hasRadius:!0,variant:P,error:p,shadow:B,children:a}),p&&f&&(0,t.jsx)(h.x,{paddingTop:1,children:(0,t.jsx)(l.Z,{variant:"pi",textColor:"danger600",children:p})})]})}},89966:function(c,u,n){"use strict";n.d(u,{v:function(){return s}});var t=n(74512),r=n(91045),e=n(72850);const s=({children:o,...l})=>{const{expanded:i,id:h}=(0,r.A)();if(!i)return null;const m=`accordion-content-${h}`,v=`accordion-label-${h}`,E=`accordion-desc-${h}`;return(0,t.jsx)(e.x,{role:"region",id:m,"aria-labelledby":v,"aria-describedby":E,...l,children:o})}},91045:function(c,u,n){"use strict";n.d(u,{A:function(){return e},S:function(){return r}});var t=n(32735);const r=(0,t.createContext)({disabled:!1,expanded:!1,id:"",size:"M",variant:"primary"}),e=()=>(0,t.useContext)(r)},61762:function(c,u,n){"use strict";n.d(u,{B:function(){return a}});var t=n(74512),r=n(16899),e=n(8471),s=n(83828),o=n(91045);const l=({expanded:d,disabled:p,variant:x})=>{let f="neutral100";return d?f="primary100":p?f="neutral150":x==="primary"&&(f="neutral0"),f};var i=n(7563),h=n(99140),m=n(87933),v=n(49372);const E=(0,e.ZP)(i.A)`
24
- text-align: left;
25
-
26
- // necessary to make the ellipsis prop work on the title
27
- > span {
28
- max-width: 100%;
29
- }
30
-
31
- svg {
32
- width: ${14/16}rem;
33
- height: ${14/16}rem;
34
-
35
- path {
36
- fill: ${({theme:d,expanded:p})=>p?d.colors.primary600:d.colors.neutral500};
37
- }
38
- }
39
- `,g=(0,e.ZP)(m.k)`
40
- min-height: ${({theme:d,size:p})=>d.sizes.accordions[p]};
41
- border-radius: ${({theme:d,expanded:p})=>p?`${d.borderRadius} ${d.borderRadius} 0 0`:d.borderRadius};
42
-
43
- &:hover {
44
- svg {
45
- path {
46
- fill: ${({theme:d})=>d.colors.primary600};
47
- }
48
- }
49
- }
50
- `,a=({title:d,description:p,as:x="span",togglePosition:f="right",action:j,..._})=>{const{onToggle:M,toggle:O,expanded:P,id:B,size:y,variant:A,disabled:D}=(0,o.A)(),W=`accordion-content-${B}`,L=`accordion-label-${B}`,I=`accordion-desc-${B}`,C=y==="M"?6:4,b=y==="M"?C:C-2,U=l({expanded:P,disabled:D,variant:A}),K={as:x,fontWeight:y==="S"?"bold":void 0,id:L,textColor:P?"primary600":"neutral700",ellipsis:!0,variant:y==="M"?"delta":void 0},Z=P?"primary600":"neutral600",w=P?"primary200":"neutral200",T=y==="M"?`${32/16}rem`:`${24/16}rem`,R=()=>{D||(O&&!M?(console.warn('Deprecation warning: Usage of "toggle" prop in Accordion component is deprecated. This is discouraged and will be removed in the next major release. Please use "onToggle" instead'),O()):M&&M())},$=(0,t.jsx)(m.k,{justifyContent:"center",borderRadius:"50%",height:T,width:T,transform:P?"rotate(180deg)":void 0,"data-strapi-dropdown":!0,"aria-hidden":!0,as:"span",background:w,cursor:D?"not-allowed":"pointer",onClick:R,shrink:0,children:(0,t.jsx)(h.J,{as:r.Z,width:y==="M"?`${11/16}rem`:`${8/16}rem`,color:P?"primary600":"neutral600"})});return(0,t.jsx)(g,{paddingBottom:b,paddingLeft:C,paddingRight:C,paddingTop:b,background:U,expanded:P,size:y,justifyContent:"space-between",cursor:D?"not-allowed":"",children:(0,t.jsxs)(m.k,{gap:3,flex:1,maxWidth:"100%",children:[f==="left"&&$,(0,t.jsx)(E,{onClick:R,"aria-disabled":D,"aria-expanded":P,"aria-controls":W,"aria-labelledby":L,"data-strapi-accordion-toggle":!0,expanded:P,type:"button",flex:1,minWidth:0,..._,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.y,{...K,children:d}),p&&(0,t.jsx)(v.Z,{as:"p",id:I,textColor:Z,children:p})]})}),f==="right"&&(0,t.jsxs)(m.k,{gap:3,children:[$,j]}),f==="left"&&j]})})}},99223:function(c,u,n){"use strict";n.d(u,{Z:function(){return e}});var t=n(74512),r=n(87933);const e=({startActions:s,endActions:o})=>!s&&!o?null:(0,t.jsxs)(r.k,{justifyContent:"space-between",alignItems:"flex-start",paddingBottom:4,paddingLeft:10,paddingRight:10,children:[(0,t.jsx)(r.k,{gap:2,wrap:"wrap",children:s}),(0,t.jsx)(r.k,{gap:2,shrink:0,wrap:"wrap",children:o})]})},17e3:function(c,u,n){"use strict";n.d(u,{D:function(){return e}});var t=n(74512),r=n(72850);const e=({children:s})=>(0,t.jsx)(r.x,{paddingLeft:10,paddingRight:10,children:s})},82055:function(c,u,n){"use strict";n.d(u,{T:function(){return v}});var t=n(74512),r=n(32735),e=n(8471);const s=a=>{const d=(0,r.useRef)(null),[p,x]=(0,r.useState)(!0),f=([j])=>{x(j.isIntersecting)};return(0,r.useEffect)(()=>{const j=d.current,_=new IntersectionObserver(f,a);return j&&_.observe(d.current),()=>{j&&_.disconnect()}},[d,a]),[d,p]};var o=n(81957);const l=(a,d)=>{const p=(0,o.W)(d);(0,r.useLayoutEffect)(()=>{const x=new ResizeObserver(p);return Array.isArray(a)?a.forEach(f=>{f.current&&x.observe(f.current)}):a.current&&x.observe(a.current),()=>{x.disconnect()}},[a,p])};var i=n(72850),h=n(87933),m=n(49372);const v=a=>{const d=(0,r.useRef)(null),[p,x]=(0,r.useState)(null),[f,j]=s({root:null,rootMargin:"0px",threshold:0});return l(f,()=>{f.current&&x(f.current.getBoundingClientRect())}),(0,r.useEffect)(()=>{d.current&&x(d.current.getBoundingClientRect())},[d]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{style:{height:p?.height},ref:f,children:j&&(0,t.jsx)(g,{ref:d,...a})}),!j&&(0,t.jsx)(g,{...a,sticky:!0,width:p?.width})]})};v.displayName="HeaderLayout";const E=(0,e.ZP)(i.x)`
51
- width: ${({width:a})=>a?`${a/16}rem`:void 0};
52
- z-index: ${({theme:a})=>a.zIndices[1]};
53
- `,g=r.forwardRef(({navigationAction:a,primaryAction:d,secondaryAction:p,subtitle:x,title:f,sticky:j,width:_,...M},O)=>{const P=typeof x=="string";return j?(0,t.jsx)(E,{paddingLeft:6,paddingRight:6,paddingTop:3,paddingBottom:3,position:"fixed",top:0,right:0,background:"neutral0",shadow:"tableShadow",width:_,"data-strapi-header-sticky":!0,children:(0,t.jsxs)(h.k,{justifyContent:"space-between",children:[(0,t.jsxs)(h.k,{children:[a&&(0,t.jsx)(i.x,{paddingRight:3,children:a}),(0,t.jsxs)(i.x,{children:[(0,t.jsx)(m.Z,{variant:"beta",as:"h1",...M,children:f}),P?(0,t.jsx)(m.Z,{variant:"pi",textColor:"neutral600",children:x}):x]}),p?(0,t.jsx)(i.x,{paddingLeft:4,children:p}):null]}),(0,t.jsx)(h.k,{children:d?(0,t.jsx)(i.x,{paddingLeft:2,children:d}):void 0})]})}):(0,t.jsxs)(i.x,{ref:O,paddingLeft:10,paddingRight:10,paddingBottom:8,paddingTop:a?6:8,background:"neutral100","data-strapi-header":!0,children:[a?(0,t.jsx)(i.x,{paddingBottom:2,children:a}):null,(0,t.jsxs)(h.k,{justifyContent:"space-between",children:[(0,t.jsxs)(h.k,{minWidth:0,children:[(0,t.jsx)(m.Z,{as:"h1",variant:"alpha",...M,children:f}),p?(0,t.jsx)(i.x,{paddingLeft:4,children:p}):null]}),d]}),P?(0,t.jsx)(m.Z,{variant:"epsilon",textColor:"neutral600",as:"p",children:x}):x]})})},96709:function(c,u,n){"use strict";n.d(u,{A:function(){return l}});var t=n(74512),r=n(8471),e=n(72850);const s=(0,r.ZP)(e.x)`
54
- display: grid;
55
- grid-template-columns: ${({hasSideNav:i})=>i?"auto 1fr":"1fr"};
56
- `,o=(0,r.ZP)(e.x)`
57
- overflow-x: hidden;
58
- `,l=({sideNav:i,children:h})=>(0,t.jsxs)(s,{hasSideNav:!!i,children:[i,(0,t.jsx)(o,{paddingBottom:10,children:h})]})},50428:function(c,u,n){"use strict";n.d(u,{r:function(){return E}});var t=n(74512),r=n(32735),e=n(47361),s=n(14911),o=n(8471),l=n(30350),i=n(49372),h=n(72850);const m=o.ZP.a`
59
- display: inline-flex;
60
- align-items: center;
61
- text-decoration: none;
62
- pointer-events: ${({disabled:g})=>g?"none":void 0};
63
- color: ${({disabled:g,theme:a})=>g?a.colors.neutral600:a.colors.primary600};
64
-
65
- svg path {
66
- transition: fill 150ms ease-out;
67
- fill: currentColor;
68
- }
69
-
70
- svg {
71
- font-size: ${10/16}rem;
72
- }
73
-
74
- ${i.Z} {
75
- transition: color 150ms ease-out;
76
- color: currentColor;
77
- }
78
-
79
- &:hover {
80
- color: ${({theme:g})=>g.colors.primary500};
81
- }
82
-
83
- &:active {
84
- color: ${({theme:g})=>g.colors.primary700};
85
- }
86
-
87
- ${l.BF};
88
- `,v=(0,o.ZP)(h.x)`
89
- display: flex;
90
- `,E=r.forwardRef(({children:g,href:a,to:d,disabled:p=!1,startIcon:x,endIcon:f,...j},_)=>(0,t.jsxs)(m,{as:d&&!p?s.OL:"a",target:a?"_blank":void 0,rel:a?"noreferrer noopener":void 0,to:p?void 0:d,href:p?"#":a,disabled:p,ref:_,...j,children:[x&&(0,t.jsx)(v,{as:"span","aria-hidden":!0,paddingRight:2,children:x}),(0,t.jsx)(i.Z,{children:g}),f&&!a&&(0,t.jsx)(v,{as:"span","aria-hidden":!0,paddingLeft:2,children:f}),a&&(0,t.jsx)(v,{as:"span","aria-hidden":!0,paddingLeft:2,children:(0,t.jsx)(e.Z,{})})]}))},27649:function(c,u,n){"use strict";n.d(u,{o:function(){return o}});var t=n(74512),r=n(8471),e=n(72850);const s=(0,r.ZP)(e.x)`
91
- // To prevent global outline on focus visible to force an outline when Main is focused
92
- &:focus-visible {
93
- outline: none;
94
- }
95
- `,o=({labelledBy:l="main-content-title",...i})=>(0,t.jsx)(s,{"aria-labelledby":l,as:"main",id:"main-content",tabIndex:-1,...i})},29439:function(c,u,n){"use strict";n.d(u,{Z:function(){return e}});var t=n(74512);const r=s=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...s,children:(0,t.jsx)("path",{fill:"#212134",d:"M24 13.3a.2.2 0 0 1-.2.2H5.74l8.239 8.239a.2.2 0 0 1 0 .282L12.14 23.86a.2.2 0 0 1-.282 0L.14 12.14a.2.2 0 0 1 0-.282L11.86.14a.2.2 0 0 1 .282 0L13.98 1.98a.2.2 0 0 1 0 .282L5.74 10.5H23.8c.11 0 .2.09.2.2v2.6Z"})}),e=r},45112:function(c,u,n){"use strict";n.d(u,{Z:function(){return e}});var t=n(74512);const r=s=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...s,children:(0,t.jsx)("path",{fill:"#212134",fillRule:"evenodd",d:"M2.68 9.192c-.6.276-2.114 1.18-2.306 1.303a.792.792 0 0 0-.374.68v1.65a.797.797 0 0 0 .384.687c.254.16 1.73 1.042 2.306 1.303l.744 1.8c-.24.634-.67 2.333-.72 2.554a.797.797 0 0 0 .216.744l1.167 1.166a.801.801 0 0 0 .744.216l.03-.008c.36-.092 1.946-.498 2.523-.712l1.8.744c.276.6 1.181 2.115 1.304 2.307a.805.805 0 0 0 .679.374h1.649a.797.797 0 0 0 .686-.384c.16-.254 1.042-1.73 1.303-2.306l1.8-.744c.634.24 2.333.67 2.554.72a.797.797 0 0 0 .744-.216l1.166-1.167a.803.803 0 0 0 .216-.744l-.008-.03c-.092-.36-.498-1.946-.712-2.523l.744-1.8c.6-.276 2.115-1.181 2.307-1.304a.804.804 0 0 0 .374-.679v-1.649a.796.796 0 0 0-.382-.679c-.254-.16-1.73-1.041-2.306-1.303l-.744-1.8c.24-.634.67-2.333.72-2.554a.796.796 0 0 0-.216-.744l-1.166-1.173a.802.802 0 0 0-.744-.216l-.03.008c-.361.092-1.947.498-2.524.712l-1.8-.744c-.276-.6-1.18-2.115-1.303-2.307a.803.803 0 0 0-.68-.374h-1.65a.797.797 0 0 0-.68.382c-.16.254-1.041 1.73-1.303 2.306l-1.8.744c-.634-.24-2.333-.67-2.554-.72a.797.797 0 0 0-.744.216L2.921 4.094a.802.802 0 0 0-.216.744l.008.03c.092.361.498 1.947.712 2.524l-.744 1.8ZM12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z",clipRule:"evenodd"})}),e=r}}]);