@strapi/review-workflows 0.0.0-next.23a591758a1d192f794079bbe4821ef8d26e1555 → 0.0.0-next.24165c9d5cbc756c03fe23bc491569c77973f5ac

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 (28) hide show
  1. package/dist/admin/chunks/{Layout-27uslS7w.mjs → Layout-7yUEgXLW.mjs} +2 -2
  2. package/dist/admin/chunks/{Layout-27uslS7w.mjs.map → Layout-7yUEgXLW.mjs.map} +1 -1
  3. package/dist/admin/chunks/{Layout-B4l91S3p.js → Layout-B2zmShpr.js} +2 -2
  4. package/dist/admin/chunks/{Layout-B4l91S3p.js.map → Layout-B2zmShpr.js.map} +1 -1
  5. package/dist/admin/chunks/{id-LAMc9ydb.mjs → id-7Ja9CZdp.mjs} +3 -3
  6. package/dist/admin/chunks/{id-LAMc9ydb.mjs.map → id-7Ja9CZdp.mjs.map} +1 -1
  7. package/dist/admin/chunks/{id-DnRGfGvc.js → id-ZuszhA5g.js} +3 -3
  8. package/dist/admin/chunks/{id-DnRGfGvc.js.map → id-ZuszhA5g.js.map} +1 -1
  9. package/dist/admin/chunks/{index-CSYOmjZt.mjs → index-B0bafNic.mjs} +264 -110
  10. package/dist/admin/chunks/index-B0bafNic.mjs.map +1 -0
  11. package/dist/admin/chunks/{index-C5IeISWp.js → index-C-Z_kiBH.js} +263 -109
  12. package/dist/admin/chunks/index-C-Z_kiBH.js.map +1 -0
  13. package/dist/admin/chunks/{index-DZpcSUvc.js → index-DbV90_yc.js} +3 -3
  14. package/dist/admin/chunks/{index-DZpcSUvc.js.map → index-DbV90_yc.js.map} +1 -1
  15. package/dist/admin/chunks/{index-BiGArvbK.mjs → index-vEB_IwmF.mjs} +3 -3
  16. package/dist/admin/chunks/{index-BiGArvbK.mjs.map → index-vEB_IwmF.mjs.map} +1 -1
  17. package/dist/admin/chunks/{router-CrN8UbpP.js → router-B23K7ac8.js} +3 -3
  18. package/dist/admin/chunks/{router-CrN8UbpP.js.map → router-B23K7ac8.js.map} +1 -1
  19. package/dist/admin/chunks/{router-Z3AR7XZ7.mjs → router-DpKT2sjx.mjs} +3 -3
  20. package/dist/admin/chunks/{router-Z3AR7XZ7.mjs.map → router-DpKT2sjx.mjs.map} +1 -1
  21. package/dist/admin/index.js +2 -2
  22. package/dist/admin/index.mjs +2 -2
  23. package/dist/admin/src/routes/content-manager/model/id/components/AssigneeSelect.d.ts +3 -1
  24. package/dist/admin/src/routes/content-manager/model/id/components/Header.d.ts +5 -0
  25. package/dist/admin/src/routes/content-manager/model/id/components/StageSelect.d.ts +3 -1
  26. package/package.json +7 -7
  27. package/dist/admin/chunks/index-C5IeISWp.js.map +0 -1
  28. package/dist/admin/chunks/index-CSYOmjZt.mjs.map +0 -1
@@ -3,10 +3,10 @@
3
3
  var designSystem = require('@strapi/design-system');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var strapiAdmin$1 = require('@strapi/content-manager/strapi-admin');
6
- var reactIntl = require('react-intl');
7
6
  var reactRouterDom = require('react-router-dom');
8
7
  var React = require('react');
9
8
  var strapiAdmin = require('@strapi/admin/strapi-admin');
9
+ var reactIntl = require('react-intl');
10
10
  var reactRedux = require('react-redux');
11
11
  var ee = require('@strapi/admin/strapi-admin/ee');
12
12
  var icons = require('@strapi/icons');
