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.modern.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
import 'material-design-icons-iconfont/dist/material-design-icons.css';
|
2
2
|
import React, { useContext, useState, useEffect, Fragment, useRef, Children, useMemo } from 'react';
|
3
|
+
import { NotificationContainer, NotificationManager } from 'react-notifications';
|
4
|
+
import 'react-notifications/lib/notifications.css';
|
3
5
|
import equal from 'deep-equal';
|
4
6
|
import ResumableJS from 'resumablejs';
|
5
7
|
|
@@ -895,7 +897,9 @@ var TextField = function TextField(props) {
|
|
895
897
|
onChange: change,
|
896
898
|
onKeyDown: onKeyPress,
|
897
899
|
onFocus: focus,
|
898
|
-
readOnly: readOnly
|
900
|
+
readOnly: readOnly,
|
901
|
+
onfocus: "(this.type='date')",
|
902
|
+
onfocusout: "(this.type='text')"
|
899
903
|
}), /*#__PURE__*/React.createElement("span", {
|
900
904
|
className: "bar"
|
901
905
|
}), label ? /*#__PURE__*/React.createElement("label", null, labelTxt) : null);
|
@@ -1946,6 +1950,14 @@ var SiteProvider = function SiteProvider(_ref) {
|
|
1946
1950
|
},
|
1947
1951
|
closePreview: function closePreview() {
|
1948
1952
|
setPreview(null);
|
1953
|
+
},
|
1954
|
+
confirm: function confirm(message) {
|
1955
|
+
return window.confirm(message);
|
1956
|
+
},
|
1957
|
+
notify: function notify(_ref2) {
|
1958
|
+
var title = _ref2.title,
|
1959
|
+
body = _ref2.body;
|
1960
|
+
NotificationManager.info(body, title);
|
1949
1961
|
}
|
1950
1962
|
};
|
1951
1963
|
return /*#__PURE__*/React.createElement(SiteContext.Provider, {
|
@@ -1956,16 +1968,16 @@ var SiteProvider = function SiteProvider(_ref) {
|
|
1956
1968
|
* Site
|
1957
1969
|
*/
|
1958
1970
|
|
1959
|
-
var Site = function Site(
|
1960
|
-
var icon =
|
1961
|
-
logo =
|
1962
|
-
title =
|
1963
|
-
toolbar =
|
1964
|
-
children =
|
1965
|
-
init =
|
1966
|
-
min =
|
1967
|
-
lang =
|
1968
|
-
dictionary =
|
1971
|
+
var Site = function Site(_ref3) {
|
1972
|
+
var icon = _ref3.icon,
|
1973
|
+
logo = _ref3.logo,
|
1974
|
+
title = _ref3.title,
|
1975
|
+
toolbar = _ref3.toolbar,
|
1976
|
+
children = _ref3.children,
|
1977
|
+
init = _ref3.init,
|
1978
|
+
min = _ref3.min,
|
1979
|
+
lang = _ref3.lang,
|
1980
|
+
dictionary = _ref3.dictionary;
|
1969
1981
|
return /*#__PURE__*/React.createElement(SiteProvider, {
|
1970
1982
|
siteLang: lang,
|
1971
1983
|
siteDictionary: dictionary
|
@@ -1981,12 +1993,17 @@ var Site = function Site(_ref2) {
|
|
1981
1993
|
init: init
|
1982
1994
|
}, children, /*#__PURE__*/React.createElement(Page, {
|
1983
1995
|
id: "EMPTY"
|
1984
|
-
}, "EMPTY")), /*#__PURE__*/React.createElement(SiteAside, null), /*#__PURE__*/React.createElement(SiteConsole, null), /*#__PURE__*/React.createElement(SiteDialog, null), /*#__PURE__*/React.createElement(SitePreview, null)));
|
1996
|
+
}, "EMPTY")), /*#__PURE__*/React.createElement(SiteAside, null), /*#__PURE__*/React.createElement(SiteConsole, null), /*#__PURE__*/React.createElement(SiteDialog, null), /*#__PURE__*/React.createElement(SitePreview, null), /*#__PURE__*/React.createElement(SiteNotifications, null)));
|
1997
|
+
};
|
1998
|
+
|
1999
|
+
var SiteNotifications = function SiteNotifications() {
|
2000
|
+
return /*#__PURE__*/React.createElement(NotificationContainer, null);
|
1985
2001
|
};
|
1986
2002
|
/**
|
1987
2003
|
* Site Header
|
1988
2004
|
*/
|
1989
2005
|
|
2006
|
+
|
1990
2007
|
var SiteHeader = function SiteHeader(props) {
|
1991
2008
|
var _props$icon = props.icon,
|
1992
2009
|
icon = _props$icon === void 0 ? "equalizer" : _props$icon,
|
@@ -2001,8 +2018,8 @@ var SiteHeader = function SiteHeader(props) {
|
|
2001
2018
|
*/
|
2002
2019
|
|
2003
2020
|
|
2004
|
-
var SiteToolBar = function SiteToolBar(
|
2005
|
-
var children =
|
2021
|
+
var SiteToolBar = function SiteToolBar(_ref4) {
|
2022
|
+
var children = _ref4.children;
|
2006
2023
|
useContext(SiteContext);
|
2007
2024
|
return /*#__PURE__*/React.createElement("nav", null, children);
|
2008
2025
|
};
|
@@ -2020,9 +2037,9 @@ var SiteAside = function SiteAside() {
|
|
2020
2037
|
*/
|
2021
2038
|
|
2022
2039
|
|
2023
|
-
var SiteMenu = function SiteMenu(
|
2024
|
-
var children =
|
2025
|
-
min =
|
2040
|
+
var SiteMenu = function SiteMenu(_ref5) {
|
2041
|
+
var children = _ref5.children,
|
2042
|
+
min = _ref5.min;
|
2026
2043
|
var context = useContext(SiteContext);
|
2027
2044
|
var showNav = context.showNav;
|
2028
2045
|
useEffect(function () {
|
@@ -2053,10 +2070,10 @@ var SiteMenu = function SiteMenu(_ref4) {
|
|
2053
2070
|
}, /*#__PURE__*/React.createElement("main", null, Object.keys(sections).map(function (title) {
|
2054
2071
|
return /*#__PURE__*/React.createElement(Fragment, {
|
2055
2072
|
key: title
|
2056
|
-
}, sections[title].map(function (
|
2057
|
-
var id =
|
2058
|
-
|
2059
|
-
icon =
|
2073
|
+
}, sections[title].map(function (_ref6) {
|
2074
|
+
var id = _ref6.id,
|
2075
|
+
_ref6$icon = _ref6.icon,
|
2076
|
+
icon = _ref6$icon === void 0 ? 'info' : _ref6$icon;
|
2060
2077
|
return /*#__PURE__*/React.createElement(Icon, {
|
2061
2078
|
key: id,
|
2062
2079
|
icon: icon,
|
@@ -2076,9 +2093,9 @@ var SiteMenu = function SiteMenu(_ref4) {
|
|
2076
2093
|
*/
|
2077
2094
|
|
2078
2095
|
|
2079
|
-
var SitePage = function SitePage(
|
2080
|
-
var children =
|
2081
|
-
init =
|
2096
|
+
var SitePage = function SitePage(_ref7) {
|
2097
|
+
var children = _ref7.children,
|
2098
|
+
init = _ref7.init;
|
2082
2099
|
var context = useContext(SiteContext);
|
2083
2100
|
var page = context.page;
|
2084
2101
|
useEffect(function () {
|
@@ -2400,13 +2417,11 @@ var ContentForm = function ContentForm(_ref) {
|
|
2400
2417
|
filter = _ref.filter,
|
2401
2418
|
onChange = _ref.onChange;
|
2402
2419
|
var form = content.form();
|
2403
|
-
console.log(form);
|
2404
2420
|
var fields = Object.keys(form).map(function (key) {
|
2405
2421
|
return form[key];
|
2406
2422
|
}).filter(function (field) {
|
2407
2423
|
return filter ? filter(field) : true;
|
2408
2424
|
});
|
2409
|
-
console.log(fields);
|
2410
2425
|
return /*#__PURE__*/React.createElement(Form, {
|
2411
2426
|
className: "content-form",
|
2412
2427
|
columns: columns,
|