react-ui-basics 0.0.163 → 0.0.166
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 +1 -0
- package/Button.js +1 -0
- package/Checkbox.js +1 -0
- package/CircleProgress.js +1 -0
- package/DNDContainer.js +1 -0
- package/Dialog.js +1 -0
- package/DropFileInput.js +1 -0
- package/DroppableList.js +1 -0
- package/Dropzone.js +1 -0
- package/FilteredList.d.ts +61 -0
- package/FilteredList.js +138 -234
- package/FloatingActionButton.js +1 -0
- package/FormUploadProgress.js +1 -0
- package/ImageGallery.js +1 -0
- package/Modal.js +1 -0
- package/ModalMenu.js +1 -0
- package/Scrollable.js +1 -0
- package/ScrollableTable.js +1 -0
- package/Snackbar.js +1 -0
- package/SpinningProgress.js +1 -0
- package/Switch.js +1 -0
- package/Table.d.ts +4 -4
- package/Table.js +4 -3
- package/TextField.js +1 -0
- package/bundle.css +598 -598
- package/package.json +1 -1
- package/router/HistoryTools.js +9 -1
- package/router/HistoryTools.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';
|
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';
|
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';
|
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';
|
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';
|
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';
|
|
@@ -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
|
+
}
|
package/FilteredList.js
CHANGED
|
@@ -1,250 +1,154 @@
|
|
|
1
1
|
import ReactConstants from "./ReactConstants";
|
|
2
2
|
import {clientHeight as __clientHeight, clientWidth as __clientWidth, createAccessor as __createAccessor, data as __data, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, props as __props, scrollLeft as __scrollLeft, scrollTop as __scrollTop, state as __state, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { jsx as jsxRuntime_2 } from 'react/jsx-runtime';
|
|
4
5
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
6
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
7
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
8
|
+
import './FilteredList.css';
|
|
7
9
|
import React from 'react';
|
|
8
|
-
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import Scrollable from './Scrollable.js';
|
|
10
|
-
import { orNoop, classNames, ref, isFunction, stopPropagation, isObject } from './Tools.js';
|
|
11
|
+
import { UNDEFINED, orNoop, classNames, ref, isFunction, stopPropagation, isObject } from './Tools.js';
|
|
11
12
|
import { PureComponent } from './ReactConstants.js';
|
|
12
13
|
|
|
13
|
-
var getLabel = function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
selected
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
_this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
14
|
+
var getLabel = function (labels, id) { return isFunction(labels) ? labels(id) : (labels ? labels[id] : id); };
|
|
15
|
+
var FilteredList = /** @class */ (function (_super) {
|
|
16
|
+
__inherits(FilteredList, _super);
|
|
17
|
+
function FilteredList(props) {
|
|
18
|
+
var _this = _super.call(this, props) || this;
|
|
19
|
+
_this.hidden = {};
|
|
20
|
+
_this.list = [];
|
|
21
|
+
_this.elements = {};
|
|
22
|
+
_this.el = null;
|
|
23
|
+
_this.updateList = function (props) {
|
|
24
|
+
var data = __data(props);
|
|
25
|
+
var selected = __state(_this).selected;
|
|
26
|
+
_this.list = data || [];
|
|
27
|
+
if (!_this.list.includes(selected))
|
|
28
|
+
_this.setState({ selected: -1 });
|
|
29
|
+
};
|
|
30
|
+
_this.onSelect = function (id) {
|
|
31
|
+
_this.setState({ selected: id });
|
|
32
|
+
__props(_this).onSelect(id);
|
|
33
|
+
};
|
|
34
|
+
_this.selected = function () {
|
|
35
|
+
var value = __state(_this).selected;
|
|
36
|
+
var selectSingle = __props(_this).selectSingle;
|
|
37
|
+
if (value === -1 || _this.hidden[value + '']) {
|
|
38
|
+
var filtered = _this.list.filter(function (id) { return !_this.hidden[id]; });
|
|
39
|
+
if ((selectSingle === UNDEFINED || selectSingle) && __length(filtered) === 1)
|
|
40
|
+
return filtered[0];
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
_this.next = function () {
|
|
48
|
+
var list = _this.list;
|
|
49
|
+
var selected = __state(_this).selected;
|
|
50
|
+
var position = list.findIndex(function (id) { return selected === id; });
|
|
51
|
+
if (_this.hidden[list[position]])
|
|
52
|
+
position = -1;
|
|
53
|
+
while (++position < __length(list)) {
|
|
54
|
+
if (!_this.hidden[list[position]])
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
if (position < __length(list)) {
|
|
58
|
+
var id = list[position];
|
|
59
|
+
_this.setState({ selected: id });
|
|
60
|
+
_this.updateScroll(id);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
_this.prev = function () {
|
|
64
|
+
var list = _this.list;
|
|
65
|
+
var selected = __state(_this).selected;
|
|
66
|
+
var position = list.findIndex(function (id) { return selected === id; });
|
|
67
|
+
if (_this.hidden[list[position]])
|
|
68
|
+
position = __length(list);
|
|
69
|
+
while (--position >= 0) {
|
|
70
|
+
if (!_this.hidden[list[position]])
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
if (position >= 0) {
|
|
74
|
+
var id = list[position];
|
|
75
|
+
_this.setState({ selected: id });
|
|
76
|
+
_this.updateScroll(id);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
_this.updateScroll = function (id) {
|
|
80
|
+
var child = _this.elements[id];
|
|
81
|
+
var container = _this.el;
|
|
82
|
+
var scrollTop = container.getScroll();
|
|
83
|
+
var height = container.getHeight();
|
|
84
|
+
var isVisible = scrollTop <= child.offsetTop && scrollTop + height >= child.offsetTop + __clientHeight(child);
|
|
85
|
+
if (!isVisible) {
|
|
86
|
+
var scrollToBottom = child.offsetTop + __clientHeight(child) - height;
|
|
87
|
+
var scrollToTop = child.offsetTop;
|
|
88
|
+
if (Math.abs(scrollTop - scrollToTop) < Math.abs(scrollTop - scrollToBottom)) {
|
|
89
|
+
container.setScroll(scrollToTop);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
container.setScroll(scrollToBottom);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
_this.reset = function () {
|
|
97
|
+
_this.setState({ selected: -1 });
|
|
98
|
+
_this.el.scrollTop = 0;
|
|
99
|
+
};
|
|
100
|
+
_this.scrollTo = function (id) { return _this.el.setScroll(_this.elements[id] && _this.elements[id].offsetTop); };
|
|
101
|
+
_this.state = { selected: -1 };
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
FilteredList.prototype[ReactConstants[0]] = function () {
|
|
105
|
+
orNoop(__props(this).nextProvider)(this.next);
|
|
106
|
+
orNoop(__props(this).prevProvider)(this.prev);
|
|
107
|
+
orNoop(__props(this).selectedProvider)(this.selected);
|
|
108
|
+
orNoop(__props(this).resetProvider)(this.reset);
|
|
109
|
+
this.updateList(__props(this));
|
|
85
110
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
var height = container.getHeight();
|
|
91
|
-
var isVisible = scrollTop <= child.offsetTop && scrollTop + height >= child.offsetTop + __clientHeight(child);
|
|
92
|
-
if (!isVisible) {
|
|
93
|
-
var scrollToBottom = child.offsetTop + __clientHeight(child) - height;
|
|
94
|
-
var scrollToTop = child.offsetTop;
|
|
95
|
-
if (Math.abs(scrollTop - scrollToTop) < Math.abs(scrollTop - scrollToBottom)) {
|
|
96
|
-
container.setScroll(scrollToTop);
|
|
97
|
-
} else {
|
|
98
|
-
container.setScroll(scrollToBottom);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
111
|
+
FilteredList.prototype[ReactConstants[2]] = function (prevProps, prevState, snapshot) {
|
|
112
|
+
if (__props(this).data === __data(prevProps))
|
|
113
|
+
return;
|
|
114
|
+
this.updateList(__props(this));
|
|
101
115
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
selected
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
FilteredList.prototype[ReactConstants[3]] = function () {
|
|
117
|
+
var _this = this;
|
|
118
|
+
var _a = __props(this), data = __data(_a), labels = _a.labels, filter = _a.filter, className = _a[ReactConstants[5]], selected = _a.selected, inline = _a.inline, childComponent = _a.childComponent, childProps = _a.childProps, style = __style(_a), scroll = _a.scroll;
|
|
119
|
+
return (jsxRuntime_2(Scrollable, __extends({ [ReactConstants[5]]: classNames('FilteredList', className, inline ? 'inline' : 'popup'), ref: ref('el', this), style: style, scrollBarMode: scroll }, { [ReactConstants[4]]: (data || []).filter(function (id) { return id !== false && id != null; }).map(function (id) {
|
|
120
|
+
var key = '' + id;
|
|
121
|
+
return jsxRuntime_2(ItemWrapper, { id: id, label: getLabel(labels, id), childComponent: childComponent, childProps: childProps, element: function (el) { return _this.elements[key] = el; }, [ReactConstants[6]]: function (e) {
|
|
122
|
+
stopPropagation(e);
|
|
123
|
+
_this.onSelect(id);
|
|
124
|
+
}, onMouseEnter: function (e) { return _this.setState({ selected: id }); }, onMouseLeave: function (e) { return id === __state(_this).selected && _this.setState({ selected: -1 }); }, [ReactConstants[5]]: classNames('child', __state(_this).selected === id && 'active', selected === id || (selected && isObject(selected) && selected[key]) && 'selected'), classProvider: function (it) { return (_this.hidden[key] = !(!filter || filter(it))) && 'hidden'; } }, key);
|
|
125
|
+
}) })));
|
|
107
126
|
};
|
|
108
|
-
|
|
109
|
-
|
|
127
|
+
return FilteredList;
|
|
128
|
+
}(PureComponent));
|
|
129
|
+
var ItemWrapper = /** @class */ (function (_super) {
|
|
130
|
+
__inherits(ItemWrapper, _super);
|
|
131
|
+
function ItemWrapper() {
|
|
132
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
133
|
+
_this.el = null;
|
|
134
|
+
_this.data = null;
|
|
135
|
+
return _this;
|
|
136
|
+
}
|
|
137
|
+
ItemWrapper.prototype[ReactConstants[3]] = function () {
|
|
138
|
+
var _this = this;
|
|
139
|
+
var _a = __props(this), id = _a.id, label = _a.label, onClick = _a[ReactConstants[6]], onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, classProvider = _a.classProvider, className = _a[ReactConstants[5]], childComponent = _a.childComponent, childProps = _a.childProps;
|
|
140
|
+
var child = React.createElement(childComponent, __extends(__extends({}, childProps), { id: id, label: label, dataConsumer: function (data) { return _this.data = data; } }));
|
|
141
|
+
var cssClass = orNoop(classProvider)(__data(this));
|
|
142
|
+
return (jsxRuntime_2("div", __extends({ [ReactConstants[5]]: classNames('ItemWrapper', cssClass, className), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave,
|
|
143
|
+
// onMouseDown={onMouseDown}
|
|
144
|
+
[ReactConstants[6]]: onClick, ref: ref('el', this) }, { [ReactConstants[4]]: child })));
|
|
110
145
|
};
|
|
111
|
-
|
|
112
|
-
|
|
146
|
+
ItemWrapper.prototype[ReactConstants[0]] = function () {
|
|
147
|
+
orNoop(__props(this).element)(this.el);
|
|
148
|
+
this.forceUpdate();
|
|
113
149
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return _this;
|
|
117
|
-
}
|
|
118
|
-
_createClass(FilteredList, [{
|
|
119
|
-
key: [ReactConstants[0]],
|
|
120
|
-
value: function componentDidMount() {
|
|
121
|
-
orNoop(__props(this).nextProvider)(this.next);
|
|
122
|
-
orNoop(__props(this).prevProvider)(this.prev);
|
|
123
|
-
orNoop(__props(this).selectedProvider)(this.selected);
|
|
124
|
-
orNoop(__props(this).resetProvider)(this.reset);
|
|
125
|
-
this.updateList(__props(this));
|
|
126
|
-
}
|
|
127
|
-
}, {
|
|
128
|
-
key: [ReactConstants[2]],
|
|
129
|
-
value: function componentDidUpdate(prevProps, prevState, snapshot) {
|
|
130
|
-
if (__props(this).data === __data(prevProps)) return;
|
|
131
|
-
this.updateList(__props(this));
|
|
132
|
-
}
|
|
133
|
-
}, {
|
|
134
|
-
key: [ReactConstants[3]],
|
|
135
|
-
value: function render() {
|
|
136
|
-
var _this2 = this;
|
|
137
|
-
var _this$props = __props(this),
|
|
138
|
-
data = __data(_this$props),
|
|
139
|
-
labels = _this$props.labels,
|
|
140
|
-
filter = _this$props.filter,
|
|
141
|
-
className = _this$props[ReactConstants[5]],
|
|
142
|
-
selected = _this$props.selected,
|
|
143
|
-
inline = _this$props.inline,
|
|
144
|
-
childComponent = _this$props.childComponent,
|
|
145
|
-
childProps = _this$props.childProps,
|
|
146
|
-
style = __style(_this$props),
|
|
147
|
-
scroll = _this$props.scroll;
|
|
148
|
-
return ReactCreateElement(Scrollable, {
|
|
149
|
-
[ReactConstants[5]]: classNames('FilteredList', className, inline ? 'inline' : 'popup'),
|
|
150
|
-
ref: ref('el', this),
|
|
151
|
-
style: style,
|
|
152
|
-
scrollBarMode: scroll
|
|
153
|
-
}, (data || []).filter(function (id) {
|
|
154
|
-
return id !== false && id != null;
|
|
155
|
-
}).map(function (id) {
|
|
156
|
-
return ReactCreateElement(ItemWrapper, {
|
|
157
|
-
id: id,
|
|
158
|
-
key: id,
|
|
159
|
-
label: getLabel(labels, id),
|
|
160
|
-
childComponent: childComponent,
|
|
161
|
-
childProps: childProps,
|
|
162
|
-
element: function element(el) {
|
|
163
|
-
return _this2.elements[id] = el;
|
|
164
|
-
},
|
|
165
|
-
[ReactConstants[6]]: function onClick(e) {
|
|
166
|
-
stopPropagation(e);
|
|
167
|
-
_this2.onSelect(id);
|
|
168
|
-
},
|
|
169
|
-
onMouseEnter: function onMouseEnter(e) {
|
|
170
|
-
return _this2.setState({
|
|
171
|
-
selected: id
|
|
172
|
-
});
|
|
173
|
-
},
|
|
174
|
-
onMouseLeave: function onMouseLeave(e) {
|
|
175
|
-
return id === __state(_this2).selected && _this2.setState({
|
|
176
|
-
selected: -1
|
|
177
|
-
});
|
|
178
|
-
},
|
|
179
|
-
[ReactConstants[5]]: classNames('child', __state(_this2).selected === id && 'active', selected === id || isObject(selected) && selected[id] && 'selected'),
|
|
180
|
-
classProvider: function classProvider(it) {
|
|
181
|
-
return (_this2.hidden[id] = !filter(it)) && 'hidden';
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}));
|
|
185
|
-
}
|
|
186
|
-
}]);
|
|
187
|
-
return FilteredList;
|
|
188
|
-
}(PureComponent);
|
|
189
|
-
FilteredList.defaultProps = {
|
|
190
|
-
data: [],
|
|
191
|
-
labels: {},
|
|
192
|
-
selected: {},
|
|
193
|
-
inline: false,
|
|
194
|
-
selectSingle: true,
|
|
195
|
-
filter: function filter() {
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
var FilteredList$1 = FilteredList;
|
|
200
|
-
var ItemWrapper = function (_React$Component) {
|
|
201
|
-
_inherits(ItemWrapper, _React$Component);
|
|
202
|
-
var _super2 = _createSuper(ItemWrapper);
|
|
203
|
-
function ItemWrapper() {
|
|
204
|
-
_classCallCheck(this, ItemWrapper);
|
|
205
|
-
return _super2.apply(this, arguments);
|
|
206
|
-
}
|
|
207
|
-
_createClass(ItemWrapper, [{
|
|
208
|
-
key: [ReactConstants[3]],
|
|
209
|
-
value: function render() {
|
|
210
|
-
var _this3 = this;
|
|
211
|
-
var _this$props2 = __props(this),
|
|
212
|
-
id = _this$props2.id,
|
|
213
|
-
label = _this$props2.label,
|
|
214
|
-
onClick = _this$props2[ReactConstants[6]],
|
|
215
|
-
onMouseDown = _this$props2.onMouseDown,
|
|
216
|
-
onMouseEnter = _this$props2.onMouseEnter,
|
|
217
|
-
onMouseLeave = _this$props2.onMouseLeave,
|
|
218
|
-
classProvider = _this$props2.classProvider,
|
|
219
|
-
className = _this$props2[ReactConstants[5]],
|
|
220
|
-
childComponent = _this$props2.childComponent,
|
|
221
|
-
childProps = _this$props2.childProps;
|
|
222
|
-
var child = React.createElement(childComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
|
|
223
|
-
id: id,
|
|
224
|
-
label: label,
|
|
225
|
-
dataConsumer: function dataConsumer(data) {
|
|
226
|
-
return _this3.data = data;
|
|
227
|
-
}
|
|
228
|
-
}));
|
|
229
|
-
var cssClass = orNoop(classProvider)(__data(this));
|
|
230
|
-
return ReactCreateElement("div", {
|
|
231
|
-
[ReactConstants[5]]: classNames('ItemWrapper', cssClass, className),
|
|
232
|
-
onMouseEnter: onMouseEnter,
|
|
233
|
-
onMouseLeave: onMouseLeave,
|
|
234
|
-
onMouseDown: onMouseDown,
|
|
235
|
-
[ReactConstants[6]]: onClick,
|
|
236
|
-
ref: ref('el', this)
|
|
237
|
-
}, child);
|
|
238
|
-
}
|
|
239
|
-
}, {
|
|
240
|
-
key: [ReactConstants[0]],
|
|
241
|
-
value: function componentDidMount() {
|
|
242
|
-
orNoop(__props(this).element)(this.el);
|
|
243
|
-
this.forceUpdate();
|
|
244
|
-
}
|
|
245
|
-
}]);
|
|
246
|
-
return ItemWrapper;
|
|
247
|
-
}(React.Component);
|
|
150
|
+
return ItemWrapper;
|
|
151
|
+
}(React.Component));
|
|
248
152
|
|
|
249
|
-
export { FilteredList
|
|
153
|
+
export { FilteredList as default, getLabel };
|
|
250
154
|
//# sourceMappingURL=FilteredList.js.map
|
package/FloatingActionButton.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 './FloatingActionButton.css';
|
|
7
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
8
9
|
import PropTypes from 'prop-types';
|
|
9
10
|
import Button from './Button.js';
|
package/FormUploadProgress.js
CHANGED
|
@@ -4,6 +4,7 @@ import React from '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 './FormUploadProgress.css';
|
|
7
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
8
9
|
import Button from './Button.js';
|
|
9
10
|
import Animated from './Animated.js';
|
package/ImageGallery.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createClass as _createClass, classCallCheck as _classCallCheck, objectS
|
|
|
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 './ImageGallery.css';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import Animated from './Animated.js';
|
package/Modal.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 './Modal.css';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
import ReactDOM from 'react-dom';
|
|
9
10
|
import ReactCreateElement from './ReactCreateElement.js';
|
package/ModalMenu.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 './ModalMenu.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import { stateGS, render, PureComponent } from './ReactConstants.js';
|
package/Scrollable.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 './Scrollable.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import PropTypes from 'prop-types';
|
package/ScrollableTable.js
CHANGED
|
@@ -5,6 +5,7 @@ import { jsx as jsxRuntime_2 } from 'react/jsx-runtime';
|
|
|
5
5
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
6
6
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
7
7
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
8
|
+
import './ScrollableTable.css';
|
|
8
9
|
import Table from './Table.js';
|
|
9
10
|
import Scrollable from './Scrollable.js';
|
|
10
11
|
import { render, props, PureComponent } from './ReactConstants.js';
|
package/Snackbar.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 './Snackbar.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import ReactDOM from 'react-dom';
|
|
9
10
|
import ReactCreateElement from './ReactCreateElement.js';
|
package/SpinningProgress.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 './SpinningProgress.css';
|
|
7
8
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
8
9
|
|
|
9
10
|
var SpinningProgress = function SpinningProgress() {
|
package/Switch.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 './Switch.css';
|
|
7
8
|
import 'react';
|
|
8
9
|
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
10
|
import { classNames, getRandomId } from './Tools.js';
|