react-ui-basics 0.0.161 → 0.0.164
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/Animated.js +1 -0
- package/AutocompleteSelect.js +17 -16
- package/Button.js +4 -3
- package/Checkbox.js +4 -3
- package/CircleProgress.js +1 -0
- package/DNDContainer.js +2 -1
- package/DNDDraggable.js +1 -1
- package/Dialog.js +3 -2
- package/DropFileInput.js +1 -0
- package/DroppableList.js +1 -0
- package/Dropzone.js +4 -3
- package/FilteredList.d.ts +61 -0
- package/FilteredList.js +138 -234
- package/FloatingActionButton.js +3 -2
- package/FormUploadProgress.js +2 -1
- package/ImageGallery.js +7 -6
- package/Modal.js +3 -2
- package/ModalMenu.js +4 -3
- package/ReactConstants.d.ts +3 -4
- package/ReactConstants.js +6 -4
- package/ReadyListener.js +1 -1
- package/Scrollable.js +3 -2
- package/ScrollableTable.js +1 -0
- package/Snackbar.js +1 -0
- package/SpinningProgress.js +1 -0
- package/Switch.js +7 -6
- package/Table.d.ts +9 -2
- package/Table.js +39 -45
- package/TextField.js +8 -7
- package/Tools.d.ts +1 -1
- package/Tools.js +4 -1
- package/bundle.css +495 -495
- package/package.json +1 -1
- package/router/Link.js +1 -1
- package/store/Store.js +1 -0
- package/store/Store.js.map +1 -1
package/Animated.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, createClass as _cre
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './Animated.css';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
import { setOf, clearTimeout, allPropsExcept, classNames, requestAnimationFrame, setTimeout } from './Tools.js';
|
package/AutocompleteSelect.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './AutocompleteSelect.css';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
@@ -26,11 +27,11 @@ var DummyChild = function DummyChild(_ref) {
|
|
|
26
27
|
var id = _ref.id,
|
|
27
28
|
label = _ref.label,
|
|
28
29
|
dataConsumer = _ref.dataConsumer,
|
|
29
|
-
onClick = _ref
|
|
30
|
+
onClick = _ref[ReactConstants[6]];
|
|
30
31
|
orNoop(dataConsumer)(label || id);
|
|
31
32
|
return ReactCreateElement("div", {
|
|
32
33
|
[ReactConstants[5]]: "DummyChild",
|
|
33
|
-
|
|
34
|
+
[ReactConstants[6]]: onClick
|
|
34
35
|
}, label || id);
|
|
35
36
|
};
|
|
36
37
|
var prepareSelected = function prepareSelected(value) {
|
|
@@ -109,7 +110,7 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
109
110
|
required = _this$props2.required,
|
|
110
111
|
allowCustom = _this$props2.allowCustom,
|
|
111
112
|
onSelect = _this$props2.onSelect,
|
|
112
|
-
onChange = _this$props2
|
|
113
|
+
onChange = _this$props2[ReactConstants[7]],
|
|
113
114
|
defaultValue = _this$props2["default"];
|
|
114
115
|
var _this$state = __state(_this),
|
|
115
116
|
filterValue = _this$state.filterValue,
|
|
@@ -150,7 +151,7 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
150
151
|
filterValue: ''
|
|
151
152
|
});
|
|
152
153
|
orNoop(__props(_this).onSelect)(null);
|
|
153
|
-
orNoop(__props(_this)
|
|
154
|
+
orNoop(__props(_this)[ReactConstants[7]])([]);
|
|
154
155
|
_this.initSelected(__props(_this), __state(_this));
|
|
155
156
|
};
|
|
156
157
|
_this.remove = function (id) {
|
|
@@ -160,9 +161,9 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
160
161
|
});
|
|
161
162
|
delete result.selected[id];
|
|
162
163
|
_this.setState(result);
|
|
163
|
-
orNoop(__props(_this)
|
|
164
|
+
orNoop(__props(_this)[ReactConstants[7]])(Object.values(result.selected));
|
|
164
165
|
};
|
|
165
|
-
_this
|
|
166
|
+
_this[ReactConstants[7]] = function (event) {
|
|
166
167
|
var value = __target(event).value;
|
|
167
168
|
_this.setState({
|
|
168
169
|
filterValue: value
|
|
@@ -295,7 +296,7 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
295
296
|
}, label && ReactCreateElement("label", {
|
|
296
297
|
[ReactConstants[5]]: classNames("label", (hasSelected || filterValue) && 'active', hasSelected && 'hasSelected'),
|
|
297
298
|
htmlFor: 'f-' + id,
|
|
298
|
-
|
|
299
|
+
[ReactConstants[6]]: function onClick() {
|
|
299
300
|
if (mode === MODE_MULTIPLE_MINI_INLINE || !isActive) {
|
|
300
301
|
toggle();
|
|
301
302
|
}
|
|
@@ -304,7 +305,7 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
304
305
|
[ReactConstants[5]]: "arrow"
|
|
305
306
|
})), (!isActive || mode === MODE_MULTIPLE || mode === MODE_INLINE_MULTIPLE || mode === MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE_AUTO || !withFilter) && !inlineSelected && hasSelected && ReactCreateElement("div", {
|
|
306
307
|
[ReactConstants[5]]: classNames('selected', !label && 'nolabel', (mode === MODE_MULTIPLE_MINI || mode === MODE_MINI || mode === MODE_MULTIPLE_MINI_INLINE) && 'clickable', selectedMode),
|
|
307
|
-
|
|
308
|
+
[ReactConstants[6]]: toggle
|
|
308
309
|
}, selectedMode === 'full' && selectedIds.map(function (id) {
|
|
309
310
|
return ReactCreateElement("div", {
|
|
310
311
|
[ReactConstants[5]]: "value",
|
|
@@ -312,10 +313,10 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
312
313
|
}, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
|
|
313
314
|
id: id,
|
|
314
315
|
label: getLabel(labels, id),
|
|
315
|
-
|
|
316
|
+
[ReactConstants[6]]: setActive
|
|
316
317
|
})), ReactCreateElement("div", {
|
|
317
318
|
[ReactConstants[5]]: "button remove",
|
|
318
|
-
|
|
319
|
+
[ReactConstants[6]]: function onClick(e) {
|
|
319
320
|
stopPropagation(e);
|
|
320
321
|
_this3.remove(id);
|
|
321
322
|
}
|
|
@@ -326,14 +327,14 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
326
327
|
}, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
|
|
327
328
|
id: id,
|
|
328
329
|
label: getLabel(labels, id),
|
|
329
|
-
|
|
330
|
+
[ReactConstants[6]]: setActive
|
|
330
331
|
})), id !== selectedIds[__length(selectedIds) - 1] && ', ');
|
|
331
332
|
}), !label && withArrow && ReactCreateElement("span", {
|
|
332
333
|
[ReactConstants[5]]: "arrow"
|
|
333
334
|
}), withReset && ReactCreateElement(Button, {
|
|
334
335
|
[ReactConstants[5]]: "reset",
|
|
335
336
|
raised: false,
|
|
336
|
-
|
|
337
|
+
[ReactConstants[6]]: this.clean
|
|
337
338
|
}, removeIcon)), inlineSelected && hasSelected && ReactCreateElement(React.Fragment, null, selectedMode === 'full' && selectedIds.map(function (id) {
|
|
338
339
|
return ReactCreateElement("div", {
|
|
339
340
|
[ReactConstants[5]]: "value",
|
|
@@ -341,10 +342,10 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
341
342
|
}, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
|
|
342
343
|
id: id,
|
|
343
344
|
label: getLabel(labels, id),
|
|
344
|
-
|
|
345
|
+
[ReactConstants[6]]: setActive
|
|
345
346
|
})), ReactCreateElement("div", {
|
|
346
347
|
[ReactConstants[5]]: "button remove",
|
|
347
|
-
|
|
348
|
+
[ReactConstants[6]]: function onClick(e) {
|
|
348
349
|
stopPropagation(e);
|
|
349
350
|
_this3.remove(id);
|
|
350
351
|
}
|
|
@@ -355,7 +356,7 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
355
356
|
}, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
|
|
356
357
|
id: id,
|
|
357
358
|
label: getLabel(labels, id),
|
|
358
|
-
|
|
359
|
+
[ReactConstants[6]]: setActive
|
|
359
360
|
})), id !== selectedIds[__length(selectedIds) - 1] && ', ');
|
|
360
361
|
})), (isActive || !hasSelected && mode !== MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE || mode === MODE_MULTIPLE_AUTO && __length(selectedIds) > 1 || mode === MODE_INLINE_MULTIPLE) && ReactCreateElement("div", {
|
|
361
362
|
[ReactConstants[5]]: "input",
|
|
@@ -367,7 +368,7 @@ var AutocompleteSelect = function (_PureComponent) {
|
|
|
367
368
|
focused: isActive,
|
|
368
369
|
value: filterValue,
|
|
369
370
|
label: inputLabel,
|
|
370
|
-
|
|
371
|
+
[ReactConstants[7]]: this[ReactConstants[7]],
|
|
371
372
|
onFocus: function onFocus(e) {
|
|
372
373
|
return _this3.setState({
|
|
373
374
|
isActive: true
|
package/Button.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './Button.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import { classNames, createRef, DOCUMENT, addEventListener, orNoop } from './Tools.js';
|
|
@@ -51,7 +52,7 @@ var Button = function (_PureComponent) {
|
|
|
51
52
|
children = _props[ReactConstants[4]],
|
|
52
53
|
type = _props.type,
|
|
53
54
|
className = _props[ReactConstants[5]],
|
|
54
|
-
onClick = _props
|
|
55
|
+
onClick = _props[ReactConstants[6]],
|
|
55
56
|
flat = _props.flat,
|
|
56
57
|
_props$raised = _props.raised,
|
|
57
58
|
raised = _props$raised === void 0 ? !flat : _props$raised,
|
|
@@ -64,7 +65,7 @@ var Button = function (_PureComponent) {
|
|
|
64
65
|
disabled: disabled,
|
|
65
66
|
style: style,
|
|
66
67
|
type: type,
|
|
67
|
-
|
|
68
|
+
[ReactConstants[6]]: onClick,
|
|
68
69
|
onMouseDown: onMouseDown,
|
|
69
70
|
ref: el
|
|
70
71
|
}, children, ReactCreateElement("span", {
|
|
@@ -85,7 +86,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
85
86
|
withRipple: PropTypes.bool,
|
|
86
87
|
type: PropTypes.oneOf(['button', 'submit', 'reset']),
|
|
87
88
|
[ReactConstants[5]]: PropTypes.string,
|
|
88
|
-
|
|
89
|
+
[ReactConstants[6]]: PropTypes.func,
|
|
89
90
|
onFocus: PropTypes.func,
|
|
90
91
|
style: PropTypes.object
|
|
91
92
|
};
|
package/Checkbox.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './Checkbox.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import { classNames, getRandomId } from './Tools.js';
|
|
@@ -23,7 +24,7 @@ var Checkbox = function (_PureComponent) {
|
|
|
23
24
|
var _props = props(),
|
|
24
25
|
label = _props.label,
|
|
25
26
|
name = _props.name,
|
|
26
|
-
onChange = _props
|
|
27
|
+
onChange = _props[ReactConstants[7]],
|
|
27
28
|
value = __value(_props),
|
|
28
29
|
className = _props[ReactConstants[5]],
|
|
29
30
|
disabled = _props.disabled;
|
|
@@ -34,7 +35,7 @@ var Checkbox = function (_PureComponent) {
|
|
|
34
35
|
name: name,
|
|
35
36
|
id: id,
|
|
36
37
|
type: "checkbox",
|
|
37
|
-
|
|
38
|
+
[ReactConstants[7]]: onChange,
|
|
38
39
|
checked: value,
|
|
39
40
|
disabled: disabled
|
|
40
41
|
}), ReactCreateElement("label", {
|
|
@@ -47,7 +48,7 @@ var Checkbox = function (_PureComponent) {
|
|
|
47
48
|
}(PureComponent);
|
|
48
49
|
if (process.env.NODE_ENV !== 'production') {
|
|
49
50
|
Checkbox.propTypes = {
|
|
50
|
-
|
|
51
|
+
[ReactConstants[7]]: PropTypes.func.isRequired,
|
|
51
52
|
value: PropTypes.bool,
|
|
52
53
|
disabled: PropTypes.bool,
|
|
53
54
|
[ReactConstants[5]]: PropTypes.string,
|
package/CircleProgress.js
CHANGED
|
@@ -4,6 +4,7 @@ import 'react';
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './CircleProgress.css';
|
|
7
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
|
package/DNDContainer.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './DNDContainer.css';
|
|
7
8
|
import { Component } from 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import { setTimeout, clearTimeout, preventDefault, addEventListener, orNoop, NOOP, removeEventListener, WINDOW, DOCUMENT, requestAnimationFrame, classNames, ref } from './Tools.js';
|
|
@@ -49,7 +50,7 @@ var DNDContainer = function (_Component) {
|
|
|
49
50
|
var offsetLeft = totalOffsetLeft(container) + (e.clientX - __left(itemOffset));
|
|
50
51
|
var offsetTop = totalOffsetTop(container) + (e.clientY - __top(itemOffset));
|
|
51
52
|
_this[positionListener] = orNoop(it.createPositionListener)(e, style, itemOffset, container) || function (e) {
|
|
52
|
-
if (e
|
|
53
|
+
if (__pageX(e) === 0) return;
|
|
53
54
|
style.transform = 'translate(' + (__pageX(e) - offsetLeft) + 'px, ' + (__pageY(e) - offsetTop) + 'px)';
|
|
54
55
|
};
|
|
55
56
|
requestAnimationFrame(function () {
|
package/DNDDraggable.js
CHANGED
|
@@ -40,7 +40,7 @@ var Draggable = function (_PureComponent) {
|
|
|
40
40
|
_props = props(that);
|
|
41
41
|
return ReactCreateElement("div", {
|
|
42
42
|
[ReactConstants[5]]: classNames('Draggable', _props[ReactConstants[5]], _state[dragged] && dragged, _state[placeholder] && placeholder, _state[hover] && hover),
|
|
43
|
-
|
|
43
|
+
[ReactConstants[6]]: _props[ReactConstants[6]],
|
|
44
44
|
ref: ref('element', that)
|
|
45
45
|
}, _props[handle], _props[ReactConstants[4]]);
|
|
46
46
|
};
|
package/Dialog.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './Dialog.css';
|
|
7
8
|
import { Component } from 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import Button from './Button.js';
|
|
@@ -39,10 +40,10 @@ var Dialog = function (_PureComponent) {
|
|
|
39
40
|
[ReactConstants[5]]: "row right"
|
|
40
41
|
}, cancel && ReactCreateElement(Button, {
|
|
41
42
|
flat: true,
|
|
42
|
-
|
|
43
|
+
[ReactConstants[6]]: onCancel
|
|
43
44
|
}, cancel), accept && ReactCreateElement(Button, {
|
|
44
45
|
flat: true,
|
|
45
|
-
|
|
46
|
+
[ReactConstants[6]]: onAccept
|
|
46
47
|
}, accept)));
|
|
47
48
|
};
|
|
48
49
|
return _this;
|
package/DropFileInput.js
CHANGED
|
@@ -4,6 +4,7 @@ import 'react';
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './DropFileInput.css';
|
|
7
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
8
9
|
import Dropzone from './Dropzone.js';
|
|
9
10
|
import PropTypes from 'prop-types';
|
package/DroppableList.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './DroppableList.css';
|
|
7
8
|
import React, { Component } from 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import DNDDroppable from './DNDDroppable.js';
|
package/Dropzone.js
CHANGED
|
@@ -4,6 +4,7 @@ import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _
|
|
|
4
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
|
+
import './Dropzone.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
@@ -68,7 +69,7 @@ var Dropzone = function (_PureComponent) {
|
|
|
68
69
|
entries = entries.filter(function (el) {
|
|
69
70
|
return el !== __target(e);
|
|
70
71
|
});
|
|
71
|
-
if (entries
|
|
72
|
+
if (__length(entries) === 0) isDragging(false);
|
|
72
73
|
prevent(e);
|
|
73
74
|
};
|
|
74
75
|
var inputRef = createRef();
|
|
@@ -98,10 +99,10 @@ var Dropzone = function (_PureComponent) {
|
|
|
98
99
|
type: "file",
|
|
99
100
|
accept: accept,
|
|
100
101
|
multiple: !!multiple,
|
|
101
|
-
|
|
102
|
+
[ReactConstants[6]]: function onClick() {
|
|
102
103
|
inputRef().value = '';
|
|
103
104
|
},
|
|
104
|
-
|
|
105
|
+
[ReactConstants[7]]: onDrop
|
|
105
106
|
}), children);
|
|
106
107
|
};
|
|
107
108
|
return _this;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ClassType, CSSProperties, DOMElement, FunctionComponent, MouseEventHandler, ReactElement } from 'react';
|
|
2
|
+
import './FilteredList.css';
|
|
3
|
+
import { SCROLLBAR_MODE_AUTO, SCROLLBAR_MODE_HIDDEN, SCROLLBAR_MODE_VISIBLE } from "./Scrollable";
|
|
4
|
+
import { PureComponent } from "./ReactConstants";
|
|
5
|
+
export declare const getLabel: (labels: any, id: any) => any;
|
|
6
|
+
export interface FilteredListProps<T extends (number | string | boolean)> {
|
|
7
|
+
data: T[];
|
|
8
|
+
labels: ((id: T) => string | ReactElement) | {
|
|
9
|
+
[id: string]: string | ReactElement;
|
|
10
|
+
};
|
|
11
|
+
selected: T | {
|
|
12
|
+
[id: string]: T;
|
|
13
|
+
};
|
|
14
|
+
inline: boolean;
|
|
15
|
+
selectSingle?: boolean;
|
|
16
|
+
childComponent: FunctionComponent | ClassType<any, any, any>;
|
|
17
|
+
scroll?: typeof SCROLLBAR_MODE_AUTO | typeof SCROLLBAR_MODE_HIDDEN | typeof SCROLLBAR_MODE_VISIBLE;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
childProps?: any;
|
|
20
|
+
className?: string;
|
|
21
|
+
filter: (id: T) => boolean;
|
|
22
|
+
onSelect: (id: T) => void;
|
|
23
|
+
nextProvider: (next: () => void) => void;
|
|
24
|
+
prevProvider: (prev: () => void) => void;
|
|
25
|
+
resetProvider: (reset: () => void) => void;
|
|
26
|
+
selectedProvider: (reset: () => T) => void;
|
|
27
|
+
}
|
|
28
|
+
interface FilteredListState {
|
|
29
|
+
selected: number | string | boolean;
|
|
30
|
+
}
|
|
31
|
+
declare class FilteredList<T extends (number | string | boolean)> extends PureComponent<FilteredListProps<T>, FilteredListState> {
|
|
32
|
+
hidden: {};
|
|
33
|
+
list: any[];
|
|
34
|
+
elements: {};
|
|
35
|
+
el: any;
|
|
36
|
+
constructor(props: any);
|
|
37
|
+
componentDidMount(): void;
|
|
38
|
+
componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
|
|
39
|
+
updateList: (props: any) => void;
|
|
40
|
+
render(): JSX.Element;
|
|
41
|
+
onSelect: (id: T) => void;
|
|
42
|
+
selected: () => any;
|
|
43
|
+
next: () => void;
|
|
44
|
+
prev: () => void;
|
|
45
|
+
updateScroll: (id: any) => void;
|
|
46
|
+
reset: () => void;
|
|
47
|
+
scrollTo: (id: any) => any;
|
|
48
|
+
}
|
|
49
|
+
export default FilteredList;
|
|
50
|
+
export interface ItemWrapperProps<T> {
|
|
51
|
+
id: number | string | boolean;
|
|
52
|
+
label: string | ReactElement;
|
|
53
|
+
onClick: MouseEventHandler;
|
|
54
|
+
onMouseEnter: MouseEventHandler;
|
|
55
|
+
onMouseLeave: MouseEventHandler;
|
|
56
|
+
classProvider: (data: any) => string;
|
|
57
|
+
className?: string;
|
|
58
|
+
childComponent: FunctionComponent | ClassType<any, any, any>;
|
|
59
|
+
childProps?: any;
|
|
60
|
+
element?: (el: DOMElement<any, any>) => void;
|
|
61
|
+
}
|