@kentico/xperience-admin-components 28.4.4 → 29.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/entry.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import { ConnectDragPreview } from 'react-dnd';
5
5
  import { ConnectDragSource } from 'react-dnd';
6
6
  import { ConnectDropTarget } from 'react-dnd';
7
+ import { CSSProperties } from 'react';
7
8
  import { DefineIconParameters } from 'froala-editor';
8
9
  import { DraggableProvidedDragHandleProps } from 'react-beautiful-dnd';
9
10
  import { DropResult } from 'react-beautiful-dnd';
@@ -333,12 +334,16 @@ declare interface BaseButtonProps extends UITestProps {
333
334
 
334
335
  declare interface BaseNotificationBarProps extends UITestProps {
335
336
  readonly type: NotificationBarType;
336
- readonly children: string;
337
337
  readonly onDismiss?: () => void;
338
338
  /**
339
- * Dangerously sets notification content as inner HTML.
339
+ * Disables the increase styling when the notification bar height is increased.
340
+ */
341
+ readonly noAutoIncrease?: boolean;
342
+ /**
343
+ * Dangerously sets notification content as inner HTML. Applies only to the text content.
340
344
  */
341
345
  readonly childrenAsHtml?: boolean;
346
+ readonly children: string | React.ReactNode;
342
347
  }
343
348
 
344
349
  declare interface BaseSimpleStatusProps extends UITestProps {
@@ -480,6 +485,14 @@ declare interface BaseTileProps extends BaseTileBaseProps, UITestProps {
480
485
  * Tooltip to display when tile is disabled.
481
486
  */
482
487
  readonly inactiveMessage?: string;
488
+ /**
489
+ * Function called on checkbox change, by default, the onCLick function is called.
490
+ */
491
+ readonly selectOnClick?: boolean;
492
+ /**
493
+ * Drag element for the tile.
494
+ */
495
+ readonly dragElement?: JSX.Element;
483
496
  }
484
497
 
485
498
  declare enum BaseTileType {
@@ -499,7 +512,7 @@ declare interface BaseTreeNodeProps {
499
512
  /**
500
513
  * Identifier of the node.
501
514
  */
502
- readonly nodeIdentifier: string;
515
+ readonly nodeIdentifier: TreeNodeId;
503
516
  /**
504
517
  * Event fired when the node state is toggled.
505
518
  * @param isExpanded Indicates if node is currently expanded.
@@ -509,7 +522,7 @@ declare interface BaseTreeNodeProps {
509
522
  * Event fired when the node is clicked.
510
523
  * @param identifier ID of the clicked node.
511
524
  */
512
- readonly onNodeClick?: (identifier: string) => void;
525
+ readonly onNodeClick?: (identifier: TreeNodeId) => void;
513
526
  /**
514
527
  * Direct children nodes of the current node.
515
528
  */
@@ -534,6 +547,20 @@ declare interface BaseTreeNodeProps {
534
547
  * Indicates if node can be toggled. Defaults to `false`.
535
548
  */
536
549
  readonly toggleDisabled?: boolean;
550
+ /**
551
+ * Indicates if expand button is hidden on zero level. Defaults to `true`.
552
+ */
553
+ readonly omitExpandButtonOnZeroLevel?: boolean;
554
+ /**
555
+ * Indicates if expand button is hidden.
556
+ * This differs from `isToggleable` in that this property does not leave an empty cell in its place when used.
557
+ * Defaults to `false`.
558
+ */
559
+ readonly omitExpandButton?: boolean;
560
+ /**
561
+ * Indicates if padding should be omitted on zero level. Defaults to `true`.
562
+ */
563
+ readonly omitPaddingOnZeroLevel?: boolean;
537
564
  /**
538
565
  * Function to render trailing sticky part of the node. Ensures only proper position of rendered components.
539
566
  * @param nodeRef Reference to the node HTML element.
@@ -1087,6 +1114,10 @@ declare interface ContentItemTileExtendedProps {
1087
1114
  * Tile icon in preview.
1088
1115
  */
1089
1116
  readonly previewIcon?: IconName;
1117
+ /**
1118
+ * Drag element for the tile.
1119
+ */
1120
+ readonly dragElement?: JSX.Element;
1090
1121
  }
1091
1122
 
1092
1123
  /**
@@ -1097,10 +1128,10 @@ export declare const ContentItemTilePreview: React_2.ForwardRefExoticComponent<C
1097
1128
  /**
1098
1129
  * Selected props from ContentItemTileProps for Preview tile.
1099
1130
  */
1100
- declare interface ContentItemTilePreviewProps extends ContentItemTileExtendedProps, BaseTileBaseProps, Pick<ContentItemTileProps, 'onClick' | 'isSelected' | 'onChange' | 'isCheckboxVisible' | 'actions' | 'dataTestId'> {
1131
+ export declare interface ContentItemTilePreviewProps extends ContentItemTileExtendedProps, BaseTileBaseProps, Pick<ContentItemTileProps, 'onClick' | 'isSelected' | 'onChange' | 'isCheckboxVisible' | 'selectOnClick' | 'actions' | 'dataTestId' | 'inactiveMessage' | 'isDragging' | 'dragElement'> {
1101
1132
  }
1102
1133
 
1103
- declare interface ContentItemTileProps extends ContentItemTileExtendedProps, Pick<BaseTileProps, 'errorState' | 'url' | 'uploadState' | 'name' | 'disabled' | 'isCheckboxVisible' | 'isSelected' | 'isDragging' | 'onChange' | 'onClick' | 'dataTestId' | 'actions' | 'inactiveMessage'> {
1134
+ declare interface ContentItemTileProps extends ContentItemTileExtendedProps, Pick<BaseTileProps, 'errorState' | 'url' | 'uploadState' | 'name' | 'disabled' | 'isCheckboxVisible' | 'selectOnClick' | 'isSelected' | 'isDragging' | 'onChange' | 'onClick' | 'dataTestId' | 'actions' | 'inactiveMessage'> {
1104
1135
  /**
1105
1136
  * Type of content item.
1106
1137
  */
@@ -1115,7 +1146,7 @@ export declare const ContentItemTileSelectable: React_2.ForwardRefExoticComponen
1115
1146
  /**
1116
1147
  * Selected props from ContentItemTileProps for Selectable tile.
1117
1148
  */
1118
- declare interface ContentItemTileSelectableProps extends ContentItemTileExtendedProps, BaseTileBaseProps, Pick<ContentItemTileProps, 'onClick' | 'isSelected' | 'onChange' | 'isDragging' | 'dataTestId' | 'inactiveMessage'> {
1149
+ declare interface ContentItemTileSelectableProps extends ContentItemTileExtendedProps, BaseTileBaseProps, Pick<ContentItemTileProps, 'onClick' | 'isSelected' | 'onChange' | 'isDragging' | 'dataTestId' | 'inactiveMessage' | 'actions'> {
1119
1150
  }
1120
1151
 
1121
1152
  /**
@@ -1345,7 +1376,7 @@ declare interface DraggableTreeNodeProps extends BaseTreeNodeProps {
1345
1376
  * @param targetNodeIdentifier Identifier of the node where the dragged node was dropped.
1346
1377
  * @param dropOffset Indicates if the dragged node should be placed above or below.
1347
1378
  */
1348
- readonly dropHandler: (draggedNodeIdentifier: string, targetNodeIdentifier: string, dropOffset: DropPlacement) => void;
1379
+ readonly dropHandler: (draggedNodeIdentifier: TreeNodeId, targetNodeIdentifier: TreeNodeId, dropOffset: DropPlacement) => void;
1349
1380
  /**
1350
1381
  * Function to render main part of the node. Components rendered with this function are wrapped by element ensuring proper background color when node is selected, hovered or disabled.
1351
1382
  * @param isNodeSelected Indicates if node is currently selected.
@@ -1619,6 +1650,8 @@ export declare interface GridProps extends LayoutComponentProps, UITestProps {
1619
1650
  readonly columnGap?: Spacing;
1620
1651
  }
1621
1652
 
1653
+ export declare type HandleDirection = 'left' | 'right' | 'top' | 'bottom';
1654
+
1622
1655
  export declare interface HeaderCloseButton extends Pick<TooltipProps, 'tooltipText' | 'shortcuts'> {
1623
1656
  }
1624
1657
 
@@ -2438,7 +2471,7 @@ export declare interface MultiselectTreeViewProps extends BaseTreeViewProps {
2438
2471
  /**
2439
2472
  * Identifiers of the selected nodes.
2440
2473
  */
2441
- readonly selectedIdentifiers?: string[];
2474
+ readonly selectedIdentifiers?: TreeNodeId[];
2442
2475
  }
2443
2476
 
2444
2477
  declare interface NameButtonProps extends Pick<ToggleButtonBaseProps, 'onClick' | 'ariaLabel' | 'isSelected'> {
@@ -2469,13 +2502,13 @@ declare type NativeInputProps = Pick<React.InputHTMLAttributes<HTMLInputElement>
2469
2502
 
2470
2503
  export declare const NotificationBarAlert: ForwardRefExoticComponent<NotificationBarAlertProps & RefAttributes<HTMLDivElement>>;
2471
2504
 
2472
- export declare interface NotificationBarAlertProps extends Pick<BaseNotificationBarProps, 'children' | 'childrenAsHtml' | 'dataTestId'> {
2505
+ export declare interface NotificationBarAlertProps extends Pick<BaseNotificationBarProps, 'noAutoIncrease' | 'children' | 'childrenAsHtml' | 'dataTestId'> {
2473
2506
  readonly onDismiss: () => void;
2474
2507
  }
2475
2508
 
2476
2509
  export declare const NotificationBarInfo: ForwardRefExoticComponent<NotificationBarInfoProps & RefAttributes<HTMLDivElement>>;
2477
2510
 
2478
- export declare interface NotificationBarInfoProps extends Pick<BaseNotificationBarProps, 'children' | 'childrenAsHtml' | 'dataTestId'> {
2511
+ export declare interface NotificationBarInfoProps extends Pick<BaseNotificationBarProps, 'noAutoIncrease' | 'children' | 'childrenAsHtml' | 'dataTestId'> {
2479
2512
  readonly onDismiss?: () => void;
2480
2513
  }
2481
2514
 
@@ -2487,7 +2520,7 @@ declare enum NotificationBarType {
2487
2520
 
2488
2521
  export declare const NotificationBarWarning: ForwardRefExoticComponent<NotificationBarWarningProps & RefAttributes<HTMLDivElement>>;
2489
2522
 
2490
- export declare interface NotificationBarWarningProps extends Pick<BaseNotificationBarProps, 'children' | 'childrenAsHtml' | 'dataTestId'> {
2523
+ export declare interface NotificationBarWarningProps extends Pick<BaseNotificationBarProps, 'noAutoIncrease' | 'children' | 'childrenAsHtml' | 'dataTestId'> {
2491
2524
  readonly onDismiss?: () => void;
2492
2525
  }
2493
2526
 
@@ -2659,6 +2692,63 @@ export declare enum RadioGroupSize {
2659
2692
  Large = "large"
2660
2693
  }
2661
2694
 
2695
+ export declare const ResizableBox: React_2.ForwardRefExoticComponent<ResizableBoxProps & React_2.RefAttributes<HTMLDivElement>>;
2696
+
2697
+ export declare interface ResizableBoxProps extends LayoutComponentProps, UITestProps {
2698
+ /**
2699
+ * Initial width of the box in pixels.
2700
+ */
2701
+ width?: number;
2702
+ /**
2703
+ * Initial height of the box in pixels.
2704
+ */
2705
+ height?: number;
2706
+ /**
2707
+ * Minimum width of the box in pixels.
2708
+ */
2709
+ minWidth?: number;
2710
+ /**
2711
+ * Minimum height of the box in pixels.
2712
+ */
2713
+ minHeight?: number;
2714
+ /**
2715
+ * Maximum width of the box in pixels.
2716
+ */
2717
+ maxWidth?: number;
2718
+ /**
2719
+ * Maximum height of the box in pixels.
2720
+ */
2721
+ maxHeight?: number;
2722
+ /**
2723
+ * Directions in which the box can be resized.
2724
+ */
2725
+ directions?: HandleDirection[];
2726
+ /**
2727
+ * Callback fired when the resize starts.
2728
+ */
2729
+ onResizeStart?: (event: ResizeEvent) => unknown;
2730
+ /**
2731
+ * Callback fired when the box is being resized.
2732
+ */
2733
+ onResize?: (event: ResizeEvent) => unknown;
2734
+ /**
2735
+ * Callback fired when the resize ends.
2736
+ */
2737
+ onResizeEnd?: (event: ResizeEvent) => unknown;
2738
+ /**
2739
+ * Style of the component.
2740
+ */
2741
+ style?: CSSProperties;
2742
+ }
2743
+
2744
+ export declare type ResizeEvent = {
2745
+ size: {
2746
+ width: number;
2747
+ height: number;
2748
+ };
2749
+ direction: HandleDirection;
2750
+ };
2751
+
2662
2752
  /**
2663
2753
  * Rich text editor component.
2664
2754
  */
@@ -3353,12 +3443,17 @@ export declare interface StringCell extends TableCell {
3353
3443
  * Value of the cell.
3354
3444
  */
3355
3445
  value: string;
3446
+ /**
3447
+ * Tooltip of the cell. If not set, the tooltip is same as the value.
3448
+ */
3449
+ tooltipText?: string;
3356
3450
  }
3357
3451
 
3358
- export declare const StringTableCellComponent: ({ value }: StringTableCellComponentProps) => JSX.Element;
3452
+ export declare const StringTableCellComponent: ({ value, tooltipText }: StringTableCellComponentProps) => JSX.Element;
3359
3453
 
3360
3454
  export declare interface StringTableCellComponentProps {
3361
3455
  readonly value: string;
3456
+ readonly tooltipText?: string;
3362
3457
  }
3363
3458
 
3364
3459
  export declare const SubheaderDivider: React_2.ForwardRefExoticComponent<SubheaderDividerProps & React_2.RefAttributes<HTMLDivElement>>;
@@ -3523,6 +3618,10 @@ export declare interface TableProps extends UITestProps {
3523
3618
  * Indicates if the table should have selectable rows.
3524
3619
  */
3525
3620
  readonly selectable?: boolean;
3621
+ /**
3622
+ * Indicates if the table should have selectable all rows at once.
3623
+ */
3624
+ readonly isAllRowsSelectable?: boolean;
3526
3625
  /**
3527
3626
  * Sort model of the table.
3528
3627
  */
@@ -3595,10 +3694,14 @@ export declare interface TableRow {
3595
3694
  * Indicates whether the row is in an invalid state.
3596
3695
  */
3597
3696
  isInvalid?: boolean;
3697
+ /**
3698
+ * The message to show when if the row is inactive.
3699
+ */
3700
+ inactiveMessage?: string;
3598
3701
  }
3599
3702
 
3600
3703
  export declare const TableRowComponent: {
3601
- ({ cells, columns, disabled, selectable, selected, skeleton, selectLabel, maxVisibleRowActions, inactiveMessage, dataTestId, onRowSelect: onSelect, onRowClick, isInvalid }: TableRowProps): JSX.Element;
3704
+ ({ cells, columns, disabled, selectable, selected, skeleton, selectLabel, maxVisibleRowActions, inactiveMessage, dataTestId, onRowSelect: onSelect, onRowClick, isInvalid, dragElement }: TableRowProps): JSX.Element;
3602
3705
  displayName: string;
3603
3706
  };
3604
3707
 
@@ -3616,7 +3719,7 @@ export declare enum TableRowElevation {
3616
3719
  /**
3617
3720
  * Represents properties of the TableRow component.
3618
3721
  */
3619
- declare interface TableRowProps extends UITestProps {
3722
+ export declare interface TableRowProps extends UITestProps {
3620
3723
  /**
3621
3724
  * List of cells displayed in a table row.
3622
3725
  */
@@ -3670,6 +3773,10 @@ declare interface TableRowProps extends UITestProps {
3670
3773
  * Indicates whether the row is in an invalid state. Defaults to 'False'.
3671
3774
  */
3672
3775
  readonly isInvalid?: boolean;
3776
+ /**
3777
+ * Drag element for the table row.
3778
+ */
3779
+ readonly dragElement?: JSX.Element;
3673
3780
  }
3674
3781
 
3675
3782
  export declare const Tag: React_2.ForwardRefExoticComponent<TagProps & React_2.RefAttributes<HTMLDivElement>>;
@@ -3889,7 +3996,7 @@ declare type TrailingElementType = 'icon' | 'label';
3889
3996
  * Tree node component.
3890
3997
  */
3891
3998
  export declare const TreeNode: {
3892
- ({ nodeIdentifier, children, level, renderTrailing, loading, onNodeToggle, onNodeClick, isExpanded, dataTestIdNode, dataTestIdNodeChildren, dataTestIdNodeRow, isToggleable, isSelectable, toggleDisabled, disabled, ...props }: TreeNodeProps): JSX.Element;
3999
+ ({ nodeIdentifier, children, level, renderTrailing, loading, onNodeToggle, onNodeClick, isExpanded, dataTestIdNode, dataTestIdNodeChildren, dataTestIdNodeRow, isToggleable, isSelectable, toggleDisabled, disabled, omitExpandButton, omitExpandButtonOnZeroLevel, omitPaddingOnZeroLevel, ...props }: TreeNodeProps): JSX.Element;
3893
4000
  displayName: string;
3894
4001
  };
3895
4002
 
@@ -3929,7 +4036,7 @@ declare interface TreeNodeContentSharedProps extends UITestProps {
3929
4036
  /**
3930
4037
  * Indicates if current node is selected. Defaults to `false`.
3931
4038
  */
3932
- readonly isSelected: boolean;
4039
+ readonly isSelected?: boolean;
3933
4040
  /**
3934
4041
  * Indicates if current node is disabled. Defaults to `false`.
3935
4042
  */
@@ -3986,6 +4093,11 @@ export declare interface TreeNodeDnDProps {
3986
4093
  draggedNodeName?: string;
3987
4094
  }
3988
4095
 
4096
+ /**
4097
+ * Identifier of the tree node.
4098
+ */
4099
+ export declare type TreeNodeId = string | number;
4100
+
3989
4101
  /**
3990
4102
  * Tree node leading icon component.
3991
4103
  */
@@ -4027,7 +4139,7 @@ export declare interface TreeNodeMenuActionProps extends UITestProps {
4027
4139
  /**
4028
4140
  * Event fired on action click.
4029
4141
  */
4030
- readonly onClick: () => void;
4142
+ readonly onClick?: () => void;
4031
4143
  /**
4032
4144
  * Tooltip of the action.
4033
4145
  */
@@ -4163,7 +4275,7 @@ export declare const TreeView: React_2.ForwardRefExoticComponent<TreeViewProps &
4163
4275
  export declare const TreeViewContext: React_2.Context<TreeViewContextType>;
4164
4276
 
4165
4277
  declare type TreeViewContextType = {
4166
- isSelected: (id: string) => boolean;
4278
+ isSelected: (id: TreeNodeId) => boolean;
4167
4279
  anyNodeIsDragging: boolean;
4168
4280
  setAnyNodeIsDragging: (isDragging: boolean) => void;
4169
4281
  };
@@ -4172,7 +4284,7 @@ export declare interface TreeViewProps extends BaseTreeViewProps {
4172
4284
  /**
4173
4285
  * Identifier of the selected node.
4174
4286
  */
4175
- readonly selectedIdentifier?: string;
4287
+ readonly selectedIdentifier?: TreeNodeId;
4176
4288
  }
4177
4289
 
4178
4290
  export declare interface UITestProps {