ywana-core8 0.0.75 → 0.0.79
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 +41 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +41 -26
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +43 -30
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -1
- package/src/domain/ContentEditor.js +1 -1
- package/src/domain/ContentForm.js +0 -3
- package/src/html/textfield.js +1 -1
- package/src/site/site.js +16 -3
package/dist/index.umd.js
CHANGED
@@ -1,8 +1,8 @@
|
|
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-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-notifications', 'react-notifications/lib/notifications.css', 'deep-equal', 'resumablejs'], factory) :
|
4
|
+
(global = global || self, factory(global.ywanaCore8 = {}, null, global.react, global.reactNotifications, null, global.deepEqual, global.resumablejs));
|
5
|
+
})(this, (function (exports, materialDesignIcons_css, React, 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);
|
@@ -901,7 +901,9 @@
|
|
901
901
|
onChange: change,
|
902
902
|
onKeyDown: onKeyPress,
|
903
903
|
onFocus: focus,
|
904
|
-
readOnly: readOnly
|
904
|
+
readOnly: readOnly,
|
905
|
+
onfocus: "(this.type='date')",
|
906
|
+
onfocusout: "(this.type='text')"
|
905
907
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
906
908
|
className: "bar"
|
907
909
|
}), label ? /*#__PURE__*/React__default["default"].createElement("label", null, labelTxt) : null);
|
@@ -1952,6 +1954,14 @@
|
|
1952
1954
|
},
|
1953
1955
|
closePreview: function closePreview() {
|
1954
1956
|
setPreview(null);
|
1957
|
+
},
|
1958
|
+
confirm: function confirm(message) {
|
1959
|
+
return window.confirm(message);
|
1960
|
+
},
|
1961
|
+
notify: function notify(_ref2) {
|
1962
|
+
var title = _ref2.title,
|
1963
|
+
body = _ref2.body;
|
1964
|
+
reactNotifications.NotificationManager.info(body, title);
|
1955
1965
|
}
|
1956
1966
|
};
|
1957
1967
|
return /*#__PURE__*/React__default["default"].createElement(SiteContext.Provider, {
|
@@ -1962,16 +1972,16 @@
|
|
1962
1972
|
* Site
|
1963
1973
|
*/
|
1964
1974
|
|
1965
|
-
var Site = function Site(
|
1966
|
-
var icon =
|
1967
|
-
logo =
|
1968
|
-
title =
|
1969
|
-
toolbar =
|
1970
|
-
children =
|
1971
|
-
init =
|
1972
|
-
min =
|
1973
|
-
lang =
|
1974
|
-
dictionary =
|
1975
|
+
var Site = function Site(_ref3) {
|
1976
|
+
var icon = _ref3.icon,
|
1977
|
+
logo = _ref3.logo,
|
1978
|
+
title = _ref3.title,
|
1979
|
+
toolbar = _ref3.toolbar,
|
1980
|
+
children = _ref3.children,
|
1981
|
+
init = _ref3.init,
|
1982
|
+
min = _ref3.min,
|
1983
|
+
lang = _ref3.lang,
|
1984
|
+
dictionary = _ref3.dictionary;
|
1975
1985
|
return /*#__PURE__*/React__default["default"].createElement(SiteProvider, {
|
1976
1986
|
siteLang: lang,
|
1977
1987
|
siteDictionary: dictionary
|
@@ -1987,12 +1997,17 @@
|
|
1987
1997
|
init: init
|
1988
1998
|
}, children, /*#__PURE__*/React__default["default"].createElement(Page, {
|
1989
1999
|
id: "EMPTY"
|
1990
|
-
}, "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)));
|
2000
|
+
}, "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)));
|
2001
|
+
};
|
2002
|
+
|
2003
|
+
var SiteNotifications = function SiteNotifications() {
|
2004
|
+
return /*#__PURE__*/React__default["default"].createElement(reactNotifications.NotificationContainer, null);
|
1991
2005
|
};
|
1992
2006
|
/**
|
1993
2007
|
* Site Header
|
1994
2008
|
*/
|
1995
2009
|
|
2010
|
+
|
1996
2011
|
var SiteHeader = function SiteHeader(props) {
|
1997
2012
|
var _props$icon = props.icon,
|
1998
2013
|
icon = _props$icon === void 0 ? "equalizer" : _props$icon,
|
@@ -2007,8 +2022,8 @@
|
|
2007
2022
|
*/
|
2008
2023
|
|
2009
2024
|
|
2010
|
-
var SiteToolBar = function SiteToolBar(
|
2011
|
-
var children =
|
2025
|
+
var SiteToolBar = function SiteToolBar(_ref4) {
|
2026
|
+
var children = _ref4.children;
|
2012
2027
|
React.useContext(SiteContext);
|
2013
2028
|
return /*#__PURE__*/React__default["default"].createElement("nav", null, children);
|
2014
2029
|
};
|
@@ -2026,9 +2041,9 @@
|
|
2026
2041
|
*/
|
2027
2042
|
|
2028
2043
|
|
2029
|
-
var SiteMenu = function SiteMenu(
|
2030
|
-
var children =
|
2031
|
-
min =
|
2044
|
+
var SiteMenu = function SiteMenu(_ref5) {
|
2045
|
+
var children = _ref5.children,
|
2046
|
+
min = _ref5.min;
|
2032
2047
|
var context = React.useContext(SiteContext);
|
2033
2048
|
var showNav = context.showNav;
|
2034
2049
|
React.useEffect(function () {
|
@@ -2059,10 +2074,10 @@
|
|
2059
2074
|
}, /*#__PURE__*/React__default["default"].createElement("main", null, Object.keys(sections).map(function (title) {
|
2060
2075
|
return /*#__PURE__*/React__default["default"].createElement(React.Fragment, {
|
2061
2076
|
key: title
|
2062
|
-
}, sections[title].map(function (
|
2063
|
-
var id =
|
2064
|
-
|
2065
|
-
icon =
|
2077
|
+
}, sections[title].map(function (_ref6) {
|
2078
|
+
var id = _ref6.id,
|
2079
|
+
_ref6$icon = _ref6.icon,
|
2080
|
+
icon = _ref6$icon === void 0 ? 'info' : _ref6$icon;
|
2066
2081
|
return /*#__PURE__*/React__default["default"].createElement(Icon, {
|
2067
2082
|
key: id,
|
2068
2083
|
icon: icon,
|
@@ -2082,9 +2097,9 @@
|
|
2082
2097
|
*/
|
2083
2098
|
|
2084
2099
|
|
2085
|
-
var SitePage = function SitePage(
|
2086
|
-
var children =
|
2087
|
-
init =
|
2100
|
+
var SitePage = function SitePage(_ref7) {
|
2101
|
+
var children = _ref7.children,
|
2102
|
+
init = _ref7.init;
|
2088
2103
|
var context = React.useContext(SiteContext);
|
2089
2104
|
var page = context.page;
|
2090
2105
|
React.useEffect(function () {
|
@@ -2406,13 +2421,11 @@
|
|
2406
2421
|
filter = _ref.filter,
|
2407
2422
|
onChange = _ref.onChange;
|
2408
2423
|
var form = content.form();
|
2409
|
-
console.log(form);
|
2410
2424
|
var fields = Object.keys(form).map(function (key) {
|
2411
2425
|
return form[key];
|
2412
2426
|
}).filter(function (field) {
|
2413
2427
|
return filter ? filter(field) : true;
|
2414
2428
|
});
|
2415
|
-
console.log(fields);
|
2416
2429
|
return /*#__PURE__*/React__default["default"].createElement(Form, {
|
2417
2430
|
className: "content-form",
|
2418
2431
|
columns: columns,
|