@strapi/admin 4.4.3 → 4.4.4

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 (35) hide show
  1. package/admin/src/StrapiApp.js +14 -2
  2. package/admin/src/content-manager/components/DynamicTable/CellContent/index.js +10 -0
  3. package/admin/src/content-manager/components/PreviewWysiwyg/index.js +1 -1
  4. package/admin/src/content-manager/components/SelectOne/SingleValue.js +4 -1
  5. package/admin/src/content-manager/pages/ListSettingsView/components/DraggableCard.js +3 -3
  6. package/admin/src/content-manager/pages/ListSettingsView/components/Settings.js +2 -2
  7. package/admin/src/content-manager/pages/ListSettingsView/components/SortDisplayedFields.js +1 -1
  8. package/admin/src/core/apis/CustomFields.js +0 -1
  9. package/admin/src/core/store/configureStore.js +17 -2
  10. package/admin/src/favicon.png +0 -0
  11. package/admin/src/pages/App/index.js +1 -1
  12. package/admin/src/pages/HomePage/SocialLinks.js +1 -1
  13. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/CardButton.js +110 -0
  14. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/InstallPluginButton.js +32 -21
  15. package/admin/src/pages/MarketplacePage/components/NpmPackageCard/index.js +7 -0
  16. package/admin/src/pages/MarketplacePage/components/NpmPackagesGrid/index.js +4 -0
  17. package/admin/src/pages/MarketplacePage/index.js +2 -1
  18. package/admin/src/translations/en.json +7 -5
  19. package/build/{Admin-authenticatedApp.88fa40ac.chunk.js → Admin-authenticatedApp.48c67745.chunk.js} +2 -2
  20. package/build/{Admin_homePage.6d5e3236.chunk.js → Admin_homePage.4b2be829.chunk.js} +1 -1
  21. package/build/Admin_marketplace.3b5a5b5d.chunk.js +11 -0
  22. package/build/admin-app.9b3b21e5.chunk.js +112 -0
  23. package/build/{content-manager.8bddf2e6.chunk.js → content-manager.78fe09e2.chunk.js} +93 -92
  24. package/build/{content-type-builder.a6e29716.chunk.js → content-type-builder.adbfd710.chunk.js} +13 -13
  25. package/build/en-json.922ce2db.chunk.js +1 -0
  26. package/build/index.html +1 -1
  27. package/build/{main.6650d2e7.js → main.b0b16454.js} +371 -371
  28. package/build/{runtime~main.7faf633a.js → runtime~main.4b562cd4.js} +1 -1
  29. package/build/{upload-translation-en-json.004a86c1.chunk.js → upload-translation-en-json.86da7b0a.chunk.js} +1 -1
  30. package/package.json +8 -8
  31. package/admin/src/favicon.ico +0 -0
  32. package/build/Admin_marketplace.82c0570b.chunk.js +0 -11
  33. package/build/admin-app.a61d5c2e.chunk.js +0 -112
  34. package/build/b997a22a2e0b87ef1fa2.ico +0 -0
  35. package/build/en-json.e936d40e.chunk.js +0 -1
@@ -21,7 +21,7 @@ import {
21
21
  MUTATE_SINGLE_TYPES_LINKS,
22
22
  } from './exposedHooks';
23
23
  import injectionZones from './injectionZones';
24
- import favicon from './favicon.ico';
24
+ import favicon from './favicon.png';
25
25
  import localStorageKey from './components/LanguageProvider/utils/localStorageKey';
26
26
 
