ywana-core8 0.1.58 → 0.1.60
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/index.cjs +33 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +26 -2
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +34 -36
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +37 -38
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/site/link.js +0 -49
- package/src/site/navigation.js +1 -1
- package/src/site/site.css +26 -2
- package/src/site/site.js +27 -22
package/dist/index.umd.js
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('resumablejs'), require('react-switch'), require('react-notifications-component'), require('react-notifications-component/dist/theme.css'), require('
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'resumablejs', 'react-switch', 'react-notifications-component', 'react-notifications-component/dist/theme.css', '
|
4
|
-
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.resumablejs, global.reactSwitch, global.reactNotificationsComponent, null, global.
|
5
|
-
})(this, (function (exports, materialDesignIcons_css, React, ResumableJS, RSwitch, reactNotificationsComponent, theme_css,
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('resumablejs'), require('react-switch'), require('react-notifications-component'), require('react-notifications-component/dist/theme.css'), require('moment'), require('moment-range'), require('moment/locale/es'), require('axios'), require('deep-equal')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'resumablejs', 'react-switch', 'react-notifications-component', 'react-notifications-component/dist/theme.css', 'moment', 'moment-range', 'moment/locale/es', 'axios', 'deep-equal'], factory) :
|
4
|
+
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.resumablejs, global.reactSwitch, global.reactNotificationsComponent, null, global.moment, global.momentRange, null, global.axios, global.deepEqual));
|
5
|
+
})(this, (function (exports, materialDesignIcons_css, React, ResumableJS, RSwitch, reactNotificationsComponent, theme_css, moment$1, momentRange, es, axios, equal) {
|
6
6
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
7
7
|
|
8
8
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
9
9
|
var ResumableJS__default = /*#__PURE__*/_interopDefaultLegacy(ResumableJS);
|
10
10
|
var RSwitch__default = /*#__PURE__*/_interopDefaultLegacy(RSwitch);
|
11
|
-
var motion__default = /*#__PURE__*/_interopDefaultLegacy(motion);
|
12
11
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment$1);
|
13
12
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
14
13
|
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
@@ -3359,6 +3358,7 @@
|
|
3359
3358
|
history = _useState2[0],
|
3360
3359
|
setHistory = _useState2[1];
|
3361
3360
|
var _useState3 = React.useState("left"),
|
3361
|
+
direction = _useState3[0],
|
3362
3362
|
setDirection = _useState3[1];
|
3363
3363
|
var isFirstLoad = React.useRef(true);
|
3364
3364
|
React.useEffect(function () {
|
@@ -3406,13 +3406,11 @@
|
|
3406
3406
|
page: page,
|
3407
3407
|
"goto": _goto,
|
3408
3408
|
goBack: goBack,
|
3409
|
-
history: history
|
3409
|
+
history: history,
|
3410
|
+
direction: direction
|
3410
3411
|
};
|
3411
3412
|
}
|
3412
3413
|
|
3413
|
-
var AnimatePresence = motion__default["default"].AnimatePresence,
|
3414
|
-
MotionDiv = motion__default["default"].motion;
|
3415
|
-
|
3416
3414
|
/**
|
3417
3415
|
* Site Provider
|
3418
3416
|
*/
|
@@ -3456,7 +3454,8 @@
|
|
3456
3454
|
var _useHashPage = useHashPage(),
|
3457
3455
|
page = _useHashPage.page,
|
3458
3456
|
_goto = _useHashPage["goto"],
|
3459
|
-
goBack = _useHashPage.goBack
|
3457
|
+
goBack = _useHashPage.goBack,
|
3458
|
+
direction = _useHashPage.direction;
|
3460
3459
|
var value = {
|
3461
3460
|
lang: lang,
|
3462
3461
|
setLang: setLang,
|
@@ -3494,6 +3493,7 @@
|
|
3494
3493
|
page: page,
|
3495
3494
|
"goto": _goto,
|
3496
3495
|
goBack: goBack,
|
3496
|
+
direction: direction,
|
3497
3497
|
dialog: dialog,
|
3498
3498
|
openDialog: function openDialog(dialog) {
|
3499
3499
|
setDialog(dialog);
|
@@ -3715,8 +3715,13 @@
|
|
3715
3715
|
var children = _ref8.children,
|
3716
3716
|
init = _ref8.init;
|
3717
3717
|
var context = React.useContext(SiteContext);
|
3718
|
-
var page = context.page
|
3719
|
-
|
3718
|
+
var page = context.page;
|
3719
|
+
var _useState12 = React.useState(page),
|
3720
|
+
renderedPage = _useState12[0],
|
3721
|
+
setRenderedPage = _useState12[1];
|
3722
|
+
var _useState13 = React.useState(''),
|
3723
|
+
transitionClass = _useState13[0],
|
3724
|
+
setTransitionClass = _useState13[1];
|
3720
3725
|
React.useEffect(function () {
|
3721
3726
|
if (init) {
|
3722
3727
|
context["goto"](init);
|
@@ -3724,32 +3729,25 @@
|
|
3724
3729
|
context["goto"]("EMPTY");
|
3725
3730
|
}
|
3726
3731
|
}, []);
|
3727
|
-
|
3728
|
-
|
3732
|
+
React.useEffect(function () {
|
3733
|
+
if (page !== renderedPage) {
|
3734
|
+
setTransitionClass("page-out-" + context.direction);
|
3735
|
+
setTimeout(function () {
|
3736
|
+
setTransitionClass("page-in-" + context.direction);
|
3737
|
+
setRenderedPage(page);
|
3738
|
+
setTimeout(function () {
|
3739
|
+
setTransitionClass('');
|
3740
|
+
}, 300);
|
3741
|
+
}, 300);
|
3742
|
+
setRenderedPage(page);
|
3743
|
+
}
|
3744
|
+
}, [page]);
|
3745
|
+
var currentPage = React.Children.toArray(children).filter(function (child) {
|
3746
|
+
return child.props ? child.props.id === renderedPage : false;
|
3729
3747
|
});
|
3730
|
-
var xOffset = direction === "left" ? 40 : -40;
|
3731
3748
|
return /*#__PURE__*/React__default["default"].createElement("main", {
|
3732
|
-
className: "site-page-container"
|
3733
|
-
},
|
3734
|
-
exitBeforeEnter: true
|
3735
|
-
}, currentPage && /*#__PURE__*/React__default["default"].createElement(MotionDiv, {
|
3736
|
-
key: page,
|
3737
|
-
initial: {
|
3738
|
-
opacity: 0,
|
3739
|
-
x: xOffset
|
3740
|
-
},
|
3741
|
-
animate: {
|
3742
|
-
opacity: 1,
|
3743
|
-
x: 0
|
3744
|
-
},
|
3745
|
-
exit: {
|
3746
|
-
opacity: 0,
|
3747
|
-
x: -xOffset
|
3748
|
-
},
|
3749
|
-
transition: {
|
3750
|
-
duration: 0.3
|
3751
|
-
}
|
3752
|
-
}, currentPage)));
|
3749
|
+
className: "site-page-container " + transitionClass
|
3750
|
+
}, currentPage);
|
3753
3751
|
};
|
3754
3752
|
|
3755
3753
|
/**
|
@@ -3935,10 +3933,10 @@
|
|
3935
3933
|
_ref$style = _ref.style,
|
3936
3934
|
style = _ref$style === void 0 ? {} : _ref$style;
|
3937
3935
|
var _useContext = React.useContext(SiteContext),
|
3938
|
-
|
3936
|
+
_goto = _useContext["goto"];
|
3939
3937
|
var handleClick = function handleClick(e) {
|
3940
3938
|
e.preventDefault();
|
3941
|
-
|
3939
|
+
_goto(page);
|
3942
3940
|
};
|
3943
3941
|
return /*#__PURE__*/React__default["default"].createElement("a", {
|
3944
3942
|
href: "#" + page,
|
@@ -12971,6 +12969,7 @@
|
|
12971
12969
|
exports.WizardContext = WizardContext;
|
12972
12970
|
exports.isEmpty = isEmpty;
|
12973
12971
|
exports.isFunction = isFunction;
|
12972
|
+
exports.useHashPage = useHashPage;
|
12974
12973
|
exports.validatePassword = validatePassword;
|
12975
12974
|
|
12976
12975
|
}));
|