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.umd.js CHANGED
@@ -40,11 +40,7 @@
40
40
  var request = {
41
41
  method: method,
42
42
  mode: 'cors',
43
- headers: {
44
- "Accept": "application/json",
45
- "Content-Type": "application/json",
46
- "x-access-token": token
47
- },
43
+ headers: requestHeaders,
48
44
  body: body
49
45
  };
50
46
  console.log("HTTP Client", request);
@@ -1202,7 +1198,8 @@
1202
1198
  TIME: 'time',
1203
1199
  EMAIL: 'email',
1204
1200
  HTML: 'HTML',
1205
- URL: 'URL'
1201
+ URL: 'URL',
1202
+ IMG: 'IMG'
1206
1203
  };
1207
1204
  /**
1208
1205
  * CHECK
@@ -1805,6 +1802,20 @@
1805
1802
  var locale = window.navigator.userLanguage || window.navigator.language;
1806
1803
 
1807
1804
  switch (format) {
1805
+ case FORMATS.URL:
1806
+ text = /*#__PURE__*/React__default["default"].createElement("a", {
1807
+ href: text,
1808
+ target: "download",
1809
+ download: true
1810
+ }, text);
1811
+ break;
1812
+
1813
+ case FORMATS.IMG:
1814
+ text = /*#__PURE__*/React__default["default"].createElement("img", {
1815
+ src: text
1816
+ });
1817
+ break;
1818
+
1808
1819
  case FORMATS.DATE:
1809
1820
  var fecha = new Date(text);
1810
1821
  fecha.setMinutes(fecha.getMinutes() + fecha.getTimezoneOffset() + 1);
@@ -1824,6 +1835,7 @@
1824
1835
  break;
1825
1836
  }
1826
1837
 
1838
+ console.log(value, format);
1827
1839
  return /*#__PURE__*/React__default["default"].createElement("div", {
1828
1840
  className: "field-editor string-viewer"
1829
1841
  }, text);
@@ -3446,12 +3458,14 @@
3446
3458
  */
3447
3459
 
3448
3460
  var UploadDialog = function UploadDialog(_ref) {
3449
- var label = _ref.label,
3461
+ var className = _ref.className,
3462
+ label = _ref.label,
3450
3463
  target = _ref.target,
3451
3464
  accept = _ref.accept,
3452
3465
  onSuccess = _ref.onSuccess,
3453
3466
  onComplete = _ref.onComplete,
3454
- onClose = _ref.onClose;
3467
+ onClose = _ref.onClose,
3468
+ children = _ref.children;
3455
3469
  var site = React.useContext(SiteContext);
3456
3470
 
3457
3471
  function success(file, message) {
@@ -3479,6 +3493,7 @@
3479
3493
  use: "headline6"
3480
3494
  }, label);
3481
3495
  return /*#__PURE__*/React__default["default"].createElement(Dialog, {
3496
+ className: className,
3482
3497
  title: title,
3483
3498
  open: true,
3484
3499
  onAction: onAction,
@@ -3490,7 +3505,7 @@
3490
3505
  target: target,
3491
3506
  onSuccess: success,
3492
3507
  onComplete: complete
3493
- }));
3508
+ }), children);
3494
3509
  };
3495
3510
 
3496
3511
  /**