@strapi/review-workflows 0.0.0-next.c22d1aa5024dc77092c3df7e990ad89dcd79e7b0 → 0.0.0-next.c57731c6e91ae024fa544ad986d80a3c4a489dbf

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 (50) hide show
  1. package/dist/admin/chunks/{Layout-B4l91S3p.js → Layout-COWXwu3C.js} +2 -2
  2. package/dist/admin/chunks/{Layout-B4l91S3p.js.map → Layout-COWXwu3C.js.map} +1 -1
  3. package/dist/admin/chunks/{Layout-CXRcBLOx.js → Layout-CsShRydy.mjs} +2 -2
  4. package/dist/admin/chunks/Layout-CsShRydy.mjs.map +1 -0
  5. package/dist/admin/chunks/{en-C6SESe-Y.js → en-BNGiWajd.js} +6 -2
  6. package/dist/admin/chunks/en-BNGiWajd.js.map +1 -0
  7. package/dist/admin/chunks/{en-BixG7IBu.js → en-BrZXFtVv.mjs} +6 -2
  8. package/dist/admin/chunks/en-BrZXFtVv.mjs.map +1 -0
  9. package/dist/admin/chunks/{id-DnRGfGvc.js → id-D8zbh_Y8.js} +3 -3
  10. package/dist/admin/chunks/{id-DnRGfGvc.js.map → id-D8zbh_Y8.js.map} +1 -1
  11. package/dist/admin/chunks/{id-SiBUWtYE.js → id-afdVynVx.mjs} +3 -3
  12. package/dist/admin/chunks/id-afdVynVx.mjs.map +1 -0
  13. package/dist/admin/chunks/{index-Df6sZesT.js → index-2VGAYchq.mjs} +268 -113
  14. package/dist/admin/chunks/index-2VGAYchq.mjs.map +1 -0
  15. package/dist/admin/chunks/{index-DZpcSUvc.js → index-7Tk-SHLf.js} +3 -3
  16. package/dist/admin/chunks/{index-DZpcSUvc.js.map → index-7Tk-SHLf.js.map} +1 -1
  17. package/dist/admin/chunks/{index-D-2M8KV9.js → index-BXlkcM4s.mjs} +3 -3
  18. package/dist/admin/chunks/index-BXlkcM4s.mjs.map +1 -0
  19. package/dist/admin/chunks/{index-C5IeISWp.js → index-CEABZUwQ.js} +266 -111
  20. package/dist/admin/chunks/index-CEABZUwQ.js.map +1 -0
  21. package/dist/admin/chunks/purchase-review-workflows-BJkm1_Dd.mjs +180 -0
  22. package/dist/admin/chunks/purchase-review-workflows-BJkm1_Dd.mjs.map +1 -0
  23. package/dist/admin/chunks/purchase-review-workflows-BQL0PbmB.js +182 -0
  24. package/dist/admin/chunks/purchase-review-workflows-BQL0PbmB.js.map +1 -0
  25. package/dist/admin/chunks/{router-CrN8UbpP.js → router-Cc8VcSCc.js} +3 -3
  26. package/dist/admin/chunks/{router-CrN8UbpP.js.map → router-Cc8VcSCc.js.map} +1 -1
  27. package/dist/admin/chunks/{router-C9Jpl4gL.js → router-JyFAzv9_.mjs} +3 -3
  28. package/dist/admin/chunks/router-JyFAzv9_.mjs.map +1 -0
  29. package/dist/admin/chunks/uk-CbRUr1I7.js +16 -0
  30. package/dist/admin/chunks/uk-CbRUr1I7.js.map +1 -0
  31. package/dist/admin/chunks/uk-DLlzEBUF.mjs +14 -0
  32. package/dist/admin/chunks/uk-DLlzEBUF.mjs.map +1 -0
  33. package/dist/admin/index.js +2 -2
  34. package/dist/admin/index.mjs +2 -2
  35. package/dist/admin/src/routes/content-manager/model/id/components/AssigneeSelect.d.ts +3 -1
  36. package/dist/admin/src/routes/content-manager/model/id/components/Header.d.ts +5 -0
  37. package/dist/admin/src/routes/content-manager/model/id/components/StageSelect.d.ts +3 -1
  38. package/package.json +7 -8
  39. package/dist/admin/chunks/Layout-CXRcBLOx.js.map +0 -1
  40. package/dist/admin/chunks/en-BixG7IBu.js.map +0 -1
  41. package/dist/admin/chunks/en-C6SESe-Y.js.map +0 -1
  42. package/dist/admin/chunks/id-SiBUWtYE.js.map +0 -1
  43. package/dist/admin/chunks/index-C5IeISWp.js.map +0 -1
  44. package/dist/admin/chunks/index-D-2M8KV9.js.map +0 -1
  45. package/dist/admin/chunks/index-Df6sZesT.js.map +0 -1
  46. package/dist/admin/chunks/purchase-review-workflows-CEP8kvxZ.js +0 -53
  47. package/dist/admin/chunks/purchase-review-workflows-CEP8kvxZ.js.map +0 -1
  48. package/dist/admin/chunks/purchase-review-workflows-Drlxm8yP.js +0 -55
  49. package/dist/admin/chunks/purchase-review-workflows-Drlxm8yP.js.map +0 -1
  50. package/dist/admin/chunks/router-C9Jpl4gL.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { lightTheme, Field, Combobox, ComboboxOption, Modal, Typography, Flex, Box, IconButton, LinkButton, SingleSelect, Loader, SingleSelectOption } from '@strapi/design-system';