27
27
  class StrapiApp {
@@ -227,7 +227,19 @@ class StrapiApp {
227
227
  }
228
228
 
229
229
  if (this.customConfigurations?.theme) {
230
- merge(this.configurations.themes.light, this.customConfigurations.theme);
230
+ const darkTheme = this.customConfigurations.theme.dark;
231
+ const lightTheme = this.customConfigurations.theme.light;
232
+
233
+ if (!darkTheme && !lightTheme) {
234
+ console.warn(
235
+ `[deprecated] In future versions, Strapi will stop supporting this theme customization syntax. The theme configuration accepts a light and a dark key to customize each theme separately. See https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#theme-extension.`
236
+ );
237
+ merge(this.configurations.themes.light, this.customConfigurations.theme);
238
+ }
239
+
240
+ if (lightTheme) merge(this.configurations.themes.light, lightTheme);
241
+
242
+ if (darkTheme) merge(this.configurations.themes.dark, darkTheme);
231
243
  }
232
244
 
233
245
  if (this.customConfigurations?.notifications?.releases !== undefined) {
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import { Typography } from '@strapi/design-system/Typography';
5
+ import { Tooltip } from '@strapi/design-system/Tooltip';
5
6
  import Media from './Media';
6
7
  import MultipleMedias from './MultipleMedias';
7
8
  import RelationMultiple from './RelationMultiple';
@@ -55,6 +56,15 @@ const CellContent = ({ content, fieldSchema, metadatas, name, queryInfos, rowId
55
56
 
56
57
  return <SingleComponent value={content} metadatas={metadatas} />;
57
58
 
59
+ case 'string':
60
+ return (
61
+ <Tooltip description={content}>
62
+ <TypographyMaxWidth ellipsis textColor="neutral800">
63
+ <CellValue type={type} value={content} />
64
+ </TypographyMaxWidth>
65
+ </Tooltip>
66
+ );
67
+
58
68
  default:
59
69
  return (
60
70
  <TypographyMaxWidth ellipsis textColor="neutral800">
@@ -13,7 +13,7 @@ import sanitizeHtml from './utils/satinizeHtml';
13
13
  import Wrapper from './Wrapper';
14
14
 
15
15
  const PreviewWysiwyg = ({ data }) => {
16
- const html = useMemo(() => sanitizeHtml(md.render(data || '')), [data]);
16
+ const html = useMemo(() => sanitizeHtml(md.render(data.replaceAll('\\n', '\n') || '')), [data]);
17
17
 
18
18
  return (
19
19
  <Wrapper>
@@ -9,6 +9,7 @@ import { Typography } from '@strapi/design-system/Typography';
9
9
  import get from 'lodash/get';
10
10
  import has from 'lodash/has';
11
11
  import isEmpty from 'lodash/isEmpty';
12
+ import { Tooltip } from '@strapi/design-system/Tooltip';
12
13
  import { getTrad } from '../../utils';
13
14
 
14
15
  const StyledBullet = styled.div`
@@ -43,7 +44,9 @@ const SingleValue = (props) => {
43
44
  <Component {...props}>
44
45
  <Flex>
45
46
  <StyledBullet title={title} isDraft={isDraft} />
46
- <Typography ellipsis>{props.data.label ?? '-'}</Typography>
47
+ <Tooltip description={props.data.label ?? '-'}>
48
+ <Typography ellipsis>{props.data.label ?? '-'}</Typography>
49
+ </Tooltip>
47
50
  </Flex>
48
51
  </Component>
49
52
  );
@@ -201,7 +201,7 @@ const DraggableCard = ({
201
201
  id: getTrad('components.DraggableCard.move.field'),
202
202
  defaultMessage: 'Move {item}',
203
203
  },
204
- { item: name }
204
+ { item: labelField }
205
205
  )}
206
206
  onClick={(e) => e.stopPropagation()}
207
207
  ref={refs.dragRef}
@@ -223,7 +223,7 @@ const DraggableCard = ({
223
223
  id: getTrad('components.DraggableCard.edit.field'),
224
224
  defaultMessage: 'Edit {item}',
225
225
  },
226
- { item: name }
226
+ { item: labelField }
227
227
  )}
228
228
  type="button"
229
229
  >
@@ -237,7 +237,7 @@ const DraggableCard = ({
237
237
  id: getTrad('components.DraggableCard.delete.field'),
238
238
  defaultMessage: 'Delete {item}',
239
239
  },
240
- { item: name }
240
+ { item: labelField }
241
241
  )}
242
242
  type="button"
243
243
  >
@@ -16,7 +16,7 @@ const FlexGap = styled(Flex)`
16
16
 
17
17
  const Settings = ({ modifiedData, onChange, sortOptions }) => {
18
18
  const { formatMessage } = useIntl();
19
- const { settings } = modifiedData;
19
+ const { settings, metadatas } = modifiedData;
20
20
 
21
21
  return (
22
22
  <>
@@ -122,7 +122,7 @@ const Settings = ({ modifiedData, onChange, sortOptions }) => {
122
122
  >
123
123
  {sortOptions.map((sortBy) => (
124
124
  <Option key={sortBy} value={sortBy}>
125
- {sortBy}
125
+ {metadatas[sortBy].list.label || sortBy}
126
126
  </Option>
127
127
  ))}
128
128
  </Select>
@@ -104,7 +104,7 @@ const SortDisplayedFields = ({
104
104
  >
105
105
  {listRemainingFields.map((field) => (
106
106
  <MenuItem key={field} onClick={() => handleAddField(field)}>
107
- {field}
107
+ {metadatas[field].list.label || field}
108
108
  </MenuItem>
109
109
  ))}
110
110
  </SimpleMenu>
@@ -16,7 +16,6 @@ const ALLOWED_TYPES = [
16
16
  'string',
17
17
  'text',
18
18
  'time',
19
- 'timestamp',
20
19
  'uid',
21
20
  ];
22
21
 
@@ -1,14 +1,29 @@
1
- import { createStore, applyMiddleware } from 'redux';
1
+ import { createStore, applyMiddleware, compose } from 'redux';
2
2
  import createReducer from './createReducer';
3
3
 
4
4
  const configureStore = (appMiddlewares, appReducers) => {
5
+ let composeEnhancers = compose;
6
+
5
7
  const middlewares = [];
6
8
 
7
9
  appMiddlewares.forEach((middleware) => {
8
10
  middlewares.push(middleware());
9
11
  });
10
12
 
11
- return createStore(createReducer(appReducers), {}, applyMiddleware(...middlewares));
13
+ // If Redux Dev Tools are installed, enable them
14
+ if (
15
+ process.env.NODE_ENV !== 'production' &&
16
+ typeof window === 'object' &&
17
+ window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
18
+ ) {
19
+ composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({});
20
+ }
21
+
22
+ return createStore(
23
+ createReducer(appReducers),
24
+ {},
25
+ composeEnhancers(applyMiddleware(...middlewares))
26
+ );
12
27
  };
13
28
 
14
29
  export default configureStore;
Binary file
@@ -91,7 +91,7 @@ function App() {
91
91
  try {
92
92
  const deviceId = await getUID();
93
93
 
94
- fetch('https://analytics.strapi.io/track', {
94
+ await fetch('https://analytics.strapi.io/track', {
95
95
  method: 'POST',
96
96
  body: JSON.stringify({
97
97
  event: 'didInitializeAdministration',
@@ -79,7 +79,7 @@ const socialLinks = [
79
79
  },
80
80
  {
81
81
  name: 'Discord',
82
- link: 'https://slack.strapi.io/',
82
+ link: 'https://discord.strapi.io/',
83
83
  icon: <StyledDiscord />,
84
84
  alt: 'discord',
85
85
  },
@@ -0,0 +1,110 @@
1
+ import React from 'react';
2
+ import semver from 'semver';
3
+ import PropTypes from 'prop-types';
4
+ import { useIntl } from 'react-intl';
5
+ import { Tooltip } from '@strapi/design-system/Tooltip';
6
+ import { Button } from '@strapi/design-system/Button';
7
+ import { Box } from '@strapi/design-system/Box';
8
+ import Duplicate from '@strapi/icons/Duplicate';
9
+
10
+ const TooltipButton = ({ description, installMessage, disabled, handleCopy, pluginName }) => (
11
+ <Tooltip data-testid={`tooltip-${pluginName}`} description={description}>
12
+ <Box>
13
+ <Button
14
+ size="S"
15
+ startIcon={<Duplicate />}
16
+ variant="secondary"
17
+ disabled={disabled}
18
+ onClick={handleCopy}
19
+ >
20
+ {installMessage}
21
+ </Button>
22
+ </Box>
23
+ </Tooltip>
24
+ );
25
+
26
+ const CardButton = ({ strapiPeerDepVersion, strapiAppVersion, handleCopy, pluginName }) => {
27
+ const { formatMessage } = useIntl();
28
+ const versionRange = semver.validRange(strapiPeerDepVersion);
29
+ const isCompatible = semver.satisfies(strapiAppVersion, versionRange);
30
+
31
+ const installMessage = formatMessage({
32
+ id: 'admin.pages.MarketPlacePage.plugin.copy',
33
+ defaultMessage: 'Copy install command',
34
+ });
35
+
36
+ // Only plugins receive a strapiAppVersion
37
+ if (strapiAppVersion) {
38
+ if (!versionRange) {
39
+ return (
40
+ <TooltipButton
41
+ installMessage={installMessage}
42
+ pluginName={pluginName}
43
+ description={formatMessage(
44
+ {
45
+ id: 'admin.pages.MarketPlacePage.plugin.version.null',
46
+ defaultMessage:
47
+ 'Unable to verify compatibility with your Strapi version: "{strapiAppVersion}"',
48
+ },
49
+ { strapiAppVersion }
50
+ )}
51
+ handleCopy={handleCopy}
52
+ />
53
+ );
54
+ }
55
+
56
+ if (!isCompatible) {
57
+ return (
58
+ <TooltipButton
59
+ installMessage={installMessage}
60
+ pluginName={pluginName}
61
+ description={formatMessage(
62
+ {
63
+ id: 'admin.pages.MarketPlacePage.plugin.version',
64
+ defaultMessage:
65
+ 'Update your Strapi version: "{strapiAppVersion}" to: "{versionRange}"',
66
+ },
67
+ {
68
+ strapiAppVersion,
69
+ versionRange,
70
+ }
71
+ )}
72
+ disabled
73
+ />
74
+ );
75
+ }
76
+ }
77
+
78
+ return (
79
+ <Button size="S" startIcon={<Duplicate />} variant="secondary" onClick={handleCopy}>
80
+ {installMessage}
81
+ </Button>
82
+ );
83
+ };
84
+
85
+ TooltipButton.defaultProps = {
86
+ disabled: false,
87
+ handleCopy: null,
88
+ };
89
+
90
+ TooltipButton.propTypes = {
91
+ description: PropTypes.string.isRequired,
92
+ installMessage: PropTypes.string.isRequired,
93
+ disabled: PropTypes.bool,
94
+ handleCopy: PropTypes.func,
95
+ pluginName: PropTypes.string.isRequired,
96
+ };
97
+
98
+ CardButton.defaultProps = {
99
+ strapiAppVersion: null,
100
+ strapiPeerDepVersion: null,
101
+ };
102
+
103
+ CardButton.propTypes = {
104
+ strapiAppVersion: PropTypes.string,
105
+ strapiPeerDepVersion: PropTypes.string,
106
+ handleCopy: PropTypes.func.isRequired,
107
+ pluginName: PropTypes.string.isRequired,
108
+ };
109
+
110
+ export default CardButton;
@@ -1,20 +1,34 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { useIntl } from 'react-intl';
4
- import { CopyToClipboard } from 'react-copy-to-clipboard';
5
4
  import { useNotification, useTracking } from '@strapi/helper-plugin';
6
5
  import { Box } from '@strapi/design-system/Box';
7
6
  import { Icon } from '@strapi/design-system/Icon';
8
7
  import { Typography } from '@strapi/design-system/Typography';
9
8
  import Check from '@strapi/icons/Check';
10
- import Duplicate from '@strapi/icons/Duplicate';
11
- import { Button } from '@strapi/design-system/Button';
9
+ import CardButton from './CardButton';
12
10
 
13
- const InstallPluginButton = ({ isInstalled, isInDevelopmentMode, commandToCopy }) => {
11
+ const InstallPluginButton = ({
12
+ isInstalled,
13
+ isInDevelopmentMode,
14
+ commandToCopy,
15
+ strapiAppVersion,
16
+ strapiPeerDepVersion,
17
+ pluginName,
18
+ }) => {
14
19
  const toggleNotification = useNotification();
15
20
  const { formatMessage } = useIntl();
16
21
  const { trackUsage } = useTracking();
17
22
 
23
+ const handleCopy = () => {
24
+ navigator.clipboard.writeText(commandToCopy);
25
+ trackUsage('willInstallPlugin');
26
+ toggleNotification({
27
+ type: 'success',
28
+ message: { id: 'admin.pages.MarketPlacePage.plugin.copy.success' },
29
+ });
30
+ };
31
+
18
32
  // Already installed
19
33
  if (isInstalled) {
20
34
  return (
@@ -33,23 +47,12 @@ const InstallPluginButton = ({ isInstalled, isInDevelopmentMode, commandToCopy }
33
47
  // In development, show install button
34
48
  if (isInDevelopmentMode) {
35
49
  return (
36
- <CopyToClipboard
37
- onCopy={() => {
38
- trackUsage('willInstallPlugin');
39
- toggleNotification({
40
- type: 'success',
41
- message: { id: 'admin.pages.MarketPlacePage.plugin.copy.success' },
42
- });
43
- }}
44
- text={commandToCopy}
45
- >
46
- <Button size="S" startIcon={<Duplicate />} variant="secondary">
47
- {formatMessage({
48
- id: 'admin.pages.MarketPlacePage.plugin.copy',
49
- defaultMessage: 'Copy install command',
50
- })}
51
- </Button>
52
- </CopyToClipboard>
50
+ <CardButton
51
+ strapiAppVersion={strapiAppVersion}
52
+ strapiPeerDepVersion={strapiPeerDepVersion}
53
+ handleCopy={handleCopy}
54
+ pluginName={pluginName}
55
+ />
53
56
  );
54
57
  }
55
58
 
@@ -57,10 +60,18 @@ const InstallPluginButton = ({ isInstalled, isInDevelopmentMode, commandToCopy }
57
60
  return null;
58
61
  };
59
62
 
63
+ InstallPluginButton.defaultProps = {
64
+ strapiAppVersion: null,
65
+ strapiPeerDepVersion: null,
66
+ };
67
+
60
68
  InstallPluginButton.propTypes = {
61
69
  isInstalled: PropTypes.bool.isRequired,
62
70
  isInDevelopmentMode: PropTypes.bool.isRequired,
63
71
  commandToCopy: PropTypes.string.isRequired,
72
+ strapiAppVersion: PropTypes.string,
73
+ strapiPeerDepVersion: PropTypes.string,
74
+ pluginName: PropTypes.string.isRequired,
64
75
  };
65
76
 
66
77
  export default InstallPluginButton;
@@ -32,6 +32,7 @@ const NpmPackageCard = ({
32
32
  useYarn,
33
33
  isInDevelopmentMode,
34
34
  npmPackageType,
35
+ strapiAppVersion,
35
36
  }) => {
36
37
  const { attributes } = npmPackage;
37
38
  const { formatMessage } = useIntl();
@@ -139,6 +140,9 @@ const NpmPackageCard = ({
139
140
  isInstalled={isInstalled}
140
141
  isInDevelopmentMode={isInDevelopmentMode}
141
142
  commandToCopy={commandToCopy}
143
+ strapiAppVersion={strapiAppVersion}
144
+ strapiPeerDepVersion={attributes.strapiVersion}
145
+ pluginName={attributes.name}
142
146
  />
143
147
  </Stack>
144
148
  </Flex>
@@ -147,6 +151,7 @@ const NpmPackageCard = ({
147
151
 
148
152
  NpmPackageCard.defaultProps = {
149
153
  isInDevelopmentMode: false,
154
+ strapiAppVersion: null,
150
155
  };
151
156
 
152
157
  NpmPackageCard.propTypes = {
@@ -164,12 +169,14 @@ NpmPackageCard.propTypes = {
164
169
  validated: PropTypes.bool.isRequired,
165
170
  madeByStrapi: PropTypes.bool.isRequired,
166
171
  strapiCompatibility: PropTypes.oneOf(['v3', 'v4']),
172
+ strapiVersion: PropTypes.string,
167
173
  }).isRequired,
168
174
  }).isRequired,
169
175
  isInstalled: PropTypes.bool.isRequired,
170
176
  useYarn: PropTypes.bool.isRequired,
171
177
  isInDevelopmentMode: PropTypes.bool,
172
178
  npmPackageType: PropTypes.string.isRequired,
179
+ strapiAppVersion: PropTypes.string,
173
180
  };
174
181
 
175
182
  export default NpmPackageCard;
@@ -9,6 +9,7 @@ const NpmPackagesGrid = ({
9
9
  useYarn,
10
10
  isInDevelopmentMode,
11
11
  npmPackageType,
12
+ strapiAppVersion,
12
13
  }) => {
13
14
  // Check if an individual package is in the dependencies
14
15
  const isAlreadyInstalled = useCallback(
@@ -26,6 +27,7 @@ const NpmPackagesGrid = ({
26
27
  useYarn={useYarn}
27
28
  isInDevelopmentMode={isInDevelopmentMode}
28
29
  npmPackageType={npmPackageType}
30
+ strapiAppVersion={strapiAppVersion}
29
31
  />
30
32
  </GridItem>
31
33
  ))}
@@ -35,6 +37,7 @@ const NpmPackagesGrid = ({
35
37
 
36
38
  NpmPackagesGrid.defaultProps = {
37
39
  installedPackageNames: [],
40
+ strapiAppVersion: null,
38
41
  };
39
42
 
40
43
  NpmPackagesGrid.propTypes = {
@@ -43,6 +46,7 @@ NpmPackagesGrid.propTypes = {
43
46
  useYarn: PropTypes.bool.isRequired,
44
47
  isInDevelopmentMode: PropTypes.bool.isRequired,
45
48
  npmPackageType: PropTypes.string.isRequired,
49
+ strapiAppVersion: PropTypes.string,
46
50
  };
47
51
 
48
52
  export default NpmPackagesGrid;
@@ -50,7 +50,7 @@ const MarketPlacePage = () => {
50
50
  const toggleNotification = useNotification();
51
51
  const [searchQuery, setSearchQuery] = useState('');
52
52
  const [npmPackageType, setNpmPackageType] = useState('plugin');
53
- const { autoReload: isInDevelopmentMode, dependencies, useYarn } = useAppInfos();
53
+ const { autoReload: isInDevelopmentMode, dependencies, useYarn, strapiVersion } = useAppInfos();
54
54
  const isOnline = useNavigatorOnLine();
55
55
 
56
56
  useFocusWhenNavigate();
@@ -247,6 +247,7 @@ const MarketPlacePage = () => {
247
247
  useYarn={useYarn}
248
248
  isInDevelopmentMode={isInDevelopmentMode}
249
249
  npmPackageType="plugin"
250
+ strapiAppVersion={strapiVersion}
250
251
  />
251
252
  )}
252
253
  </TabPanel>
@@ -100,11 +100,11 @@
100
100
  "Settings.apiTokens.duration.30-days": "30 days",
101
101
  "Settings.apiTokens.duration.90-days": "90 days",
102
102
  "Settings.apiTokens.duration.unlimited": "Unlimited",
103
- "Settings.apiTokens.form.duration":"Token duration",
104
- "Settings.apiTokens.form.type":"Token type",
105
- "Settings.apiTokens.duration.expiration-date":"Expiration date",
106
- "Settings.apiTokens.createPage.permissions.title":"Permissions",
107
- "Settings.apiTokens.createPage.permissions.description":"Only actions bound by a route are listed below.",
103
+ "Settings.apiTokens.form.duration": "Token duration",
104
+ "Settings.apiTokens.form.type": "Token type",
105
+ "Settings.apiTokens.duration.expiration-date": "Expiration date",
106
+ "Settings.apiTokens.createPage.permissions.title": "Permissions",
107
+ "Settings.apiTokens.createPage.permissions.description": "Only actions bound by a route are listed below.",
108
108
  "Settings.apiTokens.RegenerateDialog.title": "Regenerate token",
109
109
  "Settings.apiTokens.popUpWarning.message": "Are you sure you want to regenerate this token?",
110
110
  "Settings.apiTokens.Button.cancel": "Cancel",
@@ -270,6 +270,8 @@
270
270
  "admin.pages.MarketPlacePage.plugin.installed": "Installed",
271
271
  "admin.pages.MarketPlacePage.plugin.tooltip.madeByStrapi": "Made by Strapi",
272
272
  "admin.pages.MarketPlacePage.plugin.tooltip.verified": "Plugin verified by Strapi",
273
+ "admin.pages.MarketPlacePage.plugin.version": "Update your Strapi version: \"{strapiAppVersion}\" to: \"{versionRange}\"",
274
+ "admin.pages.MarketPlacePage.plugin.version.null": "Unable to verify compatibility with your Strapi version: \"{strapiAppVersion}\"",
273
275
  "admin.pages.MarketPlacePage.providers": "Providers",
274
276
  "admin.pages.MarketPlacePage.search.clear": "Clear the search",
275
277
  "admin.pages.MarketPlacePage.search.empty": "No result for \"{target}\"",
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[801],{19782:(k,M,n)=>{n.r(M),n.d(M,{default:()=>tn});var e=n(32735),i=n(88425),b=n(84968),P=n(33795),X=n.n(P);const C={i8:"4.4.3"};var $=n(775),p=n(5141),N=n(4409),D=n(74506),K=n(51968),F=n(88311),G=n.n(F),O=n(58107),T=n(19615),U=n(60216),r=n.n(U),d=n(5636),v=n(64410),E=n(54742),f=n(19192),R=n(9808),J=n(90662),Ne=n(20763),re=n(44526),Ge=n(94009),Ue=n.n(Ge);const Fe=(0,T.default)(f.Flex)`
1
+ "use strict";(self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[801],{19782:(k,M,n)=>{n.r(M),n.d(M,{default:()=>tn});var e=n(32735),i=n(88425),b=n(84968),P=n(33795),X=n.n(P);const C={i8:"4.4.4"};var $=n(775),p=n(5141),N=n(4409),D=n(74506),K=n(51968),F=n(88311),G=n.n(F),O=n(58107),T=n(19615),U=n(60216),r=n.n(U),d=n(5636),v=n(64410),E=n(54742),f=n(19192),R=n(9808),J=n(90662),Ne=n(20763),re=n(44526),Ge=n(94009),Ue=n.n(Ge);const Fe=(0,T.default)(f.Flex)`
2
2
  position: fixed;
3
3
  z-index: 4;
4
4
  inset: 0;
@@ -77,4 +77,4 @@
77
77
  ${[S.Typography]} {
78
78
  color: ${({theme:t})=>t.colors.neutral600};
79
79
  }
80
- `,vt=()=>{const[t,a]=(0,e.useState)(!1),{formatMessage:o}=(0,d.useIntl)(),{showTutorials:s}=(0,$.um)();if(!s)return null;const u=[{icon:"book",label:o({id:"global.documentation",defaultMessage:"Documentation"}),destination:"https://docs.strapi.io"},{icon:"file",label:o({id:"app.static.links.cheatsheet",defaultMessage:"CheatSheet"}),destination:"https://strapi-showcase.s3-us-west-2.amazonaws.com/CheatSheet.pdf"}],l=()=>{a(h=>!h)};return e.createElement(ft,{as:"aside"},e.createElement(ht,{id:"onboarding","aria-label":o({id:"app.components.Onboarding.help.button",defaultMessage:"Help button"}),onClick:l},!t&&e.createElement(ee.G,{icon:Pe.faQuestion}),t&&e.createElement(ee.G,{icon:Pe.faTimes})),t&&e.createElement(E.FocusTrap,{onEscape:l},e.createElement(Et,{background:"neutral0",hasRadius:!0,shadow:"tableShadow",paddingBottom:2,paddingTop:2},u.map(h=>e.createElement(yt,{key:h.label,rel:"nofollow noreferrer noopener",target:"_blank",href:h.destination},e.createElement(ee.G,{icon:h.icon}),e.createElement(S.Typography,null,h.label))))))},Tt=(0,e.lazy)(()=>Promise.all([n.e(8469),n.e(9420),n.e(4982),n.e(1669),n.e(8773),n.e(994)]).then(n.bind(n,95417))),Pt=(0,e.lazy)(()=>Promise.all([n.e(4800),n.e(3981)]).then(n.bind(n,44762))),Mt=(0,e.lazy)(()=>n.e(3677).then(n.bind(n,15415))),Ct=(0,e.lazy)(()=>Promise.all([n.e(8469),n.e(5516)]).then(n.bind(n,71561))),Me=(0,e.lazy)(()=>Promise.resolve().then(n.bind(n,53951))),Ot=(0,e.lazy)(()=>n.e(9501).then(n.bind(n,92336))),Rt=(0,e.lazy)(()=>n.e(9497).then(n.bind(n,9972))),Ce=(0,e.lazy)(()=>Promise.all([n.e(8469),n.e(9420),n.e(4982),n.e(8549),n.e(5895)]).then(n.bind(n,50020))),St=()=>{const{trackUsage:t}=(0,i.useTracking)(),a=(0,N.useDispatch)(),o=(0,N.useSelector)(s=>s.admin_app.status);(0,e.useEffect)(()=>{o==="init"&&(t("didAccessAuthenticatedAdministration"),a({type:gt.e}))},[o])},At=()=>{St();const{isLoading:t,generalSectionLinks:a,pluginsSectionLinks:o}=(0,$.H9)(),{menu:s}=(0,i.useStrapiApp)(),u=(0,e.useMemo)(()=>s.filter(l=>l.Component).map(({to:l,Component:h,exact:y})=>(0,Te.ot)(h,l,y)),[s]);return t?e.createElement(i.LoadingIndicatorPage,null):e.createElement(D.DndProvider,{backend:K.PD},e.createElement(mt,{sideNav:e.createElement(ct,{generalSectionLinks:a,pluginsSectionLinks:o})},e.createElement(e.Suspense,{fallback:e.createElement(i.LoadingIndicatorPage,null)},e.createElement(p.Switch,null,e.createElement(p.Route,{path:"/",component:Pt,exact:!0}),e.createElement(p.Route,{path:"/me",component:Rt,exact:!0}),e.createElement(p.Route,{path:"/content-manager",component:Tt}),u,e.createElement(p.Route,{path:"/settings/:settingId",component:Ce}),e.createElement(p.Route,{path:"/settings",component:Ce,exact:!0}),e.createElement(p.Route,{path:"/marketplace"},e.createElement(Ct,null)),e.createElement(p.Route,{path:"/list-plugins",exact:!0},e.createElement(Mt,null)),e.createElement(p.Route,{path:"/404",component:Me}),e.createElement(p.Route,{path:"/500",component:Ot}),e.createElement(p.Route,{path:"",component:Me}))),e.createElement(nt,null),e.createElement(vt,null)))};var It=Object.defineProperty,Oe=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Re=(t,a,o)=>a in t?It(t,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[a]=o,Dt=(t,a)=>{for(var o in a||(a={}))xt.call(a,o)&&Re(t,o,a[o]);if(Oe)for(var o of Oe(a))Lt.call(a,o)&&Re(t,o,a[o]);return t};const Bt=t=>({plugins:Object.keys(t).reduce((a,o)=>(a[o]=Dt({},t[o]),a),{})});var bt=n(3040),Nt=n.n(bt);const Se={plugins:null},Gt=(t=Se,a)=>(0,le.default)(t,o=>{switch(a.type){case"SET_PLUGIN_READY":{Nt()(o,["plugins",a.pluginId,"isReady"],!0);break}default:return o}}),Ut=()=>{const{plugins:t}=(0,i.useStrapiApp)(),[{plugins:a},o]=(0,e.useReducer)(Gt,Se,()=>Bt(t)),s=(0,e.useRef)(l=>{o({type:"SET_PLUGIN_READY",pluginId:l})});if(Object.keys(a).some(l=>a[l].isReady===!1)){const l=Object.keys(a).reduce((h,y)=>{const g=a[y].initializer;if(g){const c=a[y].pluginId;h.push(e.createElement(g,{key:c,setPlugin:s.current}))}return h},[]);return e.createElement(e.Fragment,null,l,e.createElement(i.LoadingIndicatorPage,null))}return e.createElement(At,null)};var Ae=n(17367);const Ft=()=>({type:Ae.l}),Wt=t=>({type:Ae.m,permissions:t}),Ie=({children:t,permissions:a,refetchPermissions:o})=>{const{allPermissions:s}=(0,N.useSelector)(l=>l.rbacProvider),u=(0,N.useDispatch)();return(0,e.useEffect)(()=>(u(Wt(a)),()=>{u(Ft())}),[a,u]),s?e.createElement(i.RBACProviderContext.Provider,{value:{allPermissions:s,refetchPermissions:o}},t):e.createElement(i.LoadingIndicatorPage,null)};Ie.propTypes={children:r().element.isRequired,permissions:r().array.isRequired,refetchPermissions:r().func.isRequired};const jt=Ie;var $t=n(43653),Kt=n.n($t),Vt=n(54770),te=n.n(Vt);const xe=(t,a)=>!te().valid(t)||!te().valid(a)?!1:te().lt(t,a);var ne=n(17247),Z=(t,a,o)=>new Promise((s,u)=>{var l=g=>{try{y(o.next(g))}catch(c){u(c)}},h=g=>{try{y(o.throw(g))}catch(c){u(c)}},y=g=>g.done?s(g.value):Promise.resolve(g.value).then(l,h);y((o=o.apply(t,a)).next())});const Le=C.i8,zt=!JSON.parse(localStorage.getItem("STRAPI_UPDATE_NOTIF")),Ht=t=>Z(void 0,null,function*(){try{const{data:{tag_name:a}}=yield Kt().get("https://api.github.com/repos/strapi/strapi/releases/latest");return xe(Le,a)&&zt&&t({type:"info",message:{id:"notification.version.update.message"},link:{url:`https://github.com/strapi/strapi/releases/tag/${a}`,label:{id:"global.see-more"}},blockTransition:!0,onClose:()=>localStorage.setItem("STRAPI_UPDATE_NOTIF",!0)}),a}catch(a){return Le}}),kt=()=>Z(void 0,null,function*(){try{const{data:t,headers:a}=yield ne.be.get("/admin/information");if(!a["content-type"].includes("application/json"))throw new Error("Not found");return t.data}catch(t){throw new Error(t)}}),Zt=()=>Z(void 0,null,function*(){try{const{data:t,headers:a}=yield ne.be.get("/admin/users/me/permissions");if(!a["content-type"].includes("application/json"))throw new Error("Not found");return t.data}catch(t){throw new Error(t)}}),Qt=()=>Z(void 0,null,function*(){try{const{data:{data:{roles:t}}}=yield ne.be.get("/admin/users/me");return t}catch(t){throw new Error(t)}});var Yt=Object.defineProperty,Xt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Be=(t,a,o)=>a in t?Yt(t,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[a]=o,_t=(t,a)=>{for(var o in a||(a={}))wt.call(a,o)&&Be(t,o,a[o]);if(De)for(var o of De(a))qt.call(a,o)&&Be(t,o,a[o]);return t},en=(t,a)=>Xt(t,Jt(a));const be=C.i8,tn=()=>{const{setGuidedTourVisibility:t}=(0,i.useGuidedTour)(),a=(0,i.useNotification)(),o=(0,e.useRef)(t),s=i.auth.getUserInfo(),u=X()(s,"username")||(0,Te.Pp)(s.firstname,s.lastname),[l,h]=(0,e.useState)(u),{showReleaseNotification:y}=(0,$.um)(),[{data:g,status:c},{data:I,isLoading:B},{data:V,status:z,refetch:j,isFetched:m,isFetching:x},{data:L}]=(0,b.useQueries)([{queryKey:"app-infos",queryFn:kt},{queryKey:"strapi-release",queryFn:()=>Ht(a),enabled:y,initialData:be},{queryKey:"admin-users-permission",queryFn:Zt,initialData:[]},{queryKey:"user-roles",queryFn:Qt}]),H=(0,e.useMemo)(()=>xe(be,I),[I]);(0,e.useEffect)(()=>{L&&L.find(({code:se})=>se==="strapi-super-admin")&&(g==null?void 0:g.autoReload)&&o.current(!0)},[L,g]);const ae=B||(x&&m||c==="loading"||z==="loading"),Y=(0,e.useMemo)(()=>en(_t({},g),{latestStrapiReleaseTag:I,setUserDisplayName:h,shouldUpdateStrapi:H,userDisplayName:l}),[g,I,H,l]);return ae?e.createElement(i.LoadingIndicatorPage,null):c==="error"?e.createElement("div",null,"error..."):e.createElement(i.AppInfosContext.Provider,{value:Y},e.createElement(jt,{permissions:V,refetchPermissions:j},e.createElement(Ut,null)))}},78024:(k,M,n)=>{n.d(M,{Z:()=>r});var e=n(32735),i=n(60216),b=n.n(i),P=n(88425),X=n.n(P),C=n(9808),$=n.n(C),p=n(23678),N=Object.defineProperty,D=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,G=(d,v,E)=>v in d?N(d,v,{enumerable:!0,configurable:!0,writable:!0,value:E}):d[v]=E,O=(d,v)=>{for(var E in v||(v={}))K.call(v,E)&&G(d,E,v[E]);if(D)for(var E of D(v))F.call(v,E)&&G(d,E,v[E]);return d},T=(d,v)=>{var E={};for(var f in d)K.call(d,f)&&v.indexOf(f)<0&&(E[f]=d[f]);if(d!=null&&D)for(var f of D(d))v.indexOf(f)<0&&F.call(d,f)&&(E[f]=d[f]);return E};const U=d=>{var v=d,{type:E}=v,f=T(v,["type"]);return e.createElement(C.Box,O({width:(0,P.pxToRem)(2),height:"100%",background:E===p.VM?"neutral300":"primary500",hasRadius:!0},f))};U.defaultProps={type:p.VM},U.propTypes={type:b().oneOf([p.lW,p.hx,p.VM])};const r=U},14317:(k,M,n)=>{n.d(M,{Z:()=>U});var e=n(32735),i=n(60216),b=n.n(i),P=n(88425),X=n.n(P),C=n(19192),$=n.n(C),p=n(95602),N=n.n(p),D=n(78752),K=n.n(D),F=n(88677),G=n.n(F),O=n(23678);const T=({type:r,number:d})=>r===O.hx?e.createElement(C.Flex,{background:"primary600",padding:2,borderRadius:"50%",width:(0,P.pxToRem)(30),height:(0,P.pxToRem)(30),justifyContent:"center"},e.createElement(D.Icon,{as:G(),"aria-hidden":!0,width:(0,P.pxToRem)(16),color:"neutral0"})):r===O.lW?e.createElement(C.Flex,{background:"primary600",padding:2,borderRadius:"50%",width:(0,P.pxToRem)(30),height:(0,P.pxToRem)(30),justifyContent:"center"},e.createElement(p.Typography,{fontWeight:"semiBold",textColor:"neutral0"},d)):e.createElement(C.Flex,{borderColor:"neutral500",borderWidth:"1px",borderStyle:"solid",padding:2,borderRadius:"50%",width:(0,P.pxToRem)(30),height:(0,P.pxToRem)(30),justifyContent:"center"},e.createElement(p.Typography,{fontWeight:"semiBold",textColor:"neutral600"},d));T.defaultProps={number:void 0,type:O.VM},T.propTypes={number:b().number,type:b().oneOf([O.lW,O.hx,O.VM])};const U=T},23678:(k,M,n)=>{n.d(M,{VM:()=>b,hx:()=>i,lW:()=>e});const e="isActive",i="isDone",b="isNotDone"},58107:(k,M,n)=>{n.d(M,{Z:()=>i});const i={contentTypeBuilder:{home:{title:{id:"app.components.GuidedTour.home.CTB.title",defaultMessage:"\u{1F9E0} Build the content structure"},cta:{title:{id:"app.components.GuidedTour.home.CTB.cta.title",defaultMessage:"Go to the Content type Builder"},type:"REDIRECT",target:"/plugins/content-type-builder"},trackingEvent:"didClickGuidedTourHomepageContentTypeBuilder"},create:{title:{id:"app.components.GuidedTour.CTB.create.title",defaultMessage:"\u{1F9E0} Create a first Collection type"},content:{id:"app.components.GuidedTour.CTB.create.content",defaultMessage:"<p>Collection types help you manage several entries, Single types are suitable to manage only one entry.</p> <p>Ex: For a Blog website, Articles would be a Collection type whereas a Homepage would be a Single type.</p>"},cta:{title:{id:"app.components.GuidedTour.CTB.create.cta.title",defaultMessage:"Build a Collection type"},type:"CLOSE"},trackingEvent:"didClickGuidedTourStep1CollectionType"},success:{title:{id:"app.components.GuidedTour.CTB.success.title",defaultMessage:"Step 1: Completed \u2705"},content:{id:"app.components.GuidedTour.CTB.success.content",defaultMessage:"<p>Good going!</p><b>\u26A1\uFE0F What would you like to share with the world?</b>"},cta:{title:{id:"app.components.GuidedTour.create-content",defaultMessage:"Create content"},type:"REDIRECT",target:"/content-manager"},trackingEvent:"didCreateGuidedTourCollectionType"}},contentManager:{home:{title:{id:"app.components.GuidedTour.home.CM.title",defaultMessage:"\u26A1\uFE0F What would you like to share with the world?"},cta:{title:{id:"app.components.GuidedTour.create-content",defaultMessage:"Create content"},type:"REDIRECT",target:"/content-manager"},trackingEvent:"didClickGuidedTourHomepageContentManager"},create:{title:{id:"app.components.GuidedTour.CM.create.title",defaultMessage:"\u26A1\uFE0F Create content"},content:{id:"app.components.GuidedTour.CM.create.content",defaultMessage:"<p>Create and manage all the content here in the Content Manager.</p><p>Ex: Taking the Blog website example further, one can write an Article, save and publish it as they like.</p><p>\u{1F4A1} Quick tip - Don't forget to hit publish on the content you create.</p>"},cta:{title:{id:"app.components.GuidedTour.create-content",defaultMessage:"Create content"},type:"CLOSE"},trackingEvent:"didClickGuidedTourStep2ContentManager"},success:{title:{id:"app.components.GuidedTour.CM.success.title",defaultMessage:"Step 2: Completed \u2705"},content:{id:"app.components.GuidedTour.CM.success.content",defaultMessage:"<p>Awesome, one last step to go!</p><b>\u{1F680} See content in action</b>"},cta:{title:{id:"app.components.GuidedTour.CM.success.cta.title",defaultMessage:"Test the API"},type:"REDIRECT",target:"/settings/api-tokens"},trackingEvent:"didCreateGuidedTourEntry"}},apiTokens:{home:{title:{id:"app.components.GuidedTour.apiTokens.create.title",defaultMessage:"\u{1F680} See content in action"},cta:{title:{id:"app.components.GuidedTour.home.apiTokens.cta.title",defaultMessage:"Test the API"},type:"REDIRECT",target:"/settings/api-tokens"},trackingEvent:"didClickGuidedTourHomepageApiTokens"},create:{title:{id:"app.components.GuidedTour.apiTokens.create.title",defaultMessage:"\u{1F680} See content in action"},content:{id:"app.components.GuidedTour.apiTokens.create.content",defaultMessage:"<p>Generate an authentication token here and retrieve the content you just created.</p>"},cta:{title:{id:"app.components.GuidedTour.apiTokens.create.cta.title",defaultMessage:"Generate an API Token"},type:"CLOSE"},trackingEvent:"didClickGuidedTourStep3ApiTokens"},success:{title:{id:"app.components.GuidedTour.apiTokens.success.title",defaultMessage:"Step 3: Completed \u2705"},content:{id:"app.components.GuidedTour.apiTokens.success.content",defaultMessage:"<p>See content in action by making an HTTP request:</p><ul><li><p>To this URL: <light>https://'<'YOUR_DOMAIN'>'/api/'<'YOUR_CT'>'</light></p></li><li><p>With the header: <light>Authorization: bearer '<'YOUR_API_TOKEN'>'</light></p></li></ul><p>For more ways to interact with content, see the <documentationLink>documentation</documentationLink>.</p>"},trackingEvent:"didGenerateGuidedTourApiTokens"}}}}}]);
80
+ `,vt=()=>{const[t,a]=(0,e.useState)(!1),{formatMessage:o}=(0,d.useIntl)(),{showTutorials:s}=(0,$.um)();if(!s)return null;const u=[{icon:"book",label:o({id:"global.documentation",defaultMessage:"Documentation"}),destination:"https://docs.strapi.io"},{icon:"file",label:o({id:"app.static.links.cheatsheet",defaultMessage:"CheatSheet"}),destination:"https://strapi-showcase.s3-us-west-2.amazonaws.com/CheatSheet.pdf"}],l=()=>{a(h=>!h)};return e.createElement(ft,{as:"aside"},e.createElement(ht,{id:"onboarding","aria-label":o({id:"app.components.Onboarding.help.button",defaultMessage:"Help button"}),onClick:l},!t&&e.createElement(ee.G,{icon:Pe.faQuestion}),t&&e.createElement(ee.G,{icon:Pe.faTimes})),t&&e.createElement(E.FocusTrap,{onEscape:l},e.createElement(Et,{background:"neutral0",hasRadius:!0,shadow:"tableShadow",paddingBottom:2,paddingTop:2},u.map(h=>e.createElement(yt,{key:h.label,rel:"nofollow noreferrer noopener",target:"_blank",href:h.destination},e.createElement(ee.G,{icon:h.icon}),e.createElement(S.Typography,null,h.label))))))},Tt=(0,e.lazy)(()=>Promise.all([n.e(8469),n.e(9420),n.e(4982),n.e(1669),n.e(8773),n.e(994)]).then(n.bind(n,95417))),Pt=(0,e.lazy)(()=>Promise.all([n.e(4800),n.e(3981)]).then(n.bind(n,44762))),Mt=(0,e.lazy)(()=>n.e(3677).then(n.bind(n,15415))),Ct=(0,e.lazy)(()=>Promise.all([n.e(8469),n.e(5516)]).then(n.bind(n,4407))),Me=(0,e.lazy)(()=>Promise.resolve().then(n.bind(n,53951))),Ot=(0,e.lazy)(()=>n.e(9501).then(n.bind(n,92336))),Rt=(0,e.lazy)(()=>n.e(9497).then(n.bind(n,9972))),Ce=(0,e.lazy)(()=>Promise.all([n.e(8469),n.e(9420),n.e(4982),n.e(8549),n.e(5895)]).then(n.bind(n,50020))),St=()=>{const{trackUsage:t}=(0,i.useTracking)(),a=(0,N.useDispatch)(),o=(0,N.useSelector)(s=>s.admin_app.status);(0,e.useEffect)(()=>{o==="init"&&(t("didAccessAuthenticatedAdministration"),a({type:gt.e}))},[o])},At=()=>{St();const{isLoading:t,generalSectionLinks:a,pluginsSectionLinks:o}=(0,$.H9)(),{menu:s}=(0,i.useStrapiApp)(),u=(0,e.useMemo)(()=>s.filter(l=>l.Component).map(({to:l,Component:h,exact:y})=>(0,Te.ot)(h,l,y)),[s]);return t?e.createElement(i.LoadingIndicatorPage,null):e.createElement(D.DndProvider,{backend:K.PD},e.createElement(mt,{sideNav:e.createElement(ct,{generalSectionLinks:a,pluginsSectionLinks:o})},e.createElement(e.Suspense,{fallback:e.createElement(i.LoadingIndicatorPage,null)},e.createElement(p.Switch,null,e.createElement(p.Route,{path:"/",component:Pt,exact:!0}),e.createElement(p.Route,{path:"/me",component:Rt,exact:!0}),e.createElement(p.Route,{path:"/content-manager",component:Tt}),u,e.createElement(p.Route,{path:"/settings/:settingId",component:Ce}),e.createElement(p.Route,{path:"/settings",component:Ce,exact:!0}),e.createElement(p.Route,{path:"/marketplace"},e.createElement(Ct,null)),e.createElement(p.Route,{path:"/list-plugins",exact:!0},e.createElement(Mt,null)),e.createElement(p.Route,{path:"/404",component:Me}),e.createElement(p.Route,{path:"/500",component:Ot}),e.createElement(p.Route,{path:"",component:Me}))),e.createElement(nt,null),e.createElement(vt,null)))};var It=Object.defineProperty,Oe=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,Re=(t,a,o)=>a in t?It(t,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[a]=o,Dt=(t,a)=>{for(var o in a||(a={}))xt.call(a,o)&&Re(t,o,a[o]);if(Oe)for(var o of Oe(a))Lt.call(a,o)&&Re(t,o,a[o]);return t};const Bt=t=>({plugins:Object.keys(t).reduce((a,o)=>(a[o]=Dt({},t[o]),a),{})});var bt=n(3040),Nt=n.n(bt);const Se={plugins:null},Gt=(t=Se,a)=>(0,le.default)(t,o=>{switch(a.type){case"SET_PLUGIN_READY":{Nt()(o,["plugins",a.pluginId,"isReady"],!0);break}default:return o}}),Ut=()=>{const{plugins:t}=(0,i.useStrapiApp)(),[{plugins:a},o]=(0,e.useReducer)(Gt,Se,()=>Bt(t)),s=(0,e.useRef)(l=>{o({type:"SET_PLUGIN_READY",pluginId:l})});if(Object.keys(a).some(l=>a[l].isReady===!1)){const l=Object.keys(a).reduce((h,y)=>{const g=a[y].initializer;if(g){const c=a[y].pluginId;h.push(e.createElement(g,{key:c,setPlugin:s.current}))}return h},[]);return e.createElement(e.Fragment,null,l,e.createElement(i.LoadingIndicatorPage,null))}return e.createElement(At,null)};var Ae=n(17367);const Ft=()=>({type:Ae.l}),Wt=t=>({type:Ae.m,permissions:t}),Ie=({children:t,permissions:a,refetchPermissions:o})=>{const{allPermissions:s}=(0,N.useSelector)(l=>l.rbacProvider),u=(0,N.useDispatch)();return(0,e.useEffect)(()=>(u(Wt(a)),()=>{u(Ft())}),[a,u]),s?e.createElement(i.RBACProviderContext.Provider,{value:{allPermissions:s,refetchPermissions:o}},t):e.createElement(i.LoadingIndicatorPage,null)};Ie.propTypes={children:r().element.isRequired,permissions:r().array.isRequired,refetchPermissions:r().func.isRequired};const jt=Ie;var $t=n(43653),Kt=n.n($t),Vt=n(54770),te=n.n(Vt);const xe=(t,a)=>!te().valid(t)||!te().valid(a)?!1:te().lt(t,a);var ne=n(17247),Z=(t,a,o)=>new Promise((s,u)=>{var l=g=>{try{y(o.next(g))}catch(c){u(c)}},h=g=>{try{y(o.throw(g))}catch(c){u(c)}},y=g=>g.done?s(g.value):Promise.resolve(g.value).then(l,h);y((o=o.apply(t,a)).next())});const Le=C.i8,zt=!JSON.parse(localStorage.getItem("STRAPI_UPDATE_NOTIF")),Ht=t=>Z(void 0,null,function*(){try{const{data:{tag_name:a}}=yield Kt().get("https://api.github.com/repos/strapi/strapi/releases/latest");return xe(Le,a)&&zt&&t({type:"info",message:{id:"notification.version.update.message"},link:{url:`https://github.com/strapi/strapi/releases/tag/${a}`,label:{id:"global.see-more"}},blockTransition:!0,onClose:()=>localStorage.setItem("STRAPI_UPDATE_NOTIF",!0)}),a}catch(a){return Le}}),kt=()=>Z(void 0,null,function*(){try{const{data:t,headers:a}=yield ne.be.get("/admin/information");if(!a["content-type"].includes("application/json"))throw new Error("Not found");return t.data}catch(t){throw new Error(t)}}),Zt=()=>Z(void 0,null,function*(){try{const{data:t,headers:a}=yield ne.be.get("/admin/users/me/permissions");if(!a["content-type"].includes("application/json"))throw new Error("Not found");return t.data}catch(t){throw new Error(t)}}),Qt=()=>Z(void 0,null,function*(){try{const{data:{data:{roles:t}}}=yield ne.be.get("/admin/users/me");return t}catch(t){throw new Error(t)}});var Yt=Object.defineProperty,Xt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,Be=(t,a,o)=>a in t?Yt(t,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[a]=o,_t=(t,a)=>{for(var o in a||(a={}))wt.call(a,o)&&Be(t,o,a[o]);if(De)for(var o of De(a))qt.call(a,o)&&Be(t,o,a[o]);return t},en=(t,a)=>Xt(t,Jt(a));const be=C.i8,tn=()=>{const{setGuidedTourVisibility:t}=(0,i.useGuidedTour)(),a=(0,i.useNotification)(),o=(0,e.useRef)(t),s=i.auth.getUserInfo(),u=X()(s,"username")||(0,Te.Pp)(s.firstname,s.lastname),[l,h]=(0,e.useState)(u),{showReleaseNotification:y}=(0,$.um)(),[{data:g,status:c},{data:I,isLoading:B},{data:V,status:z,refetch:j,isFetched:m,isFetching:x},{data:L}]=(0,b.useQueries)([{queryKey:"app-infos",queryFn:kt},{queryKey:"strapi-release",queryFn:()=>Ht(a),enabled:y,initialData:be},{queryKey:"admin-users-permission",queryFn:Zt,initialData:[]},{queryKey:"user-roles",queryFn:Qt}]),H=(0,e.useMemo)(()=>xe(be,I),[I]);(0,e.useEffect)(()=>{L&&L.find(({code:se})=>se==="strapi-super-admin")&&(g==null?void 0:g.autoReload)&&o.current(!0)},[L,g]);const ae=B||(x&&m||c==="loading"||z==="loading"),Y=(0,e.useMemo)(()=>en(_t({},g),{latestStrapiReleaseTag:I,setUserDisplayName:h,shouldUpdateStrapi:H,userDisplayName:l}),[g,I,H,l]);return ae?e.createElement(i.LoadingIndicatorPage,null):c==="error"?e.createElement("div",null,"error..."):e.createElement(i.AppInfosContext.Provider,{value:Y},e.createElement(jt,{permissions:V,refetchPermissions:j},e.createElement(Ut,null)))}},78024:(k,M,n)=>{n.d(M,{Z:()=>r});var e=n(32735),i=n(60216),b=n.n(i),P=n(88425),X=n.n(P),C=n(9808),$=n.n(C),p=n(23678),N=Object.defineProperty,D=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,G=(d,v,E)=>v in d?N(d,v,{enumerable:!0,configurable:!0,writable:!0,value:E}):d[v]=E,O=(d,v)=>{for(var E in v||(v={}))K.call(v,E)&&G(d,E,v[E]);if(D)for(var E of D(v))F.call(v,E)&&G(d,E,v[E]);return d},T=(d,v)=>{var E={};for(var f in d)K.call(d,f)&&v.indexOf(f)<0&&(E[f]=d[f]);if(d!=null&&D)for(var f of D(d))v.indexOf(f)<0&&F.call(d,f)&&(E[f]=d[f]);return E};const U=d=>{var v=d,{type:E}=v,f=T(v,["type"]);return e.createElement(C.Box,O({width:(0,P.pxToRem)(2),height:"100%",background:E===p.VM?"neutral300":"primary500",hasRadius:!0},f))};U.defaultProps={type:p.VM},U.propTypes={type:b().oneOf([p.lW,p.hx,p.VM])};const r=U},14317:(k,M,n)=>{n.d(M,{Z:()=>U});var e=n(32735),i=n(60216),b=n.n(i),P=n(88425),X=n.n(P),C=n(19192),$=n.n(C),p=n(95602),N=n.n(p),D=n(78752),K=n.n(D),F=n(88677),G=n.n(F),O=n(23678);const T=({type:r,number:d})=>r===O.hx?e.createElement(C.Flex,{background:"primary600",padding:2,borderRadius:"50%",width:(0,P.pxToRem)(30),height:(0,P.pxToRem)(30),justifyContent:"center"},e.createElement(D.Icon,{as:G(),"aria-hidden":!0,width:(0,P.pxToRem)(16),color:"neutral0"})):r===O.lW?e.createElement(C.Flex,{background:"primary600",padding:2,borderRadius:"50%",width:(0,P.pxToRem)(30),height:(0,P.pxToRem)(30),justifyContent:"center"},e.createElement(p.Typography,{fontWeight:"semiBold",textColor:"neutral0"},d)):e.createElement(C.Flex,{borderColor:"neutral500",borderWidth:"1px",borderStyle:"solid",padding:2,borderRadius:"50%",width:(0,P.pxToRem)(30),height:(0,P.pxToRem)(30),justifyContent:"center"},e.createElement(p.Typography,{fontWeight:"semiBold",textColor:"neutral600"},d));T.defaultProps={number:void 0,type:O.VM},T.propTypes={number:b().number,type:b().oneOf([O.lW,O.hx,O.VM])};const U=T},23678:(k,M,n)=>{n.d(M,{VM:()=>b,hx:()=>i,lW:()=>e});const e="isActive",i="isDone",b="isNotDone"},58107:(k,M,n)=>{n.d(M,{Z:()=>i});const i={contentTypeBuilder:{home:{title:{id:"app.components.GuidedTour.home.CTB.title",defaultMessage:"\u{1F9E0} Build the content structure"},cta:{title:{id:"app.components.GuidedTour.home.CTB.cta.title",defaultMessage:"Go to the Content type Builder"},type:"REDIRECT",target:"/plugins/content-type-builder"},trackingEvent:"didClickGuidedTourHomepageContentTypeBuilder"},create:{title:{id:"app.components.GuidedTour.CTB.create.title",defaultMessage:"\u{1F9E0} Create a first Collection type"},content:{id:"app.components.GuidedTour.CTB.create.content",defaultMessage:"<p>Collection types help you manage several entries, Single types are suitable to manage only one entry.</p> <p>Ex: For a Blog website, Articles would be a Collection type whereas a Homepage would be a Single type.</p>"},cta:{title:{id:"app.components.GuidedTour.CTB.create.cta.title",defaultMessage:"Build a Collection type"},type:"CLOSE"},trackingEvent:"didClickGuidedTourStep1CollectionType"},success:{title:{id:"app.components.GuidedTour.CTB.success.title",defaultMessage:"Step 1: Completed \u2705"},content:{id:"app.components.GuidedTour.CTB.success.content",defaultMessage:"<p>Good going!</p><b>\u26A1\uFE0F What would you like to share with the world?</b>"},cta:{title:{id:"app.components.GuidedTour.create-content",defaultMessage:"Create content"},type:"REDIRECT",target:"/content-manager"},trackingEvent:"didCreateGuidedTourCollectionType"}},contentManager:{home:{title:{id:"app.components.GuidedTour.home.CM.title",defaultMessage:"\u26A1\uFE0F What would you like to share with the world?"},cta:{title:{id:"app.components.GuidedTour.create-content",defaultMessage:"Create content"},type:"REDIRECT",target:"/content-manager"},trackingEvent:"didClickGuidedTourHomepageContentManager"},create:{title:{id:"app.components.GuidedTour.CM.create.title",defaultMessage:"\u26A1\uFE0F Create content"},content:{id:"app.components.GuidedTour.CM.create.content",defaultMessage:"<p>Create and manage all the content here in the Content Manager.</p><p>Ex: Taking the Blog website example further, one can write an Article, save and publish it as they like.</p><p>\u{1F4A1} Quick tip - Don't forget to hit publish on the content you create.</p>"},cta:{title:{id:"app.components.GuidedTour.create-content",defaultMessage:"Create content"},type:"CLOSE"},trackingEvent:"didClickGuidedTourStep2ContentManager"},success:{title:{id:"app.components.GuidedTour.CM.success.title",defaultMessage:"Step 2: Completed \u2705"},content:{id:"app.components.GuidedTour.CM.success.content",defaultMessage:"<p>Awesome, one last step to go!</p><b>\u{1F680} See content in action</b>"},cta:{title:{id:"app.components.GuidedTour.CM.success.cta.title",defaultMessage:"Test the API"},type:"REDIRECT",target:"/settings/api-tokens"},trackingEvent:"didCreateGuidedTourEntry"}},apiTokens:{home:{title:{id:"app.components.GuidedTour.apiTokens.create.title",defaultMessage:"\u{1F680} See content in action"},cta:{title:{id:"app.components.GuidedTour.home.apiTokens.cta.title",defaultMessage:"Test the API"},type:"REDIRECT",target:"/settings/api-tokens"},trackingEvent:"didClickGuidedTourHomepageApiTokens"},create:{title:{id:"app.components.GuidedTour.apiTokens.create.title",defaultMessage:"\u{1F680} See content in action"},content:{id:"app.components.GuidedTour.apiTokens.create.content",defaultMessage:"<p>Generate an authentication token here and retrieve the content you just created.</p>"},cta:{title:{id:"app.components.GuidedTour.apiTokens.create.cta.title",defaultMessage:"Generate an API Token"},type:"CLOSE"},trackingEvent:"didClickGuidedTourStep3ApiTokens"},success:{title:{id:"app.components.GuidedTour.apiTokens.success.title",defaultMessage:"Step 3: Completed \u2705"},content:{id:"app.components.GuidedTour.apiTokens.success.content",defaultMessage:"<p>See content in action by making an HTTP request:</p><ul><li><p>To this URL: <light>https://'<'YOUR_DOMAIN'>'/api/'<'YOUR_CT'>'</light></p></li><li><p>With the header: <light>Authorization: bearer '<'YOUR_API_TOKEN'>'</light></p></li></ul><p>For more ways to interact with content, see the <documentationLink>documentation</documentationLink>.</p>"},trackingEvent:"didGenerateGuidedTourApiTokens"}}}}}]);
@@ -39,7 +39,7 @@
39
39
  > path:nth-child(6) {
40
40
  fill: #e31b23;
41
41
  }
42
- `,ve=[{name:"Github",link:"https://github.com/strapi/strapi/",icon:e.createElement(oe(),{fill:"#7289DA"}),alt:"github"},{name:"Discord",link:"https://slack.strapi.io/",icon:e.createElement(fe,null),alt:"discord"},{name:"Reddit",link:"https://www.reddit.com/r/Strapi/",icon:e.createElement(he,null),alt:"reddit"},{name:"Twitter",link:"https://twitter.com/strapijs",icon:e.createElement(ye,null),alt:"twitter"},{name:"Forum",link:"https://forum.strapi.io",icon:e.createElement(Ee,null),alt:"forum"},{name:"Blog",link:"https://strapi.io/blog?utm_source=referral&utm_medium=admin&utm_campaign=career%20page",icon:e.createElement(R,null),alt:"blog"},{name:"We are hiring!",link:"https://strapi.io/careers?utm_source=referral&utm_medium=admin&utm_campaign=blog",icon:e.createElement(R,null),alt:"career"}],Se=(0,c.default)(ee.LinkButton)`
42
+ `,ve=[{name:"Github",link:"https://github.com/strapi/strapi/",icon:e.createElement(oe(),{fill:"#7289DA"}),alt:"github"},{name:"Discord",link:"https://discord.strapi.io/",icon:e.createElement(fe,null),alt:"discord"},{name:"Reddit",link:"https://www.reddit.com/r/Strapi/",icon:e.createElement(he,null),alt:"reddit"},{name:"Twitter",link:"https://twitter.com/strapijs",icon:e.createElement(ye,null),alt:"twitter"},{name:"Forum",link:"https://forum.strapi.io",icon:e.createElement(Ee,null),alt:"forum"},{name:"Blog",link:"https://strapi.io/blog?utm_source=referral&utm_medium=admin&utm_campaign=career%20page",icon:e.createElement(R,null),alt:"blog"},{name:"We are hiring!",link:"https://strapi.io/careers?utm_source=referral&utm_medium=admin&utm_campaign=blog",icon:e.createElement(R,null),alt:"career"}],Se=(0,c.default)(ee.LinkButton)`
43
43
  display: flex;
44
44
  align-items: center;
45
45
  border: none;