react-crud-mobile 1.0.468 → 1.0.470
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 +20 -17
- 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 +20 -17
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/core/UIList.tsx +27 -1
|
@@ -677,12 +677,17 @@ function UIListRow(props) {
|
|
|
677
677
|
}
|
|
678
678
|
|
|
679
679
|
function UIList(props) {
|
|
680
|
+
var _repeat$list;
|
|
680
681
|
var scope = props.scope;
|
|
681
682
|
var crud = scope.crud;
|
|
682
683
|
var original = scope.original;
|
|
683
684
|
var cols = reactCrudUtils.Utils.nvl(original.cols, 1);
|
|
684
685
|
var rowWidth = Math.floor(100 / cols) + '%';
|
|
685
686
|
var items = reactCrudUtils.Utils.nvl(scope.getItems(), []);
|
|
687
|
+
var styles = (_repeat$list = {
|
|
688
|
+
repeat: stylesRepeat,
|
|
689
|
+
list: stylesRepeat
|
|
690
|
+
}) == null ? void 0 : _repeat$list[original.type];
|
|
686
691
|
var onClick = function onClick(item) {
|
|
687
692
|
scope.call('click', {
|
|
688
693
|
value: item,
|
|
@@ -691,7 +696,7 @@ function UIList(props) {
|
|
|
691
696
|
});
|
|
692
697
|
};
|
|
693
698
|
var getStyle = function getStyle(key, extra) {
|
|
694
|
-
return scope.getStyle(key, _extends({}, extra, styles
|
|
699
|
+
return scope.getStyle(key, _extends({}, extra, styles[key]));
|
|
695
700
|
};
|
|
696
701
|
var getRowStyle = function getRowStyle(extra) {
|
|
697
702
|
var row = getStyle('row', {});
|
|
@@ -769,7 +774,7 @@ function UIList(props) {
|
|
|
769
774
|
})]
|
|
770
775
|
});
|
|
771
776
|
}
|
|
772
|
-
var
|
|
777
|
+
var stylesRepeat = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
773
778
|
container: {
|
|
774
779
|
flex: 1,
|
|
775
780
|
width: '100%',
|
|
@@ -778,16 +783,14 @@ var styles$7 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
778
783
|
alignItems: 'stretch'
|
|
779
784
|
},
|
|
780
785
|
row: {
|
|
781
|
-
padding:
|
|
786
|
+
padding: 0,
|
|
782
787
|
width: '100%'
|
|
783
788
|
},
|
|
784
789
|
rowInner: {
|
|
785
790
|
flexGrow: 1,
|
|
786
791
|
justifyContent: 'center',
|
|
787
792
|
alignItems: 'center',
|
|
788
|
-
|
|
789
|
-
borderRadius: 8,
|
|
790
|
-
padding: 10,
|
|
793
|
+
padding: 0,
|
|
791
794
|
width: '100%'
|
|
792
795
|
},
|
|
793
796
|
text: {
|
|
@@ -814,7 +817,7 @@ function UIToggle(props) {
|
|
|
814
817
|
var item = _ref.item,
|
|
815
818
|
index = _ref.index;
|
|
816
819
|
var selected = isSelected(item);
|
|
817
|
-
var style = _extends({}, styles$
|
|
820
|
+
var style = _extends({}, styles$7.text);
|
|
818
821
|
if (selected) style.color = '#ffffff';
|
|
819
822
|
if (reactCrudUtils.Utils.isEmpty(props.children)) {
|
|
820
823
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
@@ -830,7 +833,7 @@ function UIToggle(props) {
|
|
|
830
833
|
});
|
|
831
834
|
};
|
|
832
835
|
var getItemStyle = function getItemStyle(item) {
|
|
833
|
-
var style = _extends({}, styles$
|
|
836
|
+
var style = _extends({}, styles$7.item, scope.getStyle('item'));
|
|
834
837
|
var wPart = 100 / options.length;
|
|
835
838
|
var width = Math.floor(wPart) + '%';
|
|
836
839
|
if (isSelected(item)) {
|
|
@@ -862,7 +865,7 @@ function UIToggle(props) {
|
|
|
862
865
|
})
|
|
863
866
|
});
|
|
864
867
|
}
|
|
865
|
-
var styles$
|
|
868
|
+
var styles$7 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
866
869
|
container: {
|
|
867
870
|
flex: 1,
|
|
868
871
|
width: '100%',
|
|
@@ -978,7 +981,7 @@ function UIModal(props) {
|
|
|
978
981
|
var label = scope.getLabel();
|
|
979
982
|
var theme = reactCrudUtils.useTheme();
|
|
980
983
|
var style = function style(part, extra) {
|
|
981
|
-
var st = _extends({}, styles$
|
|
984
|
+
var st = _extends({}, styles$8[part], extra);
|
|
982
985
|
return _extends({}, scope.getStyle(part, st));
|
|
983
986
|
};
|
|
984
987
|
var toggle = function toggle(vis) {
|
|
@@ -1054,7 +1057,7 @@ function UIModal(props) {
|
|
|
1054
1057
|
})
|
|
1055
1058
|
});
|
|
1056
1059
|
}
|
|
1057
|
-
var styles$
|
|
1060
|
+
var styles$8 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
1058
1061
|
modalSafe: {
|
|
1059
1062
|
flex: 1,
|
|
1060
1063
|
backgroundColor: 'primary',
|
|
@@ -1097,7 +1100,7 @@ function UIView(_ref) {
|
|
|
1097
1100
|
}, []);
|
|
1098
1101
|
return /*#__PURE__*/jsxRuntime.jsx(reactNativeSafeAreaContext.SafeAreaProvider, {
|
|
1099
1102
|
children: /*#__PURE__*/jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaView, {
|
|
1100
|
-
style: scope.getStyle('view', styles$
|
|
1103
|
+
style: scope.getStyle('view', styles$9.view),
|
|
1101
1104
|
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.StatusBar, {
|
|
1102
1105
|
barStyle: "light-content"
|
|
1103
1106
|
}), /*#__PURE__*/jsxRuntime.jsxs(reactNative.KeyboardAvoidingView, {
|
|
@@ -1107,10 +1110,10 @@ function UIView(_ref) {
|
|
|
1107
1110
|
justifyContent: 'center'
|
|
1108
1111
|
},
|
|
1109
1112
|
children: [header, /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1110
|
-
style: scope.getStyle('container', styles$
|
|
1113
|
+
style: scope.getStyle('container', styles$9.container),
|
|
1111
1114
|
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
1112
1115
|
keyboardShouldPersistTaps: "handled",
|
|
1113
|
-
style: scope.getStyle('scroll', styles$
|
|
1116
|
+
style: scope.getStyle('scroll', styles$9.scroll),
|
|
1114
1117
|
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
1115
1118
|
scope: scope,
|
|
1116
1119
|
children: children
|
|
@@ -1121,7 +1124,7 @@ function UIView(_ref) {
|
|
|
1121
1124
|
})
|
|
1122
1125
|
});
|
|
1123
1126
|
}
|
|
1124
|
-
var styles$
|
|
1127
|
+
var styles$9 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
1125
1128
|
scroll: {
|
|
1126
1129
|
padding: 10
|
|
1127
1130
|
},
|
|
@@ -1235,7 +1238,7 @@ function UIElement(props) {
|
|
|
1235
1238
|
var _elementStyle$type;
|
|
1236
1239
|
var type = reactCrudUtils.Utils.nvl(original.type, 'none');
|
|
1237
1240
|
var key = reactCrudUtils.Utils.nvl(part, 'root');
|
|
1238
|
-
var def = _extends({}, styles$
|
|
1241
|
+
var def = _extends({}, styles$a[key], elementStyle == null || (_elementStyle$type = elementStyle[type]) == null ? void 0 : _elementStyle$type[key]);
|
|
1239
1242
|
var hasChild = hasChildren();
|
|
1240
1243
|
if (!part && !hasChild) {
|
|
1241
1244
|
def = _extends({}, def);
|
|
@@ -1509,7 +1512,7 @@ elementStyle.toggle = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
1509
1512
|
flexWrap: 'nowrap'
|
|
1510
1513
|
})
|
|
1511
1514
|
});
|
|
1512
|
-
var styles$
|
|
1515
|
+
var styles$a = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
1513
1516
|
root: {
|
|
1514
1517
|
gap: 5,
|
|
1515
1518
|
flexDirection: 'column',
|