ywana-core8 0.0.76 → 0.0.80
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 +42 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +41 -24
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +43 -27
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -1
- package/src/domain/ContentEditor.js +1 -1
- package/src/html/index.js +2 -1
- package/src/html/switch.css +0 -0
- package/src/html/switch.js +9 -0
- package/src/site/site.js +15 -3
package/dist/index.umd.js
CHANGED
@@ -1,11 +1,12 @@
|
|
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('deep-equal'), require('resumablejs')) :
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'deep-equal', 'resumablejs'], factory) :
|
4
|
-
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.deepEqual, global.resumablejs));
|
5
|
-
})(this, (function (exports, materialDesignIcons_css, React, equal, ResumableJS) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('material-design-icons-iconfont/dist/material-design-icons.css'), require('react'), require('react-switch'), require('react-notifications'), require('react-notifications/lib/notifications.css'), require('deep-equal'), require('resumablejs')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'material-design-icons-iconfont/dist/material-design-icons.css', 'react', 'react-switch', 'react-notifications', 'react-notifications/lib/notifications.css', 'deep-equal', 'resumablejs'], factory) :
|
4
|
+
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactSwitch, global.reactNotifications, null, global.deepEqual, global.resumablejs));
|
5
|
+
})(this, (function (exports, materialDesignIcons_css, React, RSwitch, reactNotifications, notifications_css, equal, ResumableJS) {
|
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
|
+
var RSwitch__default = /*#__PURE__*/_interopDefaultLegacy(RSwitch);
|
9
10
|
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
10
11
|
var ResumableJS__default = /*#__PURE__*/_interopDefaultLegacy(ResumableJS);
|
11
12
|
|
@@ -1475,6 +1476,10 @@
|
|
1475
1476
|
}, actions));
|
1476
1477
|
};
|
1477
1478
|
|
1479
|
+
var Switch = function Switch(props) {
|
1480
|
+
return /*#__PURE__*/React__default["default"].createElement(RSwitch__default["default"], props);
|
1481
|
+
};
|
1482
|
+
|
1478
1483
|
/**
|
1479
1484
|
* Login Box
|
1480
1485
|
*/
|
@@ -1957,6 +1962,11 @@
|
|
1957
1962
|
},
|
1958
1963
|
confirm: function confirm(message) {
|
1959
1964
|
return window.confirm(message);
|
1965
|
+
},
|
1966
|
+
notify: function notify(_ref2) {
|
1967
|
+
var title = _ref2.title,
|
1968
|
+
body = _ref2.body;
|
1969
|
+
reactNotifications.NotificationManager.info(body, title);
|
1960
1970
|
}
|
1961
1971
|
};
|
1962
1972
|
return /*#__PURE__*/React__default["default"].createElement(SiteContext.Provider, {
|
@@ -1967,16 +1977,16 @@
|
|
1967
1977
|
* Site
|
1968
1978
|
*/
|
1969
1979
|
|
1970
|
-
var Site = function Site(
|
1971
|
-
var icon =
|
1972
|
-
logo =
|
1973
|
-
title =
|
1974
|
-
toolbar =
|
1975
|
-
children =
|
1976
|
-
init =
|
1977
|
-
min =
|
1978
|
-
lang =
|
1979
|
-
dictionary =
|
1980
|
+
var Site = function Site(_ref3) {
|
1981
|
+
var icon = _ref3.icon,
|
1982
|
+
logo = _ref3.logo,
|
1983
|
+
title = _ref3.title,
|
1984
|
+
toolbar = _ref3.toolbar,
|
1985
|
+
children = _ref3.children,
|
1986
|
+
init = _ref3.init,
|
1987
|
+
min = _ref3.min,
|
1988
|
+
lang = _ref3.lang,
|
1989
|
+
dictionary = _ref3.dictionary;
|
1980
1990
|
return /*#__PURE__*/React__default["default"].createElement(SiteProvider, {
|
1981
1991
|
siteLang: lang,
|
1982
1992
|
siteDictionary: dictionary
|
@@ -1992,12 +2002,17 @@
|
|
1992
2002
|
init: init
|
1993
2003
|
}, children, /*#__PURE__*/React__default["default"].createElement(Page, {
|
1994
2004
|
id: "EMPTY"
|
1995
|
-
}, "EMPTY")), /*#__PURE__*/React__default["default"].createElement(SiteAside, null), /*#__PURE__*/React__default["default"].createElement(SiteConsole, null), /*#__PURE__*/React__default["default"].createElement(SiteDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePreview, null)));
|
2005
|
+
}, "EMPTY")), /*#__PURE__*/React__default["default"].createElement(SiteAside, null), /*#__PURE__*/React__default["default"].createElement(SiteConsole, null), /*#__PURE__*/React__default["default"].createElement(SiteDialog, null), /*#__PURE__*/React__default["default"].createElement(SitePreview, null), /*#__PURE__*/React__default["default"].createElement(SiteNotifications, null)));
|
2006
|
+
};
|
2007
|
+
|
2008
|
+
var SiteNotifications = function SiteNotifications() {
|
2009
|
+
return /*#__PURE__*/React__default["default"].createElement(reactNotifications.NotificationContainer, null);
|
1996
2010
|
};
|
1997
2011
|
/**
|
1998
2012
|
* Site Header
|
1999
2013
|
*/
|
2000
2014
|
|
2015
|
+
|
2001
2016
|
var SiteHeader = function SiteHeader(props) {
|
2002
2017
|
var _props$icon = props.icon,
|
2003
2018
|
icon = _props$icon === void 0 ? "equalizer" : _props$icon,
|
@@ -2012,8 +2027,8 @@
|
|
2012
2027
|
*/
|
2013
2028
|
|
2014
2029
|
|
2015
|
-
var SiteToolBar = function SiteToolBar(
|
2016
|
-
var children =
|
2030
|
+
var SiteToolBar = function SiteToolBar(_ref4) {
|
2031
|
+
var children = _ref4.children;
|
2017
2032
|
React.useContext(SiteContext);
|
2018
2033
|
return /*#__PURE__*/React__default["default"].createElement("nav", null, children);
|
2019
2034
|
};
|
@@ -2031,9 +2046,9 @@
|
|
2031
2046
|
*/
|
2032
2047
|
|
2033
2048
|
|
2034
|
-
var SiteMenu = function SiteMenu(
|
2035
|
-
var children =
|
2036
|
-
min =
|
2049
|
+
var SiteMenu = function SiteMenu(_ref5) {
|
2050
|
+
var children = _ref5.children,
|
2051
|
+
min = _ref5.min;
|
2037
2052
|
var context = React.useContext(SiteContext);
|
2038
2053
|
var showNav = context.showNav;
|
2039
2054
|
React.useEffect(function () {
|
@@ -2064,10 +2079,10 @@
|
|
2064
2079
|
}, /*#__PURE__*/React__default["default"].createElement("main", null, Object.keys(sections).map(function (title) {
|
2065
2080
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
2066
2081
|
key: title
|
2067
|
-
}, sections[title].map(function (
|
2068
|
-
var id =
|
2069
|
-
|
2070
|
-
icon =
|
2082
|
+
}, sections[title].map(function (_ref6) {
|
2083
|
+
var id = _ref6.id,
|
2084
|
+
_ref6$icon = _ref6.icon,
|
2085
|
+
icon = _ref6$icon === void 0 ? 'info' : _ref6$icon;
|
2071
2086
|
return /*#__PURE__*/React__default["default"].createElement(Icon, {
|
2072
2087
|
key: id,
|
2073
2088
|
icon: icon,
|
@@ -2087,9 +2102,9 @@
|
|
2087
2102
|
*/
|
2088
2103
|
|
2089
2104
|
|
2090
|
-
var SitePage = function SitePage(
|
2091
|
-
var children =
|
2092
|
-
init =
|
2105
|
+
var SitePage = function SitePage(_ref7) {
|
2106
|
+
var children = _ref7.children,
|
2107
|
+
init = _ref7.init;
|
2093
2108
|
var context = React.useContext(SiteContext);
|
2094
2109
|
var page = context.page;
|
2095
2110
|
React.useEffect(function () {
|
@@ -4915,6 +4930,7 @@
|
|
4915
4930
|
exports.SiteContext = SiteContext;
|
4916
4931
|
exports.SiteProvider = SiteProvider;
|
4917
4932
|
exports.Stack = Stack;
|
4933
|
+
exports.Switch = Switch;
|
4918
4934
|
exports.TYPES = TYPES;
|
4919
4935
|
exports.Tab = Tab;
|
4920
4936
|
exports.TabbedContentEditor = TabbedContentEditor;
|