react-crud-mobile 1.0.708 → 1.0.709
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 +2 -1
- 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 +2 -1
- package/dist/react-crud-mobile.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/core/UIModal.tsx +2 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("react-crud-utils"),i=require("react-native"),l=require("react/jsx-runtime"),a=e(require("@expo/vector-icons/Ionicons")),o=require("@expo/vector-icons"),s=require("react-native-safe-area-context");function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function u(e){var a=t.useState(r.Utils.nvl(e.scope,r.ScopeUtils.create(e)))[0],o=r.Utils.nvl(e.crud,a.crud),s=r.Utils.nvl(e.validateScope,"global"),p=r.Utils.nvl(e.part,"child");if(a.isInput())return l.jsx(l.Fragment,{});var f,g,h,x,y,m=function(e){var t=e.child;if(!t)return l.jsx(l.Fragment,{});if("string"==typeof t)return l.jsx(l.Fragment,{children:t});var n=t.type,i=c({},t.props);return delete i.children,"string"==typeof n?r.Utils.isEmpty(t.props.children)?l.jsx(n,c({},i)):l.jsx(n,c({},i,{children:l.jsx(u,c({transient:!0,validateScope:s},t.props,{scope:a,crud:o}))})):"function"==typeof n?l.jsx(n,c({validateScope:s},t.props,{parent:a,crud:o})):r.Utils.isEmpty(t.props.children)?l.jsx(l.Fragment,{}):l.jsx(u,c({validateScope:s},t.props,{scope:a,crud:o,transient:!0}))},j=function(){return l.jsx(l.Fragment,e.elements?{children:Object.entries(e.elements).map((function(e,t){return l.jsx(M,c({crud:o},e[1]))}))}:{children:n.Children.map(e.children,(function(e){return l.jsx(m,{child:e})}))})};return e.transient?l.jsx(j,{}):r.Utils.isEmpty(e.children)&&r.Utils.isEmpty(e.elements)?l.jsx(l.Fragment,{}):l.jsx(l.Fragment,{children:l.jsx(i.View,{style:(f=p,h=r.Utils.nvl(f,"root"),x=d[h],y={},r.Utils.isEmpty(e.style)||(null!=(g=e.style)&&g.push?r.Utils.each(e.style,(function(e){e&&(y=c({},y,e))})):y=c({},e.style)),c({},x,y,a.getStyle(f))),children:l.jsx(j,{})})})}var d=i.StyleSheet.create({child:{width:"100%"},inner:{width:"100%"}});function p(e){var i=e.scope,o=t.useState(0),s=o[0],d=o[1],p=i.original,f=i.getItems(),g=0,h=[],x=t.useState(null),y=x[0],m=x[1],j=function(e,t){void 0===t&&(t=!0),e&&i.execute({event:{validate:t,validateScope:p.validateScope,action:function(){i.changeValue(e.data),y=e,d(s=e.index),m(e)}}})},v=function(e){var t,n="ui-tabs-item ui-click";return(null==(t=y)?void 0:t.index)===e.index&&(n+=" ui-tab-selected"),n},b=function(e,t){var n=c({},e.props);t||(t=i.crud.data);var l=r.CrudUtils.create("tabs",{data:t,changed:t,parent:i.crud}),a=r.Utils.resolve(n,l);!1!==a.rendered&&h.push(c({},a,{child:e,element:a,original:n,index:g++,data:t}))};n.Children.map(e.children,(function(e,t){if(r.Utils.isEmpty(f))b(e,{});else for(var n in f)b(e,f[n])})),y||j(h[s],!1);var S=function(e){j(h[s+e])},w="stepper"===p.layout;return l.jsx("div",{className:i.getStyleClass("inner"),style:i.getStyle("inner"),children:l.jsxs("div",{className:"ui-tabs-content",children:[l.jsx("div",{className:"ui-tabs-items",children:h.map((function(e,t){return l.jsxs("div",{className:v(e),onClick:function(){j(e)},children:[w&&l.jsx("div",{className:"ui-tab-item-divisor"}),l.jsxs("div",{className:"ui-tab-item-inner",children:[w&&l.jsx("div",{className:"ui-step-line"}),l.jsx("div",{className:"ui-tab-item-label",children:w?e.index+1:e.label})]})]},r.Utils.key(p.id,"tab",t))}))}),y&&l.jsxs(l.Fragment,{children:[w&&l.jsx("div",{className:"ui-tabs-label",children:y.label}),l.jsx("div",{className:"ui-tabs-area",children:l.jsx(u,c({},e,{scope:i,children:y.child}))}),"stepper"===p.layout&&l.jsxs("div",{className:"ui-tabs-actions",children:[l.jsx(Y.Output,{space:6,layout:"left",children:l.jsx(Y.Include,c({},e,{transient:!0,name:"left",default:l.jsx(Y.Button,{rendered:s>0,icon:l.jsx(a,{}),click:function(){S(-1)}})}))}),l.jsx(Y.Output,{space:6,layout:"right",children:l.jsx(Y.Include,c({},e,{transient:!0,name:"right",default:l.jsx(Y.Button,{rendered:s<h.length-1,icon:l.jsx(a,{}),click:function(){S(1)}})}))})]})]})]})})}function f(e){var t=e.scope;return t.getItems(),r.Utils.asList(t.original.columns),l.jsx("div",{className:"ui-chart-data"})}function g(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:h.link,children:"Clique aqui para acessar o React Native"})})}var h={link:{}};function x(e){return l.jsx(l.Fragment,{children:l.jsx(g,c({},e.defaultsInput,e.defaultsUI))})}function y(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:m.link,children:"Clique aqui para acessar o React Native"})})}var m={link:{}};function j(e){var t=e.scope,n=t.getValue(),i={ion:o.Ionicons,ant:o.AntDesign,entypo:o.Entypo,evil:o.EvilIcons,material:o.MaterialCommunityIcons},a=r.Utils.nvl(t.original.library,"ion");return l.jsx(i[a],{name:n,style:t.getStyle("icon")})}function v(e){var t=e.scope,n=t.original,a=n.color,s=n.label,u=n.icon;a||(a="primaryLight");var d={buttonLabel:{color:"#ffffff",fontWeight:"500",fontSize:16},buttonInner:{flexDirection:"row",alignItems:"center",justifyContent:"center",height:44,minWidth:44},buttonIcon:{color:"#fff",fontSize:18},button:{backgroundColor:a,borderRadius:24,gap:10,justifyContent:"center",alignItems:"center",flexDirection:"row"}},p=function(e,n){var r=c({},d[e],n);return t.getStyle(e,r)},f={};f.button=u?{padding:0,height:40}:{height:50};var g=r.Utils.call((function(){var e=p("button",f.button);if(!e.width){var t=e.height;"number"==typeof t&&(e.minWidth=t)}return e}));return l.jsx(i.TouchableHighlight,{underlayColor:"transparent",onPress:function(e){t.call("click",{})},style:g,children:l.jsxs(l.Fragment,{children:[u&&l.jsx(l.Fragment,{children:l.jsx(o.Ionicons,{size:30,style:p("buttonIcon",f.icon),name:u})}),s&&l.jsx(i.Text,{style:p("buttonLabel"),children:s})]})})}function b(e){var n=t.useState(!1),a=n[0],s=n[1],u=e.scope,d=r.Utils.nvl(u.getOptions(),[]),p=u.attr("placeholder","Selecione..."),f=u.getDisplayValue(),g=r.useTheme(),h=r.ViewUtils.getCrud("view"),x=function(){var e=!a;h.data.selectIsOpen=e,s(e)},y=function(e,t){return c({},S[e],u.getStyle(e),t)};return l.jsxs(i.View,{style:y("selectRoot"),children:[l.jsxs(i.TouchableOpacity,{onPress:x,style:y("selectInput"),children:[l.jsx(i.Text,{style:y("selectLabel"),children:r.Utils.nvl(f,p)}),l.jsx(o.Ionicons,{name:"arrow-down",size:20,color:"#888"})]}),l.jsxs(i.Modal,{animationType:"slide",transparent:!0,visible:a,onRequestClose:function(){return s(!1)},children:[l.jsx(i.StatusBar,{barStyle:"dark-content",backgroundColor:g.colors.primary}),l.jsxs(i.SafeAreaView,{style:y("modalSafe"),children:[l.jsxs(i.View,{style:y("modalHeader"),children:[l.jsx(i.TouchableOpacity,{onPress:function(){return s(!1)},style:y("modalCloseButton"),children:l.jsx(i.Text,{style:y("modalCloseText"),children:"X"})}),l.jsx(i.Text,{style:y("modalTitle"),children:p})]}),l.jsx(i.View,{style:y("modalContent"),children:l.jsx(Y.List,{data:d,name:u.getName("list"),click:function(e){u.changeValue(e.value),x()},children:l.jsx(Y.Value,{value:"#{@this.label}"})})})]})]})]})}var S=i.StyleSheet.create({selectRoot:{justifyContent:"flex-start",alignItems:"flex-start",flex:1},selectInput:{width:"100%",flexDirection:"row",borderRadius:20,paddingHorizontal:15,paddingVertical:10},selectLabel:{flex:1},modalSafe:{flex:1,backgroundColor:"#f5f5f5",paddingTop:i.StatusBar.currentHeight||0},modalHeader:{flexDirection:"row",alignItems:"center",padding:15,backgroundColor:"#6200ea"},modalCloseButton:{padding:10},modalCloseText:{fontSize:18,color:"white"},modalTitle:{fontSize:18,color:"white",fontWeight:"bold",marginLeft:10},modalContent:{flex:1,width:"100%",alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",padding:20}});function w(e){var n=e.scope,a=r.Utils.nvl(n.getValue(),!1),o=t.useState(a),s=o[1];return l.jsx(i.Switch,{value:o[0],style:n.getStyle("element"),onValueChange:function(e){n.changeValue(e),s(e)}})}function C(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:T.link,children:"Clique aqui para acessar o React Native"})})}var T={link:{}};function I(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:U.link,children:"Clique aqui para acessar o React Native"})})}var U={link:{}};function k(e){var n=e.scope,a=r.Utils.nvl(n.getValue(),""),s=n.getLabel(),u=n.getPart("placeholder",null,s),d=n.original,p=t.useState(a),f=p[0],g=p[1];return l.jsxs(l.Fragment,{children:[n.getPart("left"),l.jsx(i.TextInput,{style:c({},n.getStyle("input",V.input),void 0),onChangeText:function(e){n.changeValue(e),g(e)},value:f,placeholder:u}),d.icon&&l.jsx(o.Ionicons,{name:d.icon,size:n.attr("iconSize",20),color:n.attr("iconColor","#888")}),n.getPart("right")]})}var V=i.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",borderWidth:1,borderColor:"borderColor",borderRadius:20,paddingHorizontal:10,paddingVertical:5,padding:10,paddingLeft:5,paddingRight:10},icon:{marginRight:10},input:{marginHorizontal:0,marginVertical:0,height:40,flex:1}});function B(e){var n,a=e.scope,o=e.index,s=a.original,d=e.item,p=a.getPart("cols",void 0,1),f=Math.floor(100/p)+"%",g=null==(n={repeat:P,list:D})?void 0:n[s.type],h=""+a.key("row",o,""),x=t.useState(r.ScopeUtils.create(c({},s,{parent:a,name:h,crud:a.crud,index:o,type:"row",data:d})))[0],y=t.useRef(null),m=function(e,n){var r=t.useState(!0===n.visible),l=r[0],a=r[1];return t.useEffect((function(){var t=setInterval((function(){var t;if(e.current&&!l&&null!=(t=n.original)&&t.useIsInView)if("web"===i.Platform.OS){var r=null==e.current.getBoundingClientRect?void 0:e.current.getBoundingClientRect();if(r&&"undefined"!=typeof window){var o=window.innerHeight,s=r.top<o&&r.bottom>0;s&&(n.visible=s),a(s)}}else null==e.current.measureInWindow||e.current.measureInWindow((function(e,t,r,l){var o=t<i.Dimensions.get("window").height&&t+l>0;o&&(n.visible=o),a(o)}))}),300);return function(){return clearInterval(t)}}),[e]),l}(y,x),j=function(){return l.jsx(l.Fragment,!m&&s.useIsInView&&!x.visible&&o>20?{}:{children:l.jsx(u,{scope:x,crud:x.crud,children:e.children})})};return l.jsx((function(){var e=t.useState(0),n=e[0],r=e[1],u=a.key("item"),h=function(){var e=x.getStyle("row",c({},g.row,{minHeight:40}));return p>0&&(e.width=f),e};return x.update=function(){a.updateIndex=a.updateIndex+1,r(++n)},s.click?l.jsx(i.TouchableHighlight,{style:h(),underlayColor:"transparent",ref:y,onPress:function(e){e.stopPropagation(),function(e){x.call("click",{value:e,item:e,edit:!0,index:o})}(d)},children:l.jsx(j,{})},u):l.jsx(i.View,{style:h(),ref:y,children:l.jsx(j,{})},u)}),{})}var D=i.StyleSheet.create({row:{padding:5,margin:0,width:"100%",backgroundColor:"#f5f5f5",gap:10,borderRadius:8,justifyContent:"center"}}),P=i.StyleSheet.create({row:{padding:0,width:"100%",justifyContent:"center"}});function F(e){var n,a=e.scope,s=a.crud,u=a.original,d=r.Utils.nvl(a.getPart("cols",void 0,1)),p=r.Utils.nvl(a.getItems(),[]),f=null==(n={repeat:L,list:R})?void 0:n[u.type],g=r.ComponentUtils.getDefine(e,"add"),h=u.hideAddWhenEmpty,x=t.useState(0),y=x[0],m=x[1];a.update=function(){a.updateIndex=++y,m(y)};var j,v,b=function(){if(!r.Utils.isEmpty(p))return l.jsx(l.Fragment,{});var e=a.attr("empty","Sem registro");return e?"string"==typeof e?l.jsx(i.Text,{style:a.getStyle("empty",{flex:1,fontWeight:500,fontSize:20,padding:10,textAlign:"center",justifyContent:"center",alignItems:"center"}),children:e}):l.jsx(l.Fragment,{children:e}):l.jsx(l.Fragment,{})},S=a.key("data");return l.jsxs(l.Fragment,{children:[!1!==u.search&&l.jsx(Y.Text,{placeholder:"Pesquisar...",field:"query",crud:s,right:l.jsx(o.Ionicons,{name:"search",size:20,color:"#888"})}),l.jsxs(i.View,{style:(j={},v=a.getStyle("container",c({},j,f.container)),d>1&&(v=c({},v,{flexDirection:"row",flexWrap:"wrap"})),v),children:[l.jsx(b,{}),p.map((function(t,n){return l.jsx(B,{index:n,item:t,scope:a,children:e.children})})),(!r.Utils.isEmpty(p)||!0!==h)&&l.jsx(l.Fragment,{children:g})]},S)]})}var R=i.StyleSheet.create({container:{flex:1,width:"100%",flexDirection:"row",flexWrap:"wrap",alignItems:"stretch",gap:10},text:{fontSize:18,fontWeight:"bold"}}),L=i.StyleSheet.create({container:{flex:1,width:"100%",flexDirection:"row",flexWrap:"wrap",gap:10,alignItems:"stretch"},text:{fontSize:18,fontWeight:"bold"}});function z(e){var n=e.scope,a=r.Utils.nvl(n.getOptions(),[]),o=n.getInputValue(),s=t.useState(0),u=s[0],d=s[1],p=function(e){return(null==e?void 0:e.value)===o},f=function(t){var a=t.item,o=t.index,s=p(a),u=c({},E.text);return s&&(u.color="#ffffff"),r.Utils.isEmpty(e.children)?l.jsx(i.Text,{style:u,children:a.label}):l.jsx(B,{scope:n,item:a.object,index:o,children:e.children})},g=function(e){var t=c({},E.item,n.getStyle("item")),r=Math.floor(100/a.length)+"%";if(p(e)){var i=n.getPart("selectedColor",void 0,"primary");(t=c({},t,n.getStyle("selected",{backgroundColor:i,color:"#ffffff"}))).color||(t.color="#ffffff")}return t.width=r,t};return l.jsx(l.Fragment,{children:a.map((function(e,t){return l.jsx(i.TouchableHighlight,{style:g(e),onPress:function(t){!function(e){n.changeValue(e.object),d(++u)}(e)},children:l.jsx(f,{item:e,index:t})},"k-"+t)}))})}var E=i.StyleSheet.create({container:{flex:1,width:"100%",gap:10,justifyContent:"center",flexDirection:"row"},item:{padding:15,marginVertical:8,backgroundColor:"#f5f5f5",borderRadius:8,justifyContent:"center",width:"auto",flexDirection:"row"},text:{fontSize:16,fontWeight:"500"}});function W(e){var n=e.scope,a=n.original,s=t.useState(0),u=s[0],d=s[1],p=n.getValue(0),f=a.color;f||(f="primary");var g={padding:10,alignItems:"center",height:44,width:44,textAlign:"center",verticalAling:"middle",borderRadius:24,backgroundColor:f,color:"#ffffff",justifyContent:"center"},h={buttonLabel:{color:"#ffffff",fontWeight:"500",fontSize:16},value:{flex:1,flexDirection:"row",textAlign:"center"},buttonInner:{flexDirection:"row",alignItems:"center",justifyContent:"center"},buttonIcon:{color:"#fff",fontSize:18},button:g,addButton:c({},g),delButton:c({},g)},x=function(e){n.changeValue(p+e),d(++u)},y=function(e,t){var r=c({},h[e],t);return n.getStyle(e,r)};return l.jsxs(l.Fragment,{children:[l.jsx(i.TouchableHighlight,{underlayColor:"transparent",onPress:function(){x(-1)},style:y("delButton"),children:l.jsx(o.Ionicons,{size:30,style:y("buttonIcon"),name:"remove"})}),l.jsx(i.Text,{style:y("value"),children:r.Utils.nvl(p,0)}),l.jsx(i.TouchableHighlight,{underlayColor:"transparent",onPress:function(){x(1)},style:y("addButton"),children:l.jsx(o.Ionicons,{size:30,style:y("buttonIcon"),name:"add"})})]})}function q(e){var n,a,o=t.useState(!1),s=o[0],d=o[1],p=t.useState(0),f=p[0],g=p[1],h=r.ViewUtils.getCrud("view"),x=e.scope,y=x.getLabel(),m=r.useTheme(),j=r.Utils.nvl(null==(n=m.styles)||null==(n=n.defaults)?void 0:n.header,{}),v=function(e,t){var n=c({},O[e],t);return c({},x.getStyle(e,n))},b=function(){x.close({scope:x,crud:x.currentDialog,event:{}})},S=function(e){d(s=e)};x.update=function(){g(++f)},x.dialogShow=function(e){var t=e.crud,n=x.getName("modal"),i=!0===e.edit,l={},a=null;t.is("row")?(l.parent=t.parent.parent,l.search=t.parent,a=t.data):t.is("search")&&(l.parent=t.parent,l.search=t);var o=r.Utils.nvl(e.item,a,{}),s=r.CrudUtils.create("dialog",c({parent:t,root:t,name:n,dialog:h.dialog,data:o,edit:i,scope:x},l));h.dialog=s,x.currentDialog=s,x.update(),S(!0)},x.dialogHide=function(e){var t;h.dialog=r.Utils.nvl(x.currentDialog.dialog,null),x.currentDialog=null,S(!1),null!=(t=h.dialog)&&t.scope&&h.dialog.scope.update()},t.useEffect((function(){i.StatusBar.setBarStyle("light-content"),null==i.StatusBar.setBackgroundColor||i.StatusBar.setBackgroundColor(m.colors.primary)}),[s]);var w=x.currentDialog;if(!w)return l.jsx(l.Fragment,{});if(w.uuid!==(null==(a=h.dialog)?void 0:a.uuid))return l.jsx(l.Fragment,{});var C=r.ComponentUtils.getDefine(e,"header","right");return l.jsx(i.Modal,{animationType:"slide",transparent:!0,visible:s,onRequestClose:b,children:l.jsxs(i.SafeAreaView,{style:v("modalSafe"),children:[l.jsxs(i.View,{style:x.getStyle("header",j),children:[l.jsx(i.TouchableOpacity,{onPress:b,style:v("modalCloseButton"),children:l.jsx(i.Text,{style:v("modalCloseText"),children:"X"})}),l.jsx(i.Text,{style:v("modalTitle"),children:y}),!r.Utils.isEmpty(C)&&l.jsx(u,{scope:x,crud:x.currentDialog,transient:!0,children:C})]}),l.jsx(i.ScrollView,{contentContainerStyle:{flexGrow:1},style:v("modalContent"),children:l.jsx(i.View,{style:{flex:1},children:l.jsx(u,{scope:x,crud:x.currentDialog,children:e.children})})})]})})}var O=i.StyleSheet.create({modalSafe:{flex:1,backgroundColor:"primary",width:"100%"},modalCloseButton:{padding:10},modalCloseText:{fontSize:18,color:"white"},modalTitle:{fontSize:18,color:"white",fontWeight:"bold",marginLeft:10},modalContent:{flex:1,backgroundColor:"#f5f5f5",padding:20}});function H(e){var n,a=e.scope,o=e.children,s=r.useTheme(),c=a.getPart("header",null,[]),d=r.Utils.nvl(null==(n=s.styles)||null==(n=n.defaults)?void 0:n.header,{});t.useEffect((function(){i.StatusBar.setBarStyle("light-content"),null==i.StatusBar.setBackgroundColor||i.StatusBar.setBackgroundColor(s.colors.primary)}),[]);var p=!r.Utils.isEmpty(c);return l.jsxs(l.Fragment,{children:[p&&l.jsx(i.View,{style:a.getStyle("header",d),children:c}),l.jsx(i.View,{style:a.getStyle("container",N.container),children:l.jsx(i.ScrollView,{onScroll:function(){var e=r.ViewUtils.getCrud();r.Utils.each(e.scroll,(function(e){e.onScroll&&e.onScroll.call(e)}))},scrollEventThrottle:16,keyboardShouldPersistTaps:"handled",contentContainerStyle:a.getStyle("contentContainer",{}),style:a.getStyle("scroll",N.scroll),children:l.jsx(u,{scope:a,children:o})})})]})}var N=i.StyleSheet.create({scroll:{padding:10},container:{backgroundColor:"primary"},view:{backgroundColor:"primary"}}),A=t.createContext({});function M(e){var n,a,s=t.useContext(A),d=r.Utils.nvl(e.theme,null==s?void 0:s.theme),g=r.Utils.nvl(e.crud,null==s?void 0:s.crud),h=t.useState(r.ScopeUtils.create(c({crud:g},e,{theme:d})))[0],m=t.useState(0),S=m[0],T=m[1],U=t.useState(null),V=U[0],B=U[1];g=h.crud;var D=h.getOptions(),P=h.original,R=t.useRef(null);h.update=function(){T(++S)},h.updateElement=function(){T(++S)},h.prompt=function(e){var t=e.event;if(t){var n="Você tem certeza que deseja continuar?",l="Atenção",a=t.prompt;"string"==typeof a&&(n=a),"object"==typeof a&&(n=r.Utils.nvl(a.message,n),l=r.Utils.nvl(a.title,l)),i.Alert.alert(l,n,[{text:"Cancelar",style:"cancel"},{text:"Confirmar",onPress:function(){return h.execute(e)}}],{cancelable:!1})}};var L=function(){var e=P.custom;return e?l.jsx(M,"string"==typeof e?{element:{value:e,type:"dummy"},crud:g}:c({type:e.type,tag:e.type},e.props,{crud:g})):l.jsx(l.Fragment,{})};if(h.is("type","dummy"))return l.jsx(l.Fragment,{children:h.getDisplayValue()});var E=function(e){var t=e.target.value;h.isType("integer","int","number")?t=parseInt(t):h.isType("decimal")&&(t=parseFloat(t)),h.isType("select","complete")&&(t=h.getSelectedItem(t)),h.changeValue(t),h.update()},O=function(e){h.call("click")},N={scope:h,crud:g,onChange:E};h.isType("password")&&(N.type="password");var G=function(){return!(h.isInput()||r.Utils.isEmpty(e.children)&&r.Utils.isEmpty(e.elements))},Q=h.is("type","text","number","phone","postalCode","money","password","email"),J=function(e){var t,n=r.Utils.nvl(P.type,"none"),i=r.Utils.nvl(e,"root"),l=c({},X[i]),a=G();return e||a||(l=c({},l)),h.isInput()&&(l=c({},l,K.input[i])),l=c({},l,null==K||null==(t=K[n])?void 0:t[i]),a&&e&&(l=c({},l,_[e])),c({},l,h.getStyle(e,l))},Y=J("element"),Z={required:h.isRequired(),size:"small",scope:h,crud:g,style:Y,placeholder:h.attr("placeholder","Digite aqui")};h.error=function(e){V=e,B(e)},null!=(n=P.list)&&n.url||null!=(a=P.load)&&a.url||h.start(),t.useEffect((function(){h.start()}));var $=function(){return"string"==typeof P.icon?l.jsx(o.Ionicons,{name:P.icon,style:h.getStyle("icon")}):l.jsx(l.Fragment,{children:P.icon})};if(h.open=function(e){i.Linking.openURL(e.url)},t.useLayoutEffect((function(){if(null!=R&&R.current&&h.is("type","card","list","tabs","stepper")){var e=null==R?void 0:R.current;if(null!=e&&e.classList){var t=r.HtmlUtils.getBGColor(e);e.classList.add("rgb(255, 255, 255)"===t?"ui-dark":"ui-light")}}})),!h.isRendered()||h.is("type","define"))return l.jsx(l.Fragment,{});var ee=i.View,te={};return!h.isType("input","grid","list","repeat")&&P.click&&(ee=i.TouchableHighlight,te.underlayColor="transparent",te.onPress=O),l.jsx(A.Provider,{value:{crud:g,theme:d},children:l.jsx(ee,c({ref:R,style:J()},te,{children:l.jsxs(l.Fragment,{children:[void 0!==P.label&&!1!==P.label&&!h.isType("button","dialog","modal")&&l.jsx(i.Text,{style:J("label"),children:h.getLabel()}),!G()&&l.jsxs(l.Fragment,{children:[l.jsxs(i.View,{style:J("inner"),children:[h.is("type","button")&&l.jsxs(v,c({},Z,{onClick:O,variant:h.attr("variant","outlined"),children:[P.icon&&l.jsx($,{}),P.label&&l.jsx(i.Text,{style:h.getPart("label","button"),children:h.getLabel()})]})),h.is("type","icon")&&l.jsx(j,c({},Z,{onClick:O,variant:h.attr("variant","outlined"),children:h.getDisplayValue()})),h.is("type","link")&&l.jsxs(y,c({},Z,{onClick:O,variant:h.attr("variant","outlined"),children:[P.icon&&l.jsx($,{}),P.label&&l.jsx(i.Text,{style:h.getPart("label","link"),children:h.getLabel()})]})),Q&&l.jsx(k,c({},N,Z,{InputProps:c({},P.inputProps)})),h.is("type","complete","autocomplete")&&l.jsx(x,{scope:h,defaultsInput:N,defaultsUI:Z}),h.is("type","quantity")&&l.jsx(W,{scope:h,defaultsInput:N,defaultsUI:Z}),h.is("type","checkbox","boolean","switch")&&l.jsx(w,c({checked:!0===h.getValue()},N,{onChange:function(){var e=h.getValue();E({target:{value:!(!0===e)}})}})),h.is("type","select")&&l.jsx(b,c({},N,Z,{value:h.getSelectedValue()})),h.is("type","toggle")&&l.jsx(z,c({},N,Z,{value:h.getSelectedValue()})),h.is("type","radio")&&l.jsx(I,c({},N,Z,{row:!0,children:D.map((function(e,t){return l.jsx(C,{control:l.jsx(I,c({},Z)),label:e.label,value:e.value},"i"+t)}))})),h.is("type","custom")&&l.jsx(L,{}),h.is("type","column")&&l.jsxs(l.Fragment,{children:[h.is("format","img")&&l.jsx(i.Image,{source:h.getDisplayValue()}),h.is("format","icon")&&l.jsx(j,{scope:h,crud:g}),!h.is("format","icon","img")&&l.jsx(i.Text,{children:h.getDisplayValue()})]}),h.is("type","output","value")&&l.jsx(i.Text,{style:J("value"),children:h.getDisplayValue()})]}),V&&l.jsx(i.View,{style:J("error"),children:V})]}),h.isType("list","repeat")&&l.jsx(F,c({},e,{scope:h,crud:g})),h.isType("dialog")&&l.jsx(q,c({},e,{scope:h,crud:g})),h.isType("chart")&&l.jsx(f,c({},e,{scope:h,crud:g})),h.isType("tabs")&&l.jsx(p,c({},e,{scope:h,crud:g})),h.isType("view")&&l.jsx(H,c({},e,{scope:h,crud:g})),!h.isType("tabs","view","grid","list","define","repeat","modal","dialog","chart")&&l.jsx(u,c({},e,{scope:h,crud:g,style:J("inner")}))]})}))})}var G={backgroundColor:"white",padding:16,borderRadius:10,width:"100%",shadowColor:"#888",shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:3.84,elevation:3},K={view:{inner:{width:"100%",alignItems:"normal",flex:1},container:{width:"100%",backgroundColor:"#f5f5f5",flex:1,gap:10},child:{width:"100%",flex:1,gap:10,padding:10},root:{width:"100%",flex:1,alignItems:"normal",padding:0}}};K.card=i.StyleSheet.create({root:c({},G),inner:{flex:1,width:"100%",paddingBottom:10,paddingTop:5,alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",gap:10}}),K.input=i.StyleSheet.create({label:{paddingLeft:8},inner:{flex:1,width:"100%",paddingBottom:0,paddingTop:0,alignItems:"center",borderWidth:1,borderColor:"borderColor",borderRadius:20,paddingHorizontal:15,alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap"}}),K.switch={inner:{paddingBottom:6,paddingTop:6,paddingHorizontal:25}},K.quantity={inner:c({},G,{backgroundColor:"primarySoft",fontWeight:600,fontSize:16,borderRadius:25,borderWidth:0,padding:5,paddingHorizontal:5,paddingVertical:5,flexWrap:"nowrap",flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center"})},K.toggle=i.StyleSheet.create({inner:c({},G,{flex:1,width:"100%",gap:10,justifyContent:"center",flexDirection:"row",paddingHorizontal:10,paddingVertical:0,alignSelf:"flex-start",flexWrap:"nowrap"})});var X=i.StyleSheet.create({root:{gap:5,flexDirection:"column",flexWrap:"wrap",width:"100%",alignItems:"flex-start"},label:{width:"100%",fontWeight:400,fontSize:12,color:"labelColor"},inner:{width:"100%"}}),_=i.StyleSheet.create({root:{gap:10},label:{width:"100%",fontWeight:500,fontSize:24}});function Q(e){if(!1===e.rendered)return l.jsx(l.Fragment,{});var t=r.ComponentUtils.getDefine(e,e.name,e.position);return r.Utils.isEmpty(t)&&(t=e.default),r.Utils.isEmpty(t)?l.jsx(l.Fragment,{children:t}):l.jsx((function(t){var n=e.tag;return r.Utils.isEmpty(n)?l.jsx(l.Fragment,{children:t.children}):l.jsx(n,c({},t,{children:t.children}))}),c({},e.tagProps,{children:l.jsx(u,c({transient:!0},e,{scope:e.scope,crud:e.crud,part:e.name,children:t}))}))}var J=["type"],Y={List:function(e){return l.jsx(M,c({},e,{type:"list"}))},Row:function(e){return l.jsx(M,c({},e,{type:"row"}))},Value:function(e){return l.jsx(M,c({},e,{type:"value"}))},Label:function(e){return l.jsx(M,c({},e,{type:"label"}))},Repeat:function(e){return l.jsx(M,c({},e,{type:"repeat",props:{search:!1}}))},Define:function(e){return l.jsx(M,c({},e,{type:"define"}))},Include:function(e){return l.jsx(Q,c({},e))},Column:function(e){var t=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,J);return l.jsx(M,c({},t,{type:"column"}))},Input:function(e){return l.jsx(M,c({},e))},Text:function(e){return l.jsx(M,c({},e,{type:"text"}))},Email:function(e){return l.jsx(M,c({},e,{type:"email"}))},Button:function(e){return l.jsx(M,c({},e,{type:"button"}))},Link:function(e){return l.jsx(M,c({},e,{type:"link"}))},Icon:function(e){return l.jsx(M,c({},e,{type:"icon"}))},Output:function(e){return l.jsx(M,c({},e,{type:"output"}))},Form:function(e){return l.jsx(M,c({},e,{type:"form"}))},Crud:function(e){return l.jsx(M,c({},e,{type:"crud"}))},View:function(e){return l.jsx(M,c({},e,{type:"view",transient:!0}))},Bottom:function(e){return l.jsx(M,c({},e,{type:"bottom"}))},Dialog:function(e){return l.jsx(M,c({},e,{type:"dialog"}))},Content:function(e){return l.jsx(M,c({},e,{type:"content"}))},Top:function(e){return l.jsx(M,c({},e,{type:"top"}))},Card:function(e){return l.jsx(M,c({},e,{type:"card"}))},Tab:function(e){return l.jsx(M,c({},e,{type:"tab"}))},Tabs:function(e){return l.jsx(M,c({},e,{type:"tabs"}))},Step:function(e){return l.jsx(M,c({},e,{type:"tab",layout:"step"}))},Stepper:function(e){return l.jsx(M,c({},e,{type:"tabs",layout:"stepper"}))},Money:function(e){return l.jsx(M,c({},e,{type:"money"}))},Chart:function(e){return l.jsx(M,c({},e,{type:"chart"}))},Password:function(e){return l.jsx(M,c({},e,{type:"password"}))},Complete:function(e){return l.jsx(M,c({},e,{type:"complete"}))},Checkbox:function(e){return l.jsx(M,c({},e,{type:"switch"}))},Switch:function(e){return l.jsx(M,c({},e,{type:"switch"}))},Radio:function(e){return l.jsx(M,c({},e,{type:"radio"}))},Select:function(e){return l.jsx(M,c({},e,{type:"select"}))},Toggle:function(e){return l.jsx(M,c({},e,{type:"toggle"}))},Entity:function(e){return l.jsx(M,c({},e,{type:"entity"}))},Element:function(e){return l.jsx(M,c({},e,{type:"element"}))},Quantity:function(e){return l.jsx(M,c({},e,{type:"quantity"}))},SafeView:function(e){var n,a=r.ThemeUtils.getCurrentTheme();return r.Utils.isEmpty(a)&&(a=r.useTheme()),t.useEffect((function(){i.StatusBar.setBarStyle("light-content"),null==i.StatusBar.setBackgroundColor||i.StatusBar.setBackgroundColor(a.colors.primary)}),[]),l.jsxs(s.SafeAreaProvider,{children:[l.jsx(i.StatusBar,{barStyle:"light-content"}),l.jsx(s.SafeAreaView,{style:c({backgroundColor:null==(n=a.colors)?void 0:n.primary},e.viewStyle,{flex:1}),children:l.jsx(i.KeyboardAvoidingView,{behavior:"ios"===i.Platform.OS?"padding":"height",style:{flex:1,justifyContent:"center"},children:l.jsx(i.TouchableWithoutFeedback,{onPress:function(){"web"!==i.Platform.OS&&i.Keyboard.dismiss()},accessible:!1,children:l.jsx(l.Fragment,{children:e.children})})})})]})}};exports.UI=Y;
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("react-crud-utils"),i=require("react-native"),l=require("react/jsx-runtime"),a=e(require("@expo/vector-icons/Ionicons")),o=require("@expo/vector-icons"),s=require("react-native-safe-area-context");function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function u(e){var a=t.useState(r.Utils.nvl(e.scope,r.ScopeUtils.create(e)))[0],o=r.Utils.nvl(e.crud,a.crud),s=r.Utils.nvl(e.validateScope,"global"),p=r.Utils.nvl(e.part,"child");if(a.isInput())return l.jsx(l.Fragment,{});var f,g,h,x,y,m=function(e){var t=e.child;if(!t)return l.jsx(l.Fragment,{});if("string"==typeof t)return l.jsx(l.Fragment,{children:t});var n=t.type,i=c({},t.props);return delete i.children,"string"==typeof n?r.Utils.isEmpty(t.props.children)?l.jsx(n,c({},i)):l.jsx(n,c({},i,{children:l.jsx(u,c({transient:!0,validateScope:s},t.props,{scope:a,crud:o}))})):"function"==typeof n?l.jsx(n,c({validateScope:s},t.props,{parent:a,crud:o})):r.Utils.isEmpty(t.props.children)?l.jsx(l.Fragment,{}):l.jsx(u,c({validateScope:s},t.props,{scope:a,crud:o,transient:!0}))},j=function(){return l.jsx(l.Fragment,e.elements?{children:Object.entries(e.elements).map((function(e,t){return l.jsx(M,c({crud:o},e[1]))}))}:{children:n.Children.map(e.children,(function(e){return l.jsx(m,{child:e})}))})};return e.transient?l.jsx(j,{}):r.Utils.isEmpty(e.children)&&r.Utils.isEmpty(e.elements)?l.jsx(l.Fragment,{}):l.jsx(l.Fragment,{children:l.jsx(i.View,{style:(f=p,h=r.Utils.nvl(f,"root"),x=d[h],y={},r.Utils.isEmpty(e.style)||(null!=(g=e.style)&&g.push?r.Utils.each(e.style,(function(e){e&&(y=c({},y,e))})):y=c({},e.style)),c({},x,y,a.getStyle(f))),children:l.jsx(j,{})})})}var d=i.StyleSheet.create({child:{width:"100%"},inner:{width:"100%"}});function p(e){var i=e.scope,o=t.useState(0),s=o[0],d=o[1],p=i.original,f=i.getItems(),g=0,h=[],x=t.useState(null),y=x[0],m=x[1],j=function(e,t){void 0===t&&(t=!0),e&&i.execute({event:{validate:t,validateScope:p.validateScope,action:function(){i.changeValue(e.data),y=e,d(s=e.index),m(e)}}})},v=function(e){var t,n="ui-tabs-item ui-click";return(null==(t=y)?void 0:t.index)===e.index&&(n+=" ui-tab-selected"),n},b=function(e,t){var n=c({},e.props);t||(t=i.crud.data);var l=r.CrudUtils.create("tabs",{data:t,changed:t,parent:i.crud}),a=r.Utils.resolve(n,l);!1!==a.rendered&&h.push(c({},a,{child:e,element:a,original:n,index:g++,data:t}))};n.Children.map(e.children,(function(e,t){if(r.Utils.isEmpty(f))b(e,{});else for(var n in f)b(e,f[n])})),y||j(h[s],!1);var S=function(e){j(h[s+e])},w="stepper"===p.layout;return l.jsx("div",{className:i.getStyleClass("inner"),style:i.getStyle("inner"),children:l.jsxs("div",{className:"ui-tabs-content",children:[l.jsx("div",{className:"ui-tabs-items",children:h.map((function(e,t){return l.jsxs("div",{className:v(e),onClick:function(){j(e)},children:[w&&l.jsx("div",{className:"ui-tab-item-divisor"}),l.jsxs("div",{className:"ui-tab-item-inner",children:[w&&l.jsx("div",{className:"ui-step-line"}),l.jsx("div",{className:"ui-tab-item-label",children:w?e.index+1:e.label})]})]},r.Utils.key(p.id,"tab",t))}))}),y&&l.jsxs(l.Fragment,{children:[w&&l.jsx("div",{className:"ui-tabs-label",children:y.label}),l.jsx("div",{className:"ui-tabs-area",children:l.jsx(u,c({},e,{scope:i,children:y.child}))}),"stepper"===p.layout&&l.jsxs("div",{className:"ui-tabs-actions",children:[l.jsx(Y.Output,{space:6,layout:"left",children:l.jsx(Y.Include,c({},e,{transient:!0,name:"left",default:l.jsx(Y.Button,{rendered:s>0,icon:l.jsx(a,{}),click:function(){S(-1)}})}))}),l.jsx(Y.Output,{space:6,layout:"right",children:l.jsx(Y.Include,c({},e,{transient:!0,name:"right",default:l.jsx(Y.Button,{rendered:s<h.length-1,icon:l.jsx(a,{}),click:function(){S(1)}})}))})]})]})]})})}function f(e){var t=e.scope;return t.getItems(),r.Utils.asList(t.original.columns),l.jsx("div",{className:"ui-chart-data"})}function g(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:h.link,children:"Clique aqui para acessar o React Native"})})}var h={link:{}};function x(e){return l.jsx(l.Fragment,{children:l.jsx(g,c({},e.defaultsInput,e.defaultsUI))})}function y(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:m.link,children:"Clique aqui para acessar o React Native"})})}var m={link:{}};function j(e){var t=e.scope,n=t.getValue(),i={ion:o.Ionicons,ant:o.AntDesign,entypo:o.Entypo,evil:o.EvilIcons,material:o.MaterialCommunityIcons},a=r.Utils.nvl(t.original.library,"ion");return l.jsx(i[a],{name:n,style:t.getStyle("icon")})}function v(e){var t=e.scope,n=t.original,a=n.color,s=n.label,u=n.icon;a||(a="primaryLight");var d={buttonLabel:{color:"#ffffff",fontWeight:"500",fontSize:16},buttonInner:{flexDirection:"row",alignItems:"center",justifyContent:"center",height:44,minWidth:44},buttonIcon:{color:"#fff",fontSize:18},button:{backgroundColor:a,borderRadius:24,gap:10,justifyContent:"center",alignItems:"center",flexDirection:"row"}},p=function(e,n){var r=c({},d[e],n);return t.getStyle(e,r)},f={};f.button=u?{padding:0,height:40}:{height:50};var g=r.Utils.call((function(){var e=p("button",f.button);if(!e.width){var t=e.height;"number"==typeof t&&(e.minWidth=t)}return e}));return l.jsx(i.TouchableHighlight,{underlayColor:"transparent",onPress:function(e){t.call("click",{})},style:g,children:l.jsxs(l.Fragment,{children:[u&&l.jsx(l.Fragment,{children:l.jsx(o.Ionicons,{size:30,style:p("buttonIcon",f.icon),name:u})}),s&&l.jsx(i.Text,{style:p("buttonLabel"),children:s})]})})}function b(e){var n=t.useState(!1),a=n[0],s=n[1],u=e.scope,d=r.Utils.nvl(u.getOptions(),[]),p=u.attr("placeholder","Selecione..."),f=u.getDisplayValue(),g=r.useTheme(),h=r.ViewUtils.getCrud("view"),x=function(){var e=!a;h.data.selectIsOpen=e,s(e)},y=function(e,t){return c({},S[e],u.getStyle(e),t)};return l.jsxs(i.View,{style:y("selectRoot"),children:[l.jsxs(i.TouchableOpacity,{onPress:x,style:y("selectInput"),children:[l.jsx(i.Text,{style:y("selectLabel"),children:r.Utils.nvl(f,p)}),l.jsx(o.Ionicons,{name:"arrow-down",size:20,color:"#888"})]}),l.jsxs(i.Modal,{animationType:"slide",transparent:!0,visible:a,onRequestClose:function(){return s(!1)},children:[l.jsx(i.StatusBar,{barStyle:"dark-content",backgroundColor:g.colors.primary}),l.jsxs(i.SafeAreaView,{style:y("modalSafe"),children:[l.jsxs(i.View,{style:y("modalHeader"),children:[l.jsx(i.TouchableOpacity,{onPress:function(){return s(!1)},style:y("modalCloseButton"),children:l.jsx(i.Text,{style:y("modalCloseText"),children:"X"})}),l.jsx(i.Text,{style:y("modalTitle"),children:p})]}),l.jsx(i.View,{style:y("modalContent"),children:l.jsx(Y.List,{data:d,name:u.getName("list"),click:function(e){u.changeValue(e.value),x()},children:l.jsx(Y.Value,{value:"#{@this.label}"})})})]})]})]})}var S=i.StyleSheet.create({selectRoot:{justifyContent:"flex-start",alignItems:"flex-start",flex:1},selectInput:{width:"100%",flexDirection:"row",borderRadius:20,paddingHorizontal:15,paddingVertical:10},selectLabel:{flex:1},modalSafe:{flex:1,backgroundColor:"#f5f5f5",paddingTop:i.StatusBar.currentHeight||0},modalHeader:{flexDirection:"row",alignItems:"center",padding:15,backgroundColor:"#6200ea"},modalCloseButton:{padding:10},modalCloseText:{fontSize:18,color:"white"},modalTitle:{fontSize:18,color:"white",fontWeight:"bold",marginLeft:10},modalContent:{flex:1,width:"100%",alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",padding:20}});function w(e){var n=e.scope,a=r.Utils.nvl(n.getValue(),!1),o=t.useState(a),s=o[1];return l.jsx(i.Switch,{value:o[0],style:n.getStyle("element"),onValueChange:function(e){n.changeValue(e),s(e)}})}function C(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:T.link,children:"Clique aqui para acessar o React Native"})})}var T={link:{}};function I(e){return l.jsx(i.TouchableOpacity,{onPress:function(){i.Linking.openURL("https://reactnative.dev/")},children:l.jsx(i.Text,{style:U.link,children:"Clique aqui para acessar o React Native"})})}var U={link:{}};function k(e){var n=e.scope,a=r.Utils.nvl(n.getValue(),""),s=n.getLabel(),u=n.getPart("placeholder",null,s),d=n.original,p=t.useState(a),f=p[0],g=p[1];return l.jsxs(l.Fragment,{children:[n.getPart("left"),l.jsx(i.TextInput,{style:c({},n.getStyle("input",V.input),void 0),onChangeText:function(e){n.changeValue(e),g(e)},value:f,placeholder:u}),d.icon&&l.jsx(o.Ionicons,{name:d.icon,size:n.attr("iconSize",20),color:n.attr("iconColor","#888")}),n.getPart("right")]})}var V=i.StyleSheet.create({base:{flexDirection:"row",alignItems:"center",borderWidth:1,borderColor:"borderColor",borderRadius:20,paddingHorizontal:10,paddingVertical:5,padding:10,paddingLeft:5,paddingRight:10},icon:{marginRight:10},input:{marginHorizontal:0,marginVertical:0,height:40,flex:1}});function B(e){var n,a=e.scope,o=e.index,s=a.original,d=e.item,p=a.getPart("cols",void 0,1),f=Math.floor(100/p)+"%",g=null==(n={repeat:P,list:D})?void 0:n[s.type],h=""+a.key("row",o,""),x=t.useState(r.ScopeUtils.create(c({},s,{parent:a,name:h,crud:a.crud,index:o,type:"row",data:d})))[0],y=t.useRef(null),m=function(e,n){var r=t.useState(!0===n.visible),l=r[0],a=r[1];return t.useEffect((function(){var t=setInterval((function(){var t;if(e.current&&!l&&null!=(t=n.original)&&t.useIsInView)if("web"===i.Platform.OS){var r=null==e.current.getBoundingClientRect?void 0:e.current.getBoundingClientRect();if(r&&"undefined"!=typeof window){var o=window.innerHeight,s=r.top<o&&r.bottom>0;s&&(n.visible=s),a(s)}}else null==e.current.measureInWindow||e.current.measureInWindow((function(e,t,r,l){var o=t<i.Dimensions.get("window").height&&t+l>0;o&&(n.visible=o),a(o)}))}),300);return function(){return clearInterval(t)}}),[e]),l}(y,x),j=function(){return l.jsx(l.Fragment,!m&&s.useIsInView&&!x.visible&&o>20?{}:{children:l.jsx(u,{scope:x,crud:x.crud,children:e.children})})};return l.jsx((function(){var e=t.useState(0),n=e[0],r=e[1],u=a.key("item"),h=function(){var e=x.getStyle("row",c({},g.row,{minHeight:40}));return p>0&&(e.width=f),e};return x.update=function(){a.updateIndex=a.updateIndex+1,r(++n)},s.click?l.jsx(i.TouchableHighlight,{style:h(),underlayColor:"transparent",ref:y,onPress:function(e){e.stopPropagation(),function(e){x.call("click",{value:e,item:e,edit:!0,index:o})}(d)},children:l.jsx(j,{})},u):l.jsx(i.View,{style:h(),ref:y,children:l.jsx(j,{})},u)}),{})}var D=i.StyleSheet.create({row:{padding:5,margin:0,width:"100%",backgroundColor:"#f5f5f5",gap:10,borderRadius:8,justifyContent:"center"}}),P=i.StyleSheet.create({row:{padding:0,width:"100%",justifyContent:"center"}});function F(e){var n,a=e.scope,s=a.crud,u=a.original,d=r.Utils.nvl(a.getPart("cols",void 0,1)),p=r.Utils.nvl(a.getItems(),[]),f=null==(n={repeat:L,list:R})?void 0:n[u.type],g=r.ComponentUtils.getDefine(e,"add"),h=u.hideAddWhenEmpty,x=t.useState(0),y=x[0],m=x[1];a.update=function(){a.updateIndex=++y,m(y)};var j,v,b=function(){if(!r.Utils.isEmpty(p))return l.jsx(l.Fragment,{});var e=a.attr("empty","Sem registro");return e?"string"==typeof e?l.jsx(i.Text,{style:a.getStyle("empty",{flex:1,fontWeight:500,fontSize:20,padding:10,textAlign:"center",justifyContent:"center",alignItems:"center"}),children:e}):l.jsx(l.Fragment,{children:e}):l.jsx(l.Fragment,{})},S=a.key("data");return l.jsxs(l.Fragment,{children:[!1!==u.search&&l.jsx(Y.Text,{placeholder:"Pesquisar...",field:"query",crud:s,right:l.jsx(o.Ionicons,{name:"search",size:20,color:"#888"})}),l.jsxs(i.View,{style:(j={},v=a.getStyle("container",c({},j,f.container)),d>1&&(v=c({},v,{flexDirection:"row",flexWrap:"wrap"})),v),children:[l.jsx(b,{}),p.map((function(t,n){return l.jsx(B,{index:n,item:t,scope:a,children:e.children})})),(!r.Utils.isEmpty(p)||!0!==h)&&l.jsx(l.Fragment,{children:g})]},S)]})}var R=i.StyleSheet.create({container:{flex:1,width:"100%",flexDirection:"row",flexWrap:"wrap",alignItems:"stretch",gap:10},text:{fontSize:18,fontWeight:"bold"}}),L=i.StyleSheet.create({container:{flex:1,width:"100%",flexDirection:"row",flexWrap:"wrap",gap:10,alignItems:"stretch"},text:{fontSize:18,fontWeight:"bold"}});function z(e){var n=e.scope,a=r.Utils.nvl(n.getOptions(),[]),o=n.getInputValue(),s=t.useState(0),u=s[0],d=s[1],p=function(e){return(null==e?void 0:e.value)===o},f=function(t){var a=t.item,o=t.index,s=p(a),u=c({},E.text);return s&&(u.color="#ffffff"),r.Utils.isEmpty(e.children)?l.jsx(i.Text,{style:u,children:a.label}):l.jsx(B,{scope:n,item:a.object,index:o,children:e.children})},g=function(e){var t=c({},E.item,n.getStyle("item")),r=Math.floor(100/a.length)+"%";if(p(e)){var i=n.getPart("selectedColor",void 0,"primary");(t=c({},t,n.getStyle("selected",{backgroundColor:i,color:"#ffffff"}))).color||(t.color="#ffffff")}return t.width=r,t};return l.jsx(l.Fragment,{children:a.map((function(e,t){return l.jsx(i.TouchableHighlight,{style:g(e),onPress:function(t){!function(e){n.changeValue(e.object),d(++u)}(e)},children:l.jsx(f,{item:e,index:t})},"k-"+t)}))})}var E=i.StyleSheet.create({container:{flex:1,width:"100%",gap:10,justifyContent:"center",flexDirection:"row"},item:{padding:15,marginVertical:8,backgroundColor:"#f5f5f5",borderRadius:8,justifyContent:"center",width:"auto",flexDirection:"row"},text:{fontSize:16,fontWeight:"500"}});function W(e){var n=e.scope,a=n.original,s=t.useState(0),u=s[0],d=s[1],p=n.getValue(0),f=a.color;f||(f="primary");var g={padding:10,alignItems:"center",height:44,width:44,textAlign:"center",verticalAling:"middle",borderRadius:24,backgroundColor:f,color:"#ffffff",justifyContent:"center"},h={buttonLabel:{color:"#ffffff",fontWeight:"500",fontSize:16},value:{flex:1,flexDirection:"row",textAlign:"center"},buttonInner:{flexDirection:"row",alignItems:"center",justifyContent:"center"},buttonIcon:{color:"#fff",fontSize:18},button:g,addButton:c({},g),delButton:c({},g)},x=function(e){n.changeValue(p+e),d(++u)},y=function(e,t){var r=c({},h[e],t);return n.getStyle(e,r)};return l.jsxs(l.Fragment,{children:[l.jsx(i.TouchableHighlight,{underlayColor:"transparent",onPress:function(){x(-1)},style:y("delButton"),children:l.jsx(o.Ionicons,{size:30,style:y("buttonIcon"),name:"remove"})}),l.jsx(i.Text,{style:y("value"),children:r.Utils.nvl(p,0)}),l.jsx(i.TouchableHighlight,{underlayColor:"transparent",onPress:function(){x(1)},style:y("addButton"),children:l.jsx(o.Ionicons,{size:30,style:y("buttonIcon"),name:"add"})})]})}function q(e){var n,a,o=t.useState(!1),s=o[0],d=o[1],p=t.useState(0),f=p[0],g=p[1],h=r.ViewUtils.getCrud("view"),x=e.scope,y=x.getLabel(),m=r.useTheme(),j=r.Utils.nvl(null==(n=m.styles)||null==(n=n.defaults)?void 0:n.header,{}),v=function(e,t){var n=c({},O[e],t);return c({},x.getStyle(e,n))},b=function(){x.close({scope:x,crud:x.currentDialog,event:{}})},S=function(e){d(s=e)};x.update=function(){g(++f)},x.dialogShow=function(e){var t=e.crud,n=x.getName("modal"),i=!0===e.edit,l={},a=null;t.is("row")?(l.parent=t.parent.parent,l.search=t.parent,a=t.data):t.is("search")&&(l.parent=t.parent,l.search=t);var o=r.Utils.nvl(e.item,a,{}),s=r.CrudUtils.create("dialog",c({parent:t,root:t,name:n,dialog:h.dialog,data:o,edit:i,scope:x},l));h.dialog=s,x.currentDialog=s,S(!0),x.update()},x.dialogHide=function(e){var t;h.dialog=r.Utils.nvl(x.currentDialog.dialog,null),x.currentDialog=null,S(!1),null!=(t=h.dialog)&&t.scope&&h.dialog.scope.update(),x.update()},t.useEffect((function(){i.StatusBar.setBarStyle("light-content"),null==i.StatusBar.setBackgroundColor||i.StatusBar.setBackgroundColor(m.colors.primary)}),[s]);var w=x.currentDialog;if(!w)return l.jsx(l.Fragment,{});if(w.uuid!==(null==(a=h.dialog)?void 0:a.uuid))return l.jsx(l.Fragment,{});var C=r.ComponentUtils.getDefine(e,"header","right");return l.jsx(i.Modal,{animationType:"slide",transparent:!0,visible:s,onRequestClose:b,children:l.jsxs(i.SafeAreaView,{style:v("modalSafe"),children:[l.jsxs(i.View,{style:x.getStyle("header",j),children:[l.jsx(i.TouchableOpacity,{onPress:b,style:v("modalCloseButton"),children:l.jsx(i.Text,{style:v("modalCloseText"),children:"X"})}),l.jsx(i.Text,{style:v("modalTitle"),children:y}),!r.Utils.isEmpty(C)&&l.jsx(u,{scope:x,crud:x.currentDialog,transient:!0,children:C})]}),l.jsx(i.ScrollView,{contentContainerStyle:{flexGrow:1},style:v("modalContent"),children:l.jsx(i.View,{style:{flex:1},children:l.jsx(u,{scope:x,crud:x.currentDialog,children:e.children})})})]})})}var O=i.StyleSheet.create({modalSafe:{flex:1,backgroundColor:"primary",width:"100%"},modalCloseButton:{padding:10},modalCloseText:{fontSize:18,color:"white"},modalTitle:{fontSize:18,color:"white",fontWeight:"bold",marginLeft:10},modalContent:{flex:1,backgroundColor:"#f5f5f5",padding:20}});function H(e){var n,a=e.scope,o=e.children,s=r.useTheme(),c=a.getPart("header",null,[]),d=r.Utils.nvl(null==(n=s.styles)||null==(n=n.defaults)?void 0:n.header,{});t.useEffect((function(){i.StatusBar.setBarStyle("light-content"),null==i.StatusBar.setBackgroundColor||i.StatusBar.setBackgroundColor(s.colors.primary)}),[]);var p=!r.Utils.isEmpty(c);return l.jsxs(l.Fragment,{children:[p&&l.jsx(i.View,{style:a.getStyle("header",d),children:c}),l.jsx(i.View,{style:a.getStyle("container",N.container),children:l.jsx(i.ScrollView,{onScroll:function(){var e=r.ViewUtils.getCrud();r.Utils.each(e.scroll,(function(e){e.onScroll&&e.onScroll.call(e)}))},scrollEventThrottle:16,keyboardShouldPersistTaps:"handled",contentContainerStyle:a.getStyle("contentContainer",{}),style:a.getStyle("scroll",N.scroll),children:l.jsx(u,{scope:a,children:o})})})]})}var N=i.StyleSheet.create({scroll:{padding:10},container:{backgroundColor:"primary"},view:{backgroundColor:"primary"}}),A=t.createContext({});function M(e){var n,a,s=t.useContext(A),d=r.Utils.nvl(e.theme,null==s?void 0:s.theme),g=r.Utils.nvl(e.crud,null==s?void 0:s.crud),h=t.useState(r.ScopeUtils.create(c({crud:g},e,{theme:d})))[0],m=t.useState(0),S=m[0],T=m[1],U=t.useState(null),V=U[0],B=U[1];g=h.crud;var D=h.getOptions(),P=h.original,R=t.useRef(null);h.update=function(){T(++S)},h.updateElement=function(){T(++S)},h.prompt=function(e){var t=e.event;if(t){var n="Você tem certeza que deseja continuar?",l="Atenção",a=t.prompt;"string"==typeof a&&(n=a),"object"==typeof a&&(n=r.Utils.nvl(a.message,n),l=r.Utils.nvl(a.title,l)),i.Alert.alert(l,n,[{text:"Cancelar",style:"cancel"},{text:"Confirmar",onPress:function(){return h.execute(e)}}],{cancelable:!1})}};var L=function(){var e=P.custom;return e?l.jsx(M,"string"==typeof e?{element:{value:e,type:"dummy"},crud:g}:c({type:e.type,tag:e.type},e.props,{crud:g})):l.jsx(l.Fragment,{})};if(h.is("type","dummy"))return l.jsx(l.Fragment,{children:h.getDisplayValue()});var E=function(e){var t=e.target.value;h.isType("integer","int","number")?t=parseInt(t):h.isType("decimal")&&(t=parseFloat(t)),h.isType("select","complete")&&(t=h.getSelectedItem(t)),h.changeValue(t),h.update()},O=function(e){h.call("click")},N={scope:h,crud:g,onChange:E};h.isType("password")&&(N.type="password");var G=function(){return!(h.isInput()||r.Utils.isEmpty(e.children)&&r.Utils.isEmpty(e.elements))},Q=h.is("type","text","number","phone","postalCode","money","password","email"),J=function(e){var t,n=r.Utils.nvl(P.type,"none"),i=r.Utils.nvl(e,"root"),l=c({},X[i]),a=G();return e||a||(l=c({},l)),h.isInput()&&(l=c({},l,K.input[i])),l=c({},l,null==K||null==(t=K[n])?void 0:t[i]),a&&e&&(l=c({},l,_[e])),c({},l,h.getStyle(e,l))},Y=J("element"),Z={required:h.isRequired(),size:"small",scope:h,crud:g,style:Y,placeholder:h.attr("placeholder","Digite aqui")};h.error=function(e){V=e,B(e)},null!=(n=P.list)&&n.url||null!=(a=P.load)&&a.url||h.start(),t.useEffect((function(){h.start()}));var $=function(){return"string"==typeof P.icon?l.jsx(o.Ionicons,{name:P.icon,style:h.getStyle("icon")}):l.jsx(l.Fragment,{children:P.icon})};if(h.open=function(e){i.Linking.openURL(e.url)},t.useLayoutEffect((function(){if(null!=R&&R.current&&h.is("type","card","list","tabs","stepper")){var e=null==R?void 0:R.current;if(null!=e&&e.classList){var t=r.HtmlUtils.getBGColor(e);e.classList.add("rgb(255, 255, 255)"===t?"ui-dark":"ui-light")}}})),!h.isRendered()||h.is("type","define"))return l.jsx(l.Fragment,{});var ee=i.View,te={};return!h.isType("input","grid","list","repeat")&&P.click&&(ee=i.TouchableHighlight,te.underlayColor="transparent",te.onPress=O),l.jsx(A.Provider,{value:{crud:g,theme:d},children:l.jsx(ee,c({ref:R,style:J()},te,{children:l.jsxs(l.Fragment,{children:[void 0!==P.label&&!1!==P.label&&!h.isType("button","dialog","modal")&&l.jsx(i.Text,{style:J("label"),children:h.getLabel()}),!G()&&l.jsxs(l.Fragment,{children:[l.jsxs(i.View,{style:J("inner"),children:[h.is("type","button")&&l.jsxs(v,c({},Z,{onClick:O,variant:h.attr("variant","outlined"),children:[P.icon&&l.jsx($,{}),P.label&&l.jsx(i.Text,{style:h.getPart("label","button"),children:h.getLabel()})]})),h.is("type","icon")&&l.jsx(j,c({},Z,{onClick:O,variant:h.attr("variant","outlined"),children:h.getDisplayValue()})),h.is("type","link")&&l.jsxs(y,c({},Z,{onClick:O,variant:h.attr("variant","outlined"),children:[P.icon&&l.jsx($,{}),P.label&&l.jsx(i.Text,{style:h.getPart("label","link"),children:h.getLabel()})]})),Q&&l.jsx(k,c({},N,Z,{InputProps:c({},P.inputProps)})),h.is("type","complete","autocomplete")&&l.jsx(x,{scope:h,defaultsInput:N,defaultsUI:Z}),h.is("type","quantity")&&l.jsx(W,{scope:h,defaultsInput:N,defaultsUI:Z}),h.is("type","checkbox","boolean","switch")&&l.jsx(w,c({checked:!0===h.getValue()},N,{onChange:function(){var e=h.getValue();E({target:{value:!(!0===e)}})}})),h.is("type","select")&&l.jsx(b,c({},N,Z,{value:h.getSelectedValue()})),h.is("type","toggle")&&l.jsx(z,c({},N,Z,{value:h.getSelectedValue()})),h.is("type","radio")&&l.jsx(I,c({},N,Z,{row:!0,children:D.map((function(e,t){return l.jsx(C,{control:l.jsx(I,c({},Z)),label:e.label,value:e.value},"i"+t)}))})),h.is("type","custom")&&l.jsx(L,{}),h.is("type","column")&&l.jsxs(l.Fragment,{children:[h.is("format","img")&&l.jsx(i.Image,{source:h.getDisplayValue()}),h.is("format","icon")&&l.jsx(j,{scope:h,crud:g}),!h.is("format","icon","img")&&l.jsx(i.Text,{children:h.getDisplayValue()})]}),h.is("type","output","value")&&l.jsx(i.Text,{style:J("value"),children:h.getDisplayValue()})]}),V&&l.jsx(i.View,{style:J("error"),children:V})]}),h.isType("list","repeat")&&l.jsx(F,c({},e,{scope:h,crud:g})),h.isType("dialog")&&l.jsx(q,c({},e,{scope:h,crud:g})),h.isType("chart")&&l.jsx(f,c({},e,{scope:h,crud:g})),h.isType("tabs")&&l.jsx(p,c({},e,{scope:h,crud:g})),h.isType("view")&&l.jsx(H,c({},e,{scope:h,crud:g})),!h.isType("tabs","view","grid","list","define","repeat","modal","dialog","chart")&&l.jsx(u,c({},e,{scope:h,crud:g,style:J("inner")}))]})}))})}var G={backgroundColor:"white",padding:16,borderRadius:10,width:"100%",shadowColor:"#888",shadowOffset:{width:0,height:1},shadowOpacity:.25,shadowRadius:3.84,elevation:3},K={view:{inner:{width:"100%",alignItems:"normal",flex:1},container:{width:"100%",backgroundColor:"#f5f5f5",flex:1,gap:10},child:{width:"100%",flex:1,gap:10,padding:10},root:{width:"100%",flex:1,alignItems:"normal",padding:0}}};K.card=i.StyleSheet.create({root:c({},G),inner:{flex:1,width:"100%",paddingBottom:10,paddingTop:5,alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",gap:10}}),K.input=i.StyleSheet.create({label:{paddingLeft:8},inner:{flex:1,width:"100%",paddingBottom:0,paddingTop:0,alignItems:"center",borderWidth:1,borderColor:"borderColor",borderRadius:20,paddingHorizontal:15,alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap"}}),K.switch={inner:{paddingBottom:6,paddingTop:6,paddingHorizontal:25}},K.quantity={inner:c({},G,{backgroundColor:"primarySoft",fontWeight:600,fontSize:16,borderRadius:25,borderWidth:0,padding:5,paddingHorizontal:5,paddingVertical:5,flexWrap:"nowrap",flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center"})},K.toggle=i.StyleSheet.create({inner:c({},G,{flex:1,width:"100%",gap:10,justifyContent:"center",flexDirection:"row",paddingHorizontal:10,paddingVertical:0,alignSelf:"flex-start",flexWrap:"nowrap"})});var X=i.StyleSheet.create({root:{gap:5,flexDirection:"column",flexWrap:"wrap",width:"100%",alignItems:"flex-start"},label:{width:"100%",fontWeight:400,fontSize:12,color:"labelColor"},inner:{width:"100%"}}),_=i.StyleSheet.create({root:{gap:10},label:{width:"100%",fontWeight:500,fontSize:24}});function Q(e){if(!1===e.rendered)return l.jsx(l.Fragment,{});var t=r.ComponentUtils.getDefine(e,e.name,e.position);return r.Utils.isEmpty(t)&&(t=e.default),r.Utils.isEmpty(t)?l.jsx(l.Fragment,{children:t}):l.jsx((function(t){var n=e.tag;return r.Utils.isEmpty(n)?l.jsx(l.Fragment,{children:t.children}):l.jsx(n,c({},t,{children:t.children}))}),c({},e.tagProps,{children:l.jsx(u,c({transient:!0},e,{scope:e.scope,crud:e.crud,part:e.name,children:t}))}))}var J=["type"],Y={List:function(e){return l.jsx(M,c({},e,{type:"list"}))},Row:function(e){return l.jsx(M,c({},e,{type:"row"}))},Value:function(e){return l.jsx(M,c({},e,{type:"value"}))},Label:function(e){return l.jsx(M,c({},e,{type:"label"}))},Repeat:function(e){return l.jsx(M,c({},e,{type:"repeat",props:{search:!1}}))},Define:function(e){return l.jsx(M,c({},e,{type:"define"}))},Include:function(e){return l.jsx(Q,c({},e))},Column:function(e){var t=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,J);return l.jsx(M,c({},t,{type:"column"}))},Input:function(e){return l.jsx(M,c({},e))},Text:function(e){return l.jsx(M,c({},e,{type:"text"}))},Email:function(e){return l.jsx(M,c({},e,{type:"email"}))},Button:function(e){return l.jsx(M,c({},e,{type:"button"}))},Link:function(e){return l.jsx(M,c({},e,{type:"link"}))},Icon:function(e){return l.jsx(M,c({},e,{type:"icon"}))},Output:function(e){return l.jsx(M,c({},e,{type:"output"}))},Form:function(e){return l.jsx(M,c({},e,{type:"form"}))},Crud:function(e){return l.jsx(M,c({},e,{type:"crud"}))},View:function(e){return l.jsx(M,c({},e,{type:"view",transient:!0}))},Bottom:function(e){return l.jsx(M,c({},e,{type:"bottom"}))},Dialog:function(e){return l.jsx(M,c({},e,{type:"dialog"}))},Content:function(e){return l.jsx(M,c({},e,{type:"content"}))},Top:function(e){return l.jsx(M,c({},e,{type:"top"}))},Card:function(e){return l.jsx(M,c({},e,{type:"card"}))},Tab:function(e){return l.jsx(M,c({},e,{type:"tab"}))},Tabs:function(e){return l.jsx(M,c({},e,{type:"tabs"}))},Step:function(e){return l.jsx(M,c({},e,{type:"tab",layout:"step"}))},Stepper:function(e){return l.jsx(M,c({},e,{type:"tabs",layout:"stepper"}))},Money:function(e){return l.jsx(M,c({},e,{type:"money"}))},Chart:function(e){return l.jsx(M,c({},e,{type:"chart"}))},Password:function(e){return l.jsx(M,c({},e,{type:"password"}))},Complete:function(e){return l.jsx(M,c({},e,{type:"complete"}))},Checkbox:function(e){return l.jsx(M,c({},e,{type:"switch"}))},Switch:function(e){return l.jsx(M,c({},e,{type:"switch"}))},Radio:function(e){return l.jsx(M,c({},e,{type:"radio"}))},Select:function(e){return l.jsx(M,c({},e,{type:"select"}))},Toggle:function(e){return l.jsx(M,c({},e,{type:"toggle"}))},Entity:function(e){return l.jsx(M,c({},e,{type:"entity"}))},Element:function(e){return l.jsx(M,c({},e,{type:"element"}))},Quantity:function(e){return l.jsx(M,c({},e,{type:"quantity"}))},SafeView:function(e){var n,a=r.ThemeUtils.getCurrentTheme();return r.Utils.isEmpty(a)&&(a=r.useTheme()),t.useEffect((function(){i.StatusBar.setBarStyle("light-content"),null==i.StatusBar.setBackgroundColor||i.StatusBar.setBackgroundColor(a.colors.primary)}),[]),l.jsxs(s.SafeAreaProvider,{children:[l.jsx(i.StatusBar,{barStyle:"light-content"}),l.jsx(s.SafeAreaView,{style:c({backgroundColor:null==(n=a.colors)?void 0:n.primary},e.viewStyle,{flex:1}),children:l.jsx(i.KeyboardAvoidingView,{behavior:"ios"===i.Platform.OS?"padding":"height",style:{flex:1,justifyContent:"center"},children:l.jsx(i.TouchableWithoutFeedback,{onPress:function(){"web"!==i.Platform.OS&&i.Keyboard.dismiss()},accessible:!1,children:l.jsx(l.Fragment,{children:e.children})})})})]})}};exports.UI=Y;
|
|
2
2
|
//# sourceMappingURL=react-crud-mobile.cjs.production.min.js.map
|