react-crud-mobile 1.3.159 → 1.3.161

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.
@@ -2156,6 +2156,7 @@ function UIElement(props) {
2156
2156
  });
2157
2157
  };
2158
2158
  scope.dialogShow = function (args) {
2159
+ var _event$dialog;
2159
2160
  var main = reactCrudUtils.ViewUtils.getCrud('view');
2160
2161
  var parent = main.dialog;
2161
2162
  var crud = args.crud;
@@ -2187,6 +2188,7 @@ function UIElement(props) {
2187
2188
  icon: original.icon,
2188
2189
  type: 'dialog'
2189
2190
  };
2191
+ var close = (_event$dialog = event.dialog) == null ? void 0 : _event$dialog.close;
2190
2192
  if (typeof event.dialog === 'object') {
2191
2193
  el = _extends({}, el, event.dialog);
2192
2194
  }
@@ -2204,7 +2206,8 @@ function UIElement(props) {
2204
2206
  crud: d,
2205
2207
  parent: parent,
2206
2208
  component: component,
2207
- scope: dialogScope
2209
+ scope: dialogScope,
2210
+ close: close
2208
2211
  };
2209
2212
  main.dialog = dialog;
2210
2213
  scope.toggleDialog(true);
@@ -2217,6 +2220,7 @@ function UIElement(props) {
2217
2220
  var _main$dialog;
2218
2221
  var main = reactCrudUtils.ViewUtils.getCrud('view');
2219
2222
  var old = scope.currentDialog;
2223
+ var parentScope = old.scope.parent;
2220
2224
  main.dialog = reactCrudUtils.Utils.nvl(old.parent, null);
2221
2225
  scope.currentDialog = null;
2222
2226
  if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
@@ -2225,6 +2229,13 @@ function UIElement(props) {
2225
2229
  }
2226
2230
  scope.toggleDialog(false);
2227
2231
  scope.update();
2232
+ var close = old.close;
2233
+ if (parentScope && close) {
2234
+ if (close != null && close.debug) console.log('Fechando');
2235
+ parentScope.call('close', {
2236
+ close: close
2237
+ });
2238
+ }
2228
2239
  };
2229
2240
  return /*#__PURE__*/jsxRuntime.jsx(CrudContext.Provider, {
2230
2241
  value: {