@strapi/content-manager 0.0.0-experimental.c3e9d4b26f9fd3d9eb530b5c11f9baa1d09b13ad → 0.0.0-experimental.d53e940834bf72ddc725f1d2fd36dac9abec30cb

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 (83) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js → ComponentConfigurationPage-C-49MccQ.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-y_7iLdmB.js.map → ComponentConfigurationPage-C-49MccQ.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs → ComponentConfigurationPage-DmwmiFQy.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-BMajAl1u.mjs.map → ComponentConfigurationPage-DmwmiFQy.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js → EditConfigurationPage-DjFJw56M.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-CPVB8Uqc.js.map → EditConfigurationPage-DjFJw56M.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs → EditConfigurationPage-JT3E7NZy.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-CcOoD26O.mjs.map → EditConfigurationPage-JT3E7NZy.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-DWb0DE7R.mjs → EditViewPage-CPj61RMh.mjs} +46 -46
  10. package/dist/_chunks/EditViewPage-CPj61RMh.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-CTTDHKkQ.js → EditViewPage-zT3fBr4Y.js} +45 -45
  12. package/dist/_chunks/EditViewPage-zT3fBr4Y.js.map +1 -0
  13. package/dist/_chunks/{Field-C5Z1Ivdv.js → Field-Boxf9Ajp.js} +372 -117
  14. package/dist/_chunks/Field-Boxf9Ajp.js.map +1 -0
  15. package/dist/_chunks/{Field-DnStdvQw.mjs → Field-dha5VnIQ.mjs} +373 -118
  16. package/dist/_chunks/Field-dha5VnIQ.mjs.map +1 -0
  17. package/dist/_chunks/{Form-DqGgE55Q.mjs → Form-DHrru2AV.mjs} +27 -28
  18. package/dist/_chunks/Form-DHrru2AV.mjs.map +1 -0
  19. package/dist/_chunks/{Form-B81OtW-k.js → Form-y5g1SRsh.js} +25 -26
  20. package/dist/_chunks/Form-y5g1SRsh.js.map +1 -0
  21. package/dist/_chunks/{History-DS6-HCYX.mjs → History-Bru_KoeP.mjs} +12 -14
  22. package/dist/_chunks/History-Bru_KoeP.mjs.map +1 -0
  23. package/dist/_chunks/{History-4NbOq2dX.js → History-CqN6K7SX.js} +11 -13
  24. package/dist/_chunks/History-CqN6K7SX.js.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-DQJJltko.mjs → ListConfigurationPage-D8wGABj0.mjs} +43 -45
  26. package/dist/_chunks/ListConfigurationPage-D8wGABj0.mjs.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-CpfstlYY.js → ListConfigurationPage-R_p-SbHZ.js} +42 -43
  28. package/dist/_chunks/ListConfigurationPage-R_p-SbHZ.js.map +1 -0
  29. package/dist/_chunks/{ListViewPage-nQrOQuVo.mjs → ListViewPage-SID6TRb9.mjs} +48 -65
  30. package/dist/_chunks/ListViewPage-SID6TRb9.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-CA3I75m5.js → ListViewPage-pEw_zug9.js} +47 -64
  32. package/dist/_chunks/ListViewPage-pEw_zug9.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js → NoContentTypePage-C5dcQojD.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-Dldu-_Mx.js.map → NoContentTypePage-C5dcQojD.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs → NoContentTypePage-CJ7UXwrQ.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-DbnHE22g.mjs.map → NoContentTypePage-CJ7UXwrQ.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs → NoPermissionsPage-B7syEq5E.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-fOIkQM0v.mjs.map → NoPermissionsPage-B7syEq5E.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-CO2MK200.js → NoPermissionsPage-BtPrImPP.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-CO2MK200.js.map → NoPermissionsPage-BtPrImPP.js.map} +1 -1
  41. package/dist/_chunks/{Relations-BDRl99Ux.mjs → Relations-B9Crnhnn.mjs} +3 -3
  42. package/dist/_chunks/{Relations-BDRl99Ux.mjs.map → Relations-B9Crnhnn.mjs.map} +1 -1
  43. package/dist/_chunks/{Relations-DG2jnOcr.js → Relations-DjTQ5kGB.js} +3 -3
  44. package/dist/_chunks/{Relations-DG2jnOcr.js.map → Relations-DjTQ5kGB.js.map} +1 -1
  45. package/dist/_chunks/{index-Drt2DN7v.mjs → index-DJXJw9V5.mjs} +122 -279
  46. package/dist/_chunks/index-DJXJw9V5.mjs.map +1 -0
  47. package/dist/_chunks/{index-BZoNZMXL.js → index-DVPWZkbS.js} +109 -266
  48. package/dist/_chunks/index-DVPWZkbS.js.map +1 -0
  49. package/dist/_chunks/{layout-BzAbmoO6.mjs → layout-Bau7ZfLV.mjs} +5 -5
  50. package/dist/_chunks/{layout-BzAbmoO6.mjs.map → layout-Bau7ZfLV.mjs.map} +1 -1
  51. package/dist/_chunks/{layout-DEYBqgF1.js → layout-Dm6fbiQj.js} +4 -4
  52. package/dist/_chunks/{layout-DEYBqgF1.js.map → layout-Dm6fbiQj.js.map} +1 -1
  53. package/dist/_chunks/{relations-D26zVRdi.mjs → relations-BH_kBSJ0.mjs} +2 -2
  54. package/dist/_chunks/{relations-D26zVRdi.mjs.map → relations-BH_kBSJ0.mjs.map} +1 -1
  55. package/dist/_chunks/{relations-D0eZ4VWw.js → relations-CKnpRgrN.js} +2 -2
  56. package/dist/_chunks/{relations-D0eZ4VWw.js.map → relations-CKnpRgrN.js.map} +1 -1
  57. package/dist/admin/index.js +1 -1
  58. package/dist/admin/index.mjs +4 -4
  59. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +7 -3
  60. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +4 -0
  61. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +2 -10
  62. package/dist/admin/src/pages/ListView/components/BulkActions/Actions.d.ts +3 -30
  63. package/dist/admin/src/pages/ListView/components/BulkActions/ConfirmBulkActionDialog.d.ts +2 -2
  64. package/dist/server/index.js +5 -4
  65. package/dist/server/index.js.map +1 -1
  66. package/dist/server/index.mjs +5 -4
  67. package/dist/server/index.mjs.map +1 -1
  68. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  69. package/package.json +8 -8
  70. package/dist/_chunks/EditViewPage-CTTDHKkQ.js.map +0 -1
  71. package/dist/_chunks/EditViewPage-DWb0DE7R.mjs.map +0 -1
  72. package/dist/_chunks/Field-C5Z1Ivdv.js.map +0 -1
  73. package/dist/_chunks/Field-DnStdvQw.mjs.map +0 -1
  74. package/dist/_chunks/Form-B81OtW-k.js.map +0 -1
  75. package/dist/_chunks/Form-DqGgE55Q.mjs.map +0 -1
  76. package/dist/_chunks/History-4NbOq2dX.js.map +0 -1
  77. package/dist/_chunks/History-DS6-HCYX.mjs.map +0 -1
  78. package/dist/_chunks/ListConfigurationPage-CpfstlYY.js.map +0 -1
  79. package/dist/_chunks/ListConfigurationPage-DQJJltko.mjs.map +0 -1
  80. package/dist/_chunks/ListViewPage-CA3I75m5.js.map +0 -1
  81. package/dist/_chunks/ListViewPage-nQrOQuVo.mjs.map +0 -1
  82. package/dist/_chunks/index-BZoNZMXL.js.map +0 -1
  83. package/dist/_chunks/index-Drt2DN7v.mjs.map +0 -1
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { NotificationConfig } from '@strapi/admin/strapi-admin';
3
+ import { ButtonProps } from '@strapi/design-system';
3
4
  import type { DocumentActionComponent } from '../../../content-manager';
