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.umd.js
CHANGED
@@ -1850,7 +1850,6 @@
|
|
1850
1850
|
break;
|
1851
1851
|
}
|
1852
1852
|
|
1853
|
-
console.log(value, format);
|
1854
1853
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
1855
1854
|
className: "field-editor string-viewer"
|
1856
1855
|
}, text);
|
@@ -1894,37 +1893,22 @@
|
|
1894
1893
|
var TokenField = function TokenField(_ref) {
|
1895
1894
|
var id = _ref.id,
|
1896
1895
|
label = _ref.label,
|
1897
|
-
_ref$
|
1898
|
-
|
1896
|
+
_ref$tokens = _ref.tokens,
|
1897
|
+
tokens = _ref$tokens === void 0 ? [] : _ref$tokens,
|
1899
1898
|
readOnly = _ref.readOnly,
|
1900
1899
|
options = _ref.options,
|
1901
1900
|
onChange = _ref.onChange;
|
1902
|
-
var mounted = React.useRef(false);
|
1903
1901
|
|
1904
1902
|
var _useState = React.useState(),
|
1905
1903
|
value = _useState[0],
|
1906
1904
|
setValue = _useState[1];
|
1907
1905
|
|
1908
|
-
var _useState2 = React.useState(init),
|
1909
|
-
tokens = _useState2[0],
|
1910
|
-
setTokens = _useState2[1];
|
1911
|
-
|
1912
1906
|
React.useState(false);
|
1913
1907
|
|
1914
|
-
React.useEffect(function () {
|
1915
|
-
if (mounted.current) {
|
1916
|
-
if (onChange) {
|
1917
|
-
if (tokens) onChange(id, tokens);
|
1918
|
-
}
|
1919
|
-
} else {
|
1920
|
-
mounted.current = true;
|
1921
|
-
}
|
1922
|
-
}, [tokens]);
|
1923
|
-
|
1924
1908
|
function remove(index) {
|
1925
1909
|
var next = tokens.slice();
|
1926
1910
|
next.splice(index, 1);
|
1927
|
-
|
1911
|
+
if (onChange) onChange(id, next);
|
1928
1912
|
}
|
1929
1913
|
|
1930
1914
|
function change(event) {
|
@@ -1932,10 +1916,10 @@
|
|
1932
1916
|
setValue(value);
|
1933
1917
|
}
|
1934
1918
|
|
1935
|
-
function changeDropDown(
|
1919
|
+
function changeDropDown(fid, value) {
|
1936
1920
|
var next = tokens.concat(value);
|
1937
|
-
|
1938
|
-
setValue('
|
1921
|
+
if (onChange) onChange(id, next);
|
1922
|
+
setValue('');
|
1939
1923
|
}
|
1940
1924
|
|
1941
1925
|
function onEnter(event) {
|
@@ -1944,7 +1928,7 @@
|
|
1944
1928
|
event.stopPropagation();
|
1945
1929
|
var token = event.target.value;
|
1946
1930
|
var next = tokens.concat(token);
|
1947
|
-
|
1931
|
+
if (onChange) onChange(id, next);
|
1948
1932
|
setValue('');
|
1949
1933
|
}
|
1950
1934
|
|
@@ -4114,6 +4098,7 @@
|
|
4114
4098
|
Editor = field.Editor;
|
4115
4099
|
|
4116
4100
|
function change(id, value) {
|
4101
|
+
console.log(id, value);
|
4117
4102
|
if (onChange) onChange(id, value);
|
4118
4103
|
}
|
4119
4104
|
|
@@ -4155,8 +4140,8 @@
|
|
4155
4140
|
id: id,
|
4156
4141
|
label: label,
|
4157
4142
|
onChange: change,
|
4158
|
-
|
4159
|
-
|
4143
|
+
options: buildOptions(),
|
4144
|
+
tokens: value
|
4160
4145
|
});
|
4161
4146
|
|
4162
4147
|
default:
|