react-ui-basics 0.0.152 → 0.0.155
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 -0
- package/AutocompleteSelect.js +2 -0
- package/Button.js +2 -0
- package/Checkbox.js +2 -0
- package/CircleProgress.js +2 -0
- package/DNDContainer.js +2 -0
- package/DNDDraggable.js +2 -0
- package/DNDDroppable.js +2 -0
- package/Dialog.js +3 -1
- package/DropFileInput.js +2 -0
- package/DroppableHorizontalList.js +3 -1
- package/DroppableList.js +3 -1
- package/Dropzone.js +3 -1
- package/FilteredList.js +2 -0
- package/FloatingActionButton.js +2 -0
- package/FormUploadProgress.js +2 -0
- package/ImageGallery.js +3 -1
- package/MaterialIcon.js +2 -0
- package/Modal.js +3 -1
- package/ModalMenu.js +2 -0
- package/ReactConstants.js +1 -1
- package/ReadyListener.js +2 -0
- package/Scrollable.js +3 -1
- package/ScrollableTable.js +2 -0
- package/Size.js +2 -0
- package/Snackbar.js +2 -0
- package/SpinningProgress.js +2 -0
- package/Switch.js +2 -0
- package/Table.d.ts +22 -22
- package/Table.js +114 -98
- package/Table.js.map +1 -1
- package/TextField.js +3 -1
- package/Tools.js +120 -105
- package/Tools.js.map +1 -1
- package/bundle.css +642 -642
- package/index.js +2 -0
- package/package.json +1 -1
- package/router/Link.js +2 -0
- package/router/NavLink.js +2 -0
- package/router/Route.js +3 -1
- package/router/index.js +2 -0
- package/store/ProxyTools.js +2 -0
- package/store/Store.js +30 -26
- package/store/Store.js.map +1 -1
package/index.js
CHANGED
|
@@ -23,7 +23,9 @@ export { default as Snackbar } from './Snackbar.js';
|
|
|
23
23
|
export { default as SpinningProgress } from './SpinningProgress.js';
|
|
24
24
|
export { default as Switch } from './Switch.js';
|
|
25
25
|
export { default as ReactCreateElement } from './ReactCreateElement.js';
|
|
26
|
+
import {toConsumableArray as __toConsumableArray} from "./_virtual/_rollupPluginBabelHelpers";
|
|
26
27
|
import {extends as __extends} from "./_virtual/_rollupPluginBabelHelpers";
|
|
28
|
+
import {inherits as __inherits} from "./_virtual/_rollupPluginBabelHelpers";
|
|
27
29
|
import {className as __className} from "./ReactConstants";
|
|
28
30
|
import {children as __children} from "./ReactConstants";
|
|
29
31
|
import * as ReadyListener from './ReadyListener.js';
|
package/package.json
CHANGED
package/router/Link.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
+
import {toConsumableArray as __toConsumableArray} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
2
3
|
import {extends as __extends} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
4
|
+
import {inherits as __inherits} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {className as __className} from "./../ReactConstants";
|
|
4
6
|
import {children as __children} from "./../ReactConstants";
|
|
5
7
|
import ReactCreateElement from '../ReactCreateElement.js';
|
package/router/NavLink.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
+
import {toConsumableArray as __toConsumableArray} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
2
3
|
import {extends as __extends} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
4
|
+
import {inherits as __inherits} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {className as __className} from "./../ReactConstants";
|
|
4
6
|
import {children as __children} from "./../ReactConstants";
|
|
5
7
|
import ReactCreateElement from '../ReactCreateElement.js';
|
package/router/Route.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
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 {toConsumableArray as __toConsumableArray} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
2
3
|
import {extends as __extends} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
4
|
+
import {inherits as __inherits} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {className as __className} from "./../ReactConstants";
|
|
4
6
|
import {children as __children} from "./../ReactConstants";
|
|
5
7
|
import React from 'react';
|
|
6
8
|
import PropTypes from 'prop-types';
|
|
7
9
|
import { setOf, allPropsExcept, isDifferent, addEventListener, removeEventListener, WINDOW, orNoop } from '../Tools.js';
|
|
8
|
-
import {
|
|
10
|
+
import { stateGSs, componentDidUpdate, render, componentDidMount, componentWillUnmount, propsGetter, setState, PureComponent } from '../ReactConstants.js';
|
|
9
11
|
|
|
10
12
|
var historyEvents = ['popstate', 'pushState', 'replaceState'];
|
|
11
13
|
var cleanPath = function cleanPath(path) {
|
package/router/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import Link from './Link.js';
|
|
2
|
+
import {toConsumableArray as __toConsumableArray} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
2
3
|
import {extends as __extends} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
4
|
+
import {inherits as __inherits} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {className as __className} from "./../ReactConstants";
|
|
4
6
|
import {children as __children} from "./../ReactConstants";
|
|
5
7
|
import NavLink from './NavLink.js';
|
package/store/ProxyTools.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { typeof as _typeof, toConsumableArray as _toConsumableArray, objectSpread2 as _objectSpread2 } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import {toConsumableArray as __toConsumableArray} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
2
3
|
import {extends as __extends} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
4
|
+
import {inherits as __inherits} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {className as __className} from "./../ReactConstants";
|
|
4
6
|
import {children as __children} from "./../ReactConstants";
|
|
5
7
|
import { UNDEFINED } from '../Tools.js';
|
package/store/Store.js
CHANGED
|
@@ -1,42 +1,46 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
|
+
import {toConsumableArray as __toConsumableArray} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
2
3
|
import {extends as __extends} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
4
|
+
import {inherits as __inherits} from "./../_virtual/_rollupPluginBabelHelpers";
|
|
3
5
|
import {className as __className} from "./../ReactConstants";
|
|
4
6
|
import {children as __children} from "./../ReactConstants";
|
|
5
7
|
import { createProxy } from './ProxyTools.js';
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
var STORES = {};
|
|
10
|
+
var COUNTER = 0;
|
|
11
|
+
var Store = /** @class */ (function () {
|
|
12
|
+
function Store(initialState, name) {
|
|
13
|
+
var _this = this;
|
|
11
14
|
this.listeners = [];
|
|
12
|
-
this.get = ()
|
|
13
|
-
this.set = (mutator)
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
this.get = function () { return STORES[_this.index]; };
|
|
16
|
+
this.set = function (mutator) {
|
|
17
|
+
var proxy = createProxy(STORES[_this.index]);
|
|
18
|
+
var result = mutator(proxy);
|
|
16
19
|
if (!result || result === proxy)
|
|
17
|
-
STORES[
|
|
20
|
+
STORES[_this.index] = proxy.bake();
|
|
18
21
|
else
|
|
19
|
-
STORES[
|
|
20
|
-
|
|
22
|
+
STORES[_this.index] = result;
|
|
23
|
+
_this.listeners.forEach(function (fn) { return fn(); });
|
|
21
24
|
};
|
|
22
|
-
this.reset = ()
|
|
23
|
-
STORES[
|
|
25
|
+
this.reset = function () {
|
|
26
|
+
STORES[_this.index] = _this.initialState;
|
|
24
27
|
};
|
|
25
|
-
this.subscribe = (fn)
|
|
26
|
-
|
|
28
|
+
this.subscribe = function (fn) {
|
|
29
|
+
_this.listeners.push(fn);
|
|
27
30
|
};
|
|
28
|
-
this.unsubscribe = (fn)
|
|
29
|
-
|
|
31
|
+
this.unsubscribe = function (fn) {
|
|
32
|
+
_this.listeners = _this.listeners.filter(function (f) { return f !== fn; });
|
|
30
33
|
};
|
|
31
|
-
this.toString = ()
|
|
32
|
-
|
|
34
|
+
this.toString = function () { return _this.name; };
|
|
35
|
+
var that = this;
|
|
33
36
|
that.name = name;
|
|
34
37
|
that.initialState = initialState;
|
|
35
|
-
|
|
38
|
+
var index = COUNTER++;
|
|
36
39
|
that.index = index;
|
|
37
40
|
STORES[index] = initialState;
|
|
38
41
|
}
|
|
39
|
-
|
|
42
|
+
return Store;
|
|
43
|
+
}());
|
|
40
44
|
function getGlobalState() {
|
|
41
45
|
return STORES;
|
|
42
46
|
}
|
|
@@ -46,17 +50,17 @@ function resetGlobalState() {
|
|
|
46
50
|
function replaceGlobalState(state) {
|
|
47
51
|
STORES = state;
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
var defaultSelector = function (store) { return store; };
|
|
50
54
|
function useStore(store, selector) {
|
|
51
55
|
if (!selector)
|
|
52
56
|
selector = defaultSelector;
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
var _a = useState(selector(store.get())), state = _a[0], setState = _a[1];
|
|
58
|
+
var updateState = function () {
|
|
55
59
|
setState(selector(store.get()));
|
|
56
60
|
};
|
|
57
|
-
useEffect(()
|
|
61
|
+
useEffect(function () {
|
|
58
62
|
store.subscribe(updateState);
|
|
59
|
-
return ()
|
|
63
|
+
return function () { return store.unsubscribe(updateState); };
|
|
60
64
|
});
|
|
61
65
|
return state;
|
|
62
66
|
}
|
package/store/Store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Store.js","sources":["../../../../src/src/react-ui-basics/store/Store.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAOA,IAAI,MAAM,GAAW,EAAE,CAAA;AACvB,IAAI,OAAO,GAAG,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"Store.js","sources":["../../../../src/src/react-ui-basics/store/Store.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAOA,IAAI,MAAM,GAAW,EAAE,CAAA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