react-ui-basics 0.0.160 → 0.0.161

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 CHANGED
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, defineProperty as _defineProperty, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, objectSpread2 as _objectSpread2 } from './_virtual/_rollupPluginBabelHelpers.js';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import React from 'react';
9
8
  import PropTypes from 'prop-types';
10
9
  import { setOf, clearTimeout, allPropsExcept, classNames, requestAnimationFrame, setTimeout } from './Tools.js';
@@ -76,14 +75,14 @@ var Animated = function (_PureComponent) {
76
75
  _this = _super.call(this, properties);
77
76
  var that = _assertThisInitialized(_this);
78
77
  that.state = animatedState(!!properties[value]);
79
- that[componentDidMount] = function () {
78
+ that[ReactConstants[0]] = function () {
80
79
  var _props = props(that);
81
80
  if (!!_props[value]) processMounting(that, _props[mounting], _props[mountingDelay]);
82
81
  };
83
- that[componentWillUnmount] = function () {
82
+ that[ReactConstants[1]] = function () {
84
83
  clearTimer(that);
85
84
  };
86
- that[render] = function () {
85
+ that[ReactConstants[3]] = function () {
87
86
  var _state = state(that);
88
87
  if (!_state[enabled]) return null;
89
88
  var _props = props(that),
@@ -94,12 +93,12 @@ var Animated = function (_PureComponent) {
94
93
  var childStyles = styles["default"];
95
94
  if (isMounting) childStyles = styles[mounting];else if (isUnMounting) childStyles = styles[unmounting];else if (isMounted) childStyles = styles[mounted] || styles[mounting];
96
95
  var otherProps = allPropsExcept(_props, selfProps);
97
- return React.Children.map(_props[children], function (child) {
96
+ return React.Children.map(_props[ReactConstants[4]], function (child) {
98
97
  var _objectSpread2$1;
99
- return child && React.cloneElement(child, _objectSpread2((_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, className, classNames(props(child)[className], _props[className], isMounting && mounting, isMounted && mounted, isUnMounting && unmounting)), _defineProperty(_objectSpread2$1, "style", _objectSpread2(_objectSpread2({}, __style(props(child))), childStyles)), _objectSpread2$1), otherProps));
98
+ return child && React.cloneElement(child, _objectSpread2((_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, className, classNames(props(child)[ReactConstants[5]], _props[ReactConstants[5]], isMounting && mounting, isMounted && mounted, isUnMounting && unmounting)), _defineProperty(_objectSpread2$1, "style", _objectSpread2(_objectSpread2({}, __style(props(child))), childStyles)), _objectSpread2$1), otherProps));
100
99
  });
101
100
  };
102
- that[componentDidUpdate] = function () {
101
+ that[ReactConstants[2]] = function () {
103
102
  var p = props;
104
103
  var t = that;
105
104
  var _props = p(t) || props(that),
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, objectSpread2 as _objectSpread2, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, toConsumableArray as _toConsumableArray } from './_virtual/_rollupPluginBabelHelpers.js';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import React from 'react';
9
8
  import ReactCreateElement from './ReactCreateElement.js';
10
9
  import PropTypes from 'prop-types';
@@ -30,7 +29,7 @@ var DummyChild = function DummyChild(_ref) {
30
29
  onClick = _ref.onClick;
31
30
  orNoop(dataConsumer)(label || id);
32
31
  return ReactCreateElement("div", {
33
- [__className]: "DummyChild",
32
+ [ReactConstants[5]]: "DummyChild",
34
33
  onClick: onClick
35
34
  }, label || id);
36
35
  };
@@ -89,10 +88,10 @@ var AutocompleteSelect = function (_PureComponent) {
89
88
  };
90
89
  });
91
90
  _this.onClickOutside = function () {
92
- var _this$props = _this.props,
91
+ var _this$props = __props(_this),
93
92
  allowCustom = _this$props.allowCustom,
94
93
  required = _this$props.required;
95
- var filterValue = _this.state.filterValue;
94
+ var filterValue = __state(_this).filterValue;
96
95
  if (allowCustom && (!!filterValue || !required)) {
97
96
  _this.onSelect();
98
97
  }
@@ -102,17 +101,17 @@ var AutocompleteSelect = function (_PureComponent) {
102
101
  _this.onCancel();
103
102
  };
104
103
  _this.onCancel = function () {
105
- orNoop(_this.props.onCancel)();
104
+ orNoop(__props(_this).onCancel)();
106
105
  };
107
106
  _this.onSelect = function (selectedId) {
108
- var _this$props2 = _this.props,
107
+ var _this$props2 = __props(_this),
109
108
  mode = _this$props2.mode,
110
109
  required = _this$props2.required,
111
110
  allowCustom = _this$props2.allowCustom,
112
111
  onSelect = _this$props2.onSelect,
113
112
  onChange = _this$props2.onChange,
114
113
  defaultValue = _this$props2["default"];
115
- var _this$state = _this.state,
114
+ var _this$state = __state(_this),
116
115
  filterValue = _this$state.filterValue,
117
116
  currentSelection = _this$state.selected;
118
117
  if (selectedId == null && (!!filterValue || !required) && allowCustom && (!_this.input || !_this.input.check())) selectedId = filterValue.trim();
@@ -150,25 +149,25 @@ var AutocompleteSelect = function (_PureComponent) {
150
149
  selected: {},
151
150
  filterValue: ''
152
151
  });
153
- orNoop(_this.props.onSelect)(null);
154
- orNoop(_this.props.onChange)([]);
155
- _this.initSelected(_this.props, _this.state);
152
+ orNoop(__props(_this).onSelect)(null);
153
+ orNoop(__props(_this).onChange)([]);
154
+ _this.initSelected(__props(_this), __state(_this));
156
155
  };
157
156
  _this.remove = function (id) {
158
- var result = _objectSpread2(_objectSpread2({}, _this.state), {}, {
159
- selected: _objectSpread2({}, _this.state.selected),
157
+ var result = _objectSpread2(_objectSpread2({}, __state(_this)), {}, {
158
+ selected: _objectSpread2({}, __state(_this).selected),
160
159
  filterValue: ''
161
160
  });
162
161
  delete result.selected[id];
163
162
  _this.setState(result);
164
- orNoop(_this.props.onChange)(Object.values(result.selected));
163
+ orNoop(__props(_this).onChange)(Object.values(result.selected));
165
164
  };
166
165
  _this.onChange = function (event) {
167
166
  var value = __target(event).value;
168
167
  _this.setState({
169
168
  filterValue: value
170
169
  });
171
- _this.props.onFilterInputChange == null ? void 0 : _this.props.onFilterInputChange(value);
170
+ __props(_this).onFilterInputChange == null ? void 0 : __props(_this).onFilterInputChange(value);
172
171
  };
173
172
  var that = _assertThisInitialized(_this);
174
173
  that.state = {
@@ -184,48 +183,48 @@ var AutocompleteSelect = function (_PureComponent) {
184
183
  });
185
184
  });
186
185
  getSelected && getSelected(function () {
187
- return Object.values(that.state.selected);
186
+ return Object.values(__state(that).selected);
188
187
  });
189
188
  return _this;
190
189
  }
191
190
  _createClass(AutocompleteSelect, [{
192
- key: "componentDidMount",
191
+ key: [ReactConstants[0]],
193
192
  value: function componentDidMount() {
194
193
  var _this2 = this;
195
194
  addEventListener(DOCUMENT, 'mousedown', this.listener = function (e) {
196
- if (_this2.state.isActive && _this2.el && !_this2.el.contains(__target(e))) {
195
+ if (__state(_this2).isActive && _this2.el && !_this2.el.contains(__target(e))) {
197
196
  _this2.onClickOutside();
198
197
  }
199
198
  });
200
- if (this.props.required) {
199
+ if (__props(this).required) {
201
200
  var form = findParent(this.el.parentNode, 'form');
202
201
  if (form) {
203
202
  addEventListener(this.submitButton = form.querySelector('button[type=submit]'), 'click', this.formSubmitListener = function (e) {
204
- var errored = Object.keys(_this2.state.selected).length === 0;
203
+ var errored = Object.keys(__state(_this2).selected).length === 0;
205
204
  _this2.setState({
206
205
  errored: errored
207
206
  });
208
207
  });
209
208
  }
210
209
  }
211
- this.initSelected(this.props, this.state);
210
+ this.initSelected(__props(this), __state(this));
212
211
  }
213
212
  }, {
214
- key: "componentDidUpdate",
213
+ key: [ReactConstants[2]],
215
214
  value: function componentDidUpdate(prevProps, prevState, snapshot) {
216
- if (this.props.value !== __value(prevProps)) this.initSelected(this.props, this.state);
215
+ if (__props(this).value !== __value(prevProps)) this.initSelected(__props(this), __state(this));
217
216
  }
218
217
  }, {
219
- key: "componentWillUnmount",
218
+ key: [ReactConstants[1]],
220
219
  value: function componentWillUnmount() {
221
220
  removeEventListener(DOCUMENT, 'mousedown', this.listener);
222
221
  removeEventListener(this.submitButton, 'click', this.formSubmitListener);
223
222
  }
224
223
  }, {
225
- key: "render",
224
+ key: [ReactConstants[3]],
226
225
  value: function render() {
227
226
  var _this3 = this;
228
- var _this$props3 = this.props,
227
+ var _this$props3 = __props(this),
229
228
  childComponent = _this$props3.childComponent,
230
229
  childProps = _this$props3.childProps,
231
230
  withArrow = _this$props3.withArrow,
@@ -237,31 +236,31 @@ var AutocompleteSelect = function (_PureComponent) {
237
236
  mode = _this$props3.mode,
238
237
  selectedMode = _this$props3.selectedMode,
239
238
  prefilter = _this$props3.prefilter,
240
- className = _this$props3[__className],
239
+ className = _this$props3[ReactConstants[5]],
241
240
  scrollToValue = _this$props3.scrollToValue,
242
241
  scroll = _this$props3.scroll,
243
242
  required = _this$props3.required,
244
243
  allowCustom = _this$props3.allowCustom,
245
244
  inlineSelected = _this$props3.inlineSelected,
246
245
  removeIcon = _this$props3.removeIcon;
247
- var id = this.props.id || this.randomId;
248
- var selectedComponent = this.props.selectedComponent || childComponent;
249
- var _this$state2 = this.state,
246
+ var id = __props(this).id || this.randomId;
247
+ var selectedComponent = __props(this).selectedComponent || childComponent;
248
+ var _this$state2 = __state(this),
250
249
  _this$state2$selected = _this$state2.selected,
251
250
  selected = _this$state2$selected === void 0 ? {} : _this$state2$selected,
252
251
  _this$state2$filterVa = _this$state2.filterValue,
253
252
  filterValue = _this$state2$filterVa === void 0 ? '' : _this$state2$filterVa,
254
253
  errored = _this$state2.errored;
255
- var isActive = this.state.isActive;
256
- if (this.props.isActive !== UNDEFINED) {
257
- isActive = this.props.isActive;
254
+ var isActive = __state(this).isActive;
255
+ if (__props(this).isActive !== UNDEFINED) {
256
+ isActive = __props(this).isActive;
258
257
  }
259
- var _this$props4 = this.props,
258
+ var _this$props4 = __props(this),
260
259
  _this$props4$data = __data(_this$props4),
261
260
  data = _this$props4$data === void 0 ? [] : _this$props4$data,
262
261
  _this$props4$labels = _this$props4.labels,
263
262
  labels = _this$props4$labels === void 0 ? {} : _this$props4$labels;
264
- if (this.state.data) data = this.state.data;
263
+ if (__state(this).data) data = __state(this).data;
265
264
  if (!Array.isArray(data)) data = [];
266
265
  var selectedIds = Object.values(selected);
267
266
  var hasSelected = __length(selectedIds) !== 0;
@@ -274,7 +273,7 @@ var AutocompleteSelect = function (_PureComponent) {
274
273
  });
275
274
  };
276
275
  var toggle = function toggle(e) {
277
- if (!_this3.state.isActive) {
276
+ if (!__state(_this3).isActive) {
278
277
  setActive(e);
279
278
  } else {
280
279
  stopPropagation(e);
@@ -291,10 +290,10 @@ var AutocompleteSelect = function (_PureComponent) {
291
290
  var filterFunction = this.createFilter(prefilter, filterValue, filterValueTrimmed.toLowerCase(), filter);
292
291
  return ReactCreateElement("div", {
293
292
  id: id,
294
- [__className]: classNames('AutocompleteSelect', mode, isMultipleSelect(mode) && 'multi', className, withFilter ? 'withFilter' : 'withoutFilter', isActive && 'active', errored && 'errored', inlineSelected && 'inlineSelected', hasSelected && 'hasSelected'),
293
+ [ReactConstants[5]]: classNames('AutocompleteSelect', mode, isMultipleSelect(mode) && 'multi', className, withFilter ? 'withFilter' : 'withoutFilter', isActive && 'active', errored && 'errored', inlineSelected && 'inlineSelected', hasSelected && 'hasSelected'),
295
294
  ref: ref('el', this)
296
295
  }, label && ReactCreateElement("label", {
297
- [__className]: classNames("label", (hasSelected || filterValue) && 'active', hasSelected && 'hasSelected'),
296
+ [ReactConstants[5]]: classNames("label", (hasSelected || filterValue) && 'active', hasSelected && 'hasSelected'),
298
297
  htmlFor: 'f-' + id,
299
298
  onClick: function onClick() {
300
299
  if (mode === MODE_MULTIPLE_MINI_INLINE || !isActive) {
@@ -302,20 +301,20 @@ var AutocompleteSelect = function (_PureComponent) {
302
301
  }
303
302
  }
304
303
  }, label, required && ' *', withArrow && ReactCreateElement("span", {
305
- [__className]: "arrow"
304
+ [ReactConstants[5]]: "arrow"
306
305
  })), (!isActive || mode === MODE_MULTIPLE || mode === MODE_INLINE_MULTIPLE || mode === MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE_AUTO || !withFilter) && !inlineSelected && hasSelected && ReactCreateElement("div", {
307
- [__className]: classNames('selected', !label && 'nolabel', (mode === MODE_MULTIPLE_MINI || mode === MODE_MINI || mode === MODE_MULTIPLE_MINI_INLINE) && 'clickable', selectedMode),
306
+ [ReactConstants[5]]: classNames('selected', !label && 'nolabel', (mode === MODE_MULTIPLE_MINI || mode === MODE_MINI || mode === MODE_MULTIPLE_MINI_INLINE) && 'clickable', selectedMode),
308
307
  onClick: toggle
309
308
  }, selectedMode === 'full' && selectedIds.map(function (id) {
310
309
  return ReactCreateElement("div", {
311
- [__className]: "value",
310
+ [ReactConstants[5]]: "value",
312
311
  key: id
313
312
  }, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
314
313
  id: id,
315
314
  label: getLabel(labels, id),
316
315
  onClick: setActive
317
316
  })), ReactCreateElement("div", {
318
- [__className]: "button remove",
317
+ [ReactConstants[5]]: "button remove",
319
318
  onClick: function onClick(e) {
320
319
  stopPropagation(e);
321
320
  _this3.remove(id);
@@ -330,21 +329,21 @@ var AutocompleteSelect = function (_PureComponent) {
330
329
  onClick: setActive
331
330
  })), id !== selectedIds[__length(selectedIds) - 1] && ', ');
332
331
  }), !label && withArrow && ReactCreateElement("span", {
333
- [__className]: "arrow"
332
+ [ReactConstants[5]]: "arrow"
334
333
  }), withReset && ReactCreateElement(Button, {
335
- [__className]: "reset",
334
+ [ReactConstants[5]]: "reset",
336
335
  raised: false,
337
336
  onClick: this.clean
338
337
  }, removeIcon)), inlineSelected && hasSelected && ReactCreateElement(React.Fragment, null, selectedMode === 'full' && selectedIds.map(function (id) {
339
338
  return ReactCreateElement("div", {
340
- [__className]: "value",
339
+ [ReactConstants[5]]: "value",
341
340
  key: id
342
341
  }, React.createElement(selectedComponent, _objectSpread2(_objectSpread2({}, childProps), {}, {
343
342
  id: id,
344
343
  label: getLabel(labels, id),
345
344
  onClick: setActive
346
345
  })), ReactCreateElement("div", {
347
- [__className]: "button remove",
346
+ [ReactConstants[5]]: "button remove",
348
347
  onClick: function onClick(e) {
349
348
  stopPropagation(e);
350
349
  _this3.remove(id);
@@ -359,7 +358,7 @@ var AutocompleteSelect = function (_PureComponent) {
359
358
  onClick: setActive
360
359
  })), id !== selectedIds[__length(selectedIds) - 1] && ', ');
361
360
  })), (isActive || !hasSelected && mode !== MODE_MULTIPLE_MINI_INLINE || mode === MODE_MULTIPLE || mode === MODE_MULTIPLE_AUTO && __length(selectedIds) > 1 || mode === MODE_INLINE_MULTIPLE) && ReactCreateElement("div", {
362
- [__className]: "input",
361
+ [ReactConstants[5]]: "input",
363
362
  "data-value": filterValue
364
363
  }, withFilter && ReactCreateElement(TextField, {
365
364
  autoComplete: "new-password",
@@ -374,7 +373,7 @@ var AutocompleteSelect = function (_PureComponent) {
374
373
  isActive: true
375
374
  });
376
375
  },
377
- check: this.props.filterCheck,
376
+ check: __props(this).filterCheck,
378
377
  onKeyDown: function onKeyDown(e) {
379
378
  var keyCode = e.keyCode;
380
379
  if (keyCode === 38
@@ -412,7 +411,7 @@ var AutocompleteSelect = function (_PureComponent) {
412
411
  }
413
412
  }
414
413
  }), !withFilter && inputLabel && ReactCreateElement("label", null, inputLabel)), ReactCreateElement(FilteredList, {
415
- [__className]: classNames(isActive && 'visible'),
414
+ [ReactConstants[5]]: classNames(isActive && 'visible'),
416
415
  ref: ref('list', this),
417
416
  filter: filterFunction,
418
417
  selectSingle: !allowCustom,
package/Button.js CHANGED
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import 'react';
9
8
  import ReactCreateElement from './ReactCreateElement.js';
10
9
  import { classNames, createRef, DOCUMENT, addEventListener, orNoop } from './Tools.js';
@@ -47,11 +46,11 @@ var Button = function (_PureComponent) {
47
46
  style.left = __width(rect) / 2 - size / 2 + 'px';
48
47
  rippleClassName('focused');
49
48
  };
50
- that[render] = function () {
49
+ that[ReactConstants[3]] = function () {
51
50
  var _props = props(that),
52
- children = _props[__children],
51
+ children = _props[ReactConstants[4]],
53
52
  type = _props.type,
54
- className = _props[__className],
53
+ className = _props[ReactConstants[5]],
55
54
  onClick = _props.onClick,
56
55
  flat = _props.flat,
57
56
  _props$raised = _props.raised,
@@ -60,7 +59,7 @@ var Button = function (_PureComponent) {
60
59
  style = __style(_props),
61
60
  disabled = _props.disabled;
62
61
  return ReactCreateElement("button", {
63
- [__className]: classNames('Button', className, disabled && 'disabled', raised && 'raised', flat && 'flat', round && 'round'),
62
+ [ReactConstants[5]]: classNames('Button', className, disabled && 'disabled', raised && 'raised', flat && 'flat', round && 'round'),
64
63
  onFocus: onFocus,
65
64
  disabled: disabled,
66
65
  style: style,
@@ -69,7 +68,7 @@ var Button = function (_PureComponent) {
69
68
  onMouseDown: onMouseDown,
70
69
  ref: el
71
70
  }, children, ReactCreateElement("span", {
72
- [__className]: classNames("ripple", rippleClassName()),
71
+ [ReactConstants[5]]: classNames("ripple", rippleClassName()),
73
72
  ref: ripple
74
73
  }));
75
74
  };
@@ -85,7 +84,7 @@ if (process.env.NODE_ENV !== 'production') {
85
84
  disabled: PropTypes.bool,
86
85
  withRipple: PropTypes.bool,
87
86
  type: PropTypes.oneOf(['button', 'submit', 'reset']),
88
- [__className]: PropTypes.string,
87
+ [ReactConstants[5]]: PropTypes.string,
89
88
  onClick: PropTypes.func,
90
89
  onFocus: PropTypes.func,
91
90
  style: PropTypes.object
package/Checkbox.js CHANGED
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import 'react';
9
8
  import ReactCreateElement from './ReactCreateElement.js';
10
9
  import { classNames, getRandomId } from './Tools.js';
@@ -20,17 +19,17 @@ var Checkbox = function (_PureComponent) {
20
19
  _this = _super.call(this, properties);
21
20
  var randomId = getRandomId('cb-');
22
21
  var props = propsGetter(_assertThisInitialized(_this));
23
- _this[render] = function () {
22
+ _this[ReactConstants[3]] = function () {
24
23
  var _props = props(),
25
24
  label = _props.label,
26
25
  name = _props.name,
27
26
  onChange = _props.onChange,
28
27
  value = __value(_props),
29
- className = _props[__className],
28
+ className = _props[ReactConstants[5]],
30
29
  disabled = _props.disabled;
31
30
  var id = props().id || randomId;
32
31
  return ReactCreateElement("div", {
33
- [__className]: classNames("Checkbox", className)
32
+ [ReactConstants[5]]: classNames("Checkbox", className)
34
33
  }, ReactCreateElement("input", {
35
34
  name: name,
36
35
  id: id,
@@ -51,7 +50,7 @@ if (process.env.NODE_ENV !== 'production') {
51
50
  onChange: PropTypes.func.isRequired,
52
51
  value: PropTypes.bool,
53
52
  disabled: PropTypes.bool,
54
- [__className]: PropTypes.string,
53
+ [ReactConstants[5]]: PropTypes.string,
55
54
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
56
55
  name: PropTypes.string,
57
56
  id: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
package/CircleProgress.js CHANGED
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import 'react';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import ReactCreateElement from './ReactCreateElement.js';
9
8
  import PropTypes from 'prop-types';
10
9
 
@@ -17,11 +16,11 @@ var CircleProgress = function CircleProgress(_ref) {
17
16
  var value = __value(_ref);
18
17
  value = Number.parseFloat(value);
19
18
  return ReactCreateElement("div", {
20
- [__className]: "CircleProgress"
19
+ [ReactConstants[5]]: "CircleProgress"
21
20
  }, ReactCreateElement("svg", {
22
21
  viewBox: "0 0 24 24"
23
22
  }, ReactCreateElement("path", {
24
- [__className]: "line",
23
+ [ReactConstants[5]]: "line",
25
24
  style: {
26
25
  strokeDashoffset: dashoffset(Number.isFinite(value) ? value : 0),
27
26
  strokeDasharray: length
package/CommonFields.js CHANGED
@@ -18,6 +18,8 @@ var scrollTop = createAccessor('scrollTop');
18
18
  var scrollLeft = createAccessor('scrollLeft');
19
19
  var target = createAccessor('target');
20
20
  var data = createAccessor('data');
21
+ var state = createAccessor('state');
22
+ var props = createAccessor('props');
21
23
 
22
- export { clientHeight, clientWidth, createAccessor, data, height, left, length, pageX, pageY, scrollLeft, scrollTop, style, target, top, value, width };
24
+ export { clientHeight, clientWidth, createAccessor, data, height, left, length, pageX, pageY, props, scrollLeft, scrollTop, state, style, target, top, value, width };
23
25
  //# sourceMappingURL=CommonFields.js.map
package/DNDContainer.js CHANGED
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import { Component } from 'react';
9
8
  import ReactCreateElement from './ReactCreateElement.js';
10
9
  import { setTimeout, clearTimeout, preventDefault, addEventListener, orNoop, NOOP, removeEventListener, WINDOW, DOCUMENT, requestAnimationFrame, classNames, ref } from './Tools.js';
@@ -31,13 +30,13 @@ var DNDContainer = function (_Component) {
31
30
  _classCallCheck(this, DNDContainer);
32
31
  _this = _super.call(this, props);
33
32
  _this.draggableInitializer = function (item) {
34
- var handle = item.props.handle;
33
+ var handle = __props(item).handle;
35
34
  var draggableElement = handle && item.element.childNodes[0] || item.element;
36
35
  draggableElement.draggable = true;
37
36
  var dragStartListener = function dragStartListener(e) {
38
37
  clearSelection();
39
38
  var container = _this.container;
40
- _this.data = item.props.data;
39
+ _this.data = __props(item).data;
41
40
  _this.draggable = item;
42
41
  _this.scrollOffsetX = __pageX(e) - e.clientX;
43
42
  _this.scrollOffsetY = __pageY(e) - e.clientY;
@@ -45,7 +44,7 @@ var DNDContainer = function (_Component) {
45
44
  var itemOffset = item.element.getBoundingClientRect();
46
45
  item.width = __width(itemOffset);
47
46
  item.height = __height(itemOffset);
48
- var clone = orNoop(item.props.copy)(function (it) {
47
+ var clone = orNoop(__props(item).copy)(function (it) {
49
48
  var style = it.element.style;
50
49
  var offsetLeft = totalOffsetLeft(container) + (e.clientX - __left(itemOffset));
51
50
  var offsetTop = totalOffsetTop(container) + (e.clientY - __top(itemOffset));
@@ -142,14 +141,14 @@ var DNDContainer = function (_Component) {
142
141
  _this[droppables].push(item);
143
142
  addEventListener(item.element, 'drop', function (e) {
144
143
  preventDefault(e);
145
- __data(_this) && orNoop(item.props.onDrop)(__data(_this));
144
+ __data(_this) && orNoop(__props(item).onDrop)(__data(_this));
146
145
  }, false);
147
146
  item.onDragStart = function (e, draggable) {
148
147
  item.bounds = item.element.getBoundingClientRect();
149
148
  item.setState({
150
149
  allow: true
151
150
  });
152
- orNoop(item.props.onDragStart)(e, draggable);
151
+ orNoop(__props(item).onDragStart)(e, draggable);
153
152
  };
154
153
  item.isHover = function (e, draggable) {
155
154
  var bounds = item.bounds;
@@ -157,15 +156,15 @@ var DNDContainer = function (_Component) {
157
156
  var y = __pageY(e) - _this.scrollOffsetY;
158
157
  var x = __pageX(e) - _this.scrollOffsetX;
159
158
  var hover = __left(bounds) <= x && bounds.right >= x && __top(bounds) <= y && bounds.bottom >= y;
160
- hover && orNoop(item.props.onHover)(e, draggable);
161
- if (hover) !item.state.hover && item.setState({
159
+ hover && orNoop(__props(item).onHover)(e, draggable);
160
+ if (hover) !__state(item).hover && item.setState({
162
161
  hover: hover
163
- });else item.state.hover && item.setState({
162
+ });else __state(item).hover && item.setState({
164
163
  hover: hover
165
164
  });
166
165
  };
167
166
  item.dropIfHover = function () {
168
- __data(_this) && item.state.hover && orNoop(item.props.onDrop)(__data(_this));
167
+ __data(_this) && __state(item).hover && orNoop(__props(item).onDrop)(__data(_this));
169
168
  };
170
169
  item.onDragEnd = function () {
171
170
  orNoop(orNoop(_this.draggable).onDragEnd)();
@@ -208,7 +207,7 @@ var DNDContainer = function (_Component) {
208
207
  });
209
208
  _this[droppables].forEach(function (it) {
210
209
  it.onDragEnd();
211
- orNoop(it.props.onDragEnd)(_this.draggable);
210
+ orNoop(__props(it).onDragEnd)(_this.draggable);
212
211
  });
213
212
  _this.data = null;
214
213
  _this.draggable = null;
@@ -221,23 +220,23 @@ var DNDContainer = function (_Component) {
221
220
  return _this;
222
221
  }
223
222
  _createClass(DNDContainer, [{
224
- key: "render",
223
+ key: [ReactConstants[3]],
225
224
  value: function render() {
226
- var _this$props = this.props,
227
- children = _this$props[__children],
228
- className = _this$props[__className];
229
- var draggable = this.state.draggable;
225
+ var _this$props = __props(this),
226
+ children = _this$props[ReactConstants[4]],
227
+ className = _this$props[ReactConstants[5]];
228
+ var draggable = __state(this).draggable;
230
229
  return ReactCreateElement("div", {
231
- [__className]: classNames('DNDContainer', className),
230
+ [ReactConstants[5]]: classNames('DNDContainer', className),
232
231
  ref: ref('container', this)
233
232
  }, children, ReactCreateElement("div", {
234
- [__className]: "overlay"
233
+ [ReactConstants[5]]: "overlay"
235
234
  }, draggable));
236
235
  }
237
236
  }, {
238
- key: "componentDidMount",
237
+ key: [ReactConstants[0]],
239
238
  value: function componentDidMount() {
240
- var _this$props2 = this.props,
239
+ var _this$props2 = __props(this),
241
240
  provideDraggableInitializer = _this$props2.provideDraggableInitializer,
242
241
  provideDroppableInitializer = _this$props2.provideDroppableInitializer;
243
242
  orNoop(provideDraggableInitializer)(this.draggableInitializer);
package/DNDDraggable.js CHANGED
@@ -1,10 +1,9 @@
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
+ import ReactConstants from "./ReactConstants";
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";
2
3
  import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from './_virtual/_rollupPluginBabelHelpers.js';
3
4
  import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
4
5
  import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
5
6
  import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
6
- import {className as __className} from "./ReactConstants";
7
- import {children as __children} from "./ReactConstants";
8
7
  import 'react';
9
8
  import ReactCreateElement from './ReactCreateElement.js';
10
9
  import { orNoop, classNames, ref } from './Tools.js';
@@ -27,23 +26,23 @@ var Draggable = function (_PureComponent) {
27
26
  _this = _super.call(this, properties);
28
27
  var that = _assertThisInitialized(_this);
29
28
  that.state = {};
30
- that[componentDidUpdate] = function (prevProps) {
29
+ that[ReactConstants[2]] = function (prevProps) {
31
30
  if (prevProps[handle] !== props(that)[handle] || prevProps[initializer] !== props(that)[initializer]) init(that);
32
31
  };
33
- that[componentDidMount] = function () {
32
+ that[ReactConstants[0]] = function () {
34
33
  init(that);
35
34
  };
36
- that[componentWillUnmount] = function () {
35
+ that[ReactConstants[1]] = function () {
37
36
  orNoop(that.onUnmount)();
38
37
  };
39
- that[render] = function () {
38
+ that[ReactConstants[3]] = function () {
40
39
  var _state = state(that),
41
40
  _props = props(that);
42
41
  return ReactCreateElement("div", {
43
- [__className]: classNames('Draggable', _props[className], _state[dragged] && dragged, _state[placeholder] && placeholder, _state[hover] && hover),
42
+ [ReactConstants[5]]: classNames('Draggable', _props[ReactConstants[5]], _state[dragged] && dragged, _state[placeholder] && placeholder, _state[hover] && hover),
44
43
  onClick: _props.onClick,
45
44
  ref: ref('element', that)
46
- }, _props[handle], _props[children]);
45
+ }, _props[handle], _props[ReactConstants[4]]);
47
46
  };
48
47
  return _this;
49
48
  }