ywana-core8 0.0.374 → 0.0.377

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 CHANGED
@@ -45,11 +45,7 @@ var fetchAsync = function fetchAsync(method, URL, body, token, headers) {
45
45
  var request = {
46
46
  method: method,
47
47
  mode: 'cors',
48
- headers: {
49
- "Accept": "application/json",
50
- "Content-Type": "application/json",
51
- "x-access-token": token
52
- },
48
+ headers: requestHeaders,
53
49
  body: body
54
50
  };
55
51
  console.log("HTTP Client", request);
@@ -1207,7 +1203,8 @@ var FORMATS = {
1207
1203
  TIME: 'time',
1208
1204
  EMAIL: 'email',
1209
1205
  HTML: 'HTML',
1210
- URL: 'URL'
1206
+ URL: 'URL',
1207
+ IMG: 'IMG'
1211
1208
  };
1212
1209
  /**
1213
1210
  * CHECK
@@ -1810,6 +1807,20 @@ var StringCellViewer = function StringCellViewer(_ref7) {
1810
1807
  var locale = window.navigator.userLanguage || window.navigator.language;
1811
1808
 
1812
1809
  switch (format) {
1810
+ case FORMATS.URL:
1811
+ text = /*#__PURE__*/React__default["default"].createElement("a", {
1812
+ href: text,
1813
+ target: "download",
1814
+ download: true
1815
+ }, text);
1816
+ break;
1817
+
1818
+ case FORMATS.IMG:
1819
+ text = /*#__PURE__*/React__default["default"].createElement("img", {
1820
+ src: text
1821
+ });
1822
+ break;
1823
+
1813
1824
  case FORMATS.DATE:
1814
1825
  var fecha = new Date(text);
1815
1826
  fecha.setMinutes(fecha.getMinutes() + fecha.getTimezoneOffset() + 1);
@@ -1829,6 +1840,7 @@ var StringCellViewer = function StringCellViewer(_ref7) {
1829
1840
  break;
1830
1841
  }
1831
1842
 
1843
+ console.log(value, format);
1832
1844
  return /*#__PURE__*/React__default["default"].createElement("div", {
1833
1845
  className: "field-editor string-viewer"
1834
1846
  }, text);
@@ -3451,12 +3463,14 @@ var View = function View(props) {
3451
3463
  */
3452
3464
 
3453
3465
  var UploadDialog = function UploadDialog(_ref) {
3454
- var label = _ref.label,
3466
+ var className = _ref.className,
3467
+ label = _ref.label,
3455
3468
  target = _ref.target,
3456
3469
  accept = _ref.accept,
3457
3470
  onSuccess = _ref.onSuccess,
3458
3471
  onComplete = _ref.onComplete,
3459
- onClose = _ref.onClose;
3472
+ onClose = _ref.onClose,
3473
+ children = _ref.children;
3460
3474
  var site = React.useContext(SiteContext);
3461
3475
 
3462
3476
  function success(file, message) {
@@ -3484,6 +3498,7 @@ var UploadDialog = function UploadDialog(_ref) {
3484
3498
  use: "headline6"
3485
3499
  }, label);
3486
3500
  return /*#__PURE__*/React__default["default"].createElement(Dialog, {
3501
+ className: className,
3487
3502
  title: title,
3488
3503
  open: true,
3489
3504
  onAction: onAction,
@@ -3495,7 +3510,7 @@ var UploadDialog = function UploadDialog(_ref) {
3495
3510
  target: target,
3496
3511
  onSuccess: success,
3497
3512
  onComplete: complete
3498
- }));
3513
+ }), children);
3499
3514
  };
3500
3515
 
3501
3516
  /**