@strapi/review-workflows 5.4.1 → 5.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/_chunks/{Layout-Dko22Aly.mjs → Layout-DU1Rt4Mu.mjs} +2 -2
  2. package/dist/_chunks/{Layout-Dko22Aly.mjs.map → Layout-DU1Rt4Mu.mjs.map} +1 -1
  3. package/dist/_chunks/{Layout-B4fpKB9J.js → Layout-ywt0cSLq.js} +2 -2
  4. package/dist/_chunks/{Layout-B4fpKB9J.js.map → Layout-ywt0cSLq.js.map} +1 -1
  5. package/dist/_chunks/{id-DINFSsrh.mjs → id-MDQVDdXD.mjs} +3 -3
  6. package/dist/_chunks/{id-DINFSsrh.mjs.map → id-MDQVDdXD.mjs.map} +1 -1
  7. package/dist/_chunks/{id-BKq7JAqZ.js → id-StiN3nkI.js} +3 -3
  8. package/dist/_chunks/{id-BKq7JAqZ.js.map → id-StiN3nkI.js.map} +1 -1
  9. package/dist/_chunks/{index-DAcEdoqJ.mjs → index-BRmc4tbQ.mjs} +2 -5
  10. package/dist/_chunks/index-BRmc4tbQ.mjs.map +1 -0
  11. package/dist/_chunks/{index-BpL7C1EG.js → index-BSsDJNiQ.js} +2 -5
  12. package/dist/_chunks/index-BSsDJNiQ.js.map +1 -0
  13. package/dist/_chunks/{index-ZcZKwmTD.mjs → index-CsOMMJ--.mjs} +4 -4
  14. package/dist/_chunks/index-CsOMMJ--.mjs.map +1 -0
  15. package/dist/_chunks/{index-BpIILEs0.js → index-dc2WfugK.js} +4 -4
  16. package/dist/_chunks/index-dc2WfugK.js.map +1 -0
  17. package/dist/_chunks/{router-DeEgX8Ao.js → router-C5QvEzrI.js} +3 -3
  18. package/dist/_chunks/{router-DeEgX8Ao.js.map → router-C5QvEzrI.js.map} +1 -1
  19. package/dist/_chunks/{router-BPH_u176.mjs → router-CZH4yq9s.mjs} +3 -3
  20. package/dist/_chunks/{router-BPH_u176.mjs.map → router-CZH4yq9s.mjs.map} +1 -1
  21. package/dist/admin/index.js +1 -1
  22. package/dist/admin/index.mjs +1 -1
  23. package/package.json +8 -8
  24. package/dist/_chunks/index-BpIILEs0.js.map +0 -1
  25. package/dist/_chunks/index-BpL7C1EG.js.map +0 -1
  26. package/dist/_chunks/index-DAcEdoqJ.mjs.map +0 -1
  27. package/dist/_chunks/index-ZcZKwmTD.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { useNotification, useAPIErrorHandler, Page, Layouts } from "@strapi/admin/strapi-admin";
3
3
  import { useIntl } from "react-intl";
4
- import { c as useGetWorkflowsQuery, d as useCreateWorkflowMutation, e as useUpdateWorkflowMutation, f as useDeleteWorkflowMutation } from "./index-DAcEdoqJ.mjs";
4
+ import { c as useGetWorkflowsQuery, d as useCreateWorkflowMutation, e as useUpdateWorkflowMutation, f as useDeleteWorkflowMutation } from "./index-BRmc4tbQ.mjs";
5
5
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
6
6
  import { Flex, Typography, Box } from "@strapi/design-system";
7
7
  import { useDragLayer } from "react-dnd";
@@ -230,4 +230,4 @@ export {
230
230
  DragLayerRendered as a,
231
231
  useReviewWorkflows as u
232
232
  };
