ywana-core8 0.0.692 → 0.0.694

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
@@ -3955,9 +3955,12 @@
3955
3955
  toolbar = props.toolbar,
3956
3956
  children = props.children,
3957
3957
  actions = props.actions,
3958
- className = props.className;
3958
+ className = props.className,
3959
+ onClose = props.onClose;
3959
3960
 
3960
3961
  function close() {
3962
+ if (onClose) onClose();
3963
+
3961
3964
  if (className === "prompt") {
3962
3965
  site.closePromptDialog();
3963
3966
  } else {
@@ -6320,6 +6323,18 @@
6320
6323
  }
6321
6324
  }
6322
6325
 
6326
+ function renderActions() {
6327
+ if (actions) {
6328
+ return actions.map(function (action) {
6329
+ // clone React action
6330
+ var action2 = React__default["default"].cloneElement(action, {
6331
+ form: form
6332
+ });
6333
+ return action2;
6334
+ });
6335
+ }
6336
+ }
6337
+
6323
6338
  function renderEditor() {
6324
6339
  var content = new Content(schema, form);
6325
6340
 
@@ -6365,7 +6380,7 @@
6365
6380
  raised: true,
6366
6381
  disabled: !canSave(),
6367
6382
  action: save
6368
- }), actions ? actions : null), renderEditor()) : null;
6383
+ }), renderActions()), renderEditor()) : null;
6369
6384
  };
6370
6385
  /**
6371
6386
  * Collection Context