react-crud-mobile 1.3.529 → 1.3.531
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/index.js +10 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -88
- package/dist/index.mjs.map +1 -1
- package/package.json +84 -84
- package/src/elements/UI.tsx +67 -67
- package/src/elements/UIChildren.tsx +142 -142
- package/src/elements/UIComplete.tsx +14 -14
- package/src/elements/UIElement.tsx +780 -780
- package/src/elements/UITag.tsx +13 -13
- package/src/elements/charts/ElChart.tsx +10 -10
- package/src/elements/core/LoadingIcon.tsx +31 -31
- package/src/elements/core/SafeView.tsx +63 -63
- package/src/elements/core/UIButton.tsx +155 -153
- package/src/elements/core/UIHeader.tsx +84 -84
- package/src/elements/core/UIIcon.tsx +28 -28
- package/src/elements/core/UIInclude.tsx +40 -40
- package/src/elements/core/UIInput.tsx +149 -149
- package/src/elements/core/UIList.tsx +38 -38
- package/src/elements/core/UIListData.tsx +145 -145
- package/src/elements/core/UIListRow.tsx +134 -134
- package/src/elements/core/UIModal.tsx +100 -98
- package/src/elements/core/UIOrder.tsx +286 -286
- package/src/elements/core/UIQuantity.tsx +98 -98
- package/src/elements/core/UISelect.tsx +194 -194
- package/src/elements/core/UIToast.tsx +44 -44
- package/src/elements/core/UIToggle.tsx +114 -114
- package/src/elements/core/UIView.tsx +73 -86
- package/src/elements/index.ts +1 -1
- package/src/elements/tabs/ElTabs.tsx +178 -178
- package/src/index.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -434,8 +434,10 @@ function UIButton(props) {
|
|
|
434
434
|
flexDirection: "row"
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
|
-
const onClick = (e) => {
|
|
438
|
-
|
|
437
|
+
const onClick = async (e) => {
|
|
438
|
+
requestAnimationFrame(() => {
|
|
439
|
+
scope.call("click", {});
|
|
440
|
+
});
|
|
439
441
|
};
|
|
440
442
|
const style = (part, extra2) => {
|
|
441
443
|
let css = { ...styles13[part], ...extra2 };
|
|
@@ -490,7 +492,7 @@ function UIButton(props) {
|
|
|
490
492
|
return css;
|
|
491
493
|
});
|
|
492
494
|
scope.updaters.loader = (loading) => {
|
|
493
|
-
setLoaderIndex(
|
|
495
|
+
setLoaderIndex((i) => i + 1);
|
|
494
496
|
};
|
|
495
497
|
let iconSize = import_react_crud_utils5.Utils.nvl(element.iconSize, buttonLabel.fontSize, 15);
|
|
496
498
|
if (scope.loading) {
|
|
@@ -499,7 +501,7 @@ function UIButton(props) {
|
|
|
499
501
|
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Text, { style: buttonLabel, children: scope.lng("loading", "Aguarde...") })
|
|
500
502
|
] }) });
|
|
501
503
|
}
|
|
502
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.
|
|
504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Pressable, { onPress: onClick, style: buttonStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
503
505
|
icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UI_default.Icon, { size: iconSize, style: iconStyle, value: icon }) }),
|
|
504
506
|
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native5.Text, { style: buttonLabel, children: label })
|
|
505
507
|
] }) });
|
|
@@ -1398,7 +1400,6 @@ function UIQuantity(props) {
|
|
|
1398
1400
|
// src/elements/core/UIModal.tsx
|
|
1399
1401
|
var import_react14 = require("react");
|
|
1400
1402
|
var import_react_crud_utils15 = require("react-crud-utils");
|
|
1401
|
-
var import_react_native17 = require("react-native");
|
|
1402
1403
|
|
|
1403
1404
|
// src/elements/core/UIToast.tsx
|
|
1404
1405
|
var import_react_native16 = require("react-native");
|
|
@@ -1452,6 +1453,7 @@ function UIToast() {
|
|
|
1452
1453
|
|
|
1453
1454
|
// src/elements/core/UIModal.tsx
|
|
1454
1455
|
var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
|
|
1456
|
+
var import_react_native17 = require("react-native");
|
|
1455
1457
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1456
1458
|
function UIModal(props) {
|
|
1457
1459
|
const scrollRef = (0, import_react14.useRef)(null);
|
|
@@ -1486,8 +1488,7 @@ function UIModal(props) {
|
|
|
1486
1488
|
const ModalInner = () => {
|
|
1487
1489
|
let area = {};
|
|
1488
1490
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native_safe_area_context2.SafeAreaView, { style: style("modalSafe", area), children: [
|
|
1489
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UIChildren, { scope, children: custom }),
|
|
1490
|
-
";",
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UIChildren, { transient: true, scope, children: custom }),
|
|
1491
1492
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UIToast, {})
|
|
1492
1493
|
] });
|
|
1493
1494
|
};
|
|
@@ -1587,7 +1588,6 @@ function UIView({ scope, children }) {
|
|
|
1587
1588
|
const scrollRef = (0, import_react16.useRef)(null);
|
|
1588
1589
|
const original = scope.original;
|
|
1589
1590
|
const crud = scope.crud;
|
|
1590
|
-
const isDialog = crud.is("dialog") || crud.is("modal");
|
|
1591
1591
|
const onScroll = () => {
|
|
1592
1592
|
const crud2 = import_react_crud_utils17.ViewUtils.getCrud();
|
|
1593
1593
|
import_react_crud_utils17.Utils.each(crud2.scroll, (s) => {
|
|
@@ -1600,20 +1600,6 @@ function UIView({ scope, children }) {
|
|
|
1600
1600
|
if (!crud.is("dialog")) crud.view = scope;
|
|
1601
1601
|
import_react_crud_utils17.ComponentUtils.setViewScope(scope);
|
|
1602
1602
|
let Container = () => {
|
|
1603
|
-
if (isDialog) {
|
|
1604
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1605
|
-
import_react_native19.ScrollView,
|
|
1606
|
-
{
|
|
1607
|
-
contentContainerStyle: scope.getStyle("contentContainer", {
|
|
1608
|
-
paddingBottom: 50
|
|
1609
|
-
}),
|
|
1610
|
-
style: scope.getStyle("scroll", styles10.scroll),
|
|
1611
|
-
nestedScrollEnabled: true,
|
|
1612
|
-
ref: scrollRef,
|
|
1613
|
-
children
|
|
1614
|
-
}
|
|
1615
|
-
);
|
|
1616
|
-
}
|
|
1617
1603
|
if (original.scroll === false) {
|
|
1618
1604
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(UIChildren, { scope, children });
|
|
1619
1605
|
}
|
|
@@ -1626,7 +1612,8 @@ function UIView({ scope, children }) {
|
|
|
1626
1612
|
nestedScrollEnabled: true,
|
|
1627
1613
|
keyboardShouldPersistTaps: "handled",
|
|
1628
1614
|
contentContainerStyle: scope.getStyle("contentContainer", {
|
|
1629
|
-
paddingBottom: 50
|
|
1615
|
+
paddingBottom: 50,
|
|
1616
|
+
flexGrow: 1
|
|
1630
1617
|
}),
|
|
1631
1618
|
style: scope.getStyle("scroll", styles10.scroll),
|
|
1632
1619
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(UIChildren, { scope, children })
|