@@ -175,7 +175,7 @@ const isBaseQueryError = (error)=>{
175
175
  const STAGE_ATTRIBUTE_NAME = 'strapi_stage';
176
176
  const ASSIGNEE_ATTRIBUTE_NAME = 'strapi_assignee';
177
177
 
178
- const AssigneeSelect = ()=>{
178
+ const AssigneeSelect = ({ isCompact })=>{
179
179
  const { collectionType = '', id, slug: model = '' } = reactRouterDom.useParams();
180
180
  const permissions = useTypedSelector((state)=>state.admin_app.permissions);
181
181
  const { formatMessage } = reactIntl.useIntl();
@@ -186,7 +186,7 @@ const AssigneeSelect = ()=>{
186
186
  const params = React__namespace.useMemo(()=>buildValidParams(query), [
187
187
  query
188
188
  ]);
189
- const { data, isLoading, isError } = strapiAdmin.useAdminUsers(undefined, {
189
+ const { data, isLoading: isLoadingUsers, isError } = strapiAdmin.useAdminUsers(undefined, {
190
190
  skip: isLoadingPermissions || !canRead
191
191
  });
192
192
  const { document } = strapiAdmin$1.unstable_useDocument({
@@ -225,7 +225,57 @@ const AssigneeSelect = ()=>{
225
225
  })
226
226
  });
227
227
  }
228
+ if (isCompact && 'error' in res) {
229
+ toggleNotification({
230
+ type: 'danger',
231
+ message: formatAPIError(res.error)
232
+ });
233
+ }
228
234
  };
235
+ const isDisabled = !isLoadingPermissions && !isLoadingUsers && users.length === 0 || !document.documentId;
236
+ const isLoading = isLoadingUsers || isLoadingPermissions || isMutating;
237
+ const assigneeLabel = formatMessage({
238
+ id: 'content-manager.reviewWorkflows.assignee.label',
239
+ defaultMessage: 'Assignee'
240
+ });
241
+ const assigneeClearLabel = formatMessage({
242
+ id: 'content-manager.reviewWorkflows.assignee.clear',
243
+ defaultMessage: 'Clear assignee'
244
+ });
245
+ const assigneePlaceholder = formatMessage({
246
+ id: 'content-manager.reviewWorkflows.assignee.placeholder',
247
+ defaultMessage: 'Select…'
248
+ });
249
+ if (isCompact) {
250
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Field.Root, {
251
+ name: ASSIGNEE_ATTRIBUTE_NAME,
252
+ id: ASSIGNEE_ATTRIBUTE_NAME,
253
+ children: [
254
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.VisuallyHidden, {
255
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
256
+ children: assigneeLabel
257
+ })
258
+ }),
259
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Combobox, {
260
+ clearLabel: assigneeClearLabel,
261
+ disabled: isDisabled,
262
+ value: currentAssignee ? currentAssignee.id.toString() : null,
263
+ onChange: handleChange,
264
+ onClear: ()=>handleChange(null),
265
+ placeholder: assigneePlaceholder,
266
+ loading: isLoading || isLoadingPermissions || isMutating,
267
+ size: "S",
268
+ children: users.map((user)=>{
269
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.ComboboxOption, {
270
+ value: user.id.toString(),
271
+ textValue: getDisplayName(user),
272
+ children: getDisplayName(user)
273
+ }, user.id);
274
+ })
275
+ })
276
+ ]
277
+ });
278
+ }
229
279
  return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Field.Root, {
230
280
  name: ASSIGNEE_ATTRIBUTE_NAME,
231
281
  id: ASSIGNEE_ATTRIBUTE_NAME,
@@ -235,24 +285,15 @@ const AssigneeSelect = ()=>{
235
285
  }) || error && formatAPIError(error)) ?? undefined,
236
286
  children: [
237
287
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
238
- children: formatMessage({
239
- id: 'content-manager.reviewWorkflows.assignee.label',
240
- defaultMessage: 'Assignee'
241
- })
288
+ children: assigneeLabel
242
289
  }),