4
5
  type DocumentActionPosition = 'panel' | 'header' | 'table-row';
5
6
  interface DocumentActionDescription {
@@ -19,7 +20,7 @@ interface DocumentActionDescription {
19
20
  /**
20
21
  * @default 'secondary'
21
22
  */
22
- variant?: 'default' | 'secondary' | 'danger' | 'success';
23
+ variant?: ButtonProps['variant'];
23
24
  }
24
25
  interface DialogOptions {
25
26
  type: 'dialog';
@@ -47,7 +48,7 @@ interface ModalOptions {
47
48
  content: React.ComponentType<{
48
49
  onClose: () => void;
49
50
  }> | React.ReactNode;
50
- footer: React.ComponentType<{
51
+ footer?: React.ComponentType<{
51
52
  onClose: () => void;
52
53
  }> | React.ReactNode;
53
54
  onClose?: () => void;
@@ -59,6 +60,9 @@ interface DocumentActionsProps {
59
60
  actions: Action[];
60
61
  }
61
62
  declare const DocumentActions: ({ actions }: DocumentActionsProps) => import("react/jsx-runtime").JSX.Element | null;
63
+ interface DocumentActionButtonProps extends Action {
64
+ }
65
+ declare const DocumentActionButton: (action: DocumentActionButtonProps) => import("react/jsx-runtime").JSX.Element;
62
66
  interface DocumentActionsMenuProps {
63
67
  actions: Action[];
64
68
  children?: React.ReactNode;
@@ -67,5 +71,5 @@ interface DocumentActionsMenuProps {
67
71
  }
68
72
  declare const DocumentActionsMenu: ({ actions, children, label, variant, }: DocumentActionsMenuProps) => import("react/jsx-runtime").JSX.Element;
69
73
  declare const DEFAULT_ACTIONS: DocumentActionComponent[];
70
- export { DocumentActions, DocumentActionsMenu, DEFAULT_ACTIONS };
74
+ export { DocumentActions, DocumentActionsMenu, DocumentActionButton, DEFAULT_ACTIONS };
71
75
  export type { DocumentActionDescription, DialogOptions, NotificationOptions, ModalOptions };
@@ -0,0 +1,4 @@
1
+ export declare const codeLanguages: {
2
+ value: string;
3
+ label: string;
4
+ }[];
@@ -41,11 +41,7 @@ export declare const CustomLinkIconButton: import("styled-components").IStyledCo
41
41
  variant?: "secondary" | "tertiary" | undefined;
42
42
  withTooltip?: boolean | undefined;
43
43
  }, never>> & Omit<IconButtonComponent, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
44
- export declare const MainButtons: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").FlexProps<"div">, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
45
- ref?: import("react").RefObject<unknown> | ((instance: unknown) => void) | null | undefined;
46
- }, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").FlexProps<"div">, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
47
- ref?: import("react").RefObject<unknown> | ((instance: unknown) => void) | null | undefined;
48
- }, never>> & Omit<import("@strapi/design-system").FlexComponent, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
44
+ export declare const MainButtons: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> | (import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> & Omit<any, keyof import("react").Component<any, {}, any>>);
49
45
  export declare const MoreButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("@strapi/design-system").TransientBoxProps & {
50
46
  children?: import("react").ReactNode;
51
47
  } & import("@strapi/design-system/dist/types").AsProp<"button"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
@@ -60,11 +56,7 @@ export declare const MoreButton: import("styled-components").IStyledComponent<"w
60
56
  variant?: "secondary" | "tertiary" | undefined;
61
57
  withTooltip?: boolean | undefined;
62
58
  }, never>> & Omit<IconButtonComponent, keyof import("react").Component<any, {}, any>>;
63
- export declare const IconButtonGroupMargin: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").FlexProps<"div">, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
64
- ref?: import("react").RefObject<unknown> | ((instance: unknown) => void) | null | undefined;
65
- }, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").FlexProps<"div">, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
66
- ref?: import("react").RefObject<unknown> | ((instance: unknown) => void) | null | undefined;
67
- }, never>> & Omit<import("@strapi/design-system").FlexComponent, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
59
+ export declare const IconButtonGroupMargin: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> | (import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> & Omit<any, keyof import("react").Component<any, {}, any>>);
68
60
  export declare const ExpandButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").BaseButtonProps<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