233
- //# sourceMappingURL=Layout-Dko22Aly.mjs.map
233
+ //# sourceMappingURL=Layout-DU1Rt4Mu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout-Dko22Aly.mjs","sources":["../../admin/src/routes/settings/hooks/useReviewWorkflows.ts","../../admin/src/routes/settings/constants.ts","../../admin/src/routes/settings/components/StageDragPreview.tsx","../../admin/src/routes/settings/components/Layout.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useAPIErrorHandler, useNotification } from '@strapi/admin/strapi-admin';\nimport { type MessageDescriptor, useIntl } from 'react-intl';\n\nimport {\n GetWorkflowsParams,\n useCreateWorkflowMutation,\n useDeleteWorkflowMutation,\n useGetWorkflowsQuery,\n useUpdateWorkflowMutation,\n} from '../../../services/settings';\n\nimport type { Create, Update } from '../../../../../shared/contracts/review-workflows';\n\nconst DEFAULT_UNEXPECTED_ERROR_MSG = {\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n} satisfies MessageDescriptor;\n\ntype UseReviewWorkflowsArgs = GetWorkflowsParams & {\n skip?: boolean;\n};\n\nconst useReviewWorkflows = (params: UseReviewWorkflowsArgs = {}) => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { skip = false, ...queryParams } = params;\n\n const { data, isLoading, error } = useGetWorkflowsQuery(\n {\n populate: ['stages', 'stageRequiredToPublish'],\n ...queryParams,\n },\n {\n skip,\n }\n );\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const [createWorkflow] = useCreateWorkflowMutation();\n const create = React.useCallback(\n async (data: Create.Request['body']['data']) => {\n try {\n const res = await createWorkflow({ data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.created', defaultMessage: 'Created workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [createWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const [updateWorkflow] = useUpdateWorkflowMutation();\n const update = React.useCallback(\n async (id: string, data: Update.Request['body']['data']) => {\n try {\n const res = await updateWorkflow({ id, data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.updated', defaultMessage: 'Updated workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [formatAPIError, formatMessage, toggleNotification, updateWorkflow]\n );\n\n const [deleteWorkflow] = useDeleteWorkflowMutation();\n const deleteAction = React.useCallback(\n async (id: string) => {\n try {\n const res = await deleteWorkflow({ id });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.deleted', defaultMessage: 'Deleted workflow' }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [deleteWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const { workflows = [], meta } = data ?? {};\n\n return {\n // meta contains e.g. the total of all workflows. we can not use\n // the pagination object here, because the list is not paginated.\n meta,\n workflows,\n isLoading,\n error,\n create,\n delete: deleteAction,\n update,\n };\n};\n\nexport { useReviewWorkflows };\n","export type DragDropTypes = 'stage';\n\nexport const DRAG_DROP_TYPES: Record<Uppercase<DragDropTypes>, DragDropTypes> = {\n STAGE: 'stage',\n};\n","import { Flex, Typography } from '@strapi/design-system';\nimport { CaretDown } from '@strapi/icons';\n\ninterface StageDragPreviewType {\n name: string | null;\n}\n\nconst StageDragPreview = ({ name }: StageDragPreviewType) => {\n return (\n <Flex\n background=\"primary100\"\n borderStyle=\"dashed\"\n borderColor=\"primary600\"\n borderWidth=\"1px\"\n gap={3}\n hasRadius\n padding={3}\n shadow=\"tableShadow\"\n width=\"30rem\"\n >\n <Flex\n alignItems=\"center\"\n background=\"neutral200\"\n borderRadius=\"50%\"\n height={6}\n justifyContent=\"center\"\n width={6}\n >\n <CaretDown width=\"0.8rem\" fill=\"neutral600\" />\n </Flex>\n\n <Typography fontWeight=\"bold\">{name}</Typography>\n </Flex>\n );\n};\n\nexport { StageDragPreview };\nexport type { StageDragPreviewType };\n","import * as React from 'react';\n\nimport { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport { XYCoord, useDragLayer } from 'react-dnd';\nimport { useIntl } from 'react-intl';\n\nimport { DRAG_DROP_TYPES } from '../constants';\n\nimport { StageDragPreview } from './StageDragPreview';\n\nfunction getStyle(\n initialOffset: XYCoord | null,\n currentOffset: XYCoord | null,\n mouseOffset: XYCoord | null\n) {\n if (!initialOffset || !currentOffset || !mouseOffset) {\n return { display: 'none' };\n }\n\n const { x, y } = mouseOffset;\n\n return {\n transform: `translate(${x}px, ${y}px)`,\n };\n}\n\nconst DragLayerRendered = () => {\n const { itemType, isDragging, item, initialOffset, currentOffset, mouseOffset } = useDragLayer(\n (monitor) => ({\n item: monitor.getItem(),\n itemType: monitor.getItemType(),\n initialOffset: monitor.getInitialSourceClientOffset(),\n currentOffset: monitor.getSourceClientOffset(),\n isDragging: monitor.isDragging(),\n mouseOffset: monitor.getClientOffset(),\n })\n );\n\n if (!isDragging || itemType !== DRAG_DROP_TYPES.STAGE) {\n return null;\n }\n\n return (\n <Box\n height=\"100%\"\n left={0}\n position=\"fixed\"\n pointerEvents=\"none\"\n top={0}\n zIndex={100}\n width=\"100%\"\n >\n <Box style={getStyle(initialOffset, currentOffset, mouseOffset)}>\n <StageDragPreview name={typeof item.item === 'string' ? item.item : null} />;\n </Box>\n </Box>\n );\n};\n\nconst Root: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Page.Main>\n <Layouts.Content>{children}</Layouts.Content>\n </Page.Main>\n );\n};\n\ninterface HeaderProps {\n title: string;\n navigationAction?: React.ReactNode;\n primaryAction?: React.ReactNode;\n secondaryAction?: React.ReactNode;\n subtitle?: React.ReactNode;\n}\n\nconst Header: React.FC<HeaderProps> = ({ title, subtitle, navigationAction, primaryAction }) => {\n const { formatMessage } = useIntl();\n return (\n <>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: title,\n }\n )}\n </Page.Title>\n <Layouts.BaseHeader\n navigationAction={navigationAction}\n primaryAction={primaryAction}\n title={title}\n subtitle={subtitle}\n />\n </>\n );\n};\n\nexport { DragLayerRendered, Header, Root };\n"],"names":["data"],"mappings":";;;;;;;;AAeA,MAAM,+BAA+B;AAAA,EACnC,IAAI;AAAA,EACJ,gBAAgB;AAClB;AAMA,MAAM,qBAAqB,CAAC,SAAiC,OAAO;AAC5D,QAAA,EAAE,uBAAuB;AACzB,QAAA,EAAE,kBAAkB;AAC1B,QAAM,EAAE,yBAAyB,eAAe,IAAI,mBAAmB;AAEvE,QAAM,EAAE,OAAO,OAAO,GAAG,gBAAgB;AAEzC,QAAM,EAAE,MAAM,WAAW,MAAU,IAAA;AAAA,IACjC;AAAA,MACE,UAAU,CAAC,UAAU,wBAAwB;AAAA,MAC7C,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,IACF;AAAA,EAAA;AAGF,QAAM,UAAU,MAAM;AACpB,QAAI,OAAO;AACU,yBAAA;AAAA,QACjB,MAAM;AAAA,QACN,SAAS,eAAe,KAAK;AAAA,MAAA,CAC9B;AAAA,IACH;AAAA,EACC,GAAA,CAAC,OAAO,gBAAgB,kBAAkB,CAAC;AAExC,QAAA,CAAC,cAAc,IAAI;AACzB,QAAM,SAAS,MAAM;AAAA,IACnB,OAAOA,UAAyC;AAC1C,UAAA;AACF,cAAM,MAAM,MAAM,eAAe,EAAE,MAAAA,MAAM,CAAA;AAEzC,YAAI,WAAW,KAAK;AACC,6BAAA;AAAA,YACjB,MAAM;AAAA,YACN,SAAS,eAAe,IAAI,KAAK;AAAA,UAAA,CAClC;AAEM,iBAAA;AAAA,QACT;AAEmB,2BAAA;AAAA,UACjB,MAAM;AAAA,UACN,SAAS,cAAc,EAAE,IAAI,mBAAmB,gBAAgB,oBAAoB;AAAA,QAAA,CACrF;AAEM,eAAA;AAAA,eACA,KAAK;AACO,2BAAA;AAAA,UACjB,MAAM;AAAA,UACN,SAAS,cA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":["../../admin/src/routes/settings/hooks/useReviewWorkflows.ts","../../admin/src/routes/settings/constants.ts","../../admin/src/routes/settings/components/StageDragPreview.tsx","../../admin/src/routes/settings/components/Layout.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useAPIErrorHandler, useNotification } from '@strapi/admin/strapi-admin';\nimport { type MessageDescriptor, useIntl } from 'react-intl';\n\nimport {\n GetWorkflowsParams,\n useCreateWorkflowMutation,\n useDeleteWorkflowMutation,\n useGetWorkflowsQuery,\n useUpdateWorkflowMutation,\n} from '../../../services/settings';\n\nimport type { Create, Update } from '../../../../../shared/contracts/review-workflows';\n\nconst DEFAULT_UNEXPECTED_ERROR_MSG = {\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n} satisfies MessageDescriptor;\n\ntype UseReviewWorkflowsArgs = GetWorkflowsParams & {\n skip?: boolean;\n};\n\nconst useReviewWorkflows = (params: UseReviewWorkflowsArgs = {}) => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { skip = false, ...queryParams } = params;\n\n const { data, isLoading, error } = useGetWorkflowsQuery(\n {\n populate: ['stages', 'stageRequiredToPublish'],\n ...queryParams,\n },\n {\n skip,\n }\n );\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const [createWorkflow] = useCreateWorkflowMutation();\n const create = React.useCallback(\n async (data: Create.Request['body']['data']) => {\n try {\n const res = await createWorkflow({ data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.created', defaultMessage: 'Created workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [createWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const [updateWorkflow] = useUpdateWorkflowMutation();\n const update = React.useCallback(\n async (id: string, data: Update.Request['body']['data']) => {\n try {\n const res = await updateWorkflow({ id, data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.updated', defaultMessage: 'Updated workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [formatAPIError, formatMessage, toggleNotification, updateWorkflow]\n );\n\n const [deleteWorkflow] = useDeleteWorkflowMutation();\n const deleteAction = React.useCallback(\n async (id: string) => {\n try {\n const res = await deleteWorkflow({ id });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.deleted', defaultMessage: 'Deleted workflow' }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [deleteWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const { workflows = [], meta } = data ?? {};\n\n return {\n // meta contains e.g. the total of all workflows. we can not use\n // the pagination object here, because the list is not paginated.\n meta,\n workflows,\n isLoading,\n error,\n create,\n delete: deleteAction,\n update,\n };\n};\n\nexport { useReviewWorkflows };\n","export type DragDropTypes = 'stage';\n\nexport const DRAG_DROP_TYPES: Record<Uppercase<DragDropTypes>, DragDropTypes> = {\n STAGE: 'stage',\n};\n","import { Flex, Typography } from '@strapi/design-system';\nimport { CaretDown } from '@strapi/icons';\n\ninterface StageDragPreviewType {\n name: string | null;\n}\n\nconst StageDragPreview = ({ name }: StageDragPreviewType) => {\n return (\n <Flex\n background=\"primary100\"\n borderStyle=\"dashed\"\n borderColor=\"primary600\"\n borderWidth=\"1px\"\n gap={3}\n hasRadius\n padding={3}\n shadow=\"tableShadow\"\n width=\"30rem\"\n >\n <Flex\n alignItems=\"center\"\n background=\"neutral200\"\n borderRadius=\"50%\"\n height={6}\n justifyContent=\"center\"\n width={6}\n >\n <CaretDown width=\"0.8rem\" fill=\"neutral600\" />\n </Flex>\n\n <Typography fontWeight=\"bold\">{name}</Typography>\n </Flex>\n );\n};\n\nexport { StageDragPreview };\nexport type { StageDragPreviewType };\n","import * as React from 'react';\n\nimport { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport { XYCoord, useDragLayer } from 'react-dnd';\nimport { useIntl } from 'react-intl';\n\nimport { DRAG_DROP_TYPES } from '../constants';\n\nimport { StageDragPreview } from './StageDragPreview';\n\nfunction getStyle(\n initialOffset: XYCoord | null,\n currentOffset: XYCoord | null,\n mouseOffset: XYCoord | null\n) {\n if (!initialOffset || !currentOffset || !mouseOffset) {\n return { display: 'none' };\n }\n\n const { x, y } = mouseOffset;\n\n return {\n transform: `translate(${x}px, ${y}px)`,\n };\n}\n\nconst DragLayerRendered = () => {\n const { itemType, isDragging, item, initialOffset, currentOffset, mouseOffset } = useDragLayer(\n (monitor) => ({\n item: monitor.getItem(),\n itemType: monitor.getItemType(),\n initialOffset: monitor.getInitialSourceClientOffset(),\n currentOffset: monitor.getSourceClientOffset(),\n isDragging: monitor.isDragging(),\n mouseOffset: monitor.getClientOffset(),\n })\n );\n\n if (!isDragging || itemType !== DRAG_DROP_TYPES.STAGE) {\n return null;\n }\n\n return (\n <Box\n height=\"100%\"\n left={0}\n position=\"fixed\"\n pointerEvents=\"none\"\n top={0}\n zIndex={100}\n width=\"100%\"\n >\n <Box style={getStyle(initialOffset, currentOffset, mouseOffset)}>\n <StageDragPreview name={typeof item.item === 'string' ? item.item : null} />;\n </Box>\n </Box>\n );\n};\n\nconst Root: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Page.Main>\n <Layouts.Content>{children}</Layouts.Content>\n </Page.Main>\n );\n};\n\ninterface HeaderProps {\n title: string;\n navigationAction?: React.ReactNode;\n primaryAction?: React.ReactNode;\n secondaryAction?: React.ReactNode;\n subtitle?: React.ReactNode;\n}\n\nconst Header: React.FC<HeaderProps> = ({ title, subtitle, navigationAction, primaryAction }) => {\n const { formatMessage } = useIntl();\n return (\n <>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: title,\n }\n )}\n </Page.Title>\n <Layouts.BaseHeader\n navigationAction={navigationAction}\n primaryAction={primaryAction}\n title={title}\n subtitle={subtitle}\n />\n </>\n );\n};\n\nexport { DragLayerRendered, Header, Root };\n"],"names":["data"],"mappings":";;;;;;;;AAeA,MAAM,+BAA+B;AAAA,EACnC,IAAI;AAAA,EACJ,gBAAgB;AAClB;AAMA,MAAM,qBAAqB,CAAC,SAAiC,OAAO;AAC5D,QAAA,EAAE,uBAAuB;AACzB,QAAA,EAAE,kBAAkB;AAC1B,QAAM,EAAE,yBAAyB,eAAe,IAAI,mBAAmB;AAEvE,QAAM,EAAE,OAAO,OAAO,GAAG,gBAAgB;AAEzC,QAAM,EAAE,MAAM,WAAW,MAAU,IAAA;AAAA,IACjC;AAAA,MACE,UAAU,CAAC,UAAU,wBAAwB;AAAA,MAC7C,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,IACF;AAAA,EAAA;AAGF,QAAM,UAAU,MAAM;AACpB,QAAI,OAAO;AACU,yBAAA;AAAA,QACjB,MAAM;AAAA,QACN,SAAS,eAAe,KAAK;AAAA,MAAA,CAC9B;AAAA,IACH;AAAA,EACC,GAAA,CAAC,OAAO,gBAAgB,kBAAkB,CAAC;AAExC,QAAA,CAAC,cAAc,IAAI;AACzB,QAAM,SAAS,MAAM;AAAA,IACnB,OAAOA,UAAyC;AAC1C,UAAA;AACF,cAAM,MAAM,MAAM,eAAe,EAAE,MAAAA,MAAM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,IAAC,oBAAA,KAAK,OAAL,EACE,UAAA;AAAA,MACC,EAAE,IAAI,sBAAsB,gBAAgB,oBAAoB;AAAA,MAChE;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IAAA,GAEJ;AAAA,IACA;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -2,7 +2,7 @@
2
2
  const React = require("react");