243
290
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Combobox, {
244
- clearLabel: formatMessage({
245
- id: 'content-manager.reviewWorkflows.assignee.clear',
246
- defaultMessage: 'Clear assignee'
247
- }),
291
+ clearLabel: assigneeClearLabel,
248
292
  disabled: !isLoadingPermissions && !isLoading && users.length === 0 || !document.documentId,
249
293
  value: currentAssignee ? currentAssignee.id.toString() : null,
250
294
  onChange: handleChange,
251
295
  onClear: ()=>handleChange(null),
252
- placeholder: formatMessage({
253
- id: 'content-manager.reviewWorkflows.assignee.placeholder',
254
- defaultMessage: 'Select…'
255
- }),
296
+ placeholder: assigneePlaceholder,
256
297
  loading: isLoading || isLoadingPermissions || isMutating,
257
298
  children: users.map((user)=>{
258
299
  return /*#__PURE__*/ jsxRuntime.jsx(designSystem.ComboboxOption, {
@@ -422,7 +463,115 @@ const AVAILABLE_COLORS = Object.entries(STAGE_COLORS).map(([themeColorName, name
422
463
  name
423
464
  }));
424
465
 
425
- const StageSelect = ()=>{
466
+ /* -------------------------------------------------------------------------------------------------
467
+ * LimitModals
468
+ * -----------------------------------------------------------------------------------------------*/ const WorkflowLimitModal = ({ open, onOpenChange })=>{
469
+ const { formatMessage } = reactIntl.useIntl();
470
+ return /*#__PURE__*/ jsxRuntime.jsxs(LimitsModal.Root, {
471
+ open: open,
472
+ onOpenChange: onOpenChange,
473
+ children: [
474
+ /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Title, {
475
+ children: formatMessage({
476
+ id: 'content-manager.reviewWorkflows.workflows.limit.title',
477
+ defaultMessage: 'You’ve reached the limit of workflows in your plan'
478
+ })
479
+ }),
480
+ /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Body, {
481
+ children: formatMessage({
482
+ id: 'content-manager.reviewWorkflows.workflows.limit.body',
483
+ defaultMessage: 'Delete a workflow or contact Sales to enable more workflows.'
484
+ })
485
+ })
486
+ ]
487
+ });
488
+ };
489
+ const StageLimitModal = ({ open, onOpenChange })=>{
490
+ const { formatMessage } = reactIntl.useIntl();
491
+ return /*#__PURE__*/ jsxRuntime.jsxs(LimitsModal.Root, {
492
+ open: open,
493
+ onOpenChange: onOpenChange,
494
+ children: [
495
+ /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Title, {
496
+ children: formatMessage({
497
+ id: 'content-manager.reviewWorkflows.stages.limit.title',
498
+ defaultMessage: 'You have reached the limit of stages for this workflow in your plan'
499
+ })
500
+ }),
501
+ /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Body, {
502
+ children: formatMessage({
503
+ id: 'content-manager.reviewWorkflows.stages.limit.body',
504
+ defaultMessage: 'Try deleting some stages or contact Sales to enable more stages.'
505
+ })
506
+ })
507
+ ]
508
+ });
509
+ };
510
+ /* -------------------------------------------------------------------------------------------------
511
+ * StageSelect
512
+ * -----------------------------------------------------------------------------------------------*/ const Select = ({ stages, activeWorkflowStage, isLoading, ...props })=>{
513
+ const { formatMessage } = reactIntl.useIntl();
514
+ const { themeColorName } = getStageColorByHex(activeWorkflowStage?.color) ?? {};
515
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelect, {
516
+ disabled: stages.length === 0,
517
+ placeholder: formatMessage({
518
+ id: 'content-manager.reviewWorkflows.assignee.placeholder',
519
+ defaultMessage: 'Select…'
520
+ }),
521
+ startIcon: activeWorkflowStage && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
522
+ tag: "span",
523
+ height: 2,
524
+ background: activeWorkflowStage?.color,
525
+ borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
526
+ hasRadius: true,
527
+ shrink: 0,
528
+ width: 2,
529
+ marginRight: "-3px"
530
+ }),
531
+ // @ts-expect-error – `customizeContent` is not correctly typed in the DS.
532
+ customizeContent: ()=>{
533
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
534
+ tag: "span",
535
+ justifyContent: "space-between",
536
+ alignItems: "center",
537
+ width: "100%",
538
+ children: [
539
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
540
+ textColor: "neutral800",
541
+ ellipsis: true,
542
+ lineHeight: "inherit",
543
+ children: activeWorkflowStage?.name ?? ''
544
+ }),
545
+ isLoading ? /*#__PURE__*/ jsxRuntime.jsx(designSystem.Loader, {
546
+ small: true,
547
+ style: {
548
+ display: 'flex'
549
+ },
550
+ "data-testid": "loader"
551
+ }) : null
552
+ ]
553
+ });
554
+ },
555
+ ...props,
556
+ children: stages.map(({ id, color, name })=>{
557
+ const { themeColorName } = getStageColorByHex(color) ?? {};
558
+ return /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
559
+ startIcon: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
560
+ height: 2,
561
+ background: color,
562
+ borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
563
+ hasRadius: true,
564
+ shrink: 0,
565
+ width: 2
566
+ }),
567
+ value: id,
568
+ textValue: name,
569
+ children: name
570
+ }, id);
571
+ })
572
+ });
573
+ };
574
+ const StageSelect = ({ isCompact })=>{
426
575
  const { collectionType = '', slug: model = '', id = '' } = reactRouterDom.useParams();
427
576
  const { formatMessage } = reactIntl.useIntl();
428
577
  const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
@@ -495,6 +644,12 @@ const StageSelect = ()=>{
495
644
  })
