react-crud-mobile 1.0.433 → 1.0.435
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/elements/core/UIView.d.ts +3 -0
- package/dist/react-crud-mobile.cjs.development.js +59 -7
- 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 +60 -8
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +72 -71
- package/src/elements/UI.tsx +65 -65
- package/src/elements/UIChildren.tsx +127 -127
- package/src/elements/UIComplete.tsx +14 -14
- package/src/elements/UIElement.tsx +523 -518
- package/src/elements/UITag.tsx +13 -13
- package/src/elements/charts/ElChart.tsx +10 -10
- package/src/elements/core/UIAutoComplete.tsx +17 -17
- package/src/elements/core/UIButton.tsx +73 -73
- package/src/elements/core/UIIcon.tsx +8 -8
- package/src/elements/core/UIInclude.tsx +40 -40
- package/src/elements/core/UIInput.tsx +69 -69
- package/src/elements/core/UILink.tsx +17 -17
- package/src/elements/core/UIList.tsx +135 -135
- package/src/elements/core/UIListItem.tsx +32 -32
- package/src/elements/core/UIListRow.tsx +32 -32
- package/src/elements/core/UIModal.tsx +139 -139
- package/src/elements/core/UIOption.tsx +17 -17
- package/src/elements/core/UIQuantity.tsx +97 -97
- package/src/elements/core/UIRadio.tsx +17 -17
- package/src/elements/core/UISelect.tsx +122 -122
- package/src/elements/core/UISwitch.tsx +26 -26
- package/src/elements/core/UIToggle.tsx +102 -102
- package/src/elements/core/UIView.tsx +62 -0
- package/src/elements/index.ts +1 -1
- package/src/elements/tabs/ElTabs.tsx +178 -178
- package/src/index.ts +1 -1
|
@@ -12,6 +12,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
12
12
|
var Ionicons = _interopDefault(require('@expo/vector-icons/Ionicons'));
|
|
13
13
|
var vectorIcons = require('@expo/vector-icons');
|
|
14
14
|
var Icon = _interopDefault(require('react-native-vector-icons/FontAwesome'));
|
|
15
|
+
var expoStatusBar = require('expo-status-bar');
|
|
16
|
+
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
15
17
|
|
|
16
18
|
function _extends() {
|
|
17
19
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -1076,6 +1078,53 @@ var styles$9 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1076
1078
|
}
|
|
1077
1079
|
});
|
|
1078
1080
|
|
|
1081
|
+
function UIView(_ref) {
|
|
1082
|
+
var scope = _ref.scope,
|
|
1083
|
+
children = _ref.children;
|
|
1084
|
+
var header = scope.getPart('header', null, []);
|
|
1085
|
+
var dismissKeyboard = function dismissKeyboard() {
|
|
1086
|
+
if (reactNative.Platform.OS !== 'web') {
|
|
1087
|
+
reactNative.Keyboard.dismiss();
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaProvider, {
|
|
1091
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(expoStatusBar.StatusBar, {
|
|
1092
|
+
style: "dark"
|
|
1093
|
+
}), /*#__PURE__*/jsxRuntime.jsx(reactNativeSafeAreaContext.SafeAreaView, {
|
|
1094
|
+
style: scope.getStyle('view', styles$a.view),
|
|
1095
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(reactNative.KeyboardAvoidingView, {
|
|
1096
|
+
behavior: reactNative.Platform.OS === 'ios' ? 'padding' : 'height',
|
|
1097
|
+
style: {
|
|
1098
|
+
flex: 1,
|
|
1099
|
+
justifyContent: 'center'
|
|
1100
|
+
},
|
|
1101
|
+
children: [header, /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1102
|
+
style: scope.getStyle('container', styles$a.container),
|
|
1103
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
1104
|
+
keyboardShouldPersistTaps: "handled",
|
|
1105
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableWithoutFeedback, {
|
|
1106
|
+
onPress: dismissKeyboard,
|
|
1107
|
+
accessible: false,
|
|
1108
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
1109
|
+
scope: scope,
|
|
1110
|
+
children: children
|
|
1111
|
+
})
|
|
1112
|
+
})
|
|
1113
|
+
})
|
|
1114
|
+
})]
|
|
1115
|
+
})
|
|
1116
|
+
})]
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
var styles$a = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
1120
|
+
container: {
|
|
1121
|
+
backgroundColor: 'background'
|
|
1122
|
+
},
|
|
1123
|
+
view: {
|
|
1124
|
+
backgroundColor: 'primary'
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1079
1128
|
var CrudContext = /*#__PURE__*/React.createContext({});
|
|
1080
1129
|
function UIElement(props) {
|
|
1081
1130
|
var _original$list, _original$load;
|
|
@@ -1178,7 +1227,7 @@ function UIElement(props) {
|
|
|
1178
1227
|
var _elementStyle$type;
|
|
1179
1228
|
var type = reactCrudUtils.Utils.nvl(original.type, 'none');
|
|
1180
1229
|
var key = reactCrudUtils.Utils.nvl(part, 'root');
|
|
1181
|
-
var def = _extends({}, styles$
|
|
1230
|
+
var def = _extends({}, styles$b[key], elementStyle == null || (_elementStyle$type = elementStyle[type]) == null ? void 0 : _elementStyle$type[key]);
|
|
1182
1231
|
var hasChild = hasChildren();
|
|
1183
1232
|
if (!part && !hasChild) {
|
|
1184
1233
|
def = _extends({}, def);
|
|
@@ -1253,7 +1302,7 @@ function UIElement(props) {
|
|
|
1253
1302
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
1254
1303
|
}
|
|
1255
1304
|
var isShowChild = function isShowChild() {
|
|
1256
|
-
if (scope.
|
|
1305
|
+
if (scope.isType('tabs', 'view', 'grid', 'list', 'define', 'repeat', 'modal', 'dialog', 'chart')) {
|
|
1257
1306
|
return false;
|
|
1258
1307
|
}
|
|
1259
1308
|
return true;
|
|
@@ -1335,16 +1384,19 @@ function UIElement(props) {
|
|
|
1335
1384
|
style: getStyle('error'),
|
|
1336
1385
|
children: error
|
|
1337
1386
|
})]
|
|
1338
|
-
}), scope.isType('
|
|
1387
|
+
}), scope.isType('list', 'repeat') && /*#__PURE__*/jsxRuntime.jsx(UIList, _extends({}, props, {
|
|
1339
1388
|
scope: scope,
|
|
1340
1389
|
crud: crud
|
|
1341
|
-
})), scope.isType('
|
|
1390
|
+
})), scope.isType('dialog') && /*#__PURE__*/jsxRuntime.jsx(UIModal, _extends({}, props, {
|
|
1342
1391
|
scope: scope,
|
|
1343
1392
|
crud: crud
|
|
1344
|
-
})), scope.isType('
|
|
1393
|
+
})), scope.isType('chart') && /*#__PURE__*/jsxRuntime.jsx(ElChart, _extends({}, props, {
|
|
1345
1394
|
scope: scope,
|
|
1346
1395
|
crud: crud
|
|
1347
|
-
})), scope.isType('
|
|
1396
|
+
})), scope.isType('tabs') && /*#__PURE__*/jsxRuntime.jsx(ElTabs, _extends({}, props, {
|
|
1397
|
+
scope: scope,
|
|
1398
|
+
crud: crud
|
|
1399
|
+
})), scope.isType('view') && /*#__PURE__*/jsxRuntime.jsx(UIView, _extends({}, props, {
|
|
1348
1400
|
scope: scope,
|
|
1349
1401
|
crud: crud
|
|
1350
1402
|
})), isShowChild() && /*#__PURE__*/jsxRuntime.jsx(UIChildren, _extends({}, props, {
|
|
@@ -1424,7 +1476,7 @@ elementStyle.toggle = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1424
1476
|
flexWrap: 'nowrap'
|
|
1425
1477
|
})
|
|
1426
1478
|
});
|
|
1427
|
-
var styles$
|
|
1479
|
+
var styles$b = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
1428
1480
|
root: {
|
|
1429
1481
|
gap: 5,
|
|
1430
1482
|
flexDirection: 'column',
|