react-crud-mobile 1.0.586 → 1.0.587
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 +18 -76
- 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 -78
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +73 -73
- package/src/elements/UI.tsx +67 -67
- package/src/elements/UIChildren.tsx +127 -127
- package/src/elements/UIComplete.tsx +14 -14
- package/src/elements/UIElement.tsx +580 -580
- package/src/elements/UITag.tsx +13 -13
- package/src/elements/charts/ElChart.tsx +10 -10
- package/src/elements/core/UIButton.tsx +85 -85
- 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/UIList.tsx +188 -188
- package/src/elements/core/UIListRow.tsx +32 -32
- package/src/elements/core/UIModal.tsx +174 -174
- package/src/elements/core/UIQuantity.tsx +97 -97
- package/src/elements/core/UISelect.tsx +69 -122
- package/src/elements/core/UIToggle.tsx +102 -102
- package/src/elements/core/UIView.tsx +42 -42
- package/src/elements/index.ts +1 -1
- package/src/elements/tabs/ElTabs.tsx +178 -178
- package/src/index.ts +1 -1
|
@@ -425,16 +425,13 @@ function UIButton(props) {
|
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
function UISelect(props) {
|
|
428
|
-
var _useState = React.useState(false),
|
|
429
|
-
modalVisible = _useState[0],
|
|
430
|
-
setModalVisible = _useState[1];
|
|
431
428
|
var scope = props.scope;
|
|
432
429
|
var items = reactCrudUtils.Utils.nvl(scope.getOptions(), []);
|
|
433
430
|
var placeholder = scope.attr('placeholder', 'Selecione...');
|
|
434
431
|
var value = scope.getDisplayValue();
|
|
435
|
-
var
|
|
432
|
+
var modalName = scope.getName() + "_Modal";
|
|
436
433
|
var handlePress = function handlePress() {
|
|
437
|
-
|
|
434
|
+
scope.hide();
|
|
438
435
|
};
|
|
439
436
|
var onClick = function onClick(_ref) {
|
|
440
437
|
var value = _ref.value;
|
|
@@ -444,6 +441,11 @@ function UISelect(props) {
|
|
|
444
441
|
var style = function style(part, extra) {
|
|
445
442
|
return _extends({}, styles$3[part], scope.getStyle(part), extra);
|
|
446
443
|
};
|
|
444
|
+
var onStartModal = function onStartModal(_ref2) {
|
|
445
|
+
var crud = _ref2.crud,
|
|
446
|
+
scope = _ref2.scope;
|
|
447
|
+
console.log(crud, scope);
|
|
448
|
+
};
|
|
447
449
|
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
448
450
|
style: style('selectRoot'),
|
|
449
451
|
children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.TouchableOpacity, {
|
|
@@ -457,45 +459,17 @@ function UISelect(props) {
|
|
|
457
459
|
size: 20,
|
|
458
460
|
color: "#888"
|
|
459
461
|
})]
|
|
460
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
})
|
|
471
|
-
style: style('modalSafe'),
|
|
472
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
473
|
-
style: style('modalHeader'),
|
|
474
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.TouchableOpacity, {
|
|
475
|
-
onPress: function onPress() {
|
|
476
|
-
return setModalVisible(false);
|
|
477
|
-
},
|
|
478
|
-
style: style('modalCloseButton'),
|
|
479
|
-
children: /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
480
|
-
style: style('modalCloseText'),
|
|
481
|
-
children: "X"
|
|
482
|
-
})
|
|
483
|
-
}), /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
484
|
-
style: style('modalTitle'),
|
|
485
|
-
children: placeholder
|
|
486
|
-
})]
|
|
487
|
-
}), /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
488
|
-
style: style('modalContent'),
|
|
489
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UI.List, {
|
|
490
|
-
data: items,
|
|
491
|
-
name: scope.getName('list'),
|
|
492
|
-
click: onClick,
|
|
493
|
-
children: /*#__PURE__*/jsxRuntime.jsx(UI.Value, {
|
|
494
|
-
value: "#{@this.label}"
|
|
495
|
-
})
|
|
496
|
-
})
|
|
497
|
-
})]
|
|
498
|
-
})]
|
|
462
|
+
}), /*#__PURE__*/jsxRuntime.jsx(UI.Dialog, {
|
|
463
|
+
name: modalName,
|
|
464
|
+
onStart: onStartModal,
|
|
465
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UI.List, {
|
|
466
|
+
data: items,
|
|
467
|
+
name: scope.getName('list'),
|
|
468
|
+
click: onClick,
|
|
469
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UI.Value, {
|
|
470
|
+
value: "#{@this.label}"
|
|
471
|
+
})
|
|
472
|
+
})
|
|
499
473
|
})]
|
|
500
474
|
});
|
|
501
475
|
}
|
|
@@ -515,38 +489,6 @@ var styles$3 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
515
489
|
},
|
|
516
490
|
selectLabel: {
|
|
517
491
|
flex: 1
|
|
518
|
-
},
|
|
519
|
-
modalSafe: {
|
|
520
|
-
flex: 1,
|
|
521
|
-
backgroundColor: '#f5f5f5',
|
|
522
|
-
paddingTop: reactNative.StatusBar.currentHeight || 0
|
|
523
|
-
},
|
|
524
|
-
modalHeader: {
|
|
525
|
-
flexDirection: 'row',
|
|
526
|
-
alignItems: 'center',
|
|
527
|
-
padding: 15,
|
|
528
|
-
backgroundColor: '#6200ea'
|
|
529
|
-
},
|
|
530
|
-
modalCloseButton: {
|
|
531
|
-
padding: 10
|
|
532
|
-
},
|
|
533
|
-
modalCloseText: {
|
|
534
|
-
fontSize: 18,
|
|
535
|
-
color: 'white'
|
|
536
|
-
},
|
|
537
|
-
modalTitle: {
|
|
538
|
-
fontSize: 18,
|
|
539
|
-
color: 'white',
|
|
540
|
-
fontWeight: 'bold',
|
|
541
|
-
marginLeft: 10
|
|
542
|
-
},
|
|
543
|
-
modalContent: {
|
|
544
|
-
flex: 1,
|
|
545
|
-
width: '100%',
|
|
546
|
-
alignSelf: 'flex-start',
|
|
547
|
-
flexDirection: 'row',
|
|
548
|
-
flexWrap: 'wrap',
|
|
549
|
-
padding: 20
|
|
550
492
|
}
|
|
551
493
|
});
|
|
552
494
|
|