496
645
  });
497
646
  }
647
+ if (isCompact && 'error' in res) {
648
+ toggleNotification({
649
+ type: 'danger',
650
+ message: formatAPIError(res.error)
651
+ });
652
+ }
498
653
  }
499
654
  }
500
655
  } catch (error) {
@@ -507,127 +662,118 @@ const StageSelect = ()=>{
507
662
  });
508
663
  }
509
664
  };
510
- const { themeColorName } = getStageColorByHex(activeWorkflowStage?.color) ?? {};
511
665
  const isLoading = isLoadingStages || isLoadingDocument;
666
+ const reviewStageLabel = formatMessage({
667
+ id: 'content-manager.reviewWorkflows.stage.label',
668
+ defaultMessage: 'Review stage'
669
+ });
670
+ const reviewStageHint = !isLoading && stages.length === 0 && // TODO: Handle errors and hints
671
+ formatMessage({
672
+ id: 'content-manager.reviewWorkflows.stages.no-transition',
673
+ defaultMessage: 'You don’t have the permission to update this stage.'
674
+ });
675
+ if (isCompact) {
676
+ return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
677
+ children: [
678
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tooltip, {
679
+ label: reviewStageHint,
680
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Root, {
681
+ name: STAGE_ATTRIBUTE_NAME,
682
+ id: STAGE_ATTRIBUTE_NAME,
683
+ children: /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
684
+ children: [
685
+ /*#__PURE__*/ jsxRuntime.jsx(designSystem.VisuallyHidden, {
686
+ children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
687
+ children: reviewStageLabel
688
+ })
689
+ }),
690
+ /*#__PURE__*/ jsxRuntime.jsx(Select, {
691
+ stages: stages,
692
+ activeWorkflowStage: activeWorkflowStage,
693
+ isLoading: isLoading,
694
+ size: "S",
695
+ disabled: stages.length === 0,
696
+ value: activeWorkflowStage?.id,
697
+ onChange: handleChange,
698
+ placeholder: formatMessage({
699
+ id: 'content-manager.reviewWorkflows.assignee.placeholder',
700
+ defaultMessage: 'Select…'
701
+ })
702
+ })
703
+ ]
704
+ })
705
+ })
706
+ }),
707
+ /*#__PURE__*/ jsxRuntime.jsx(WorkflowLimitModal, {
708
+ open: showLimitModal === 'workflow',
709
+ onOpenChange: ()=>setShowLimitModal(null)
710
+ }),
711
+ /*#__PURE__*/ jsxRuntime.jsx(StageLimitModal, {
712
+ open: showLimitModal === 'stage',
713
+ onOpenChange: ()=>setShowLimitModal(null)
714
+ })
715
+ ]
716
+ });
717
+ }
512
718
  return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
