node_modules ignore

This commit is contained in:
oier committed 2025-05-08 23:43:47 +02:00
1 parent e19d52f172
commit 4574544c9f
65041 files changed
+10593536

No files matched your search

+107
View File
@@ -0,0 +1,107 @@
'use strict';
var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var strapiAdmin = require('@strapi/admin/strapi-admin');
var designSystem = require('@strapi/design-system');
var symbols = require('@strapi/icons/symbols');
var reactIntl = require('react-intl');
var CreateLocale = require('../components/CreateLocale.js');
var LocaleTable = require('../components/LocaleTable.js');
var constants = require('../constants.js');
var locales = require('../services/locales.js');
var getTranslation = require('../utils/getTranslation.js');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
const SettingsPage = ()=>{
const { formatMessage } = reactIntl.useIntl();
const { toggleNotification } = strapiAdmin.useNotification();
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
const { data: locales$1, isLoading: isLoadingLocales, error } = locales.useGetLocalesQuery();
const { isLoading: isLoadingRBAC, allowedActions: { canUpdate, canCreate, canDelete } } = strapiAdmin.useRBAC(constants.PERMISSIONS);
React__namespace.useEffect(()=>{
if (error) {
toggleNotification({
type: 'danger',
message: formatAPIError(error)
});
}
}, [
error,
formatAPIError,
toggleNotification
]);
const isLoading = isLoadingLocales || isLoadingRBAC;
if (isLoading) {
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
}
if (error || !Array.isArray(locales$1)) {
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
}
return /*#__PURE__*/ jsxRuntime.jsxs(strapiAdmin.Page.Main, {
tabIndex: -1,
children: [
/*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Layouts.Header, {
primaryAction: /*#__PURE__*/ jsxRuntime.jsx(CreateLocale.CreateLocale, {
disabled: !canCreate
}),
title: formatMessage({
id: getTranslation.getTranslation('plugin.name'),
defaultMessage: 'Internationalization'
}),
subtitle: formatMessage({
id: getTranslation.getTranslation('Settings.list.description'),
defaultMessage: 'Configure the settings'
})
}),
/*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Layouts.Content, {
children: locales$1.length > 0 ? /*#__PURE__*/ jsxRuntime.jsx(LocaleTable.LocaleTable, {
locales: locales$1,
canDelete: canDelete,
canUpdate: canUpdate
}) : /*#__PURE__*/ jsxRuntime.jsx(designSystem.EmptyStateLayout, {
icon: /*#__PURE__*/ jsxRuntime.jsx(symbols.EmptyDocuments, {
width: undefined,
height: undefined
}),
content: formatMessage({
id: getTranslation.getTranslation('Settings.list.empty.title'),
defaultMessage: 'There are no locales'
}),
action: /*#__PURE__*/ jsxRuntime.jsx(CreateLocale.CreateLocale, {
disabled: !canCreate,
variant: "secondary"
})
})
})
]
});
};
const ProtectedSettingsPage = ()=>{
return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Protect, {
permissions: constants.PERMISSIONS.read,
children: /*#__PURE__*/ jsxRuntime.jsx(SettingsPage, {})
});
};
exports.ProtectedSettingsPage = ProtectedSettingsPage;
exports.SettingsPage = SettingsPage;
//# sourceMappingURL=SettingsPage.js.map
@@ -0,0 +1 @@
{"version":3,"file":"SettingsPage.js","sources":["../../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Page,\n useAPIErrorHandler,\n useNotification,\n useRBAC,\n Layouts,\n} from '@strapi/admin/strapi-admin';\nimport { EmptyStateLayout } from '@strapi/design-system';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\n\nimport { CreateLocale } from '../components/CreateLocale';\nimport { LocaleTable } from '../components/LocaleTable';\nimport { PERMISSIONS } from '../constants';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst SettingsPage = () => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();\n const {\n isLoading: isLoadingRBAC,\n allowedActions: { canUpdate, canCreate, canDelete },\n } = useRBAC(PERMISSIONS);\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const isLoading = isLoadingLocales || isLoadingRBAC;\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !Array.isArray(locales)) {\n return <Page.Error />;\n }\n\n return (\n <Page.Main tabIndex={-1}>\n <Layouts.Header\n primaryAction={<CreateLocale disabled={!canCreate} />}\n title={formatMessage({\n id: getTranslation('plugin.name'),\n defaultMessage: 'Internationalization',\n })}\n subtitle={formatMessage({\n id: getTranslation('Settings.list.description'),\n defaultMessage: 'Configure the settings',\n })}\n />\n <Layouts.Content>\n {locales.length > 0 ? (\n <LocaleTable locales={locales} canDelete={canDelete} canUpdate={canUpdate} />\n ) : (\n <EmptyStateLayout\n icon={<EmptyDocuments width={undefined} height={undefined} />}\n content={formatMessage({\n id: getTranslation('Settings.list.empty.title'),\n defaultMessage: 'There are no locales',\n })}\n action={<CreateLocale disabled={!canCreate} variant=\"secondary\" />}\n />\n )}\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nconst ProtectedSettingsPage = () => {\n return (\n <Page.Protect permissions={PERMISSIONS.read}>\n <SettingsPage />\n </Page.Protect>\n );\n};\n\nexport { ProtectedSettingsPage, SettingsPage };\n"],"names":["SettingsPage","formatMessage","useIntl","toggleNotification","useNotification","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","data","locales","isLoading","isLoadingLocales","error","useGetLocalesQuery","isLoadingRBAC","allowedActions","canUpdate","canCreate","canDelete","useRBAC","PERMISSIONS","React","useEffect","type","message","_jsx","Page","Loading","Array","isArray","Error","_jsxs","Main","tabIndex","Layouts","Header","primaryAction","CreateLocale","disabled","title","id","getTranslation","defaultMessage","subtitle","Content","length","LocaleTable","EmptyStateLayout","icon","EmptyDocuments","width","undefined","height","content","action","variant","ProtectedSettingsPage","Protect","permissions","read"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAMA,YAAe,GAAA,IAAA;IACnB,MAAM,EAAEC,aAAa,EAAE,GAAGC,iBAAAA,EAAAA;IAC1B,MAAM,EAAEC,kBAAkB,EAAE,GAAGC,2BAAAA,EAAAA;AAC/B,IAAA,MAAM,EAAEC,uBAAAA,EAAyBC,cAAc,EAAE,GAAGC,8BAAAA,EAAAA;IACpD,MAAM,EAAEC,MAAMC,SAAO,EAAEC,WAAWC,gBAAgB,EAAEC,KAAK,EAAE,GAAGC,0BAAAA,EAAAA;AAC9D,IAAA,MAAM,EACJH,SAAAA,EAAWI,aAAa,EACxBC,gBAAgB,EAAEC,SAAS,EAAEC,SAAS,EAAEC,SAAS,EAAE,EACpD,GAAGC,mBAAQC,CAAAA,qBAAAA,CAAAA;AAEZC,IAAAA,gBAAAA,CAAMC,SAAS,CAAC,IAAA;AACd,QAAA,IAAIV,KAAO,EAAA;YACTT,kBAAmB,CAAA;gBACjBoB,IAAM,EAAA,QAAA;AACNC,gBAAAA,OAAAA,EAASlB,cAAeM,CAAAA,KAAAA;AAC1B,aAAA,CAAA;AACF;KACC,EAAA;AAACA,QAAAA,KAAAA;AAAON,QAAAA,cAAAA;AAAgBH,QAAAA;AAAmB,KAAA,CAAA;AAE9C,IAAA,MAAMO,YAAYC,gBAAoBG,IAAAA,aAAAA;AAEtC,IAAA,IAAIJ,SAAW,EAAA;QACb,qBAAOe,cAAA,CAACC,iBAAKC,OAAO,EAAA,EAAA,CAAA;AACtB;AAEA,IAAA,IAAIf,KAAS,IAAA,CAACgB,KAAMC,CAAAA,OAAO,CAACpB,SAAU,CAAA,EAAA;QACpC,qBAAOgB,cAAA,CAACC,iBAAKI,KAAK,EAAA,EAAA,CAAA;AACpB;IAEA,qBACEC,eAAA,CAACL,iBAAKM,IAAI,EAAA;AAACC,QAAAA,QAAAA,EAAU,CAAC,CAAA;;AACpB,0BAAAR,cAAA,CAACS,oBAAQC,MAAM,EAAA;AACbC,gBAAAA,aAAAA,gBAAeX,cAACY,CAAAA,yBAAAA,EAAAA;AAAaC,oBAAAA,QAAAA,EAAU,CAACrB;;AACxCsB,gBAAAA,KAAAA,EAAOtC,aAAc,CAAA;AACnBuC,oBAAAA,EAAAA,EAAIC,6BAAe,CAAA,aAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA,CAAA;AACAC,gBAAAA,QAAAA,EAAU1C,aAAc,CAAA;AACtBuC,oBAAAA,EAAAA,EAAIC,6BAAe,CAAA,2BAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA;;AAEF,0BAAAjB,cAAA,CAACS,oBAAQU,OAAO,EAAA;0BACbnC,SAAQoC,CAAAA,MAAM,GAAG,CAAA,Line truncated
+85
View File
@@ -0,0 +1,85 @@
import { jsx, jsxs } from 'react/jsx-runtime';
import * as React from 'react';
import { useNotification, useAPIErrorHandler, useRBAC, Page, Layouts } from '@strapi/admin/strapi-admin';
import { EmptyStateLayout } from '@strapi/design-system';
import { EmptyDocuments } from '@strapi/icons/symbols';
import { useIntl } from 'react-intl';
import { CreateLocale } from '../components/CreateLocale.mjs';
import { LocaleTable } from '../components/LocaleTable.mjs';
import { PERMISSIONS } from '../constants.mjs';
import { useGetLocalesQuery } from '../services/locales.mjs';
import { getTranslation } from '../utils/getTranslation.mjs';
const SettingsPage = ()=>{
const { formatMessage } = useIntl();
const { toggleNotification } = useNotification();
const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();
const { isLoading: isLoadingRBAC, allowedActions: { canUpdate, canCreate, canDelete } } = useRBAC(PERMISSIONS);
React.useEffect(()=>{
if (error) {
toggleNotification({
type: 'danger',
message: formatAPIError(error)
});
}
}, [
error,
formatAPIError,
toggleNotification
]);
const isLoading = isLoadingLocales || isLoadingRBAC;
if (isLoading) {
return /*#__PURE__*/ jsx(Page.Loading, {});
}
if (error || !Array.isArray(locales)) {
return /*#__PURE__*/ jsx(Page.Error, {});
}
return /*#__PURE__*/ jsxs(Page.Main, {
tabIndex: -1,
children: [
/*#__PURE__*/ jsx(Layouts.Header, {
primaryAction: /*#__PURE__*/ jsx(CreateLocale, {
disabled: !canCreate
}),
title: formatMessage({
id: getTranslation('plugin.name'),
defaultMessage: 'Internationalization'
}),
subtitle: formatMessage({
id: getTranslation('Settings.list.description'),
defaultMessage: 'Configure the settings'
})
}),
/*#__PURE__*/ jsx(Layouts.Content, {
children: locales.length > 0 ? /*#__PURE__*/ jsx(LocaleTable, {
locales: locales,
canDelete: canDelete,
canUpdate: canUpdate
}) : /*#__PURE__*/ jsx(EmptyStateLayout, {
icon: /*#__PURE__*/ jsx(EmptyDocuments, {
width: undefined,
height: undefined
}),
content: formatMessage({
id: getTranslation('Settings.list.empty.title'),
defaultMessage: 'There are no locales'
}),
action: /*#__PURE__*/ jsx(CreateLocale, {
disabled: !canCreate,
variant: "secondary"
})
})
})
]
});
};
const ProtectedSettingsPage = ()=>{
return /*#__PURE__*/ jsx(Page.Protect, {
permissions: PERMISSIONS.read,
children: /*#__PURE__*/ jsx(SettingsPage, {})
});
};
export { ProtectedSettingsPage, SettingsPage };
//# sourceMappingURL=SettingsPage.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"SettingsPage.mjs","sources":["../../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport {\n Page,\n useAPIErrorHandler,\n useNotification,\n useRBAC,\n Layouts,\n} from '@strapi/admin/strapi-admin';\nimport { EmptyStateLayout } from '@strapi/design-system';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\n\nimport { CreateLocale } from '../components/CreateLocale';\nimport { LocaleTable } from '../components/LocaleTable';\nimport { PERMISSIONS } from '../constants';\nimport { useGetLocalesQuery } from '../services/locales';\nimport { getTranslation } from '../utils/getTranslation';\n\nconst SettingsPage = () => {\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n const { data: locales, isLoading: isLoadingLocales, error } = useGetLocalesQuery();\n const {\n isLoading: isLoadingRBAC,\n allowedActions: { canUpdate, canCreate, canDelete },\n } = useRBAC(PERMISSIONS);\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const isLoading = isLoadingLocales || isLoadingRBAC;\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !Array.isArray(locales)) {\n return <Page.Error />;\n }\n\n return (\n <Page.Main tabIndex={-1}>\n <Layouts.Header\n primaryAction={<CreateLocale disabled={!canCreate} />}\n title={formatMessage({\n id: getTranslation('plugin.name'),\n defaultMessage: 'Internationalization',\n })}\n subtitle={formatMessage({\n id: getTranslation('Settings.list.description'),\n defaultMessage: 'Configure the settings',\n })}\n />\n <Layouts.Content>\n {locales.length > 0 ? (\n <LocaleTable locales={locales} canDelete={canDelete} canUpdate={canUpdate} />\n ) : (\n <EmptyStateLayout\n icon={<EmptyDocuments width={undefined} height={undefined} />}\n content={formatMessage({\n id: getTranslation('Settings.list.empty.title'),\n defaultMessage: 'There are no locales',\n })}\n action={<CreateLocale disabled={!canCreate} variant=\"secondary\" />}\n />\n )}\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nconst ProtectedSettingsPage = () => {\n return (\n <Page.Protect permissions={PERMISSIONS.read}>\n <SettingsPage />\n </Page.Protect>\n );\n};\n\nexport { ProtectedSettingsPage, SettingsPage };\n"],"names":["SettingsPage","formatMessage","useIntl","toggleNotification","useNotification","_unstableFormatAPIError","formatAPIError","useAPIErrorHandler","data","locales","isLoading","isLoadingLocales","error","useGetLocalesQuery","isLoadingRBAC","allowedActions","canUpdate","canCreate","canDelete","useRBAC","PERMISSIONS","React","useEffect","type","message","_jsx","Page","Loading","Array","isArray","Error","_jsxs","Main","tabIndex","Layouts","Header","primaryAction","CreateLocale","disabled","title","id","getTranslation","defaultMessage","subtitle","Content","length","LocaleTable","EmptyStateLayout","icon","EmptyDocuments","width","undefined","height","content","action","variant","ProtectedSettingsPage","Protect","permissions","read"],"mappings":";;;;;;;;;;;;AAmBA,MAAMA,YAAe,GAAA,IAAA;IACnB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;IAC1B,MAAM,EAAEC,kBAAkB,EAAE,GAAGC,eAAAA,EAAAA;AAC/B,IAAA,MAAM,EAAEC,uBAAAA,EAAyBC,cAAc,EAAE,GAAGC,kBAAAA,EAAAA;IACpD,MAAM,EAAEC,MAAMC,OAAO,EAAEC,WAAWC,gBAAgB,EAAEC,KAAK,EAAE,GAAGC,kBAAAA,EAAAA;AAC9D,IAAA,MAAM,EACJH,SAAAA,EAAWI,aAAa,EACxBC,gBAAgB,EAAEC,SAAS,EAAEC,SAAS,EAAEC,SAAS,EAAE,EACpD,GAAGC,OAAQC,CAAAA,WAAAA,CAAAA;AAEZC,IAAAA,KAAAA,CAAMC,SAAS,CAAC,IAAA;AACd,QAAA,IAAIV,KAAO,EAAA;YACTT,kBAAmB,CAAA;gBACjBoB,IAAM,EAAA,QAAA;AACNC,gBAAAA,OAAAA,EAASlB,cAAeM,CAAAA,KAAAA;AAC1B,aAAA,CAAA;AACF;KACC,EAAA;AAACA,QAAAA,KAAAA;AAAON,QAAAA,cAAAA;AAAgBH,QAAAA;AAAmB,KAAA,CAAA;AAE9C,IAAA,MAAMO,YAAYC,gBAAoBG,IAAAA,aAAAA;AAEtC,IAAA,IAAIJ,SAAW,EAAA;QACb,qBAAOe,GAAA,CAACC,KAAKC,OAAO,EAAA,EAAA,CAAA;AACtB;AAEA,IAAA,IAAIf,KAAS,IAAA,CAACgB,KAAMC,CAAAA,OAAO,CAACpB,OAAU,CAAA,EAAA;QACpC,qBAAOgB,GAAA,CAACC,KAAKI,KAAK,EAAA,EAAA,CAAA;AACpB;IAEA,qBACEC,IAAA,CAACL,KAAKM,IAAI,EAAA;AAACC,QAAAA,QAAAA,EAAU,CAAC,CAAA;;AACpB,0BAAAR,GAAA,CAACS,QAAQC,MAAM,EAAA;AACbC,gBAAAA,aAAAA,gBAAeX,GAACY,CAAAA,YAAAA,EAAAA;AAAaC,oBAAAA,QAAAA,EAAU,CAACrB;;AACxCsB,gBAAAA,KAAAA,EAAOtC,aAAc,CAAA;AACnBuC,oBAAAA,EAAAA,EAAIC,cAAe,CAAA,aAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA,CAAA;AACAC,gBAAAA,QAAAA,EAAU1C,aAAc,CAAA;AACtBuC,oBAAAA,EAAAA,EAAIC,cAAe,CAAA,2BAAA,CAAA;oBACnBC,cAAgB,EAAA;AAClB,iBAAA;;AAEF,0BAAAjB,GAAA,CAACS,QAAQU,OAAO,EAAA;0BACbnC,OAAQoC,CAAAA,MAAM,GAAG,CAAA,iBAChBpB,GAACqB,CAAAA,WAAAA,EAAAALine truncated