react-ui-basics 0.0.155 → 0.0.158
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 +2 -1
- package/AutocompleteSelect.js +15 -14
- package/Button.js +15 -15
- package/Button.js.map +1 -1
- package/Checkbox.js +3 -2
- package/CircleProgress.js +2 -1
- package/CommonFields.js +17 -0
- package/CommonFields.js.map +1 -0
- package/DNDContainer.js +29 -28
- package/DNDDraggable.js +1 -0
- package/DNDDroppable.js +1 -0
- package/Dialog.js +4 -3
- package/DropFileInput.js +1 -0
- package/DroppableHorizontalList.js +18 -17
- package/DroppableList.js +18 -17
- package/Dropzone.js +6 -5
- package/FilteredList.js +11 -10
- package/FloatingActionButton.js +2 -1
- package/FormUploadProgress.js +2 -1
- package/ImageGallery.js +93 -92
- package/MaterialIcon.js +2 -1
- package/Modal.js +7 -6
- package/ModalMenu.js +4 -3
- package/ReactConstants.d.ts +18 -0
- package/ReactConstants.js +25 -36
- package/ReactConstants.js.map +1 -1
- package/ReadyListener.js +1 -0
- package/ResizeObserver.d.ts +1 -0
- package/Scrollable.js +38 -37
- package/ScrollableTable.d.ts +15 -0
- package/ScrollableTable.js +19 -32
- package/ScrollableTable.js.map +1 -1
- package/Size.js +3 -2
- package/Snackbar.js +1 -0
- package/SpinningProgress.js +1 -0
- package/Switch.js +3 -2
- package/Table.d.ts +8 -25
- package/Table.js +90 -95
- package/Table.js.map +1 -1
- package/TextField.js +7 -6
- package/Tools.d.ts +1 -1
- package/Tools.js +18 -17
- package/Tools.js.map +1 -1
- package/bundle.css +623 -623
- package/index.js +8 -5
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/router/Link.js +3 -2
- package/router/NavLink.js +3 -2
- package/router/Route.js +10 -9
- package/router/index.js +1 -0
- package/store/ProxyTools.js +1 -0
- package/store/Store.js +1 -0
package/ReadyListener.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
4
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/Scrollable.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
4
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
@@ -83,14 +84,14 @@ var Scrollable = function (_PureComponent) {
|
|
|
83
84
|
var offsetWidth = offsetWidthOf(viewport);
|
|
84
85
|
var scrollbarHeight = offsetHeightOf(scrollbar);
|
|
85
86
|
var scrollbarWidth = offsetWidthOf(scrollbarH);
|
|
86
|
-
var position = viewport
|
|
87
|
-
var positionH = viewport
|
|
87
|
+
var position = viewport[__scrollTop] / (scrollHeight - offsetHeight);
|
|
88
|
+
var positionH = viewport[__scrollLeft] / (scrollWidth - offsetWidth);
|
|
88
89
|
if (position > 1) {
|
|
89
|
-
viewport
|
|
90
|
+
viewport[__scrollTop] = scrollHeight - offsetHeight;
|
|
90
91
|
position = 1;
|
|
91
92
|
}
|
|
92
|
-
styleOf(thumb)
|
|
93
|
-
styleOf(thumbH)
|
|
93
|
+
styleOf(thumb)[__top] = position * (scrollbarHeight - offsetHeightOf(thumb)) + 'px';
|
|
94
|
+
styleOf(thumbH)[__left] = positionH * (scrollbarWidth - offsetWidthOf(thumbH)) + 'px';
|
|
94
95
|
if (position >= 0.98) {
|
|
95
96
|
!scrolledToBottom && orNoop(props().onScrolledToBottom)();
|
|
96
97
|
scrolledToBottom = true;
|
|
@@ -108,16 +109,16 @@ var Scrollable = function (_PureComponent) {
|
|
|
108
109
|
var reset = function reset() {
|
|
109
110
|
removeEventListener(WINDOW, 'mouseup', reset);
|
|
110
111
|
removeEventListener(WINDOW, 'mousemove', moveListener);
|
|
111
|
-
viewport.
|
|
112
|
+
viewport[__style].scrollBehavior = '';
|
|
112
113
|
scrolling = false;
|
|
113
114
|
};
|
|
114
115
|
var moveListener = function moveListener(e) {
|
|
115
116
|
if (!scrolling) return;
|
|
116
117
|
if (scrolling === 'v') {
|
|
117
|
-
viewport
|
|
118
|
+
viewport[__scrollTop] += (e.clientY - lastY) * ratio;
|
|
118
119
|
lastY = e.clientY;
|
|
119
120
|
} else if (scrolling === 'h') {
|
|
120
|
-
viewport
|
|
121
|
+
viewport[__scrollLeft] += (e.clientX - lastX) * ratioH;
|
|
121
122
|
lastX = e.clientX;
|
|
122
123
|
}
|
|
123
124
|
};
|
|
@@ -125,7 +126,7 @@ var Scrollable = function (_PureComponent) {
|
|
|
125
126
|
lastY = e.clientY;
|
|
126
127
|
scrolling = 'v';
|
|
127
128
|
ratio = scrollHeightOf(viewport) / offsetHeightOf(viewport);
|
|
128
|
-
viewport.
|
|
129
|
+
viewport[__style].scrollBehavior = 'unset';
|
|
129
130
|
addEventListener(WINDOW, 'mouseup', reset);
|
|
130
131
|
addEventListener(WINDOW, 'mousemove', moveListener);
|
|
131
132
|
};
|
|
@@ -135,7 +136,7 @@ var Scrollable = function (_PureComponent) {
|
|
|
135
136
|
lastX = e.clientX;
|
|
136
137
|
scrolling = 'h';
|
|
137
138
|
ratioH = scrollWidthOf(viewport) / offsetWidthOf(viewport);
|
|
138
|
-
viewport.
|
|
139
|
+
viewport[__style].scrollBehavior = 'unset';
|
|
139
140
|
addEventListener(WINDOW, 'mouseup', reset);
|
|
140
141
|
addEventListener(WINDOW, 'mousemove', moveListener);
|
|
141
142
|
};
|
|
@@ -143,37 +144,37 @@ var Scrollable = function (_PureComponent) {
|
|
|
143
144
|
thumbH.onmouseup = reset;
|
|
144
145
|
scrollbar.onclick = function (e) {
|
|
145
146
|
if (e.target === scrollbar) {
|
|
146
|
-
var thumbPosition = parseInt(styleOf(thumb)
|
|
147
|
-
viewport
|
|
147
|
+
var thumbPosition = parseInt(styleOf(thumb)[__top]);
|
|
148
|
+
viewport[__scrollTop] += offsetHeightOf(viewport) * 0.9 * (e.offsetY < thumbPosition ? -1 : 1);
|
|
148
149
|
}
|
|
149
150
|
};
|
|
150
151
|
scrollbarH.onclick = function (e) {
|
|
151
152
|
if (e.target === scrollbarH) {
|
|
152
|
-
var thumbPosition = parseInt(styleOf(thumbH)
|
|
153
|
-
viewport
|
|
153
|
+
var thumbPosition = parseInt(styleOf(thumbH)[__left]);
|
|
154
|
+
viewport[__scrollLeft] += offsetWidthOf(viewport) * 0.9 * (e.offsetX < thumbPosition ? -1 : 1);
|
|
154
155
|
}
|
|
155
156
|
};
|
|
156
157
|
var adjustScrollWidth = function adjustScrollWidth() {
|
|
157
158
|
if (NATIVE_SCROLL_WIDTH < 0) {
|
|
158
|
-
NATIVE_SCROLL_WIDTH = viewport.offsetWidth - viewport
|
|
159
|
+
NATIVE_SCROLL_WIDTH = viewport.offsetWidth - viewport[__clientWidth];
|
|
159
160
|
if (NATIVE_SCROLL_WIDTH === 0 && scrollHeightOf(viewport) !== offsetHeightOf(viewport)) {
|
|
160
161
|
NATIVE_SCROLL_WIDTH = -1;
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
if (NATIVE_SCROLL_HEIGHT < 0) {
|
|
164
|
-
NATIVE_SCROLL_HEIGHT = viewport.offsetHeight - viewport
|
|
165
|
+
NATIVE_SCROLL_HEIGHT = viewport.offsetHeight - viewport[__clientHeight];
|
|
165
166
|
if (NATIVE_SCROLL_HEIGHT === 0 && scrollWidthOf(viewport) !== offsetWidthOf(viewport)) {
|
|
166
167
|
NATIVE_SCROLL_HEIGHT = -1;
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
if (!adjustedScrollWidth) {
|
|
170
171
|
if (NATIVE_SCROLL_WIDTH >= 0 && status() !== WITHOUT_SCROLL) {
|
|
171
|
-
styleOf(viewport).paddingRight = NATIVE_SCROLL_WIDTH + scrollbar
|
|
172
|
-
styleOf(viewport).marginRight = -NATIVE_SCROLL_WIDTH - scrollbar
|
|
172
|
+
styleOf(viewport).paddingRight = NATIVE_SCROLL_WIDTH + scrollbar[__clientWidth] + 'px';
|
|
173
|
+
styleOf(viewport).marginRight = -NATIVE_SCROLL_WIDTH - scrollbar[__clientWidth] + 'px';
|
|
173
174
|
}
|
|
174
175
|
if (NATIVE_SCROLL_HEIGHT >= 0 && statusH() !== WITHOUT_SCROLL) {
|
|
175
|
-
styleOf(viewport).paddingBottom = NATIVE_SCROLL_HEIGHT + scrollbarH
|
|
176
|
-
styleOf(viewport).marginBottom = -NATIVE_SCROLL_HEIGHT - scrollbarH
|
|
176
|
+
styleOf(viewport).paddingBottom = NATIVE_SCROLL_HEIGHT + scrollbarH[__clientHeight] + 'px';
|
|
177
|
+
styleOf(viewport).marginBottom = -NATIVE_SCROLL_HEIGHT - scrollbarH[__clientHeight] + 'px';
|
|
177
178
|
}
|
|
178
179
|
adjustedScrollWidth = true;
|
|
179
180
|
}
|
|
@@ -214,15 +215,15 @@ var Scrollable = function (_PureComponent) {
|
|
|
214
215
|
var newRatio = scrollHeight / scrollbarHeight;
|
|
215
216
|
if (ratio === newRatio && Number.isFinite(newRatio) || Number.isNaN(newRatio)) return;
|
|
216
217
|
var offsetHeight = offsetHeightOf(viewport);
|
|
217
|
-
var horizontalScrollBarOffset = statusH() !== WITHOUT_SCROLL ? scrollbarH
|
|
218
|
+
var horizontalScrollBarOffset = statusH() !== WITHOUT_SCROLL ? scrollbarH[__clientHeight] + Math.max(NATIVE_SCROLL_HEIGHT, 0) : 0;
|
|
218
219
|
var containerOffsetHeight = offsetHeightOf(container) + horizontalScrollBarOffset;
|
|
219
220
|
if (containerOffsetHeight === scrollHeight && status() === WITHOUT_SCROLL) return;
|
|
220
|
-
if (props().autoScrollTop && scrollHeight - offsetHeight - viewport
|
|
221
|
-
viewport
|
|
221
|
+
if (props().autoScrollTop && scrollHeight - offsetHeight - viewport[__scrollTop] <= 20 && newRatio < ratio && Number.isFinite(newRatio) && Number.isFinite(ratio)) {
|
|
222
|
+
viewport[__scrollTop] = 0;
|
|
222
223
|
}
|
|
223
224
|
ratio = newRatio;
|
|
224
|
-
styleOf(thumb)
|
|
225
|
-
styleOf(container)
|
|
225
|
+
styleOf(thumb)[__height] = scrollbarHeight / newRatio + 'px';
|
|
226
|
+
styleOf(container)[__height] = scrollHeight - horizontalScrollBarOffset + 'px';
|
|
226
227
|
containerOffsetHeight = offsetHeightOf(container) + horizontalScrollBarOffset;
|
|
227
228
|
if (scrollBarModeOf(props()) === SCROLLBAR_MODE_HIDDEN) {
|
|
228
229
|
if (status() !== WITHOUT_SCROLL) hideScrollbar(scrollbar, viewport);
|
|
@@ -236,8 +237,8 @@ var Scrollable = function (_PureComponent) {
|
|
|
236
237
|
}
|
|
237
238
|
scrolledToBottom = false;
|
|
238
239
|
scrolledToTop = false;
|
|
239
|
-
var position = viewport
|
|
240
|
-
styleOf(thumb)
|
|
240
|
+
var position = viewport[__scrollTop] / (scrollHeight - offsetHeight);
|
|
241
|
+
styleOf(thumb)[__top] = position * (scrollbarHeight - offsetHeightOf(thumb)) + 'px';
|
|
241
242
|
};
|
|
242
243
|
var updateHorizontalScrollbar = function updateHorizontalScrollbar() {
|
|
243
244
|
var scrollWidth = scrollWidthOf(viewport);
|
|
@@ -246,16 +247,16 @@ var Scrollable = function (_PureComponent) {
|
|
|
246
247
|
var newRatio = scrollWidth / scrollbarWidth;
|
|
247
248
|
if (ratioH === newRatio && Number.isFinite(newRatio) || Number.isNaN(newRatio)) return;
|
|
248
249
|
var offsetWidth = offsetWidthOf(viewport);
|
|
249
|
-
var verticalScrollBarOffset = status() !== WITHOUT_SCROLL ? scrollbar
|
|
250
|
+
var verticalScrollBarOffset = status() !== WITHOUT_SCROLL ? scrollbar[__clientWidth] + Math.max(NATIVE_SCROLL_WIDTH, 0) : 0;
|
|
250
251
|
var containerOffsetWidth = offsetWidthOf(container) + verticalScrollBarOffset;
|
|
251
252
|
if (containerOffsetWidth === scrollWidth && statusH() === WITHOUT_SCROLL) return;
|
|
252
253
|
ratioH = newRatio;
|
|
253
|
-
styleOf(thumbH)
|
|
254
|
+
styleOf(thumbH)[__width] = scrollbarWidth / newRatio + 'px';
|
|
254
255
|
if (horizontalScrollBarModeOf(props()) === SCROLLBAR_MODE_HIDDEN) {
|
|
255
256
|
if (statusH() !== WITHOUT_SCROLL) hideHorizontalScrollbar(scrollbarH, viewport);
|
|
256
257
|
return;
|
|
257
258
|
}
|
|
258
|
-
styleOf(container)
|
|
259
|
+
styleOf(container)[__width] = scrollWidth - verticalScrollBarOffset + 'px';
|
|
259
260
|
containerOffsetWidth = offsetWidthOf(container) + verticalScrollBarOffset;
|
|
260
261
|
if (containerOffsetWidth < scrollWidth) {
|
|
261
262
|
adjustedScrollWidth = false;
|
|
@@ -263,8 +264,8 @@ var Scrollable = function (_PureComponent) {
|
|
|
263
264
|
} else {
|
|
264
265
|
hideHorizontalScrollbar(scrollbarH, viewport);
|
|
265
266
|
}
|
|
266
|
-
var position = viewport
|
|
267
|
-
styleOf(thumbH)
|
|
267
|
+
var position = viewport[__scrollLeft] / (scrollWidth - offsetWidth);
|
|
268
|
+
styleOf(thumbH)[__left] = position * (scrollbarWidth - offsetWidthOf(thumbH)) + 'px';
|
|
268
269
|
};
|
|
269
270
|
initTimeout = setTimeout(function () {
|
|
270
271
|
resizeInterval = setInterval(function () {
|
|
@@ -279,21 +280,21 @@ var Scrollable = function (_PureComponent) {
|
|
|
279
280
|
if (scrollBarModeOf(props()) !== scrollBarModeOf(prevProps)) init();else if (onScroll(props()) !== onScroll(prevProps)) init();
|
|
280
281
|
};
|
|
281
282
|
that.setScroll = function (y) {
|
|
282
|
-
viewportRef()
|
|
283
|
+
viewportRef()[__scrollTop] = y;
|
|
283
284
|
};
|
|
284
285
|
that.getScroll = function () {
|
|
285
|
-
return viewportRef()
|
|
286
|
+
return viewportRef()[__scrollTop];
|
|
286
287
|
};
|
|
287
288
|
that.getScrollHeight = function () {
|
|
288
289
|
return scrollHeightOf(viewportRef());
|
|
289
290
|
};
|
|
290
291
|
that.getHeight = function () {
|
|
291
|
-
return containerRef()
|
|
292
|
+
return containerRef()[__clientHeight];
|
|
292
293
|
};
|
|
293
294
|
that[render] = function () {
|
|
294
295
|
var _props = props();
|
|
295
|
-
var className = _props
|
|
296
|
-
children = _props
|
|
296
|
+
var className = _props[__className],
|
|
297
|
+
children = _props[__children];
|
|
297
298
|
return ReactCreateElement("div", {
|
|
298
299
|
[__className]: classNames('Scrollable', className, status() || WITH_SCROLL, statusH() + '-horizontal'),
|
|
299
300
|
style: styleOf(_props),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TableProps, TableState } from "./Table";
|
|
2
|
+
import Scrollable from "./Scrollable";
|
|
3
|
+
import "./ScrollableTable.css";
|
|
4
|
+
import { PureComponent } from "./ReactConstants";
|
|
5
|
+
export interface WithScrollable {
|
|
6
|
+
getScrollable: () => Scrollable;
|
|
7
|
+
}
|
|
8
|
+
export interface ScrollableTableProps<T> extends TableProps<T> {
|
|
9
|
+
scrollableProps?: any;
|
|
10
|
+
}
|
|
11
|
+
declare class ScrollableTable<T> extends PureComponent<ScrollableTableProps<T>, TableState<T>> implements WithScrollable {
|
|
12
|
+
constructor(properties: any);
|
|
13
|
+
getScrollable(): Scrollable;
|
|
14
|
+
}
|
|
15
|
+
export default ScrollableTable;
|
package/ScrollableTable.js
CHANGED
|
@@ -1,44 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { jsx as jsxRuntime_2 } from 'react/jsx-runtime';
|
|
3
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
4
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
6
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
5
7
|
import {className as __className} from "./ReactConstants";
|
|
6
8
|
import {children as __children} from "./ReactConstants";
|
|
7
|
-
import 'react';
|
|
8
|
-
import ReactCreateElement from './ReactCreateElement.js';
|
|
9
9
|
import Table from './Table.js';
|
|
10
10
|
import Scrollable from './Scrollable.js';
|
|
11
11
|
import { render, props, PureComponent } from './ReactConstants.js';
|
|
12
12
|
import { createRef } from './Tools.js';
|
|
13
|
-
import 'prop-types';
|
|
14
13
|
|
|
15
|
-
var ScrollableTable = function (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
that.getScrollable = function () {
|
|
32
|
-
return scrollableRef();
|
|
33
|
-
};
|
|
34
|
-
return _this;
|
|
35
|
-
}
|
|
36
|
-
return _createClass(ScrollableTable);
|
|
37
|
-
}(PureComponent);
|
|
38
|
-
var ScrollableTable$1 = ScrollableTable;
|
|
39
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
40
|
-
ScrollableTable.propTypes = Table.propTypes;
|
|
41
|
-
}
|
|
14
|
+
var ScrollableTable = /** @class */ (function (_super) {
|
|
15
|
+
__inherits(ScrollableTable, _super);
|
|
16
|
+
function ScrollableTable(properties) {
|
|
17
|
+
var _this = _super.call(this, properties) || this;
|
|
18
|
+
var that = _this;
|
|
19
|
+
var scrollableRef = createRef();
|
|
20
|
+
that[render] = function () {
|
|
21
|
+
return jsxRuntime_2("div", __extends({ [__className]: "ScrollableTable" }, { [__children]: jsxRuntime_2(Scrollable, __extends({ ref: scrollableRef }, props(that).scrollableProps, { [__children]: jsxRuntime_2(Table, __extends({}, props(that))) })) }));
|
|
22
|
+
};
|
|
23
|
+
that.getScrollable = function () { return scrollableRef(); };
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return ScrollableTable;
|
|
28
|
+
}(PureComponent));
|
|
42
29
|
|
|
43
|
-
export { ScrollableTable
|
|
30
|
+
export { ScrollableTable as default };
|
|
44
31
|
//# sourceMappingURL=ScrollableTable.js.map
|
package/ScrollableTable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollableTable.js","sources":["../../../src/react-ui-basics/ScrollableTable.
|
|
1
|
+
{"version":3,"file":"ScrollableTable.js","sources":["../../../src/src/react-ui-basics/ScrollableTable.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;;;;AAeA,IAAA,eAAA,kBAAA,UAAA,MAAA,EAAA;IAAiC,SAAqD,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA;AAElF,IAAA,SAAA,eAAA,CAAY,UAAU,EAAA;QAAtB,IACI,KAAA,GAAA,MAAA,CAAA,IAAA,CAAA,IAAA,EAAM,UAAU,CAAC,IAapB,IAAA,CAAA;QAZG,IAAM,IAAI,GAAG,KAAI,CAAC;AAElB,QAAA,IAAM,aAAa,GAAG,SAAS,EAAE,CAAC;QAElC,IAAI,CAAC,MAAM,CAAC,GAAG,YAAA;AACX,YAAA,OAAOA,YAAK,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,SAAS,EAAE,iBAAiB,EACpC,EAAA,EAAA,QAAA,EAAAA,YAAA,CAAC,UAAU,EAAA,QAAA,CAAA,EAAC,GAAG,EAAE,aAAa,EAAA,EAAM,KAAK,CAAC,IAAI,CAAC,CAAC,eAAe,EAC3D,EAAA,QAAA,EAAAA,YAAA,CAAC,KAAK,EAAA,QAAA,CAAA,EAAA,EAAK,KAAK,CAAC,IAAI,CAAC,CAAG,CAAA,EAAA,CAAA,CAChB,IACX,CAAC;AACX,SAAC,CAAA;QACD,IAAI,CAAC,aAAa,GAAG,YAAA,EAAM,OAAA,aAAa,EAAE,CAAf,EAAe,CAAA;;KAC7C;AAED,IAAA,eAAA,CAAA,SAAA,CAAA,aAAa,GAAb,YAAA;AACI,QAAA,OAAO,SAAS,CAAC;KACpB,CAAA;IACL,OAAC,eAAA,CAAA;AAAD,CArBA,CAAiC,aAAa,CAqB7C;;;;"}
|
package/Size.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
4
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
@@ -8,7 +9,7 @@ import ReactCreateElement from './ReactCreateElement.js';
|
|
|
8
9
|
import { isUndefined } from './Tools.js';
|
|
9
10
|
|
|
10
11
|
var Size = function Size(_ref) {
|
|
11
|
-
var value = _ref
|
|
12
|
+
var value = _ref[__value];
|
|
12
13
|
return ReactCreateElement("span", {
|
|
13
14
|
[__className]: "Size"
|
|
14
15
|
}, formatNumber(value, 1), "\xA0", formatAbbreviation(value));
|
|
@@ -20,7 +21,7 @@ var formatNumberWithMaxLength = function formatNumberWithMaxLength(size, fractio
|
|
|
20
21
|
do {
|
|
21
22
|
result = formatNumber(size, fractionalLength, toAbbreviation);
|
|
22
23
|
fractionalLength--;
|
|
23
|
-
} while (maxLength !== -1 && fractionalLength >= 0 && result
|
|
24
|
+
} while (maxLength !== -1 && fractionalLength >= 0 && result[__length] > maxLength);
|
|
24
25
|
return result;
|
|
25
26
|
};
|
|
26
27
|
function formatNumber(size, fractionalLength, toAbbreviation) {
|
package/Snackbar.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, slicedToArray as _slicedToArray, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
4
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
package/SpinningProgress.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
4
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
package/Switch.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import {clientHeight as __clientHeight, clientWidth as __clientWidth, getBoundingClientRect as __getBoundingClientRect, height as __height, left as __left, length as __length, pageX as __pageX, pageY as __pageY, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, top as __top, value as __value, width as __width} from "./CommonFields";
|
|
2
3
|
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
3
4
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
4
5
|
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
@@ -21,11 +22,11 @@ var Switch = function (_PureComponent) {
|
|
|
21
22
|
_this[render] = function () {
|
|
22
23
|
var _this$props = _this.props,
|
|
23
24
|
label = _this$props.label,
|
|
24
|
-
className = _this$props
|
|
25
|
+
className = _this$props[__className],
|
|
25
26
|
labelOn = _this$props.labelOn,
|
|
26
27
|
labelOff = _this$props.labelOff,
|
|
27
28
|
onChange = _this$props.onChange,
|
|
28
|
-
value = _this$props
|
|
29
|
+
value = _this$props[__value],
|
|
29
30
|
onClick = _this$props.onClick;
|
|
30
31
|
var id = _this.props.id || randomId;
|
|
31
32
|
return ReactCreateElement("div", {
|
package/Table.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ReactElement } from 'react';
|
|
1
|
+
import { ChangeEvent, Component, ReactElement } from 'react';
|
|
2
2
|
import './Table.css';
|
|
3
3
|
export declare const SORT_ASC: string;
|
|
4
4
|
export declare const SORT_DESC: string;
|
|
@@ -13,7 +13,11 @@ export interface RowProps<T> {
|
|
|
13
13
|
onClick?: (t: T) => void;
|
|
14
14
|
className?: string | ((e: T) => string);
|
|
15
15
|
columns: TableColumn<T>[];
|
|
16
|
-
|
|
16
|
+
cancelEditing: () => void;
|
|
17
|
+
onFinishEditing: () => void;
|
|
18
|
+
handleInputChange: (e: ChangeEvent) => void;
|
|
19
|
+
setValue: (v: any) => void;
|
|
20
|
+
setEditing: (t: T, i: number, field: string) => void;
|
|
17
21
|
}
|
|
18
22
|
export declare type Formatter<T, V> = ((value?: V, item?: T, format?: string) => ReactElement) | ((value: V, item: T) => ReactElement) | ((value: V) => ReactElement);
|
|
19
23
|
export interface TableColumn<T> {
|
|
@@ -24,6 +28,7 @@ export interface TableColumn<T> {
|
|
|
24
28
|
sortable?: boolean;
|
|
25
29
|
displayEditor?: boolean;
|
|
26
30
|
formatter?: Formatter<T, any>;
|
|
31
|
+
format?: string;
|
|
27
32
|
editable?: boolean | ((t: T) => boolean);
|
|
28
33
|
editor?: typeof editorSelect | typeof editorSwitch | ((t: T, cancel: () => void, isEditing: boolean) => ReactElement);
|
|
29
34
|
preEditor?: (a: any) => any;
|
|
@@ -49,28 +54,6 @@ export interface TableState<T> {
|
|
|
49
54
|
editing?: any;
|
|
50
55
|
}
|
|
51
56
|
declare class Table<T> extends Component<TableProps<T>, TableState<T>> {
|
|
52
|
-
|
|
53
|
-
updateHeadersInterval: number;
|
|
54
|
-
constructor(props: any);
|
|
55
|
-
componentDidMount(): void;
|
|
56
|
-
setData: (data: any) => void;
|
|
57
|
-
componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
|
|
58
|
-
render(): JSX.Element;
|
|
59
|
-
componentWillUnmount(): void;
|
|
60
|
-
updateHeaders: () => void;
|
|
61
|
-
cancelEditing: () => void;
|
|
62
|
-
setEditing: (item: any, columnIndex: any, field: any) => void;
|
|
63
|
-
prepareEditing: (item: any, field: any, columnIndex: any) => {
|
|
64
|
-
id: any;
|
|
65
|
-
value: any;
|
|
66
|
-
columnIndex: any;
|
|
67
|
-
item: any;
|
|
68
|
-
field: any;
|
|
69
|
-
};
|
|
70
|
-
handleInputChange: (event: any) => void;
|
|
71
|
-
extractValue: (event: any) => any;
|
|
72
|
-
selectNewValue: (value: any) => void;
|
|
73
|
-
onFinishEditing: () => void;
|
|
74
|
-
sort: (e: any, sortBy: any, comparator: any) => void;
|
|
57
|
+
constructor(properties: any);
|
|
75
58
|
}
|
|
76
59
|
export default Table;
|