513
719
  children: [
514
720
  /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Field.Root, {
515
- hint: !isLoading && stages.length === 0 && formatMessage({
516
- id: 'content-manager.reviewWorkflows.stages.no-transition',
517
- defaultMessage: 'You don’t have the permission to update this stage.'
518
- }),
721
+ hint: reviewStageHint,
519
722
  error: error && formatAPIError(error) || undefined,
520
723
  name: STAGE_ATTRIBUTE_NAME,
521
724
  id: STAGE_ATTRIBUTE_NAME,
522
725
  children: [
523
726
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Label, {
524
- children: formatMessage({
525
- id: 'content-manager.reviewWorkflows.stage.label',
526
- defaultMessage: 'Review stage'
527
- })
727
+ children: reviewStageLabel
528
728
  }),
529
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelect, {
729
+ /*#__PURE__*/ jsxRuntime.jsx(Select, {
730
+ stages: stages,
731
+ activeWorkflowStage: activeWorkflowStage,
732
+ isLoading: isLoading,
530
733
  disabled: stages.length === 0,
531
734
  value: activeWorkflowStage?.id,
532
735
  onChange: handleChange,
533
736
  placeholder: formatMessage({
534
737
  id: 'content-manager.reviewWorkflows.assignee.placeholder',
535
738
  defaultMessage: 'Select…'
536
- }),
537
- startIcon: activeWorkflowStage && /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
538
- tag: "span",
539
- height: 2,
540
- background: activeWorkflowStage?.color,
541
- borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
542
- hasRadius: true,
543
- shrink: 0,
544
- width: 2,
545
- marginRight: "-3px"
546
- }),
547
- // @ts-expect-error – `customizeContent` is not correctly typed in the DS.
548
- customizeContent: ()=>{
549
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
550
- tag: "span",
551
- justifyContent: "space-between",
552
- alignItems: "center",
553
- width: "100%",
554
- children: [
555
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Typography, {
556
- textColor: "neutral800",
557
- ellipsis: true,
558
- children: activeWorkflowStage?.name ?? ''
559
- }),
560
- isLoading ? /*#__PURE__*/ jsxRuntime.jsx(designSystem.Loader, {
561
- small: true,
562
- style: {
563
- display: 'flex'
564
- },
565
- "data-testid": "loader"
566
- }) : null
567
- ]
568
- });
569
- },
570
- children: stages.map(({ id, color, name })=>{
571
- const { themeColorName } = getStageColorByHex(color) ?? {};
572
- return /*#__PURE__*/ jsxRuntime.jsx(designSystem.SingleSelectOption, {
573
- startIcon: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
574
- height: 2,
575
- background: color,
576
- borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
577
- hasRadius: true,
578
- shrink: 0,
579
- width: 2
580
- }),
581
- value: id,
582
- textValue: name,
583
- children: name
584
- }, id);
585
739
  })
586
740
  }),
587
741
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Hint, {}),
588
742
  /*#__PURE__*/ jsxRuntime.jsx(designSystem.Field.Error, {})
589
743
  ]
590
744
  }),
591
- /*#__PURE__*/ jsxRuntime.jsxs(LimitsModal.Root, {
745
+ /*#__PURE__*/ jsxRuntime.jsx(WorkflowLimitModal, {
592
746
  open: showLimitModal === 'workflow',
593
- onOpenChange: ()=>setShowLimitModal(null),
594
- children: [
595
- /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Title, {
596
- children: formatMessage({
597
- id: 'content-manager.reviewWorkflows.workflows.limit.title',
598
- defaultMessage: 'You’ve reached the limit of workflows in your plan'
599
- })
600
- }),
601
- /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Body, {
602
- children: formatMessage({
603
- id: 'content-manager.reviewWorkflows.workflows.limit.body',
604
- defaultMessage: 'Delete a workflow or contact Sales to enable more workflows.'
605
- })
606
- })
607
- ]
747
+ onOpenChange: ()=>setShowLimitModal(null)
608
748
  }),
