ywana-core8 0.0.357 → 0.0.360
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 +22 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -1
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +22 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +22 -9
- 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 +1 -1
- package/src/domain/ContentViewer.js +2 -0
- package/src/domain/TablePage.js +0 -4
- package/src/html/tokenfield.js +2 -2
- package/src/widgets/explorer/Explorer.css +2 -1
- package/src/widgets/upload/UploadDialog.js +8 -4
package/dist/index.cjs
CHANGED
@@ -1855,6 +1855,7 @@ var TokenField = function TokenField(_ref) {
|
|
1855
1855
|
label = _ref.label,
|
1856
1856
|
_ref$init = _ref.init,
|
1857
1857
|
init = _ref$init === void 0 ? [] : _ref$init,
|
1858
|
+
readOnly = _ref.readOnly,
|
1858
1859
|
onChange = _ref.onChange;
|
1859
1860
|
var mounted = React.useRef(false);
|
1860
1861
|
|
@@ -1917,7 +1918,8 @@ var TokenField = function TokenField(_ref) {
|
|
1917
1918
|
type: "text",
|
1918
1919
|
value: value,
|
1919
1920
|
onChange: change,
|
1920
|
-
onKeyDown: onEnter
|
1921
|
+
onKeyDown: onEnter,
|
1922
|
+
readOnly: readOnly
|
1921
1923
|
}));
|
1922
1924
|
};
|
1923
1925
|
/**
|
@@ -3430,11 +3432,16 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3430
3432
|
target = _ref.target,
|
3431
3433
|
accept = _ref.accept,
|
3432
3434
|
onSuccess = _ref.onSuccess,
|
3435
|
+
onComplete = _ref.onComplete,
|
3433
3436
|
onClose = _ref.onClose;
|
3434
3437
|
var site = React.useContext(SiteContext);
|
3435
3438
|
|
3436
|
-
function
|
3437
|
-
if (onSuccess) onSuccess(
|
3439
|
+
function success(file, message) {
|
3440
|
+
if (onSuccess) onSuccess(file, message);
|
3441
|
+
}
|
3442
|
+
|
3443
|
+
function complete(uploads) {
|
3444
|
+
if (onComplete) onComplete(uploads);
|
3438
3445
|
}
|
3439
3446
|
|
3440
3447
|
function onAction(action) {
|
@@ -3463,7 +3470,8 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
3463
3470
|
label: label,
|
3464
3471
|
accept: accept,
|
3465
3472
|
target: target,
|
3466
|
-
|
3473
|
+
onSuccess: success,
|
3474
|
+
onComplete: complete
|
3467
3475
|
}));
|
3468
3476
|
};
|
3469
3477
|
|
@@ -4034,6 +4042,8 @@ var StringEditor = function StringEditor(_ref6) {
|
|
4034
4042
|
editable = _field$editable === void 0 ? true : _field$editable,
|
4035
4043
|
_field$predictive = field.predictive,
|
4036
4044
|
predictive = _field$predictive === void 0 ? false : _field$predictive,
|
4045
|
+
_field$multivalue = field.multivalue,
|
4046
|
+
multivalue = _field$multivalue === void 0 ? false : _field$multivalue,
|
4037
4047
|
Editor = field.Editor;
|
4038
4048
|
|
4039
4049
|
function change(id, value) {
|
@@ -4076,6 +4086,11 @@ var StringEditor = function StringEditor(_ref6) {
|
|
4076
4086
|
options: buildOptions(),
|
4077
4087
|
readOnly: !editable,
|
4078
4088
|
predictive: predictive
|
4089
|
+
}) : multivalue ? /*#__PURE__*/React__default["default"].createElement(TokenField, {
|
4090
|
+
id: id,
|
4091
|
+
label: label,
|
4092
|
+
onChange: change,
|
4093
|
+
readOnly: !editable
|
4079
4094
|
}) : /*#__PURE__*/React__default["default"].createElement(TextField, {
|
4080
4095
|
outlined: outlined,
|
4081
4096
|
id: id,
|
@@ -5135,8 +5150,10 @@ var ContentViewer = function ContentViewer(props) {
|
|
5135
5150
|
var FieldViewer = function FieldViewer(props) {
|
5136
5151
|
var field = props.field,
|
5137
5152
|
value = props.value;
|
5138
|
-
var
|
5153
|
+
var id = field.id,
|
5154
|
+
type = field.type,
|
5139
5155
|
label = field.label;
|
5156
|
+
if (id === "id") return null;
|
5140
5157
|
|
5141
5158
|
switch (type) {
|
5142
5159
|
case TYPES.STRING:
|
@@ -5626,7 +5643,6 @@ var TableQueries = function TableQueries(props) {
|
|
5626
5643
|
var TableFilters = function TableFilters(props) {
|
5627
5644
|
var reload = function reload() {
|
5628
5645
|
try {
|
5629
|
-
console.log("TableFilters.reload()", form);
|
5630
5646
|
return Promise.resolve(pageContext.load(form)).then(function () {
|
5631
5647
|
setPageContext(Object.assign({}, pageContext));
|
5632
5648
|
});
|
@@ -5637,7 +5653,6 @@ var TableFilters = function TableFilters(props) {
|
|
5637
5653
|
|
5638
5654
|
var change = function change(next) {
|
5639
5655
|
try {
|
5640
|
-
console.log("TableFilters.change()", next);
|
5641
5656
|
setForm(next);
|
5642
5657
|
return Promise.resolve();
|
5643
5658
|
} catch (e) {
|
@@ -5671,11 +5686,9 @@ var TableFilters = function TableFilters(props) {
|
|
5671
5686
|
return filterSchema;
|
5672
5687
|
}, [schema]);
|
5673
5688
|
React.useEffect(function () {
|
5674
|
-
console.log("TableFilters onFiltersChange", filters);
|
5675
5689
|
if (filters) setForm(filters);
|
5676
5690
|
}, [filters]);
|
5677
5691
|
React.useEffect(function () {
|
5678
|
-
console.log("TableFilters onFormChanged", filters);
|
5679
5692
|
reload();
|
5680
5693
|
}, [form]);
|
5681
5694
|
|