react-crud-mobile 1.0.600 → 1.0.602

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.
@@ -3,7 +3,6 @@ import { ChildType } from 'react-crud-utils';
3
3
  interface UIListRowType extends ChildType {
4
4
  item: any;
5
5
  index: number;
6
- styles: any;
7
6
  }
8
7
  export default function UIListRow(props: UIListRowType): React.JSX.Element;
9
8
  export {};
@@ -658,6 +658,7 @@ var styles$6 = /*#__PURE__*/reactNative.StyleSheet.create({
658
658
  });
659
659
 
660
660
  function UIListRow(props) {
661
+ var _repeat$list;
661
662
  var parent = props.scope;
662
663
  var original = parent.original;
663
664
  var item = props.item;
@@ -671,17 +672,20 @@ function UIListRow(props) {
671
672
  type: 'row',
672
673
  data: item
673
674
  };
674
- var styles = props.styles;
675
+ var styles = (_repeat$list = {
676
+ repeat: stylesRepeat,
677
+ list: stylesList
678
+ }) == null ? void 0 : _repeat$list[original.type];
675
679
  var cols = reactCrudUtils.Utils.nvl(original.cols, 1);
676
680
  var rowWidth = Math.floor(100 / cols) + '%';
677
681
  var _useState = React.useState(reactCrudUtils.ScopeUtils.create(row)),
678
682
  scope = _useState[0];
679
- console.log(styles);
680
- var getRowStyle = function getRowStyle(extra) {
681
- var row = scope.getStyle('row', _extends({}, extra, styles.row));
683
+ var getRowStyle = function getRowStyle() {
684
+ var row = scope.getStyle('row', _extends({}, styles.row));
682
685
  if (cols > 0) {
683
686
  row.width = rowWidth;
684
687
  }
688
+ console.log(row);
685
689
  return row;
686
690
  };
687
691
  var onClick = function onClick(item) {
@@ -717,9 +721,63 @@ function UIListRow(props) {
717
721
  }, "k-" + index);
718
722
  };
719
723
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
720
- children: /*#__PURE__*/jsxRuntime.jsx(RowItem, {})
724
+ children: /*#__PURE__*/jsxRuntime.jsx(RowItem, {}, name)
721
725
  });
722
726
  }
727
+ var stylesList = /*#__PURE__*/reactNative.StyleSheet.create({
728
+ container: {
729
+ flex: 1,
730
+ width: '100%',
731
+ flexDirection: 'row',
732
+ flexWrap: 'wrap',
733
+ alignItems: 'stretch'
734
+ },
735
+ row: {
736
+ padding: 5,
737
+ margin: 3,
738
+ width: '100%',
739
+ backgroundColor: '#f5f5f5',
740
+ gap: 10,
741
+ borderRadius: 8
742
+ },
743
+ rowInner: {
744
+ flexGrow: 1,
745
+ justifyContent: 'center',
746
+ alignItems: 'center',
747
+ borderRadius: 8,
748
+ padding: 10,
749
+ width: '100%'
750
+ },
751
+ text: {
752
+ fontSize: 18,
753
+ fontWeight: 'bold'
754
+ }
755
+ });
756
+ var stylesRepeat = /*#__PURE__*/reactNative.StyleSheet.create({
757
+ container: {
758
+ flex: 1,
759
+ width: '100%',
760
+ flexDirection: 'row',
761
+ flexWrap: 'wrap',
762
+ gap: 10,
763
+ alignItems: 'stretch'
764
+ },
765
+ row: {
766
+ padding: 0,
767
+ width: '100%'
768
+ },
769
+ rowInner: {
770
+ flexGrow: 1,
771
+ justifyContent: 'center',
772
+ alignItems: 'center',
773
+ padding: 0,
774
+ width: '100%'
775
+ },
776
+ text: {
777
+ fontSize: 18,
778
+ fontWeight: 'bold'
779
+ }
780
+ });
723
781
 
724
782
  function UIList(props) {
725
783
  var _repeat$list;
@@ -729,8 +787,8 @@ function UIList(props) {
729
787
  var cols = reactCrudUtils.Utils.nvl(original.cols, 1);
730
788
  var items = reactCrudUtils.Utils.nvl(scope.getItems(), []);
731
789
  var styles = (_repeat$list = {
732
- repeat: stylesRepeat,
733
- list: stylesList
790
+ repeat: stylesRepeat$1,
791
+ list: stylesList$1
734
792
  }) == null ? void 0 : _repeat$list[original.type];
735
793
  var add = reactCrudUtils.ComponentUtils.getDefine(props, 'add');
736
794
  var hideAddWhenEmpty = original.hideAddWhenEmpty;
@@ -796,7 +854,6 @@ function UIList(props) {
796
854
  scope: scope,
797
855
  item: item,
798
856
  index: i,
799
- styles: styles,
800
857
  children: props.children
801
858
  });
802
859
  }), isShowAdd() && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
@@ -805,7 +862,7 @@ function UIList(props) {
805
862
  })]
806
863
  });
807
864
  }
808
- var stylesList = /*#__PURE__*/reactNative.StyleSheet.create({
865
+ var stylesList$1 = /*#__PURE__*/reactNative.StyleSheet.create({
809
866
  container: {
810
867
  flex: 1,
811
868
  width: '100%',
@@ -834,7 +891,7 @@ var stylesList = /*#__PURE__*/reactNative.StyleSheet.create({
834
891
  fontWeight: 'bold'
835
892
  }
836
893
  });
837
- var stylesRepeat = /*#__PURE__*/reactNative.StyleSheet.create({
894
+ var stylesRepeat$1 = /*#__PURE__*/reactNative.StyleSheet.create({
838
895
  container: {
839
896
  flex: 1,
840
897
  width: '100%',