609
- /*#__PURE__*/ jsxRuntime.jsxs(LimitsModal.Root, {
749
+ /*#__PURE__*/ jsxRuntime.jsx(StageLimitModal, {
610
750
  open: showLimitModal === 'stage',
611
- onOpenChange: ()=>setShowLimitModal(null),
612
- children: [
613
- /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Title, {
614
- children: formatMessage({
615
- id: 'content-manager.reviewWorkflows.stages.limit.title',
616
- defaultMessage: 'You have reached the limit of stages for this workflow in your plan'
617
- })
618
- }),
619
- /*#__PURE__*/ jsxRuntime.jsx(LimitsModal.Body, {
620
- children: formatMessage({
621
- id: 'content-manager.reviewWorkflows.stages.limit.body',
622
- defaultMessage: 'Try deleting some stages or contact Sales to enable more stages.'
623
- })
624
- })
625
- ]
751
+ onOpenChange: ()=>setShowLimitModal(null)
626
752
  })
627
753
  ]
628
754
  });
629
755
  };
630
756
 
757
+ const Header = ()=>{
758
+ const { slug = '', id, collectionType } = reactRouterDom.useParams();
759
+ const { edit: { options } } = strapiAdmin$1.unstable_useDocumentLayout(slug);
760
+ if (!window.strapi.isEE || !options?.reviewWorkflows || collectionType !== 'single-types' && !id || id === 'create') {
761
+ return null;
762
+ }
763
+ return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
764
+ gap: 2,
765
+ children: [
766
+ /*#__PURE__*/ jsxRuntime.jsx(AssigneeSelect, {
767
+ isCompact: true
768
+ }),
769
+ /*#__PURE__*/ jsxRuntime.jsx(StageSelect, {
770
+ isCompact: true
771
+ })
772
+ ]
773
+ });
774
+ };
775
+ Header.type = 'preview';
776
+
631
777
  const Panel = ()=>{
632
778
  const { slug = '', id, collectionType } = reactRouterDom.useParams();
633
779
  const { edit: { options } } = strapiAdmin$1.unstable_useDocumentLayout(slug);
@@ -900,7 +1046,7 @@ const admin = {
900
1046
  },
901
1047
  permissions: [],
902
1048
  async Component () {
903
- const { Router } = await Promise.resolve().then(function () { return require('./router-CrN8UbpP.js'); });
1049
+ const { Router } = await Promise.resolve().then(function () { return require('./router-B23K7ac8.js'); });
904
1050
  return {
905
1051
  default: Router
906
1052
  };
@@ -925,6 +1071,14 @@ const admin = {
925
1071
  });
926
1072
  }
927
1073
  },
1074
+ bootstrap (app) {
1075
+ if (window.strapi.features.isEnabled(FEATURE_ID)) {
1076
+ app.getPlugin('content-manager').injectComponent('preview', 'actions', {
1077
+ name: 'review-workflows-assignee',
1078
+ Component: Header
1079
+ });
1080
+ }
1081
+ },
928
1082
  async registerTrads ({ locales }) {
929
1083
  const importedTrads = await Promise.all(locales.map((locale)=>{
930
1084
  return __variableDynamicImportRuntime2__(`./translations/${locale}.json`).then(({ default: data })=>{
@@ -957,4 +1111,4 @@ exports.useGetContentTypesQuery = useGetContentTypesQuery;
957
1111
  exports.useGetWorkflowsQuery = useGetWorkflowsQuery;
958
1112
  exports.useTypedSelector = useTypedSelector;
959
1113
  exports.useUpdateWorkflowMutation = useUpdateWorkflowMutation;
960
- //# sourceMappingURL=index-C5IeISWp.js.map
1114
+ //# sourceMappingURL=index-C-Z_kiBH.js.map