@strapi/admin 5.24.2 → 5.26.0
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/dist/admin/admin/src/App.js +6 -2
- package/dist/admin/admin/src/App.js.map +1 -1
- package/dist/admin/admin/src/App.mjs +7 -3
- package/dist/admin/admin/src/App.mjs.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/Context.js +11 -1
- package/dist/admin/admin/src/components/GuidedTour/Context.js.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/Context.mjs +11 -1
- package/dist/admin/admin/src/components/GuidedTour/Context.mjs.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/Steps/ContentTypeBuilderSteps.js +160 -23
- package/dist/admin/admin/src/components/GuidedTour/Steps/ContentTypeBuilderSteps.js.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/Steps/ContentTypeBuilderSteps.mjs +162 -25
- package/dist/admin/admin/src/components/GuidedTour/Steps/ContentTypeBuilderSteps.mjs.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/Steps/Step.js +28 -9
- package/dist/admin/admin/src/components/GuidedTour/Steps/Step.js.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/Steps/Step.mjs +30 -11
- package/dist/admin/admin/src/components/GuidedTour/Steps/Step.mjs.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/utils/migrations.js +2 -1
- package/dist/admin/admin/src/components/GuidedTour/utils/migrations.js.map +1 -1
- package/dist/admin/admin/src/components/GuidedTour/utils/migrations.mjs +2 -1
- package/dist/admin/admin/src/components/GuidedTour/utils/migrations.mjs.map +1 -1
- package/dist/admin/admin/src/components/NpsSurvey.js +2 -1
- package/dist/admin/admin/src/components/NpsSurvey.js.map +1 -1
- package/dist/admin/admin/src/components/NpsSurvey.mjs +2 -1
- package/dist/admin/admin/src/components/NpsSurvey.mjs.map +1 -1
- package/dist/admin/admin/src/features/Tracking.js +2 -1
- package/dist/admin/admin/src/features/Tracking.js.map +1 -1
- package/dist/admin/admin/src/features/Tracking.mjs +2 -1
- package/dist/admin/admin/src/features/Tracking.mjs.map +1 -1
- package/dist/admin/admin/src/hooks/useAIAvailability.js +13 -0
- package/dist/admin/admin/src/hooks/useAIAvailability.js.map +1 -0
- package/dist/admin/admin/src/hooks/useAIAvailability.mjs +11 -0
- package/dist/admin/admin/src/hooks/useAIAvailability.mjs.map +1 -0
- package/dist/admin/admin/src/pages/Home/HomePage.js +1 -0
- package/dist/admin/admin/src/pages/Home/HomePage.js.map +1 -1
- package/dist/admin/admin/src/pages/Home/HomePage.mjs +1 -0
- package/dist/admin/admin/src/pages/Home/HomePage.mjs.map +1 -1
- package/dist/admin/admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.js +12 -1
- package/dist/admin/admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.js.map +1 -1
- package/dist/admin/admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.mjs +12 -1
- package/dist/admin/admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.mjs.map +1 -1
- package/dist/admin/admin/src/render.js +6 -1
- package/dist/admin/admin/src/render.js.map +1 -1
- package/dist/admin/admin/src/render.mjs +6 -1
- package/dist/admin/admin/src/render.mjs.map +1 -1
- package/dist/admin/admin/src/services/homepage.js +15 -1
- package/dist/admin/admin/src/services/homepage.js.map +1 -1
- package/dist/admin/admin/src/services/homepage.mjs +14 -2
- package/dist/admin/admin/src/services/homepage.mjs.map +1 -1
- package/dist/admin/admin/src/translations/en.json.js +2 -0
- package/dist/admin/admin/src/translations/en.json.js.map +1 -1
- package/dist/admin/admin/src/translations/en.json.mjs +2 -0
- package/dist/admin/admin/src/translations/en.json.mjs.map +1 -1
- package/dist/admin/ee/admin/src/components/GlobalNotifications.js +11 -0
- package/dist/admin/ee/admin/src/components/GlobalNotifications.js.map +1 -0
- package/dist/admin/ee/admin/src/components/GlobalNotifications.mjs +9 -0
- package/dist/admin/ee/admin/src/components/GlobalNotifications.mjs.map +1 -0
- package/dist/admin/ee/admin/src/hooks/useAIAvailability.js +11 -0
- package/dist/admin/ee/admin/src/hooks/useAIAvailability.js.map +1 -0
- package/dist/admin/ee/admin/src/hooks/useAIAvailability.mjs +9 -0
- package/dist/admin/ee/admin/src/hooks/useAIAvailability.mjs.map +1 -0
- package/dist/admin/ee/admin/src/hooks/useAIUsageWarning.js +82 -0
- package/dist/admin/ee/admin/src/hooks/useAIUsageWarning.js.map +1 -0
- package/dist/admin/ee/admin/src/hooks/useAIUsageWarning.mjs +80 -0
- package/dist/admin/ee/admin/src/hooks/useAIUsageWarning.mjs.map +1 -0
- package/dist/admin/ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AIUsage.js +102 -0
- package/dist/admin/ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AIUsage.js.map +1 -0
- package/dist/admin/ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AIUsage.mjs +100 -0
- package/dist/admin/ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AIUsage.mjs.map +1 -0
- package/dist/admin/ee/admin/src/services/ai.js +30 -0
- package/dist/admin/ee/admin/src/services/ai.js.map +1 -0
- package/dist/admin/ee/admin/src/services/ai.mjs +26 -0
- package/dist/admin/ee/admin/src/services/ai.mjs.map +1 -0
- package/dist/admin/ee.js +4 -0
- package/dist/admin/ee.js.map +1 -1
- package/dist/admin/ee.mjs +2 -0
- package/dist/admin/ee.mjs.map +1 -1
- package/dist/admin/index.js +2 -0
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +1 -0
- package/dist/admin/index.mjs.map +1 -1
- package/dist/admin/src/components/GuidedTour/Context.d.ts +7 -0
- package/dist/admin/src/components/GuidedTour/Steps/ContentTypeBuilderSteps.d.ts +7 -16
- package/dist/admin/src/components/GuidedTour/Tours.d.ts +1 -22
- package/dist/admin/src/ee.d.ts +2 -0
- package/dist/admin/src/features/Tracking.d.ts +21 -2
- package/dist/admin/src/hooks/useAIAvailability.d.ts +5 -0
- package/dist/admin/src/index.d.ts +2 -0
- package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +2 -2
- package/dist/admin/src/services/admin.d.ts +1 -0
- package/dist/admin/src/services/homepage.d.ts +3 -2
- package/dist/ee/admin/src/components/GlobalNotifications.d.ts +1 -0
- package/dist/ee/admin/src/hooks/useAIAvailability.d.ts +1 -0
- package/dist/ee/admin/src/hooks/useAIUsageWarning.d.ts +5 -0
- package/dist/ee/admin/src/hooks/useLicenseLimits.d.ts +1 -1
- package/dist/ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AIUsage.d.ts +1 -0
- package/dist/ee/admin/src/services/ai.d.ts +9 -0
- package/dist/ee/server/src/ai/controllers/ai.d.ts +7 -0
- package/dist/ee/server/src/ai/controllers/ai.d.ts.map +1 -0
- package/dist/ee/server/src/ai/routes/ai.d.ts +13 -0
- package/dist/ee/server/src/ai/routes/ai.d.ts.map +1 -0
- package/dist/ee/server/src/controllers/admin.d.ts +3 -0
- package/dist/ee/server/src/controllers/admin.d.ts.map +1 -1
- package/dist/ee/server/src/controllers/index.d.ts +3 -0
- package/dist/ee/server/src/controllers/index.d.ts.map +1 -1
- package/dist/ee/server/src/index.d.ts +15 -187
- package/dist/ee/server/src/index.d.ts.map +1 -1
- package/dist/server/ee/server/src/ai/controllers/ai.js +218 -0
- package/dist/server/ee/server/src/ai/controllers/ai.js.map +1 -0
- package/dist/server/ee/server/src/ai/controllers/ai.mjs +216 -0
- package/dist/server/ee/server/src/ai/controllers/ai.mjs.map +1 -0
- package/dist/server/ee/server/src/ai/routes/ai.js +32 -0
- package/dist/server/ee/server/src/ai/routes/ai.js.map +1 -0
- package/dist/server/ee/server/src/ai/routes/ai.mjs +30 -0
- package/dist/server/ee/server/src/ai/routes/ai.mjs.map +1 -0
- package/dist/server/ee/server/src/controllers/admin.js +4 -1
- package/dist/server/ee/server/src/controllers/admin.js.map +1 -1
- package/dist/server/ee/server/src/controllers/admin.mjs +4 -1
- package/dist/server/ee/server/src/controllers/admin.mjs.map +1 -1
- package/dist/server/ee/server/src/index.js +37 -23
- package/dist/server/ee/server/src/index.js.map +1 -1
- package/dist/server/ee/server/src/index.mjs +37 -23
- package/dist/server/ee/server/src/index.mjs.map +1 -1
- package/dist/server/server/src/controllers/admin.js +5 -1
- package/dist/server/server/src/controllers/admin.js.map +1 -1
- package/dist/server/server/src/controllers/admin.mjs +5 -1
- package/dist/server/server/src/controllers/admin.mjs.map +1 -1
- package/dist/server/server/src/controllers/homepage.js +17 -0
- package/dist/server/server/src/controllers/homepage.js.map +1 -1
- package/dist/server/server/src/controllers/homepage.mjs +17 -0
- package/dist/server/server/src/controllers/homepage.mjs.map +1 -1
- package/dist/server/server/src/controllers/validation/schema.js +30 -0
- package/dist/server/server/src/controllers/validation/schema.js.map +1 -0
- package/dist/server/server/src/controllers/validation/schema.mjs +26 -0
- package/dist/server/server/src/controllers/validation/schema.mjs.map +1 -0
- package/dist/server/server/src/routes/homepage.js +20 -0
- package/dist/server/server/src/routes/homepage.js.map +1 -1
- package/dist/server/server/src/routes/homepage.mjs +20 -0
- package/dist/server/server/src/routes/homepage.mjs.map +1 -1
- package/dist/server/server/src/services/homepage.js +48 -1
- package/dist/server/server/src/services/homepage.js.map +1 -1
- package/dist/server/server/src/services/homepage.mjs +48 -1
- package/dist/server/server/src/services/homepage.mjs.map +1 -1
- package/dist/server/src/controllers/admin.d.ts +2 -0
- package/dist/server/src/controllers/admin.d.ts.map +1 -1
- package/dist/server/src/controllers/homepage.d.ts +8 -0
- package/dist/server/src/controllers/homepage.d.ts.map +1 -1
- package/dist/server/src/controllers/index.d.ts +22 -0
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/validation/schema.d.ts +61 -0
- package/dist/server/src/controllers/validation/schema.d.ts.map +1 -0
- package/dist/server/src/index.d.ts +38 -0
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/routes/homepage.d.ts.map +1 -1
- package/dist/server/src/services/homepage.d.ts +3 -0
- package/dist/server/src/services/homepage.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +16 -0
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/shared/contracts/admin.d.ts +1 -0
- package/dist/shared/contracts/admin.d.ts.map +1 -1
- package/dist/shared/contracts/ai.d.ts +40 -0
- package/dist/shared/contracts/ai.d.ts.map +1 -0
- package/dist/shared/contracts/homepage.d.ts +27 -0
- package/dist/shared/contracts/homepage.d.ts.map +1 -1
- package/dist/shared/contracts/users.d.ts +16 -0
- package/dist/shared/contracts/users.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/admin/admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationInfoPage.mjs","sources":["../../../../../../../../admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Box, Button, Flex, Grid, Link, Typography } from '@strapi/design-system';\nimport { Check, ExternalLink } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\n\nimport { Layouts } from '../../../../components/Layouts/Layout';\nimport { Page } from '../../../../components/PageHelpers';\nimport { useAppInfo } from '../../../../features/AppInfo';\nimport { useConfiguration } from '../../../../features/Configuration';\nimport { useTracking } from '../../../../features/Tracking';\nimport { useEnterprise } from '../../../../hooks/useEnterprise';\nimport { useRBAC } from '../../../../hooks/useRBAC';\nimport { selectAdminPermissions } from '../../../../selectors';\n\nimport { LogoInput, LogoInputProps } from './components/LogoInput';\nimport { DIMENSION, SIZE } from './utils/constants';\n\nconst AdminSeatInfoCE = () => null;\n\n/* -------------------------------------------------------------------------------------------------\n * ApplicationInfoPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ApplicationInfoPage = () => {\n const { trackUsage } = useTracking();\n const { formatMessage } = useIntl();\n const { logos: serverLogos, updateProjectSettings } = useConfiguration('ApplicationInfoPage');\n const [logos, setLogos] = React.useState({ menu: serverLogos.menu, auth: serverLogos.auth });\n const { settings } = useSelector(selectAdminPermissions);\n\n const communityEdition = useAppInfo('ApplicationInfoPage', (state) => state.communityEdition);\n const latestStrapiReleaseTag = useAppInfo(\n 'ApplicationInfoPage',\n (state) => state.latestStrapiReleaseTag\n );\n const nodeVersion = useAppInfo('ApplicationInfoPage', (state) => state.nodeVersion);\n const shouldUpdateStrapi = useAppInfo('ApplicationInfoPage', (state) => state.shouldUpdateStrapi);\n const strapiVersion = useAppInfo('ApplicationInfoPage', (state) => state.strapiVersion);\n\n const AdminSeatInfo = useEnterprise(\n AdminSeatInfoCE,\n async () =>\n (\n await import(\n '../../../../../../ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AdminSeatInfo'\n )\n ).AdminSeatInfoEE\n );\n\n const {\n allowedActions: { canRead, canUpdate },\n } = useRBAC(settings ? settings['project-settings'] : {});\n\n const handleSubmit: React.FormEventHandler<HTMLFormElement> = (e) => {\n e.preventDefault();\n\n updateProjectSettings({\n authLogo: logos.auth.custom ?? null,\n menuLogo: logos.menu.custom ?? null,\n });\n };\n\n const handleChangeLogo =\n (logo: 'menu' | 'auth'): LogoInputProps['onChangeLogo'] =>\n (newLogo) => {\n /**\n * If there's no newLogo value we can assume we're reseting.\n */\n if (newLogo === null) {\n trackUsage('didClickResetLogo', {\n logo,\n });\n }\n\n setLogos((prev) => ({\n ...prev,\n [logo]: {\n ...prev[logo],\n custom: newLogo,\n },\n }));\n };\n\n React.useEffect(() => {\n setLogos({\n menu: serverLogos.menu,\n auth: serverLogos.auth,\n });\n }, [serverLogos]);\n\n // block rendering until the EE component is fully loaded\n if (!AdminSeatInfo) {\n return null;\n }\n\n const isSaveDisabled =\n logos.auth.custom === serverLogos.auth.custom && logos.menu.custom === serverLogos.menu.custom;\n\n return (\n <Layouts.Root>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: formatMessage({\n id: 'Settings.application.header',\n defaultMessage: 'Application',\n }),\n }\n )}\n </Page.Title>\n <Page.Main>\n <form onSubmit={handleSubmit}>\n <Layouts.Header\n title={formatMessage({\n id: 'Settings.application.title',\n defaultMessage: 'Overview',\n })}\n subtitle={formatMessage({\n id: 'Settings.application.description',\n defaultMessage: 'Administration panel’s global information',\n })}\n primaryAction={\n canUpdate && (\n <Button disabled={isSaveDisabled} type=\"submit\" startIcon={<Check />}>\n {formatMessage({ id: 'global.save', defaultMessage: 'Save' })}\n </Button>\n )\n }\n />\n <Layouts.Content>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={6}>\n <Flex\n direction=\"column\"\n alignItems=\"stretch\"\n gap={4}\n hasRadius\n background=\"neutral0\"\n shadow=\"tableShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingRight={7}\n paddingLeft={7}\n >\n <Typography variant=\"delta\" tag=\"h3\">\n {formatMessage({\n id: 'global.details',\n defaultMessage: 'Details',\n })}\n </Typography>\n\n <Grid.Root gap={5} tag=\"dl\">\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"start\">\n <Typography variant=\"sigma\" textColor=\"neutral600\" tag=\"dt\">\n {formatMessage({\n id: 'Settings.application.strapiVersion',\n defaultMessage: 'strapi version',\n })}\n </Typography>\n <Flex gap={3} direction=\"column\" alignItems=\"start\" tag=\"dd\">\n <Typography>v{strapiVersion}</Typography>\n {shouldUpdateStrapi && (\n <Link\n href={`https://github.com/strapi/strapi/releases/tag/${latestStrapiReleaseTag}`}\n endIcon={<ExternalLink />}\n >\n {formatMessage({\n id: 'Settings.application.link-upgrade',\n defaultMessage: 'Upgrade your admin panel',\n })}\n </Link>\n )}\n </Flex>\n </Grid.Item>\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"start\">\n <Typography variant=\"sigma\" textColor=\"neutral600\" tag=\"dt\">\n {formatMessage({\n id: 'Settings.application.edition-title',\n defaultMessage: 'current edition',\n })}\n </Typography>\n <Flex gap={3} direction=\"column\" alignItems=\"start\" tag=\"dd\">\n <Typography>\n {formatMessage(\n {\n id: 'Settings.application.ee-or-ce',\n defaultMessage:\n '{communityEdition, select, true {Community Edition} other {Enterprise Edition}}',\n },\n { communityEdition }\n )}\n </Typography>\n <Link href=\"https://strapi.io/pricing-self-hosted\" endIcon={<ExternalLink />}>\n {formatMessage({\n id: 'Settings.application.link-pricing',\n defaultMessage: 'See all pricing plans',\n })}\n </Link>\n </Flex>\n </Grid.Item>\n\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"start\">\n <Typography variant=\"sigma\" textColor=\"neutral600\" tag=\"dt\">\n {formatMessage({\n id: 'Settings.application.node-version',\n defaultMessage: 'node version',\n })}\n </Typography>\n <Typography tag=\"dd\">{nodeVersion}</Typography>\n </Grid.Item>\n <AdminSeatInfo />\n </Grid.Root>\n </Flex>\n {canRead && (\n <Box\n hasRadius\n background=\"neutral0\"\n shadow=\"tableShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingRight={7}\n paddingLeft={7}\n >\n <Typography variant=\"delta\" tag=\"h3\">\n {formatMessage({\n id: 'Settings.application.customization',\n defaultMessage: 'Customization',\n })}\n </Typography>\n <Typography variant=\"pi\" textColor=\"neutral600\">\n {formatMessage(\n {\n id: 'Settings.application.customization.size-details',\n defaultMessage:\n 'Max dimension: {dimension}×{dimension}, Max file size: {size}KB',\n },\n { dimension: DIMENSION, size: SIZE }\n )}\n </Typography>\n <Grid.Root paddingTop={4} gap={4}>\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"stretch\">\n <LogoInput\n canUpdate={canUpdate}\n customLogo={logos.menu.custom}\n defaultLogo={logos.menu.default}\n hint={formatMessage({\n id: 'Settings.application.customization.menu-logo.carousel-hint',\n defaultMessage: 'Replace the logo in the main navigation',\n })}\n label={formatMessage({\n id: 'Settings.application.customization.carousel.menu-logo.title',\n defaultMessage: 'Menu logo',\n })}\n onChangeLogo={handleChangeLogo('menu')}\n />\n </Grid.Item>\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"stretch\">\n <LogoInput\n canUpdate={canUpdate}\n customLogo={logos.auth.custom}\n defaultLogo={logos.auth.default}\n hint={formatMessage({\n id: 'Settings.application.customization.auth-logo.carousel-hint',\n defaultMessage: 'Replace the logo in the authentication pages',\n })}\n label={formatMessage({\n id: 'Settings.application.customization.carousel.auth-logo.title',\n defaultMessage: 'Auth logo',\n })}\n onChangeLogo={handleChangeLogo('auth')}\n />\n </Grid.Item>\n </Grid.Root>\n </Box>\n )}\n </Flex>\n </Layouts.Content>\n </form>\n </Page.Main>\n </Layouts.Root>\n );\n};\n\nexport { ApplicationInfoPage };\n"],"names":["AdminSeatInfoCE","ApplicationInfoPage","trackUsage","useTracking","formatMessage","useIntl","logos","serverLogos","updateProjectSettings","useConfiguration","setLogos","React","useState","menu","auth","settings","useSelector","selectAdminPermissions","communityEdition","useAppInfo","state","latestStrapiReleaseTag","nodeVersion","shouldUpdateStrapi","strapiVersion","AdminSeatInfo","useEnterprise","AdminSeatInfoEE","allowedActions","canRead","canUpdate","useRBAC","handleSubmit","e","preventDefault","authLogo","custom","menuLogo","handleChangeLogo","logo","newLogo","prev","useEffect","isSaveDisabled","_jsxs","Layouts","Root","_jsx","Page","Title","id","defaultMessage","name","Main","form","onSubmit","Header","title","subtitle","primaryAction","Button","disabled","type","startIcon","Check","Content","Flex","direction","alignItems","gap","hasRadius","background","shadow","paddingTop","paddingBottom","paddingRight","paddingLeft","Typography","variant","tag","Grid","Item","col","s","textColor","Link","href","endIcon","ExternalLink","Box","dimension","DIMENSION","size","SIZE","LogoInput","customLogo","defaultLogo","default","hint","label","onChangeLogo"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAMA,kBAAkB,IAAM,IAAA;AAE9B;;AAEkG,2GAE5FC,mBAAsB,GAAA,IAAA;IAC1B,MAAM,EAAEC,UAAU,EAAE,GAAGC,WAAAA,EAAAA;IACvB,MAAM,EAAEC,aAAa,EA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C,4DAAAA,IAAAA,EAAM9F,aAAc,CAAA;gEAClB8C,EAAI,EAAA,4DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAgD,4DAAAA,KAAAA,EAAO/F,aAAc,CAAA;gEACnB8C,EAAI,EAAA,6DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAiD,4DAAAA,YAAAA,EAAc9D,gBAAiB,CAAA,MAAA;;;AAGnC,kEAAAS,GAAA,CAACiC,KAAKC,IAAI,EAAA;wDAACC,GAAK,EAAA,CAAA;wDAAGC,CAAG,EAAA,EAAA;wDAAIhB,SAAU,EAAA,QAAA;wDAASC,UAAW,EAAA,SAAA;AACtD,wDAAA,QAAA,gBAAArB,GAAC+C,CAAAA,SAAAA,EAAAA;4DACChE,SAAWA,EAAAA,SAAAA;4DACXiE,UAAYzF,EAAAA,KAAAA,CAAMQ,IAAI,CAACsB,MAAM;4DAC7B4D,WAAa1F,EAAAA,KAAAA,CAAMQ,IAAI,CAACmF,OAAO;AAC/BC,4DAAAA,IAAAA,EAAM9F,aAAc,CAAA;gEAClB8C,EAAI,EAAA,4DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAgD,4DAAAA,KAAAA,EAAO/F,aAAc,CAAA;gEACnB8C,EAAI,EAAA,6DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAiD,4DAAAA,YAAAA,EAAc9D,gBAAiB,CAAA,MAAA;;;;;;;;;;;;;;;AAYvD;;;;"}
|
|
1
|
+
{"version":3,"file":"ApplicationInfoPage.mjs","sources":["../../../../../../../../admin/src/pages/Settings/pages/ApplicationInfo/ApplicationInfoPage.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Box, Button, Flex, Grid, Link, Typography } from '@strapi/design-system';\nimport { Check, ExternalLink } from '@strapi/icons';\nimport { useIntl } from 'react-intl';\nimport { useSelector } from 'react-redux';\n\nimport { Layouts } from '../../../../components/Layouts/Layout';\nimport { Page } from '../../../../components/PageHelpers';\nimport { useAppInfo } from '../../../../features/AppInfo';\nimport { useConfiguration } from '../../../../features/Configuration';\nimport { useTracking } from '../../../../features/Tracking';\nimport { useEnterprise } from '../../../../hooks/useEnterprise';\nimport { useFetchClient } from '../../../../hooks/useFetchClient';\nimport { useRBAC } from '../../../../hooks/useRBAC';\nimport { selectAdminPermissions } from '../../../../selectors';\n\nimport { LogoInput, LogoInputProps } from './components/LogoInput';\nimport { DIMENSION, SIZE } from './utils/constants';\n\nconst AdminSeatInfoCE = () => null;\nconst AIUageDataCE = () => null;\n\n/* -------------------------------------------------------------------------------------------------\n * ApplicationInfoPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ApplicationInfoPage = () => {\n const { trackUsage } = useTracking();\n const { formatMessage } = useIntl();\n const { get } = useFetchClient();\n const { logos: serverLogos, updateProjectSettings } = useConfiguration('ApplicationInfoPage');\n const [logos, setLogos] = React.useState({ menu: serverLogos.menu, auth: serverLogos.auth });\n const { settings } = useSelector(selectAdminPermissions);\n\n const communityEdition = useAppInfo('ApplicationInfoPage', (state) => state.communityEdition);\n const latestStrapiReleaseTag = useAppInfo(\n 'ApplicationInfoPage',\n (state) => state.latestStrapiReleaseTag\n );\n const nodeVersion = useAppInfo('ApplicationInfoPage', (state) => state.nodeVersion);\n const shouldUpdateStrapi = useAppInfo('ApplicationInfoPage', (state) => state.shouldUpdateStrapi);\n const strapiVersion = useAppInfo('ApplicationInfoPage', (state) => state.strapiVersion);\n\n const AdminSeatInfo = useEnterprise(\n AdminSeatInfoCE,\n async () =>\n (\n await import(\n '../../../../../../ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AdminSeatInfo'\n )\n ).AdminSeatInfoEE\n );\n const isAiEnabled = window.strapi.ai?.enabled !== false;\n const AIUsageData = useEnterprise(\n AIUageDataCE,\n async () =>\n (\n await import(\n '../../../../../../ee/admin/src/pages/SettingsPage/pages/ApplicationInfoPage/components/AIUsage'\n )\n ).AIUsage,\n {\n enabled: isAiEnabled,\n }\n );\n\n const {\n allowedActions: { canRead, canUpdate },\n } = useRBAC(settings ? settings['project-settings'] : {});\n\n const handleSubmit: React.FormEventHandler<HTMLFormElement> = (e) => {\n e.preventDefault();\n\n updateProjectSettings({\n authLogo: logos.auth.custom ?? null,\n menuLogo: logos.menu.custom ?? null,\n });\n };\n\n const handleChangeLogo =\n (logo: 'menu' | 'auth'): LogoInputProps['onChangeLogo'] =>\n (newLogo) => {\n /**\n * If there's no newLogo value we can assume we're reseting.\n */\n if (newLogo === null) {\n trackUsage('didClickResetLogo', {\n logo,\n });\n }\n\n setLogos((prev) => ({\n ...prev,\n [logo]: {\n ...prev[logo],\n custom: newLogo,\n },\n }));\n };\n\n React.useEffect(() => {\n setLogos({\n menu: serverLogos.menu,\n auth: serverLogos.auth,\n });\n }, [serverLogos]);\n\n // block rendering until the EE component is fully loaded\n if (!AdminSeatInfo) {\n return null;\n }\n\n if (!AIUsageData) {\n return null;\n }\n\n const isSaveDisabled =\n logos.auth.custom === serverLogos.auth.custom && logos.menu.custom === serverLogos.menu.custom;\n\n return (\n <Layouts.Root>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: formatMessage({\n id: 'Settings.application.header',\n defaultMessage: 'Application',\n }),\n }\n )}\n </Page.Title>\n <Page.Main>\n <form onSubmit={handleSubmit}>\n <Layouts.Header\n title={formatMessage({\n id: 'Settings.application.title',\n defaultMessage: 'Overview',\n })}\n subtitle={formatMessage({\n id: 'Settings.application.description',\n defaultMessage: 'Administration panel’s global information',\n })}\n primaryAction={\n canUpdate && (\n <Button disabled={isSaveDisabled} type=\"submit\" startIcon={<Check />}>\n {formatMessage({ id: 'global.save', defaultMessage: 'Save' })}\n </Button>\n )\n }\n />\n <Layouts.Content>\n <Flex direction=\"column\" alignItems=\"stretch\" gap={6}>\n <Flex\n direction=\"column\"\n alignItems=\"stretch\"\n gap={4}\n hasRadius\n background=\"neutral0\"\n shadow=\"tableShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingRight={7}\n paddingLeft={7}\n >\n <Typography variant=\"delta\" tag=\"h3\">\n {formatMessage({\n id: 'global.details',\n defaultMessage: 'Details',\n })}\n </Typography>\n\n <Grid.Root gap={5} tag=\"dl\">\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"start\">\n <Typography variant=\"sigma\" textColor=\"neutral600\" tag=\"dt\">\n {formatMessage({\n id: 'Settings.application.strapiVersion',\n defaultMessage: 'strapi version',\n })}\n </Typography>\n <Flex gap={3} direction=\"column\" alignItems=\"start\" tag=\"dd\">\n <Typography>v{strapiVersion}</Typography>\n {shouldUpdateStrapi && (\n <Link\n href={`https://github.com/strapi/strapi/releases/tag/${latestStrapiReleaseTag}`}\n endIcon={<ExternalLink />}\n >\n {formatMessage({\n id: 'Settings.application.link-upgrade',\n defaultMessage: 'Upgrade your admin panel',\n })}\n </Link>\n )}\n </Flex>\n </Grid.Item>\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"start\">\n <Typography variant=\"sigma\" textColor=\"neutral600\" tag=\"dt\">\n {formatMessage({\n id: 'Settings.application.edition-title',\n defaultMessage: 'current edition',\n })}\n </Typography>\n <Flex gap={3} direction=\"column\" alignItems=\"start\" tag=\"dd\">\n <Typography>\n {formatMessage(\n {\n id: 'Settings.application.ee-or-ce',\n defaultMessage:\n '{communityEdition, select, true {Community Edition} other {Enterprise Edition}}',\n },\n { communityEdition }\n )}\n </Typography>\n <Link href=\"https://strapi.io/pricing-self-hosted\" endIcon={<ExternalLink />}>\n {formatMessage({\n id: 'Settings.application.link-pricing',\n defaultMessage: 'See all pricing plans',\n })}\n </Link>\n </Flex>\n </Grid.Item>\n\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"start\">\n <Typography variant=\"sigma\" textColor=\"neutral600\" tag=\"dt\">\n {formatMessage({\n id: 'Settings.application.node-version',\n defaultMessage: 'node version',\n })}\n </Typography>\n <Typography tag=\"dd\">{nodeVersion}</Typography>\n </Grid.Item>\n <AdminSeatInfo />\n <AIUsageData />\n </Grid.Root>\n </Flex>\n {canRead && (\n <Box\n hasRadius\n background=\"neutral0\"\n shadow=\"tableShadow\"\n paddingTop={6}\n paddingBottom={6}\n paddingRight={7}\n paddingLeft={7}\n >\n <Typography variant=\"delta\" tag=\"h3\">\n {formatMessage({\n id: 'Settings.application.customization',\n defaultMessage: 'Customization',\n })}\n </Typography>\n <Typography variant=\"pi\" textColor=\"neutral600\">\n {formatMessage(\n {\n id: 'Settings.application.customization.size-details',\n defaultMessage:\n 'Max dimension: {dimension}×{dimension}, Max file size: {size}KB',\n },\n { dimension: DIMENSION, size: SIZE }\n )}\n </Typography>\n <Grid.Root paddingTop={4} gap={4}>\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"stretch\">\n <LogoInput\n canUpdate={canUpdate}\n customLogo={logos.menu.custom}\n defaultLogo={logos.menu.default}\n hint={formatMessage({\n id: 'Settings.application.customization.menu-logo.carousel-hint',\n defaultMessage: 'Replace the logo in the main navigation',\n })}\n label={formatMessage({\n id: 'Settings.application.customization.carousel.menu-logo.title',\n defaultMessage: 'Menu logo',\n })}\n onChangeLogo={handleChangeLogo('menu')}\n />\n </Grid.Item>\n <Grid.Item col={6} s={12} direction=\"column\" alignItems=\"stretch\">\n <LogoInput\n canUpdate={canUpdate}\n customLogo={logos.auth.custom}\n defaultLogo={logos.auth.default}\n hint={formatMessage({\n id: 'Settings.application.customization.auth-logo.carousel-hint',\n defaultMessage: 'Replace the logo in the authentication pages',\n })}\n label={formatMessage({\n id: 'Settings.application.customization.carousel.auth-logo.title',\n defaultMessage: 'Auth logo',\n })}\n onChangeLogo={handleChangeLogo('auth')}\n />\n </Grid.Item>\n </Grid.Root>\n </Box>\n )}\n </Flex>\n </Layouts.Content>\n </form>\n </Page.Main>\n </Layouts.Root>\n );\n};\n\nexport { ApplicationInfoPage };\n"],"names":["AdminSeatInfoCE","AIUageDataCE","ApplicationInfoPage","trackUsage","useTracking","formatMessage","useIntl","useFetchClient","logos","serverLogos","updateProjectSettings","useConfiguration","setLogos","React","useState","menu","auth","settings","useSelector","selectAdminPermissions","communityEdition","useAppInfo","state","latestStrapiReleaseTag","nodeVersion","shouldUpdateStrapi","strapiVersion","AdminSeatInfo","useEnterprise","AdminSeatInfoEE","isAiEnabled","window","strapi","ai","enabled","AIUsageData","AIUsage","allowedActions","canRead","canUpdate","useRBAC","handleSubmit","e","preventDefault","authLogo","custom","menuLogo","handleChangeLogo","logo","newLogo","prev","useEffect","isSaveDisabled","_jsxs","Layouts","Root","_jsx","Page","Title","id","defaultMessage","name","Main","form","onSubmit","Header","title","subtitle","primaryAction","Button","disabled","type","startIcon","Check","Content","Flex","direction","alignItems","gap","hasRadius","background","shadow","paddingTop","paddingBottom","paddingRight","paddingLeft","Typography","variant","tag","Grid","Item","col","s","textColor","Link","href","endIcon","ExternalLink","Box","dimension","DIMENSION","size","SIZE","LogoInput","customLogo","defaultLogo","default","hint","label","onChangeLogo"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,MAAMA,kBAAkB,IAAM,IAAA;AAC9B,MAAMC,eAAe,IAAM,IAAA;AAE3B;;AAEkG,2GAE5FC,mBAAsB,GAAA,IAAA;IAC1B,MAAM,EAAEC,UAAU,EAAE,GAAGC,WAAAA,EAAAA;IACvB,MAAM,EAAEC,aAAa,EAAE,GAAGC,OAAAA,EAAAA;IACVC,cAAAA;AAChB,IAAA,MAAM,EAAEC,KAAOC,EAAAA,WAAW,EAAEC,qBAAqB,EAAE,GAAGC,gBAAiB,CAAA,qBAAA,CAAA;AACvE,IAAA,MAAM,CAACH,KAAOI,EAAAA,QAAAA,CAAS,GAAGC,KAAAA,CAAMC,QAAQ,CAAC;AAAEC,QAAAA,IAAAA,EAAMN,YAAYM,IAAI;AAAEC,QAAAA,IAAAA,EAAMP,YAAYO;AAAK,KAAA,CAAA;AAC1F,IAAA,MAAM,EAAEC,QAAQ,EAAE,GAAGC,WAAYC,CAAAA,sBAAAA,CA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c,CAAA;gEAClBsD,EAAI,EAAA,4DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAgD,4DAAAA,KAAAA,EAAOvG,aAAc,CAAA;gEACnBsD,EAAI,EAAA,6DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAiD,4DAAAA,YAAAA,EAAc9D,gBAAiB,CAAA,MAAA;;;AAGnC,kEAAAS,GAAA,CAACiC,KAAKC,IAAI,EAAA;wDAACC,GAAK,EAAA,CAAA;wDAAGC,CAAG,EAAA,EAAA;wDAAIhB,SAAU,EAAA,QAAA;wDAASC,UAAW,EAAA,SAAA;AACtD,wDAAA,QAAA,gBAAArB,GAAC+C,CAAAA,SAAAA,EAAAA;4DACChE,SAAWA,EAAAA,SAAAA;4DACXiE,UAAYhG,EAAAA,KAAAA,CAAMQ,IAAI,CAAC6B,MAAM;4DAC7B4D,WAAajG,EAAAA,KAAAA,CAAMQ,IAAI,CAAC0F,OAAO;AAC/BC,4DAAAA,IAAAA,EAAMtG,aAAc,CAAA;gEAClBsD,EAAI,EAAA,4DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAgD,4DAAAA,KAAAA,EAAOvG,aAAc,CAAA;gEACnBsD,EAAI,EAAA,6DAAA;gEACJC,cAAgB,EAAA;AAClB,6DAAA,CAAA;AACAiD,4DAAAA,YAAAA,EAAc9D,gBAAiB,CAAA,MAAA;;;;;;;;;;;;;;;AAYvD;;;;"}
|
|
@@ -38,11 +38,14 @@ const renderAdmin = async (mountNode, { plugins, customisations, features })=>{
|
|
|
38
38
|
flags: {
|
|
39
39
|
nps: false,
|
|
40
40
|
promoteEE: true
|
|
41
|
+
},
|
|
42
|
+
ai: {
|
|
43
|
+
enabled: true
|
|
41
44
|
}
|
|
42
45
|
};
|
|
43
46
|
const { get } = getFetchClient.getFetchClient();
|
|
44
47
|
try {
|
|
45
|
-
const { data: { data: { isEE, isTrial, features, flags } } } = await get('/admin/project-type');
|
|
48
|
+
const { data: { data: { isEE, isTrial, features, flags, ai } } } = await get('/admin/project-type');
|
|
46
49
|
window.strapi.isEE = isEE;
|
|
47
50
|
window.strapi.isTrialLicense = isTrial;
|
|
48
51
|
window.strapi.flags = flags;
|
|
@@ -51,6 +54,8 @@ const renderAdmin = async (mountNode, { plugins, customisations, features })=>{
|
|
|
51
54
|
isEnabled: (featureName)=>features.some((feature)=>feature.name === featureName)
|
|
52
55
|
};
|
|
53
56
|
window.strapi.projectType = isEE ? 'Enterprise' : 'Community';
|
|
57
|
+
window.strapi.aiLicenseKey = process.env.STRAPI_ADMIN_AI_API_KEY;
|
|
58
|
+
window.strapi.ai = ai;
|
|
54
59
|
} catch (err) {
|
|
55
60
|
/**
|
|
56
61
|
* If this fails, we simply don't activate any EE features.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sources":["../../../../admin/src/render.ts"],"sourcesContent":["/* eslint-disable no-undef */\nimport { createRoot } from 'react-dom/client';\n\nimport { StrapiApp, StrapiAppConstructorArgs } from './StrapiApp';\nimport { getFetchClient } from './utils/getFetchClient';\nimport { createAbsoluteUrl } from './utils/urls';\n\nimport type { Modules } from '@strapi/types';\n\ninterface RenderAdminArgs {\n customisations: {\n register?: (app: StrapiApp) => Promise<void> | void;\n bootstrap?: (app: StrapiApp) => Promise<void> | void;\n config?: StrapiAppConstructorArgs['config'];\n };\n plugins: StrapiAppConstructorArgs['appPlugins'];\n features?: Modules.Features.FeaturesService['config'];\n}\n\nconst renderAdmin = async (\n mountNode: HTMLElement | null,\n { plugins, customisations, features }: RenderAdminArgs\n) => {\n if (!mountNode) {\n throw new Error('[@strapi/admin]: Could not find the root element to mount the admin app');\n }\n\n window.strapi = {\n /**\n * This ENV variable is passed from the strapi instance, by default no url is set\n * in the config and therefore the instance returns you an empty string so URLs are relative.\n *\n * To ensure that the backendURL is always set, we use the window.location.origin as a fallback.\n */\n backendURL: createAbsoluteUrl(process.env.STRAPI_ADMIN_BACKEND_URL),\n isEE: false,\n isTrial: false,\n telemetryDisabled: process.env.STRAPI_TELEMETRY_DISABLED === 'true',\n future: {\n isEnabled: (name: keyof NonNullable<Modules.Features.FeaturesConfig['future']>) => {\n return features?.future?.[name] === true;\n },\n },\n // @ts-expect-error – there's pollution from the global scope of Node.\n features: {\n SSO: 'sso',\n AUDIT_LOGS: 'audit-logs',\n REVIEW_WORKFLOWS: 'review-workflows',\n /**\n * If we don't get the license then we know it's not EE\n * so no feature is enabled.\n */\n isEnabled: () => false,\n },\n projectType: 'Community',\n flags: {\n nps: false,\n promoteEE: true,\n },\n };\n\n const { get } = getFetchClient();\n\n interface ProjectType extends Pick<Window['strapi'], 'flags'> {\n isEE: boolean;\n isTrial: boolean;\n features: {\n name: string;\n }[];\n }\n\n try {\n const {\n data: {\n data: { isEE, isTrial, features, flags },\n },\n } = await get<{ data: ProjectType }>('/admin/project-type');\n\n window.strapi.isEE = isEE;\n window.strapi.isTrialLicense = isTrial;\n window.strapi.flags = flags;\n window.strapi.features = {\n ...window.strapi.features,\n isEnabled: (featureName) => features.some((feature) => feature.name === featureName),\n };\n window.strapi.projectType = isEE ? 'Enterprise' : 'Community';\n } catch (err) {\n /**\n * If this fails, we simply don't activate any EE features.\n * Should we warn clearer in the UI?\n */\n console.error(err);\n }\n\n const app = new StrapiApp({\n config: customisations?.config,\n appPlugins: plugins,\n });\n\n await app.register(customisations?.register);\n await app.bootstrap(customisations?.bootstrap);\n await app.loadTrads(customisations?.config?.translations);\n\n createRoot(mountNode).render(app.render());\n\n if (\n typeof module !== 'undefined' &&\n module &&\n 'hot' in module &&\n typeof module.hot === 'object' &&\n module.hot !== null &&\n 'accept' in module.hot &&\n typeof module.hot.accept === 'function'\n ) {\n module.hot.accept();\n }\n\n if (typeof import.meta.hot?.accept === 'function') {\n import.meta.hot.accept();\n }\n};\n\nexport { renderAdmin };\nexport type { RenderAdminArgs };\n"],"names":["renderAdmin","mountNode","plugins","customisations","features","Error","window","strapi","backendURL","createAbsoluteUrl","process","env","STRAPI_ADMIN_BACKEND_URL","isEE","isTrial","telemetryDisabled","STRAPI_TELEMETRY_DISABLED","future","isEnabled","name","SSO","AUDIT_LOGS","REVIEW_WORKFLOWS","projectType","flags","nps","promoteEE","get","getFetchClient","data","isTrialLicense","featureName","some","feature","err","console","error","app","StrapiApp","config","appPlugins","register","bootstrap","loadTrads","translations","createRoot","render","module","hot","accept"],"mappings":";;;;;;;AAmBMA,MAAAA,WAAAA,GAAc,OAClBC,SACA,EAAA,EAAEC,OAAO,EAAEC,cAAc,EAAEC,QAAQ,EAAmB,GAAA;AAEtD,IAAA,IAAI,CAACH,SAAW,EAAA;AACd,QAAA,MAAM,IAAII,KAAM,CAAA,yEAAA,CAAA;AAClB;AAEAC,IAAAA,MAAAA,CAAOC,MAAM,GAAG;AACd;;;;;AAKC,QACDC,UAAYC,EAAAA,sBAAAA,CAAkBC,OAAQC,CAAAA,GAAG,CAACC,wBAAwB,CAAA;QAClEC,IAAM,EAAA,KAAA;QACNC,OAAS,EAAA,KAAA;AACTC,QAAAA,iBAAAA,EAAmBL,OAAQC,CAAAA,GAAG,CAACK,yBAAyB,KAAK,MAAA;QAC7DC,MAAQ,EAAA;AACNC,YAAAA,SAAAA,EAAW,CAACC,IAAAA,GAAAA;AACV,gBAAA,OAAOf,QAAUa,EAAAA,MAAAA,GAASE,IAAAA,CAAK,KAAK,IAAA;AACtC;AACF,SAAA;;QAEAf,QAAU,EAAA;YACRgB,GAAK,EAAA,KAAA;YACLC,UAAY,EAAA,YAAA;YACZC,gBAAkB,EAAA,kBAAA;AAClB;;;AAGC,UACDJ,WAAW,IAAM;AACnB,SAAA;QACAK,WAAa,EAAA,WAAA;QACbC,KAAO,EAAA;YACLC,GAAK,EAAA,KAAA;YACLC,SAAW,EAAA;AACb;AACF,KAAA;IAEA,MAAM,EAAEC,GAAG,EAAE,GAAGC,6BAAAA,EAAAA;
|
|
1
|
+
{"version":3,"file":"render.js","sources":["../../../../admin/src/render.ts"],"sourcesContent":["/* eslint-disable no-undef */\nimport { createRoot } from 'react-dom/client';\n\nimport { StrapiApp, StrapiAppConstructorArgs } from './StrapiApp';\nimport { getFetchClient } from './utils/getFetchClient';\nimport { createAbsoluteUrl } from './utils/urls';\n\nimport type { Modules } from '@strapi/types';\n\ninterface RenderAdminArgs {\n customisations: {\n register?: (app: StrapiApp) => Promise<void> | void;\n bootstrap?: (app: StrapiApp) => Promise<void> | void;\n config?: StrapiAppConstructorArgs['config'];\n };\n plugins: StrapiAppConstructorArgs['appPlugins'];\n features?: Modules.Features.FeaturesService['config'];\n}\n\nconst renderAdmin = async (\n mountNode: HTMLElement | null,\n { plugins, customisations, features }: RenderAdminArgs\n) => {\n if (!mountNode) {\n throw new Error('[@strapi/admin]: Could not find the root element to mount the admin app');\n }\n\n window.strapi = {\n /**\n * This ENV variable is passed from the strapi instance, by default no url is set\n * in the config and therefore the instance returns you an empty string so URLs are relative.\n *\n * To ensure that the backendURL is always set, we use the window.location.origin as a fallback.\n */\n backendURL: createAbsoluteUrl(process.env.STRAPI_ADMIN_BACKEND_URL),\n isEE: false,\n isTrial: false,\n telemetryDisabled: process.env.STRAPI_TELEMETRY_DISABLED === 'true',\n future: {\n isEnabled: (name: keyof NonNullable<Modules.Features.FeaturesConfig['future']>) => {\n return features?.future?.[name] === true;\n },\n },\n // @ts-expect-error – there's pollution from the global scope of Node.\n features: {\n SSO: 'sso',\n AUDIT_LOGS: 'audit-logs',\n REVIEW_WORKFLOWS: 'review-workflows',\n /**\n * If we don't get the license then we know it's not EE\n * so no feature is enabled.\n */\n isEnabled: () => false,\n },\n projectType: 'Community',\n flags: {\n nps: false,\n promoteEE: true,\n },\n ai: {\n enabled: true,\n },\n };\n\n const { get } = getFetchClient();\n\n interface ProjectType extends Pick<Window['strapi'], 'flags'> {\n isEE: boolean;\n isTrial: boolean;\n features: {\n name: string;\n }[];\n ai: {\n enabled: boolean;\n };\n }\n\n try {\n const {\n data: {\n data: { isEE, isTrial, features, flags, ai },\n },\n } = await get<{ data: ProjectType }>('/admin/project-type');\n\n window.strapi.isEE = isEE;\n window.strapi.isTrialLicense = isTrial;\n window.strapi.flags = flags;\n window.strapi.features = {\n ...window.strapi.features,\n isEnabled: (featureName) => features.some((feature) => feature.name === featureName),\n };\n window.strapi.projectType = isEE ? 'Enterprise' : 'Community';\n window.strapi.aiLicenseKey = process.env.STRAPI_ADMIN_AI_API_KEY;\n window.strapi.ai = ai;\n } catch (err) {\n /**\n * If this fails, we simply don't activate any EE features.\n * Should we warn clearer in the UI?\n */\n console.error(err);\n }\n\n const app = new StrapiApp({\n config: customisations?.config,\n appPlugins: plugins,\n });\n\n await app.register(customisations?.register);\n await app.bootstrap(customisations?.bootstrap);\n await app.loadTrads(customisations?.config?.translations);\n\n createRoot(mountNode).render(app.render());\n\n if (\n typeof module !== 'undefined' &&\n module &&\n 'hot' in module &&\n typeof module.hot === 'object' &&\n module.hot !== null &&\n 'accept' in module.hot &&\n typeof module.hot.accept === 'function'\n ) {\n module.hot.accept();\n }\n\n if (typeof import.meta.hot?.accept === 'function') {\n import.meta.hot.accept();\n }\n};\n\nexport { renderAdmin };\nexport type { RenderAdminArgs };\n"],"names":["renderAdmin","mountNode","plugins","customisations","features","Error","window","strapi","backendURL","createAbsoluteUrl","process","env","STRAPI_ADMIN_BACKEND_URL","isEE","isTrial","telemetryDisabled","STRAPI_TELEMETRY_DISABLED","future","isEnabled","name","SSO","AUDIT_LOGS","REVIEW_WORKFLOWS","projectType","flags","nps","promoteEE","ai","enabled","get","getFetchClient","data","isTrialLicense","featureName","some","feature","aiLicenseKey","STRAPI_ADMIN_AI_API_KEY","err","console","error","app","StrapiApp","config","appPlugins","register","bootstrap","loadTrads","translations","createRoot","render","module","hot","accept"],"mappings":";;;;;;;AAmBMA,MAAAA,WAAAA,GAAc,OAClBC,SACA,EAAA,EAAEC,OAAO,EAAEC,cAAc,EAAEC,QAAQ,EAAmB,GAAA;AAEtD,IAAA,IAAI,CAACH,SAAW,EAAA;AACd,QAAA,MAAM,I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AAAA,GAAG,CAACC,MAAM,EAAA;AACnB;AAEA,IAAA,IAAI,OAAO,SAAe,EAAEA,WAAW,UAAY,EAAA;QACjD,SAAe,CAACA,MAAM,EAAA;AACxB;AACF;;;;"}
|
|
@@ -36,11 +36,14 @@ const renderAdmin = async (mountNode, { plugins, customisations, features })=>{
|
|
|
36
36
|
flags: {
|
|
37
37
|
nps: false,
|
|
38
38
|
promoteEE: true
|
|
39
|
+
},
|
|
40
|
+
ai: {
|
|
41
|
+
enabled: true
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
44
|
const { get } = getFetchClient();
|
|
42
45
|
try {
|
|
43
|
-
const { data: { data: { isEE, isTrial, features, flags } } } = await get('/admin/project-type');
|
|
46
|
+
const { data: { data: { isEE, isTrial, features, flags, ai } } } = await get('/admin/project-type');
|
|
44
47
|
window.strapi.isEE = isEE;
|
|
45
48
|
window.strapi.isTrialLicense = isTrial;
|
|
46
49
|
window.strapi.flags = flags;
|
|
@@ -49,6 +52,8 @@ const renderAdmin = async (mountNode, { plugins, customisations, features })=>{
|
|
|
49
52
|
isEnabled: (featureName)=>features.some((feature)=>feature.name === featureName)
|
|
50
53
|
};
|
|
51
54
|
window.strapi.projectType = isEE ? 'Enterprise' : 'Community';
|
|
55
|
+
window.strapi.aiLicenseKey = process.env.STRAPI_ADMIN_AI_API_KEY;
|
|
56
|
+
window.strapi.ai = ai;
|
|
52
57
|
} catch (err) {
|
|
53
58
|
/**
|
|
54
59
|
* If this fails, we simply don't activate any EE features.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.mjs","sources":["../../../../admin/src/render.ts"],"sourcesContent":["/* eslint-disable no-undef */\nimport { createRoot } from 'react-dom/client';\n\nimport { StrapiApp, StrapiAppConstructorArgs } from './StrapiApp';\nimport { getFetchClient } from './utils/getFetchClient';\nimport { createAbsoluteUrl } from './utils/urls';\n\nimport type { Modules } from '@strapi/types';\n\ninterface RenderAdminArgs {\n customisations: {\n register?: (app: StrapiApp) => Promise<void> | void;\n bootstrap?: (app: StrapiApp) => Promise<void> | void;\n config?: StrapiAppConstructorArgs['config'];\n };\n plugins: StrapiAppConstructorArgs['appPlugins'];\n features?: Modules.Features.FeaturesService['config'];\n}\n\nconst renderAdmin = async (\n mountNode: HTMLElement | null,\n { plugins, customisations, features }: RenderAdminArgs\n) => {\n if (!mountNode) {\n throw new Error('[@strapi/admin]: Could not find the root element to mount the admin app');\n }\n\n window.strapi = {\n /**\n * This ENV variable is passed from the strapi instance, by default no url is set\n * in the config and therefore the instance returns you an empty string so URLs are relative.\n *\n * To ensure that the backendURL is always set, we use the window.location.origin as a fallback.\n */\n backendURL: createAbsoluteUrl(process.env.STRAPI_ADMIN_BACKEND_URL),\n isEE: false,\n isTrial: false,\n telemetryDisabled: process.env.STRAPI_TELEMETRY_DISABLED === 'true',\n future: {\n isEnabled: (name: keyof NonNullable<Modules.Features.FeaturesConfig['future']>) => {\n return features?.future?.[name] === true;\n },\n },\n // @ts-expect-error – there's pollution from the global scope of Node.\n features: {\n SSO: 'sso',\n AUDIT_LOGS: 'audit-logs',\n REVIEW_WORKFLOWS: 'review-workflows',\n /**\n * If we don't get the license then we know it's not EE\n * so no feature is enabled.\n */\n isEnabled: () => false,\n },\n projectType: 'Community',\n flags: {\n nps: false,\n promoteEE: true,\n },\n };\n\n const { get } = getFetchClient();\n\n interface ProjectType extends Pick<Window['strapi'], 'flags'> {\n isEE: boolean;\n isTrial: boolean;\n features: {\n name: string;\n }[];\n }\n\n try {\n const {\n data: {\n data: { isEE, isTrial, features, flags },\n },\n } = await get<{ data: ProjectType }>('/admin/project-type');\n\n window.strapi.isEE = isEE;\n window.strapi.isTrialLicense = isTrial;\n window.strapi.flags = flags;\n window.strapi.features = {\n ...window.strapi.features,\n isEnabled: (featureName) => features.some((feature) => feature.name === featureName),\n };\n window.strapi.projectType = isEE ? 'Enterprise' : 'Community';\n } catch (err) {\n /**\n * If this fails, we simply don't activate any EE features.\n * Should we warn clearer in the UI?\n */\n console.error(err);\n }\n\n const app = new StrapiApp({\n config: customisations?.config,\n appPlugins: plugins,\n });\n\n await app.register(customisations?.register);\n await app.bootstrap(customisations?.bootstrap);\n await app.loadTrads(customisations?.config?.translations);\n\n createRoot(mountNode).render(app.render());\n\n if (\n typeof module !== 'undefined' &&\n module &&\n 'hot' in module &&\n typeof module.hot === 'object' &&\n module.hot !== null &&\n 'accept' in module.hot &&\n typeof module.hot.accept === 'function'\n ) {\n module.hot.accept();\n }\n\n if (typeof import.meta.hot?.accept === 'function') {\n import.meta.hot.accept();\n }\n};\n\nexport { renderAdmin };\nexport type { RenderAdminArgs };\n"],"names":["renderAdmin","mountNode","plugins","customisations","features","Error","window","strapi","backendURL","createAbsoluteUrl","process","env","STRAPI_ADMIN_BACKEND_URL","isEE","isTrial","telemetryDisabled","STRAPI_TELEMETRY_DISABLED","future","isEnabled","name","SSO","AUDIT_LOGS","REVIEW_WORKFLOWS","projectType","flags","nps","promoteEE","get","getFetchClient","data","isTrialLicense","featureName","some","feature","err","console","error","app","StrapiApp","config","appPlugins","register","bootstrap","loadTrads","translations","createRoot","render","module","hot","accept"],"mappings":";;;;;AAmBMA,MAAAA,WAAAA,GAAc,OAClBC,SACA,EAAA,EAAEC,OAAO,EAAEC,cAAc,EAAEC,QAAQ,EAAmB,GAAA;AAEtD,IAAA,IAAI,CAACH,SAAW,EAAA;AACd,QAAA,MAAM,IAAII,KAAM,CAAA,yEAAA,CAAA;AAClB;AAEAC,IAAAA,MAAAA,CAAOC,MAAM,GAAG;AACd;;;;;AAKC,QACDC,UAAYC,EAAAA,iBAAAA,CAAkBC,OAAQC,CAAAA,GAAG,CAACC,wBAAwB,CAAA;QAClEC,IAAM,EAAA,KAAA;QACNC,OAAS,EAAA,KAAA;AACTC,QAAAA,iBAAAA,EAAmBL,OAAQC,CAAAA,GAAG,CAACK,yBAAyB,KAAK,MAAA;QAC7DC,MAAQ,EAAA;AACNC,YAAAA,SAAAA,EAAW,CAACC,IAAAA,GAAAA;AACV,gBAAA,OAAOf,QAAUa,EAAAA,MAAAA,GAASE,IAAAA,CAAK,KAAK,IAAA;AACtC;AACF,SAAA;;QAEAf,QAAU,EAAA;YACRgB,GAAK,EAAA,KAAA;YACLC,UAAY,EAAA,YAAA;YACZC,gBAAkB,EAAA,kBAAA;AAClB;;;AAGC,UACDJ,WAAW,IAAM;AACnB,SAAA;QACAK,WAAa,EAAA,WAAA;QACbC,KAAO,EAAA;YACLC,GAAK,EAAA,KAAA;YACLC,SAAW,EAAA;AACb;AACF,KAAA;IAEA,MAAM,EAAEC,GAAG,EAAE,GAAGC,cAAAA,EAAAA;
|
|
1
|
+
{"version":3,"file":"render.mjs","sources":["../../../../admin/src/render.ts"],"sourcesContent":["/* eslint-disable no-undef */\nimport { createRoot } from 'react-dom/client';\n\nimport { StrapiApp, StrapiAppConstructorArgs } from './StrapiApp';\nimport { getFetchClient } from './utils/getFetchClient';\nimport { createAbsoluteUrl } from './utils/urls';\n\nimport type { Modules } from '@strapi/types';\n\ninterface RenderAdminArgs {\n customisations: {\n register?: (app: StrapiApp) => Promise<void> | void;\n bootstrap?: (app: StrapiApp) => Promise<void> | void;\n config?: StrapiAppConstructorArgs['config'];\n };\n plugins: StrapiAppConstructorArgs['appPlugins'];\n features?: Modules.Features.FeaturesService['config'];\n}\n\nconst renderAdmin = async (\n mountNode: HTMLElement | null,\n { plugins, customisations, features }: RenderAdminArgs\n) => {\n if (!mountNode) {\n throw new Error('[@strapi/admin]: Could not find the root element to mount the admin app');\n }\n\n window.strapi = {\n /**\n * This ENV variable is passed from the strapi instance, by default no url is set\n * in the config and therefore the instance returns you an empty string so URLs are relative.\n *\n * To ensure that the backendURL is always set, we use the window.location.origin as a fallback.\n */\n backendURL: createAbsoluteUrl(process.env.STRAPI_ADMIN_BACKEND_URL),\n isEE: false,\n isTrial: false,\n telemetryDisabled: process.env.STRAPI_TELEMETRY_DISABLED === 'true',\n future: {\n isEnabled: (name: keyof NonNullable<Modules.Features.FeaturesConfig['future']>) => {\n return features?.future?.[name] === true;\n },\n },\n // @ts-expect-error – there's pollution from the global scope of Node.\n features: {\n SSO: 'sso',\n AUDIT_LOGS: 'audit-logs',\n REVIEW_WORKFLOWS: 'review-workflows',\n /**\n * If we don't get the license then we know it's not EE\n * so no feature is enabled.\n */\n isEnabled: () => false,\n },\n projectType: 'Community',\n flags: {\n nps: false,\n promoteEE: true,\n },\n ai: {\n enabled: true,\n },\n };\n\n const { get } = getFetchClient();\n\n interface ProjectType extends Pick<Window['strapi'], 'flags'> {\n isEE: boolean;\n isTrial: boolean;\n features: {\n name: string;\n }[];\n ai: {\n enabled: boolean;\n };\n }\n\n try {\n const {\n data: {\n data: { isEE, isTrial, features, flags, ai },\n },\n } = await get<{ data: ProjectType }>('/admin/project-type');\n\n window.strapi.isEE = isEE;\n window.strapi.isTrialLicense = isTrial;\n window.strapi.flags = flags;\n window.strapi.features = {\n ...window.strapi.features,\n isEnabled: (featureName) => features.some((feature) => feature.name === featureName),\n };\n window.strapi.projectType = isEE ? 'Enterprise' : 'Community';\n window.strapi.aiLicenseKey = process.env.STRAPI_ADMIN_AI_API_KEY;\n window.strapi.ai = ai;\n } catch (err) {\n /**\n * If this fails, we simply don't activate any EE features.\n * Should we warn clearer in the UI?\n */\n console.error(err);\n }\n\n const app = new StrapiApp({\n config: customisations?.config,\n appPlugins: plugins,\n });\n\n await app.register(customisations?.register);\n await app.bootstrap(customisations?.bootstrap);\n await app.loadTrads(customisations?.config?.translations);\n\n createRoot(mountNode).render(app.render());\n\n if (\n typeof module !== 'undefined' &&\n module &&\n 'hot' in module &&\n typeof module.hot === 'object' &&\n module.hot !== null &&\n 'accept' in module.hot &&\n typeof module.hot.accept === 'function'\n ) {\n module.hot.accept();\n }\n\n if (typeof import.meta.hot?.accept === 'function') {\n import.meta.hot.accept();\n }\n};\n\nexport { renderAdmin };\nexport type { RenderAdminArgs };\n"],"names":["renderAdmin","mountNode","plugins","customisations","features","Error","window","strapi","backendURL","createAbsoluteUrl","process","env","STRAPI_ADMIN_BACKEND_URL","isEE","isTrial","telemetryDisabled","STRAPI_TELEMETRY_DISABLED","future","isEnabled","name","SSO","AUDIT_LOGS","REVIEW_WORKFLOWS","projectType","flags","nps","promoteEE","ai","enabled","get","getFetchClient","data","isTrialLicense","featureName","some","feature","aiLicenseKey","STRAPI_ADMIN_AI_API_KEY","err","console","error","app","StrapiApp","config","appPlugins","register","bootstrap","loadTrads","translations","createRoot","render","module","hot","accept"],"mappings":";;;;;AAmBMA,MAAAA,WAAAA,GAAc,OAClBC,SACA,EAAA,EAAEC,OAAO,EAAEC,cAAc,EAAEC,QAAQ,EAAmB,GAAA;AAEtD,IAAA,IAAI,CAACH,SAAW,EAAA;AACd,QAAA,MAAM,IAAII,KAAM,CAAA,yEAAA,CAAA;AAClB;AAEAC,IAAAA,MAAAA,CAAOC,MAAM,GAAG;AACd;;;;;AAKC,QACDC,UAAYC,EAAAA,iBAAAA,CAAkBC,OAAQC,CAAAA,GAAG,CAACC,wBAAwB,CAAA;QAClEC,IAAM,EAAA,KAAA;QACNC,OAAS,EAAA,KAAA;AACTC,QAAAA,iBAAAA,EAAmBL,OAAQC,CAAAA,GAAG,CAACK,yBAAyB,KAAK,MAAA;QAC7DC,MAAQ,EAAA;AACNC,YAAAA,SAAAA,EAAW,CAACC,IAAAA,GAAAA;AACV,gBAAA,OAAOf,QAAUa,EAAAA,MAAAA,GAASE,IAAAA,CAAK,KAAK,IAAA;AACtC;AACF,SAAA;;QAEAf,QAAU,EAAA;YACRgB,GAAK,EAAA,KAAA;YACLC,UAAY,EAAA,YAAA;YACZC,gBAAkB,EAAA,kBAAA;AAClB;;;AAGC,UACDJ,WAAW,IAAM;AACnB,SAAA;QACAK,WAAa,EAAA,WAAA;QACbC,KAAO,EAAA;YACLC,GAAK,EAAA,KAAA;YACLC,SAAW,EAAA;AACb,SAAA;QACAC,EAAI,EAAA;YACFC,OAAS,EAAA;AACX;AACF,KAAA;IAEA,MAAM,EAAEC,GAAG,EAAE,GAAGC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,GAAIM,CAAAA,SAAS,CAAC5C,cAAAA,EAAgBwC,MAAQK,EAAAA,YAAAA,CAAAA;AAE5CC,IAAAA,UAAAA,CAAWhD,SAAWiD,CAAAA,CAAAA,MAAM,CAACT,GAAAA,CAAIS,MAAM,EAAA,CAAA;IAEvC,IACE,OAAOC,MAAW,KAAA,WAAA,IAClBA,MACA,IAAA,KAAA,IAASA,UACT,OAAOA,MAAAA,CAAOC,GAAG,KAAK,QACtBD,IAAAA,MAAAA,CAAOC,GAAG,KAAK,IAAA,IACf,QAAYD,IAAAA,MAAAA,CAAOC,GAAG,IACtB,OAAOD,MAAAA,CAAOC,GAAG,CAACC,MAAM,KAAK,UAC7B,EAAA;QACAF,MAAOC,CAAAA,GAAG,CAACC,MAAM,EAAA;AACnB;AAEA,IAAA,IAAI,OAAO,MAAA,CAAA,IAAA,CAAYD,GAAG,EAAEC,WAAW,UAAY,EAAA;QACjD,MAAYD,CAAAA,IAAAA,CAAAA,GAAG,CAACC,MAAM,EAAA;AACxB;AACF;;;;"}
|
|
@@ -21,11 +21,25 @@ const homepageService = api.adminApi.enhanceEndpoints({
|
|
|
21
21
|
providesTags: (_, _err)=>[
|
|
22
22
|
'CountDocuments'
|
|
23
23
|
]
|
|
24
|
+
}),
|
|
25
|
+
getHomepageLayout: builder.query({
|
|
26
|
+
query: ()=>'/admin/homepage/layout',
|
|
27
|
+
transformResponse: (r)=>r.data
|
|
28
|
+
}),
|
|
29
|
+
updateHomepageLayout: builder.mutation({
|
|
30
|
+
query: (body)=>({
|
|
31
|
+
url: '/admin/homepage/layout',
|
|
32
|
+
method: 'PUT',
|
|
33
|
+
body
|
|
34
|
+
}),
|
|
35
|
+
transformResponse: (r)=>r.data
|
|
24
36
|
})
|
|
25
37
|
})
|
|
26
38
|
});
|
|
27
|
-
const { useGetKeyStatisticsQuery, useGetCountDocumentsQuery } = homepageService;
|
|
39
|
+
const { useGetKeyStatisticsQuery, useGetCountDocumentsQuery, useGetHomepageLayoutQuery, useUpdateHomepageLayoutMutation } = homepageService;
|
|
28
40
|
|
|
29
41
|
exports.useGetCountDocumentsQuery = useGetCountDocumentsQuery;
|
|
42
|
+
exports.useGetHomepageLayoutQuery = useGetHomepageLayoutQuery;
|
|
30
43
|
exports.useGetKeyStatisticsQuery = useGetKeyStatisticsQuery;
|
|
44
|
+
exports.useUpdateHomepageLayoutMutation = useUpdateHomepageLayoutMutation;
|
|
31
45
|
//# sourceMappingURL=homepage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homepage.js","sources":["../../../../../admin/src/services/homepage.ts"],"sourcesContent":["import * as Homepage from '../../../shared/contracts/homepage';\n\nimport { adminApi } from './api';\n\nconst homepageService = adminApi\n .enhanceEndpoints({\n addTagTypes: ['CountDocuments'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n getKeyStatistics: builder.query<Homepage.GetKeyStatistics.Response['data'], void>({\n query: () => '/admin/homepage/key-statistics',\n transformResponse: (response: Homepage.GetKeyStatistics.Response) => response.data,\n providesTags: (_, _err) => ['HomepageKeyStatistics'],\n }),\n getCountDocuments: builder.query<Homepage.GetCountDocuments.Response['data'], void>({\n query: () => '/content-manager/homepage/count-documents',\n transformResponse: (response: Homepage.GetCountDocuments.Response) => response.data,\n providesTags: (_, _err) => ['CountDocuments'],\n }),\n }),\n });\n\nconst {
|
|
1
|
+
{"version":3,"file":"homepage.js","sources":["../../../../../admin/src/services/homepage.ts"],"sourcesContent":["import * as Homepage from '../../../shared/contracts/homepage';\n\nimport { adminApi } from './api';\n\nconst homepageService = adminApi\n .enhanceEndpoints({\n addTagTypes: ['CountDocuments'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n getKeyStatistics: builder.query<Homepage.GetKeyStatistics.Response['data'], void>({\n query: () => '/admin/homepage/key-statistics',\n transformResponse: (response: Homepage.GetKeyStatistics.Response) => response.data,\n providesTags: (_, _err) => ['HomepageKeyStatistics'],\n }),\n getCountDocuments: builder.query<Homepage.GetCountDocuments.Response['data'], void>({\n query: () => '/content-manager/homepage/count-documents',\n transformResponse: (response: Homepage.GetCountDocuments.Response) => response.data,\n providesTags: (_, _err) => ['CountDocuments'],\n }),\n getHomepageLayout: builder.query<Homepage.GetHomepageLayout.Response['data'], void>({\n query: () => '/admin/homepage/layout',\n transformResponse: (r: Homepage.GetHomepageLayout.Response) => r.data,\n }),\n updateHomepageLayout: builder.mutation<\n Homepage.UpdateHomepageLayout.Response['data'],\n Homepage.UpdateHomepageLayout.Request['body']\n >({\n query: (body) => ({ url: '/admin/homepage/layout', method: 'PUT', body }),\n transformResponse: (r: Homepage.UpdateHomepageLayout.Response) => r.data,\n }),\n }),\n });\n\nconst {\n useGetKeyStatisticsQuery,\n useGetCountDocumentsQuery,\n useGetHomepageLayoutQuery,\n useUpdateHomepageLayoutMutation,\n} = homepageService;\n\nexport {\n useGetKeyStatisticsQuery,\n useGetCountDocumentsQuery,\n useGetHomepageLayoutQuery,\n useUpdateHomepageLayoutMutation,\n};\n"],"names":["homepageService","adminApi","enhanceEndpoints","addTagTypes","injectEndpoints","endpoints","builder","getKeyStatistics","query","transformResponse","response","data","providesTags","_","_err","getCountDocuments","getHomepageLayout","r","updateHomepageLayout","mutation","body","url","method","useGetKeyStatisticsQuery","useGetCountDocumentsQuery","useGetHomepageLayoutQuery","useUpdateHomepageLayoutMutation"],"mappings":";;;;AAIA,MAAMA,eAAAA,GAAkBC,YACrBC,CAAAA,gBAAgB,CAAC;IAChBC,WAAa,EAAA;AAAC,QAAA;AAAiB;AACjC,CAAA,CAAA,CACCC,eAAe,CAAC;IACfC,SAAW,EAAA,CAACC,WAAa;YACvBC,gBAAkBD,EAAAA,OAAAA,CAAQE,KAAK,CAAmD;AAChFA,gBAAAA,KAAAA,EAAO,IAAM,gCAAA;gBACbC,iBAAmB,EAAA,CAACC,QAAiDA,GAAAA,QAAAA,CAASC,IAAI;gBAClFC,YAAc,EAAA,CAACC,GAAGC,IAAS,GAAA;AAAC,wBAAA;AAAwB;AACtD,aAAA,CAAA;YACAC,iBAAmBT,EAAAA,OAAAA,CAAQE,KAAK,CAAoD;AAClFA,gBAAAA,KAAAA,EAAO,IAAM,2CAAA;gBACbC,iBAAmB,EAAA,CAACC,QAAkDA,GAAAA,QAAAA,CAASC,IAAI;gBACnFC,YAAc,EAAA,CAACC,GAAGC,IAAS,GAAA;AAAC,wBAAA;AAAiB;AAC/C,aAAA,CAAA;YACAE,iBAAmBV,EAAAA,OAAAA,CAAQE,KAAK,CAAoD;AAClFA,gBAAAA,KAAAA,EAAO,IAAM,wBAAA;gBACbC,iBAAmB,EAAA,CAACQ,CAA2CA,GAAAA,CAAAA,CAAEN;AACnE,aAAA,CAAA;YACAO,oBAAsBZ,EAAAA,OAAAA,CAAQa,QAAQ,CAGpC;gBACAX,KAAO,EAAA,CAACY,QAAU;wBAAEC,GAAK,EAAA,wBAAA;wBAA0BC,MAAQ,EAAA,KAAA;AAAOF,wBAAAA;qBAAK,CAAA;gBACvEX,iBAAmB,EAAA,CAACQ,CAA8CA,GAAAA,CAAAA,CAAEN;AACtE,aAAA;SACF;AACF,CAAA,CAAA;AAEI,MAAA,EACJY,wBAAwB,EACxBC,yBAAyB,EACzBC,yBAAyB,EACzBC,+BAA+B,EAChC,GAAG1B;;;;;;;"}
|
|
@@ -19,10 +19,22 @@ const homepageService = adminApi.enhanceEndpoints({
|
|
|
19
19
|
providesTags: (_, _err)=>[
|
|
20
20
|
'CountDocuments'
|
|
21
21
|
]
|
|
22
|
+
}),
|
|
23
|
+
getHomepageLayout: builder.query({
|
|
24
|
+
query: ()=>'/admin/homepage/layout',
|
|
25
|
+
transformResponse: (r)=>r.data
|
|
26
|
+
}),
|
|
27
|
+
updateHomepageLayout: builder.mutation({
|
|
28
|
+
query: (body)=>({
|
|
29
|
+
url: '/admin/homepage/layout',
|
|
30
|
+
method: 'PUT',
|
|
31
|
+
body
|
|
32
|
+
}),
|
|
33
|
+
transformResponse: (r)=>r.data
|
|
22
34
|
})
|
|
23
35
|
})
|
|
24
36
|
});
|
|
25
|
-
const { useGetKeyStatisticsQuery, useGetCountDocumentsQuery } = homepageService;
|
|
37
|
+
const { useGetKeyStatisticsQuery, useGetCountDocumentsQuery, useGetHomepageLayoutQuery, useUpdateHomepageLayoutMutation } = homepageService;
|
|
26
38
|
|
|
27
|
-
export { useGetCountDocumentsQuery, useGetKeyStatisticsQuery };
|
|
39
|
+
export { useGetCountDocumentsQuery, useGetHomepageLayoutQuery, useGetKeyStatisticsQuery, useUpdateHomepageLayoutMutation };
|
|
28
40
|
//# sourceMappingURL=homepage.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homepage.mjs","sources":["../../../../../admin/src/services/homepage.ts"],"sourcesContent":["import * as Homepage from '../../../shared/contracts/homepage';\n\nimport { adminApi } from './api';\n\nconst homepageService = adminApi\n .enhanceEndpoints({\n addTagTypes: ['CountDocuments'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n getKeyStatistics: builder.query<Homepage.GetKeyStatistics.Response['data'], void>({\n query: () => '/admin/homepage/key-statistics',\n transformResponse: (response: Homepage.GetKeyStatistics.Response) => response.data,\n providesTags: (_, _err) => ['HomepageKeyStatistics'],\n }),\n getCountDocuments: builder.query<Homepage.GetCountDocuments.Response['data'], void>({\n query: () => '/content-manager/homepage/count-documents',\n transformResponse: (response: Homepage.GetCountDocuments.Response) => response.data,\n providesTags: (_, _err) => ['CountDocuments'],\n }),\n }),\n });\n\nconst {
|
|
1
|
+
{"version":3,"file":"homepage.mjs","sources":["../../../../../admin/src/services/homepage.ts"],"sourcesContent":["import * as Homepage from '../../../shared/contracts/homepage';\n\nimport { adminApi } from './api';\n\nconst homepageService = adminApi\n .enhanceEndpoints({\n addTagTypes: ['CountDocuments'],\n })\n .injectEndpoints({\n endpoints: (builder) => ({\n getKeyStatistics: builder.query<Homepage.GetKeyStatistics.Response['data'], void>({\n query: () => '/admin/homepage/key-statistics',\n transformResponse: (response: Homepage.GetKeyStatistics.Response) => response.data,\n providesTags: (_, _err) => ['HomepageKeyStatistics'],\n }),\n getCountDocuments: builder.query<Homepage.GetCountDocuments.Response['data'], void>({\n query: () => '/content-manager/homepage/count-documents',\n transformResponse: (response: Homepage.GetCountDocuments.Response) => response.data,\n providesTags: (_, _err) => ['CountDocuments'],\n }),\n getHomepageLayout: builder.query<Homepage.GetHomepageLayout.Response['data'], void>({\n query: () => '/admin/homepage/layout',\n transformResponse: (r: Homepage.GetHomepageLayout.Response) => r.data,\n }),\n updateHomepageLayout: builder.mutation<\n Homepage.UpdateHomepageLayout.Response['data'],\n Homepage.UpdateHomepageLayout.Request['body']\n >({\n query: (body) => ({ url: '/admin/homepage/layout', method: 'PUT', body }),\n transformResponse: (r: Homepage.UpdateHomepageLayout.Response) => r.data,\n }),\n }),\n });\n\nconst {\n useGetKeyStatisticsQuery,\n useGetCountDocumentsQuery,\n useGetHomepageLayoutQuery,\n useUpdateHomepageLayoutMutation,\n} = homepageService;\n\nexport {\n useGetKeyStatisticsQuery,\n useGetCountDocumentsQuery,\n useGetHomepageLayoutQuery,\n useUpdateHomepageLayoutMutation,\n};\n"],"names":["homepageService","adminApi","enhanceEndpoints","addTagTypes","injectEndpoints","endpoints","builder","getKeyStatistics","query","transformResponse","response","data","providesTags","_","_err","getCountDocuments","getHomepageLayout","r","updateHomepageLayout","mutation","body","url","method","useGetKeyStatisticsQuery","useGetCountDocumentsQuery","useGetHomepageLayoutQuery","useUpdateHomepageLayoutMutation"],"mappings":";;AAIA,MAAMA,eAAAA,GAAkBC,QACrBC,CAAAA,gBAAgB,CAAC;IAChBC,WAAa,EAAA;AAAC,QAAA;AAAiB;AACjC,CAAA,CAAA,CACCC,eAAe,CAAC;IACfC,SAAW,EAAA,CAACC,WAAa;YACvBC,gBAAkBD,EAAAA,OAAAA,CAAQE,KAAK,CAAmD;AAChFA,gBAAAA,KAAAA,EAAO,IAAM,gCAAA;gBACbC,iBAAmB,EAAA,CAACC,QAAiDA,GAAAA,QAAAA,CAASC,IAAI;gBAClFC,YAAc,EAAA,CAACC,GAAGC,IAAS,GAAA;AAAC,wBAAA;AAAwB;AACtD,aAAA,CAAA;YACAC,iBAAmBT,EAAAA,OAAAA,CAAQE,KAAK,CAAoD;AAClFA,gBAAAA,KAAAA,EAAO,IAAM,2CAAA;gBACbC,iBAAmB,EAAA,CAACC,QAAkDA,GAAAA,QAAAA,CAASC,IAAI;gBACnFC,YAAc,EAAA,CAACC,GAAGC,IAAS,GAAA;AAAC,wBAAA;AAAiB;AAC/C,aAAA,CAAA;YACAE,iBAAmBV,EAAAA,OAAAA,CAAQE,KAAK,CAAoD;AAClFA,gBAAAA,KAAAA,EAAO,IAAM,wBAAA;gBACbC,iBAAmB,EAAA,CAACQ,CAA2CA,GAAAA,CAAAA,CAAEN;AACnE,aAAA,CAAA;YACAO,oBAAsBZ,EAAAA,OAAAA,CAAQa,QAAQ,CAGpC;gBACAX,KAAO,EAAA,CAACY,QAAU;wBAAEC,GAAK,EAAA,wBAAA;wBAA0BC,MAAQ,EAAA,KAAA;AAAOF,wBAAAA;qBAAK,CAAA;gBACvEX,iBAAmB,EAAA,CAACQ,CAA8CA,GAAAA,CAAAA,CAAEN;AACtE,aAAA;SACF;AACF,CAAA,CAAA;AAEI,MAAA,EACJY,wBAAwB,EACxBC,yBAAyB,EACzBC,yBAAyB,EACzBC,+BAA+B,EAChC,GAAG1B;;;;"}
|
|
@@ -827,6 +827,8 @@ var en = {
|
|
|
827
827
|
submit: submit,
|
|
828
828
|
"tours.contentTypeBuilder.Introduction.title": "Welcome to the Content-Type Builder!",
|
|
829
829
|
"tours.contentTypeBuilder.Introduction.content": "Here you create and manage the structure of your app with collection types, single types, and reusable components. Let's dive in!",
|
|
830
|
+
"tours.contentTypeBuilder.AIChat.title": "Time to get started!",
|
|
831
|
+
"tours.contentTypeBuilder.AIChat.content": "<p>If you have any questions about the Content-Type Builder or Strapi ask them here.</p><p>Strapi AI can generate schemas tailored to your needs. Ask for exactly what you want, for example:<ul><li>Date picker</li><li>Email and password fields</li><li>Media of any type</li><li>UIDs</li></ul></p><p>Don’t be shy, try it out !</p>",
|
|
830
832
|
"tours.contentTypeBuilder.CollectionTypes.title": "Collection Types",
|
|
831
833
|
"tours.contentTypeBuilder.CollectionTypes.content": "These are your go-to for managing multiple entries — think blog posts or products.",
|
|
832
834
|
"tours.contentTypeBuilder.SingleTypes.title": "Single Types",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -823,6 +823,8 @@ var en = {
|
|
|
823
823
|
submit: submit,
|
|
824
824
|
"tours.contentTypeBuilder.Introduction.title": "Welcome to the Content-Type Builder!",
|
|
825
825
|
"tours.contentTypeBuilder.Introduction.content": "Here you create and manage the structure of your app with collection types, single types, and reusable components. Let's dive in!",
|
|
826
|
+
"tours.contentTypeBuilder.AIChat.title": "Time to get started!",
|
|
827
|
+
"tours.contentTypeBuilder.AIChat.content": "<p>If you have any questions about the Content-Type Builder or Strapi ask them here.</p><p>Strapi AI can generate schemas tailored to your needs. Ask for exactly what you want, for example:<ul><li>Date picker</li><li>Email and password fields</li><li>Media of any type</li><li>UIDs</li></ul></p><p>Don’t be shy, try it out !</p>",
|
|
826
828
|
"tours.contentTypeBuilder.CollectionTypes.title": "Collection Types",
|
|
827
829
|
"tours.contentTypeBuilder.CollectionTypes.content": "These are your go-to for managing multiple entries — think blog posts or products.",
|
|
828
830
|
"tours.contentTypeBuilder.SingleTypes.title": "Single Types",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var useAIUsageWarning = require('../hooks/useAIUsageWarning.js');
|
|
4
|
+
|
|
5
|
+
const GlobalNotifications = ()=>{
|
|
6
|
+
useAIUsageWarning.useAIUsageWarning();
|
|
7
|
+
return null;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
exports.GlobalNotifications = GlobalNotifications;
|
|
11
|
+
//# sourceMappingURL=GlobalNotifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalNotifications.js","sources":["../../../../../../ee/admin/src/components/GlobalNotifications.tsx"],"sourcesContent":["import { useAIUsageWarning } from '../hooks/useAIUsageWarning';\n\nexport const GlobalNotifications = () => {\n useAIUsageWarning();\n\n return null;\n};\n"],"names":["GlobalNotifications","useAIUsageWarning"],"mappings":";;;;MAEaA,mBAAsB,GAAA,IAAA;AACjCC,IAAAA,mCAAAA,EAAAA;IAEA,OAAO,IAAA;AACT;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalNotifications.mjs","sources":["../../../../../../ee/admin/src/components/GlobalNotifications.tsx"],"sourcesContent":["import { useAIUsageWarning } from '../hooks/useAIUsageWarning';\n\nexport const GlobalNotifications = () => {\n useAIUsageWarning();\n\n return null;\n};\n"],"names":["GlobalNotifications","useAIUsageWarning"],"mappings":";;MAEaA,mBAAsB,GAAA,IAAA;AACjCC,IAAAA,iBAAAA,EAAAA;IAEA,OAAO,IAAA;AACT;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const useAIAvailability = ()=>{
|
|
4
|
+
const isAiEnabled = window.strapi.ai?.enabled !== false;
|
|
5
|
+
const isEE = window.strapi?.isEE;
|
|
6
|
+
const isAiFeatureEnabled = window.strapi.features.isEnabled('cms-ai');
|
|
7
|
+
return !!isEE && isAiEnabled && isAiFeatureEnabled;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
exports.useAIAvailability = useAIAvailability;
|
|
11
|
+
//# sourceMappingURL=useAIAvailability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAIAvailability.js","sources":["../../../../../../ee/admin/src/hooks/useAIAvailability.ts"],"sourcesContent":["export const useAIAvailability = (): boolean => {\n const isAiEnabled = window.strapi.ai?.enabled !== false;\n const isEE = window.strapi?.isEE;\n const isAiFeatureEnabled = window.strapi.features.isEnabled('cms-ai');\n\n return !!isEE && isAiEnabled && isAiFeatureEnabled;\n};\n"],"names":["useAIAvailability","isAiEnabled","window","strapi","ai","enabled","isEE","isAiFeatureEnabled","features","isEnabled"],"mappings":";;MAAaA,iBAAoB,GAAA,IAAA;AAC/B,IAAA,MAAMC,cAAcC,MAAOC,CAAAA,MAAM,CAACC,EAAE,EAAEC,OAAY,KAAA,KAAA;IAClD,MAAMC,IAAAA,GAAOJ,MAAOC,CAAAA,MAAM,EAAEG,IAAAA;AAC5B,IAAA,MAAMC,qBAAqBL,MAAOC,CAAAA,MAAM,CAACK,QAAQ,CAACC,SAAS,CAAC,QAAA,CAAA;IAE5D,OAAO,CAAC,CAACH,IAAAA,IAAQL,WAAeM,IAAAA,kBAAAA;AAClC;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const useAIAvailability = ()=>{
|
|
2
|
+
const isAiEnabled = window.strapi.ai?.enabled !== false;
|
|
3
|
+
const isEE = window.strapi?.isEE;
|
|
4
|
+
const isAiFeatureEnabled = window.strapi.features.isEnabled('cms-ai');
|
|
5
|
+
return !!isEE && isAiEnabled && isAiFeatureEnabled;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export { useAIAvailability };
|
|
9
|
+
//# sourceMappingURL=useAIAvailability.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAIAvailability.mjs","sources":["../../../../../../ee/admin/src/hooks/useAIAvailability.ts"],"sourcesContent":["export const useAIAvailability = (): boolean => {\n const isAiEnabled = window.strapi.ai?.enabled !== false;\n const isEE = window.strapi?.isEE;\n const isAiFeatureEnabled = window.strapi.features.isEnabled('cms-ai');\n\n return !!isEE && isAiEnabled && isAiFeatureEnabled;\n};\n"],"names":["useAIAvailability","isAiEnabled","window","strapi","ai","enabled","isEE","isAiFeatureEnabled","features","isEnabled"],"mappings":"MAAaA,iBAAoB,GAAA,IAAA;AAC/B,IAAA,MAAMC,cAAcC,MAAOC,CAAAA,MAAM,CAACC,EAAE,EAAEC,OAAY,KAAA,KAAA;IAClD,MAAMC,IAAAA,GAAOJ,MAAOC,CAAAA,MAAM,EAAEG,IAAAA;AAC5B,IAAA,MAAMC,qBAAqBL,MAAOC,CAAAA,MAAM,CAACK,QAAQ,CAACC,SAAS,CAAC,QAAA,CAAA;IAE5D,OAAO,CAAC,CAACH,IAAAA,IAAQL,WAAeM,IAAAA,kBAAAA;AAClC;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactRouterDom = require('react-router-dom');
|
|
5
|
+
var Notifications = require('../../../../admin/src/features/Notifications.js');
|
|
6
|
+
var ai = require('../services/ai.js');
|
|
7
|
+
var useAIAvailability = require('./useAIAvailability.js');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Triggers a warning notification if AI usage is above a threshold (default 80%).
|
|
11
|
+
* @param threshold - Usage percentage (0-1) at which to warn. Default: 0.8 (80%)
|
|
12
|
+
*/ function useAIUsageWarning(threshold = 0.8) {
|
|
13
|
+
const location = reactRouterDom.useLocation();
|
|
14
|
+
const isAuthPage = location.pathname.startsWith('/auth');
|
|
15
|
+
const { toggleNotification } = Notifications.useNotification();
|
|
16
|
+
const isAIEnabled = useAIAvailability.useAIAvailability();
|
|
17
|
+
const { data, isLoading, error } = ai.useGetAIUsageQuery(undefined, {
|
|
18
|
+
refetchOnMountOrArgChange: true,
|
|
19
|
+
skip: !isAIEnabled || isAuthPage
|
|
20
|
+
});
|
|
21
|
+
const warningLevelsRef = React.useRef(new Set());
|
|
22
|
+
React.useEffect(()=>{
|
|
23
|
+
if (isAuthPage || isLoading || error || !data?.subscription?.cmsAiEnabled || !isAIEnabled) return;
|
|
24
|
+
const totalCredits = data.subscription.cmsAiCreditsBase;
|
|
25
|
+
const usedCredits = data.cmsAiCreditsUsed;
|
|
26
|
+
const maxCredits = data.subscription.cmsAiCreditsMaxUsage;
|
|
27
|
+
if (!totalCredits || totalCredits <= 0) return;
|
|
28
|
+
const percentUsed = usedCredits / totalCredits;
|
|
29
|
+
const percentDisplay = Math.round(percentUsed * 100);
|
|
30
|
+
const remaining = Math.max(totalCredits - usedCredits, 0);
|
|
31
|
+
if (percentUsed >= 1 && !warningLevelsRef.current.has(100)) {
|
|
32
|
+
const hasOverageAllowance = maxCredits && maxCredits > totalCredits;
|
|
33
|
+
if (hasOverageAllowance) {
|
|
34
|
+
// Overages notification (error style)
|
|
35
|
+
toggleNotification({
|
|
36
|
+
type: 'danger',
|
|
37
|
+
message: `You've used 100% of your AI credits. Overages are being applied.`,
|
|
38
|
+
timeout: 5000
|
|
39
|
+
});
|
|
40
|
+
} else {
|
|
41
|
+
// No overages allowed - credits exhausted
|
|
42
|
+
toggleNotification({
|
|
43
|
+
type: 'danger',
|
|
44
|
+
message: `You've exhausted your AI credits. No additional credits available.`,
|
|
45
|
+
timeout: 5000
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
warningLevelsRef.current.add(100);
|
|
49
|
+
} else if (percentUsed >= 0.9 && percentUsed < 1 && !warningLevelsRef.current.has(90)) {
|
|
50
|
+
// 90% warning notification
|
|
51
|
+
toggleNotification({
|
|
52
|
+
type: 'warning',
|
|
53
|
+
message: `You've used ${percentDisplay}% of your AI credits. ${remaining} remain.`,
|
|
54
|
+
timeout: 5000
|
|
55
|
+
});
|
|
56
|
+
warningLevelsRef.current.add(90);
|
|
57
|
+
} else if (percentUsed >= threshold && percentUsed < 0.9 && !warningLevelsRef.current.has(Math.round(threshold * 100))) {
|
|
58
|
+
// Initial threshold warning (default 80%)
|
|
59
|
+
toggleNotification({
|
|
60
|
+
type: 'warning',
|
|
61
|
+
message: `You've used ${percentDisplay}% of your AI credits. ${remaining} remain.`,
|
|
62
|
+
timeout: 5000
|
|
63
|
+
});
|
|
64
|
+
warningLevelsRef.current.add(Math.round(threshold * 100));
|
|
65
|
+
}
|
|
66
|
+
// Reset warnings if usage drops significantly (e.g., below 70%)
|
|
67
|
+
if (percentUsed < 0.7) {
|
|
68
|
+
warningLevelsRef.current.clear();
|
|
69
|
+
}
|
|
70
|
+
}, [
|
|
71
|
+
data,
|
|
72
|
+
isLoading,
|
|
73
|
+
error,
|
|
74
|
+
threshold,
|
|
75
|
+
toggleNotification,
|
|
76
|
+
isAIEnabled,
|
|
77
|
+
isAuthPage
|
|
78
|
+
]);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
exports.useAIUsageWarning = useAIUsageWarning;
|
|
82
|
+
//# sourceMappingURL=useAIUsageWarning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAIUsageWarning.js","sources":["../../../../../../ee/admin/src/hooks/useAIUsageWarning.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { useLocation } from 'react-router-dom';\n\nimport { useNotification } from '../../../../admin/src/features/Notifications';\nimport { useGetAIUsageQuery } from '../services/ai';\n\nimport { useAIAvailability } from './useAIAvailability';\n\n/**\n * Triggers a warning notification if AI usage is above a threshold (default 80%).\n * @param threshold - Usage percentage (0-1) at which to warn. Default: 0.8 (80%)\n */\nexport function useAIUsageWarning(threshold: number = 0.8) {\n const location = useLocation();\n const isAuthPage = location.pathname.startsWith('/auth');\n const { toggleNotification } = useNotification();\n const isAIEnabled = useAIAvailability();\n const { data, isLoading, error } = useGetAIUsageQuery(undefined, {\n refetchOnMountOrArgChange: true,\n skip: !isAIEnabled || isAuthPage,\n });\n const warningLevelsRef = useRef(new Set<number>());\n\n useEffect(() => {\n if (isAuthPage || isLoading || error || !data?.subscription?.cmsAiEnabled || !isAIEnabled)\n return;\n\n const totalCredits = data.subscription.cmsAiCreditsBase;\n const usedCredits = data.cmsAiCreditsUsed;\n const maxCredits = data.subscription.cmsAiCreditsMaxUsage;\n\n if (!totalCredits || totalCredits <= 0) return;\n\n const percentUsed = usedCredits / totalCredits;\n\n const percentDisplay = Math.round(percentUsed * 100);\n const remaining = Math.max(totalCredits - usedCredits, 0);\n\n if (percentUsed >= 1 && !warningLevelsRef.current.has(100)) {\n const hasOverageAllowance = maxCredits && maxCredits > totalCredits;\n\n if (hasOverageAllowance) {\n // Overages notification (error style)\n toggleNotification({\n type: 'danger',\n message: `You've used 100% of your AI credits. Overages are being applied.`,\n timeout: 5000,\n });\n } else {\n // No overages allowed - credits exhausted\n toggleNotification({\n type: 'danger',\n message: `You've exhausted your AI credits. No additional credits available.`,\n timeout: 5000,\n });\n }\n warningLevelsRef.current.add(100);\n } else if (percentUsed >= 0.9 && percentUsed < 1 && !warningLevelsRef.current.has(90)) {\n // 90% warning notification\n toggleNotification({\n type: 'warning',\n message: `You've used ${percentDisplay}% of your AI credits. ${remaining} remain.`,\n timeout: 5000,\n });\n warningLevelsRef.current.add(90);\n } else if (\n percentUsed >= threshold &&\n percentUsed < 0.9 &&\n !warningLevelsRef.current.has(Math.round(threshold * 100))\n ) {\n // Initial threshold warning (default 80%)\n toggleNotification({\n type: 'warning',\n message: `You've used ${percentDisplay}% of your AI credits. ${remaining} remain.`,\n timeout: 5000,\n });\n warningLevelsRef.current.add(Math.round(threshold * 100));\n }\n\n // Reset warnings if usage drops significantly (e.g., below 70%)\n if (percentUsed < 0.7) {\n warningLevelsRef.current.clear();\n }\n }, [data, isLoading, error, threshold, toggleNotification, isAIEnabled, isAuthPage]);\n}\n"],"names":["useAIUsageWarning","threshold","location","useLocation","isAuthPage","pathname","startsWith","toggleNotification","useNotification","isAIEnabled","useAIAvailability","data","isLoading","error","useGetAIUsageQuery","undefined","refetchOnMountOrArgChange","skip","warningLevelsRef","useRef","Set","useEffect","subscription","cmsAiEnabled","totalCredits","cmsAiCreditsBase","usedCredits","cmsAiCreditsUsed","maxCredits","cmsAiCreditsMaxUsage","percentUsed","percentDisplay","Math","round","remaining","max","current","has","hasOverageAllowance","type","message","timeout","add","clear"],"mappings":";;;;;;;;AASA;;;AAGC,IACM,SAASA,iBAAkBC,CAAAA,SAAAA,GAAoB,GAAG,EAAA;AACvD,IAAA,MAAMC,QAAWC,GAAAA,0B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