react-crud-mobile 1.0.586 → 1.0.588
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 +23 -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 +25 -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 +70 -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,18 @@ 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";
|
|
433
|
+
var crud = scope.crud;
|
|
436
434
|
var handlePress = function handlePress() {
|
|
437
|
-
|
|
435
|
+
scope.show({
|
|
436
|
+
crud: crud,
|
|
437
|
+
scope: scope,
|
|
438
|
+
event: null
|
|
439
|
+
});
|
|
438
440
|
};
|
|
439
441
|
var onClick = function onClick(_ref) {
|
|
440
442
|
var value = _ref.value;
|
|
@@ -444,6 +446,11 @@ function UISelect(props) {
|
|
|
444
446
|
var style = function style(part, extra) {
|
|
445
447
|
return _extends({}, styles$3[part], scope.getStyle(part), extra);
|
|
446
448
|
};
|
|
449
|
+
var onStartModal = function onStartModal(_ref2) {
|
|
450
|
+
var crud = _ref2.crud,
|
|
451
|
+
scope = _ref2.scope;
|
|
452
|
+
console.log(crud, scope);
|
|
453
|
+
};
|
|
447
454
|
return /*#__PURE__*/jsxRuntime.jsxs(reactNative.View, {
|
|
448
455
|
style: style('selectRoot'),
|
|
449
456
|
children: [/*#__PURE__*/jsxRuntime.jsxs(reactNative.TouchableOpacity, {
|
|
@@ -457,45 +464,17 @@ function UISelect(props) {
|
|
|
457
464
|
size: 20,
|
|
458
465
|
color: "#888"
|
|
459
466
|
})]
|
|
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
|
-
})]
|
|
467
|
+
}), /*#__PURE__*/jsxRuntime.jsx(UI.Dialog, {
|
|
468
|
+
name: modalName,
|
|
469
|
+
onStart: onStartModal,
|
|
470
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UI.List, {
|
|
471
|
+
data: items,
|
|
472
|
+
name: scope.getName('list'),
|
|
473
|
+
click: onClick,
|
|
474
|
+
children: /*#__PURE__*/jsxRuntime.jsx(UI.Value, {
|
|
475
|
+
value: "#{@this.label}"
|
|
476
|
+
})
|
|
477
|
+
})
|
|
499
478
|
})]
|
|
500
479
|
});
|
|
501
480
|
}
|
|
@@ -515,38 +494,6 @@ var styles$3 = /*#__PURE__*/reactNative.StyleSheet.create({
|
|
|
515
494
|
},
|
|
516
495
|
selectLabel: {
|
|
517
496
|
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
497
|
}
|
|
551
498
|
});
|
|
552
499
|
|