3
3
  const strapiAdmin = require("@strapi/admin/strapi-admin");
4
4
  const reactIntl = require("react-intl");
5
- const index = require("./index-BpL7C1EG.js");
5
+ const index = require("./index-BSsDJNiQ.js");
6
6
  const jsxRuntime = require("react/jsx-runtime");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const reactDnd = require("react-dnd");
@@ -248,4 +248,4 @@ exports.DragLayerRendered = DragLayerRendered;
248
248
  exports.Header = Header;
249
249
  exports.Root = Root;
250
250
  exports.useReviewWorkflows = useReviewWorkflows;
251
- //# sourceMappingURL=Layout-B4fpKB9J.js.map
251
+ //# sourceMappingURL=Layout-ywt0cSLq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout-B4fpKB9J.js","sources":["../../admin/src/routes/settings/hooks/useReviewWorkflows.ts","../../admin/src/routes/settings/constants.ts","../../admin/src/routes/settings/components/StageDragPreview.tsx","../../admin/src/routes/settings/components/Layout.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useAPIErrorHandler, useNotification } from '@strapi/admin/strapi-admin';\nimport { type MessageDescriptor, useIntl } from 'react-intl';\n\nimport {\n GetWorkflowsParams,\n useCreateWorkflowMutation,\n useDeleteWorkflowMutation,\n useGetWorkflowsQuery,\n useUpdateWorkflowMutation,\n} from '../../../services/settings';\n\nimport type { Create, Update } from '../../../../../shared/contracts/review-workflows';\n\nconst DEFAULT_UNEXPECTED_ERROR_MSG = {\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n} satisfies MessageDescriptor;\n\ntype UseReviewWorkflowsArgs = GetWorkflowsParams & {\n skip?: boolean;\n};\n\nconst useReviewWorkflows = (params: UseReviewWorkflowsArgs = {}) => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { skip = false, ...queryParams } = params;\n\n const { data, isLoading, error } = useGetWorkflowsQuery(\n {\n populate: ['stages', 'stageRequiredToPublish'],\n ...queryParams,\n },\n {\n skip,\n }\n );\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const [createWorkflow] = useCreateWorkflowMutation();\n const create = React.useCallback(\n async (data: Create.Request['body']['data']) => {\n try {\n const res = await createWorkflow({ data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.created', defaultMessage: 'Created workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [createWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const [updateWorkflow] = useUpdateWorkflowMutation();\n const update = React.useCallback(\n async (id: string, data: Update.Request['body']['data']) => {\n try {\n const res = await updateWorkflow({ id, data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.updated', defaultMessage: 'Updated workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [formatAPIError, formatMessage, toggleNotification, updateWorkflow]\n );\n\n const [deleteWorkflow] = useDeleteWorkflowMutation();\n const deleteAction = React.useCallback(\n async (id: string) => {\n try {\n const res = await deleteWorkflow({ id });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.deleted', defaultMessage: 'Deleted workflow' }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [deleteWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const { workflows = [], meta } = data ?? {};\n\n return {\n // meta contains e.g. the total of all workflows. we can not use\n // the pagination object here, because the list is not paginated.\n meta,\n workflows,\n isLoading,\n error,\n create,\n delete: deleteAction,\n update,\n };\n};\n\nexport { useReviewWorkflows };\n","export type DragDropTypes = 'stage';\n\nexport const DRAG_DROP_TYPES: Record<Uppercase<DragDropTypes>, DragDropTypes> = {\n STAGE: 'stage',\n};\n","import { Flex, Typography } from '@strapi/design-system';\nimport { CaretDown } from '@strapi/icons';\n\ninterface StageDragPreviewType {\n name: string | null;\n}\n\nconst StageDragPreview = ({ name }: StageDragPreviewType) => {\n return (\n <Flex\n background=\"primary100\"\n borderStyle=\"dashed\"\n borderColor=\"primary600\"\n borderWidth=\"1px\"\n gap={3}\n hasRadius\n padding={3}\n shadow=\"tableShadow\"\n width=\"30rem\"\n >\n <Flex\n alignItems=\"center\"\n background=\"neutral200\"\n borderRadius=\"50%\"\n height={6}\n justifyContent=\"center\"\n width={6}\n >\n <CaretDown width=\"0.8rem\" fill=\"neutral600\" />\n </Flex>\n\n <Typography fontWeight=\"bold\">{name}</Typography>\n </Flex>\n );\n};\n\nexport { StageDragPreview };\nexport type { StageDragPreviewType };\n","import * as React from 'react';\n\nimport { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport { XYCoord, useDragLayer } from 'react-dnd';\nimport { useIntl } from 'react-intl';\n\nimport { DRAG_DROP_TYPES } from '../constants';\n\nimport { StageDragPreview } from './StageDragPreview';\n\nfunction getStyle(\n initialOffset: XYCoord | null,\n currentOffset: XYCoord | null,\n mouseOffset: XYCoord | null\n) {\n if (!initialOffset || !currentOffset || !mouseOffset) {\n return { display: 'none' };\n }\n\n const { x, y } = mouseOffset;\n\n return {\n transform: `translate(${x}px, ${y}px)`,\n };\n}\n\nconst DragLayerRendered = () => {\n const { itemType, isDragging, item, initialOffset, currentOffset, mouseOffset } = useDragLayer(\n (monitor) => ({\n item: monitor.getItem(),\n itemType: monitor.getItemType(),\n initialOffset: monitor.getInitialSourceClientOffset(),\n currentOffset: monitor.getSourceClientOffset(),\n isDragging: monitor.isDragging(),\n mouseOffset: monitor.getClientOffset(),\n })\n );\n\n if (!isDragging || itemType !== DRAG_DROP_TYPES.STAGE) {\n return null;\n }\n\n return (\n <Box\n height=\"100%\"\n left={0}\n position=\"fixed\"\n pointerEvents=\"none\"\n top={0}\n zIndex={100}\n width=\"100%\"\n >\n <Box style={getStyle(initialOffset, currentOffset, mouseOffset)}>\n <StageDragPreview name={typeof item.item === 'string' ? item.item : null} />;\n </Box>\n </Box>\n );\n};\n\nconst Root: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Page.Main>\n <Layouts.Content>{children}</Layouts.Content>\n </Page.Main>\n );\n};\n\ninterface HeaderProps {\n title: string;\n navigationAction?: React.ReactNode;\n primaryAction?: React.ReactNode;\n secondaryAction?: React.ReactNode;\n subtitle?: React.ReactNode;\n}\n\nconst Header: React.FC<HeaderProps> = ({ title, subtitle, navigationAction, primaryAction }) => {\n const { formatMessage } = useIntl();\n return (\n <>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: title,\n }\n )}\n </Page.Title>\n <Layouts.BaseHeader\n navigationAction={navigationAction}\n primaryAction={primaryAction}\n title={title}\n subtitle={subtitle}\n />\n </>\n );\n};\n\nexport { DragLayerRendered, Header, Root };\n"],"names":["useNotification","useIntl","useAPIErrorHandler","useGetWorkflowsQuery","React","useCreateWorkflowMutation","data","useUpdateWorkflowMutation","useDeleteWorkflowMutation","jsxs","Flex","jsx","CaretDown","Typography","useDragLayer","Box","Page","Layouts","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAM,+BAA+B;AAAA,EACnC,IAAI;AAAA,EACJ,gBAAgB;AAClB;AAMA,MAAM,qBAAqB,CAAC,SAAiC,OAAO;AAC5D,QAAA,EAAE,uBAAuBA,YAAAA;AACzB,QAAA,EAAE,kBAAkBC,UAAAA;AAC1B,QAAM,EAAE,yBAAyB,eAAe,IAAIC,YAAmB,mBAAA;AAEvE,QAAM,EAAE,OAAO,OAAO,GAAG,gBAAgB;AAEzC,QAAM,EAAE,MAAM,WAAW,MAAU,IAAAC,MAAA;AAAA,IACjC;AAAA,MACE,UAAU,CAAC,UAAU,wBAAwB;AAAA,MAC7C,GAAG;AAAA,IACL;AAAA,IACA;AAAA,MACE;AAAA,IACF;AAAA,EAAA;AAGFC,mBAAM,UAAU,MAAM;AACpB,QAAI,OAAO;AACU,yBAAA;AAAA,QACjB,MAAM;AAAA,QACN,SAAS,eAAe,KAAK;AAAA,MAAA,CAC9B;AAAA,IACH;AAAA,EACC,GAAA,CAAC,OAAO,gBAAgB,kBAAkB,CAAC;AAExC,QAAA,CAAC,cAAc,IAAIC,MAAAA;AACzB,QAAM,SAASD,iBAAM;AAAA,IACnB,OAAOE,UAAyC;AAC1C,UAAA;AACF,cAAM,MAAM,MAAM,eAAe,EAAE,MAAAA,MAAM,CAAA;AAEzC,YAAI,WAAW,KAAK;AACC,6BAAA;AAAA,YACjB,MAAM;AAAA,YACN,SAAS,eAAe,IAAI,KAAK;AAAA,UAAA,CAClC;AAEM,iBAAA;AAAA,QACT;AAEmB,2BAAA;AAAA,UACjB,MAAM;AAAA,UACN,SAAS,cAAc,EAAE,IAAI,mBAAmB,gBAAgB,oBAAoB;AAAA,QAAA,CAC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A,MAChE;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IAAA,GAEJ;AAAA,IACAL,2BAAA;AAAA,MAACM,YAAAA,QAAQ;AAAA,MAAR;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ;;;;;;"}
1
+ {"version":3,"file":"Layout-ywt0cSLq.js","sources":["../../admin/src/routes/settings/hooks/useReviewWorkflows.ts","../../admin/src/routes/settings/constants.ts","../../admin/src/routes/settings/components/StageDragPreview.tsx","../../admin/src/routes/settings/components/Layout.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { useAPIErrorHandler, useNotification } from '@strapi/admin/strapi-admin';\nimport { type MessageDescriptor, useIntl } from 'react-intl';\n\nimport {\n GetWorkflowsParams,\n useCreateWorkflowMutation,\n useDeleteWorkflowMutation,\n useGetWorkflowsQuery,\n useUpdateWorkflowMutation,\n} from '../../../services/settings';\n\nimport type { Create, Update } from '../../../../../shared/contracts/review-workflows';\n\nconst DEFAULT_UNEXPECTED_ERROR_MSG = {\n id: 'notification.error',\n defaultMessage: 'An error occurred, please try again',\n} satisfies MessageDescriptor;\n\ntype UseReviewWorkflowsArgs = GetWorkflowsParams & {\n skip?: boolean;\n};\n\nconst useReviewWorkflows = (params: UseReviewWorkflowsArgs = {}) => {\n const { toggleNotification } = useNotification();\n const { formatMessage } = useIntl();\n const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();\n\n const { skip = false, ...queryParams } = params;\n\n const { data, isLoading, error } = useGetWorkflowsQuery(\n {\n populate: ['stages', 'stageRequiredToPublish'],\n ...queryParams,\n },\n {\n skip,\n }\n );\n\n React.useEffect(() => {\n if (error) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(error),\n });\n }\n }, [error, formatAPIError, toggleNotification]);\n\n const [createWorkflow] = useCreateWorkflowMutation();\n const create = React.useCallback(\n async (data: Create.Request['body']['data']) => {\n try {\n const res = await createWorkflow({ data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.created', defaultMessage: 'Created workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [createWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const [updateWorkflow] = useUpdateWorkflowMutation();\n const update = React.useCallback(\n async (id: string, data: Update.Request['body']['data']) => {\n try {\n const res = await updateWorkflow({ id, data });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return res;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.updated', defaultMessage: 'Updated workflow' }),\n });\n\n return res;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [formatAPIError, formatMessage, toggleNotification, updateWorkflow]\n );\n\n const [deleteWorkflow] = useDeleteWorkflowMutation();\n const deleteAction = React.useCallback(\n async (id: string) => {\n try {\n const res = await deleteWorkflow({ id });\n\n if ('error' in res) {\n toggleNotification({\n type: 'danger',\n message: formatAPIError(res.error),\n });\n\n return;\n }\n\n toggleNotification({\n type: 'success',\n message: formatMessage({ id: 'actions.deleted', defaultMessage: 'Deleted workflow' }),\n });\n\n return res.data;\n } catch (err) {\n toggleNotification({\n type: 'danger',\n message: formatMessage(DEFAULT_UNEXPECTED_ERROR_MSG),\n });\n\n throw err;\n }\n },\n [deleteWorkflow, formatAPIError, formatMessage, toggleNotification]\n );\n\n const { workflows = [], meta } = data ?? {};\n\n return {\n // meta contains e.g. the total of all workflows. we can not use\n // the pagination object here, because the list is not paginated.\n meta,\n workflows,\n isLoading,\n error,\n create,\n delete: deleteAction,\n update,\n };\n};\n\nexport { useReviewWorkflows };\n","export type DragDropTypes = 'stage';\n\nexport const DRAG_DROP_TYPES: Record<Uppercase<DragDropTypes>, DragDropTypes> = {\n STAGE: 'stage',\n};\n","import { Flex, Typography } from '@strapi/design-system';\nimport { CaretDown } from '@strapi/icons';\n\ninterface StageDragPreviewType {\n name: string | null;\n}\n\nconst StageDragPreview = ({ name }: StageDragPreviewType) => {\n return (\n <Flex\n background=\"primary100\"\n borderStyle=\"dashed\"\n borderColor=\"primary600\"\n borderWidth=\"1px\"\n gap={3}\n hasRadius\n padding={3}\n shadow=\"tableShadow\"\n width=\"30rem\"\n >\n <Flex\n alignItems=\"center\"\n background=\"neutral200\"\n borderRadius=\"50%\"\n height={6}\n justifyContent=\"center\"\n width={6}\n >\n <CaretDown width=\"0.8rem\" fill=\"neutral600\" />\n </Flex>\n\n <Typography fontWeight=\"bold\">{name}</Typography>\n </Flex>\n );\n};\n\nexport { StageDragPreview };\nexport type { StageDragPreviewType };\n","import * as React from 'react';\n\nimport { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { Box } from '@strapi/design-system';\nimport { XYCoord, useDragLayer } from 'react-dnd';\nimport { useIntl } from 'react-intl';\n\nimport { DRAG_DROP_TYPES } from '../constants';\n\nimport { StageDragPreview } from './StageDragPreview';\n\nfunction getStyle(\n initialOffset: XYCoord | null,\n currentOffset: XYCoord | null,\n mouseOffset: XYCoord | null\n) {\n if (!initialOffset || !currentOffset || !mouseOffset) {\n return { display: 'none' };\n }\n\n const { x, y } = mouseOffset;\n\n return {\n transform: `translate(${x}px, ${y}px)`,\n };\n}\n\nconst DragLayerRendered = () => {\n const { itemType, isDragging, item, initialOffset, currentOffset, mouseOffset } = useDragLayer(\n (monitor) => ({\n item: monitor.getItem(),\n itemType: monitor.getItemType(),\n initialOffset: monitor.getInitialSourceClientOffset(),\n currentOffset: monitor.getSourceClientOffset(),\n isDragging: monitor.isDragging(),\n mouseOffset: monitor.getClientOffset(),\n })\n );\n\n if (!isDragging || itemType !== DRAG_DROP_TYPES.STAGE) {\n return null;\n }\n\n return (\n <Box\n height=\"100%\"\n left={0}\n position=\"fixed\"\n pointerEvents=\"none\"\n top={0}\n zIndex={100}\n width=\"100%\"\n >\n <Box style={getStyle(initialOffset, currentOffset, mouseOffset)}>\n <StageDragPreview name={typeof item.item === 'string' ? item.item : null} />;\n </Box>\n </Box>\n );\n};\n\nconst Root: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <Page.Main>\n <Layouts.Content>{children}</Layouts.Content>\n </Page.Main>\n );\n};\n\ninterface HeaderProps {\n title: string;\n navigationAction?: React.ReactNode;\n primaryAction?: React.ReactNode;\n secondaryAction?: React.ReactNode;\n subtitle?: React.ReactNode;\n}\n\nconst Header: React.FC<HeaderProps> = ({ title, subtitle, navigationAction, primaryAction }) => {\n const { formatMessage } = useIntl();\n return (\n <>\n <Page.Title>\n {formatMessage(\n { id: 'Settings.PageTitle', defaultMessage: 'Settings - {name}' },\n {\n name: title,\n }\n )}\n </Page.Title>\n <Layouts.BaseHeader\n navigationAction={navigationAction}\n primaryAction={primaryAction}\n title={title}\n subtitle={subtitle}\n />\n </>\n );\n};\n\nexport { DragLayerRendered, Header, Root };\n"],"names":["useNotification","useIntl","useAPIErrorHandler","useGetWorkflowsQuery","React","useCreateWorkflowMutation","data","useUpdateWorkflowMutation","useDeleteWorkflowMutation","jsxs","Flex","jsx","CaretDown","Typography","useDragLayer","Box","Page","Layouts","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAM,+BAA+B;AAAA,EACnC,IAAI;AAAA,EACJ,gBAAgB;AAClB;AAMA,MAAM,qBAAqB,CAAC,SAAiC,OAAO;AAC5D,QAAA,EAAE,uBAAuBA,YAAAA;AACzB,QAAA,EAAE,kBAAkBC,UAAAA;AAC1B,QAAM,EAAE,yBAAyB,eAAe,IAAIC,YAAmB,mBAAA;AAEvE,QAAM,EAAE,OAAO,OAAO,GAAG,gBAAgB;AAEzC,QAAM,EAAE,MAAM,WAAW,MAAU,I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AA,MACN,UAAS;AAAA,MACT,eAAc;AAAA,MACd,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAM;AAAA,MAEN,0CAACA,aAAI,KAAA,EAAA,OAAO,SAAS,eAAe,eAAe,WAAW,GAC5D,UAAA;AAAA,QAACJ,2BAAAA,IAAA,kBAAA,EAAiB,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO,MAAM;AAAA,QAAE;AAAA,MAAA,GAC9E;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAM,OAA0C,CAAC,EAAE,eAAe;AAE9D,SAAAA,+BAACK,YAAAA,KAAK,MAAL,EACC,yCAACC,YAAQ,QAAA,SAAR,EAAiB,SAAS,CAAA,EAC7B,CAAA;AAEJ;AAUA,MAAM,SAAgC,CAAC,EAAE,OAAO,UAAU,kBAAkB,oBAAoB;AACxF,QAAA,EAAE,kBAAkBhB,UAAAA;AAC1B,SAEIQ,2BAAA,KAAAS,qBAAA,EAAA,UAAA;AAAA,IAACP,2BAAAA,IAAAK,YAAA,KAAK,OAAL,EACE,UAAA;AAAA,MACC,EAAE,IAAI,sBAAsB,gBAAgB,oBAAoB;AAAA,MAChE;AAAA,QACE,MAAM;AAAA,MACR;AAAA,IAAA,GAEJ;AAAA,IACAL,2BAAA;AAAA,MAACM,YAAAA,QAAQ;AAAA,MAAR;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ;;;;;;"}
@@ -8,8 +8,8 @@ import { generateNKeysBetween } from "fractional-indexing";
8
8
  import { useIntl } from "react-intl";
9
9
  import { useParams, useNavigate } from "react-router-dom";
10
10
  import * as yup from "yup";
11
- import { r as reviewWorkflowsApi, A as AVAILABLE_COLORS, g as getStageColorByHex, u as useGetContentTypesQuery, a as useTypedSelector, C as CHARGEBEE_WORKFLOW_ENTITLEMENT_NAME, b as CHARGEBEE_STAGES_PER_WORKFLOW_ENTITLEMENT_NAME, L as LimitsModal, i as isBaseQueryError } from "./index-DAcEdoqJ.mjs";
12
- import { D as DRAG_DROP_TYPES, u as useReviewWorkflows, a as DragLayerRendered, H as Header, R as Root } from "./Layout-Dko22Aly.mjs";
11
+ import { r as reviewWorkflowsApi, A as AVAILABLE_COLORS, g as getStageColorByHex, u as useGetContentTypesQuery, a as useTypedSelector, C as CHARGEBEE_WORKFLOW_ENTITLEMENT_NAME, b as CHARGEBEE_STAGES_PER_WORKFLOW_ENTITLEMENT_NAME, L as LimitsModal, i as isBaseQueryError } from "./index-BRmc4tbQ.mjs";
12
+ import { D as DRAG_DROP_TYPES, u as useReviewWorkflows, a as DragLayerRendered, H as Header, R as Root } from "./Layout-DU1Rt4Mu.mjs";
13
13
  import { getEmptyImage } from "react-dnd-html5-backend";
14
14
  import { styled } from "styled-components";
15
15
  import { useDrop, useDrag } from "react-dnd";
@@ -1274,4 +1274,4 @@ const ProtectedEditPage = () => {
1274
1274
  export {
1275
1275
  ProtectedEditPage
1276
1276
  };
1277
- //# sourceMappingURL=id-DINFSsrh.mjs.map
1277
+ //# sourceMappingURL=id-MDQVDdXD.mjs.map