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/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
- import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, objectSpread2 as _objectSpread2 } from './_virtual/_rollupPluginBabelHelpers.js';
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 getLabel(labels, id) {
14
- return isFunction(labels) ? labels(id) : labels[id];
15
- };
16
- var FilteredList = function (_PureComponent) {
17
- _inherits(FilteredList, _PureComponent);
18
- var _super = _createSuper(FilteredList);
19
- function FilteredList(_props) {
20
- var _this;
21
- _classCallCheck(this, FilteredList);
22
- _this = _super.call(this, _props);
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)) _this.setState({
28
- selected: -1
29
- });
30
- };
31
- _this.onSelect = function (id) {
32
- _this.setState({
33
- selected: id
34
- });
35
- __props(_this).onSelect(id);
36
- };
37
- _this.selected = function () {
38
- var value = __state(_this).selected;
39
- var selectSingle = __props(_this).selectSingle;
40
- if (value === -1 || _this.hidden[value]) {
41
- var filtered = _this.list.filter(function (id) {
42
- return !_this.hidden[id];
43
- });
44
- if (selectSingle && filtered.length === 1) return filtered[0];
45
- return null;
46
- } else {
47
- return value;
48
- }
49
- };
50
- _this.next = function () {
51
- var list = _this.list;
52
- var selected = __state(_this).selected;
53
- var position = list.findIndex(function (id) {
54
- return selected === id;
55
- });
56
- if (_this.hidden[list[position]]) position = -1;
57
- while (++position < __length(list)) {
58
- if (!_this.hidden[list[position]]) break;
59
- }
60
- if (position < __length(list)) {
61
- var id = list[position];
62
- _this.setState({
63
- selected: id
64
- });
65
- _this.updateScroll(id);
66
- }
67
- };
68
- _this.prev = function () {
69
- var list = _this.list;
70
- var selected = __state(_this).selected;
71
- var position = list.findIndex(function (id) {
72
- return selected === id;
73
- });
74
- if (_this.hidden[list[position]]) position = __length(list);
75
- while (--position >= 0) {
76
- if (!_this.hidden[list[position]]) break;
77
- }
78
- if (position >= 0) {
79
- var id = list[position];
80
- _this.setState({
81
- selected: id
82
- });
83
- _this.updateScroll(id);
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
- _this.updateScroll = function (id) {
87
- var child = _this.elements[id];
88
- var container = _this.el;
89
- var scrollTop = container.getScroll();
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
- _this.reset = function () {
103
- _this.setState({
104
- selected: -1
105
- });
106
- _this.el.scrollTop = 0;
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
- _this.scrollTo = function (id) {
109
- return _this.el.setScroll(_this.elements[id] && _this.elements[id].offsetTop);
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
- _this.state = {
112
- selected: -1
146
+ ItemWrapper.prototype[ReactConstants[0]] = function () {
147
+ orNoop(__props(this).element)(this.el);
148
+ this.forceUpdate();
113
149
  };
114
- _this.hidden = {};
115
- _this.elements = {};
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
- onClick: 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.onClick,
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
- onClick: 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$1 as default, getLabel };
153
+ export { FilteredList as default, getLabel };
250
154
  //# sourceMappingURL=FilteredList.js.map
@@ -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';
@@ -12,12 +13,12 @@ import MaterialIcon from './MaterialIcon.js';
12
13
 
13
14
  var FloatingActionButton = function FloatingActionButton(_ref) {
14
15
  var icon = _ref.icon,
15
- onClick = _ref.onClick,
16
+ onClick = _ref[ReactConstants[6]],
16
17
  mini = _ref.mini,
17
18
  className = _ref[ReactConstants[5]],
18
19
  hidden = _ref.hidden;
19
20
  return ReactCreateElement(Button, {
20
- onClick: onClick,
21
+ [ReactConstants[6]]: onClick,
21
22
  round: true,
22
23
  [ReactConstants[5]]: classNames("FloatingActionButton", className, mini && 'mini', hidden && 'hidden')
23
24
  }, ReactCreateElement(MaterialIcon, {
@@ -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';
@@ -41,7 +42,7 @@ var FormUploadProgress = function FormUploadProgress(_ref) {
41
42
  }, formatValue(value, loaded, total))), cancel && ReactCreateElement(Button, {
42
43
  [ReactConstants[5]]: "cancel",
43
44
  disabled: loaded === total,
44
- onClick: function onClick(e) {
45
+ [ReactConstants[6]]: function onClick(e) {
45
46
  preventDefault(e);
46
47
  cancel();
47
48
  }
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';
@@ -510,7 +511,7 @@ var ImageGallery = function (_React$Component) {
510
511
  addEventListener(_this.gallery, 'touchmove', onTouchMove, false);
511
512
  moveListenerAdded = true;
512
513
  }
513
- if (touches.length === 2) {
514
+ if (__length(touches) === 2) {
514
515
  if (zoomed()) zoomValueStarted = zoomValue;else if (!props().embedded) {
515
516
  initZoom();
516
517
  __style(zoomedImage).transition = 'none';
@@ -543,7 +544,7 @@ var ImageGallery = function (_React$Component) {
543
544
  }];
544
545
  if (zoomed()) {
545
546
  preventDefault(e);
546
- if (touches.length === 2) {
547
+ if (__length(touches) === 2) {
547
548
  var diff = distance(touches) / distance(touchesStart);
548
549
  zoomValue = Math.min(Math.max(zoomValueStarted * diff, 0.5), 10);
549
550
  var zoomedAt = center(touchesStart);
@@ -629,7 +630,7 @@ var ImageGallery = function (_React$Component) {
629
630
  value: show
630
631
  }, ReactCreateElement(Button, {
631
632
  [ReactConstants[5]]: className,
632
- onClick: onClick,
633
+ [ReactConstants[6]]: onClick,
633
634
  round: true
634
635
  }, ReactCreateElement(MaterialIcon, {
635
636
  icon: icon
@@ -646,7 +647,7 @@ var ImageGallery = function (_React$Component) {
646
647
  indicator = _props4.indicator,
647
648
  embedded = _props4.embedded,
648
649
  loop = _props4.loop,
649
- _onClick = _props4.onClick,
650
+ _onClick = _props4[ReactConstants[6]],
650
651
  children = _props4[ReactConstants[4]];
651
652
  var indexValue = index() !== UNDEFINED ? index() : props().index;
652
653
  var length = __length(images);
@@ -708,7 +709,7 @@ var ImageGallery = function (_React$Component) {
708
709
  resetZoom();
709
710
  }
710
711
  },
711
- onClick: function onClick(e) {
712
+ [ReactConstants[6]]: function onClick(e) {
712
713
  !e.swipeProcessed && orNoop(_onClick)(e, it, i);
713
714
  },
714
715
  key: i,
@@ -751,7 +752,7 @@ var ImageGallery = function (_React$Component) {
751
752
  return ReactCreateElement("div", {
752
753
  key: i,
753
754
  [ReactConstants[5]]: classNames('preview', indexValue === i && 'selected'),
754
- onClick: function onClick() {
755
+ [ReactConstants[6]]: function onClick() {
755
756
  return scrollTo(i, indexValue);
756
757
  }
757
758
  }, ReactCreateElement("img", {
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';
@@ -77,7 +78,7 @@ var Modal = function (_PureComponent) {
77
78
  var modal = ReactCreateElement("div", {
78
79
  [ReactConstants[5]]: classNames("Modal", className, show && 'show'),
79
80
  ref: el,
80
- onClick: shouldClose
81
+ [ReactConstants[6]]: shouldClose
81
82
  }, ReactCreateElement("div", {
82
83
  ref: overlay,
83
84
  [ReactConstants[5]]: classNames("overlay", show && 'show')
@@ -96,7 +97,7 @@ var Modal = function (_PureComponent) {
96
97
  [ReactConstants[5]]: "close",
97
98
  flat: true,
98
99
  round: true,
99
- onClick: beforeClose
100
+ [ReactConstants[6]]: beforeClose
100
101
  }, closeIcon)));
101
102
  return container ? ReactDOM.createPortal(modal, container) : modal;
102
103
  };
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';
@@ -29,7 +30,7 @@ var ModalMenu = function (_PureComponent) {
29
30
  var filtered = (items || []).filter(function (it) {
30
31
  return !!it;
31
32
  });
32
- if (filtered.length === 0) return null;
33
+ if (__length(filtered) === 0) return null;
33
34
  var open = isOpen();
34
35
  return ReactCreateElement("div", {
35
36
  [ReactConstants[5]]: classNames("ModalMenu", 'row', open && 'open')
@@ -49,7 +50,7 @@ var ModalMenu = function (_PureComponent) {
49
50
  }, ReactCreateElement(Button, {
50
51
  flat: true,
51
52
  round: true,
52
- onClick: it.action
53
+ [ReactConstants[6]]: it.action
53
54
  }, ReactCreateElement(MaterialIcon, {
54
55
  icon: it.icon
55
56
  })));
@@ -57,7 +58,7 @@ var ModalMenu = function (_PureComponent) {
57
58
  [ReactConstants[5]]: classNames("more", open && 'active'),
58
59
  flat: true,
59
60
  round: true,
60
- onClick: toggle
61
+ [ReactConstants[6]]: toggle
61
62
  }, ReactCreateElement(MaterialIcon, {
62
63
  icon: "more_vert"
63
64
  })), ReactCreateElement("div", {
@@ -4,10 +4,7 @@ export declare const propsGetter: <P>(that: React.Component<P>) => (() => P);
4
4
  export declare const state: <P, S>(that: React.Component<P, S>) => S;
5
5
  export declare const setState: (that: any, data: any, cb?: any) => void;
6
6
  export declare const stateFieldSetter: (that: any, key: any, cb?: any) => (value: any, cb2?: any) => void;
7
- export declare const stateGS: (that: any) => {
8
- (): any;
9
- toString(): string;
10
- };
7
+ export declare const stateGS: ((that: React.Component) => (v?: any, cb?: any) => any);
11
8
  export declare const stateGSs: (that: any, num: any) => any[];
12
9
  export declare const componentDidMount = "componentDidMount";
13
10
  export declare const componentWillUnmount = "componentWillUnmount";
@@ -15,6 +12,8 @@ export declare const componentDidUpdate = "componentDidUpdate";
15
12
  export declare const render = "render";
16
13
  export declare const children = "children";
17
14
  export declare const className = "className";
15
+ export declare const onClick = "onClick";
16
+ export declare const onChange = "onChange";
18
17
  export declare const PureComponent: typeof React.PureComponent;
19
18
  declare const _default: string[];
20
19
  export default _default;
package/ReactConstants.js CHANGED
@@ -13,8 +13,8 @@ var stateFieldSetter = function (that, key, cb) { return function (value, cb2) {
13
13
  setState(that, (_a = {}, _a[key] = value, _a), cb2 || cb);
14
14
  }; };
15
15
  var stateGS = function (that) {
16
- !that.sfc && (that.sfc = 0);
17
- var key = '_' + (that.sfc++);
16
+ !that['sfc'] && (that['sfc'] = 0);
17
+ var key = '_' + (that['sfc']++);
18
18
  var setter = stateFieldSetter(that, key);
19
19
  var result = function () {
20
20
  return !arguments.length ? state(that)[key] : setter.apply(null, arguments);
@@ -35,8 +35,10 @@ var componentDidUpdate = 'componentDidUpdate';
35
35
  var render = 'render';
36
36
  var children = 'children';
37
37
  var className = 'className';
38
+ var onClick = 'onClick';
39
+ var onChange = 'onChange';
38
40
  var PureComponent = React.PureComponent;
39
- var ReactConstants = [componentDidMount, componentWillUnmount, componentDidUpdate, render, children, className];
41
+ var ReactConstants = [componentDidMount, componentWillUnmount, componentDidUpdate, render, children, className, onClick, onChange];
40
42
 
41
- export { PureComponent, children, className, componentDidMount, componentDidUpdate, componentWillUnmount, ReactConstants as default, props, propsGetter, render, setState, state, stateFieldSetter, stateGS, stateGSs };
43
+ export { PureComponent, children, className, componentDidMount, componentDidUpdate, componentWillUnmount, ReactConstants as default, onChange, onClick, props, propsGetter, render, setState, state, stateFieldSetter, stateGS, stateGSs };
42
44
  //# sourceMappingURL=ReactConstants.js.map
package/ReadyListener.js CHANGED
@@ -30,7 +30,7 @@ var createReadyListener = function createReadyListener() {
30
30
  if (renderer) return renderer(ready);else return !ready && _props[ReactConstants[4]] || null;
31
31
  };
32
32
  that[ReactConstants[0]] = that[ReactConstants[2]] = function () {
33
- orNoop(props(that).onChange)(state(that).r);
33
+ orNoop(props(that)[ReactConstants[7]])(state(that).r);
34
34
  };
35
35
  return _this;
36
36
  }
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';
@@ -142,13 +143,13 @@ var Scrollable = function (_PureComponent) {
142
143
  thumbH.ondragstart = preventDefault;
143
144
  thumbH.onmouseup = reset;
144
145
  scrollbar.onclick = function (e) {
145
- if (e.target === scrollbar) {
146
+ if (__target(e) === scrollbar) {
146
147
  var thumbPosition = parseInt(__top(styleOf(thumb)));
147
148
  viewport.scrollTop += offsetHeightOf(viewport) * 0.9 * (e.offsetY < thumbPosition ? -1 : 1);
148
149
  }
149
150
  };
150
151
  scrollbarH.onclick = function (e) {
151
- if (e.target === scrollbarH) {
152
+ if (__target(e) === scrollbarH) {
152
153
  var thumbPosition = parseInt(__left(styleOf(thumbH)));
153
154
  viewport.scrollLeft += offsetWidthOf(viewport) * 0.9 * (e.offsetX < thumbPosition ? -1 : 1);
154
155
  }
@@ -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';