@strapi/content-releases 5.18.0 → 5.19.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/index.js
CHANGED
|
@@ -67,6 +67,7 @@ const admin = {
|
|
|
67
67
|
id: `${pluginId.pluginId}.plugin.name`,
|
|
68
68
|
defaultMessage: 'Releases'
|
|
69
69
|
},
|
|
70
|
+
licenseOnly: true,
|
|
70
71
|
permissions: [],
|
|
71
72
|
async Component () {
|
|
72
73
|
const { ProtectedReleasesSettingsPage } = await Promise.resolve().then(function () { return require('./pages/ReleasesSettingsPage.js'); });
|
package/dist/admin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PaperPlane } from '@strapi/icons';\n\nimport { ReleaseAction } from './components/ReleaseAction';\nimport { ReleaseActionModalForm } from './components/ReleaseActionModal';\nimport { addColumnToTableHook } from './components/ReleaseListCell';\nimport { Panel as ReleasesPanel } from './components/ReleasesPanel';\nimport { PERMISSIONS } from './constants';\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type {\n DocumentActionComponent,\n BulkActionComponent,\n} from '@strapi/content-manager/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\n// eslint-disable-next-line import/no-default-export\nconst admin: Plugin.Config.AdminInput = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: StrapiApp) {\n /**\n * Hook that adds the locale column in the Release Details table\n * @constant\n * @type {string}\n */\n app.createHook('ContentReleases/pages/ReleaseDetails/add-locale-in-releases');\n\n if (window.strapi.features.isEnabled('cms-content-releases')) {\n app.addMenuLink({\n to: `plugins/${pluginId}`,\n icon: PaperPlane,\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n Component: () => import('./pages/App').then((mod) => ({ default: mod.App })),\n permissions: PERMISSIONS.main,\n position: 2,\n });\n\n // Insert the releases container into the CM's sidebar on the Edit View\n const contentManagerPluginApis = app.getPlugin('content-manager').apis;\n if (\n 'addEditViewSidePanel' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addEditViewSidePanel === 'function'\n ) {\n contentManagerPluginApis.addEditViewSidePanel([ReleasesPanel]);\n }\n\n // Insert the \"add to release\" action into the CM's Edit View\n if (\n 'addDocumentAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addDocumentAction === 'function'\n ) {\n contentManagerPluginApis.addDocumentAction((actions: DocumentActionComponent[]) => {\n const indexOfDeleteAction = actions.findIndex((action) => action.type === 'unpublish');\n actions.splice(indexOfDeleteAction, 0, ReleaseActionModalForm);\n return actions;\n });\n }\n\n app.addSettingsLink('global', {\n id: pluginId,\n to: 'releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n permissions: [],\n async Component() {\n const { ProtectedReleasesSettingsPage } = await import('./pages/ReleasesSettingsPage');\n return { default: ProtectedReleasesSettingsPage };\n },\n });\n\n if (\n 'addBulkAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addBulkAction === 'function'\n ) {\n contentManagerPluginApis.addBulkAction((actions: BulkActionComponent[]) => {\n // We want to add this action to just before the delete action all the time\n const deleteActionIndex = actions.findIndex((action) => action.type === 'delete');\n\n actions.splice(deleteActionIndex, 0, ReleaseAction);\n return actions;\n });\n }\n\n // Hook that adds a column into the CM's LV table\n app.registerHook('Admin/CM/pages/ListView/inject-column-in-table', addColumnToTableHook);\n } else if (\n !window.strapi.features.isEnabled('cms-content-releases') &&\n window.strapi?.flags?.promoteEE\n ) {\n app.addSettingsLink('global', {\n id: pluginId,\n to: '/plugins/purchase-content-releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n permissions: [],\n async Component() {\n const { PurchaseContentReleases } = await import('./pages/PurchaseContentReleases');\n return { default: PurchaseContentReleases };\n },\n licenseOnly: true,\n });\n }\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, 'content-releases'),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default admin;\n"],"names":["admin","register","app","createHook","window","strapi","features","isEnabled","addMenuLink","to","pluginId","icon","PaperPlane","intlLabel","id","defaultMessage","Component","then","mod","default","App","permissions","PERMISSIONS","main","position","contentManagerPluginApis","getPlugin","apis","addEditViewSidePanel","ReleasesPanel","addDocumentAction","actions","indexOfDeleteAction","findIndex","action","type","splice","ReleaseActionModalForm","addSettingsLink","ProtectedReleasesSettingsPage","addBulkAction","deleteActionIndex","ReleaseAction","registerHook","addColumnToTableHook","flags","promoteEE","PurchaseContentReleases","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PaperPlane } from '@strapi/icons';\n\nimport { ReleaseAction } from './components/ReleaseAction';\nimport { ReleaseActionModalForm } from './components/ReleaseActionModal';\nimport { addColumnToTableHook } from './components/ReleaseListCell';\nimport { Panel as ReleasesPanel } from './components/ReleasesPanel';\nimport { PERMISSIONS } from './constants';\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type {\n DocumentActionComponent,\n BulkActionComponent,\n} from '@strapi/content-manager/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\n// eslint-disable-next-line import/no-default-export\nconst admin: Plugin.Config.AdminInput = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: StrapiApp) {\n /**\n * Hook that adds the locale column in the Release Details table\n * @constant\n * @type {string}\n */\n app.createHook('ContentReleases/pages/ReleaseDetails/add-locale-in-releases');\n\n if (window.strapi.features.isEnabled('cms-content-releases')) {\n app.addMenuLink({\n to: `plugins/${pluginId}`,\n icon: PaperPlane,\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n Component: () => import('./pages/App').then((mod) => ({ default: mod.App })),\n permissions: PERMISSIONS.main,\n position: 2,\n });\n\n // Insert the releases container into the CM's sidebar on the Edit View\n const contentManagerPluginApis = app.getPlugin('content-manager').apis;\n if (\n 'addEditViewSidePanel' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addEditViewSidePanel === 'function'\n ) {\n contentManagerPluginApis.addEditViewSidePanel([ReleasesPanel]);\n }\n\n // Insert the \"add to release\" action into the CM's Edit View\n if (\n 'addDocumentAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addDocumentAction === 'function'\n ) {\n contentManagerPluginApis.addDocumentAction((actions: DocumentActionComponent[]) => {\n const indexOfDeleteAction = actions.findIndex((action) => action.type === 'unpublish');\n actions.splice(indexOfDeleteAction, 0, ReleaseActionModalForm);\n return actions;\n });\n }\n\n app.addSettingsLink('global', {\n id: pluginId,\n to: 'releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n licenseOnly: true,\n permissions: [],\n async Component() {\n const { ProtectedReleasesSettingsPage } = await import('./pages/ReleasesSettingsPage');\n return { default: ProtectedReleasesSettingsPage };\n },\n });\n\n if (\n 'addBulkAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addBulkAction === 'function'\n ) {\n contentManagerPluginApis.addBulkAction((actions: BulkActionComponent[]) => {\n // We want to add this action to just before the delete action all the time\n const deleteActionIndex = actions.findIndex((action) => action.type === 'delete');\n\n actions.splice(deleteActionIndex, 0, ReleaseAction);\n return actions;\n });\n }\n\n // Hook that adds a column into the CM's LV table\n app.registerHook('Admin/CM/pages/ListView/inject-column-in-table', addColumnToTableHook);\n } else if (\n !window.strapi.features.isEnabled('cms-content-releases') &&\n window.strapi?.flags?.promoteEE\n ) {\n app.addSettingsLink('global', {\n id: pluginId,\n to: '/plugins/purchase-content-releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n permissions: [],\n async Component() {\n const { PurchaseContentReleases } = await import('./pages/PurchaseContentReleases');\n return { default: PurchaseContentReleases };\n },\n licenseOnly: true,\n });\n }\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, 'content-releases'),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default admin;\n"],"names":["admin","register","app","createHook","window","strapi","features","isEnabled","addMenuLink","to","pluginId","icon","PaperPlane","intlLabel","id","defaultMessage","Component","then","mod","default","App","permissions","PERMISSIONS","main","position","contentManagerPluginApis","getPlugin","apis","addEditViewSidePanel","ReleasesPanel","addDocumentAction","actions","indexOfDeleteAction","findIndex","action","type","splice","ReleaseActionModalForm","addSettingsLink","licenseOnly","ProtectedReleasesSettingsPage","addBulkAction","deleteActionIndex","ReleaseAction","registerHook","addColumnToTableHook","flags","promoteEE","PurchaseContentReleases","registerTrads","locales","importedTrads","Promise","all","map","locale","data","prefixPluginTranslations","catch","resolve"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiBA;AACA,MAAMA,KAAkC,GAAA;;AAEtCC,IAAAA,QAAAA,CAAAA,CAASC,GAAc,EAAA;AACrB;;;;QAKAA,GAAAA,CAAIC,UAAU,CAAC,6DAAA,CAAA;AAEf,QAAA,IAAIC,OAAOC,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,sBAAyB,CAAA,EAAA;AAC5DL,YAAAA,GAAAA,CAAIM,WAAW,CAAC;AACdC,gBAAAA,EAAAA,EAAI,CAAC,QAAQ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B,EAAE,GAAG,MAAM,oDAAO,oCAAA,KAAA;oBACjD,OAAO;wBAAE7B,OAAS6B,EAAAA;AAAwB,qBAAA;AAC5C,iBAAA;gBACAT,WAAa,EAAA;AACf,aAAA,CAAA;AACF;AACF,KAAA;IACA,MAAMU,aAAAA,CAAAA,CAAc,EAAEC,OAAO,EAAyB,EAAA;QACpD,MAAMC,aAAAA,GAAgB,MAAMC,OAAQC,CAAAA,GAAG,CACrCH,OAAQI,CAAAA,GAAG,CAAC,CAACC,MAAAA,GAAAA;AACX,YAAA,OAAO,iCAAM,CAAC,CAAC,eAAe,EAAEA,MAAO,CAAA,KAAK,CAAC,CAAA,CAC1CtC,IAAI,CAAC,CAAC,EAAEE,OAAAA,EAASqC,IAAI,EAAE,GAAA;gBACtB,OAAO;AACLA,oBAAAA,IAAAA,EAAMC,kDAAyBD,IAAM,EAAA,kBAAA,CAAA;AACrCD,oBAAAA;AACF,iBAAA;AACF,aAAA,CAAA,CACCG,KAAK,CAAC,IAAA;gBACL,OAAO;AACLF,oBAAAA,IAAAA,EAAM,EAAC;AACPD,oBAAAA;AACF,iBAAA;AACF,aAAA,CAAA;AACJ,SAAA,CAAA,CAAA;QAGF,OAAOH,OAAAA,CAAQO,OAAO,CAACR,aAAAA,CAAAA;AACzB;AACF;;;;"}
|
package/dist/admin/index.mjs
CHANGED
package/dist/admin/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PaperPlane } from '@strapi/icons';\n\nimport { ReleaseAction } from './components/ReleaseAction';\nimport { ReleaseActionModalForm } from './components/ReleaseActionModal';\nimport { addColumnToTableHook } from './components/ReleaseListCell';\nimport { Panel as ReleasesPanel } from './components/ReleasesPanel';\nimport { PERMISSIONS } from './constants';\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type {\n DocumentActionComponent,\n BulkActionComponent,\n} from '@strapi/content-manager/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\n// eslint-disable-next-line import/no-default-export\nconst admin: Plugin.Config.AdminInput = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: StrapiApp) {\n /**\n * Hook that adds the locale column in the Release Details table\n * @constant\n * @type {string}\n */\n app.createHook('ContentReleases/pages/ReleaseDetails/add-locale-in-releases');\n\n if (window.strapi.features.isEnabled('cms-content-releases')) {\n app.addMenuLink({\n to: `plugins/${pluginId}`,\n icon: PaperPlane,\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n Component: () => import('./pages/App').then((mod) => ({ default: mod.App })),\n permissions: PERMISSIONS.main,\n position: 2,\n });\n\n // Insert the releases container into the CM's sidebar on the Edit View\n const contentManagerPluginApis = app.getPlugin('content-manager').apis;\n if (\n 'addEditViewSidePanel' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addEditViewSidePanel === 'function'\n ) {\n contentManagerPluginApis.addEditViewSidePanel([ReleasesPanel]);\n }\n\n // Insert the \"add to release\" action into the CM's Edit View\n if (\n 'addDocumentAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addDocumentAction === 'function'\n ) {\n contentManagerPluginApis.addDocumentAction((actions: DocumentActionComponent[]) => {\n const indexOfDeleteAction = actions.findIndex((action) => action.type === 'unpublish');\n actions.splice(indexOfDeleteAction, 0, ReleaseActionModalForm);\n return actions;\n });\n }\n\n app.addSettingsLink('global', {\n id: pluginId,\n to: 'releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n permissions: [],\n async Component() {\n const { ProtectedReleasesSettingsPage } = await import('./pages/ReleasesSettingsPage');\n return { default: ProtectedReleasesSettingsPage };\n },\n });\n\n if (\n 'addBulkAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addBulkAction === 'function'\n ) {\n contentManagerPluginApis.addBulkAction((actions: BulkActionComponent[]) => {\n // We want to add this action to just before the delete action all the time\n const deleteActionIndex = actions.findIndex((action) => action.type === 'delete');\n\n actions.splice(deleteActionIndex, 0, ReleaseAction);\n return actions;\n });\n }\n\n // Hook that adds a column into the CM's LV table\n app.registerHook('Admin/CM/pages/ListView/inject-column-in-table', addColumnToTableHook);\n } else if (\n !window.strapi.features.isEnabled('cms-content-releases') &&\n window.strapi?.flags?.promoteEE\n ) {\n app.addSettingsLink('global', {\n id: pluginId,\n to: '/plugins/purchase-content-releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n permissions: [],\n async Component() {\n const { PurchaseContentReleases } = await import('./pages/PurchaseContentReleases');\n return { default: PurchaseContentReleases };\n },\n licenseOnly: true,\n });\n }\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, 'content-releases'),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default admin;\n"],"names":["admin","register","app","createHook","window","strapi","features","isEnabled","addMenuLink","to","pluginId","icon","PaperPlane","intlLabel","id","defaultMessage","Component","then","mod","default","App","permissions","PERMISSIONS","main","position","contentManagerPluginApis","getPlugin","apis","addEditViewSidePanel","ReleasesPanel","addDocumentAction","actions","indexOfDeleteAction","findIndex","action","type","splice","ReleaseActionModalForm","addSettingsLink","ProtectedReleasesSettingsPage","addBulkAction","deleteActionIndex","ReleaseAction","registerHook","addColumnToTableHook","flags","promoteEE","PurchaseContentReleases","
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../admin/src/index.ts"],"sourcesContent":["import { PaperPlane } from '@strapi/icons';\n\nimport { ReleaseAction } from './components/ReleaseAction';\nimport { ReleaseActionModalForm } from './components/ReleaseActionModal';\nimport { addColumnToTableHook } from './components/ReleaseListCell';\nimport { Panel as ReleasesPanel } from './components/ReleasesPanel';\nimport { PERMISSIONS } from './constants';\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\n\nimport type { StrapiApp } from '@strapi/admin/strapi-admin';\nimport type {\n DocumentActionComponent,\n BulkActionComponent,\n} from '@strapi/content-manager/strapi-admin';\nimport type { Plugin } from '@strapi/types';\n\n// eslint-disable-next-line import/no-default-export\nconst admin: Plugin.Config.AdminInput = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n register(app: StrapiApp) {\n /**\n * Hook that adds the locale column in the Release Details table\n * @constant\n * @type {string}\n */\n app.createHook('ContentReleases/pages/ReleaseDetails/add-locale-in-releases');\n\n if (window.strapi.features.isEnabled('cms-content-releases')) {\n app.addMenuLink({\n to: `plugins/${pluginId}`,\n icon: PaperPlane,\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n Component: () => import('./pages/App').then((mod) => ({ default: mod.App })),\n permissions: PERMISSIONS.main,\n position: 2,\n });\n\n // Insert the releases container into the CM's sidebar on the Edit View\n const contentManagerPluginApis = app.getPlugin('content-manager').apis;\n if (\n 'addEditViewSidePanel' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addEditViewSidePanel === 'function'\n ) {\n contentManagerPluginApis.addEditViewSidePanel([ReleasesPanel]);\n }\n\n // Insert the \"add to release\" action into the CM's Edit View\n if (\n 'addDocumentAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addDocumentAction === 'function'\n ) {\n contentManagerPluginApis.addDocumentAction((actions: DocumentActionComponent[]) => {\n const indexOfDeleteAction = actions.findIndex((action) => action.type === 'unpublish');\n actions.splice(indexOfDeleteAction, 0, ReleaseActionModalForm);\n return actions;\n });\n }\n\n app.addSettingsLink('global', {\n id: pluginId,\n to: 'releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n licenseOnly: true,\n permissions: [],\n async Component() {\n const { ProtectedReleasesSettingsPage } = await import('./pages/ReleasesSettingsPage');\n return { default: ProtectedReleasesSettingsPage };\n },\n });\n\n if (\n 'addBulkAction' in contentManagerPluginApis &&\n typeof contentManagerPluginApis.addBulkAction === 'function'\n ) {\n contentManagerPluginApis.addBulkAction((actions: BulkActionComponent[]) => {\n // We want to add this action to just before the delete action all the time\n const deleteActionIndex = actions.findIndex((action) => action.type === 'delete');\n\n actions.splice(deleteActionIndex, 0, ReleaseAction);\n return actions;\n });\n }\n\n // Hook that adds a column into the CM's LV table\n app.registerHook('Admin/CM/pages/ListView/inject-column-in-table', addColumnToTableHook);\n } else if (\n !window.strapi.features.isEnabled('cms-content-releases') &&\n window.strapi?.flags?.promoteEE\n ) {\n app.addSettingsLink('global', {\n id: pluginId,\n to: '/plugins/purchase-content-releases',\n intlLabel: {\n id: `${pluginId}.plugin.name`,\n defaultMessage: 'Releases',\n },\n permissions: [],\n async Component() {\n const { PurchaseContentReleases } = await import('./pages/PurchaseContentReleases');\n return { default: PurchaseContentReleases };\n },\n licenseOnly: true,\n });\n }\n },\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, 'content-releases'),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default admin;\n"],"names":["admin","register","app","createHook","window","strapi","features","isEnabled","addMenuLink","to","pluginId","icon","PaperPlane","intlLabel","id","defaultMessage","Component","then","mod","default","App","permissions","PERMISSIONS","main","position","contentManagerPluginApis","getPlugin","apis","addEditViewSidePanel","ReleasesPanel","addDocumentAction","actions","indexOfDeleteAction","findIndex","action","type","splice","ReleaseActionModalForm","addSettingsLink","licenseOnly","ProtectedReleasesSettingsPage","addBulkAction","deleteActionIndex","ReleaseAction","registerHook","addColumnToTableHook","flags","promoteEE","PurchaseContentReleases","registerTrads","locales","importedTrads","Promise","all","map","locale","data","prefixPluginTranslations","catch","resolve"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiBA;AACA,MAAMA,KAAkC,GAAA;;AAEtCC,IAAAA,QAAAA,CAAAA,CAASC,GAAc,EAAA;AACrB;;;;QAKAA,GAAAA,CAAIC,UAAU,CAAC,6DAAA,CAAA;AAEf,QAAA,IAAIC,OAAOC,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,sBAAyB,CAAA,EAAA;AAC5DL,YAAAA,GAAAA,CAAIM,WAAW,CAAC;AACdC,gBAAAA,EAAAA,EAAI,CAAC,QAAQ,EAAEC,QAAAA,CAAS,CAAC;gBACzBC,IAAMC,EAAAA,UAAAA;gBACNC,SAAW,EAAA;AACTC,oBAAAA,EAAAA,EAAI,CAAC,EAAEJ,QAAS,CAAA,YAAY,CAAC;oBAC7BK,cAAgB,EAAA;AAClB,iBAAA;gBACAC,SAAW,EAAA,IAAM,OAAO,iBAAA,CAAA,CAAeC,IAAI,CAAC,CAACC,OAAS;AAAEC,4BAAAA,OAAAA,EAASD,IAAIE;yBAAI,CAAA,CAAA;AACzEC,gBAAAA,WAAAA,EAAaC,YAAYC,IAAI;gBAC7BC,QAAU,EAAA;AACZ,aAAA,CAAA;;AAGA,YAAA,MAAMC,wBAA2BvB,GAAAA,GAAAA,CAAIwB,SAAS,CAAC,mBAAmBC,IAAI;AACtE,YAAA,IACE,0BAA0BF,wBAC1B,IAAA,OAAOA,wBAAyBG,CAAAA,oBAAoB,KAAK,UACzD,EAAA;AACAH,gBAAAA,wBAAAA,CAAyBG,oBAAoB,CAAC;AAACC,oBAAAA;AAAc,iBAAA,CAAA;AAC/D;;AAGA,YAAA,IACE,uBAAuBJ,wBACvB,IAAA,OAAOA,wBAAyBK,CAAAA,iBAAiB,KAAK,UACtD,EAAA;gBACAL,wBAAyBK,CAAAA,iBAAiB,CAAC,CAACC,O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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/content-releases",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.19.0",
|
|
4
4
|
"description": "Strapi plugin for organizing and releasing content",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@reduxjs/toolkit": "1.9.7",
|
|
62
|
-
"@strapi/database": "5.
|
|
63
|
-
"@strapi/design-system": "2.0.0-rc.
|
|
64
|
-
"@strapi/icons": "2.0.0-rc.
|
|
65
|
-
"@strapi/types": "5.
|
|
66
|
-
"@strapi/utils": "5.
|
|
62
|
+
"@strapi/database": "5.19.0",
|
|
63
|
+
"@strapi/design-system": "2.0.0-rc.29",
|
|
64
|
+
"@strapi/icons": "2.0.0-rc.29",
|
|
65
|
+
"@strapi/types": "5.19.0",
|
|
66
|
+
"@strapi/utils": "5.19.0",
|
|
67
67
|
"date-fns": "2.30.0",
|
|
68
68
|
"date-fns-tz": "2.0.1",
|
|
69
69
|
"formik": "2.4.5",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"yup": "0.32.9"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@strapi/admin": "5.
|
|
79
|
-
"@strapi/admin-test-utils": "5.
|
|
80
|
-
"@strapi/content-manager": "5.
|
|
78
|
+
"@strapi/admin": "5.19.0",
|
|
79
|
+
"@strapi/admin-test-utils": "5.19.0",
|
|
80
|
+
"@strapi/content-manager": "5.19.0",
|
|
81
81
|
"@testing-library/dom": "10.1.0",
|
|
82
82
|
"@testing-library/react": "15.0.7",
|
|
83
83
|
"@testing-library/user-event": "14.5.2",
|