react-crud-mobile 1.0.730 → 1.0.732
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 +64 -60
- 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 +64 -60
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/elements/UIElement.tsx +113 -111
|
@@ -1547,7 +1547,68 @@ function UIElement(props) {
|
|
|
1547
1547
|
custom.underlayColor = 'transparent';
|
|
1548
1548
|
custom.onPress = onClick;
|
|
1549
1549
|
}
|
|
1550
|
-
var
|
|
1550
|
+
var Inner = function Inner() {
|
|
1551
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1552
|
+
children: [scope.is('type', 'button') && /*#__PURE__*/jsxRuntime.jsxs(UIButton, _extends({}, defaultsUI, {
|
|
1553
|
+
onClick: onClick,
|
|
1554
|
+
variant: scope.attr('variant', 'outlined'),
|
|
1555
|
+
children: [original.icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1556
|
+
style: scope.getPart('label', 'button'),
|
|
1557
|
+
children: scope.getLabel()
|
|
1558
|
+
})]
|
|
1559
|
+
})), scope.is('type', 'icon') && /*#__PURE__*/jsxRuntime.jsx(UIIcon, _extends({}, defaultsUI, {
|
|
1560
|
+
onClick: onClick,
|
|
1561
|
+
variant: scope.attr('variant', 'outlined'),
|
|
1562
|
+
children: scope.getDisplayValue()
|
|
1563
|
+
})), scope.is('type', 'link') && /*#__PURE__*/jsxRuntime.jsxs(UILink, _extends({}, defaultsUI, {
|
|
1564
|
+
onClick: onClick,
|
|
1565
|
+
variant: scope.attr('variant', 'outlined'),
|
|
1566
|
+
children: [original.icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1567
|
+
style: scope.getPart('label', 'link'),
|
|
1568
|
+
children: scope.getLabel()
|
|
1569
|
+
})]
|
|
1570
|
+
})), isInput && /*#__PURE__*/jsxRuntime.jsx(UIInput, _extends({}, defaultsInput, defaultsUI, {
|
|
1571
|
+
InputProps: _extends({}, original.inputProps)
|
|
1572
|
+
})), scope.is('type', 'complete', 'autocomplete') && /*#__PURE__*/jsxRuntime.jsx(UIComplete, {
|
|
1573
|
+
scope: scope,
|
|
1574
|
+
defaultsInput: defaultsInput,
|
|
1575
|
+
defaultsUI: defaultsUI
|
|
1576
|
+
}), scope.is('type', 'quantity') && /*#__PURE__*/jsxRuntime.jsx(UIQuantity, {
|
|
1577
|
+
scope: scope,
|
|
1578
|
+
defaultsInput: defaultsInput,
|
|
1579
|
+
defaultsUI: defaultsUI
|
|
1580
|
+
}), scope.is('type', 'checkbox', 'boolean', 'switch') && /*#__PURE__*/jsxRuntime.jsx(UISwitch, _extends({
|
|
1581
|
+
checked: isChecked()
|
|
1582
|
+
}, defaultsInput, {
|
|
1583
|
+
onChange: onCheck
|
|
1584
|
+
})), scope.is('type', 'select') && /*#__PURE__*/jsxRuntime.jsx(UISelect, _extends({}, defaultsInput, defaultsUI, {
|
|
1585
|
+
value: scope.getSelectedValue()
|
|
1586
|
+
})), scope.is('type', 'toggle') && /*#__PURE__*/jsxRuntime.jsx(UIToggle, _extends({}, defaultsInput, defaultsUI, {
|
|
1587
|
+
value: scope.getSelectedValue()
|
|
1588
|
+
})), scope.is('type', 'radio') && /*#__PURE__*/jsxRuntime.jsx(UIRadio, _extends({}, defaultsInput, defaultsUI, {
|
|
1589
|
+
row: true,
|
|
1590
|
+
children: options.map(function (row, i) {
|
|
1591
|
+
return /*#__PURE__*/jsxRuntime.jsx(UIOption, {
|
|
1592
|
+
control: /*#__PURE__*/jsxRuntime.jsx(UIRadio, _extends({}, defaultsUI)),
|
|
1593
|
+
label: row.label,
|
|
1594
|
+
value: row.value
|
|
1595
|
+
}, 'i' + i);
|
|
1596
|
+
})
|
|
1597
|
+
})), scope.is('type', 'custom') && /*#__PURE__*/jsxRuntime.jsx(Custom, {}), scope.is('type', 'column') && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1598
|
+
children: [scope.is('format', 'img') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
|
|
1599
|
+
source: scope.getDisplayValue()
|
|
1600
|
+
}), scope.is('format', 'icon') && /*#__PURE__*/jsxRuntime.jsx(UIIcon, {
|
|
1601
|
+
scope: scope,
|
|
1602
|
+
crud: crud
|
|
1603
|
+
}), !scope.is('format', 'icon', 'img') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1604
|
+
children: scope.getDisplayValue()
|
|
1605
|
+
})]
|
|
1606
|
+
}), scope.is('type', 'output', 'value') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1607
|
+
style: getStyle('value'),
|
|
1608
|
+
children: scope.getDisplayValue()
|
|
1609
|
+
})]
|
|
1610
|
+
});
|
|
1611
|
+
};
|
|
1551
1612
|
return /*#__PURE__*/jsxRuntime.jsx(CrudContext.Provider, {
|
|
1552
1613
|
value: {
|
|
1553
1614
|
crud: crud,
|
|
@@ -1562,66 +1623,9 @@ function UIElement(props) {
|
|
|
1562
1623
|
style: getStyle('label'),
|
|
1563
1624
|
children: scope.getLabel()
|
|
1564
1625
|
}), isShowInner() && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1565
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
1626
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1566
1627
|
style: getStyle('inner'),
|
|
1567
|
-
children:
|
|
1568
|
-
onClick: onClick,
|
|
1569
|
-
variant: scope.attr('variant', 'outlined'),
|
|
1570
|
-
children: [original.icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1571
|
-
style: scope.getPart('label', 'button'),
|
|
1572
|
-
children: scope.getLabel()
|
|
1573
|
-
})]
|
|
1574
|
-
})), scope.is('type', 'icon') && /*#__PURE__*/jsxRuntime.jsx(UIIcon, _extends({}, defaultsUI, {
|
|
1575
|
-
onClick: onClick,
|
|
1576
|
-
variant: scope.attr('variant', 'outlined'),
|
|
1577
|
-
children: scope.getDisplayValue()
|
|
1578
|
-
})), scope.is('type', 'link') && /*#__PURE__*/jsxRuntime.jsxs(UILink, _extends({}, defaultsUI, {
|
|
1579
|
-
onClick: onClick,
|
|
1580
|
-
variant: scope.attr('variant', 'outlined'),
|
|
1581
|
-
children: [original.icon && /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {}), original.label && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1582
|
-
style: scope.getPart('label', 'link'),
|
|
1583
|
-
children: scope.getLabel()
|
|
1584
|
-
})]
|
|
1585
|
-
})), isInput && /*#__PURE__*/jsxRuntime.jsx(UIInput, _extends({}, defaultsInput, defaultsUI, {
|
|
1586
|
-
InputProps: _extends({}, original.inputProps)
|
|
1587
|
-
})), scope.is('type', 'complete', 'autocomplete') && /*#__PURE__*/jsxRuntime.jsx(UIComplete, {
|
|
1588
|
-
scope: scope,
|
|
1589
|
-
defaultsInput: defaultsInput,
|
|
1590
|
-
defaultsUI: defaultsUI
|
|
1591
|
-
}), scope.is('type', 'quantity') && /*#__PURE__*/jsxRuntime.jsx(UIQuantity, {
|
|
1592
|
-
scope: scope,
|
|
1593
|
-
defaultsInput: defaultsInput,
|
|
1594
|
-
defaultsUI: defaultsUI
|
|
1595
|
-
}), scope.is('type', 'checkbox', 'boolean', 'switch') && /*#__PURE__*/jsxRuntime.jsx(UISwitch, _extends({
|
|
1596
|
-
checked: isChecked()
|
|
1597
|
-
}, defaultsInput, {
|
|
1598
|
-
onChange: onCheck
|
|
1599
|
-
})), scope.is('type', 'select') && /*#__PURE__*/jsxRuntime.jsx(UISelect, _extends({}, defaultsInput, defaultsUI, {
|
|
1600
|
-
value: scope.getSelectedValue()
|
|
1601
|
-
})), scope.is('type', 'toggle') && /*#__PURE__*/jsxRuntime.jsx(UIToggle, _extends({}, defaultsInput, defaultsUI, {
|
|
1602
|
-
value: scope.getSelectedValue()
|
|
1603
|
-
})), scope.is('type', 'radio') && /*#__PURE__*/jsxRuntime.jsx(UIRadio, _extends({}, defaultsInput, defaultsUI, {
|
|
1604
|
-
row: true,
|
|
1605
|
-
children: options.map(function (row, i) {
|
|
1606
|
-
return /*#__PURE__*/jsxRuntime.jsx(UIOption, {
|
|
1607
|
-
control: /*#__PURE__*/jsxRuntime.jsx(UIRadio, _extends({}, defaultsUI)),
|
|
1608
|
-
label: row.label,
|
|
1609
|
-
value: row.value
|
|
1610
|
-
}, 'i' + i);
|
|
1611
|
-
})
|
|
1612
|
-
})), scope.is('type', 'custom') && /*#__PURE__*/jsxRuntime.jsx(Custom, {}), scope.is('type', 'column') && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1613
|
-
children: [scope.is('format', 'img') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Image, {
|
|
1614
|
-
source: scope.getDisplayValue()
|
|
1615
|
-
}), scope.is('format', 'icon') && /*#__PURE__*/jsxRuntime.jsx(UIIcon, {
|
|
1616
|
-
scope: scope,
|
|
1617
|
-
crud: crud
|
|
1618
|
-
}), !scope.is('format', 'icon', 'img') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1619
|
-
children: scope.getDisplayValue()
|
|
1620
|
-
})]
|
|
1621
|
-
}), scope.is('type', 'output', 'value') && /*#__PURE__*/jsxRuntime.jsx(reactNative.Text, {
|
|
1622
|
-
style: getStyle('value'),
|
|
1623
|
-
children: scope.getDisplayValue()
|
|
1624
|
-
})]
|
|
1628
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Inner, {})
|
|
1625
1629
|
}), error && /*#__PURE__*/jsxRuntime.jsx(reactNative.View, {
|
|
1626
1630
|
style: getStyle('error'),
|
|
1627
1631
|
children: error
|