@progress/kendo-react-dialogs 6.1.1 → 7.0.0-develop.10
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/es/Dialog.d.ts → Dialog.d.ts} +6 -2
- package/{dist/npm/DialogActionsBar.d.ts → DialogActionsBar.d.ts} +4 -0
- package/{dist/es/DialogProps.d.ts → DialogProps.d.ts} +4 -1
- package/{dist/es/DialogTitleBar.d.ts → DialogTitleBar.d.ts} +4 -0
- package/LICENSE.md +1 -1
- package/{dist/es/MiddleLayerOptimization.d.ts → MiddleLayerOptimization.d.ts} +4 -0
- package/StageEnum.d.ts +9 -0
- package/{dist/es/Window.d.ts → Window.d.ts} +6 -2
- package/{dist/npm/WindowActionsBar.d.ts → WindowActionsBar.d.ts} +4 -0
- package/{dist/npm/WindowProps.d.ts → WindowProps.d.ts} +4 -1
- package/WindowResizeHandlers.d.ts +20 -0
- package/{dist/npm/WindowTitlebar.d.ts → WindowTitlebar.d.ts} +4 -0
- package/constants.d.ts +12 -0
- package/dist/cdn/js/kendo-react-dialogs.js +5 -1
- package/{dist/npm/events.d.ts → events.d.ts} +4 -0
- package/index.d.ts +13 -0
- package/index.js +5 -0
- package/index.mjs +677 -0
- package/{dist/npm/messages → messages}/index.d.ts +4 -0
- package/models/actions-layout.d.ts +8 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +28 -36
- package/utils.d.ts +6 -0
- package/about.md +0 -3
- package/dist/es/Dialog.js +0 -203
- package/dist/es/DialogActionsBar.d.ts +0 -21
- package/dist/es/DialogActionsBar.js +0 -32
- package/dist/es/DialogProps.js +0 -3
- package/dist/es/DialogTitleBar.js +0 -13
- package/dist/es/MiddleLayerOptimization.js +0 -33
- package/dist/es/StageEnum.d.ts +0 -5
- package/dist/es/StageEnum.js +0 -6
- package/dist/es/Window.js +0 -643
- package/dist/es/WindowActionsBar.d.ts +0 -21
- package/dist/es/WindowActionsBar.js +0 -34
- package/dist/es/WindowProps.d.ts +0 -144
- package/dist/es/WindowProps.js +0 -2
- package/dist/es/WindowResizeHandlers.d.ts +0 -16
- package/dist/es/WindowResizeHandlers.js +0 -49
- package/dist/es/WindowTitlebar.d.ts +0 -63
- package/dist/es/WindowTitlebar.js +0 -47
- package/dist/es/constants.d.ts +0 -8
- package/dist/es/constants.js +0 -8
- package/dist/es/events.d.ts +0 -45
- package/dist/es/events.js +0 -2
- package/dist/es/main.d.ts +0 -9
- package/dist/es/main.js +0 -5
- package/dist/es/messages/index.d.ts +0 -25
- package/dist/es/messages/index.js +0 -26
- package/dist/es/models/actions-layout.d.ts +0 -4
- package/dist/es/models/actions-layout.js +0 -1
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/utils.d.ts +0 -2
- package/dist/es/utils.js +0 -22
- package/dist/npm/Dialog.d.ts +0 -90
- package/dist/npm/Dialog.js +0 -206
- package/dist/npm/DialogActionsBar.js +0 -36
- package/dist/npm/DialogProps.d.ts +0 -74
- package/dist/npm/DialogProps.js +0 -4
- package/dist/npm/DialogTitleBar.d.ts +0 -26
- package/dist/npm/DialogTitleBar.js +0 -17
- package/dist/npm/MiddleLayerOptimization.d.ts +0 -17
- package/dist/npm/MiddleLayerOptimization.js +0 -36
- package/dist/npm/StageEnum.d.ts +0 -5
- package/dist/npm/StageEnum.js +0 -9
- package/dist/npm/Window.d.ts +0 -174
- package/dist/npm/Window.js +0 -646
- package/dist/npm/WindowActionsBar.js +0 -38
- package/dist/npm/WindowProps.js +0 -3
- package/dist/npm/WindowResizeHandlers.d.ts +0 -16
- package/dist/npm/WindowResizeHandlers.js +0 -52
- package/dist/npm/WindowTitlebar.js +0 -50
- package/dist/npm/constants.d.ts +0 -8
- package/dist/npm/constants.js +0 -11
- package/dist/npm/events.js +0 -3
- package/dist/npm/main.d.ts +0 -9
- package/dist/npm/main.js +0 -13
- package/dist/npm/messages/index.js +0 -29
- package/dist/npm/models/actions-layout.d.ts +0 -4
- package/dist/npm/models/actions-layout.js +0 -2
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/utils.d.ts +0 -2
- package/dist/npm/utils.js +0 -26
- package/dist/systemjs/kendo-react-dialogs.js +0 -1
- package/e2e-next/dialog.basic.tests.ts +0 -24
- package/e2e-next/window.basic.tests.ts +0 -24
package/dist/npm/Dialog.js
DELETED
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Dialog = exports.DialogPropsContext = void 0;
|
|
30
|
-
var React = require("react");
|
|
31
|
-
var ReactDOM = require("react-dom");
|
|
32
|
-
var PropTypes = require("prop-types");
|
|
33
|
-
var DialogTitleBar_1 = require("./DialogTitleBar");
|
|
34
|
-
var DialogActionsBar_1 = require("./DialogActionsBar");
|
|
35
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
36
|
-
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
37
|
-
var package_metadata_1 = require("./package-metadata");
|
|
38
|
-
var utils_1 = require("./utils");
|
|
39
|
-
var constants_1 = require("./constants");
|
|
40
|
-
// tslint:enable:max-line-length
|
|
41
|
-
/** @hidden */
|
|
42
|
-
var DialogWithoutContext = /** @class */ (function (_super) {
|
|
43
|
-
__extends(DialogWithoutContext, _super);
|
|
44
|
-
function DialogWithoutContext(props) {
|
|
45
|
-
var _this = _super.call(this, props) || this;
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
_this.context = 0;
|
|
50
|
-
_this._id = (0, kendo_react_common_1.guid)();
|
|
51
|
-
_this.titleId = _this.generateTitleId();
|
|
52
|
-
_this.contentId = _this.generateContentId();
|
|
53
|
-
_this.showLicenseWatermark = false;
|
|
54
|
-
/**
|
|
55
|
-
* @hidden
|
|
56
|
-
*/
|
|
57
|
-
_this.onCloseDialog = function (event) {
|
|
58
|
-
event.preventDefault();
|
|
59
|
-
(0, kendo_react_common_1.dispatchEvent)(_this.props.onClose, event, _this, undefined);
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* @hidden
|
|
63
|
-
*/
|
|
64
|
-
_this.onKeyDown = function (event) {
|
|
65
|
-
if (event.keyCode === kendo_react_common_1.Keys.esc && _this.props.onClose) {
|
|
66
|
-
event.preventDefault();
|
|
67
|
-
_this.onCloseDialog(event);
|
|
68
|
-
}
|
|
69
|
-
var kDialog = _this.element;
|
|
70
|
-
if (kDialog && (event.keyCode === kendo_react_common_1.Keys.tab)) {
|
|
71
|
-
var focusableElements = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
72
|
-
var focusableContent = kDialog.querySelectorAll(focusableElements);
|
|
73
|
-
var firstFocusableElement = focusableContent[0];
|
|
74
|
-
var lastFocusableElement = focusableContent[focusableContent.length - 1];
|
|
75
|
-
var currentDocument = _this.getDocument();
|
|
76
|
-
var activeElement = (0, kendo_react_common_1.getActiveElement)(currentDocument);
|
|
77
|
-
if (event.shiftKey) {
|
|
78
|
-
if ((currentDocument && activeElement === firstFocusableElement) ||
|
|
79
|
-
currentDocument && activeElement === _this.element) {
|
|
80
|
-
lastFocusableElement.focus();
|
|
81
|
-
event.preventDefault();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
if (currentDocument && activeElement === lastFocusableElement) {
|
|
86
|
-
firstFocusableElement.focus();
|
|
87
|
-
event.preventDefault();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
_this.getCurrentZIndex = function () {
|
|
93
|
-
if (!_this.state || _this.context === undefined) {
|
|
94
|
-
return _this.context ? _this.context : constants_1.DEFAULT_DIALOGS_ZINDEX;
|
|
95
|
-
}
|
|
96
|
-
return _this.state.zIndex > (_this.context ? _this.context + constants_1.ZINDEX_DIALOGS_STEP : 0) ? _this.state.zIndex : _this.context + constants_1.ZINDEX_DIALOGS_STEP;
|
|
97
|
-
};
|
|
98
|
-
_this.getDocument = function () {
|
|
99
|
-
return _this.props.appendTo ? _this.props.appendTo.ownerDocument : document;
|
|
100
|
-
};
|
|
101
|
-
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
102
|
-
_this.showLicenseWatermark = (0, kendo_react_common_2.shouldShowValidationUI)(package_metadata_1.packageMetadata);
|
|
103
|
-
_this.state = {
|
|
104
|
-
zIndex: (0, utils_1.getMaxZIndex)(_this.getCurrentZIndex(), _this.getDocument(), _this._id)
|
|
105
|
-
};
|
|
106
|
-
return _this;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* @hidden
|
|
110
|
-
*/
|
|
111
|
-
DialogWithoutContext.prototype.componentDidMount = function () {
|
|
112
|
-
if (this.element) {
|
|
113
|
-
if (this.props.autoFocus) {
|
|
114
|
-
this.element.focus();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* @hidden
|
|
120
|
-
*/
|
|
121
|
-
DialogWithoutContext.prototype.render = function () {
|
|
122
|
-
var _a, _b;
|
|
123
|
-
var _this = this;
|
|
124
|
-
var id = this.props.id !== undefined ? this.props.id : this.titleId;
|
|
125
|
-
var _c = this.props, title = _c.title, width = _c.width, height = _c.height, children = _c.children, minWidth = _c.minWidth, dir = _c.dir, style = _c.style, contentStyle = _c.contentStyle;
|
|
126
|
-
var elementsArray = React.Children.toArray(children);
|
|
127
|
-
var content = this.getContent(elementsArray);
|
|
128
|
-
var actions = this.getActionBar(elementsArray);
|
|
129
|
-
var aria = title ? {
|
|
130
|
-
'aria-labelledby': id
|
|
131
|
-
} : null;
|
|
132
|
-
var closeIcon = this.props.closeIcon !== undefined ? this.props.closeIcon : true;
|
|
133
|
-
var currentZIndex = this.getCurrentZIndex();
|
|
134
|
-
var dialogElement = (React.createElement(kendo_react_common_1.ZIndexContext.Provider, { value: currentZIndex },
|
|
135
|
-
React.createElement("div", __assign({}, (_a = {}, _a[constants_1.DATA_DIALOGS_ID] = this._id, _a), { className: 'k-dialog-wrapper' + (this.props.className ? ' ' + this.props.className : ''), onKeyDown: this.onKeyDown, tabIndex: 0, dir: dir, style: __assign({ zIndex: currentZIndex }, style), ref: (function (el) { return _this.element = el; }) }),
|
|
136
|
-
React.createElement("div", { className: "k-overlay" }),
|
|
137
|
-
React.createElement("div", __assign({}, aria, { className: (0, kendo_react_common_1.classNames)('k-window k-dialog', (_b = {},
|
|
138
|
-
_b["k-window-".concat(this.props.themeColor)] = this.props.themeColor,
|
|
139
|
-
_b)), role: "dialog", "aria-labelledby": id, "aria-modal": true, "aria-describedby": this.contentId, style: { width: width, height: height, minWidth: minWidth } }),
|
|
140
|
-
this.props.title &&
|
|
141
|
-
React.createElement(DialogTitleBar_1.DialogTitleBar, { closeIcon: closeIcon, onCloseButtonClick: this.onCloseDialog, id: id }, title),
|
|
142
|
-
React.createElement("div", { className: "k-window-content k-dialog-content", style: contentStyle, id: this.contentId }, content),
|
|
143
|
-
actions,
|
|
144
|
-
this.showLicenseWatermark && React.createElement(kendo_react_common_2.WatermarkOverlay, null)))));
|
|
145
|
-
if (kendo_react_common_1.canUseDOM) {
|
|
146
|
-
return this.props.appendTo !== null ?
|
|
147
|
-
ReactDOM.createPortal(dialogElement, this.props.appendTo || document.body) :
|
|
148
|
-
dialogElement;
|
|
149
|
-
}
|
|
150
|
-
return null;
|
|
151
|
-
};
|
|
152
|
-
DialogWithoutContext.prototype.getActionBar = function (children) {
|
|
153
|
-
return children.filter(function (child) { return child && child.type === DialogActionsBar_1.DialogActionsBar; });
|
|
154
|
-
};
|
|
155
|
-
DialogWithoutContext.prototype.getContent = function (children) {
|
|
156
|
-
return children.filter(function (child) {
|
|
157
|
-
return child && child.type !== DialogActionsBar_1.DialogActionsBar;
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
DialogWithoutContext.prototype.generateTitleId = function () {
|
|
161
|
-
return 'dialog-title' + this._id;
|
|
162
|
-
};
|
|
163
|
-
DialogWithoutContext.prototype.generateContentId = function () {
|
|
164
|
-
return 'dialog-content' + this._id;
|
|
165
|
-
};
|
|
166
|
-
DialogWithoutContext.displayName = 'Dialog';
|
|
167
|
-
/**
|
|
168
|
-
* @hidden
|
|
169
|
-
*/
|
|
170
|
-
DialogWithoutContext.propTypes = {
|
|
171
|
-
title: PropTypes.any,
|
|
172
|
-
id: PropTypes.string,
|
|
173
|
-
dir: PropTypes.string,
|
|
174
|
-
style: PropTypes.object,
|
|
175
|
-
closeIcon: PropTypes.bool,
|
|
176
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
177
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
178
|
-
minWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
179
|
-
autoFocus: PropTypes.bool
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* @hidden
|
|
183
|
-
*/
|
|
184
|
-
DialogWithoutContext.defaultProps = {
|
|
185
|
-
autoFocus: false
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* @hidden
|
|
189
|
-
*/
|
|
190
|
-
DialogWithoutContext.contextType = kendo_react_common_1.ZIndexContext;
|
|
191
|
-
return DialogWithoutContext;
|
|
192
|
-
}(React.Component));
|
|
193
|
-
/**
|
|
194
|
-
* Represents the PropsContext of the `Dialog` component.
|
|
195
|
-
* Used for global configuration of all `Dialog` instances.
|
|
196
|
-
*/
|
|
197
|
-
exports.DialogPropsContext = (0, kendo_react_common_1.createPropsContext)();
|
|
198
|
-
/* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
|
|
199
|
-
/**
|
|
200
|
-
* Represents the [KendoReact Dialog component]({% slug overview_dialog %}).
|
|
201
|
-
*
|
|
202
|
-
* Accepts properties of type [DialogProps]({% slug api_dialogs_dialogprops %}).
|
|
203
|
-
* Obtaining the `ref` returns an object of type [DialogHandle]({% slug api_dialogs_dialoghandle %}).
|
|
204
|
-
*/
|
|
205
|
-
exports.Dialog = (0, kendo_react_common_1.withPropsContext)(exports.DialogPropsContext, DialogWithoutContext);
|
|
206
|
-
exports.Dialog.displayName = 'KendoReactDialog';
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.DialogActionsBar = void 0;
|
|
15
|
-
var React = require("react");
|
|
16
|
-
var PropTypes = require("prop-types");
|
|
17
|
-
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
18
|
-
/**
|
|
19
|
-
* Returns the action bar of the Dialog.
|
|
20
|
-
*
|
|
21
|
-
* @returns React.ReactElement
|
|
22
|
-
*/
|
|
23
|
-
var DialogActionsBar = function (props) {
|
|
24
|
-
var _a;
|
|
25
|
-
var combinedProps = __assign({ layout: 'stretched' }, props);
|
|
26
|
-
var layout = combinedProps.layout, children = combinedProps.children;
|
|
27
|
-
var wrapperClasses = (0, kendo_react_common_1.classNames)('k-actions', 'k-actions-horizontal', 'k-window-actions k-dialog-actions', (_a = {},
|
|
28
|
-
_a["k-actions-".concat(layout)] = layout,
|
|
29
|
-
_a));
|
|
30
|
-
return (React.createElement("div", { className: wrapperClasses }, children));
|
|
31
|
-
};
|
|
32
|
-
exports.DialogActionsBar = DialogActionsBar;
|
|
33
|
-
exports.DialogActionsBar.propTypes = {
|
|
34
|
-
children: PropTypes.any,
|
|
35
|
-
layout: PropTypes.oneOf(['start', 'center', 'end', 'stretched'])
|
|
36
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DialogCloseEvent } from './events';
|
|
3
|
-
/**
|
|
4
|
-
* Represents the props of the [KendoReact Dialog component]({% slug overview_dialog %}).
|
|
5
|
-
*/
|
|
6
|
-
export interface DialogProps {
|
|
7
|
-
/**
|
|
8
|
-
* Focus the Dialog container automatically when mounted. By default the autoFocus is false.
|
|
9
|
-
*/
|
|
10
|
-
autoFocus?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Sets the title of the Dialog ([see example]({% slug title_dialog %})). If `title` is not specified, the Dialog does not render a **Close** button.
|
|
13
|
-
*/
|
|
14
|
-
title?: string | React.ReactElement<any>;
|
|
15
|
-
/**
|
|
16
|
-
* Sets a class of the Dialog DOM element.
|
|
17
|
-
*/
|
|
18
|
-
className?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Specifies whether a close button should be rendered at the top corner of the dialog.
|
|
21
|
-
*/
|
|
22
|
-
closeIcon?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Specifies the width of the Dialog ([see example]({% slug dimensions_dialog %})).
|
|
25
|
-
*/
|
|
26
|
-
width?: number | string;
|
|
27
|
-
/**
|
|
28
|
-
* Specifies the height of the Dialog ([see example]({% slug dimensions_dialog %})).
|
|
29
|
-
*/
|
|
30
|
-
height?: number | string;
|
|
31
|
-
/**
|
|
32
|
-
* Specifies the minimum width of the Dialog.
|
|
33
|
-
*/
|
|
34
|
-
minWidth?: number | string;
|
|
35
|
-
/**
|
|
36
|
-
* Fires when the **Close** button in the title is clicked or when the `Esc` button is pressed.
|
|
37
|
-
*/
|
|
38
|
-
onClose?: (event: DialogCloseEvent) => void;
|
|
39
|
-
/**
|
|
40
|
-
* @hidden
|
|
41
|
-
*/
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the `aria-labelledby` value.
|
|
45
|
-
*/
|
|
46
|
-
id?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Represents the `dir` HTML attribute.
|
|
49
|
-
*/
|
|
50
|
-
dir?: string;
|
|
51
|
-
/**
|
|
52
|
-
* The styles that are applied to the Dialog.
|
|
53
|
-
*/
|
|
54
|
-
style?: React.CSSProperties;
|
|
55
|
-
/**
|
|
56
|
-
* The styles that are applied to the content of the Dialog.
|
|
57
|
-
*/
|
|
58
|
-
contentStyle?: React.CSSProperties;
|
|
59
|
-
/**
|
|
60
|
-
* Defines the container to which the Dialog will be appended. Defaults to body.
|
|
61
|
-
* * If set to `null` the Dialog will be rendered without React Portal.
|
|
62
|
-
*/
|
|
63
|
-
appendTo?: any;
|
|
64
|
-
/**
|
|
65
|
-
* Configures the `themeColor` of the Dialog.
|
|
66
|
-
*
|
|
67
|
-
* The available options are:
|
|
68
|
-
* - primary
|
|
69
|
-
* - dark
|
|
70
|
-
* - light
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
themeColor?: 'primary' | 'dark' | 'light';
|
|
74
|
-
}
|
package/dist/npm/DialogProps.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export interface DialogTitleBarProps {
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
onCloseButtonClick?: (event: React.SyntheticEvent<any>) => void;
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
id?: string;
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
children?: any;
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
closeIcon?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
export declare const DialogTitleBar: React.FunctionComponent<DialogTitleBarProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DialogTitleBar = void 0;
|
|
4
|
-
var React = require("react");
|
|
5
|
-
var kendo_react_buttons_1 = require("@progress/kendo-react-buttons");
|
|
6
|
-
var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
var DialogTitleBar = function (_a) {
|
|
11
|
-
var children = _a.children, onCloseButtonClick = _a.onCloseButtonClick, id = _a.id, closeIcon = _a.closeIcon;
|
|
12
|
-
return (React.createElement("div", { className: "k-window-titlebar k-dialog-titlebar", id: id },
|
|
13
|
-
React.createElement("span", { className: "k-window-title k-dialog-title" }, children),
|
|
14
|
-
React.createElement("div", { className: "k-window-titlebar-actions k-dialog-titlebar-actions" }, closeIcon &&
|
|
15
|
-
React.createElement(kendo_react_buttons_1.Button, { role: "button", "aria-label": "Close", onClick: onCloseButtonClick, icon: "x", svgIcon: kendo_svg_icons_1.xIcon, fillMode: "flat", className: "k-window-titlebar-action k-dialog-titlebar-action" }))));
|
|
16
|
-
};
|
|
17
|
-
exports.DialogTitleBar = DialogTitleBar;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
interface MiddleLayerOptimizationProps {
|
|
6
|
-
shouldUpdateOnDrag?: boolean;
|
|
7
|
-
isDragging?: boolean;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export declare class MiddleLayerOptimization extends React.Component<MiddleLayerOptimizationProps, {}> {
|
|
14
|
-
shouldComponentUpdate(nextProps: MiddleLayerOptimizationProps): boolean;
|
|
15
|
-
render(): React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.MiddleLayerOptimization = void 0;
|
|
19
|
-
var React = require("react");
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
var MiddleLayerOptimization = /** @class */ (function (_super) {
|
|
24
|
-
__extends(MiddleLayerOptimization, _super);
|
|
25
|
-
function MiddleLayerOptimization() {
|
|
26
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
27
|
-
}
|
|
28
|
-
MiddleLayerOptimization.prototype.shouldComponentUpdate = function (nextProps) {
|
|
29
|
-
return nextProps.shouldUpdateOnDrag || !nextProps.isDragging;
|
|
30
|
-
};
|
|
31
|
-
MiddleLayerOptimization.prototype.render = function () {
|
|
32
|
-
return this.props.children;
|
|
33
|
-
};
|
|
34
|
-
return MiddleLayerOptimization;
|
|
35
|
-
}(React.Component));
|
|
36
|
-
exports.MiddleLayerOptimization = MiddleLayerOptimization;
|
package/dist/npm/StageEnum.d.ts
DELETED
package/dist/npm/StageEnum.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.windowStage = void 0;
|
|
4
|
-
var windowStage;
|
|
5
|
-
(function (windowStage) {
|
|
6
|
-
windowStage["DEFAULT"] = "DEFAULT";
|
|
7
|
-
windowStage["FULLSCREEN"] = "FULLSCREEN";
|
|
8
|
-
windowStage["MINIMIZED"] = "MINIMIZED";
|
|
9
|
-
})(windowStage = exports.windowStage || (exports.windowStage = {}));
|
package/dist/npm/Window.d.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import { WindowProps } from './WindowProps';
|
|
4
|
-
import { ZIndexContext } from '@progress/kendo-react-common';
|
|
5
|
-
import { Draggable } from '@progress/kendo-react-common';
|
|
6
|
-
import { windowStage } from './StageEnum';
|
|
7
|
-
interface WindowState {
|
|
8
|
-
stage: windowStage | string;
|
|
9
|
-
isDragging: boolean;
|
|
10
|
-
top: number;
|
|
11
|
-
left: number;
|
|
12
|
-
width: number;
|
|
13
|
-
height: number;
|
|
14
|
-
focused: boolean;
|
|
15
|
-
zIndex: number;
|
|
16
|
-
}
|
|
17
|
-
/** @hidden */
|
|
18
|
-
declare class WindowWithoutContext extends React.Component<WindowProps, WindowState> {
|
|
19
|
-
static displayName: string;
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
static propTypes: {
|
|
24
|
-
width: PropTypes.Requireable<number>;
|
|
25
|
-
height: PropTypes.Requireable<number>;
|
|
26
|
-
left: PropTypes.Requireable<number>;
|
|
27
|
-
top: PropTypes.Requireable<number>;
|
|
28
|
-
initialWidth: PropTypes.Requireable<number>;
|
|
29
|
-
initialHeight: PropTypes.Requireable<number>;
|
|
30
|
-
initialLeft: PropTypes.Requireable<number>;
|
|
31
|
-
initialTop: PropTypes.Requireable<number>;
|
|
32
|
-
minWidth: PropTypes.Requireable<number>;
|
|
33
|
-
minHeight: PropTypes.Requireable<number>;
|
|
34
|
-
resizable: PropTypes.Requireable<boolean>;
|
|
35
|
-
draggable: PropTypes.Requireable<boolean>;
|
|
36
|
-
title: PropTypes.Requireable<any>;
|
|
37
|
-
shouldUpdateOnDrag: PropTypes.Requireable<boolean>;
|
|
38
|
-
stage: PropTypes.Requireable<string>;
|
|
39
|
-
className: PropTypes.Requireable<string>;
|
|
40
|
-
style: PropTypes.Requireable<object>;
|
|
41
|
-
overlayStyle: PropTypes.Requireable<object>;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
static defaultProps: {
|
|
47
|
-
minWidth: number;
|
|
48
|
-
minHeight: number;
|
|
49
|
-
resizable: boolean;
|
|
50
|
-
draggable: boolean;
|
|
51
|
-
modal: boolean;
|
|
52
|
-
doubleClickStageChange: boolean;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* @hidden
|
|
56
|
-
*/
|
|
57
|
-
static contextType: React.Context<import("@progress/kendo-react-common").ZIndexContextType>;
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
context: React.ContextType<typeof ZIndexContext>;
|
|
62
|
-
/**
|
|
63
|
-
* **Deprecated.** Use `element` instead.
|
|
64
|
-
*/
|
|
65
|
-
windowElement?: HTMLDivElement | null;
|
|
66
|
-
/**
|
|
67
|
-
* The Window element.
|
|
68
|
-
*/
|
|
69
|
-
element?: HTMLDivElement | null;
|
|
70
|
-
/**
|
|
71
|
-
* @hidden
|
|
72
|
-
*/
|
|
73
|
-
windowTitle?: any;
|
|
74
|
-
draggable: Draggable | null;
|
|
75
|
-
private windowCoordinatesState?;
|
|
76
|
-
private offSetCoordinates?;
|
|
77
|
-
private _id;
|
|
78
|
-
private titleId;
|
|
79
|
-
private _blurTimeout?;
|
|
80
|
-
private mounted;
|
|
81
|
-
private showLicenseWatermark;
|
|
82
|
-
constructor(props: WindowProps);
|
|
83
|
-
/**
|
|
84
|
-
* @hidden
|
|
85
|
-
*/
|
|
86
|
-
componentDidMount(): void;
|
|
87
|
-
/**
|
|
88
|
-
* @hidden
|
|
89
|
-
*/
|
|
90
|
-
componentWillUnmount(): void;
|
|
91
|
-
/**
|
|
92
|
-
* @hidden
|
|
93
|
-
*/
|
|
94
|
-
componentDidUpdate(): void;
|
|
95
|
-
/**
|
|
96
|
-
* @hidden
|
|
97
|
-
*/
|
|
98
|
-
onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
|
|
99
|
-
/**
|
|
100
|
-
* @hidden
|
|
101
|
-
*/
|
|
102
|
-
onPress: (data: any) => void;
|
|
103
|
-
/**
|
|
104
|
-
* @hidden
|
|
105
|
-
*/
|
|
106
|
-
onDrag: (data: any) => void;
|
|
107
|
-
/**
|
|
108
|
-
* @hidden
|
|
109
|
-
*/
|
|
110
|
-
onRelease: (data: any) => void;
|
|
111
|
-
/**
|
|
112
|
-
* @hidden
|
|
113
|
-
*/
|
|
114
|
-
onFocus: () => void;
|
|
115
|
-
/**
|
|
116
|
-
* @hidden
|
|
117
|
-
*/
|
|
118
|
-
onBlur: () => void;
|
|
119
|
-
/**
|
|
120
|
-
* @hidden
|
|
121
|
-
*/
|
|
122
|
-
render(): JSX.Element | null;
|
|
123
|
-
private get top();
|
|
124
|
-
private get left();
|
|
125
|
-
private get width();
|
|
126
|
-
private get height();
|
|
127
|
-
private get windowStage();
|
|
128
|
-
private getInitialTop;
|
|
129
|
-
private getInitialLeft;
|
|
130
|
-
private getInitialWidth;
|
|
131
|
-
private getInitialHeight;
|
|
132
|
-
private handleMinimize;
|
|
133
|
-
private handleFullscreen;
|
|
134
|
-
private handleRestore;
|
|
135
|
-
private handleCloseWindow;
|
|
136
|
-
private handleDoubleClick;
|
|
137
|
-
private handleResize;
|
|
138
|
-
private dispatchMoveEvent;
|
|
139
|
-
private handleBrowserWindowResize;
|
|
140
|
-
private getActionBar;
|
|
141
|
-
private getContent;
|
|
142
|
-
private getCurrentZIndex;
|
|
143
|
-
private getDocument;
|
|
144
|
-
private getWindow;
|
|
145
|
-
private generateTitleId;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Represents the PropsContext of the `Window` component.
|
|
149
|
-
* Used for global configuration of all `Window` instances.
|
|
150
|
-
*/
|
|
151
|
-
export declare const WindowPropsContext: React.Context<(p: WindowProps) => WindowProps>;
|
|
152
|
-
/**
|
|
153
|
-
* Represent the `ref` of the Window component.
|
|
154
|
-
*/
|
|
155
|
-
export interface WindowHandle extends Pick<WindowWithoutContext, keyof WindowWithoutContext> {
|
|
156
|
-
/**
|
|
157
|
-
* The Window element.
|
|
158
|
-
*/
|
|
159
|
-
element?: HTMLDivElement | null;
|
|
160
|
-
/**
|
|
161
|
-
* **Deprecated.** Use `element` instead.
|
|
162
|
-
*/
|
|
163
|
-
windowElement?: HTMLDivElement | null;
|
|
164
|
-
}
|
|
165
|
-
/** @hidden */
|
|
166
|
-
export declare type Window = WindowHandle;
|
|
167
|
-
/**
|
|
168
|
-
* Represents the [KendoReact Window component]({% slug overview_window %}).
|
|
169
|
-
*
|
|
170
|
-
* Accepts properties of type [WindowProps]({% slug api_dialogs_windowprops %}).
|
|
171
|
-
* Obtaining the `ref` returns an object of type [WindowHandle]({% slug api_dialogs_windowhandle %}).
|
|
172
|
-
*/
|
|
173
|
-
export declare const Window: React.ForwardRefExoticComponent<WindowProps & React.RefAttributes<any>>;
|
|
174
|
-
export {};
|