react-crud-mobile 1.0.398 → 1.0.401
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/UIIcon.d.ts +2 -1
- package/dist/react-crud-mobile.cjs.development.js +35 -34
- 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 +35 -34
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/UIElement.tsx +3 -2
- package/src/elements/core/UIIcon.tsx +5 -14
- package/src/elements/core/UIList.tsx +15 -1
|
@@ -328,21 +328,14 @@ var styles$2 = {
|
|
|
328
328
|
link: {}
|
|
329
329
|
};
|
|
330
330
|
|
|
331
|
-
function UIIcon(
|
|
332
|
-
var
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
children: /*#__PURE__*/jsx(Text, {
|
|
338
|
-
style: styles$3.link,
|
|
339
|
-
children: "Clique aqui para acessar o React Native"
|
|
340
|
-
})
|
|
331
|
+
function UIIcon(_ref) {
|
|
332
|
+
var scope = _ref.scope;
|
|
333
|
+
var name = scope.getValue();
|
|
334
|
+
return /*#__PURE__*/jsx(Ionicons$1, {
|
|
335
|
+
name: name,
|
|
336
|
+
style: scope.getStyle('icon')
|
|
341
337
|
});
|
|
342
338
|
}
|
|
343
|
-
var styles$3 = {
|
|
344
|
-
link: {}
|
|
345
|
-
};
|
|
346
339
|
|
|
347
340
|
function UIButton(props) {
|
|
348
341
|
var scope = props.scope;
|
|
@@ -428,7 +421,7 @@ function UISelect(props) {
|
|
|
428
421
|
handlePress();
|
|
429
422
|
};
|
|
430
423
|
var style = function style(part, extra) {
|
|
431
|
-
return _extends({}, styles$
|
|
424
|
+
return _extends({}, styles$3[part], scope.getStyle(part), extra);
|
|
432
425
|
};
|
|
433
426
|
return /*#__PURE__*/jsxs(View, {
|
|
434
427
|
style: style('selectRoot'),
|
|
@@ -485,7 +478,7 @@ function UISelect(props) {
|
|
|
485
478
|
})]
|
|
486
479
|
});
|
|
487
480
|
}
|
|
488
|
-
var styles$
|
|
481
|
+
var styles$3 = /*#__PURE__*/StyleSheet.create({
|
|
489
482
|
selectRoot: {
|
|
490
483
|
justifyContent: 'flex-start',
|
|
491
484
|
alignItems: 'flex-start'
|
|
@@ -559,12 +552,12 @@ function UIOption(props) {
|
|
|
559
552
|
return /*#__PURE__*/jsx(TouchableOpacity, {
|
|
560
553
|
onPress: handlePress,
|
|
561
554
|
children: /*#__PURE__*/jsx(Text, {
|
|
562
|
-
style: styles$
|
|
555
|
+
style: styles$4.link,
|
|
563
556
|
children: "Clique aqui para acessar o React Native"
|
|
564
557
|
})
|
|
565
558
|
});
|
|
566
559
|
}
|
|
567
|
-
var styles$
|
|
560
|
+
var styles$4 = {
|
|
568
561
|
link: {}
|
|
569
562
|
};
|
|
570
563
|
|
|
@@ -575,12 +568,12 @@ function UIRadio(props) {
|
|
|
575
568
|
return /*#__PURE__*/jsx(TouchableOpacity, {
|
|
576
569
|
onPress: handlePress,
|
|
577
570
|
children: /*#__PURE__*/jsx(Text, {
|
|
578
|
-
style: styles$
|
|
571
|
+
style: styles$5.link,
|
|
579
572
|
children: "Clique aqui para acessar o React Native"
|
|
580
573
|
})
|
|
581
574
|
});
|
|
582
575
|
}
|
|
583
|
-
var styles$
|
|
576
|
+
var styles$5 = {
|
|
584
577
|
link: {}
|
|
585
578
|
};
|
|
586
579
|
|
|
@@ -598,7 +591,7 @@ function UIInput(props) {
|
|
|
598
591
|
setValue(v);
|
|
599
592
|
};
|
|
600
593
|
var style = function style(part, extra) {
|
|
601
|
-
return _extends({}, scope.getStyle(part, styles$
|
|
594
|
+
return _extends({}, scope.getStyle(part, styles$6[part]), extra);
|
|
602
595
|
};
|
|
603
596
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
604
597
|
children: [scope.getPart('left'), /*#__PURE__*/jsx(TextInput, {
|
|
@@ -613,7 +606,7 @@ function UIInput(props) {
|
|
|
613
606
|
}), scope.getPart('right')]
|
|
614
607
|
});
|
|
615
608
|
}
|
|
616
|
-
var styles$
|
|
609
|
+
var styles$6 = /*#__PURE__*/StyleSheet.create({
|
|
617
610
|
base: {
|
|
618
611
|
flexDirection: 'row',
|
|
619
612
|
alignItems: 'center',
|
|
@@ -673,7 +666,7 @@ function UIList(props) {
|
|
|
673
666
|
});
|
|
674
667
|
};
|
|
675
668
|
var getStyle = function getStyle(key, extra) {
|
|
676
|
-
return scope.getStyle(key, _extends({}, extra, styles$
|
|
669
|
+
return scope.getStyle(key, _extends({}, extra, styles$7[key]));
|
|
677
670
|
};
|
|
678
671
|
var getRowStyle = function getRowStyle(extra) {
|
|
679
672
|
var row = getStyle('row', {});
|
|
@@ -703,7 +696,13 @@ function UIList(props) {
|
|
|
703
696
|
if (typeof empty === 'string') {
|
|
704
697
|
return /*#__PURE__*/jsx(Text, {
|
|
705
698
|
style: scope.getStyle('empty', {
|
|
706
|
-
flex: 1
|
|
699
|
+
flex: 1,
|
|
700
|
+
fontWeight: 500,
|
|
701
|
+
fontSize: 20,
|
|
702
|
+
padding: 10,
|
|
703
|
+
textAlign: 'center',
|
|
704
|
+
justifyContent: 'center',
|
|
705
|
+
alignItems: 'center'
|
|
707
706
|
}),
|
|
708
707
|
children: empty
|
|
709
708
|
});
|
|
@@ -745,7 +744,7 @@ function UIList(props) {
|
|
|
745
744
|
})]
|
|
746
745
|
});
|
|
747
746
|
}
|
|
748
|
-
var styles$
|
|
747
|
+
var styles$7 = /*#__PURE__*/StyleSheet.create({
|
|
749
748
|
container: {
|
|
750
749
|
flex: 1,
|
|
751
750
|
width: '100%',
|
|
@@ -790,7 +789,7 @@ function UIToggle(props) {
|
|
|
790
789
|
var item = _ref.item,
|
|
791
790
|
index = _ref.index;
|
|
792
791
|
var selected = isSelected(item);
|
|
793
|
-
var style = _extends({}, styles$
|
|
792
|
+
var style = _extends({}, styles$8.text);
|
|
794
793
|
if (selected) style.color = '#ffffff';
|
|
795
794
|
if (Utils.isEmpty(props.children)) {
|
|
796
795
|
return /*#__PURE__*/jsx(Text, {
|
|
@@ -806,7 +805,7 @@ function UIToggle(props) {
|
|
|
806
805
|
});
|
|
807
806
|
};
|
|
808
807
|
var getItemStyle = function getItemStyle(item) {
|
|
809
|
-
var style = _extends({}, styles$
|
|
808
|
+
var style = _extends({}, styles$8.item, scope.getStyle('item'));
|
|
810
809
|
var wPart = 100 / options.length;
|
|
811
810
|
var width = Math.floor(wPart) + '%';
|
|
812
811
|
if (isSelected(item)) {
|
|
@@ -838,7 +837,7 @@ function UIToggle(props) {
|
|
|
838
837
|
})
|
|
839
838
|
});
|
|
840
839
|
}
|
|
841
|
-
var styles$
|
|
840
|
+
var styles$8 = /*#__PURE__*/StyleSheet.create({
|
|
842
841
|
container: {
|
|
843
842
|
flex: 1,
|
|
844
843
|
width: '100%',
|
|
@@ -954,7 +953,7 @@ function UIModal(props) {
|
|
|
954
953
|
var label = scope.getLabel();
|
|
955
954
|
var theme = useTheme();
|
|
956
955
|
var style = function style(part, extra) {
|
|
957
|
-
var st = _extends({}, styles$
|
|
956
|
+
var st = _extends({}, styles$9[part], extra);
|
|
958
957
|
return _extends({}, scope.getStyle(part, st));
|
|
959
958
|
};
|
|
960
959
|
var toggle = function toggle(vis) {
|
|
@@ -1018,7 +1017,7 @@ function UIModal(props) {
|
|
|
1018
1017
|
})
|
|
1019
1018
|
});
|
|
1020
1019
|
}
|
|
1021
|
-
var styles$
|
|
1020
|
+
var styles$9 = /*#__PURE__*/StyleSheet.create({
|
|
1022
1021
|
modalSafe: {
|
|
1023
1022
|
flex: 1,
|
|
1024
1023
|
backgroundColor: 'primary',
|
|
@@ -1143,7 +1142,7 @@ function UIElement(props) {
|
|
|
1143
1142
|
var _elementStyle$type;
|
|
1144
1143
|
var type = Utils.nvl(original.type, 'none');
|
|
1145
1144
|
var key = Utils.nvl(part, 'root');
|
|
1146
|
-
var def = _extends({}, styles$
|
|
1145
|
+
var def = _extends({}, styles$a[key], elementStyle == null || (_elementStyle$type = elementStyle[type]) == null ? void 0 : _elementStyle$type[key]);
|
|
1147
1146
|
var hasChild = hasChildren();
|
|
1148
1147
|
if (!part && !hasChild) {
|
|
1149
1148
|
def = _extends({}, def);
|
|
@@ -1177,8 +1176,9 @@ function UIElement(props) {
|
|
|
1177
1176
|
});
|
|
1178
1177
|
var CustomIcon = function CustomIcon() {
|
|
1179
1178
|
if (typeof original.icon === 'string') {
|
|
1180
|
-
return /*#__PURE__*/jsx(
|
|
1181
|
-
|
|
1179
|
+
return /*#__PURE__*/jsx(Ionicons$1, {
|
|
1180
|
+
name: original.icon,
|
|
1181
|
+
style: scope.getStyle('icon')
|
|
1182
1182
|
});
|
|
1183
1183
|
}
|
|
1184
1184
|
return /*#__PURE__*/jsx(Fragment, {
|
|
@@ -1282,7 +1282,8 @@ function UIElement(props) {
|
|
|
1282
1282
|
children: [scope.is('format', 'img') && /*#__PURE__*/jsx(Image, {
|
|
1283
1283
|
source: scope.getDisplayValue()
|
|
1284
1284
|
}), scope.is('format', 'icon') && /*#__PURE__*/jsx(UIIcon, {
|
|
1285
|
-
|
|
1285
|
+
scope: scope,
|
|
1286
|
+
crud: crud
|
|
1286
1287
|
}), !scope.is('format', 'icon', 'img') && /*#__PURE__*/jsx(Text, {
|
|
1287
1288
|
children: scope.getDisplayValue()
|
|
1288
1289
|
})]
|
|
@@ -1382,7 +1383,7 @@ elementStyle.toggle = /*#__PURE__*/StyleSheet.create({
|
|
|
1382
1383
|
})
|
|
1383
1384
|
});
|
|
1384
1385
|
elementStyle.list = /*#__PURE__*/_extends({}, elementStyle.card);
|
|
1385
|
-
var styles$
|
|
1386
|
+
var styles$a = /*#__PURE__*/StyleSheet.create({
|
|
1386
1387
|
root: {
|
|
1387
1388
|
gap: 5,
|
|
1388
1389
|
flexDirection: 'column',
|