@progress/kendo-react-dropdowns 5.4.0-dev.202205250548 → 5.4.0-dev.202206081230
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/cdn/js/kendo-react-dropdowns.js +1 -1
- package/dist/es/AutoComplete/AutoComplete.d.ts +16 -14
- package/dist/es/AutoComplete/AutoComplete.js +19 -15
- package/dist/es/AutoComplete/AutoCompleteProps.js +1 -0
- package/dist/es/ComboBox/ComboBox.d.ts +14 -14
- package/dist/es/ComboBox/ComboBox.js +26 -22
- package/dist/es/ComboBox/ComboBoxProps.js +1 -0
- package/dist/es/DropDownList/DropDownList.d.ts +12 -14
- package/dist/es/DropDownList/DropDownList.js +22 -18
- package/dist/es/DropDownList/DropDownListProps.js +1 -0
- package/dist/es/DropDownTree/DropDownTree.d.ts +1 -1
- package/dist/es/DropDownTree/DropDownTree.js +24 -12
- package/dist/es/DropDownTree/DropDownTreeProps.js +1 -0
- package/dist/es/MultiColumnComboBox/MultiColumnComboBox.d.ts +2 -2
- package/dist/es/MultiColumnComboBox/MultiColumnComboBox.js +10 -8
- package/dist/es/MultiSelect/MultiSelect.d.ts +14 -16
- package/dist/es/MultiSelect/MultiSelect.js +36 -23
- package/dist/es/MultiSelect/MultiSelectProps.js +1 -0
- package/dist/es/MultiSelect/TagList.d.ts +1 -0
- package/dist/es/MultiSelect/TagList.js +4 -2
- package/dist/es/MultiSelectTree/MultiSelectTree.d.ts +1 -1
- package/dist/es/MultiSelectTree/MultiSelectTree.js +23 -11
- package/dist/es/MultiSelectTree/MultiSelectTreeProps.js +1 -0
- package/dist/es/MultiSelectTree/utils.d.ts +4 -4
- package/dist/es/MultiSelectTree/utils.js +12 -3
- package/dist/es/common/ClearButton.js +3 -1
- package/dist/es/common/DropDownBase.d.ts +6 -6
- package/dist/es/common/DropDownBase.js +5 -3
- package/dist/es/common/List.d.ts +2 -2
- package/dist/es/common/List.js +4 -2
- package/dist/es/common/ListContainer.d.ts +1 -0
- package/dist/es/common/ListContainer.js +3 -1
- package/dist/es/common/ListDefaultItem.js +3 -1
- package/dist/es/common/ListFilter.js +10 -6
- package/dist/es/common/ListItem.d.ts +1 -1
- package/dist/es/common/ListItem.js +3 -1
- package/dist/es/common/MultiColumnList.d.ts +2 -1
- package/dist/es/common/Navigation.d.ts +1 -1
- package/dist/es/common/SearchBar.d.ts +2 -2
- package/dist/es/common/SearchBar.js +7 -3
- package/dist/es/common/VirtualScroll.d.ts +3 -3
- package/dist/es/common/VirtualScroll.js +6 -2
- package/dist/es/common/events.js +1 -0
- package/dist/es/common/filterDescriptor.js +1 -0
- package/dist/es/common/settings.d.ts +1 -1
- package/dist/es/common/utils.d.ts +6 -6
- package/dist/es/main.js +2 -0
- package/dist/es/messages/index.d.ts +2 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/AutoComplete/AutoComplete.d.ts +16 -14
- package/dist/npm/AutoComplete/AutoComplete.js +35 -30
- package/dist/npm/ComboBox/ComboBox.d.ts +14 -14
- package/dist/npm/ComboBox/ComboBox.js +61 -56
- package/dist/npm/DropDownList/DropDownList.d.ts +12 -14
- package/dist/npm/DropDownList/DropDownList.js +49 -44
- package/dist/npm/DropDownTree/DropDownTree.d.ts +1 -1
- package/dist/npm/DropDownTree/DropDownTree.js +41 -28
- package/dist/npm/DropDownTree/ListNoData.js +3 -1
- package/dist/npm/DropDownTree/useDropdownWidth.js +1 -0
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.d.ts +2 -2
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.js +18 -15
- package/dist/npm/MultiSelect/MultiSelect.d.ts +14 -16
- package/dist/npm/MultiSelect/MultiSelect.js +57 -43
- package/dist/npm/MultiSelect/TagList.d.ts +1 -0
- package/dist/npm/MultiSelect/TagList.js +4 -2
- package/dist/npm/MultiSelectTree/MultiSelectTree.d.ts +1 -1
- package/dist/npm/MultiSelectTree/MultiSelectTree.js +38 -25
- package/dist/npm/MultiSelectTree/utils.d.ts +4 -4
- package/dist/npm/MultiSelectTree/utils.js +24 -12
- package/dist/npm/common/ClearButton.js +5 -3
- package/dist/npm/common/DropDownBase.d.ts +6 -6
- package/dist/npm/common/DropDownBase.js +10 -8
- package/dist/npm/common/List.d.ts +2 -2
- package/dist/npm/common/List.js +10 -8
- package/dist/npm/common/ListContainer.d.ts +1 -0
- package/dist/npm/common/ListContainer.js +3 -1
- package/dist/npm/common/ListDefaultItem.js +5 -3
- package/dist/npm/common/ListFilter.js +11 -7
- package/dist/npm/common/ListItem.d.ts +1 -1
- package/dist/npm/common/ListItem.js +5 -3
- package/dist/npm/common/MultiColumnList.d.ts +2 -1
- package/dist/npm/common/MultiColumnList.js +3 -1
- package/dist/npm/common/Navigation.d.ts +1 -1
- package/dist/npm/common/Navigation.js +2 -1
- package/dist/npm/common/SearchBar.d.ts +2 -2
- package/dist/npm/common/SearchBar.js +7 -3
- package/dist/npm/common/VirtualScroll.d.ts +3 -3
- package/dist/npm/common/VirtualScroll.js +6 -2
- package/dist/npm/common/settings.d.ts +1 -1
- package/dist/npm/common/settings.js +1 -0
- package/dist/npm/common/utils.d.ts +6 -6
- package/dist/npm/common/utils.js +1 -0
- package/dist/npm/main.js +32 -18
- package/dist/npm/messages/index.d.ts +2 -2
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/systemjs/kendo-react-dropdowns.js +1 -1
- package/package.json +13 -13
|
@@ -24,9 +24,9 @@ export declare class AutoCompleteWithoutContext extends React.Component<AutoComp
|
|
|
24
24
|
* @hidden
|
|
25
25
|
*/
|
|
26
26
|
static propTypes: {
|
|
27
|
-
size: PropTypes.Requireable<"small" | "medium" | "large">;
|
|
28
|
-
rounded: PropTypes.Requireable<"small" | "medium" | "
|
|
29
|
-
fillMode: PropTypes.Requireable<"
|
|
27
|
+
size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
|
|
28
|
+
rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
|
|
29
|
+
fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
|
|
30
30
|
suggest: PropTypes.Requireable<string | boolean>;
|
|
31
31
|
placeholder: PropTypes.Requireable<string>;
|
|
32
32
|
value: PropTypes.Requireable<string>;
|
|
@@ -56,11 +56,13 @@ export declare class AutoCompleteWithoutContext extends React.Component<AutoComp
|
|
|
56
56
|
}>>;
|
|
57
57
|
popupClass: PropTypes.Requireable<string>;
|
|
58
58
|
className: PropTypes.Requireable<string>;
|
|
59
|
-
appendTo: PropTypes.Requireable<
|
|
59
|
+
appendTo: PropTypes.Requireable<Element>;
|
|
60
60
|
width: PropTypes.Requireable<string | number>;
|
|
61
61
|
height: PropTypes.Requireable<string | number>;
|
|
62
62
|
}>>;
|
|
63
|
-
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
63
|
+
onOpen: PropTypes.Requireable<(...args: any[]) => any>; /**
|
|
64
|
+
* @hidden
|
|
65
|
+
*/
|
|
64
66
|
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
67
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
66
68
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -75,9 +77,9 @@ export declare class AutoCompleteWithoutContext extends React.Component<AutoComp
|
|
|
75
77
|
* @hidden
|
|
76
78
|
*/
|
|
77
79
|
static defaultProps: {
|
|
78
|
-
size: "small" | "medium" | "large";
|
|
79
|
-
rounded: "small" | "medium" | "
|
|
80
|
-
fillMode: "
|
|
80
|
+
size: "small" | "medium" | "large" | null | undefined;
|
|
81
|
+
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
82
|
+
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
81
83
|
popupSettings: {
|
|
82
84
|
height: string;
|
|
83
85
|
};
|
|
@@ -102,27 +104,27 @@ export declare class AutoCompleteWithoutContext extends React.Component<AutoComp
|
|
|
102
104
|
/**
|
|
103
105
|
* @hidden
|
|
104
106
|
*/
|
|
105
|
-
|
|
107
|
+
get element(): HTMLSpanElement | null;
|
|
106
108
|
/**
|
|
107
109
|
* The value of the AutoComplete.
|
|
108
110
|
*/
|
|
109
|
-
|
|
111
|
+
get value(): string;
|
|
110
112
|
/**
|
|
111
113
|
* Gets the `name` property of the AutoComplete.
|
|
112
114
|
*/
|
|
113
|
-
|
|
115
|
+
get name(): string | undefined;
|
|
114
116
|
/**
|
|
115
117
|
* Represents the validity state into which the AutoComplete is set.
|
|
116
118
|
*/
|
|
117
|
-
|
|
119
|
+
get validity(): FormComponentValidity;
|
|
118
120
|
/**
|
|
119
121
|
* @hidden
|
|
120
122
|
*/
|
|
121
|
-
protected
|
|
123
|
+
protected get validityStyles(): boolean;
|
|
122
124
|
/**
|
|
123
125
|
* @hidden
|
|
124
126
|
*/
|
|
125
|
-
protected
|
|
127
|
+
protected get required(): boolean;
|
|
126
128
|
/**
|
|
127
129
|
* @hidden
|
|
128
130
|
*/
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -46,8 +48,10 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
46
48
|
*/
|
|
47
49
|
_this.state = {};
|
|
48
50
|
_this.base = new DropDownBase(_this);
|
|
51
|
+
_this._element = null;
|
|
49
52
|
_this._inputId = guid();
|
|
50
53
|
_this._suggested = '';
|
|
54
|
+
_this._input = null;
|
|
51
55
|
/**
|
|
52
56
|
* @hidden
|
|
53
57
|
*/
|
|
@@ -182,7 +186,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
182
186
|
get: function () {
|
|
183
187
|
return this._element;
|
|
184
188
|
},
|
|
185
|
-
enumerable:
|
|
189
|
+
enumerable: false,
|
|
186
190
|
configurable: true
|
|
187
191
|
});
|
|
188
192
|
Object.defineProperty(AutoCompleteWithoutContext.prototype, "value", {
|
|
@@ -204,7 +208,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
204
208
|
}
|
|
205
209
|
return '';
|
|
206
210
|
},
|
|
207
|
-
enumerable:
|
|
211
|
+
enumerable: false,
|
|
208
212
|
configurable: true
|
|
209
213
|
});
|
|
210
214
|
Object.defineProperty(AutoCompleteWithoutContext.prototype, "name", {
|
|
@@ -214,7 +218,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
214
218
|
get: function () {
|
|
215
219
|
return this.props.name;
|
|
216
220
|
},
|
|
217
|
-
enumerable:
|
|
221
|
+
enumerable: false,
|
|
218
222
|
configurable: true
|
|
219
223
|
});
|
|
220
224
|
Object.defineProperty(AutoCompleteWithoutContext.prototype, "validity", {
|
|
@@ -233,7 +237,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
233
237
|
valueMissing: this.value === null
|
|
234
238
|
};
|
|
235
239
|
},
|
|
236
|
-
enumerable:
|
|
240
|
+
enumerable: false,
|
|
237
241
|
configurable: true
|
|
238
242
|
});
|
|
239
243
|
Object.defineProperty(AutoCompleteWithoutContext.prototype, "validityStyles", {
|
|
@@ -245,7 +249,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
245
249
|
? this.props.validityStyles
|
|
246
250
|
: AutoCompleteWithoutContext.defaultProps.validityStyles;
|
|
247
251
|
},
|
|
248
|
-
enumerable:
|
|
252
|
+
enumerable: false,
|
|
249
253
|
configurable: true
|
|
250
254
|
});
|
|
251
255
|
Object.defineProperty(AutoCompleteWithoutContext.prototype, "required", {
|
|
@@ -257,7 +261,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
257
261
|
? this.props.required
|
|
258
262
|
: AutoCompleteWithoutContext.defaultProps.required;
|
|
259
263
|
},
|
|
260
|
-
enumerable:
|
|
264
|
+
enumerable: false,
|
|
261
265
|
configurable: true
|
|
262
266
|
});
|
|
263
267
|
/**
|
|
@@ -289,8 +293,8 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
289
293
|
* @hidden
|
|
290
294
|
*/
|
|
291
295
|
AutoCompleteWithoutContext.prototype.render = function () {
|
|
292
|
-
var _this = this;
|
|
293
296
|
var _a;
|
|
297
|
+
var _this = this;
|
|
294
298
|
var _b = this.props, dir = _b.dir, disabled = _b.disabled, label = _b.label, className = _b.className, style = _b.style, loading = _b.loading, suggest = _b.suggest, size = _b.size, rounded = _b.rounded, fillMode = _b.fillMode;
|
|
295
299
|
var isValid = !this.validityStyles || this.validity.valid;
|
|
296
300
|
var base = this.base;
|
|
@@ -301,9 +305,9 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
301
305
|
this._suggested = suggest;
|
|
302
306
|
}
|
|
303
307
|
var autoComplete = (React.createElement("span", { className: classNames('k-autocomplete k-input', className, (_a = {},
|
|
304
|
-
_a["k-input-"
|
|
305
|
-
_a["k-rounded-"
|
|
306
|
-
_a["k-input-"
|
|
308
|
+
_a["k-input-".concat(sizeMap[size] || size)] = size,
|
|
309
|
+
_a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
|
|
310
|
+
_a["k-input-".concat(fillMode)] = fillMode,
|
|
307
311
|
_a['k-invalid'] = !isValid,
|
|
308
312
|
_a['k-loading'] = loading,
|
|
309
313
|
_a['k-required'] = this.required,
|
|
@@ -313,7 +317,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
313
317
|
base.wrapper = element;
|
|
314
318
|
}, style: !label
|
|
315
319
|
? style
|
|
316
|
-
: __assign({}, style, { width: undefined }), dir: dir },
|
|
320
|
+
: __assign(__assign({}, style), { width: undefined }), dir: dir },
|
|
317
321
|
this.renderSearchBar(value || '', id),
|
|
318
322
|
loading && React.createElement("span", { className: "k-icon k-i-loading k-input-loading-icon" }),
|
|
319
323
|
renderClearButton && !loading && React.createElement(ClearButton, { onClick: this.clearButtonClick, key: "clearbutton" }),
|
|
@@ -380,7 +384,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
380
384
|
anchor: this.element,
|
|
381
385
|
show: opened,
|
|
382
386
|
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {},
|
|
383
|
-
_a["k-list-"
|
|
387
|
+
_a["k-list-".concat(sizeMap[size] || size)] = size,
|
|
384
388
|
_a)),
|
|
385
389
|
className: popupSettings.className,
|
|
386
390
|
appendTo: popupSettings.appendTo
|
|
@@ -435,11 +439,11 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
|
|
|
435
439
|
/**
|
|
436
440
|
* @hidden
|
|
437
441
|
*/
|
|
438
|
-
AutoCompleteWithoutContext.propTypes = __assign({}, DropDownBase.basicPropTypes, { size: PropTypes.oneOf([null, 'small', 'medium', 'large']), rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']), fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline']), suggest: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), placeholder: PropTypes.string, value: PropTypes.string, defaultValue: PropTypes.string, validationMessage: PropTypes.string, required: PropTypes.bool, readonly: PropTypes.bool, clearButton: PropTypes.bool, valueRender: PropTypes.func, id: PropTypes.string, ariaLabelledBy: PropTypes.string, ariaDescribedBy: PropTypes.string });
|
|
442
|
+
AutoCompleteWithoutContext.propTypes = __assign(__assign({}, DropDownBase.basicPropTypes), { size: PropTypes.oneOf([null, 'small', 'medium', 'large']), rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']), fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline']), suggest: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), placeholder: PropTypes.string, value: PropTypes.string, defaultValue: PropTypes.string, validationMessage: PropTypes.string, required: PropTypes.bool, readonly: PropTypes.bool, clearButton: PropTypes.bool, valueRender: PropTypes.func, id: PropTypes.string, ariaLabelledBy: PropTypes.string, ariaDescribedBy: PropTypes.string });
|
|
439
443
|
/**
|
|
440
444
|
* @hidden
|
|
441
445
|
*/
|
|
442
|
-
AutoCompleteWithoutContext.defaultProps = __assign({}, DropDownBase.defaultProps, { size: 'medium', rounded: 'medium', fillMode: 'solid' });
|
|
446
|
+
AutoCompleteWithoutContext.defaultProps = __assign(__assign({}, DropDownBase.defaultProps), { size: 'medium', rounded: 'medium', fillMode: 'solid' });
|
|
443
447
|
return AutoCompleteWithoutContext;
|
|
444
448
|
}(React.Component));
|
|
445
449
|
export { AutoCompleteWithoutContext };
|
|
@@ -24,9 +24,9 @@ export declare class ComboBoxWithoutContext extends React.Component<ComboBoxProp
|
|
|
24
24
|
* @hidden
|
|
25
25
|
*/
|
|
26
26
|
static propTypes: {
|
|
27
|
-
size: PropTypes.Requireable<"small" | "medium" | "large">;
|
|
28
|
-
rounded: PropTypes.Requireable<"small" | "medium" | "
|
|
29
|
-
fillMode: PropTypes.Requireable<"
|
|
27
|
+
size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
|
|
28
|
+
rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
|
|
29
|
+
fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
|
|
30
30
|
dataItemKey: PropTypes.Requireable<string>;
|
|
31
31
|
groupField: PropTypes.Requireable<string>;
|
|
32
32
|
suggest: PropTypes.Requireable<boolean>;
|
|
@@ -69,7 +69,7 @@ export declare class ComboBoxWithoutContext extends React.Component<ComboBoxProp
|
|
|
69
69
|
}>>;
|
|
70
70
|
popupClass: PropTypes.Requireable<string>;
|
|
71
71
|
className: PropTypes.Requireable<string>;
|
|
72
|
-
appendTo: PropTypes.Requireable<
|
|
72
|
+
appendTo: PropTypes.Requireable<Element>;
|
|
73
73
|
width: PropTypes.Requireable<string | number>;
|
|
74
74
|
height: PropTypes.Requireable<string | number>;
|
|
75
75
|
}>>;
|
|
@@ -88,9 +88,9 @@ export declare class ComboBoxWithoutContext extends React.Component<ComboBoxProp
|
|
|
88
88
|
* @hidden
|
|
89
89
|
*/
|
|
90
90
|
static defaultProps: {
|
|
91
|
-
size: "small" | "medium" | "large";
|
|
92
|
-
rounded: "small" | "medium" | "
|
|
93
|
-
fillMode: "
|
|
91
|
+
size: "small" | "medium" | "large" | null | undefined;
|
|
92
|
+
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
93
|
+
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
94
94
|
allowCustom: boolean;
|
|
95
95
|
clearButton: boolean;
|
|
96
96
|
required: boolean;
|
|
@@ -119,28 +119,28 @@ export declare class ComboBoxWithoutContext extends React.Component<ComboBoxProp
|
|
|
119
119
|
/**
|
|
120
120
|
* @hidden
|
|
121
121
|
*/
|
|
122
|
-
|
|
122
|
+
get element(): HTMLSpanElement | null;
|
|
123
123
|
/**
|
|
124
124
|
* The value of the ComboBox.
|
|
125
125
|
*/
|
|
126
|
-
|
|
126
|
+
get value(): any;
|
|
127
127
|
/**
|
|
128
128
|
* The index of the selected item.
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
get index(): number;
|
|
131
131
|
/**
|
|
132
132
|
* Gets the `name` property of the ComboBox.
|
|
133
133
|
*/
|
|
134
|
-
|
|
134
|
+
get name(): string | undefined;
|
|
135
135
|
/**
|
|
136
136
|
* Represents the validity state into which the component is set.
|
|
137
137
|
*/
|
|
138
|
-
|
|
139
|
-
protected
|
|
138
|
+
get validity(): FormComponentValidity;
|
|
139
|
+
protected get validityStyles(): boolean;
|
|
140
140
|
/**
|
|
141
141
|
* @hidden
|
|
142
142
|
*/
|
|
143
|
-
protected
|
|
143
|
+
protected get required(): boolean;
|
|
144
144
|
/**
|
|
145
145
|
* @hidden
|
|
146
146
|
*/
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -46,8 +48,10 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
46
48
|
*/
|
|
47
49
|
_this.state = {};
|
|
48
50
|
_this.base = new DropDownBase(_this);
|
|
51
|
+
_this._element = null;
|
|
49
52
|
_this._inputId = guid();
|
|
50
53
|
_this._suggested = '';
|
|
54
|
+
_this._input = null;
|
|
51
55
|
_this.itemHeight = 0;
|
|
52
56
|
/**
|
|
53
57
|
* @hidden
|
|
@@ -223,7 +227,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
223
227
|
get: function () {
|
|
224
228
|
return this._element;
|
|
225
229
|
},
|
|
226
|
-
enumerable:
|
|
230
|
+
enumerable: false,
|
|
227
231
|
configurable: true
|
|
228
232
|
});
|
|
229
233
|
Object.defineProperty(ComboBoxWithoutContext.prototype, "value", {
|
|
@@ -245,7 +249,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
245
249
|
}
|
|
246
250
|
return undefined;
|
|
247
251
|
},
|
|
248
|
-
enumerable:
|
|
252
|
+
enumerable: false,
|
|
249
253
|
configurable: true
|
|
250
254
|
});
|
|
251
255
|
Object.defineProperty(ComboBoxWithoutContext.prototype, "index", {
|
|
@@ -258,7 +262,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
258
262
|
// TO DO: deprecate it!
|
|
259
263
|
return data.findIndex(function (i) { return areSame(i, value, dataItemKey); });
|
|
260
264
|
},
|
|
261
|
-
enumerable:
|
|
265
|
+
enumerable: false,
|
|
262
266
|
configurable: true
|
|
263
267
|
});
|
|
264
268
|
Object.defineProperty(ComboBoxWithoutContext.prototype, "name", {
|
|
@@ -268,7 +272,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
268
272
|
get: function () {
|
|
269
273
|
return this.props.name;
|
|
270
274
|
},
|
|
271
|
-
enumerable:
|
|
275
|
+
enumerable: false,
|
|
272
276
|
configurable: true
|
|
273
277
|
});
|
|
274
278
|
Object.defineProperty(ComboBoxWithoutContext.prototype, "validity", {
|
|
@@ -288,7 +292,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
288
292
|
valueMissing: this.value === null
|
|
289
293
|
};
|
|
290
294
|
},
|
|
291
|
-
enumerable:
|
|
295
|
+
enumerable: false,
|
|
292
296
|
configurable: true
|
|
293
297
|
});
|
|
294
298
|
Object.defineProperty(ComboBoxWithoutContext.prototype, "validityStyles", {
|
|
@@ -297,7 +301,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
297
301
|
? this.props.validityStyles
|
|
298
302
|
: ComboBoxWithoutContext.defaultProps.validityStyles;
|
|
299
303
|
},
|
|
300
|
-
enumerable:
|
|
304
|
+
enumerable: false,
|
|
301
305
|
configurable: true
|
|
302
306
|
});
|
|
303
307
|
Object.defineProperty(ComboBoxWithoutContext.prototype, "required", {
|
|
@@ -309,7 +313,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
309
313
|
? this.props.required
|
|
310
314
|
: ComboBoxWithoutContext.defaultProps.required;
|
|
311
315
|
},
|
|
312
|
-
enumerable:
|
|
316
|
+
enumerable: false,
|
|
313
317
|
configurable: true
|
|
314
318
|
});
|
|
315
319
|
/**
|
|
@@ -374,21 +378,21 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
374
378
|
vs.pageSize = virtual.pageSize;
|
|
375
379
|
}
|
|
376
380
|
var combobox = (React.createElement("span", { className: classNames('k-combobox k-input', (_a = {},
|
|
377
|
-
_a["k-input-"
|
|
378
|
-
_a["k-rounded-"
|
|
379
|
-
_a["k-input-"
|
|
381
|
+
_a["k-input-".concat(sizeMap[size] || size)] = size,
|
|
382
|
+
_a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
|
|
383
|
+
_a["k-input-".concat(fillMode)] = fillMode,
|
|
380
384
|
_a['k-invalid'] = !isValid,
|
|
381
385
|
_a['k-loading'] = loading,
|
|
382
386
|
_a['k-required'] = this.required,
|
|
383
387
|
_a['k-disabled'] = disabled,
|
|
384
|
-
_a), className), ref: this.componentRef, style: !label ? style : __assign({}, style, { width: undefined }), dir: dir },
|
|
388
|
+
_a), className), ref: this.componentRef, style: !label ? style : __assign(__assign({}, style), { width: undefined }), dir: dir },
|
|
385
389
|
this.renderSearchBar(inputText || '', id),
|
|
386
390
|
renderClearButton && !loading && React.createElement(ClearButton, { onClick: this.clearButtonClick, key: "clearbutton" }),
|
|
387
391
|
loading && React.createElement("span", { className: "k-icon k-i-loading k-input-loading-icon", key: "loading" }),
|
|
388
392
|
React.createElement("button", { tabIndex: -1, type: "button", className: classNames('k-input-button k-button k-icon-button', (_b = {},
|
|
389
|
-
_b["k-button-"
|
|
390
|
-
_b["k-button-"
|
|
391
|
-
_b["k-button-"
|
|
393
|
+
_b["k-button-".concat(sizeMap[size] || size)] = size,
|
|
394
|
+
_b["k-button-".concat(fillMode)] = fillMode,
|
|
395
|
+
_b["k-button-".concat(fillMode, "-base")] = fillMode,
|
|
392
396
|
_b)), onClick: this.toggleBtnClick, onMouseDown: function (e) { return e.preventDefault(); } },
|
|
393
397
|
React.createElement("span", { className: classNames('k-button-icon k-icon k-i-arrow-s', iconClassName) })),
|
|
394
398
|
this.renderListContainer()));
|
|
@@ -527,10 +531,10 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
527
531
|
}, dir: dir !== undefined ? dir : this.base.dirCalculated, itemsCount: [data.length] },
|
|
528
532
|
React.createElement("div", { className: classNames((_a = {},
|
|
529
533
|
_a['k-list'] = !list,
|
|
530
|
-
_a["k-list-"
|
|
534
|
+
_a["k-list-".concat(sizeMap[size] || size)] = !list && size,
|
|
531
535
|
_a['k-virtual-list'] = virtual,
|
|
532
536
|
_a['k-data-table'] = list,
|
|
533
|
-
_a["k-table-"
|
|
537
|
+
_a["k-table-".concat(sizeMap[size] || size)] = list && size,
|
|
534
538
|
_a)) },
|
|
535
539
|
header && React.createElement("div", { className: "k-table-header" }, header),
|
|
536
540
|
!list && group && React.createElement("div", { className: "k-list-group-sticky-header" }, group),
|
|
@@ -538,15 +542,15 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
538
542
|
footer && React.createElement("div", { className: "k-list-footer" }, footer))));
|
|
539
543
|
};
|
|
540
544
|
ComboBoxWithoutContext.prototype.renderList = function () {
|
|
541
|
-
var _this = this;
|
|
542
545
|
var _a;
|
|
546
|
+
var _this = this;
|
|
543
547
|
var base = this.base;
|
|
544
548
|
var _b = this.props, textField = _b.textField, dataItemKey = _b.dataItemKey, listNoDataRender = _b.listNoDataRender, itemRender = _b.itemRender, _c = _b.data, data = _c === void 0 ? [] : _c, _d = _b.virtual, virtual = _d === void 0 ? { skip: 0 } : _d;
|
|
545
549
|
var popupSettings = base.getPopupSettings();
|
|
546
550
|
var vs = base.vs;
|
|
547
551
|
var skip = virtual.skip;
|
|
548
552
|
var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
|
|
549
|
-
var translate = "translateY("
|
|
553
|
+
var translate = "translateY(".concat(vs.translate, "px)");
|
|
550
554
|
var focusedIndex = opened ? this.getFocusedIndex() : undefined;
|
|
551
555
|
var text = this.props.filter !== undefined ? this.props.filter : this.state.text;
|
|
552
556
|
var selectedItemText = getItemValue(this.value, textField);
|
|
@@ -566,7 +570,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
566
570
|
if (this._suggested && !areSame(this._valueOnDidUpdate, value, dataItemKey)) {
|
|
567
571
|
this._suggested = '';
|
|
568
572
|
}
|
|
569
|
-
return (React.createElement(SearchBar, { id: id, placeholder: placeholder, tabIndex: tabIndex || undefined, accessKey: this.props.accessKey, value: text + this._suggested, suggestedText: this._suggested, ref: function (el) { return _this._input = el && el.input; }, onKeyDown: this.onInputKeyDown, onChange: this.inputOnChange, onFocus: this.base.handleFocus, onBlur: this.handleBlur, disabled: disabled, expanded: opened, owns: this.base.listBoxId, activedescendant: "option-"
|
|
573
|
+
return (React.createElement(SearchBar, { id: id, placeholder: placeholder, tabIndex: tabIndex || undefined, accessKey: this.props.accessKey, value: text + this._suggested, suggestedText: this._suggested, ref: function (el) { return _this._input = el && el.input; }, onKeyDown: this.onInputKeyDown, onChange: this.inputOnChange, onFocus: this.base.handleFocus, onBlur: this.handleBlur, disabled: disabled, expanded: opened, owns: this.base.listBoxId, activedescendant: "option-".concat(this.base.guid, "-").concat(selectedIndex + virtual.skip), role: "combobox", ariaLabelledBy: this.props.ariaLabelledBy, ariaDescribedBy: this.props.ariaDescribedBy, render: this.props.valueRender }));
|
|
570
574
|
};
|
|
571
575
|
ComboBoxWithoutContext.prototype.triggerOnChange = function (item, state) {
|
|
572
576
|
var value = this.value;
|
|
@@ -605,11 +609,11 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
|
|
|
605
609
|
/**
|
|
606
610
|
* @hidden
|
|
607
611
|
*/
|
|
608
|
-
ComboBoxWithoutContext.propTypes = __assign({}, DropDownBase.propTypes, { size: PropTypes.oneOf([null, 'small', 'medium', 'large']), rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']), fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline']), dataItemKey: PropTypes.string, groupField: PropTypes.string, suggest: PropTypes.bool, placeholder: PropTypes.string, allowCustom: PropTypes.bool, clearButton: PropTypes.bool, iconClassName: PropTypes.string, validationMessage: PropTypes.string, required: PropTypes.bool, id: PropTypes.string, ariaLabelledBy: PropTypes.string, ariaDescribedBy: PropTypes.string, list: PropTypes.any, valueRender: PropTypes.func });
|
|
612
|
+
ComboBoxWithoutContext.propTypes = __assign(__assign({}, DropDownBase.propTypes), { size: PropTypes.oneOf([null, 'small', 'medium', 'large']), rounded: PropTypes.oneOf([null, 'small', 'medium', 'large', 'full']), fillMode: PropTypes.oneOf([null, 'solid', 'flat', 'outline']), dataItemKey: PropTypes.string, groupField: PropTypes.string, suggest: PropTypes.bool, placeholder: PropTypes.string, allowCustom: PropTypes.bool, clearButton: PropTypes.bool, iconClassName: PropTypes.string, validationMessage: PropTypes.string, required: PropTypes.bool, id: PropTypes.string, ariaLabelledBy: PropTypes.string, ariaDescribedBy: PropTypes.string, list: PropTypes.any, valueRender: PropTypes.func });
|
|
609
613
|
/**
|
|
610
614
|
* @hidden
|
|
611
615
|
*/
|
|
612
|
-
ComboBoxWithoutContext.defaultProps = __assign({}, DropDownBase.defaultProps, { size: 'medium', rounded: 'medium', fillMode: 'solid', allowCustom: false, clearButton: true, required: false });
|
|
616
|
+
ComboBoxWithoutContext.defaultProps = __assign(__assign({}, DropDownBase.defaultProps), { size: 'medium', rounded: 'medium', fillMode: 'solid', allowCustom: false, clearButton: true, required: false });
|
|
613
617
|
return ComboBoxWithoutContext;
|
|
614
618
|
}(React.Component));
|
|
615
619
|
export { ComboBoxWithoutContext };
|
|
@@ -25,9 +25,7 @@ export declare class DropDownListWithoutContext extends React.Component<DropDown
|
|
|
25
25
|
virtual: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
26
|
pageSize: PropTypes.Validator<number>;
|
|
27
27
|
skip: PropTypes.Validator<number>;
|
|
28
|
-
total: PropTypes.Validator<number>;
|
|
29
|
-
* The value of the DropDownList.
|
|
30
|
-
*/
|
|
28
|
+
total: PropTypes.Validator<number>;
|
|
31
29
|
}>>;
|
|
32
30
|
onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
31
|
onPageChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -48,7 +46,7 @@ export declare class DropDownListWithoutContext extends React.Component<DropDown
|
|
|
48
46
|
}>>;
|
|
49
47
|
popupClass: PropTypes.Requireable<string>;
|
|
50
48
|
className: PropTypes.Requireable<string>;
|
|
51
|
-
appendTo: PropTypes.Requireable<
|
|
49
|
+
appendTo: PropTypes.Requireable<Element>;
|
|
52
50
|
width: PropTypes.Requireable<string | number>;
|
|
53
51
|
height: PropTypes.Requireable<string | number>;
|
|
54
52
|
}>>;
|
|
@@ -82,9 +80,9 @@ export declare class DropDownListWithoutContext extends React.Component<DropDown
|
|
|
82
80
|
*/
|
|
83
81
|
static defaultProps: {
|
|
84
82
|
required: boolean;
|
|
85
|
-
size: "small" | "medium" | "large";
|
|
86
|
-
rounded: "small" | "medium" | "
|
|
87
|
-
fillMode: "
|
|
83
|
+
size: "small" | "medium" | "large" | null | undefined;
|
|
84
|
+
rounded: "small" | "medium" | "full" | "large" | null | undefined;
|
|
85
|
+
fillMode: "flat" | "outline" | "solid" | null | undefined;
|
|
88
86
|
popupSettings: {
|
|
89
87
|
height: string;
|
|
90
88
|
};
|
|
@@ -114,28 +112,28 @@ export declare class DropDownListWithoutContext extends React.Component<DropDown
|
|
|
114
112
|
/**
|
|
115
113
|
* @hidden
|
|
116
114
|
*/
|
|
117
|
-
|
|
115
|
+
get element(): HTMLSpanElement | null;
|
|
118
116
|
/**
|
|
119
117
|
* The value of the DropDownList.
|
|
120
118
|
*/
|
|
121
|
-
|
|
119
|
+
get value(): any;
|
|
122
120
|
/**
|
|
123
121
|
* The index of the selected item.
|
|
124
122
|
*/
|
|
125
|
-
|
|
123
|
+
get index(): number;
|
|
126
124
|
/**
|
|
127
125
|
* Gets the `name` property of the DropDownList.
|
|
128
126
|
*/
|
|
129
|
-
|
|
127
|
+
get name(): string | undefined;
|
|
130
128
|
/**
|
|
131
129
|
* Represents the validity state into which the DropDownList is set.
|
|
132
130
|
*/
|
|
133
|
-
|
|
134
|
-
protected
|
|
131
|
+
get validity(): FormComponentValidity;
|
|
132
|
+
protected get validityStyles(): boolean;
|
|
135
133
|
/**
|
|
136
134
|
* @hidden
|
|
137
135
|
*/
|
|
138
|
-
protected
|
|
136
|
+
protected get required(): boolean;
|
|
139
137
|
/**
|
|
140
138
|
* @hidden
|
|
141
139
|
*/
|