react-ui-basics 0.0.157 → 0.0.160

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.
Files changed (81) hide show
  1. package/Animated.js +5 -2
  2. package/AutocompleteSelect.js +16 -15
  3. package/Button.js +13 -13
  4. package/Checkbox.js +3 -2
  5. package/CircleProgress.js +2 -1
  6. package/CommonFields.js +23 -0
  7. package/DNDContainer.js +17 -16
  8. package/DNDDraggable.js +1 -0
  9. package/DNDDroppable.js +1 -0
  10. package/Dialog.js +4 -3
  11. package/DropFileInput.js +1 -0
  12. package/DroppableHorizontalList.js +13 -12
  13. package/DroppableList.js +13 -12
  14. package/Dropzone.js +8 -7
  15. package/FilteredList.js +13 -12
  16. package/FloatingActionButton.js +2 -1
  17. package/FormUploadProgress.js +2 -1
  18. package/ImageGallery.js +86 -85
  19. package/MaterialIcon.js +2 -1
  20. package/Modal.js +8 -7
  21. package/ModalMenu.js +3 -2
  22. package/ReactConstants.js +6 -1
  23. package/ReactCreateElement.js +1 -0
  24. package/ReadyListener.js +1 -0
  25. package/ResizeObserver.d.ts +1 -0
  26. package/Scrollable.js +23 -22
  27. package/ScrollableTable.js +1 -0
  28. package/Size.js +3 -2
  29. package/Snackbar.js +1 -0
  30. package/SpinningProgress.js +1 -0
  31. package/Switch.js +3 -2
  32. package/Table.js +13 -12
  33. package/TextField.js +7 -6
  34. package/Tools.d.ts +1 -0
  35. package/Tools.js +13 -12
  36. package/_virtual/_commonjsHelpers.js +1 -0
  37. package/_virtual/_react.js +1 -0
  38. package/_virtual/react-jsx-runtime.development.js +1 -0
  39. package/bundle.css +576 -576
  40. package/index.js +8 -5
  41. package/package.json +1 -1
  42. package/router/HistoryTools.js +1 -0
  43. package/router/Link.js +3 -2
  44. package/router/NavLink.js +3 -2
  45. package/router/Route.js +9 -8
  46. package/router/index.js +1 -0
  47. package/store/ProxyTools.js +1 -0
  48. package/store/Store.js +1 -0
  49. package/Animated.js.map +0 -1
  50. package/AutocompleteSelect.js.map +0 -1
  51. package/Button.js.map +0 -1
  52. package/Checkbox.js.map +0 -1
  53. package/CircleProgress.js.map +0 -1
  54. package/DNDContainer.js.map +0 -1
  55. package/DNDDraggable.js.map +0 -1
  56. package/DNDDroppable.js.map +0 -1
  57. package/Dialog.js.map +0 -1
  58. package/DropFileInput.js.map +0 -1
  59. package/DroppableHorizontalList.js.map +0 -1
  60. package/DroppableList.js.map +0 -1
  61. package/Dropzone.js.map +0 -1
  62. package/FilteredList.js.map +0 -1
  63. package/FloatingActionButton.js.map +0 -1
  64. package/FormUploadProgress.js.map +0 -1
  65. package/ImageGallery.js.map +0 -1
  66. package/MaterialIcon.js.map +0 -1
  67. package/Modal.js.map +0 -1
  68. package/ModalMenu.js.map +0 -1
  69. package/ReactConstants.js.map +0 -1
  70. package/ReactCreateElement.js.map +0 -1
  71. package/ReadyListener.js.map +0 -1
  72. package/Scrollable.js.map +0 -1
  73. package/ScrollableTable.js.map +0 -1
  74. package/Size.js.map +0 -1
  75. package/Snackbar.js.map +0 -1
  76. package/SpinningProgress.js.map +0 -1
  77. package/Switch.js.map +0 -1
  78. package/Table.js.map +0 -1
  79. package/TextField.js.map +0 -1
  80. package/Tools.js.map +0 -1
  81. package/index.js.map +0 -1
