ywana-core8 0.0.418 → 0.0.421

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
@@ -1903,8 +1903,6 @@
1903
1903
  value = _useState[0],
1904
1904
  setValue = _useState[1];
1905
1905
 
1906
- React.useState(false);
1907
-
1908
1906
  function remove(index) {
1909
1907
  var next = tokens.slice();
1910
1908
  next.splice(index, 1);
@@ -1917,7 +1915,7 @@
1917
1915
  }
1918
1916
 
1919
1917
  function changeDropDown(fid, value) {
1920
- var next = tokens.concat(value);
1918
+ var next = Array.isArray(tokens) ? tokens.concat(value) : [value];
1921
1919
  if (onChange) onChange(id, next);
1922
1920
  setValue('');
1923
1921
  }
@@ -1939,9 +1937,10 @@
1939
1937
  }
1940
1938
  }
1941
1939
 
1940
+ var tks = Array.isArray(tokens) ? tokens : [];
1942
1941
  return /*#__PURE__*/React__default["default"].createElement("div", {
1943
1942
  className: "tokenField"
1944
- }, /*#__PURE__*/React__default["default"].createElement("label", null, label), tokens.map(function (text, index) {
1943
+ }, /*#__PURE__*/React__default["default"].createElement("label", null, label), tks.map(function (text, index) {
1945
1944
  return /*#__PURE__*/React__default["default"].createElement(Token, {
1946
1945
  text: text,
1947
1946
  onDelete: function onDelete() {
@@ -3461,7 +3460,8 @@
3461
3460
  accept = _ref.accept,
3462
3461
  onSuccess = _ref.onSuccess,
3463
3462
  onComplete = _ref.onComplete,
3464
- onClose = _ref.onClose;
3463
+ onClose = _ref.onClose,
3464
+ children = _ref.children;
3465
3465
  var site = React.useContext(SiteContext);
3466
3466
 
3467
3467
  function success(file, message) {
@@ -3499,7 +3499,7 @@
3499
3499
  target: target,
3500
3500
  onSuccess: success,
3501
3501
  onComplete: complete
3502
- }));
3502
+ }), children);
3503
3503
  };
3504
3504
 
3505
3505
  /**
@@ -4098,7 +4098,6 @@
4098
4098
  Editor = field.Editor;
4099
4099
 
4100
4100
  function change(id, value) {
4101
- console.log(id, value);
4102
4101
  if (onChange) onChange(id, value);
4103
4102
  }
4104
4103