ywana-core8 0.0.415 → 0.0.418
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 +10 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +11 -26
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +10 -25
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +3 -1
- package/src/domain/ContentEditor.test.js +2 -2
- package/src/domain/TablePage.js +0 -6
- package/src/html/table.js +0 -1
- package/src/html/tokenfield.js +7 -18
package/dist/index.cjs
CHANGED
@@ -1855,7 +1855,6 @@ var StringCellViewer = function StringCellViewer(_ref7) {
|
|
1855
1855
|
break;
|
1856
1856
|
}
|
1857
1857
|
|
1858
|
-
console.log(value, format);
|
1859
1858
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
1860
1859
|
className: "field-editor string-viewer"
|
1861
1860
|
}, text);
|
@@ -1899,37 +1898,22 @@ var StringCellEditor = function StringCellEditor(_ref8) {
|
|
1899
1898
|
var TokenField = function TokenField(_ref) {
|
1900
1899
|
var id = _ref.id,
|
1901
1900
|
label = _ref.label,
|
1902
|
-
_ref$
|
1903
|
-
|
1901
|
+
_ref$tokens = _ref.tokens,
|
1902
|
+
tokens = _ref$tokens === void 0 ? [] : _ref$tokens,
|
1904
1903
|
readOnly = _ref.readOnly,
|
1905
1904
|
options = _ref.options,
|
1906
1905
|
onChange = _ref.onChange;
|
1907
|
-
var mounted = React.useRef(false);
|
1908
1906
|
|
1909
1907
|
var _useState = React.useState(),
|
1910
1908
|
value = _useState[0],
|
1911
1909
|
setValue = _useState[1];
|
1912
1910
|
|
1913
|
-
var _useState2 = React.useState(init),
|
1914
|
-
tokens = _useState2[0],
|
1915
|
-
setTokens = _useState2[1];
|
1916
|
-
|
1917
1911
|
React.useState(false);
|
1918
1912
|
|
1919
|
-
React.useEffect(function () {
|
1920
|
-
if (mounted.current) {
|
1921
|
-
if (onChange) {
|
1922
|
-
if (tokens) onChange(id, tokens);
|
1923
|
-
}
|
1924
|
-
} else {
|
1925
|
-
mounted.current = true;
|
1926
|
-
}
|
1927
|
-
}, [tokens]);
|
1928
|
-
|
1929
1913
|
function remove(index) {
|
1930
1914
|
var next = tokens.slice();
|
1931
1915
|
next.splice(index, 1);
|
1932
|
-
|
1916
|
+
if (onChange) onChange(id, next);
|
1933
1917
|
}
|
1934
1918
|
|
1935
1919
|
function change(event) {
|
@@ -1937,10 +1921,10 @@ var TokenField = function TokenField(_ref) {
|
|
1937
1921
|
setValue(value);
|
1938
1922
|
}
|
1939
1923
|
|
1940
|
-
function changeDropDown(
|
1924
|
+
function changeDropDown(fid, value) {
|
1941
1925
|
var next = tokens.concat(value);
|
1942
|
-
|
1943
|
-
setValue('
|
1926
|
+
if (onChange) onChange(id, next);
|
1927
|
+
setValue('');
|
1944
1928
|
}
|
1945
1929
|
|
1946
1930
|
function onEnter(event) {
|
@@ -1949,7 +1933,7 @@ var TokenField = function TokenField(_ref) {
|
|
1949
1933
|
event.stopPropagation();
|
1950
1934
|
var token = event.target.value;
|
1951
1935
|
var next = tokens.concat(token);
|
1952
|
-
|
1936
|
+
if (onChange) onChange(id, next);
|
1953
1937
|
setValue('');
|
1954
1938
|
}
|
1955
1939
|
|
@@ -4119,6 +4103,7 @@ var StringEditor = function StringEditor(_ref6) {
|
|
4119
4103
|
Editor = field.Editor;
|
4120
4104
|
|
4121
4105
|
function change(id, value) {
|
4106
|
+
console.log(id, value);
|
4122
4107
|
if (onChange) onChange(id, value);
|
4123
4108
|
}
|
4124
4109
|
|
@@ -4160,8 +4145,8 @@ var StringEditor = function StringEditor(_ref6) {
|
|
4160
4145
|
id: id,
|
4161
4146
|
label: label,
|
4162
4147
|
onChange: change,
|
4163
|
-
|
4164
|
-
|
4148
|
+
options: buildOptions(),
|
4149
|
+
tokens: value
|
4165
4150
|
});
|
4166
4151
|
|
4167
4152
|
default:
|