1
+ import { lightTheme, Field, VisuallyHidden, Combobox, ComboboxOption, Modal, Typography, Flex, Box, IconButton, LinkButton, Tooltip, SingleSelect, Loader, SingleSelectOption } from '@strapi/design-system';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { unstable_useDocument, unstable_useDocumentLayout } from '@strapi/content-manager/strapi-admin';
4
- import { useIntl } from 'react-intl';
5
4
  import { useParams } from 'react-router-dom';
6
5
  import * as React from 'react';
7
6
  import { adminApi, useAPIErrorHandler, useNotification, useRBAC, useQueryParams, useAdminUsers } from '@strapi/admin/strapi-admin';
7
+ import { useIntl } from 'react-intl';
8
8
  import { useSelector } from 'react-redux';
9
9
  import { useLicenseLimits } from '@strapi/admin/strapi-admin/ee';
10
10
  import { Cross } from '@strapi/icons';
@@ -154,7 +154,7 @@ const isBaseQueryError = (error)=>{
154
154
  const STAGE_ATTRIBUTE_NAME = 'strapi_stage';
155
155
  const ASSIGNEE_ATTRIBUTE_NAME = 'strapi_assignee';
156
156
 
157
- const AssigneeSelect = ()=>{
157
+ const AssigneeSelect = ({ isCompact })=>{
158
158
  const { collectionType = '', id, slug: model = '' } = useParams();
159
159
  const permissions = useTypedSelector((state)=>state.admin_app.permissions);
160
160
  const { formatMessage } = useIntl();
@@ -165,7 +165,7 @@ const AssigneeSelect = ()=>{
165
165
  const params = React.useMemo(()=>buildValidParams(query), [
166
166
  query
167
167
  ]);
168
- const { data, isLoading, isError } = useAdminUsers(undefined, {
168
+ const { data, isLoading: isLoadingUsers, isError } = useAdminUsers(undefined, {
169
169
  skip: isLoadingPermissions || !canRead
170
170
  });
171
171
  const { document } = unstable_useDocument({
@@ -204,7 +204,57 @@ const AssigneeSelect = ()=>{
204
204
  })
205
205
  });
206
206
  }
207
+ if (isCompact && 'error' in res) {
208
+ toggleNotification({
209
+ type: 'danger',
210
+ message: formatAPIError(res.error)
211
+ });
212
+ }
207
213
  };
214
+ const isDisabled = !isLoadingPermissions && !isLoadingUsers && users.length === 0 || !document.documentId;
215
+ const isLoading = isLoadingUsers || isLoadingPermissions || isMutating;
216
+ const assigneeLabel = formatMessage({
217
+ id: 'content-manager.reviewWorkflows.assignee.label',
218
+ defaultMessage: 'Assignee'
219
+ });
220
+ const assigneeClearLabel = formatMessage({
221
+ id: 'content-manager.reviewWorkflows.assignee.clear',
222
+ defaultMessage: 'Clear assignee'
223
+ });
224
+ const assigneePlaceholder = formatMessage({
225
+ id: 'content-manager.reviewWorkflows.assignee.placeholder',
226
+ defaultMessage: 'Select…'
227
+ });
228
+ if (isCompact) {
229
+ return /*#__PURE__*/ jsxs(Field.Root, {
230
+ name: ASSIGNEE_ATTRIBUTE_NAME,
231
+ id: ASSIGNEE_ATTRIBUTE_NAME,
232
+ children: [
233
+ /*#__PURE__*/ jsx(VisuallyHidden, {
234
+ children: /*#__PURE__*/ jsx(Field.Label, {
235
+ children: assigneeLabel
236
+ })
237
+ }),
238
+ /*#__PURE__*/ jsx(Combobox, {
239
+ clearLabel: assigneeClearLabel,
240
+ disabled: isDisabled,
241
+ value: currentAssignee ? currentAssignee.id.toString() : null,
242
+ onChange: handleChange,
243
+ onClear: ()=>handleChange(null),
244
+ placeholder: assigneePlaceholder,
245
+ loading: isLoading || isLoadingPermissions || isMutating,
246
+ size: "S",
247
+ children: users.map((user)=>{
248
+ return /*#__PURE__*/ jsx(ComboboxOption, {
249
+ value: user.id.toString(),
250
+ textValue: getDisplayName(user),
251
+ children: getDisplayName(user)
252
+ }, user.id);
253
+ })
254
+ })
255
+ ]
256
+ });
257
+ }
208
258
  return /*#__PURE__*/ jsxs(Field.Root, {
209
259
  name: ASSIGNEE_ATTRIBUTE_NAME,
210
260
  id: ASSIGNEE_ATTRIBUTE_NAME,
@@ -214,24 +264,15 @@ const AssigneeSelect = ()=>{
214
264
  }) || error && formatAPIError(error)) ?? undefined,
215
265
  children: [
216
266
  /*#__PURE__*/ jsx(Field.Label, {
217
- children: formatMessage({
218
- id: 'content-manager.reviewWorkflows.assignee.label',
219
- defaultMessage: 'Assignee'
220
- })
267
+ children: assigneeLabel
221
268
  }),
222
269
  /*#__PURE__*/ jsx(Combobox, {
223
- clearLabel: formatMessage({
224
- id: 'content-manager.reviewWorkflows.assignee.clear',
225
- defaultMessage: 'Clear assignee'
226
- }),
270
+ clearLabel: assigneeClearLabel,
227
271
  disabled: !isLoadingPermissions && !isLoading && users.length === 0 || !document.documentId,
228
272
  value: currentAssignee ? currentAssignee.id.toString() : null,
229
273
  onChange: handleChange,
230
274
  onClear: ()=>handleChange(null),
231
- placeholder: formatMessage({
232
- id: 'content-manager.reviewWorkflows.assignee.placeholder',
233
- defaultMessage: 'Select…'
234
- }),
275
+ placeholder: assigneePlaceholder,
235
276
  loading: isLoading || isLoadingPermissions || isMutating,
236
277
  children: users.map((user)=>{
237
278
  return /*#__PURE__*/ jsx(ComboboxOption, {
@@ -401,7 +442,115 @@ const AVAILABLE_COLORS = Object.entries(STAGE_COLORS).map(([themeColorName, name
401
442
  name
402
443
  }));
403
444
 
404
- const StageSelect = ()=>{
445
+ /* -------------------------------------------------------------------------------------------------
446
+ * LimitModals
447
+ * -----------------------------------------------------------------------------------------------*/ const WorkflowLimitModal = ({ open, onOpenChange })=>{
448
+ const { formatMessage } = useIntl();
449
+ return /*#__PURE__*/ jsxs(LimitsModal.Root, {
450
+ open: open,
451
+ onOpenChange: onOpenChange,
452
+ children: [
453
+ /*#__PURE__*/ jsx(LimitsModal.Title, {
454
+ children: formatMessage({
455
+ id: 'content-manager.reviewWorkflows.workflows.limit.title',
456
+ defaultMessage: 'You’ve reached the limit of workflows in your plan'
457
+ })
458
+ }),
459
+ /*#__PURE__*/ jsx(LimitsModal.Body, {
460
+ children: formatMessage({
461
+ id: 'content-manager.reviewWorkflows.workflows.limit.body',
462
+ defaultMessage: 'Delete a workflow or contact Sales to enable more workflows.'
463
+ })
464
+ })
465
+ ]
466
+ });
467
+ };
468
+ const StageLimitModal = ({ open, onOpenChange })=>{
469
+ const { formatMessage } = useIntl();
470
+ return /*#__PURE__*/ jsxs(LimitsModal.Root, {
471
+ open: open,
472
+ onOpenChange: onOpenChange,
473
+ children: [
474
+ /*#__PURE__*/ jsx(LimitsModal.Title, {
475
+ children: formatMessage({
476
+ id: 'content-manager.reviewWorkflows.stages.limit.title',
477
+ defaultMessage: 'You have reached the limit of stages for this workflow in your plan'
478
+ })
479
+ }),
480
+ /*#__PURE__*/ jsx(LimitsModal.Body, {
481
+ children: formatMessage({
482
+ id: 'content-manager.reviewWorkflows.stages.limit.body',
483
+ defaultMessage: 'Try deleting some stages or contact Sales to enable more stages.'
484
+ })
485
+ })
486
+ ]
487
+ });
488
+ };
489
+ /* -------------------------------------------------------------------------------------------------
490
+ * StageSelect
491
+ * -----------------------------------------------------------------------------------------------*/ const Select = ({ stages, activeWorkflowStage, isLoading, ...props })=>{
492
+ const { formatMessage } = useIntl();
493
+ const { themeColorName } = getStageColorByHex(activeWorkflowStage?.color) ?? {};
494
+ return /*#__PURE__*/ jsx(SingleSelect, {
495
+ disabled: stages.length === 0,
496
+ placeholder: formatMessage({
497
+ id: 'content-manager.reviewWorkflows.assignee.placeholder',
498
+ defaultMessage: 'Select…'
499
+ }),
500
+ startIcon: activeWorkflowStage && /*#__PURE__*/ jsx(Flex, {
501
+ tag: "span",
502
+ height: 2,
503
+ background: activeWorkflowStage?.color,
504
+ borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
505
+ hasRadius: true,
506
+ shrink: 0,
507
+ width: 2,
508
+ marginRight: "-3px"
509
+ }),
510
+ // @ts-expect-error – `customizeContent` is not correctly typed in the DS.
511
+ customizeContent: ()=>{
512
+ return /*#__PURE__*/ jsxs(Flex, {
513
+ tag: "span",
514
+ justifyContent: "space-between",
515
+ alignItems: "center",
516
+ width: "100%",
517
+ children: [
518
+ /*#__PURE__*/ jsx(Typography, {
519
+ textColor: "neutral800",
520
+ ellipsis: true,
521
+ lineHeight: "inherit",
522
+ children: activeWorkflowStage?.name ?? ''
523
+ }),
524
+ isLoading ? /*#__PURE__*/ jsx(Loader, {
525
+ small: true,
526
+ style: {
527
+ display: 'flex'
528
+ },
529
+ "data-testid": "loader"
530
+ }) : null
531
+ ]
532
+ });
533
+ },
534
+ ...props,
535
+ children: stages.map(({ id, color, name })=>{
536
+ const { themeColorName } = getStageColorByHex(color) ?? {};
537
+ return /*#__PURE__*/ jsx(SingleSelectOption, {
538
+ startIcon: /*#__PURE__*/ jsx(Flex, {
539
+ height: 2,
540
+ background: color,
541
+ borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
542
+ hasRadius: true,
543
+ shrink: 0,
544
+ width: 2
545
+ }),
546
+ value: id,
547
+ textValue: name,
548
+ children: name
549
+ }, id);
550
+ })
551
+ });
552
+ };
553
+ const StageSelect = ({ isCompact })=>{
405
554
  const { collectionType = '', slug: model = '', id = '' } = useParams();
406
555
  const { formatMessage } = useIntl();
407
556
  const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
@@ -474,6 +623,12 @@ const StageSelect = ()=>{
474
623
  })
475
624
  });
476
625
  }
626
+ if (isCompact && 'error' in res) {
627
+ toggleNotification({
628
+ type: 'danger',
629
+ message: formatAPIError(res.error)
630
+ });
631
+ }
477
632
  }
478
633
  }
479
634
  } catch (error) {
@@ -486,127 +641,118 @@ const StageSelect = ()=>{
486
641
  });
487
642
  }
488
643
  };
489
- const { themeColorName } = getStageColorByHex(activeWorkflowStage?.color) ?? {};
490
644
  const isLoading = isLoadingStages || isLoadingDocument;
645
+ const reviewStageLabel = formatMessage({
646
+ id: 'content-manager.reviewWorkflows.stage.label',
647
+ defaultMessage: 'Review stage'
648
+ });
649
+ const reviewStageHint = !isLoading && stages.length === 0 && // TODO: Handle errors and hints
650
+ formatMessage({
651
+ id: 'content-manager.reviewWorkflows.stages.no-transition',
652
+ defaultMessage: 'You don’t have the permission to update this stage.'
653
+ });
654
+ if (isCompact) {
655
+ return /*#__PURE__*/ jsxs(Fragment, {
656
+ children: [
657
+ /*#__PURE__*/ jsx(Tooltip, {
658
+ label: reviewStageHint,
659
+ children: /*#__PURE__*/ jsx(Field.Root, {
660
+ name: STAGE_ATTRIBUTE_NAME,
661
+ id: STAGE_ATTRIBUTE_NAME,
662
+ children: /*#__PURE__*/ jsxs(Fragment, {
663
+ children: [
664
+ /*#__PURE__*/ jsx(VisuallyHidden, {
665
+ children: /*#__PURE__*/ jsx(Field.Label, {
666
+ children: reviewStageLabel
667
+ })
668
+ }),
669
+ /*#__PURE__*/ jsx(Select, {
670
+ stages: stages,
671
+ activeWorkflowStage: activeWorkflowStage,
672
+ isLoading: isLoading,
673
+ size: "S",
674
+ disabled: stages.length === 0,
675
+ value: activeWorkflowStage?.id,
676
+ onChange: handleChange,
677
+ placeholder: formatMessage({
678
+ id: 'content-manager.reviewWorkflows.assignee.placeholder',
679
+ defaultMessage: 'Select…'
680
+ })
681
+ })
682
+ ]
683
+ })
684
+ })
685
+ }),
686
+ /*#__PURE__*/ jsx(WorkflowLimitModal, {
687
+ open: showLimitModal === 'workflow',
688
+ onOpenChange: ()=>setShowLimitModal(null)
689
+ }),
690
+ /*#__PURE__*/ jsx(StageLimitModal, {
691
+ open: showLimitModal === 'stage',
692
+ onOpenChange: ()=>setShowLimitModal(null)
693
+ })
694
+ ]
695
+ });
696
+ }
491
697
  return /*#__PURE__*/ jsxs(Fragment, {
492
698
  children: [
493
699
  /*#__PURE__*/ jsxs(Field.Root, {
494
- hint: !isLoading && stages.length === 0 && formatMessage({
495
- id: 'content-manager.reviewWorkflows.stages.no-transition',
496
- defaultMessage: 'You don’t have the permission to update this stage.'
497
- }),
700
+ hint: reviewStageHint,
498
701
  error: error && formatAPIError(error) || undefined,
499
702
  name: STAGE_ATTRIBUTE_NAME,
500
703
  id: STAGE_ATTRIBUTE_NAME,
501
704
  children: [
502
705
  /*#__PURE__*/ jsx(Field.Label, {
503
- children: formatMessage({
504
- id: 'content-manager.reviewWorkflows.stage.label',
505
- defaultMessage: 'Review stage'
506
- })
706
+ children: reviewStageLabel
507
707
  }),
508
- /*#__PURE__*/ jsx(SingleSelect, {
708
+ /*#__PURE__*/ jsx(Select, {
709
+ stages: stages,
710
+ activeWorkflowStage: activeWorkflowStage,
711
+ isLoading: isLoading,
509
712
  disabled: stages.length === 0,
510
713
  value: activeWorkflowStage?.id,
511
714
  onChange: handleChange,
512
715
  placeholder: formatMessage({
513
716
  id: 'content-manager.reviewWorkflows.assignee.placeholder',
514
717
  defaultMessage: 'Select…'
515
- }),
516
- startIcon: activeWorkflowStage && /*#__PURE__*/ jsx(Flex, {
517
- tag: "span",
518
- height: 2,
519
- background: activeWorkflowStage?.color,
520
- borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
521
- hasRadius: true,
522
- shrink: 0,
523
- width: 2,
524
- marginRight: "-3px"
525
- }),
526
- // @ts-expect-error – `customizeContent` is not correctly typed in the DS.
527
- customizeContent: ()=>{
528
- return /*#__PURE__*/ jsxs(Flex, {
529
- tag: "span",
530
- justifyContent: "space-between",
531
- alignItems: "center",
532
- width: "100%",
533
- children: [
534
- /*#__PURE__*/ jsx(Typography, {
535
- textColor: "neutral800",
536
- ellipsis: true,
537
- children: activeWorkflowStage?.name ?? ''
538
- }),
539
- isLoading ? /*#__PURE__*/ jsx(Loader, {
540
- small: true,
541
- style: {
542
- display: 'flex'
543
- },
544
- "data-testid": "loader"
545
- }) : null
546
- ]
547
- });
548
- },
549
- children: stages.map(({ id, color, name })=>{
550
- const { themeColorName } = getStageColorByHex(color) ?? {};
551
- return /*#__PURE__*/ jsx(SingleSelectOption, {
552
- startIcon: /*#__PURE__*/ jsx(Flex, {
553
- height: 2,
554
- background: color,
555
- borderColor: themeColorName === 'neutral0' ? 'neutral150' : undefined,
556
- hasRadius: true,
557
- shrink: 0,
558
- width: 2
559
- }),
560
- value: id,
561
- textValue: name,
562
- children: name
563
- }, id);
564
718
  })
565
719
  }),
566
720
  /*#__PURE__*/ jsx(Field.Hint, {}),
567
721
  /*#__PURE__*/ jsx(Field.Error, {})
568
722
  ]
569
723
  }),
570
- /*#__PURE__*/ jsxs(LimitsModal.Root, {
724
+ /*#__PURE__*/ jsx(WorkflowLimitModal, {
571
725
  open: showLimitModal === 'workflow',
572
- onOpenChange: ()=>setShowLimitModal(null),
573
- children: [
574
- /*#__PURE__*/ jsx(LimitsModal.Title, {
575
- children: formatMessage({
576
- id: 'content-manager.reviewWorkflows.workflows.limit.title',
577
- defaultMessage: 'You’ve reached the limit of workflows in your plan'
578
- })
579
- }),
580
- /*#__PURE__*/ jsx(LimitsModal.Body, {
581
- children: formatMessage({
582
- id: 'content-manager.reviewWorkflows.workflows.limit.body',
583
- defaultMessage: 'Delete a workflow or contact Sales to enable more workflows.'
584
- })
585
- })
586
- ]
726
+ onOpenChange: ()=>setShowLimitModal(null)
587
727
  }),
588
- /*#__PURE__*/ jsxs(LimitsModal.Root, {
728
+ /*#__PURE__*/ jsx(StageLimitModal, {
589
729
  open: showLimitModal === 'stage',
590
- onOpenChange: ()=>setShowLimitModal(null),
591
- children: [
592
- /*#__PURE__*/ jsx(LimitsModal.Title, {
593
- children: formatMessage({
594
- id: 'content-manager.reviewWorkflows.stages.limit.title',
595
- defaultMessage: 'You have reached the limit of stages for this workflow in your plan'
596
- })
597
- }),
598
- /*#__PURE__*/ jsx(LimitsModal.Body, {
599
- children: formatMessage({
600
- id: 'content-manager.reviewWorkflows.stages.limit.body',
601
- defaultMessage: 'Try deleting some stages or contact Sales to enable more stages.'
602
- })
603
- })
604
- ]
730
+ onOpenChange: ()=>setShowLimitModal(null)
605
731
  })
606
732
  ]
607
733
  });
608
734
  };
609
735
 
736
+ const Header = ()=>{
737
+ const { slug = '', id, collectionType } = useParams();
738
+ const { edit: { options } } = unstable_useDocumentLayout(slug);
739
+ if (!window.strapi.isEE || !options?.reviewWorkflows || collectionType !== 'single-types' && !id || id === 'create') {
740
+ return null;
741
+ }
742
+ return /*#__PURE__*/ jsxs(Flex, {
743
+ gap: 2,
744
+ children: [
745
+ /*#__PURE__*/ jsx(AssigneeSelect, {
746
+ isCompact: true
747
+ }),
748
+ /*#__PURE__*/ jsx(StageSelect, {
749
+ isCompact: true
750
+ })
751
+ ]
752
+ });
753
+ };
754
+ Header.type = 'preview';
755
+
610
756
  const Panel = ()=>{
611
757
  const { slug = '', id, collectionType } = useParams();
612
758
  const { edit: { options } } = unstable_useDocumentLayout(slug);
@@ -852,7 +998,8 @@ const prefixPluginTranslations = (trad, pluginId)=>{
852
998
 
853
999
  function __variableDynamicImportRuntime2__(path) {
854
1000
  switch (path) {
855
- case './translations/en.json': return import('./en-BixG7IBu.js');
1001
+ case './translations/en.json': return import('./en-BrZXFtVv.mjs');
1002
+ case './translations/uk.json': return import('./uk-DLlzEBUF.mjs');
856
1003
  default: return new Promise(function(resolve, reject) {
857
1004
  (typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)(
858
1005
  reject.bind(null, new Error("Unknown variable dynamic import: " + path))
@@ -879,7 +1026,7 @@ const admin = {
879
1026
  },
880
1027
  permissions: [],
881
1028
  async Component () {
882
- const { Router } = await import('./router-C9Jpl4gL.js');
1029
+ const { Router } = await import('./router-JyFAzv9_.mjs');
883
1030
  return {
884
1031
  default: Router
885
1032
  };
@@ -896,7 +1043,7 @@ const admin = {
896
1043
  licenseOnly: true,
897
1044
  permissions: [],
898
1045
  async Component () {
899
- const { PurchaseReviewWorkflows } = await import('./purchase-review-workflows-CEP8kvxZ.js');
1046
+ const { PurchaseReviewWorkflows } = await import('./purchase-review-workflows-BJkm1_Dd.mjs');
900
1047
  return {
901
1048
  default: PurchaseReviewWorkflows
902
1049
  };
@@ -904,6 +1051,14 @@ const admin = {
904
1051
  });
905
1052
  }
906
1053
  },
1054
+ bootstrap (app) {
1055
+ if (window.strapi.features.isEnabled(FEATURE_ID)) {
1056
+ app.getPlugin('content-manager').injectComponent('preview', 'actions', {
1057
+ name: 'review-workflows-assignee',
1058
+ Component: Header
1059
+ });
1060
+ }
1061
+ },
907
1062
  async registerTrads ({ locales }) {
908
1063
  const importedTrads = await Promise.all(locales.map((locale)=>{
909
1064
  return __variableDynamicImportRuntime2__(`./translations/${locale}.json`).then(({ default: data })=>{
@@ -922,5 +1077,5 @@ const admin = {
922
1077
  }
923
1078
  };
924
1079
 
925
- export { AVAILABLE_COLORS as A, CHARGEBEE_WORKFLOW_ENTITLEMENT_NAME as C, LimitsModal as L, useTypedSelector as a, CHARGEBEE_STAGES_PER_WORKFLOW_ENTITLEMENT_NAME as b, useGetWorkflowsQuery as c, useCreateWorkflowMutation as d, useUpdateWorkflowMutation as e, useDeleteWorkflowMutation as f, getStageColorByHex as g, admin as h, isBaseQueryError as i, reviewWorkflowsApi as r, useGetContentTypesQuery as u };
926
- //# sourceMappingURL=index-Df6sZesT.js.map
1080
+ export { AVAILABLE_COLORS as A, CHARGEBEE_WORKFLOW_ENTITLEMENT_NAME as C, LimitsModal as L, useGetContentTypesQuery as a, CHARGEBEE_STAGES_PER_WORKFLOW_ENTITLEMENT_NAME as b, useGetWorkflowsQuery as c, useCreateWorkflowMutation as d, useUpdateWorkflowMutation as e, useDeleteWorkflowMutation as f, getStageColorByHex as g, admin as h, isBaseQueryError as i, reviewWorkflowsApi as r, useTypedSelector as u };
1081
+ //# sourceMappingURL=index-2VGAYchq.mjs.map