react-crud-mobile 1.3.116 → 1.3.118

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.
@@ -1998,7 +1998,7 @@ function UIElement(props) {
1998
1998
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
1999
1999
  };
2000
2000
  var Container = function Container() {
2001
- var _scope$currentDialog2, _scope$currentDialog3;
2001
+ var _scope$currentDialog2, _scope$currentDialog3, _scope$currentDialog4;
2002
2002
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
2003
2003
  children: [isShowLabel() && /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
2004
2004
  style: getStyle('outerLabel', {
@@ -2036,8 +2036,8 @@ function UIElement(props) {
2036
2036
  scope: scope,
2037
2037
  crud: crud
2038
2038
  })), ((_scope$currentDialog2 = scope.currentDialog) == null ? void 0 : _scope$currentDialog2.component) && /*#__PURE__*/jsxRuntime.jsx(UIModal, {
2039
- scope: scope,
2040
- crud: (_scope$currentDialog3 = scope.currentDialog) == null ? void 0 : _scope$currentDialog3.crud,
2039
+ scope: (_scope$currentDialog3 = scope.currentDialog) == null ? void 0 : _scope$currentDialog3.scope,
2040
+ crud: (_scope$currentDialog4 = scope.currentDialog) == null ? void 0 : _scope$currentDialog4.crud,
2041
2041
  open: true,
2042
2042
  dialog: scope.currentDialog
2043
2043
  }), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
@@ -2087,7 +2087,6 @@ function UIElement(props) {
2087
2087
  });
2088
2088
  };
2089
2089
  scope.dialogShow = function (args) {
2090
- var _args$event, _args$event2;
2091
2090
  var main = reactCrudUtils.ViewUtils.getCrud('view');
2092
2091
  var parent = main.dialog;
2093
2092
  var crud = args.crud;
@@ -2095,8 +2094,8 @@ function UIElement(props) {
2095
2094
  var edit = args.edit === true;
2096
2095
  var def = {};
2097
2096
  var rowItem = null;
2098
- var label = args == null || (_args$event = args.event) == null ? void 0 : _args$event.title;
2099
- var component = args == null || (_args$event2 = args.event) == null ? void 0 : _args$event2.component;
2097
+ var event = reactCrudUtils.Utils.nvl(args == null ? void 0 : args.event, {});
2098
+ var component = event == null ? void 0 : event.component;
2100
2099
  if (crud.is('row')) {
2101
2100
  def.parent = crud.parent.parent;
2102
2101
  def.search = crud.parent;
@@ -2114,15 +2113,30 @@ function UIElement(props) {
2114
2113
  edit: edit,
2115
2114
  scope: scope
2116
2115
  }, def));
2116
+ var el = {};
2117
+ if (typeof event.dialog === 'object') {
2118
+ el = _extends({}, event.dialog);
2119
+ }
2120
+ if (event.header) el.header = event.header;
2121
+ if (event.label) el.label = event.label;
2122
+ if (event.title) el.title = event.title;
2123
+ var dialogScope = reactCrudUtils.ScopeUtils.create(_extends({
2124
+ parent: scope,
2125
+ crud: d
2126
+ }, el, {
2127
+ owner: scope
2128
+ }));
2117
2129
  var dialog = {
2118
2130
  crud: d,
2119
2131
  parent: parent,
2120
2132
  component: component,
2121
- label: label
2133
+ scope: dialogScope
2122
2134
  };
2123
2135
  main.dialog = dialog;
2124
2136
  scope.toggleDialog(true);
2125
2137
  scope.currentDialog = dialog;
2138
+ dialogScope.currentDialog = dialog;
2139
+ dialogScope.toggleDialog(true);
2126
2140
  scope.update();
2127
2141
  };
2128
2142
  scope.dialogHide = function (args) {