react-crud-mobile 1.3.280 → 1.3.282

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.
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useRef, useEffect, useContext, useLayoutEffect, createContext } from 'react';
2
- import { Utils, ScopeUtils, CrudUtils, ComponentUtils, ViewUtils, HtmlUtils, ThemeUtils, useTheme } from 'react-crud-utils';
2
+ import { Utils, ScopeUtils, CrudUtils, ComponentUtils, HtmlUtils, ViewUtils, ThemeUtils, useTheme } from 'react-crud-utils';
3
3
  import { View, StyleSheet, TouchableOpacity, Text, Linking, TouchableHighlight, Modal, SafeAreaView, ScrollView, Switch, TextInput, Platform, Dimensions, Alert, Image, StatusBar, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } from 'react-native';
4
4
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
5
  import Ionicons from '@expo/vector-icons/Ionicons';
@@ -1366,6 +1366,7 @@ function UIToast() {
1366
1366
 
1367
1367
  function UIModal(props) {
1368
1368
  var _theme$styles;
1369
+ var scrollRef = useRef(null);
1369
1370
  var owner = props.scope;
1370
1371
  var _useState = useState(0),
1371
1372
  index = _useState[0],
@@ -1373,7 +1374,6 @@ function UIModal(props) {
1373
1374
  var dialog = owner.currentDialog;
1374
1375
  //v2
1375
1376
  var curr = dialog == null ? void 0 : dialog.crud;
1376
- var main = ViewUtils.getCrud('view');
1377
1377
  if (!dialog) {
1378
1378
  return /*#__PURE__*/jsx(Fragment, {});
1379
1379
  }
@@ -1386,7 +1386,6 @@ function UIModal(props) {
1386
1386
  var label = scope.getLabel();
1387
1387
  var theme = scope.getTheme();
1388
1388
  var headerStyle = Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1389
- var scrollRef = useRef(null);
1390
1389
  var headerRight = ComponentUtils.getDefine(props, 'header', 'right');
1391
1390
  var bottom = ComponentUtils.getDefine(props, 'bottom');
1392
1391
  var style = function style(part, extra) {
@@ -2288,14 +2287,17 @@ function UIElement(props) {
2288
2287
  scope.update();
2289
2288
  };
2290
2289
  scope.dialogHide = function (args) {
2290
+ var _next$scope, _current$scope;
2291
2291
  var main = ViewUtils.getCrud('view');
2292
2292
  var current = main.dialog;
2293
2293
  var next = Utils.nvl(main.parent, null);
2294
2294
  main.dialog = next;
2295
2295
  scope.currentDialog = next;
2296
- if (current) {
2296
+ var nextScope = next == null || (_next$scope = next.scope) == null ? void 0 : _next$scope.parent;
2297
+ var currScope = current == null || (_current$scope = current.scope) == null ? void 0 : _current$scope.parent;
2298
+ if (currScope) {
2297
2299
  var close = current.close;
2298
- if (current.update) current.update();
2300
+ currScope.update();
2299
2301
  if (close) {
2300
2302
  if (close != null && close.debug) console.log('Fechando');
2301
2303
  current.scope.call('close', {
@@ -2303,8 +2305,8 @@ function UIElement(props) {
2303
2305
  });
2304
2306
  }
2305
2307
  }
2306
- if (next != null && next.update) {
2307
- next.update();
2308
+ if (nextScope) {
2309
+ nextScope.update();
2308
2310
  }
2309
2311
  };
2310
2312
  return /*#__PURE__*/jsx(CrudContext.Provider, {
@@ -2336,7 +2338,7 @@ var boxStyle = /*#__PURE__*/StyleSheet.create({
2336
2338
  }
2337
2339
  });
2338
2340
  var box = /*#__PURE__*/_extends({}, boxStyle.box);
2339
- //v5
2341
+ //v4
2340
2342
  var elementStyle = {};
2341
2343
  elementStyle.view = {
2342
2344
  inner: {