ywana-core8 0.0.74 → 0.0.78

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,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,12 @@ 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(title, message) {
1958
+ NotificationManager.info(message, title);
1949
1959
  }
1950
1960
  };
1951
1961
  return /*#__PURE__*/React.createElement(SiteContext.Provider, {
@@ -1981,12 +1991,17 @@ var Site = function Site(_ref2) {
1981
1991
  init: init
1982
1992
  }, children, /*#__PURE__*/React.createElement(Page, {
1983
1993
  id: "EMPTY"
1984
- }, "EMPTY")), /*#__PURE__*/React.createElement(SiteAside, null), /*#__PURE__*/React.createElement(SiteConsole, null), /*#__PURE__*/React.createElement(SiteDialog, null), /*#__PURE__*/React.createElement(SitePreview, null)));
1994
+ }, "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)));
1995
+ };
1996
+
1997
+ var SiteNotifications = function SiteNotifications() {
1998
+ return /*#__PURE__*/React.createElement(NotificationContainer, null);
1985
1999
  };
1986
2000
  /**
1987
2001
  * Site Header
1988
2002
  */
1989
2003
 
2004
+
1990
2005
  var SiteHeader = function SiteHeader(props) {
1991
2006
  var _props$icon = props.icon,
1992
2007
  icon = _props$icon === void 0 ? "equalizer" : _props$icon,
@@ -2400,13 +2415,11 @@ var ContentForm = function ContentForm(_ref) {
2400
2415
  filter = _ref.filter,
2401
2416
  onChange = _ref.onChange;
2402
2417
  var form = content.form();
2403
- console.log(form);
2404
2418
  var fields = Object.keys(form).map(function (key) {
2405
2419
  return form[key];
2406
2420
  }).filter(function (field) {
2407
2421
  return filter ? filter(field) : true;
2408
2422
  });
2409
- console.log(fields);
2410
2423
  return /*#__PURE__*/React.createElement(Form, {
2411
2424
  className: "content-form",
2412
2425
  columns: columns,
@@ -4025,6 +4038,8 @@ var TablePage = function TablePage(props) {
4025
4038
  delay = _props$delay === void 0 ? 1000 : _props$delay,
4026
4039
  actions = props.actions,
4027
4040
  editable = props.editable,
4041
+ _props$canFilter = props.canFilter,
4042
+ canFilter = _props$canFilter === void 0 ? false : _props$canFilter,
4028
4043
  _props$canAdd = props.canAdd,
4029
4044
  canAdd = _props$canAdd === void 0 ? true : _props$canAdd,
4030
4045
  _props$canDelete = props.canDelete,
@@ -4141,11 +4156,11 @@ var TablePage = function TablePage(props) {
4141
4156
  }, /*#__PURE__*/React.createElement(MenuItem, {
4142
4157
  label: "Cargar Escenario 1",
4143
4158
  onSelect: playScenario
4144
- })) : null, actions), /*#__PURE__*/React.createElement("menu", {
4159
+ })) : null, actions), canFilter ? /*#__PURE__*/React.createElement("menu", {
4145
4160
  className: "table-page"
4146
4161
  }, /*#__PURE__*/React.createElement(TableFilters, {
4147
4162
  schema: schema
4148
- })), /*#__PURE__*/React.createElement("main", {
4163
+ })) : null, /*#__PURE__*/React.createElement("main", {
4149
4164
  key: id,
4150
4165
  className: "table-page"
4151
4166
  }, /*#__PURE__*/React.createElement(TableEditor, {