ywana-core8 0.1.58 → 0.1.59
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 +12 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +12 -36
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +16 -39
- 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.js +6 -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,7 @@
|
|
3715
3715
|
var children = _ref8.children,
|
3716
3716
|
init = _ref8.init;
|
3717
3717
|
var context = React.useContext(SiteContext);
|
3718
|
-
var page = context.page
|
3719
|
-
direction = context.direction;
|
3718
|
+
var page = context.page;
|
3720
3719
|
React.useEffect(function () {
|
3721
3720
|
if (init) {
|
3722
3721
|
context["goto"](init);
|
@@ -3724,32 +3723,9 @@
|
|
3724
3723
|
context["goto"]("EMPTY");
|
3725
3724
|
}
|
3726
3725
|
}, []);
|
3727
|
-
|
3726
|
+
return /*#__PURE__*/React__default["default"].createElement("main", null, React__default["default"].Children.toArray(children).filter(function (child) {
|
3728
3727
|
return child.props ? child.props.id === page : false;
|
3729
|
-
});
|
3730
|
-
var xOffset = direction === "left" ? 40 : -40;
|
3731
|
-
return /*#__PURE__*/React__default["default"].createElement("main", {
|
3732
|
-
className: "site-page-container"
|
3733
|
-
}, /*#__PURE__*/React__default["default"].createElement(AnimatePresence, {
|
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)));
|
3728
|
+
}));
|
3753
3729
|
};
|
3754
3730
|
|
3755
3731
|
/**
|
@@ -3935,10 +3911,10 @@
|
|
3935
3911
|
_ref$style = _ref.style,
|
3936
3912
|
style = _ref$style === void 0 ? {} : _ref$style;
|
3937
3913
|
var _useContext = React.useContext(SiteContext),
|
3938
|
-
|
3914
|
+
_goto = _useContext["goto"];
|
3939
3915
|
var handleClick = function handleClick(e) {
|
3940
3916
|
e.preventDefault();
|
3941
|
-
|
3917
|
+
_goto(page);
|
3942
3918
|
};
|
3943
3919
|
return /*#__PURE__*/React__default["default"].createElement("a", {
|
3944
3920
|
href: "#" + page,
|
@@ -12971,6 +12947,7 @@
|
|
12971
12947
|
exports.WizardContext = WizardContext;
|
12972
12948
|
exports.isEmpty = isEmpty;
|
12973
12949
|
exports.isFunction = isFunction;
|
12950
|
+
exports.useHashPage = useHashPage;
|
12974
12951
|
exports.validatePassword = validatePassword;
|
12975
12952
|
|
12976
12953
|
}));
|