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.modern.js
CHANGED
@@ -1,5 +1,8 @@
|
|
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 RSwitch from 'react-switch';
|
4
|
+
import { NotificationContainer, NotificationManager } from 'react-notifications';
|
5
|
+
import 'react-notifications/lib/notifications.css';
|
3
6
|
import equal from 'deep-equal';
|
4
7
|
import ResumableJS from 'resumablejs';
|
5
8
|
|
@@ -1469,6 +1472,10 @@ var TreeItem = function TreeItem(_ref3) {
|
|
1469
1472
|
}, actions));
|
1470
1473
|
};
|
1471
1474
|
|
1475
|
+
var Switch = function Switch(props) {
|
1476
|
+
return /*#__PURE__*/React.createElement(RSwitch, props);
|
1477
|
+
};
|
1478
|
+
|
1472
1479
|
/**
|
1473
1480
|
* Login Box
|
1474
1481
|
*/
|
@@ -1951,6 +1958,11 @@ var SiteProvider = function SiteProvider(_ref) {
|
|
1951
1958
|
},
|
1952
1959
|
confirm: function confirm(message) {
|
1953
1960
|
return window.confirm(message);
|
1961
|
+
},
|
1962
|
+
notify: function notify(_ref2) {
|
1963
|
+
var title = _ref2.title,
|
1964
|
+
body = _ref2.body;
|
1965
|
+
NotificationManager.info(body, title);
|
1954
1966
|
}
|
1955
1967
|
};
|
1956
1968
|
return /*#__PURE__*/React.createElement(SiteContext.Provider, {
|
@@ -1961,16 +1973,16 @@ var SiteProvider = function SiteProvider(_ref) {
|
|
1961
1973
|
* Site
|
1962
1974
|
*/
|
1963
1975
|
|
1964
|
-
var Site = function Site(
|
1965
|
-
var icon =
|
1966
|
-
logo =
|
1967
|
-
title =
|
1968
|
-
toolbar =
|
1969
|
-
children =
|
1970
|
-
init =
|
1971
|
-
min =
|
1972
|
-
lang =
|
1973
|
-
dictionary =
|
1976
|
+
var Site = function Site(_ref3) {
|
1977
|
+
var icon = _ref3.icon,
|
1978
|
+
logo = _ref3.logo,
|
1979
|
+
title = _ref3.title,
|
1980
|
+
toolbar = _ref3.toolbar,
|
1981
|
+
children = _ref3.children,
|
1982
|
+
init = _ref3.init,
|
1983
|
+
min = _ref3.min,
|
1984
|
+
lang = _ref3.lang,
|
1985
|
+
dictionary = _ref3.dictionary;
|
1974
1986
|
return /*#__PURE__*/React.createElement(SiteProvider, {
|
1975
1987
|
siteLang: lang,
|
1976
1988
|
siteDictionary: dictionary
|
@@ -1986,12 +1998,17 @@ var Site = function Site(_ref2) {
|
|
1986
1998
|
init: init
|
1987
1999
|
}, children, /*#__PURE__*/React.createElement(Page, {
|
1988
2000
|
id: "EMPTY"
|
1989
|
-
}, "EMPTY")), /*#__PURE__*/React.createElement(SiteAside, null), /*#__PURE__*/React.createElement(SiteConsole, null), /*#__PURE__*/React.createElement(SiteDialog, null), /*#__PURE__*/React.createElement(SitePreview, null)));
|
2001
|
+
}, "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)));
|
2002
|
+
};
|
2003
|
+
|
2004
|
+
var SiteNotifications = function SiteNotifications() {
|
2005
|
+
return /*#__PURE__*/React.createElement(NotificationContainer, null);
|
1990
2006
|
};
|
1991
2007
|
/**
|
1992
2008
|
* Site Header
|
1993
2009
|
*/
|
1994
2010
|
|
2011
|
+
|
1995
2012
|
var SiteHeader = function SiteHeader(props) {
|
1996
2013
|
var _props$icon = props.icon,
|
1997
2014
|
icon = _props$icon === void 0 ? "equalizer" : _props$icon,
|
@@ -2006,8 +2023,8 @@ var SiteHeader = function SiteHeader(props) {
|
|
2006
2023
|
*/
|
2007
2024
|
|
2008
2025
|
|
2009
|
-
var SiteToolBar = function SiteToolBar(
|
2010
|
-
var children =
|
2026
|
+
var SiteToolBar = function SiteToolBar(_ref4) {
|
2027
|
+
var children = _ref4.children;
|
2011
2028
|
useContext(SiteContext);
|
2012
2029
|
return /*#__PURE__*/React.createElement("nav", null, children);
|
2013
2030
|
};
|
@@ -2025,9 +2042,9 @@ var SiteAside = function SiteAside() {
|
|
2025
2042
|
*/
|
2026
2043
|
|
2027
2044
|
|
2028
|
-
var SiteMenu = function SiteMenu(
|
2029
|
-
var children =
|
2030
|
-
min =
|
2045
|
+
var SiteMenu = function SiteMenu(_ref5) {
|
2046
|
+
var children = _ref5.children,
|
2047
|
+
min = _ref5.min;
|
2031
2048
|
var context = useContext(SiteContext);
|
2032
2049
|
var showNav = context.showNav;
|
2033
2050
|
useEffect(function () {
|
@@ -2058,10 +2075,10 @@ var SiteMenu = function SiteMenu(_ref4) {
|
|
2058
2075
|
}, /*#__PURE__*/React.createElement("main", null, Object.keys(sections).map(function (title) {
|
2059
2076
|
return /*#__PURE__*/React.createElement(Fragment, {
|
2060
2077
|
key: title
|
2061
|
-
}, sections[title].map(function (
|
2062
|
-
var id =
|
2063
|
-
|
2064
|
-
icon =
|
2078
|
+
}, sections[title].map(function (_ref6) {
|
2079
|
+
var id = _ref6.id,
|
2080
|
+
_ref6$icon = _ref6.icon,
|
2081
|
+
icon = _ref6$icon === void 0 ? 'info' : _ref6$icon;
|
2065
2082
|
return /*#__PURE__*/React.createElement(Icon, {
|
2066
2083
|
key: id,
|
2067
2084
|
icon: icon,
|
@@ -2081,9 +2098,9 @@ var SiteMenu = function SiteMenu(_ref4) {
|
|
2081
2098
|
*/
|
2082
2099
|
|
2083
2100
|
|
2084
|
-
var SitePage = function SitePage(
|
2085
|
-
var children =
|
2086
|
-
init =
|
2101
|
+
var SitePage = function SitePage(_ref7) {
|
2102
|
+
var children = _ref7.children,
|
2103
|
+
init = _ref7.init;
|
2087
2104
|
var context = useContext(SiteContext);
|
2088
2105
|
var page = context.page;
|
2089
2106
|
useEffect(function () {
|
@@ -4863,5 +4880,5 @@ var isFunction = function isFunction(value) {
|
|
4863
4880
|
return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
|
4864
4881
|
};
|
4865
4882
|
|
4866
|
-
export { Avatar, Button$1 as Button, CheckBox, Chip, Chips, CircularProgress, CollectionContext, CollectionEditor$1 as CollectionEditor, CollectionPage, Content, ContentEditor, ContentForm, CreateContentDialog$1 as CreateContentDialog, DataTable, Dialog, DropDown, EditContentDialog, FORMATS, FieldEditor, Form, HTTPClient, Header, Icon, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, Page, PageContext, PageProvider, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, TYPES, Tab, TabbedContentEditor, TablePage, Tabs, Text, TextField, TokenField, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadButton, UploadDialog, UploadFile, Uploader, Viewer, isFunction };
|
4883
|
+
export { Avatar, Button$1 as Button, CheckBox, Chip, Chips, CircularProgress, CollectionContext, CollectionEditor$1 as CollectionEditor, CollectionPage, Content, ContentEditor, ContentForm, CreateContentDialog$1 as CreateContentDialog, DataTable, Dialog, DropDown, EditContentDialog, FORMATS, FieldEditor, Form, HTTPClient, Header, Icon, Kanban, KanbanCard, KanbanColumn, LinearProgress, List, ListEditor, LoginBox, Menu, MenuIcon, MenuItem, MenuSeparator, Page, PageContext, PageProvider, Property, RadioButton, ResetPasswordBox, Section, Session, Site, SiteContext, SiteProvider, Stack, Switch, TYPES, Tab, TabbedContentEditor, TablePage, Tabs, Text, TextField, TokenField, Tree, TreeItem, TreeNode, TreededContentEditor, UploadArea, UploadButton, UploadDialog, UploadFile, Uploader, Viewer, isFunction };
|
4867
4884
|
//# sourceMappingURL=index.modern.js.map
|