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.
- package/dist/react-crud-mobile.cjs.development.js +12 -1
- package/dist/react-crud-mobile.cjs.development.js.map +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js +1 -1
- package/dist/react-crud-mobile.cjs.production.min.js.map +1 -1
- package/dist/react-crud-mobile.esm.js +12 -1
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UIElement.tsx +12 -1
@@ -2147,6 +2147,7 @@ function UIElement(props) {
|
|
2147
2147
|
});
|
2148
2148
|
};
|
2149
2149
|
scope.dialogShow = function (args) {
|
2150
|
+
var _event$dialog;
|
2150
2151
|
var main = ViewUtils.getCrud('view');
|
2151
2152
|
var parent = main.dialog;
|
2152
2153
|
var crud = args.crud;
|
@@ -2178,6 +2179,7 @@ function UIElement(props) {
|
|
2178
2179
|
icon: original.icon,
|
2179
2180
|
type: 'dialog'
|
2180
2181
|
};
|
2182
|
+
var close = (_event$dialog = event.dialog) == null ? void 0 : _event$dialog.close;
|
2181
2183
|
if (typeof event.dialog === 'object') {
|
2182
2184
|
el = _extends({}, el, event.dialog);
|
2183
2185
|
}
|
@@ -2195,7 +2197,8 @@ function UIElement(props) {
|
|
2195
2197
|
crud: d,
|
2196
2198
|
parent: parent,
|
2197
2199
|
component: component,
|
2198
|
-
scope: dialogScope
|
2200
|
+
scope: dialogScope,
|
2201
|
+
close: close
|
2199
2202
|
};
|
2200
2203
|
main.dialog = dialog;
|
2201
2204
|
scope.toggleDialog(true);
|
@@ -2208,6 +2211,7 @@ function UIElement(props) {
|
|
2208
2211
|
var _main$dialog;
|
2209
2212
|
var main = ViewUtils.getCrud('view');
|
2210
2213
|
var old = scope.currentDialog;
|
2214
|
+
var parentScope = old.scope.parent;
|
2211
2215
|
main.dialog = Utils.nvl(old.parent, null);
|
2212
2216
|
scope.currentDialog = null;
|
2213
2217
|
if ((_main$dialog = main.dialog) != null && (_main$dialog = _main$dialog.crud) != null && _main$dialog.scope) {
|
@@ -2216,6 +2220,13 @@ function UIElement(props) {
|
|
2216
2220
|
}
|
2217
2221
|
scope.toggleDialog(false);
|
2218
2222
|
scope.update();
|
2223
|
+
var close = old.close;
|
2224
|
+
if (parentScope && close) {
|
2225
|
+
if (close != null && close.debug) console.log('Fechando');
|
2226
|
+
parentScope.call('close', {
|
2227
|
+
close: close
|
2228
|
+
});
|
2229
|
+
}
|
2219
2230
|
};
|
2220
2231
|
return /*#__PURE__*/jsx(CrudContext.Provider, {
|
2221
2232
|
value: {
|