brew-js-react 0.4.4 → 0.4.5
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/dist/brew-js-react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! brew-js-react v0.4.
|
|
1
|
+
/*! brew-js-react v0.4.5 | (c) misonou | https://hackmd.io/@misonou/brew-js-react */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory(require("brew-js"), require("react"), require("react-dom"), (function webpackLoadOptionalExternalModule() { try { return require("react-dom/client"); } catch(e) {} }()), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"), require("jQuery"));
|
|
@@ -397,6 +397,7 @@ var _lib$dom = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_z
|
|
|
397
397
|
setShortcut = _lib$dom.setShortcut,
|
|
398
398
|
focusable = _lib$dom.focusable,
|
|
399
399
|
focused = _lib$dom.focused,
|
|
400
|
+
setTabRoot = _lib$dom.setTabRoot,
|
|
400
401
|
setModal = _lib$dom.setModal,
|
|
401
402
|
releaseModal = _lib$dom.releaseModal,
|
|
402
403
|
retainFocus = _lib$dom.retainFocus,
|
|
@@ -1738,20 +1739,9 @@ function LoadingStateMixin() {
|
|
|
1738
1739
|
definePrototype(LoadingStateMixin, StatefulMixin, {
|
|
1739
1740
|
initElement: function initElement(element, state) {
|
|
1740
1741
|
LoadingStateMixinSuper.initElement.call(this, element, state);
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
state.loading = true;
|
|
1745
|
-
setClass(element, 'loading', true);
|
|
1746
|
-
},
|
|
1747
|
-
asyncEnd: function asyncEnd() {
|
|
1748
|
-
state.loading = false;
|
|
1749
|
-
setClass(element, 'loading', false);
|
|
1750
|
-
},
|
|
1751
|
-
cancelled: function cancelled() {
|
|
1752
|
-
state.loading = false;
|
|
1753
|
-
setClass(element, 'loading', false);
|
|
1754
|
-
}
|
|
1742
|
+
this.onDispose(subscribeAsync(element, function (loading) {
|
|
1743
|
+
state.loading = loading;
|
|
1744
|
+
setClass(element, 'loading', loading);
|
|
1755
1745
|
}));
|
|
1756
1746
|
},
|
|
1757
1747
|
getClassNames: function getClassNames() {
|
|
@@ -1789,11 +1779,9 @@ definePrototype(ScrollableMixin, ClassNameMixin, {
|
|
|
1789
1779
|
var options = this.options || {};
|
|
1790
1780
|
return extend({}, ScrollableMixinSuper.getCustomAttributes.call(this), {
|
|
1791
1781
|
'scrollable': [options.direction || 'both', options.handle || 'auto'].join(' ')
|
|
1792
|
-
}, options.
|
|
1793
|
-
'var': '{ pageIndex: 0 }',
|
|
1782
|
+
}, options.pagedItemSelector && {
|
|
1794
1783
|
'scroller-snap-page': options.paged,
|
|
1795
|
-
'scroller-page': options.pagedItemSelector
|
|
1796
|
-
'scroller-state': 'pageIndex'
|
|
1784
|
+
'scroller-page': options.pagedItemSelector
|
|
1797
1785
|
}, options.persistScroll && {
|
|
1798
1786
|
'persist-scroll': ''
|
|
1799
1787
|
});
|
|
@@ -1804,12 +1792,8 @@ definePrototype(ScrollableMixin, ClassNameMixin, {
|
|
|
1804
1792
|
initElement: function initElement(element, state) {
|
|
1805
1793
|
var self = this;
|
|
1806
1794
|
self.onDispose(app_app.on(element, {
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
extend(self, {
|
|
1810
|
-
pageIndex: e.newValues.pageIndex
|
|
1811
|
-
});
|
|
1812
|
-
}
|
|
1795
|
+
scrollIndexChange: function scrollIndexChange(e) {
|
|
1796
|
+
self.pageIndex = e.newIndex;
|
|
1813
1797
|
},
|
|
1814
1798
|
scrollStart: function scrollStart() {
|
|
1815
1799
|
self.scrolling = true;
|