brew-js-react 0.4.8 → 0.5.1
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 +164 -136
- package/dist/brew-js-react.js.map +1 -1
- package/dist/brew-js-react.min.js +2 -2
- package/dist/brew-js-react.min.js.map +1 -1
- package/hooks.js +15 -8
- package/mixin.d.ts +56 -2
- package/mixin.js +7 -1
- package/mixins/AnimateMixin.d.ts +7 -0
- package/mixins/AnimateSequenceItemMixin.d.ts +6 -0
- package/mixins/AnimateSequenceItemMixin.js +6 -1
- package/mixins/AnimateSequenceMixin.d.ts +10 -0
- package/mixins/AnimateSequenceMixin.js +10 -8
- package/mixins/ClassNameMixin.d.ts +10 -1
- package/mixins/ClassNameMixin.js +13 -28
- package/mixins/ClassNameToggleMixin.d.ts +24 -0
- package/mixins/ClassNameToggleMixin.js +23 -0
- package/mixins/FlyoutMixin.d.ts +7 -0
- package/mixins/FlyoutMixin.js +1 -16
- package/mixins/FlyoutToggleMixin.d.ts +6 -0
- package/mixins/FocusStateMixin.d.ts +7 -0
- package/mixins/FocusStateMixin.js +2 -8
- package/mixins/LoadingStateMixin.d.ts +8 -0
- package/mixins/LoadingStateMixin.js +2 -3
- package/mixins/Mixin.d.ts +23 -5
- package/mixins/Mixin.js +3 -0
- package/mixins/ScrollIntoViewMixin.d.ts +17 -0
- package/mixins/ScrollIntoViewMixin.js +13 -9
- package/mixins/ScrollableMixin.d.ts +7 -0
- package/mixins/ScrollableMixin.js +2 -9
- package/mixins/StatefulMixin.d.ts +57 -9
- package/mixins/StatefulMixin.js +35 -37
- package/mixins/UnmanagedClassNameMixin.d.ts +18 -0
- package/mixins/UnmanagedClassNameMixin.js +13 -0
- package/package.json +2 -2
- package/view.js +2 -2
package/dist/brew-js-react.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/*! brew-js-react v0.
|
|
1
|
+
/*! brew-js-react v0.5.1 | (c) misonou | https://misonou.github.io */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
|
-
module.exports = factory(require("brew-js"), require("react"), require("react-dom"), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"));
|
|
4
|
+
module.exports = factory(require("brew-js"), require("react"), require("react-dom"), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
|
|
5
5
|
else if(typeof define === 'function' && define.amd)
|
|
6
|
-
define("brew-js-react", ["brew-js", "react", "react-dom", "zeta-dom", "zeta-dom-react", "waterpipe"], factory);
|
|
6
|
+
define("brew-js-react", ["brew-js", "react", "react-dom", "zeta-dom", "zeta-dom-react", "waterpipe", "jquery"], factory);
|
|
7
7
|
else if(typeof exports === 'object')
|
|
8
|
-
exports["brew-js-react"] = factory(require("brew-js"), require("react"), require("react-dom"), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"));
|
|
8
|
+
exports["brew-js-react"] = factory(require("brew-js"), require("react"), require("react-dom"), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
|
|
9
9
|
else
|
|
10
|
-
root["brew-js-react"] = factory(root["brew"], root["React"], root["ReactDOM"], root["zeta"], root["zeta-dom-react"], root["waterpipe"]);
|
|
11
|
-
})(self, function(__WEBPACK_EXTERNAL_MODULE__80__, __WEBPACK_EXTERNAL_MODULE__359__, __WEBPACK_EXTERNAL_MODULE__318__, __WEBPACK_EXTERNAL_MODULE__654__, __WEBPACK_EXTERNAL_MODULE__103__, __WEBPACK_EXTERNAL_MODULE__28__) {
|
|
10
|
+
root["brew-js-react"] = factory(root["brew"], root["React"], root["ReactDOM"], root["zeta"], root["zeta-dom-react"], root["waterpipe"], root["jQuery"]);
|
|
11
|
+
})(self, function(__WEBPACK_EXTERNAL_MODULE__80__, __WEBPACK_EXTERNAL_MODULE__359__, __WEBPACK_EXTERNAL_MODULE__318__, __WEBPACK_EXTERNAL_MODULE__654__, __WEBPACK_EXTERNAL_MODULE__103__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__47__) {
|
|
12
12
|
return /******/ (() => { // webpackBootstrap
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
@@ -36,6 +36,14 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__80__;
|
|
|
36
36
|
|
|
37
37
|
/***/ }),
|
|
38
38
|
|
|
39
|
+
/***/ 47:
|
|
40
|
+
/***/ ((module) => {
|
|
41
|
+
|
|
42
|
+
"use strict";
|
|
43
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__47__;
|
|
44
|
+
|
|
45
|
+
/***/ }),
|
|
46
|
+
|
|
39
47
|
/***/ 359:
|
|
40
48
|
/***/ ((module) => {
|
|
41
49
|
|
|
@@ -167,6 +175,7 @@ __webpack_require__.d(src_namespaceObject, {
|
|
|
167
175
|
"AnimateSequenceItemMixin": () => (AnimateSequenceItemMixin),
|
|
168
176
|
"AnimateSequenceMixin": () => (AnimateSequenceMixin),
|
|
169
177
|
"ClassNameMixin": () => (ClassNameMixin),
|
|
178
|
+
"ClassNameToggleMixin": () => (ClassNameToggleMixin),
|
|
170
179
|
"Dialog": () => (Dialog),
|
|
171
180
|
"FlyoutMixin": () => (FlyoutMixin),
|
|
172
181
|
"FlyoutToggleMixin": () => (FlyoutToggleMixin),
|
|
@@ -176,6 +185,7 @@ __webpack_require__.d(src_namespaceObject, {
|
|
|
176
185
|
"ScrollIntoViewMixin": () => (ScrollIntoViewMixin),
|
|
177
186
|
"ScrollableMixin": () => (ScrollableMixin),
|
|
178
187
|
"StatefulMixin": () => (StatefulMixin),
|
|
188
|
+
"UnmanagedClassNameMixin": () => (UnmanagedClassNameMixin),
|
|
179
189
|
"ViewStateContainer": () => (ViewStateContainer),
|
|
180
190
|
"createDialog": () => (createDialog),
|
|
181
191
|
"default": () => (src),
|
|
@@ -193,6 +203,7 @@ __webpack_require__.d(src_namespaceObject, {
|
|
|
193
203
|
"useAnimateSequenceMixin": () => (useAnimateSequenceMixin),
|
|
194
204
|
"useAppReady": () => (useAppReady),
|
|
195
205
|
"useAppReadyState": () => (useAppReadyState),
|
|
206
|
+
"useClassNameToggleMixin": () => (useClassNameToggleMixin),
|
|
196
207
|
"useFlyoutMixin": () => (useFlyoutMixin),
|
|
197
208
|
"useFocusStateMixin": () => (useFocusStateMixin),
|
|
198
209
|
"useLanguage": () => (useLanguage),
|
|
@@ -203,6 +214,7 @@ __webpack_require__.d(src_namespaceObject, {
|
|
|
203
214
|
"useRouteState": () => (useRouteState),
|
|
204
215
|
"useScrollIntoViewMixin": () => (useScrollIntoViewMixin),
|
|
205
216
|
"useScrollableMixin": () => (useScrollableMixin),
|
|
217
|
+
"useUnmanagedClassNameMixin": () => (useUnmanagedClassNameMixin),
|
|
206
218
|
"useViewContainerState": () => (useViewContext),
|
|
207
219
|
"useViewContext": () => (useViewContext)
|
|
208
220
|
});
|
|
@@ -216,6 +228,7 @@ var _defaultExport = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_roo
|
|
|
216
228
|
var install = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.install,
|
|
217
229
|
addExtension = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addExtension,
|
|
218
230
|
addDetect = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addDetect,
|
|
231
|
+
emitAppEvent = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.emitAppEvent,
|
|
219
232
|
isElementActive = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.isElementActive;
|
|
220
233
|
|
|
221
234
|
;// CONCATENATED MODULE: ./src/include/brew-js/app.js
|
|
@@ -277,6 +290,7 @@ var _lib$util = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_
|
|
|
277
290
|
setIntervalSafe = _lib$util.setIntervalSafe,
|
|
278
291
|
setImmediate = _lib$util.setImmediate,
|
|
279
292
|
setImmediateOnce = _lib$util.setImmediateOnce,
|
|
293
|
+
clearImmediateOnce = _lib$util.clearImmediateOnce,
|
|
280
294
|
_throws = _lib$util["throws"],
|
|
281
295
|
throwNotFunction = _lib$util.throwNotFunction,
|
|
282
296
|
errorWithCode = _lib$util.errorWithCode,
|
|
@@ -776,7 +790,7 @@ definePrototype(ViewContainer, external_commonjs_react_commonjs2_react_amd_react
|
|
|
776
790
|
self.currentElement = element;
|
|
777
791
|
state.container = element;
|
|
778
792
|
promise.then(function () {
|
|
779
|
-
animateIn(element, 'show');
|
|
793
|
+
animateIn(element, 'show', '[brew-view]', true);
|
|
780
794
|
app_app.emit('pageenter', element, {
|
|
781
795
|
pathname: app_app.path
|
|
782
796
|
}, true);
|
|
@@ -793,7 +807,8 @@ definePrototype(ViewContainer, external_commonjs_react_commonjs2_react_amd_react
|
|
|
793
807
|
key: routeMap.get(V).id,
|
|
794
808
|
value: state
|
|
795
809
|
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(ViewStateContainer, null, /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement('div', extend({}, self.props.rootProps, {
|
|
796
|
-
ref: initElement
|
|
810
|
+
ref: initElement,
|
|
811
|
+
'brew-view': ''
|
|
797
812
|
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(ErrorBoundary, {
|
|
798
813
|
onComponentLoaded: onComponentLoaded,
|
|
799
814
|
viewProps: viewProps
|
|
@@ -1005,8 +1020,8 @@ definePrototype(ViewState, {
|
|
|
1005
1020
|
get: function get() {
|
|
1006
1021
|
return this.store.get(this.key);
|
|
1007
1022
|
},
|
|
1008
|
-
set: function set(value) {
|
|
1009
|
-
this.store
|
|
1023
|
+
set: function set(value, snapshot) {
|
|
1024
|
+
this.store = updatePersistedValue(this.store, this.key, value, snapshot);
|
|
1010
1025
|
},
|
|
1011
1026
|
onPopState: function onPopState(callback) {
|
|
1012
1027
|
throwNotFunction(callback);
|
|
@@ -1016,6 +1031,19 @@ definePrototype(ViewState, {
|
|
|
1016
1031
|
}
|
|
1017
1032
|
});
|
|
1018
1033
|
|
|
1034
|
+
function updatePersistedValue(cur, key, value, snapshot) {
|
|
1035
|
+
if (cur.get(key) !== value) {
|
|
1036
|
+
if (snapshot && cur.has(key)) {
|
|
1037
|
+
app_app.snapshot();
|
|
1038
|
+
cur = getCurrentStates();
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
cur.set(key, value);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
return cur;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1019
1047
|
function updateViewState(state, key, store) {
|
|
1020
1048
|
var newValue = state.get();
|
|
1021
1049
|
|
|
@@ -1105,13 +1133,8 @@ function useRouteState(key, defaultValue, snapshotOnUpdate) {
|
|
|
1105
1133
|
if (!cur) {
|
|
1106
1134
|
// delay app ready to ensure that beforepageload event can be caught
|
|
1107
1135
|
app_app.beforeInit(delay(1));
|
|
1108
|
-
} else if (container.active
|
|
1109
|
-
|
|
1110
|
-
app_app.snapshot();
|
|
1111
|
-
cur = getCurrentStates();
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
cur.set(key, state[0]);
|
|
1136
|
+
} else if (container.active) {
|
|
1137
|
+
updatePersistedValue(cur, key, state[0], snapshotOnUpdate);
|
|
1115
1138
|
}
|
|
1116
1139
|
|
|
1117
1140
|
return state;
|
|
@@ -1265,6 +1288,9 @@ definePrototype(StaticAttributeMixin, Mixin, {
|
|
|
1265
1288
|
|
|
1266
1289
|
function Mixin() {}
|
|
1267
1290
|
definePrototype(Mixin, {
|
|
1291
|
+
reset: function reset() {
|
|
1292
|
+
return this;
|
|
1293
|
+
},
|
|
1268
1294
|
next: function next() {},
|
|
1269
1295
|
getRef: function getRef() {
|
|
1270
1296
|
return noop;
|
|
@@ -1353,54 +1379,59 @@ function StatefulMixin() {
|
|
|
1353
1379
|
Mixin.call(this);
|
|
1354
1380
|
|
|
1355
1381
|
StatefulMixin_(this, {
|
|
1356
|
-
elements: new
|
|
1382
|
+
elements: new Set(),
|
|
1383
|
+
states: new WeakMap(),
|
|
1357
1384
|
flush: watch(this, false),
|
|
1358
|
-
dispose: []
|
|
1359
|
-
states: {},
|
|
1360
|
-
prefix: '',
|
|
1361
|
-
counter: 0
|
|
1385
|
+
dispose: []
|
|
1362
1386
|
});
|
|
1363
1387
|
}
|
|
1364
1388
|
definePrototype(StatefulMixin, Mixin, {
|
|
1365
1389
|
get ref() {
|
|
1366
|
-
var
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
return state.ref || (state.ref = new MixinRefImpl(self.clone()));
|
|
1390
|
+
var state = StatefulMixin_(this);
|
|
1391
|
+
|
|
1392
|
+
return state.ref || (state.ref = new MixinRefImpl(this));
|
|
1370
1393
|
},
|
|
1371
1394
|
|
|
1372
1395
|
get state() {
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
var key = obj.prefix + obj.counter;
|
|
1376
|
-
return obj.states[key] || (obj.states[key] = this.initState());
|
|
1396
|
+
return StatefulMixin_(this).pending;
|
|
1377
1397
|
},
|
|
1378
1398
|
|
|
1379
1399
|
reset: function reset() {
|
|
1380
|
-
StatefulMixin_(this).
|
|
1400
|
+
StatefulMixin_(this).pending = {};
|
|
1381
1401
|
return this;
|
|
1382
1402
|
},
|
|
1383
1403
|
next: function next() {
|
|
1384
|
-
StatefulMixin_(this).
|
|
1404
|
+
StatefulMixin_(this).pending = {};
|
|
1385
1405
|
return this;
|
|
1386
1406
|
},
|
|
1387
1407
|
getRef: function getRef() {
|
|
1388
1408
|
var self = this;
|
|
1389
|
-
|
|
1409
|
+
|
|
1410
|
+
var obj = StatefulMixin_(self);
|
|
1411
|
+
|
|
1412
|
+
var newState = obj.pending;
|
|
1413
|
+
var state;
|
|
1390
1414
|
return function (current) {
|
|
1391
|
-
|
|
1415
|
+
if (current) {
|
|
1416
|
+
state = obj.states.get(current) || extend(self.initState(), newState);
|
|
1417
|
+
|
|
1418
|
+
if (state.element !== current) {
|
|
1419
|
+
state.element = current;
|
|
1420
|
+
self.initElement(current, state);
|
|
1421
|
+
obj.states.set(current, state);
|
|
1422
|
+
} else if (util_keys(newState)[0]) {
|
|
1423
|
+
self.mergeState(current, state, newState);
|
|
1424
|
+
}
|
|
1392
1425
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1426
|
+
self.onLayoutEffect(current, state);
|
|
1427
|
+
obj.elements.add(current);
|
|
1428
|
+
} else {
|
|
1429
|
+
obj.elements["delete"](state.element);
|
|
1395
1430
|
}
|
|
1396
1431
|
};
|
|
1397
1432
|
},
|
|
1398
1433
|
elements: function elements() {
|
|
1399
|
-
return
|
|
1400
|
-
return v.element;
|
|
1401
|
-
}).filter(function (v) {
|
|
1402
|
-
return v;
|
|
1403
|
-
});
|
|
1434
|
+
return map(StatefulMixin_(this).elements, pipe);
|
|
1404
1435
|
},
|
|
1405
1436
|
onDispose: function onDispose(callback) {
|
|
1406
1437
|
StatefulMixin_(this).dispose.push(callback);
|
|
@@ -1411,27 +1442,20 @@ definePrototype(StatefulMixin, Mixin, {
|
|
|
1411
1442
|
};
|
|
1412
1443
|
},
|
|
1413
1444
|
initElement: function initElement(element, state) {},
|
|
1445
|
+
mergeState: function mergeState(element, state, newState) {
|
|
1446
|
+
extend(state, newState);
|
|
1447
|
+
},
|
|
1448
|
+
onLayoutEffect: function onLayoutEffect(element, state) {},
|
|
1414
1449
|
clone: function clone() {
|
|
1415
|
-
|
|
1416
|
-
var clone = inherit(Object.getPrototypeOf(self), self);
|
|
1417
|
-
|
|
1418
|
-
StatefulMixin_(clone, extend({}, StatefulMixin_(self), {
|
|
1419
|
-
prefix: randomId() + '.',
|
|
1420
|
-
counter: 0
|
|
1421
|
-
}));
|
|
1422
|
-
|
|
1423
|
-
return clone;
|
|
1450
|
+
return this;
|
|
1424
1451
|
},
|
|
1425
1452
|
dispose: function dispose() {
|
|
1426
1453
|
var state = StatefulMixin_(this);
|
|
1427
1454
|
|
|
1428
|
-
var states = state.states;
|
|
1429
1455
|
combineFn(state.dispose.splice(0))();
|
|
1430
1456
|
state.flush();
|
|
1431
|
-
state.
|
|
1432
|
-
|
|
1433
|
-
delete states[i];
|
|
1434
|
-
});
|
|
1457
|
+
state.states = {};
|
|
1458
|
+
state.pending = {};
|
|
1435
1459
|
}
|
|
1436
1460
|
});
|
|
1437
1461
|
;// CONCATENATED MODULE: ./src/mixins/ClassNameMixin.js
|
|
@@ -1440,23 +1464,15 @@ definePrototype(StatefulMixin, Mixin, {
|
|
|
1440
1464
|
|
|
1441
1465
|
|
|
1442
1466
|
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
function checkState(self, element, state, isAsync) {
|
|
1467
|
+
function checkState(self, element, state, fireEvent) {
|
|
1446
1468
|
var classNames = state.classNames;
|
|
1447
1469
|
var prev = extend({}, classNames);
|
|
1448
|
-
each(
|
|
1449
|
-
classNames[
|
|
1470
|
+
each(classNames, function (i) {
|
|
1471
|
+
classNames[i] = element.classList.contains(i);
|
|
1450
1472
|
});
|
|
1451
1473
|
|
|
1452
|
-
if (!equal(prev, classNames)) {
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
if (isAsync) {
|
|
1456
|
-
setImmediate(cb);
|
|
1457
|
-
} else {
|
|
1458
|
-
cb();
|
|
1459
|
-
}
|
|
1474
|
+
if (fireEvent && !equal(prev, classNames)) {
|
|
1475
|
+
self.onClassNameUpdated(element, prev, extend({}, classNames));
|
|
1460
1476
|
}
|
|
1461
1477
|
}
|
|
1462
1478
|
|
|
@@ -1465,31 +1481,22 @@ function ClassNameMixin(classNames) {
|
|
|
1465
1481
|
this.classNames = classNames || [];
|
|
1466
1482
|
}
|
|
1467
1483
|
definePrototype(ClassNameMixin, StatefulMixin, {
|
|
1468
|
-
getClassNames: function getClassNames() {
|
|
1469
|
-
return [this.state.classNames];
|
|
1470
|
-
},
|
|
1471
|
-
getRef: function getRef() {
|
|
1472
|
-
var self = this;
|
|
1473
|
-
var element = self.state.element;
|
|
1474
|
-
|
|
1475
|
-
if (element && containsOrEquals(zeta_dom_dom.root, element)) {
|
|
1476
|
-
checkState(self, element, self.state, true);
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
return ClassNameMixinSuper.getRef.call(this);
|
|
1480
|
-
},
|
|
1481
1484
|
initState: function initState() {
|
|
1482
1485
|
return {
|
|
1483
1486
|
element: null,
|
|
1484
|
-
classNames:
|
|
1487
|
+
classNames: fill(this.classNames, false)
|
|
1485
1488
|
};
|
|
1486
1489
|
},
|
|
1487
1490
|
initElement: function initElement(element, state) {
|
|
1488
1491
|
var self = this;
|
|
1492
|
+
checkState(self, element, state);
|
|
1489
1493
|
watchOwnAttributes(element, 'class', function () {
|
|
1490
|
-
checkState(self, element, state);
|
|
1494
|
+
checkState(self, element, state, true);
|
|
1491
1495
|
});
|
|
1492
1496
|
},
|
|
1497
|
+
onLayoutEffect: function onLayoutEffect(element, state) {
|
|
1498
|
+
setClass(element, state.classNames);
|
|
1499
|
+
},
|
|
1493
1500
|
onClassNameUpdated: function onClassNameUpdated(element, prevState, state) {}
|
|
1494
1501
|
});
|
|
1495
1502
|
;// CONCATENATED MODULE: ./src/mixins/AnimateMixin.js
|
|
@@ -1533,14 +1540,27 @@ function AnimateSequenceItemMixin(className) {
|
|
|
1533
1540
|
this.className = className;
|
|
1534
1541
|
}
|
|
1535
1542
|
definePrototype(AnimateSequenceItemMixin, ClassNameMixin, {
|
|
1543
|
+
getCustomAttributes: function getCustomAttributes() {
|
|
1544
|
+
return extend({}, AnimateSequenceItemMixinSuper.getCustomAttributes.call(this), {
|
|
1545
|
+
'is-animate-sequence': ''
|
|
1546
|
+
});
|
|
1547
|
+
},
|
|
1536
1548
|
getClassNames: function getClassNames() {
|
|
1537
1549
|
return [this.className].concat(AnimateSequenceItemMixinSuper.getClassNames.call(this));
|
|
1538
1550
|
}
|
|
1539
1551
|
});
|
|
1552
|
+
// EXTERNAL MODULE: external {"commonjs":"jquery","commonjs2":"jquery","amd":"jquery","root":"jQuery"}
|
|
1553
|
+
var external_commonjs_jquery_commonjs2_jquery_amd_jquery_root_jQuery_ = __webpack_require__(47);
|
|
1554
|
+
;// CONCATENATED MODULE: ./src/include/external/jquery.js
|
|
1555
|
+
// @ts-nocheck
|
|
1556
|
+
|
|
1557
|
+
/* harmony default export */ const jquery = (external_commonjs_jquery_commonjs2_jquery_amd_jquery_root_jQuery_);
|
|
1540
1558
|
;// CONCATENATED MODULE: ./src/mixins/AnimateSequenceMixin.js
|
|
1541
1559
|
|
|
1542
1560
|
|
|
1543
1561
|
|
|
1562
|
+
|
|
1563
|
+
|
|
1544
1564
|
var AnimateSequenceMixinSuper = AnimateMixin.prototype;
|
|
1545
1565
|
var animateSequenceMixinCounter = 0;
|
|
1546
1566
|
function AnimateSequenceMixin() {
|
|
@@ -1554,10 +1574,6 @@ definePrototype(AnimateSequenceMixin, AnimateMixin, {
|
|
|
1554
1574
|
this.selector = options;
|
|
1555
1575
|
return this;
|
|
1556
1576
|
},
|
|
1557
|
-
reset: function reset() {
|
|
1558
|
-
this.item.reset();
|
|
1559
|
-
return AnimateSequenceMixinSuper.reset.call(this);
|
|
1560
|
-
},
|
|
1561
1577
|
getCustomAttributes: function getCustomAttributes() {
|
|
1562
1578
|
var self = this;
|
|
1563
1579
|
return extend({}, AnimateSequenceMixinSuper.getCustomAttributes.call(self), {
|
|
@@ -1566,10 +1582,37 @@ definePrototype(AnimateSequenceMixin, AnimateMixin, {
|
|
|
1566
1582
|
'animate-sequence': self.selector || '.' + self.className
|
|
1567
1583
|
});
|
|
1568
1584
|
},
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1585
|
+
initElement: function initElement(element, state) {
|
|
1586
|
+
var self = this;
|
|
1587
|
+
AnimateSequenceMixinSuper.initElement.call(self, element, state);
|
|
1588
|
+
|
|
1589
|
+
if (self.selector) {
|
|
1590
|
+
self.onDispose(watchElements(element, self.selector, function (addedNodes) {
|
|
1591
|
+
jquery(addedNodes).attr('is-animate-sequence', '');
|
|
1592
|
+
}));
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
});
|
|
1596
|
+
;// CONCATENATED MODULE: ./src/mixins/ClassNameToggleMixin.js
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
function ClassNameToggleMixin() {
|
|
1601
|
+
StatefulMixin.call(this);
|
|
1602
|
+
}
|
|
1603
|
+
definePrototype(ClassNameToggleMixin, StatefulMixin, {
|
|
1604
|
+
withOptions: function withOptions(classes) {
|
|
1605
|
+
this.classes = extend({}, classes);
|
|
1606
|
+
},
|
|
1607
|
+
getClassNames: function getClassNames() {
|
|
1608
|
+
return this.classes;
|
|
1609
|
+
},
|
|
1610
|
+
set: function set(name, value) {
|
|
1611
|
+
value = isPlainObject(name) || kv(name, value);
|
|
1612
|
+
each(this.elements(), function (i, v) {
|
|
1613
|
+
setClass(v, value);
|
|
1572
1614
|
});
|
|
1615
|
+
extend(this.classes, value);
|
|
1573
1616
|
}
|
|
1574
1617
|
});
|
|
1575
1618
|
;// CONCATENATED MODULE: ./src/mixins/FlyoutToggleMixin.js
|
|
@@ -1605,7 +1648,6 @@ definePrototype(FlyoutToggleMixin, ClassNameMixin, {
|
|
|
1605
1648
|
|
|
1606
1649
|
var FlyoutMixinSuper = ClassNameMixin.prototype;
|
|
1607
1650
|
var valueMap = new WeakMap();
|
|
1608
|
-
var aliasProps = 'animating isFlyoutOpened modal tabThrough visible'.split(' ');
|
|
1609
1651
|
function FlyoutMixin() {
|
|
1610
1652
|
var self = this;
|
|
1611
1653
|
ClassNameMixin.call(self, ['open', 'closing', 'visible', 'tweening-in', 'tweening-out']);
|
|
@@ -1621,10 +1663,6 @@ function FlyoutMixin() {
|
|
|
1621
1663
|
});
|
|
1622
1664
|
}
|
|
1623
1665
|
definePrototype(FlyoutMixin, ClassNameMixin, {
|
|
1624
|
-
reset: function reset() {
|
|
1625
|
-
this.toggle.reset();
|
|
1626
|
-
return FlyoutMixinSuper.reset.call(this);
|
|
1627
|
-
},
|
|
1628
1666
|
next: function next() {
|
|
1629
1667
|
this.effects = undefined;
|
|
1630
1668
|
return FlyoutMixinSuper.next.call(this);
|
|
@@ -1682,16 +1720,6 @@ definePrototype(FlyoutMixin, ClassNameMixin, {
|
|
|
1682
1720
|
}
|
|
1683
1721
|
}, true));
|
|
1684
1722
|
},
|
|
1685
|
-
clone: function clone() {
|
|
1686
|
-
var self = this;
|
|
1687
|
-
var mixin = extend(FlyoutMixinSuper.clone.call(self), {
|
|
1688
|
-
toggle: self.toggle.ref.getMixin()
|
|
1689
|
-
});
|
|
1690
|
-
each(aliasProps, function (i, v) {
|
|
1691
|
-
defineAliasProperty(mixin, v, self);
|
|
1692
|
-
});
|
|
1693
|
-
return mixin;
|
|
1694
|
-
},
|
|
1695
1723
|
onClassNameUpdated: function onClassNameUpdated(element, prevState, state) {
|
|
1696
1724
|
var self = this;
|
|
1697
1725
|
self.visible = state.open;
|
|
@@ -1739,16 +1767,8 @@ definePrototype(FocusStateMixin, StatefulMixin, {
|
|
|
1739
1767
|
}
|
|
1740
1768
|
}));
|
|
1741
1769
|
},
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
var focused = this.state.focused;
|
|
1745
|
-
|
|
1746
|
-
if (focused) {
|
|
1747
|
-
classes.focused = true;
|
|
1748
|
-
classes['focused-' + focused] = true;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
return [classes];
|
|
1770
|
+
onLayoutEffect: function onLayoutEffect(element, state) {
|
|
1771
|
+
setClass(element, 'focused', state.focused);
|
|
1752
1772
|
}
|
|
1753
1773
|
});
|
|
1754
1774
|
;// CONCATENATED MODULE: ./src/mixins/LoadingStateMixin.js
|
|
@@ -1756,7 +1776,6 @@ definePrototype(FocusStateMixin, StatefulMixin, {
|
|
|
1756
1776
|
|
|
1757
1777
|
|
|
1758
1778
|
|
|
1759
|
-
|
|
1760
1779
|
var LoadingStateMixinSuper = StatefulMixin.prototype;
|
|
1761
1780
|
function LoadingStateMixin() {
|
|
1762
1781
|
StatefulMixin.call(this);
|
|
@@ -1769,10 +1788,8 @@ definePrototype(LoadingStateMixin, StatefulMixin, {
|
|
|
1769
1788
|
setClass(element, 'loading', loading);
|
|
1770
1789
|
}));
|
|
1771
1790
|
},
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
loading: !!this.state.loading
|
|
1775
|
-
}];
|
|
1791
|
+
onLayoutEffect: function onLayoutEffect(element, state) {
|
|
1792
|
+
setClass(element, 'loading', state.loading);
|
|
1776
1793
|
}
|
|
1777
1794
|
});
|
|
1778
1795
|
;// CONCATENATED MODULE: ./tmp/brew-js/directive.js
|
|
@@ -1787,7 +1804,6 @@ var getDirectiveComponent = external_commonjs_brew_js_commonjs2_brew_js_amd_brew
|
|
|
1787
1804
|
|
|
1788
1805
|
|
|
1789
1806
|
var ScrollableMixinSuper = ClassNameMixin.prototype;
|
|
1790
|
-
var ScrollableMixin_aliasProps = 'pageIndex scrolling'.split(' ');
|
|
1791
1807
|
function ScrollableMixin() {
|
|
1792
1808
|
var self = this;
|
|
1793
1809
|
ClassNameMixin.call(self, ['scrollable-x', 'scrollable-x-l', 'scrollable-x-r', 'scrollable-y', 'scrollable-y-d', 'scrollable-y-u']);
|
|
@@ -1816,6 +1832,7 @@ definePrototype(ScrollableMixin, ClassNameMixin, {
|
|
|
1816
1832
|
},
|
|
1817
1833
|
initElement: function initElement(element, state) {
|
|
1818
1834
|
var self = this;
|
|
1835
|
+
ScrollableMixinSuper.initElement.call(self, element, state);
|
|
1819
1836
|
self.onDispose(app_app.on(element, {
|
|
1820
1837
|
scrollIndexChange: function scrollIndexChange(e) {
|
|
1821
1838
|
self.pageIndex = e.newIndex;
|
|
@@ -1827,13 +1844,6 @@ definePrototype(ScrollableMixin, ClassNameMixin, {
|
|
|
1827
1844
|
self.scrolling = false;
|
|
1828
1845
|
}
|
|
1829
1846
|
}, true));
|
|
1830
|
-
},
|
|
1831
|
-
clone: function clone() {
|
|
1832
|
-
var mixin = ScrollableMixinSuper.clone.call(this);
|
|
1833
|
-
each(ScrollableMixin_aliasProps, function (i, v) {
|
|
1834
|
-
defineAliasProperty(mixin, v, self);
|
|
1835
|
-
});
|
|
1836
|
-
return mixin;
|
|
1837
1847
|
}
|
|
1838
1848
|
});
|
|
1839
1849
|
each('destroy enable disable setOptions setStickyPosition refresh scrollPadding stop scrollLeft scrollTop scrollBy scrollTo scrollByPage scrollToPage scrollToElement', function (i, v) {
|
|
@@ -1851,17 +1861,31 @@ function ScrollIntoViewMixin() {
|
|
|
1851
1861
|
}
|
|
1852
1862
|
definePrototype(ScrollIntoViewMixin, StatefulMixin, {
|
|
1853
1863
|
when: function when(deps) {
|
|
1854
|
-
|
|
1864
|
+
this.state.deps = deps;
|
|
1865
|
+
return this;
|
|
1866
|
+
},
|
|
1867
|
+
initElement: function initElement(element, state) {
|
|
1868
|
+
state.callback = function () {
|
|
1869
|
+
scrollIntoView(element);
|
|
1870
|
+
};
|
|
1871
|
+
},
|
|
1872
|
+
mergeState: function mergeState(element, state, newState) {
|
|
1873
|
+
if (newState.deps && !equal(newState.deps, state.deps)) {
|
|
1874
|
+
setImmediateOnce(state.callback);
|
|
1875
|
+
}
|
|
1855
1876
|
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1877
|
+
extend(state, newState);
|
|
1878
|
+
}
|
|
1879
|
+
});
|
|
1880
|
+
;// CONCATENATED MODULE: ./src/mixins/UnmanagedClassNameMixin.js
|
|
1859
1881
|
|
|
1860
|
-
if (state.deps && !equal(deps, state.deps)) {
|
|
1861
|
-
setImmediateOnce(callback);
|
|
1862
|
-
}
|
|
1863
1882
|
|
|
1864
|
-
|
|
1883
|
+
function UnmanagedClassNameMixin() {
|
|
1884
|
+
ClassNameMixin.call(this);
|
|
1885
|
+
}
|
|
1886
|
+
definePrototype(UnmanagedClassNameMixin, ClassNameMixin, {
|
|
1887
|
+
memorize: function memorize() {
|
|
1888
|
+
this.classNames = makeArray(arguments);
|
|
1865
1889
|
return this;
|
|
1866
1890
|
}
|
|
1867
1891
|
});
|
|
@@ -1881,6 +1905,8 @@ definePrototype(ScrollIntoViewMixin, StatefulMixin, {
|
|
|
1881
1905
|
|
|
1882
1906
|
|
|
1883
1907
|
|
|
1908
|
+
|
|
1909
|
+
|
|
1884
1910
|
function extendSelf(options) {
|
|
1885
1911
|
extend(this, options);
|
|
1886
1912
|
}
|
|
@@ -1895,11 +1921,13 @@ function createUseFunction(ctor) {
|
|
|
1895
1921
|
|
|
1896
1922
|
var useAnimateMixin = createUseFunction(AnimateMixin);
|
|
1897
1923
|
var useAnimateSequenceMixin = createUseFunction(AnimateSequenceMixin);
|
|
1924
|
+
var useClassNameToggleMixin = createUseFunction(ClassNameToggleMixin);
|
|
1898
1925
|
var useFlyoutMixin = createUseFunction(FlyoutMixin);
|
|
1899
1926
|
var useFocusStateMixin = createUseFunction(FocusStateMixin);
|
|
1900
1927
|
var useLoadingStateMixin = createUseFunction(LoadingStateMixin);
|
|
1901
1928
|
var useScrollableMixin = createUseFunction(ScrollableMixin);
|
|
1902
1929
|
var useScrollIntoViewMixin = createUseFunction(ScrollIntoViewMixin);
|
|
1930
|
+
var useUnmanagedClassNameMixin = createUseFunction(UnmanagedClassNameMixin);
|
|
1903
1931
|
function useMixin(ctor) {
|
|
1904
1932
|
return (0,external_zeta_dom_react_.useSingleton)(function () {
|
|
1905
1933
|
return new ctor();
|