react-crud-mobile 1.0.684 → 1.0.686

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.
@@ -1108,7 +1108,7 @@ function UIQuantity(props) {
1108
1108
  }
1109
1109
 
1110
1110
  function UIModal(props) {
1111
- var _main$dialog2;
1111
+ var _theme$styles, _main$dialog2;
1112
1112
  var _useState = React.useState(false),
1113
1113
  modalVisible = _useState[0],
1114
1114
  setModalVisible = _useState[1];
@@ -1119,6 +1119,7 @@ function UIModal(props) {
1119
1119
  var scope = props.scope;
1120
1120
  var label = scope.getLabel();
1121
1121
  var theme = reactCrudUtils.useTheme();
1122
+ var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1122
1123
  var style = function style(part, extra) {
1123
1124
  var st = _extends({}, styles$8[part], extra);
1124
1125
  return _extends({}, scope.getStyle(part, st));
@@ -1195,7 +1196,7 @@ function UIModal(props) {
1195
1196
  children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.SafeAreaView, {
1196
1197
  style: style('modalSafe'),
1197
1198
  children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
1198
- style: style('modalHeader'),
1199
+ style: scope.getStyle('header', headerStyle),
1199
1200
  children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
1200
1201
  onPress: onClose,
1201
1202
  style: style('modalCloseButton'),
@@ -1237,16 +1238,6 @@ var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
1237
1238
  backgroundColor: 'primary',
1238
1239
  width: '100%'
1239
1240
  },
1240
- modalHeader: {
1241
- height: 58,
1242
- flexWrap: 'nowrap',
1243
- flexDirection: 'row',
1244
- alignContent: 'center',
1245
- justifyContent: 'flex-start',
1246
- alignItems: 'center',
1247
- padding: 15,
1248
- backgroundColor: 'primary'
1249
- },
1250
1241
  modalCloseButton: {
1251
1242
  padding: 10
1252
1243
  },
@@ -1268,10 +1259,12 @@ var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
1268
1259
  });
1269
1260
 
1270
1261
  function UIView(_ref) {
1262
+ var _theme$styles;
1271
1263
  var scope = _ref.scope,
1272
1264
  children = _ref.children;
1273
1265
  var theme = reactCrudUtils.useTheme();
1274
1266
  var header = scope.getPart('header', null, []);
1267
+ var headerStyle = reactCrudUtils.Utils.nvl((_theme$styles = theme.styles) == null || (_theme$styles = _theme$styles.defaults) == null ? void 0 : _theme$styles.header, {});
1275
1268
  React.useEffect(function () {
1276
1269
  reactNative.StatusBar.setBarStyle('light-content');
1277
1270
  reactNative.StatusBar.setBackgroundColor == null || reactNative.StatusBar.setBackgroundColor(theme.colors.primary);
@@ -1287,15 +1280,7 @@ function UIView(_ref) {
1287
1280
  var hasHeader = !reactCrudUtils.Utils.isEmpty(header);
1288
1281
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1289
1282
  children: [hasHeader && /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
1290
- style: {
1291
- padding: 20,
1292
- height: 58,
1293
- flexWrap: 'nowrap',
1294
- flexDirection: 'row',
1295
- alignContent: 'center',
1296
- justifyContent: 'flex-start',
1297
- alignItems: 'center'
1298
- },
1283
+ style: scope.getStyle('header', headerStyle),
1299
1284
  children: header
1300
1285
  }), /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
1301
1286
  style: scope.getStyle('container', styles$9.container),