@progress/kendo-react-dialogs 13.3.0-develop.9 → 13.4.0-develop.1
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/Dialog.d.ts +45 -0
- package/Dialog.mjs +3 -3
- package/DialogActionsBar.d.ts +28 -0
- package/DialogProps.d.ts +184 -0
- package/DialogTitleBar.d.ts +33 -0
- package/MiddleLayerOptimization.d.ts +24 -0
- package/StageEnum.d.ts +12 -0
- package/Window.d.ts +189 -0
- package/Window.mjs +6 -6
- package/WindowActionsBar.d.ts +28 -0
- package/WindowProps.d.ts +332 -0
- package/WindowResizeHandlers.d.ts +23 -0
- package/WindowTitlebar.d.ts +70 -0
- package/codemods/utils.js +1 -8
- package/codemods/v11/dialog-handle.js +1 -8
- package/constants.d.ts +15 -0
- package/dist/cdn/js/kendo-react-dialogs.js +1 -1
- package/events.d.ts +55 -0
- package/index.d.mts +9 -825
- package/index.d.ts +9 -825
- package/messages/index.d.ts +32 -0
- package/models/actions-layout.d.ts +11 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.mjs +13 -0
- package/package.json +10 -4
- package/utils.d.ts +9 -0
package/Dialog.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { DialogProps } from './DialogProps.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Represent the `ref` of the Dialog component.
|
|
12
|
+
*/
|
|
13
|
+
export interface DialogHandle {
|
|
14
|
+
/**
|
|
15
|
+
* The current element or `null` if there is no one.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLDivElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* The props of the Dialog component.
|
|
20
|
+
*/
|
|
21
|
+
props: DialogProps;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents the PropsContext of the `Dialog` component.
|
|
25
|
+
* Used for global configuration of all `Dialog` instances.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DialogPropsContext: React.Context<(p: DialogProps) => DialogProps>;
|
|
28
|
+
/**
|
|
29
|
+
* Represents the [KendoReact Dialog component](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog).
|
|
30
|
+
*
|
|
31
|
+
* Accepts properties of type [DialogProps](https://www.telerik.com/kendo-react-ui/components/dialogs/api/dialogprops).
|
|
32
|
+
* Obtaining the `ref` returns an object of type [DialogHandle](https://www.telerik.com/kendo-react-ui/components/dialogs/api/dialoghandle).
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Supported children components are: {@link DialogActionsBar}.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<DialogHandle | null>>;
|
|
38
|
+
/**
|
|
39
|
+
* The default props of the Dialog component.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DialogDefaultProps: {
|
|
42
|
+
autoFocus: boolean;
|
|
43
|
+
modal: boolean;
|
|
44
|
+
closeIcon: boolean;
|
|
45
|
+
};
|
package/Dialog.mjs
CHANGED
|
@@ -11,9 +11,9 @@ import o from "prop-types";
|
|
|
11
11
|
import { DialogTitleBar as U } from "./DialogTitleBar.mjs";
|
|
12
12
|
import { DialogActionsBar as B } from "./DialogActionsBar.mjs";
|
|
13
13
|
import { createPropsContext as V, useZIndexContext as W, getActiveElement as X, usePropsContext as q, FOCUSABLE_ELEMENTS as J, focusFirstFocusableChild as Q, canUseDOM as Z, dispatchEvent as Y, Keys as ee, keepFocusInContainer as te, ZIndexContext as oe, classNames as ne } from "@progress/kendo-react-common";
|
|
14
|
-
import {
|
|
14
|
+
import { DEFAULT_DIALOGS_ZINDEX as re, DATA_DIALOGS_ID as le, ZINDEX_DIALOGS_STEP as se } from "./constants.mjs";
|
|
15
15
|
const ce = V(), $ = t.forwardRef((j, z) => {
|
|
16
|
-
const I = W(), u = I ? I +
|
|
16
|
+
const I = W(), u = I ? I + se : re, E = t.useRef(null), n = t.useRef(null), l = t.useRef(X(document)), b = q(ce, j), r = t.useMemo(
|
|
17
17
|
() => ({
|
|
18
18
|
...d,
|
|
19
19
|
...b
|
|
@@ -85,7 +85,7 @@ const ce = V(), $ = t.forwardRef((j, z) => {
|
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
ref: n,
|
|
88
|
-
[
|
|
88
|
+
[le]: R,
|
|
89
89
|
className: "k-dialog-wrapper" + (f ? " " + f : ""),
|
|
90
90
|
onKeyDown: M,
|
|
91
91
|
tabIndex: 0,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ActionsLayout } from './models/actions-layout.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the props of the [KendoReact DialogActionsBar component](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog).
|
|
12
|
+
*/
|
|
13
|
+
export interface DialogActionsBarProps {
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the possible layouts of the action buttons ([see example](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog/action-buttons)). Defaults to `stretched`.
|
|
16
|
+
*/
|
|
17
|
+
layout?: ActionsLayout;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
children?: any;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the action bar of the Dialog.
|
|
25
|
+
*
|
|
26
|
+
* @returns React.ReactElement
|
|
27
|
+
*/
|
|
28
|
+
export declare const DialogActionsBar: React.FunctionComponent<DialogActionsBarProps>;
|
package/DialogProps.d.ts
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { DialogCloseEvent } from './events.js';
|
|
9
|
+
/**
|
|
10
|
+
* Represents the props of the [KendoReact Dialog component](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog).
|
|
11
|
+
*/
|
|
12
|
+
export interface DialogProps {
|
|
13
|
+
/**
|
|
14
|
+
* Set the focus the Dialog container automatically when mounted.
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```jsx
|
|
20
|
+
* <Dialog autoFocus={true} />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
autoFocus?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the query selector used to set the initial focus ([see examples](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog/initial-focus)).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```jsx
|
|
29
|
+
* <Dialog autoFocusedElement="#input-id" />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
autoFocusedElement?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the title of the Dialog ([see example](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog/title)). If you do not specify the `title`, the Dialog does not render a **Close** button.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```jsx
|
|
38
|
+
* <Dialog title="Dialog Title" />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
title?: string | React.ReactElement<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Sets a class of the Dialog DOM element.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```jsx
|
|
47
|
+
* <Dialog className="custom-class" />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Specifies whether a close button should be rendered at the top corner of the dialog.
|
|
53
|
+
*
|
|
54
|
+
* @default true
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```jsx
|
|
58
|
+
* <Dialog closeIcon={true} />
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
closeIcon?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies if the Dialog will be modal by rendering an overlay under the component.
|
|
64
|
+
*
|
|
65
|
+
* @default true
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```jsx
|
|
69
|
+
* <Dialog modal={false} />
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
modal?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Set styles to the Dialog overlay element rendered when the `modal` prop is enabled.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```jsx
|
|
78
|
+
* <Dialog overlayStyle={{ backgroundColor: 'rgba(0, 0, 0, 0.5)' }} />
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
overlayStyle?: React.CSSProperties;
|
|
82
|
+
/**
|
|
83
|
+
* Specifies the width of the Dialog ([see example](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog/dimensions)).
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```jsx
|
|
87
|
+
* <Dialog width="400px" />
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
width?: number | string;
|
|
91
|
+
/**
|
|
92
|
+
* Specifies the height of the Dialog ([see example](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog/dimensions)).
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```jsx
|
|
96
|
+
* <Dialog height="300px" />
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
height?: number | string;
|
|
100
|
+
/**
|
|
101
|
+
* Specifies the minimum width of the Dialog.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```jsx
|
|
105
|
+
* <Dialog minWidth="200px" />
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
minWidth?: number | string;
|
|
109
|
+
/**
|
|
110
|
+
* Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```jsx
|
|
114
|
+
* <Dialog onClose={(event) => console.log(event)} />
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
onClose?: (event: DialogCloseEvent) => void;
|
|
118
|
+
/**
|
|
119
|
+
* @hidden
|
|
120
|
+
*/
|
|
121
|
+
children?: React.ReactNode;
|
|
122
|
+
/**
|
|
123
|
+
* Sets the `aria-labelledby` value.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```jsx
|
|
127
|
+
* <Dialog id="dialog-id" />
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
id?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Represents the `dir` HTML attribute.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```jsx
|
|
136
|
+
* <Dialog dir="rtl" />
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
dir?: string;
|
|
140
|
+
/**
|
|
141
|
+
* The styles that are applied to the Dialog.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```jsx
|
|
145
|
+
* <Dialog style={{ border: '1px solid black' }} />
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
style?: React.CSSProperties;
|
|
149
|
+
/**
|
|
150
|
+
* The styles that are applied to the content of the Dialog.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```jsx
|
|
154
|
+
* <Dialog contentStyle={{ padding: '20px' }} />
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
contentStyle?: React.CSSProperties;
|
|
158
|
+
/**
|
|
159
|
+
* Defines the container to which the Dialog will be appended.
|
|
160
|
+
* * If set to `null` the Dialog will be rendered without React Portal.
|
|
161
|
+
*
|
|
162
|
+
* @default document.body
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```jsx
|
|
166
|
+
* <Dialog appendTo={document.getElementById('container')} />
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
appendTo?: any;
|
|
170
|
+
/**
|
|
171
|
+
* Configures the `themeColor` of the Dialog.
|
|
172
|
+
*
|
|
173
|
+
* The available options are:
|
|
174
|
+
* - primary
|
|
175
|
+
* - dark
|
|
176
|
+
* - light
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```jsx
|
|
180
|
+
* <Dialog themeColor="dark" />
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
themeColor?: 'primary' | 'dark' | 'light';
|
|
184
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export interface DialogTitleBarProps {
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
onCloseButtonClick?: (event: React.SyntheticEvent<any>) => void;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
children?: any;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
closeIcon?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @hidden
|
|
32
|
+
*/
|
|
33
|
+
export declare const DialogTitleBar: React.FunctionComponent<DialogTitleBarProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
interface MiddleLayerOptimizationProps {
|
|
13
|
+
shouldUpdateOnDrag?: boolean;
|
|
14
|
+
isDragging?: boolean;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare class MiddleLayerOptimization extends React.Component<MiddleLayerOptimizationProps, {}> {
|
|
21
|
+
shouldComponentUpdate(nextProps: MiddleLayerOptimizationProps): boolean;
|
|
22
|
+
render(): React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
package/StageEnum.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
export declare enum windowStage {
|
|
9
|
+
DEFAULT = "DEFAULT",
|
|
10
|
+
FULLSCREEN = "FULLSCREEN",
|
|
11
|
+
MINIMIZED = "MINIMIZED"
|
|
12
|
+
}
|
package/Window.d.ts
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { default as PropTypes } from 'prop-types';
|
|
9
|
+
import { WindowProps } from './WindowProps.js';
|
|
10
|
+
import { Draggable, ZIndexContext } from '@progress/kendo-react-common';
|
|
11
|
+
import { windowStage } from './StageEnum.js';
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
interface WindowState {
|
|
14
|
+
stage: windowStage | string;
|
|
15
|
+
isDragging: boolean;
|
|
16
|
+
top: number;
|
|
17
|
+
left: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number | null;
|
|
20
|
+
focused: boolean;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
}
|
|
23
|
+
/** @hidden */
|
|
24
|
+
export declare class WindowWithoutContext extends React.Component<WindowProps, WindowState> {
|
|
25
|
+
static displayName: string;
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
static propTypes: {
|
|
30
|
+
width: PropTypes.Requireable<number>;
|
|
31
|
+
height: PropTypes.Requireable<number>;
|
|
32
|
+
left: PropTypes.Requireable<number>;
|
|
33
|
+
top: PropTypes.Requireable<number>;
|
|
34
|
+
initialWidth: PropTypes.Requireable<number>;
|
|
35
|
+
initialHeight: PropTypes.Requireable<number>;
|
|
36
|
+
initialLeft: PropTypes.Requireable<number>;
|
|
37
|
+
initialTop: PropTypes.Requireable<number>;
|
|
38
|
+
minWidth: PropTypes.Requireable<number>;
|
|
39
|
+
minHeight: PropTypes.Requireable<number>;
|
|
40
|
+
resizable: PropTypes.Requireable<boolean>;
|
|
41
|
+
draggable: PropTypes.Requireable<boolean>;
|
|
42
|
+
title: PropTypes.Requireable<any>;
|
|
43
|
+
shouldUpdateOnDrag: PropTypes.Requireable<boolean>;
|
|
44
|
+
stage: PropTypes.Requireable<string>;
|
|
45
|
+
className: PropTypes.Requireable<string>;
|
|
46
|
+
id: PropTypes.Requireable<string>;
|
|
47
|
+
style: PropTypes.Requireable<object>;
|
|
48
|
+
overlayStyle: PropTypes.Requireable<object>;
|
|
49
|
+
autoFocus: PropTypes.Requireable<boolean>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
static defaultProps: {
|
|
55
|
+
minWidth: number;
|
|
56
|
+
minHeight: number;
|
|
57
|
+
resizable: boolean;
|
|
58
|
+
draggable: boolean;
|
|
59
|
+
modal: boolean;
|
|
60
|
+
doubleClickStageChange: boolean;
|
|
61
|
+
autoFocus: boolean;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* @hidden
|
|
65
|
+
*/
|
|
66
|
+
static contextType: React.Context<import('@progress/kendo-react-common').ZIndexContextType>;
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
context: React.ContextType<typeof ZIndexContext>;
|
|
71
|
+
/**
|
|
72
|
+
* **Deprecated.** Use `element` instead.
|
|
73
|
+
*/
|
|
74
|
+
windowElement?: HTMLDivElement | null;
|
|
75
|
+
/**
|
|
76
|
+
* The Window element.
|
|
77
|
+
*/
|
|
78
|
+
element?: HTMLDivElement | null;
|
|
79
|
+
/**
|
|
80
|
+
* @hidden
|
|
81
|
+
*/
|
|
82
|
+
windowTitle?: any;
|
|
83
|
+
/**
|
|
84
|
+
* The draggable handle for the Window component.
|
|
85
|
+
*/
|
|
86
|
+
draggable: Draggable | null;
|
|
87
|
+
private windowCoordinatesState?;
|
|
88
|
+
private offSetCoordinates?;
|
|
89
|
+
private get _id();
|
|
90
|
+
private titleId;
|
|
91
|
+
private _blurTimeout?;
|
|
92
|
+
private mounted;
|
|
93
|
+
private activeElement;
|
|
94
|
+
constructor(props: WindowProps);
|
|
95
|
+
/**
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
componentDidMount(): void;
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*/
|
|
102
|
+
componentWillUnmount(): void;
|
|
103
|
+
/**
|
|
104
|
+
* @hidden
|
|
105
|
+
*/
|
|
106
|
+
componentDidUpdate(prevProps: WindowProps): void;
|
|
107
|
+
/**
|
|
108
|
+
* @hidden
|
|
109
|
+
*/
|
|
110
|
+
onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
|
|
111
|
+
/**
|
|
112
|
+
* @hidden
|
|
113
|
+
*/
|
|
114
|
+
onPress: (data: any) => void;
|
|
115
|
+
/**
|
|
116
|
+
* @hidden
|
|
117
|
+
*/
|
|
118
|
+
onDrag: (data: any) => void;
|
|
119
|
+
/**
|
|
120
|
+
* @hidden
|
|
121
|
+
*/
|
|
122
|
+
onRelease: (data: any) => void;
|
|
123
|
+
/**
|
|
124
|
+
* @hidden
|
|
125
|
+
*/
|
|
126
|
+
onFocus: () => void;
|
|
127
|
+
/**
|
|
128
|
+
* @hidden
|
|
129
|
+
*/
|
|
130
|
+
onBlur: () => void;
|
|
131
|
+
/**
|
|
132
|
+
* @hidden
|
|
133
|
+
*/
|
|
134
|
+
render(): React.JSX.Element | null;
|
|
135
|
+
private get top();
|
|
136
|
+
private get left();
|
|
137
|
+
private get width();
|
|
138
|
+
private get height();
|
|
139
|
+
private get windowStage();
|
|
140
|
+
private getInitialTop;
|
|
141
|
+
private getInitialLeft;
|
|
142
|
+
private getInitialWidth;
|
|
143
|
+
private getInitialHeight;
|
|
144
|
+
private handleMinimize;
|
|
145
|
+
private handleFullscreen;
|
|
146
|
+
private handleRestore;
|
|
147
|
+
private handleCloseWindow;
|
|
148
|
+
private handleDoubleClick;
|
|
149
|
+
private handleResize;
|
|
150
|
+
private dispatchMoveEvent;
|
|
151
|
+
private handleBrowserWindowResize;
|
|
152
|
+
private getActionBar;
|
|
153
|
+
private getContent;
|
|
154
|
+
private getCurrentZIndex;
|
|
155
|
+
private getDocument;
|
|
156
|
+
private getWindow;
|
|
157
|
+
private generateTitleId;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Represents the PropsContext of the `Window` component.
|
|
161
|
+
* Used for global configuration of all `Window` instances.
|
|
162
|
+
*/
|
|
163
|
+
export declare const WindowPropsContext: React.Context<(p: WindowProps) => WindowProps>;
|
|
164
|
+
/**
|
|
165
|
+
* Represent the `ref` of the Window component.
|
|
166
|
+
*/
|
|
167
|
+
export interface WindowHandle extends Pick<WindowWithoutContext, keyof WindowWithoutContext> {
|
|
168
|
+
/**
|
|
169
|
+
* The Window element.
|
|
170
|
+
*/
|
|
171
|
+
element?: HTMLDivElement | null;
|
|
172
|
+
/**
|
|
173
|
+
* **Deprecated.** Use `element` instead.
|
|
174
|
+
*/
|
|
175
|
+
windowElement?: HTMLDivElement | null;
|
|
176
|
+
}
|
|
177
|
+
/** @hidden */
|
|
178
|
+
export type Window = WindowHandle;
|
|
179
|
+
/**
|
|
180
|
+
* Represents the [KendoReact Window component](https://www.telerik.com/kendo-react-ui/components/dialogs/window).
|
|
181
|
+
*
|
|
182
|
+
* Accepts properties of type [WindowProps](https://www.telerik.com/kendo-react-ui/components/dialogs/api/windowprops).
|
|
183
|
+
* Obtaining the `ref` returns an object of type [WindowHandle](https://www.telerik.com/kendo-react-ui/components/dialogs/api/windowhandle).
|
|
184
|
+
*
|
|
185
|
+
* @remarks
|
|
186
|
+
* Supported children components are: {@link WindowActionsBar}.
|
|
187
|
+
*/
|
|
188
|
+
export declare const Window: React.ForwardRefExoticComponent<WindowProps & React.RefAttributes<any>>;
|
|
189
|
+
export {};
|
package/Window.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import * as r from "react";
|
|
|
9
9
|
import * as H from "react-dom";
|
|
10
10
|
import n from "prop-types";
|
|
11
11
|
import { WindowTitleBar as N } from "./WindowTitlebar.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { withIdHOC as U, createPropsContext as z, withPropsContext as k, keepFocusInContainer as _, Keys as a, dispatchEvent as g, canUseDOM as S, ZIndexContext as A, classNames as Z, Draggable as O } from "@progress/kendo-react-common";
|
|
13
13
|
import { ResizeHandlers as K } from "./WindowResizeHandlers.mjs";
|
|
14
14
|
import { MiddleLayerOptimization as P } from "./MiddleLayerOptimization.mjs";
|
|
15
15
|
import { windowStage as i } from "./StageEnum.mjs";
|
|
@@ -20,7 +20,7 @@ const E = 300, C = 300, D = 120, T = 100, l = 5, u = class u extends r.Component
|
|
|
20
20
|
constructor(s) {
|
|
21
21
|
super(s), this.context = 0, this.draggable = null, this.offSetCoordinates = { x: 0, y: 0 }, this.titleId = this.generateTitleId(), this.mounted = !1, this.activeElement = null, this.onKeyDown = (t) => {
|
|
22
22
|
var p, w, m;
|
|
23
|
-
if (this.props.modal &&
|
|
23
|
+
if (this.props.modal && _(t, this.element), t.target !== t.currentTarget)
|
|
24
24
|
return;
|
|
25
25
|
const e = this.props.minWidth || D, o = this.props.minHeight || T, h = t.metaKey || t.ctrlKey, c = (m = (w = this.height) != null ? w : (p = this.windowElement) == null ? void 0 : p.clientHeight) != null ? m : 0;
|
|
26
26
|
if (h && this.props.resizable) {
|
|
@@ -256,7 +256,7 @@ const E = 300, C = 300, D = 120, T = 100, l = 5, u = class u extends r.Component
|
|
|
256
256
|
* @hidden
|
|
257
257
|
*/
|
|
258
258
|
render() {
|
|
259
|
-
const s = r.Children.toArray(this.props.children), t = this.getContent(s), e = this.getActionBar(s), o = this.getCurrentZIndex(), h =
|
|
259
|
+
const s = r.Children.toArray(this.props.children), t = this.getContent(s), e = this.getActionBar(s), o = this.getCurrentZIndex(), h = Z("k-window", this.props.className, {
|
|
260
260
|
[`k-window-${this.props.themeColor}`]: this.props.themeColor,
|
|
261
261
|
"k-window-minimized": this.state.stage === "MINIMIZED",
|
|
262
262
|
"k-focus": this.state.focused
|
|
@@ -300,7 +300,7 @@ const E = 300, C = 300, D = 120, T = 100, l = 5, u = class u extends r.Component
|
|
|
300
300
|
isDragging: this.state.isDragging
|
|
301
301
|
},
|
|
302
302
|
/* @__PURE__ */ r.createElement(
|
|
303
|
-
|
|
303
|
+
O,
|
|
304
304
|
{
|
|
305
305
|
onPress: this.onPress,
|
|
306
306
|
onDrag: this.onDrag,
|
|
@@ -405,8 +405,8 @@ u.displayName = "Window", u.propTypes = {
|
|
|
405
405
|
autoFocus: !0
|
|
406
406
|
}, u.contextType = A;
|
|
407
407
|
let I = u;
|
|
408
|
-
const G =
|
|
409
|
-
|
|
408
|
+
const G = z(), Y = U(
|
|
409
|
+
k(
|
|
410
410
|
G,
|
|
411
411
|
I
|
|
412
412
|
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ActionsLayout } from './models/actions-layout.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Represents the props of the [KendoReact WindowActionsBar component](https://www.telerik.com/kendo-react-ui/components/dialogs/dialog).
|
|
12
|
+
*/
|
|
13
|
+
export interface WindowActionsBarProps {
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the possible layouts of the action buttons ([see example](https://www.telerik.com/kendo-react-ui/components/dialogs/window/action-buttons)). Defaults to `end`.
|
|
16
|
+
*/
|
|
17
|
+
layout?: ActionsLayout;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
children?: any;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the action bar of the Window.
|
|
25
|
+
*
|
|
26
|
+
* @returns React.ReactElement
|
|
27
|
+
*/
|
|
28
|
+
export declare const WindowActionsBar: React.FunctionComponent<WindowActionsBarProps>;
|