react-crud-mobile 1.0.609 → 1.0.611
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 +33 -38
- 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 +33 -38
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIList.tsx +19 -12
- package/src/elements/core/UIListRow.tsx +1 -13
|
@@ -657,30 +657,6 @@ var styles$6 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
657
657
|
}
|
|
658
658
|
});
|
|
659
659
|
|
|
660
|
-
function UIListRow(props) {
|
|
661
|
-
var parent = props.scope;
|
|
662
|
-
var item = props.item;
|
|
663
|
-
var index = props.index;
|
|
664
|
-
var name = "" + parent.key('row', index);
|
|
665
|
-
var row = {
|
|
666
|
-
parent: parent,
|
|
667
|
-
name: name,
|
|
668
|
-
crud: parent.crud,
|
|
669
|
-
index: index,
|
|
670
|
-
type: 'row',
|
|
671
|
-
data: item
|
|
672
|
-
};
|
|
673
|
-
var _useState = React.useState(reactCrudUtils.ScopeUtils.create(row)),
|
|
674
|
-
scope = _useState[0];
|
|
675
|
-
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
676
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
677
|
-
scope: scope,
|
|
678
|
-
crud: scope.crud,
|
|
679
|
-
children: props.children
|
|
680
|
-
})
|
|
681
|
-
});
|
|
682
|
-
}
|
|
683
|
-
|
|
684
660
|
function UIList(props) {
|
|
685
661
|
var _repeat$list;
|
|
686
662
|
var scope = props.scope;
|
|
@@ -749,19 +725,30 @@ function UIList(props) {
|
|
|
749
725
|
};
|
|
750
726
|
var RowItem = function RowItem(_ref) {
|
|
751
727
|
var item = _ref.item,
|
|
752
|
-
index = _ref.index
|
|
753
|
-
|
|
728
|
+
index = _ref.index;
|
|
729
|
+
var name = "" + scope.key('row', index, '');
|
|
730
|
+
var row = reactCrudUtils.ScopeUtils.create(_extends({}, original, {
|
|
731
|
+
parent: scope,
|
|
732
|
+
name: name,
|
|
733
|
+
crud: scope.crud,
|
|
734
|
+
index: index,
|
|
735
|
+
type: 'row',
|
|
736
|
+
data: item
|
|
737
|
+
}));
|
|
754
738
|
var getRowStyle = function getRowStyle() {
|
|
755
|
-
var
|
|
739
|
+
var css = row.getStyle('row', _extends({}, styles.row));
|
|
756
740
|
if (cols > 0) {
|
|
757
|
-
|
|
741
|
+
css.width = rowWidth;
|
|
758
742
|
}
|
|
759
|
-
return
|
|
743
|
+
return css;
|
|
760
744
|
};
|
|
761
745
|
if (!original.click) {
|
|
762
746
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
763
747
|
style: getRowStyle(),
|
|
764
|
-
children:
|
|
748
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
749
|
+
scope: row,
|
|
750
|
+
children: props.children
|
|
751
|
+
})
|
|
765
752
|
}, "k-" + index);
|
|
766
753
|
}
|
|
767
754
|
return /*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableHighlight, {
|
|
@@ -771,7 +758,10 @@ function UIList(props) {
|
|
|
771
758
|
e.stopPropagation();
|
|
772
759
|
onClick(item);
|
|
773
760
|
},
|
|
774
|
-
children:
|
|
761
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
762
|
+
scope: row,
|
|
763
|
+
children: props.children
|
|
764
|
+
})
|
|
775
765
|
}, "k-" + index);
|
|
776
766
|
};
|
|
777
767
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -789,13 +779,7 @@ function UIList(props) {
|
|
|
789
779
|
children: [/*#__PURE__*/jsxRuntime.jsx(Empty, {}), items.map(function (item, i) {
|
|
790
780
|
return /*#__PURE__*/jsxRuntime.jsx(RowItem, {
|
|
791
781
|
index: i,
|
|
792
|
-
item: item
|
|
793
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UIListRow, {
|
|
794
|
-
scope: scope,
|
|
795
|
-
item: item,
|
|
796
|
-
index: i,
|
|
797
|
-
children: props.children
|
|
798
|
-
})
|
|
782
|
+
item: item
|
|
799
783
|
});
|
|
800
784
|
}), isShowAdd() && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
801
785
|
children: add
|
|
@@ -858,6 +842,17 @@ var stylesRepeat = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
858
842
|
}
|
|
859
843
|
});
|
|
860
844
|
|
|
845
|
+
function UIListRow(props) {
|
|
846
|
+
var scope = props.scope;
|
|
847
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
848
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UIChildren, {
|
|
849
|
+
scope: scope,
|
|
850
|
+
crud: scope.crud,
|
|
851
|
+
children: props.children
|
|
852
|
+
})
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
|
|
861
856
|
function UIToggle(props) {
|
|
862
857
|
var scope = props.scope;
|
|
863
858
|
var options = reactCrudUtils.Utils.nvl(scope.getOptions(), []);
|