ywana-core8 0.0.373 → 0.0.376

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
@@ -37,16 +37,19 @@ var fetchAsync = function fetchAsync(method, URL, body, token, headers) {
37
37
 
38
38
  try {
39
39
  console.log('FETCH', method, URL);
40
+ var requestHeaders = Object.assign({}, {
41
+ "Accept": "application/json",
42
+ "Content-Type": "application/json",
43
+ "x-access-token": token
44
+ }, headers);
40
45
  var request = {
41
46
  method: method,
42
47
  mode: 'cors',
43
- headers: Object.assign({
44
- "Accept": "application/json",
45
- "Content-Type": "application/json",
46
- "x-access-token": token
47
- }, headers),
48
+ headers: requestHeaders,
48
49
  body: body
49
50
  };
51
+ console.log("HTTP Client", request);
52
+ if (headers) request.headers = request.headers;
50
53
  return Promise.resolve(_catch$2(function () {
51
54
  return Promise.resolve(fetch(URL, request)).then(function (response) {
52
55
  var _exit;
@@ -1200,7 +1203,8 @@ var FORMATS = {
1200
1203
  TIME: 'time',
1201
1204
  EMAIL: 'email',
1202
1205
  HTML: 'HTML',
1203
- URL: 'URL'
1206
+ URL: 'URL',
1207
+ IMG: 'IMG'
1204
1208
  };
1205
1209
  /**
1206
1210
  * CHECK
@@ -1803,6 +1807,20 @@ var StringCellViewer = function StringCellViewer(_ref7) {
1803
1807
  var locale = window.navigator.userLanguage || window.navigator.language;
1804
1808
 
1805
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
+
1806
1824
  case FORMATS.DATE:
1807
1825
  var fecha = new Date(text);
1808
1826
  fecha.setMinutes(fecha.getMinutes() + fecha.getTimezoneOffset() + 1);
@@ -1822,6 +1840,7 @@ var StringCellViewer = function StringCellViewer(_ref7) {
1822
1840
  break;
1823
1841
  }
1824
1842
 
1843
+ console.log(value, format);
1825
1844
  return /*#__PURE__*/React__default["default"].createElement("div", {
1826
1845
  className: "field-editor string-viewer"
1827
1846
  }, text);