ywana-core8 0.0.77 → 0.0.81

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.
@@ -1,5 +1,6 @@
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';
3
4
  import { NotificationContainer, NotificationManager } from 'react-notifications';
4
5
  import 'react-notifications/lib/notifications.css';
5
6
  import equal from 'deep-equal';
@@ -1471,6 +1472,10 @@ var TreeItem = function TreeItem(_ref3) {
1471
1472
  }, actions));
1472
1473
  };
1473
1474
 
1475
+ var Switch = function Switch(props) {
1476
+ return /*#__PURE__*/React.createElement(RSwitch, props);
1477
+ };
1478
+
1474
1479
  /**
1475
1480
  * Login Box
1476
1481
  */
@@ -1954,8 +1959,10 @@ var SiteProvider = function SiteProvider(_ref) {
1954
1959
  confirm: function confirm(message) {
1955
1960
  return window.confirm(message);
1956
1961
  },
1957
- notify: function notify(title, message) {
1958
- NotificationManager.info(message, title);
1962
+ notify: function notify(_ref2) {
1963
+ var title = _ref2.title,
1964
+ body = _ref2.body;
1965
+ NotificationManager.info(body, title);
1959
1966
  }
1960
1967
  };
1961
1968
  return /*#__PURE__*/React.createElement(SiteContext.Provider, {
@@ -1966,16 +1973,16 @@ var SiteProvider = function SiteProvider(_ref) {
1966
1973
  * Site
1967
1974
  */
1968
1975
 
1969
- var Site = function Site(_ref2) {
1970
- var icon = _ref2.icon,
1971
- logo = _ref2.logo,
1972
- title = _ref2.title,
1973
- toolbar = _ref2.toolbar,
1974
- children = _ref2.children,
1975
- init = _ref2.init,
1976
- min = _ref2.min,
1977
- lang = _ref2.lang,
1978
- dictionary = _ref2.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;
1979
1986
  return /*#__PURE__*/React.createElement(SiteProvider, {
1980
1987
  siteLang: lang,
1981
1988
  siteDictionary: dictionary
@@ -2016,8 +2023,8 @@ var SiteHeader = function SiteHeader(props) {
2016
2023
  */
2017
2024
 
2018
2025
 
2019
- var SiteToolBar = function SiteToolBar(_ref3) {
2020
- var children = _ref3.children;
2026
+ var SiteToolBar = function SiteToolBar(_ref4) {
2027
+ var children = _ref4.children;
2021
2028
  useContext(SiteContext);
2022
2029
  return /*#__PURE__*/React.createElement("nav", null, children);
2023
2030
  };
@@ -2035,9 +2042,9 @@ var SiteAside = function SiteAside() {
2035
2042
  */
2036
2043
 
2037
2044
 
2038
- var SiteMenu = function SiteMenu(_ref4) {
2039
- var children = _ref4.children,
2040
- min = _ref4.min;
2045
+ var SiteMenu = function SiteMenu(_ref5) {
2046
+ var children = _ref5.children,
2047
+ min = _ref5.min;
2041
2048
  var context = useContext(SiteContext);
2042
2049
  var showNav = context.showNav;
2043
2050
  useEffect(function () {
@@ -2068,10 +2075,10 @@ var SiteMenu = function SiteMenu(_ref4) {
2068
2075
  }, /*#__PURE__*/React.createElement("main", null, Object.keys(sections).map(function (title) {
2069
2076
  return /*#__PURE__*/React.createElement(Fragment, {
2070
2077
  key: title
2071
- }, sections[title].map(function (_ref5) {
2072
- var id = _ref5.id,
2073
- _ref5$icon = _ref5.icon,
2074
- icon = _ref5$icon === void 0 ? 'info' : _ref5$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;
2075
2082
  return /*#__PURE__*/React.createElement(Icon, {
2076
2083
  key: id,
2077
2084
  icon: icon,
@@ -2091,9 +2098,9 @@ var SiteMenu = function SiteMenu(_ref4) {
2091
2098
  */
2092
2099
 
2093
2100
 
2094
- var SitePage = function SitePage(_ref6) {
2095
- var children = _ref6.children,
2096
- init = _ref6.init;
2101
+ var SitePage = function SitePage(_ref7) {
2102
+ var children = _ref7.children,
2103
+ init = _ref7.init;
2097
2104
  var context = useContext(SiteContext);
2098
2105
  var page = context.page;
2099
2106
  useEffect(function () {
@@ -4873,5 +4880,5 @@ var isFunction = function isFunction(value) {
4873
4880
  return value && (Object.prototype.toString.call(value) === "[object Function]" || "function" === typeof value || value instanceof Function);
4874
4881
  };
4875
4882
 
4876
- 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 };
4877
4884
  //# sourceMappingURL=index.modern.js.map