package/FilteredList.js CHANGED
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, objectSpread2 as _objectSpread2 } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -21,7 +22,7 @@ var FilteredList = function (_PureComponent) {
21
22
  _classCallCheck(this, FilteredList);
22
23
  _this = _super.call(this, _props);
23
24
  _this.updateList = function (props) {
24
- var data = props.data;
25
+ var data = __data(props);
25
26
  var selected = _this.state.selected;
26
27
  _this.list = data || [];
27
28
  if (!_this.list.includes(selected)) _this.setState({
@@ -54,10 +55,10 @@ var FilteredList = function (_PureComponent) {
54
55
  return selected === id;
55
56
  });
56
57
  if (_this.hidden[list[position]]) position = -1;
57
- while (++position < list.length) {
58
+ while (++position < __length(list)) {
58
59
  if (!_this.hidden[list[position]]) break;
59
60
  }
60
- if (position < list.length) {
61
+ if (position < __length(list)) {
61
62
  var id = list[position];
62
63
  _this.setState({
63
64
  selected: id
@@ -71,7 +72,7 @@ var FilteredList = function (_PureComponent) {
71
72
  var position = list.findIndex(function (id) {
72
73
  return selected === id;
73
74
  });
74
- if (_this.hidden[list[position]]) position = list.length;
75
+ if (_this.hidden[list[position]]) position = __length(list);
75
76
  while (--position >= 0) {
76
77
  if (!_this.hidden[list[position]]) break;
77
78
  }
@@ -88,9 +89,9 @@ var FilteredList = function (_PureComponent) {
88
89
  var container = _this.el;
89
90
  var scrollTop = container.getScroll();
90
91
  var height = container.getHeight();
91
- var isVisible = scrollTop <= child.offsetTop && scrollTop + height >= child.offsetTop + child.clientHeight;
92
+ var isVisible = scrollTop <= child.offsetTop && scrollTop + height >= child.offsetTop + __clientHeight(child);
92
93
  if (!isVisible) {
93
- var scrollToBottom = child.offsetTop + child.clientHeight - height;
94
+ var scrollToBottom = child.offsetTop + __clientHeight(child) - height;
94
95
  var scrollToTop = child.offsetTop;
95
96
  if (Math.abs(scrollTop - scrollToTop) < Math.abs(scrollTop - scrollToBottom)) {
96
97
  container.setScroll(scrollToTop);
@@ -127,7 +128,7 @@ var FilteredList = function (_PureComponent) {
127
128
  }, {
128
129
  key: "componentDidUpdate",
129
130
  value: function componentDidUpdate(prevProps, prevState, snapshot) {
130
- if (this.props.data === prevProps.data) return;
131
+ if (this.props.data === __data(prevProps)) return;
131
132
  this.updateList(this.props);
132
133
  }
133
134
  }, {
@@ -135,15 +136,15 @@ var FilteredList = function (_PureComponent) {
135
136
  value: function render() {
136
137
  var _this2 = this;
137
138
  var _this$props = this.props,
138
- data = _this$props.data,
139
+ data = __data(_this$props),
139
140
  labels = _this$props.labels,
140
141
  filter = _this$props.filter,
141
- className = _this$props.className,
142
+ className = _this$props[__className],
142
143
  selected = _this$props.selected,
143
144
  inline = _this$props.inline,
144
145
  childComponent = _this$props.childComponent,
145
146
  childProps = _this$props.childProps,
146
- style = _this$props.style,
147
+ style = __style(_this$props),
147
148
  scroll = _this$props.scroll;
148
149
  return ReactCreateElement(Scrollable, {
149
150
  [__className]: classNames('FilteredList', className, inline ? 'inline' : 'popup'),
@@ -216,7 +217,7 @@ var ItemWrapper = function (_React$Component) {
216
217
  onMouseEnter = _this$props2.onMouseEnter,
217
218
  onMouseLeave = _this$props2.onMouseLeave,
218
219
  classProvider = _this$props2.classProvider,
219
- className = _this$props2.className,
220
+ className = _this$props2[__className],
220
221
  childComponent = _this$props2.childComponent,
221
222
  childProps = _this$props2.childProps;
222
223
  var child = React.createElement(childComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
@@ -226,7 +227,7 @@ var ItemWrapper = function (_React$Component) {
226
227
  return _this3.data = data;
227
228
  }
228
229
  }));
229
- var cssClass = orNoop(classProvider)(this.data);
230
+ var cssClass = orNoop(classProvider)(__data(this));
230
231
  return ReactCreateElement("div", {
231
232
  [__className]: classNames('ItemWrapper', cssClass, className),
232
233
  onMouseEnter: onMouseEnter,
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import 'react';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -14,7 +15,7 @@ var FloatingActionButton = function FloatingActionButton(_ref) {
14
15
  var icon = _ref.icon,
15
16
  onClick = _ref.onClick,
16
17
  mini = _ref.mini,
17
- className = _ref.className,
18
+ className = _ref[__className],
18
19
  hidden = _ref.hidden;
19
20
  return ReactCreateElement(Button, {
20
21
  onClick: onClick,
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import React from 'react';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -19,7 +20,7 @@ var defaultValueFormat = function defaultValueFormat(value, loaded, total) {
19
20
  return ReactCreateElement(React.Fragment, null, formatNumberWithMaxLength(loaded, 1, abbreviation, 4), "/", formatNumberWithMaxLength(total, 1, abbreviation, 4), ReactCreateElement("br", null), abbreviation);
20
21
  };
21
22
  var FormUploadProgress = function FormUploadProgress(_ref) {
22
- var value = _ref.value,
23
+ var value = __value(_ref),
23
24
  cancel = _ref.cancel,
24
25
  loaded = _ref.loaded,
25
26
  total = _ref.total,
package/ImageGallery.js CHANGED
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import { createClass as _createClass, classCallCheck as _classCallCheck, objectSpread2 as _objectSpread2, defineProperty as _defineProperty, inherits as _inherits, createSuper as _createSuper, assertThisInitialized as _assertThisInitialized, slicedToArray as _slicedToArray, extends as _extends, toConsumableArray as _toConsumableArray } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -25,8 +26,8 @@ var previewWidth = previewRatio * previewHeight;
25
26
  var previewPadding = 8;
26
27
  var previewsHeight = previewHeight + 15;
27
28
  var calculatePosition = function calculatePosition(it, ratio, width, height, previewsHeight, embedded, container) {
28
- var windowWidth = embedded ? container.clientWidth : min(DOCUMENT.body.clientWidth, WINDOW.innerWidth);
29
- var windowHeight = embedded ? container.clientHeight : min(DOCUMENT.body.clientHeight, WINDOW.innerHeight);
29
+ var windowWidth = embedded ? __clientWidth(container) : min(DOCUMENT.body.clientWidth, WINDOW.innerWidth);
30
+ var windowHeight = embedded ? __clientHeight(container) : min(DOCUMENT.body.clientHeight, WINDOW.innerHeight);
30
31
  var offset = it.offset;
31
32
  if (offset == null) offset = embedded ? 0 : windowHeight * 0.03;
32
33
  var offsetTop = it.offsetTop;
@@ -116,7 +117,7 @@ var Actions = _createClass(function Actions() {
116
117
  Actions.replaceImages = function (images) {
117
118
  return function (dispatch, getState) {
118
119
  var state = getState();
119
- var length = images.length;
120
+ var length = __length(images);
120
121
  var nextState = _objectSpread2({}, state);
121
122
  nextState.images = images.map(function (item) {
122
123
  var image = state.images.find(function (it) {
@@ -127,13 +128,13 @@ Actions.replaceImages = function (images) {
127
128
  var el = it.el;
128
129
  if (el) {
129
130
  var rect = el.getBoundingClientRect();
130
- var fromWidth = el.clientWidth;
131
- var fromHeight = el.clientHeight;
132
- it.fromLeftPx = toPx(rect.left);
133
- it.fromTopPx = toPx(rect.top);
131
+ var fromWidth = __clientWidth(el);
132
+ var fromHeight = __clientHeight(el);
133
+ it.fromLeftPx = toPx(__left(rect));
134
+ it.fromTopPx = toPx(__top(rect));
134
135
  it.fromWidthPx = toPx(fromWidth);
135
136
  var ratio = fromWidth / fromHeight;
136
- calculatePosition(it, ratio, el.naturalWidth || el.width, el.naturalHeight || el.height, withPreviews ? previewsHeight : 0, embedded, container);
137
+ calculatePosition(it, ratio, el.naturalWidth || __width(el), el.naturalHeight || __height(el), withPreviews ? previewsHeight : 0, embedded, container);
137
138
  } else {
138
139
  it.toLeft = 100;
139
140
  it.toTop = 100;
@@ -150,8 +151,8 @@ Actions.replaceImages = function (images) {
150
151
  if (preview) return preview;
151
152
  var el = item.el;
152
153
  if (!el) return {};
153
- var width = el.clientWidth;
154
- var height = el.clientHeight;
154
+ var width = __clientWidth(el);
155
+ var height = __clientHeight(el);
155
156
  return calculatePreview(width, height, el.src);
156
157
  });
157
158
  dispatch({
@@ -163,7 +164,7 @@ Actions.replaceImages = function (images) {
163
164
  Actions.show = function (gallery) {
164
165
  return function (dispatch) {
165
166
  var images = gallery.images;
166
- var length = images.length;
167
+ var length = __length(images);
167
168
  var withPreviews = length > 1 && (gallery.withPreviews === UNDEFINED || !!gallery.withPreviews);
168
169
  var container = gallery.container;
169
170
  var embedded = gallery.embedded;
@@ -178,13 +179,13 @@ Actions.show = function (gallery) {
178
179
  var el = it.el;
179
180
  if (el) {
180
181
  var rect = el.getBoundingClientRect();
181
- var fromWidth = el.clientWidth;
182
- var fromHeight = el.clientHeight;
183
- it.fromLeftPx = toPx(rect.left);
184
- it.fromTopPx = toPx(rect.top);
182
+ var fromWidth = __clientWidth(el);
183
+ var fromHeight = __clientHeight(el);
184
+ it.fromLeftPx = toPx(__left(rect));
185
+ it.fromTopPx = toPx(__top(rect));
185
186
  it.fromWidthPx = toPx(fromWidth);
186
187
  var ratio = fromWidth / fromHeight;
187
- calculatePosition(it, ratio, el.naturalWidth || el.width, el.naturalHeight || el.height, withPreviews ? previewsHeight : 0, embedded, container);
188
+ calculatePosition(it, ratio, el.naturalWidth || __width(el), el.naturalHeight || __height(el), withPreviews ? previewsHeight : 0, embedded, container);
188
189
  } else {
189
190
  it.toLeft = 100;
190
191
  it.toTop = 100;
@@ -200,8 +201,8 @@ Actions.show = function (gallery) {
200
201
  images: images.map(function (it) {
201
202
  var el = it.el;
202
203
  if (!el) return {};
203
- var width = el.clientWidth;
204
- var height = el.clientHeight;
204
+ var width = __clientWidth(el);
205
+ var height = __clientHeight(el);
205
206
  return calculatePreview(width, height, el.src);
206
207
  })
207
208
  }
@@ -273,7 +274,7 @@ Actions.loadPreview = function (item) {
273
274
  };
274
275
  };
275
276
  var reducers = (_reducers = {}, _defineProperty(_reducers, ACTION_IMAGE_GALLERY_SHOW, function (state, action) {
276
- return _objectSpread2(_objectSpread2({}, action.data), {}, {
277
+ return _objectSpread2(_objectSpread2({}, __data(action)), {}, {
277
278
  open: true
278
279
  });
279
280
  }), _defineProperty(_reducers, ACTION_IMAGE_GALLERY_CLOSE, function (state, action) {
@@ -285,11 +286,11 @@ var reducers = (_reducers = {}, _defineProperty(_reducers, ACTION_IMAGE_GALLERY_
285
286
  var result = _objectSpread2(_objectSpread2({}, state), {}, {
286
287
  images: images
287
288
  });
288
- for (var i = 0; i < images.length; i++) {
289
+ for (var i = 0; i < __length(images); i++) {
289
290
  if (!images[i].width && !images[i].fromWidthPx) continue;
290
291
  var it = _objectSpread2({}, images[i]);
291
- var width = it.width || Number.parseInt(it.fromWidthPx);
292
- var height = it.height || Number.parseInt(it.fromHeightPx);
292
+ var width = __width(it) || Number.parseInt(it.fromWidthPx);
293
+ var height = __height(it) || Number.parseInt(it.fromHeightPx);
293
294
  calculatePosition(it, width / height, width, height, result.previews.show ? previewsHeight : 0, state.embedded, state.container);
294
295
  images[i] = it;
295
296
  }
@@ -304,8 +305,8 @@ var reducers = (_reducers = {}, _defineProperty(_reducers, ACTION_IMAGE_GALLERY_
304
305
  var index = images.findIndex(function (it) {
305
306
  return it.id === item.id;
306
307
  });
307
- var width = image.width;
308
- var height = image.height;
308
+ var width = __width(image);
309
+ var height = __height(image);
309
310
  var it = _objectSpread2(_objectSpread2({}, images[index]), {}, {
310
311
  loaded: true,
311
312
  width: width,
@@ -325,11 +326,11 @@ var reducers = (_reducers = {}, _defineProperty(_reducers, ACTION_IMAGE_GALLERY_
325
326
  return it.id === item.id;
326
327
  });
327
328
  var it = _objectSpread2({}, images[index]);
328
- if (!it.toWidth || !it.toHeight) calculatePosition(it, image.width / image.height, image.width, image.height, result.previews.show ? previewsHeight : 0, state.embedded, state.container);
329
+ if (!it.toWidth || !it.toHeight) calculatePosition(it, __width(image) / __height(image), __width(image), __height(image), result.previews.show ? previewsHeight : 0, state.embedded, state.container);
329
330
  images[index] = it;
330
331
  var previewImages = _toConsumableArray(state.previews.images);
331
332
  result.previews.images = previewImages;
332
- var preview = calculatePreview(image.width, image.height, image.src);
333
+ var preview = calculatePreview(__width(image), __height(image), image.src);
333
334
  previewImages[index] = preview;
334
335
  return result;
335
336
  }), _reducers);
@@ -387,7 +388,7 @@ var ImageGallery = function (_React$Component) {
387
388
  var indexValue = index() !== UNDEFINED ? index() : props().index;
388
389
  var image = images[indexValue];
389
390
  if (!image) {
390
- var i = images.length - 1;
391
+ var i = __length(images) - 1;
391
392
  if (i === -1) {
392
393
  if (prevProps.images !== images) {
393
394
  onClose();
@@ -451,22 +452,22 @@ var ImageGallery = function (_React$Component) {
451
452
  var resetZoom = function resetZoom() {
452
453
  if (!zoomed()) return;
453
454
  zoomed(false);
454
- zoomedImage.style.width = defaultWidth;
455
- zoomedImage.style.left = defaultLeft;
456
- zoomedImage.style.top = defaultTop;
457
- zoomedImage.style.transition = null;
455
+ __style(zoomedImage).width = defaultWidth;
456
+ __style(zoomedImage).left = defaultLeft;
457
+ __style(zoomedImage).top = defaultTop;
458
+ __style(zoomedImage).transition = null;
458
459
  touchpadStarted = null;
459
460
  };
460
461
  var initZoom = function initZoom() {
461
462
  zoomed(true);
462
- defaultWidth = zoomedImage.style.width;
463
- defaultLeft = zoomedImage.style.left;
464
- defaultTop = zoomedImage.style.top;
463
+ defaultWidth = __style(zoomedImage).width;
464
+ defaultLeft = __style(zoomedImage).left;
465
+ defaultTop = __style(zoomedImage).top;
465
466
  };
466
467
  var initTouchpadDragging = function initTouchpadDragging() {
467
- oldLeft = Number.parseFloat(zoomedImage.style.left);
468
- oldTop = Number.parseFloat(zoomedImage.style.top);
469
- zoomedImage.style.transition = 'none';
468
+ oldLeft = Number.parseFloat(__style(zoomedImage).left);
469
+ oldTop = Number.parseFloat(__style(zoomedImage).top);
470
+ __style(zoomedImage).transition = 'none';
470
471
  touchpadStarted = true;
471
472
  };
472
473
  var onWheel = function onWheel(e) {
@@ -478,33 +479,33 @@ var ImageGallery = function (_React$Component) {
478
479
  if (e.ctrlKey) {
479
480
  var diff = e.deltaY * 0.005;
480
481
  var newZoom = Math.min(Math.max(zoomValue + diff, 0.5), 10);
481
- var zoomX = e.pageX;
482
+ var zoomX = __pageX(e);
482
483
  oldLeft = zoomX - (zoomX - oldLeft) * newZoom / zoomValue;
483
- var zoomY = e.pageY;
484
+ var zoomY = __pageY(e);
484
485
  oldTop = zoomY - (zoomY - oldTop) * newZoom / zoomValue;
485
486
  zoomValue = newZoom;
486
- zoomedImage.style.width = zoomValue * 100 + '%';
487
+ __style(zoomedImage).width = zoomValue * 100 + '%';
487
488
  } else {
488
489
  oldLeft += e.deltaX * 0.5;
489
490
  oldTop += e.deltaY * 0.5;
490
491
  }
491
- zoomedImage.style.left = oldLeft + 'px';
492
- zoomedImage.style.top = oldTop + 'px';
492
+ __style(zoomedImage).left = oldLeft + 'px';
493
+ __style(zoomedImage).top = oldTop + 'px';
493
494
  };
494
495
  var moveListenerAdded;
495
496
  var onTouchStart = function onTouchStart(e) {
496
497
  e.swipeProcessed = false;
497
498
  if (e.button === 2) return;
498
499
  var touches = e.touches || [{
499
- pageX: e.pageX,
500
- pageY: e.pageY
500
+ pageX: __pageX(e),
501
+ pageY: __pageY(e)
501
502
  }];
502
- zoomedImage = e.target;
503
+ zoomedImage = __target(e);
503
504
  zoomedImage = zoomedImage.tagName.toLowerCase() === 'img' ? zoomedImage.parentElement : zoomedImage;
504
- oldLeft = Number.parseFloat(zoomedImage.style.left);
505
- oldTop = Number.parseFloat(zoomedImage.style.top);
505
+ oldLeft = Number.parseFloat(__style(zoomedImage).left);
506
+ oldTop = Number.parseFloat(__style(zoomedImage).top);
506
507
  if (zoomed()) {
507
- zoomedImage.style.transition = 'none';
508
+ __style(zoomedImage).transition = 'none';
508
509
  }
509
510
  if (!moveListenerAdded) {
510
511
  addEventListener(_this.gallery, 'touchmove', onTouchMove, false);
@@ -513,8 +514,8 @@ var ImageGallery = function (_React$Component) {
513
514
  if (touches.length === 2) {
514
515
  if (zoomed()) zoomValueStarted = zoomValue;else if (!props().embedded) {
515
516
  initZoom();
516
- zoomedImage.style.transition = 'none';
517
- zoomValueStarted = zoomValue = Number.parseFloat(zoomedImage.style.width) / WINDOW.innerWidth;
517
+ __style(zoomedImage).transition = 'none';
518
+ zoomValueStarted = zoomValue = Number.parseFloat(__style(zoomedImage).width) / WINDOW.innerWidth;
518
519
  }
519
520
  }
520
521
  touchesStart = touches;
@@ -525,21 +526,21 @@ var ImageGallery = function (_React$Component) {
525
526
  var distance = function distance(touches) {
526
527
  var a = touches[0];
527
528
  var b = touches[1];
528
- return Math.sqrt(power2(a.pageX - b.pageX) + power2(a.pageY - b.pageY));
529
+ return Math.sqrt(power2(__pageX(a) - __pageX(b)) + power2(__pageY(a) - __pageY(b)));
529
530
  };
530
531
  var center = function center(touches) {
531
532
  var a = touches[0];
532
533
  var b = touches[1];
533
534
  return {
534
- x: (a.pageX + b.pageX) / 2,
535
- y: (a.pageY + b.pageY) / 2
535
+ x: (__pageX(a) + __pageX(b)) / 2,
536
+ y: (__pageY(a) + __pageY(b)) / 2
536
537
  };
537
538
  };
538
539
  var onTouchMove = function onTouchMove(e) {
539
540
  if (!touchesStart) return;
540
541
  var touches = e.touches || [{
541
- pageX: e.pageX,
542
- pageY: e.pageY
542
+ pageX: __pageX(e),
543
+ pageY: __pageY(e)
543
544
  }];
544
545
  if (zoomed()) {
545
546
  preventDefault(e);
@@ -551,24 +552,24 @@ var ImageGallery = function (_React$Component) {
551
552
  var newLeft = zoomX - (zoomX - oldLeft) * zoomValue / zoomValueStarted;
552
553
  var zoomY = zoomedAt.y;
553
554
  var newTop = zoomY - (zoomY - oldTop) * zoomValue / zoomValueStarted;
554
- zoomedImage.style.left = newLeft + 'px';
555
- zoomedImage.style.top = newTop + 'px';
556
- zoomedImage.style.width = zoomValue * 100 + '%';
555
+ __style(zoomedImage).left = newLeft + 'px';
556
+ __style(zoomedImage).top = newTop + 'px';
557
+ __style(zoomedImage).width = zoomValue * 100 + '%';
557
558
  return;
558
559
  } else {
559
560
  var _touch = touches[0];
560
561
  var _touchStart = touchesStart[0];
561
- var _newLeft = oldLeft + _touch.pageX - _touchStart.pageX;
562
- var _newTop = oldTop + _touch.pageY - _touchStart.pageY;
563
- zoomedImage.style.left = _newLeft + 'px';
564
- zoomedImage.style.top = _newTop + 'px';
562
+ var _newLeft = oldLeft + __pageX(_touch) - __pageX(_touchStart);
563
+ var _newTop = oldTop + __pageY(_touch) - __pageY(_touchStart);
564
+ __style(zoomedImage).left = _newLeft + 'px';
565
+ __style(zoomedImage).top = _newTop + 'px';
565
566
  return;
566
567
  }
567
568
  }
568
- if (touches.length > 1 || zoomed()) return;
569
+ if (__length(touches) > 1 || zoomed()) return;
569
570
  var touch = touches[0];
570
571
  var touchStart = touchesStart[0];
571
- shift(touch.pageX - touchStart.pageX);
572
+ shift(__pageX(touch) - __pageX(touchStart));
572
573
  };
573
574
  var onTouchEnd = function onTouchEnd(e) {
574
575
  if (!touchesStart) return;
@@ -580,13 +581,13 @@ var ImageGallery = function (_React$Component) {
580
581
  return;
581
582
  }
582
583
  var touches = e.changedTouches || [{
583
- pageX: e.pageX,
584
- pageY: e.pageY
584
+ pageX: __pageX(e),
585
+ pageY: __pageY(e)
585
586
  }];
586
587
  var touchEnd = touches[0];
587
588
  var touchStart = touchesStart[0];
588
- var distX = touchEnd.pageX - touchStart.pageX;
589
- var distY = touchEnd.pageY - touchStart.pageY;
589
+ var distX = __pageX(touchEnd) - __pageX(touchStart);
590
+ var distY = __pageY(touchEnd) - __pageY(touchStart);
590
591
  touchesStart = UNDEFINED;
591
592
  shift(0);
592
593
  var minDistance = 20;
@@ -603,7 +604,7 @@ var ImageGallery = function (_React$Component) {
603
604
  previews = _props.previews;
604
605
  index(i);
605
606
  previous(prev);
606
- previewScroll(calculatePreviewsScroll(i, previews.images.length, previews.width));
607
+ previewScroll(calculatePreviewsScroll(i, previews.images.length, __width(previews)));
607
608
  };
608
609
  var left = function left(e) {
609
610
  if (zoomed()) return;
@@ -619,7 +620,7 @@ var ImageGallery = function (_React$Component) {
619
620
  var _props2 = props(),
620
621
  images = _props2.images;
621
622
  var indexValue = index() !== UNDEFINED ? index() : props().index;
622
- if (indexValue < images.length - 1) scrollTo(indexValue + 1, indexValue);else if (props().loop) scrollTo(0, indexValue);
623
+ if (indexValue < __length(images) - 1) scrollTo(indexValue + 1, indexValue);else if (props().loop) scrollTo(0, indexValue);
623
624
  };
624
625
  that.scrollTo = scrollTo;
625
626
  that.left = left;
@@ -647,9 +648,9 @@ var ImageGallery = function (_React$Component) {
647
648
  embedded = _props4.embedded,
648
649
  loop = _props4.loop,
649
650
  _onClick = _props4.onClick,
650
- children = _props4.children;
651
+ children = _props4[__children];
651
652
  var indexValue = index() !== UNDEFINED ? index() : props().index;
652
- var length = images.length;
653
+ var length = __length(images);
653
654
  var isZoomed = zoomed();
654
655
  var shiftValue = shift() || 0;
655
656
  previous();
@@ -686,24 +687,24 @@ var ImageGallery = function (_React$Component) {
686
687
  }, ReactCreateElement("div", {
687
688
  draggable: false,
688
689
  onDoubleClick: function onDoubleClick(e) {
689
- var img = e.target;
690
- if (img.naturalWidth === img.clientWidth && img.naturalHeight === img.clientHeight) return;
690
+ var img = __target(e);
691
+ if (img.naturalWidth === __clientWidth(img) && img.naturalHeight === __clientHeight(img)) return;
691
692
  if (!isZoomed) {
692
693
  zoomedImage = img.tagName.toLowerCase() === 'img' ? img.parentElement : img;
693
694
  initZoom();
694
695
  zoomValue = 2;
695
696
  var newWidth = WINDOW.innerWidth * 2;
696
- var oldWidth = Number.parseFloat(zoomedImage.style.width);
697
- var _oldLeft = Number.parseFloat(zoomedImage.style.left);
698
- var zoomX = e.pageX;
697
+ var oldWidth = Number.parseFloat(__style(zoomedImage).width);
698
+ var _oldLeft = Number.parseFloat(__style(zoomedImage).left);
699
+ var zoomX = __pageX(e);
699
700
  var diff = newWidth / oldWidth;
700
701
  var newLeft = zoomX - (zoomX - _oldLeft) * diff;
701
- var _oldTop = Number.parseFloat(zoomedImage.style.top);
702
- var zoomY = e.pageY;
702
+ var _oldTop = Number.parseFloat(__style(zoomedImage).top);
703
+ var zoomY = __pageY(e);
703
704
  var newTop = zoomY - (zoomY - _oldTop) * diff;
704
- zoomedImage.style.width = '200%';
705
- zoomedImage.style.left = newLeft + 'px';
706
- zoomedImage.style.top = newTop + 'px';
705
+ __style(zoomedImage).width = '200%';
706
+ __style(zoomedImage).left = newLeft + 'px';
707
+ __style(zoomedImage).top = newTop + 'px';
707
708
  } else {
708
709
  resetZoom();
709
710
  }
@@ -737,7 +738,7 @@ var ImageGallery = function (_React$Component) {
737
738
  }, ReactCreateElement("div", {
738
739
  [__className]: "previews",
739
740
  style: {
740
- width: previews.width
741
+ width: __width(previews)
741
742
  }
742
743
  }, ReactCreateElement("div", {
743
744
  [__className]: "viewport"
@@ -827,12 +828,12 @@ var ImageGalleryContainer = function (_React$Component2) {
827
828
  load: load,
828
829
  close: close,
829
830
  recalculate: recalculate
830
- }), that.props.children);
831
+ }), that.props[__children]);
831
832
  };
832
833
  that[componentDidMount] = function () {
833
834
  props()[embedded] && show(props()[embedded]);
834
835
  that.scrollTo = galleryRef().scrollTo;
835
- that.left = galleryRef().left;
836
+ that.left = __left(galleryRef());
836
837
  that.right = galleryRef().right;
837
838
  };
838
839
  that[componentDidUpdate] = function (prevProps, prevState) {
package/MaterialIcon.js CHANGED
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import 'react';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -10,7 +11,7 @@ import PropTypes from 'prop-types';
10
11
 
11
12
  var MaterialIcon = function MaterialIcon(_ref) {
12
13
  var icon = _ref.icon,
13
- className = _ref.className;
14
+ className = _ref[__className];
14
15
  return ReactCreateElement("i", {
15
16
  [__className]: classNames('MaterialIcon', 'material-icons', className)
16
17
  }, icon);
package/Modal.js CHANGED
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, slicedToArray as _slicedToArray, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -52,25 +53,25 @@ var Modal = function (_PureComponent) {
52
53
  if (!bc || bc(that.close)) that.close(e);
53
54
  };
54
55
  var shouldClose = function shouldClose(e) {
55
- var isSameModal = el().style.zIndex == zIndex - 1;
56
- !(e && content().contains(e.target)) && isSameModal && beforeClose(e);
56
+ var isSameModal = __style(el()).zIndex == zIndex - 1;
57
+ !(e && content().contains(__target(e))) && isSameModal && beforeClose(e);
57
58
  };
58
59
  var addTransitionListener = function addTransitionListener() {
59
60
  var transitionend = "transitionend";
60
61
  var listener = function listener() {
61
62
  removeEventListener(overlay(), transitionend, listener);
62
63
  orNoop(isShow() ? props().onOpen : orNoop(props().onClose))();
63
- el() && (el().style.paddingBottom = isShow() ? '1px' : '0px');
64
+ el() && (__style(el()).paddingBottom = isShow() ? '1px' : '0px');
64
65
  };
65
66
  addEventListener(overlay(), transitionend, listener);
66
67
  };
67
68
  that[render] = function () {
68
69
  var _props2 = props(),
69
- className = _props2.className,
70
- top = _props2.top,
70
+ className = _props2[__className],
71
+ top = __top(_props2),
71
72
  _props2$container = _props2.container,
72
73
  container = _props2$container === void 0 ? Modal.defaultContainer : _props2$container,
73
- children = _props2.children,
74
+ children = _props2[__children],
74
75
  closeIcon = _props2.closeIcon;
75
76
  var menu = getMenu();
76
77
  var show = isShow();
@@ -109,7 +110,7 @@ var Modal = function (_PureComponent) {
109
110
  };
110
111
  var open = that.open = function () {
111
112
  if (isShow()) return;
112
- el() && (el().style.zIndex = zIndex++);
113
+ el() && (__style(el()).zIndex = zIndex++);
113
114
  addTransitionListener();
114
115
  isShow(true);
115
116
  var listener = function listener(event) {
package/ModalMenu.js CHANGED
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -40,10 +41,10 @@ var ModalMenu = function (_PureComponent) {
40
41
  mounting: 200,
41
42
  unmounting: 200,
42
43
  mountingDelay: i * 50,
43
- unmountingDelay: (filtered.length - i - 1) * 50,
44
+ unmountingDelay: (__length(filtered) - i - 1) * 50,
44
45
  styles: {
45
46
  mounting: {
46
- right: (filtered.length - i) * 36 + 5 + (filtered.length - i) * 5 + "px"
47
+ right: (__length(filtered) - i) * 36 + 5 + (__length(filtered) - i) * 5 + "px"
47
48
  }
48
49
  }
49
50
  }, ReactCreateElement(Button, {
package/ReactConstants.js CHANGED
@@ -1,7 +1,12 @@
1
1
  import React from 'react';
2
2
 
3
3
  var EMPTY = {};
4
- var props = function (that) { return that.props; };
4
+ var props = function (that) {
5
+ if (!that) {
6
+ debugger;
7
+ }
8
+ return that.props;
9
+ };
5
10
  var propsGetter = function (that) { return function () { return props(that); }; };
6
11
  // @ts-ignore //ignore incompatible casting EMPTY to S
7
12
  var state = function (that) { return that.state || EMPTY; };
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import React from 'react';
2
3
 
3
4
  var ReactCreateElement = React.createElement;
package/ReadyListener.js CHANGED
@@ -1,3 +1,4 @@
1
+ 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, scrollLeft as __scrollLeft, scrollTop as __scrollTop, style as __style, target as __target, top as __top, value as __value, width as __width} from "./CommonFields";
1
2
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
2
3
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
3
4
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
@@ -0,0 +1 @@
1
+ export {};