@strapi/admin 4.11.0-beta.0 → 4.11.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin/src/components/Providers/index.js +32 -32
- package/admin/src/components/Theme/index.js +5 -3
- package/admin/src/content-manager/components/Inputs/index.js +18 -11
- package/admin/src/content-manager/components/Inputs/utils/index.js +0 -1
- package/admin/src/translations/ar.json +684 -1
- package/admin/src/translations/en.json +1 -0
- package/build/456.9b85d4c6.chunk.js +39 -0
- package/build/{Admin-authenticatedApp.65172a0c.chunk.js → Admin-authenticatedApp.990df65d.chunk.js} +2 -2
- package/build/{Admin_marketplace.717bd7ca.chunk.js → Admin_marketplace.1436fc2b.chunk.js} +1 -1
- package/build/Admin_pluginsPage.e1afd5ed.chunk.js +6 -0
- package/build/{Admin_profilePage.a8fa3a56.chunk.js → Admin_profilePage.75bc083a.chunk.js} +1 -1
- package/build/{admin-app.9c79b484.chunk.js → admin-app.8b102fe2.chunk.js} +8 -8
- package/build/ar-json.f530bc3f.chunk.js +1 -0
- package/build/{content-manager.bf060d8e.chunk.js → content-manager.89099707.chunk.js} +48 -48
- package/build/{email-settings-page.dba83275.chunk.js → email-settings-page.4368689f.chunk.js} +1 -1
- package/build/{en-json.19e9ff9b.chunk.js → en-json.0f5cc115.chunk.js} +1 -1
- package/build/i18n-settings-page.7988d872.chunk.js +114 -0
- package/build/index.html +1 -1
- package/build/main.5a232c3d.js +2630 -0
- package/build/{runtime~main.96d92f16.js → runtime~main.55d43bd7.js} +2 -2
- package/build/users-advanced-settings-page.2cfb5d24.chunk.js +9 -0
- package/build/users-email-settings-page.bd6c774a.chunk.js +24 -0
- package/build/users-providers-settings-page.528f0036.chunk.js +29 -0
- package/build/{users-roles-settings-page.2549794b.chunk.js → users-roles-settings-page.c773086b.chunk.js} +1 -1
- package/build/{webhook-list-page.e2fca9f8.chunk.js → webhook-list-page.b0f5a02c.chunk.js} +1 -1
- package/package.json +15 -15
- package/admin/src/content-manager/components/Inputs/utils/getStep.js +0 -13
- package/build/3816.60f858cf.chunk.js +0 -211
- package/build/Admin_pluginsPage.7df6b5a9.chunk.js +0 -6
- package/build/ar-json.39e54aba.chunk.js +0 -1
- package/build/i18n-settings-page.55628f74.chunk.js +0 -114
- package/build/main.576a9d22.js +0 -2630
- package/build/users-advanced-settings-page.4f49ca57.chunk.js +0 -9
- package/build/users-email-settings-page.d2429d0a.chunk.js +0 -24
- package/build/users-providers-settings-page.50c5ba27.chunk.js +0 -29
|
@@ -48,29 +48,29 @@ const Providers = ({
|
|
|
48
48
|
themes,
|
|
49
49
|
}) => {
|
|
50
50
|
return (
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<StrapiAppProvider
|
|
63
|
-
getPlugin={getPlugin}
|
|
64
|
-
menu={menu}
|
|
65
|
-
plugins={plugins}
|
|
66
|
-
runHookParallel={runHookParallel}
|
|
67
|
-
runHookWaterfall={runHookWaterfall}
|
|
68
|
-
runHookSeries={runHookSeries}
|
|
69
|
-
settings={settings}
|
|
51
|
+
<LanguageProvider messages={messages} localeNames={localeNames}>
|
|
52
|
+
<ThemeToggleProvider themes={themes}>
|
|
53
|
+
<Theme>
|
|
54
|
+
<QueryClientProvider client={queryClient}>
|
|
55
|
+
<Provider store={store}>
|
|
56
|
+
<AdminContext.Provider value={{ getAdminInjectedComponents }}>
|
|
57
|
+
<ConfigurationsProvider
|
|
58
|
+
authLogo={authLogo}
|
|
59
|
+
menuLogo={menuLogo}
|
|
60
|
+
showReleaseNotification={showReleaseNotification}
|
|
61
|
+
showTutorials={showTutorials}
|
|
70
62
|
>
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
<StrapiAppProvider
|
|
64
|
+
getPlugin={getPlugin}
|
|
65
|
+
menu={menu}
|
|
66
|
+
plugins={plugins}
|
|
67
|
+
runHookParallel={runHookParallel}
|
|
68
|
+
runHookWaterfall={runHookWaterfall}
|
|
69
|
+
runHookSeries={runHookSeries}
|
|
70
|
+
settings={settings}
|
|
71
|
+
>
|
|
72
|
+
<LibraryProvider components={components} fields={fields}>
|
|
73
|
+
<CustomFieldsProvider customFields={customFields}>
|
|
74
74
|
<AutoReloadOverlayBlockerProvider>
|
|
75
75
|
<OverlayBlockerProvider>
|
|
76
76
|
<GuidedTour>
|
|
@@ -78,16 +78,16 @@ const Providers = ({
|
|
|
78
78
|
</GuidedTour>
|
|
79
79
|
</OverlayBlockerProvider>
|
|
80
80
|
</AutoReloadOverlayBlockerProvider>
|
|
81
|
-
</
|
|
82
|
-
</
|
|
83
|
-
</
|
|
84
|
-
</
|
|
85
|
-
</
|
|
86
|
-
</
|
|
87
|
-
</
|
|
88
|
-
</
|
|
89
|
-
</
|
|
90
|
-
</
|
|
81
|
+
</CustomFieldsProvider>
|
|
82
|
+
</LibraryProvider>
|
|
83
|
+
</StrapiAppProvider>
|
|
84
|
+
</ConfigurationsProvider>
|
|
85
|
+
</AdminContext.Provider>
|
|
86
|
+
</Provider>
|
|
87
|
+
</QueryClientProvider>
|
|
88
|
+
</Theme>
|
|
89
|
+
</ThemeToggleProvider>
|
|
90
|
+
</LanguageProvider>
|
|
91
91
|
);
|
|
92
92
|
};
|
|
93
93
|
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DesignSystemProvider } from '@strapi/design-system';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import { useIntl } from 'react-intl';
|
|
4
5
|
import { useThemeToggle } from '../../hooks';
|
|
5
6
|
import GlobalStyle from '../GlobalStyle';
|
|
6
7
|
|
|
7
8
|
const Theme = ({ children }) => {
|
|
8
9
|
const { currentTheme, themes } = useThemeToggle();
|
|
10
|
+
const { locale } = useIntl();
|
|
9
11
|
|
|
10
12
|
return (
|
|
11
|
-
<
|
|
13
|
+
<DesignSystemProvider locale={locale} theme={themes[currentTheme] || themes.light}>
|
|
12
14
|
{children}
|
|
13
15
|
<GlobalStyle />
|
|
14
|
-
</
|
|
16
|
+
</DesignSystemProvider>
|
|
15
17
|
);
|
|
16
18
|
};
|
|
17
19
|
|
|
@@ -12,14 +12,7 @@ import Wysiwyg from '../Wysiwyg';
|
|
|
12
12
|
import InputUID from '../InputUID';
|
|
13
13
|
import { RelationInputDataManager } from '../RelationInputDataManager';
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
connect,
|
|
17
|
-
generateOptions,
|
|
18
|
-
getInputType,
|
|
19
|
-
getStep,
|
|
20
|
-
select,
|
|
21
|
-
VALIDATIONS_TO_OMIT,
|
|
22
|
-
} from './utils';
|
|
15
|
+
import { connect, generateOptions, getInputType, select, VALIDATIONS_TO_OMIT } from './utils';
|
|
23
16
|
|
|
24
17
|
function Inputs({
|
|
25
18
|
allowedFields,
|
|
@@ -93,9 +86,7 @@ function Inputs({
|
|
|
93
86
|
return value;
|
|
94
87
|
}, [type, value]);
|
|
95
88
|
|
|
96
|
-
const step =
|
|
97
|
-
return getStep(type);
|
|
98
|
-
}, [type]);
|
|
89
|
+
const step = getStep(type);
|
|
99
90
|
|
|
100
91
|
const isUserAllowedToEditField = useMemo(() => {
|
|
101
92
|
const joinedName = fieldName.join('.');
|
|
@@ -184,6 +175,9 @@ function Inputs({
|
|
|
184
175
|
|
|
185
176
|
let minutes;
|
|
186
177
|
|
|
178
|
+
/**
|
|
179
|
+
* Wtf is this?
|
|
180
|
+
*/
|
|
187
181
|
if (inputType === 'datetime') {
|
|
188
182
|
minutes = parseInt(inputValue.substr(14, 2), 10);
|
|
189
183
|
} else if (inputType === 'time') {
|
|
@@ -316,6 +310,19 @@ Inputs.propTypes = {
|
|
|
316
310
|
customFieldInputs: PropTypes.object,
|
|
317
311
|
};
|
|
318
312
|
|
|
313
|
+
const getStep = (type) => {
|
|
314
|
+
switch (type) {
|
|
315
|
+
case 'float':
|
|
316
|
+
case 'decimal':
|
|
317
|
+
return 0.01;
|
|
318
|
+
case 'time':
|
|
319
|
+
case 'datetime':
|
|
320
|
+
return 15;
|
|
321
|
+
default:
|
|
322
|
+
return 1;
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
|
|
319
326
|
const Memoized = memo(Inputs, isEqual);
|
|
320
327
|
|
|
321
328
|
export default connect(Memoized, select);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as connect } from './connect';
|
|
2
2
|
export { default as generateOptions } from './generateOptions';
|
|
3
3
|
export { default as getInputType } from './getInputType';
|
|
4
|
-
export { default as getStep } from './getStep';
|
|
5
4
|
export { default as select } from './select';
|
|
6
5
|
export { default as VALIDATIONS_TO_OMIT } from './VALIDATIONS_TO_OMIT';
|