69
61
  ref?: ((instance: unknown) => void) | import("react").RefObject<unknown> | null | undefined;
70
62
  }, never>> & Omit<(<C extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">(props: import("react").PropsWithoutRef<import("@strapi/design-system").BaseButtonProps<C>> & import("react").RefAttributes<unknown>) => import("react").ReactNode), keyof import("react").Component<any, {}, any>>;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { NotificationConfig } from '@strapi/admin/strapi-admin';
2
+ import { ButtonProps } from '@strapi/design-system';
3
+ import { DialogOptions, ModalOptions, NotificationOptions } from '../../../EditView/components/DocumentActions';
3
4
  import type { BulkActionComponent } from '../../../../content-manager';
4
5
  interface BulkActionDescription {
5
6
  dialog?: DialogOptions | NotificationOptions | ModalOptions;
@@ -14,35 +15,7 @@ interface BulkActionDescription {
14
15
  /**
15
16
  * @default 'secondary'
16
17
  */
17
- variant?: 'default' | 'secondary' | 'tertiary' | 'danger-light' | 'success';
18
- }
19
- interface DialogOptions {
20
- type: 'dialog';
21
- title: string;
22
- content?: React.ReactNode;
23
- onConfirm?: () => void | Promise<void>;
24
- onCancel?: () => void | Promise<void>;
25
- }
26
- interface NotificationOptions {
27
- type: 'notification';
28
- title: string;
29
- link?: {
30
- label: string;
31
- url: string;
32
- target?: string;
33
- };
34
- content?: string;
35
- onClose?: () => void;
36
- status?: NotificationConfig['type'];
37
- timeout?: number;
38
- }
39
- interface ModalOptions {
40
- type: 'modal';
41
- title: string;
42
- content: React.ComponentType<{
43
- onClose: () => void;
44
- }>;
45
- onClose?: () => void;
18
+ variant?: ButtonProps['variant'];
46
19
  }
47
20
  declare const BulkActionsRenderer: () => import("react/jsx-runtime").JSX.Element;
48
21
  declare const Emphasis: (chunks: React.ReactNode) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { DialogFooterProps } from '@strapi/design-system';
3
- interface ConfirmBulkActionDialogProps extends Pick<DialogFooterProps, 'endAction'> {
2
+ interface ConfirmBulkActionDialogProps {
3
+ endAction: React.ReactNode;
4
4
  onToggleDialog: () => void;
5
5
  isOpen?: boolean;
6
6
  dialogBody: React.ReactNode;
@@ -495,8 +495,6 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
495
495
  deleteExpiredJob: null,
496
496
  isInitialized: false
497
497
  };
498
- const query = strapi2.db.query(HISTORY_VERSION_UID);
499
- const historyService = getService(strapi2, "history");
500
498
  const serviceUtils = createServiceUtils({ strapi: strapi2 });
501
499
  return {
502
500
  async bootstrap() {
@@ -510,6 +508,9 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
510
508
  if (context.action !== "create" && context.action !== "update" && context.action !== "clone" && context.action !== "publish" && context.action !== "unpublish" && context.action !== "discardDraft") {
511
509
  return next();
512
510
  }
511
+ if (context.action === "update" && strapi2.requestContext.get()?.request.url.endsWith("/actions/publish")) {
512
+ return next();
513
+ }
513
514
  const contentTypeUid = context.contentType.uid;
514
515
  if (!contentTypeUid.startsWith("api::")) {
515
516
  return next();
@@ -549,7 +550,7 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
549
550
  }, {});
550
551
  await strapi2.db.transaction(async ({ onCommit }) => {
551
552
  onCommit(() => {
552
- historyService.createVersion({
553
+ getService(strapi2, "history").createVersion({
553
554
  contentType: contentTypeUid,
554
555
  data: fp.omit(FIELDS_TO_IGNORE, document),
555
556
  schema: fp.omit(FIELDS_TO_IGNORE, attributesSchema),
@@ -565,7 +566,7 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
565
566
  state.deleteExpiredJob = nodeSchedule.scheduleJob("0 0 * * *", () => {
566
567
  const retentionDaysInMilliseconds = serviceUtils.getRetentionDays() * 24 * 60 * 60 * 1e3;
567
568
  const expirationDate = new Date(Date.now() - retentionDaysInMilliseconds);
568
- query.deleteMany({
569
+ strapi2.db.query(HISTORY_VERSION_UID).deleteMany({
569
570
  where: {
570
571
  created_at: {
571
572
  $lt: expirationDate.toISOString()