Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-querybuilder/native

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/native - npm Package Compare versions

Comparing version 7.4.4 to 7.5.0

15

dist/cjs/react-querybuilder_native.cjs.development.d.ts

@@ -148,3 +148,4 @@ import * as react from 'react';

flexDirection: "row";
paddingBottom: number;
gap: number;
alignItems: "center";
};

@@ -156,14 +157,12 @@ ruleGroup: {

borderWidth: number;
marginBottom: number;
padding: number;
gap: number;
};
ruleGroupBody: {
paddingTop: number;
paddingRight: number;
paddingLeft: number;
gap: number;
};
ruleGroupHeader: {
flexDirection: "row";
paddingTop: number;
paddingRight: number;
paddingLeft: number;
gap: number;
alignItems: "center";
};

@@ -170,0 +169,0 @@ shiftActions: {

@@ -95,3 +95,3 @@ "use strict";

operatorSelector: defaultNativeSelectStyles.selector,
rule: { flexDirection: "row", paddingBottom: 10 },
rule: { flexDirection: "row", gap: 10, alignItems: "center" },
ruleGroup: {

@@ -102,10 +102,10 @@ backgroundColor: "rgba(0, 75, 183, 0.2)",

borderWidth: 1,
marginBottom: 10
padding: 10,
gap: 10
},
ruleGroupBody: { paddingTop: 10, paddingRight: 10, paddingLeft: 10 },
ruleGroupBody: { gap: 10 },
ruleGroupHeader: {
flexDirection: "row",
paddingTop: 10,
paddingRight: 10,
paddingLeft: 10
gap: 10,
alignItems: "center"
},

@@ -112,0 +112,0 @@ shiftActions: { flexDirection: "column" },

@@ -148,3 +148,4 @@ import * as react from 'react';

flexDirection: "row";
paddingBottom: number;
gap: number;
alignItems: "center";
};

@@ -156,14 +157,12 @@ ruleGroup: {

borderWidth: number;
marginBottom: number;
padding: number;
gap: number;
};
ruleGroupBody: {
paddingTop: number;
paddingRight: number;
paddingLeft: number;
gap: number;
};
ruleGroupHeader: {
flexDirection: "row";
paddingTop: number;
paddingRight: number;
paddingLeft: number;
gap: number;
alignItems: "center";
};

@@ -170,0 +169,0 @@ shiftActions: {

@@ -1,2 +0,2 @@

"use strict";var Fe=Object.create;var D=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var Ve=(t,o)=>{for(var e in o)D(t,e,{get:o[e],enumerable:!0})},ie=(t,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Pe(o))!Be.call(t,s)&&s!==e&&D(t,s,{get:()=>o[s],enumerable:!(i=Oe(o,s))||i.enumerable});return t};var y=(t,o,e)=>(e=t!=null?Fe(we(t)):{},ie(o||!t||!t.__esModule?D(e,"default",{value:t,enumerable:!0}):e,t)),Ee=t=>ie(D({},"__esModule",{value:!0}),t);var qe={};Ve(qe,{NativeActionElement:()=>d,NativeInlineCombinator:()=>U,NativeNotToggle:()=>$,NativeShiftActions:()=>z,NativeValueEditor:()=>V,NativeValueEditorWeb:()=>J,NativeValueSelector:()=>m,NativeValueSelectorWeb:()=>N,QueryBuilderNative:()=>Le,RuleGroupNative:()=>X,RuleNative:()=>Z,defaultNativeControlElements:()=>H,defaultNativeSelectStyles:()=>p,defaultNativeStyles:()=>r,defaultNativeWebControlElements:()=>Qe});module.exports=Ee(qe);var se=y(require("react")),ue=require("react-native"),d=({handleOnClick:t,label:o,disabled:e,disabledTranslation:i,testID:s})=>se.createElement(ue.Button,{testID:s,disabled:e&&!i,title:`${i&&e?i.label??"":o??""}`,onPress:n=>t()});var _=y(require("react")),ae=require("react"),I=require("react-native"),K=require("react-querybuilder");var ne=require("react-native"),p={selector:{borderWidth:1,height:32,width:100},option:{}},Ae={combinatorOption:p.option,combinatorSelector:p.selector,dragHandle:{},fieldOption:p.option,fieldSelector:p.selector,inlineCombinator:{},notToggle:{flexDirection:"row"},notToggleLabel:{},notToggleSwitch:{},operatorOption:p.option,operatorSelector:p.selector,rule:{flexDirection:"row",paddingBottom:10},ruleGroup:{backgroundColor:"rgba(0, 75, 183, 0.2)",borderColor:"#8081a2",borderRadius:4,borderWidth:1,marginBottom:10},ruleGroupBody:{paddingTop:10,paddingRight:10,paddingLeft:10},ruleGroupHeader:{flexDirection:"row",paddingTop:10,paddingRight:10,paddingLeft:10},shiftActions:{flexDirection:"column"},value:{borderWidth:1,height:32,width:150},valueEditorOption:p.option,valueEditorSelector:p.selector,valueEditorSwitch:{},valueList:{flexDirection:"row"},valueSourceOption:p.option,valueSourceSelector:p.selector},r=ne.StyleSheet.create(Ae);var U=({component:t,path:o,...e})=>{let i=(0,ae.useMemo)(()=>({inlineCombinator:I.StyleSheet.flatten([r.inlineCombinator,e.schema.styles?.inlineCombinator])}),[e.schema.styles?.inlineCombinator]);return _.createElement(I.View,{style:i.inlineCombinator,key:"no-dnd",testID:K.TestID.inlineCombinator},_.createElement(t,{...e,path:o,testID:K.TestID.combinators}))};var L=y(require("react")),pe=require("react"),f=require("react-native");var $=({handleOnChange:t,label:o,checked:e,disabled:i,schema:s,testID:n})=>{let l=(0,pe.useMemo)(()=>({notToggle:f.StyleSheet.flatten([r.notToggle,s.styles?.notToggle]),notToggleLabel:f.StyleSheet.flatten([r.notToggleLabel,s.styles?.notToggleLabel]),notToggleSwitch:f.StyleSheet.flatten([r.notToggleSwitch,s.styles?.notToggleSwitch])}),[s.styles?.notToggle,s.styles?.notToggleLabel,s.styles?.notToggleSwitch]);return L.createElement(f.View,{style:l.notToggle,testID:n},L.createElement(f.Text,{style:l.notToggleLabel},o),L.createElement(f.Switch,{style:l.notToggleSwitch,disabled:i,value:e,onValueChange:u=>t(u)}))};var T=y(require("react")),C=require("react-native");var z=({shiftUp:t,shiftDown:o,shiftUpDisabled:e,shiftDownDisabled:i,disabled:s,labels:n,testID:l,schema:{styles:u}})=>{let R=T.useMemo(()=>({shiftActions:C.StyleSheet.flatten([r.shiftActions,u?.shiftActions])}),[u?.shiftActions]);return T.createElement(C.View,{testID:l,style:R.shiftActions},T.createElement(C.Button,{disabled:s||e,onPress:t,accessibilityLabel:n?.shiftUp,title:n?.shiftUp}),T.createElement(C.Button,{disabled:s||i,onPress:o,accessibilityLabel:n?.shiftDown,title:n?.shiftDown}))};var b=y(require("react")),ye=require("react"),c=require("react-native"),F=require("react-querybuilder");var me=y(require("react")),ce=require("react"),a=require("react-native"),v=require("react-querybuilder");var m=({handleOnChange:t,options:o,value:e,disabled:i,multiple:s,listsAsArrays:n,schema:l,testID:u})=>{let R=(0,ce.useMemo)(()=>u===v.TestID.combinators?{selector:a.StyleSheet.flatten([r.combinatorSelector,l.styles?.combinatorSelector]),option:a.StyleSheet.flatten([r.combinatorOption,l.styles?.combinatorOption])}:u===v.TestID.fields?{selector:a.StyleSheet.flatten([r.fieldSelector,l.styles?.fieldSelector]),option:a.StyleSheet.flatten([r.fieldOption,l.styles?.fieldOption])}:u===v.TestID.operators?{selector:a.StyleSheet.flatten([r.operatorSelector,l.styles?.operatorSelector]),option:a.StyleSheet.flatten([r.operatorOption,l.styles?.operatorOption])}:u===v.TestID.valueSourceSelector?{selector:a.StyleSheet.flatten([r.valueSourceSelector,l.styles?.valueSourceSelector]),option:a.StyleSheet.flatten([r.valueSourceOption,l.styles?.valueSourceOption])}:u===v.TestID.valueEditor?{selector:a.StyleSheet.flatten([r.valueEditorSelector,l.styles?.valueEditorSelector]),option:a.StyleSheet.flatten([r.valueEditorOption,l.styles?.valueEditorOption])}:a.StyleSheet.create(p),[l.styles?.combinatorOption,l.styles?.combinatorSelector,l.styles?.fieldOption,l.styles?.fieldSelector,l.styles?.operatorOption,l.styles?.operatorSelector,l.styles?.valueEditorOption,l.styles?.valueEditorSelector,l.styles?.valueSourceOption,l.styles?.valueSourceSelector,u]),{onChange:A}=(0,v.useValueSelector)({handleOnChange:t,listsAsArrays:n,multiple:s,value:e}),W=s&&Array.isArray(e)?(0,v.joinWith)(e,","):e;return me.createElement(a.TextInput,{testID:u,"aria-disabled":i,style:R.selector,value:W,onChangeText:A})};var V=({operator:t,value:o,handleOnChange:e,title:i,className:s,type:n="text",inputType:l="text",values:u=[],listsAsArrays:R,parseNumbers:A,fieldData:W,disabled:k,separator:Ce=null,skipHook:Te=!1,testID:w,selectorComponent:ee=m,...S})=>{let B=(0,ye.useMemo)(()=>({value:c.StyleSheet.flatten([r.value,S.schema.styles?.value]),valueEditorSwitch:c.StyleSheet.flatten([r.valueEditorSwitch,S.schema.styles?.valueEditorSwitch]),valueList:c.StyleSheet.flatten([r.valueList,S.schema.styles?.valueList])}),[S.schema.styles?.value,S.schema.styles?.valueEditorSwitch,S.schema.styles?.valueList]),{valueAsArray:te,multiValueHandler:oe}=(0,F.useValueEditor)({skipHook:Te,handleOnChange:e,inputType:l,operator:t,value:o,type:n,listsAsArrays:R,parseNumbers:A,values:u});if(t==="null"||t==="notNull")return null;let M=W?.placeholder??"",re="default";if((t==="between"||t==="notBetween")&&(n==="select"||n==="text")){let x=["from","to"].map((le,Q)=>n==="text"?b.createElement(c.TextInput,{key:le,style:B.value,keyboardType:re,placeholder:M,value:te[Q]??"",onChangeText:j=>oe(j,Q)}):b.createElement(ee,{...S,key:le,handleOnChange:j=>oe(j,Q),className:s,disabled:k,value:te[Q]??(0,F.getFirstOption)(u),options:u,listsAsArrays:R}));return b.createElement(c.View,{testID:w,style:B.valueList},x[0],Ce,x[1])}switch(n){case"select":case"multiselect":return b.createElement(ee,{...S,testID:w,className:s,title:i,handleOnChange:e,disabled:k,value:o,options:u,multiple:n==="multiselect",listsAsArrays:R});case"textarea":return b.createElement(c.TextInput,{testID:w,style:B.value,placeholder:M,value:o,onChangeText:x=>e(x)});case"switch":case"checkbox":return b.createElement(c.Switch,{testID:w,style:B.valueEditorSwitch,disabled:k,value:!!o,onValueChange:x=>e(x)})}return b.createElement(c.TextInput,{testID:w,style:B.value,keyboardType:re,placeholder:M,value:o,onChangeText:x=>e((0,F.parseNumber)(x,{parseNumbers:A}))})};var fe=y(require("react"));var de=y(require("react"));var N=t=>de.createElement(m,{...t});var J=t=>fe.createElement(V,{...t,selectorComponent:N});var E=y(require("react")),Ge=require("react"),G=require("react-querybuilder"),Re=require("react-redux");var xe=require("react");var O=y(require("react")),ve=require("react"),g=require("react-native"),h=require("react-querybuilder");var X=t=>{let o=(0,h.useRuleGroup)(t),e=o.schema,i=(0,ve.useMemo)(()=>({ruleGroup:g.StyleSheet.flatten([r.ruleGroup,e.styles?.ruleGroup]),ruleGroupHeader:g.StyleSheet.flatten([r.ruleGroupHeader,e.styles?.ruleGroupHeader]),ruleGroupBody:g.StyleSheet.flatten([r.ruleGroupBody,e.styles?.ruleGroupBody])}),[e.styles?.ruleGroup,e.styles?.ruleGroupBody,e.styles?.ruleGroupHeader]);return O.createElement(g.View,{style:i.ruleGroup,testID:h.TestID.ruleGroup},O.createElement(g.View,{style:i.ruleGroupHeader},O.createElement(h.RuleGroupHeaderComponents,{...o})),O.createElement(g.View,{style:i.ruleGroupBody},O.createElement(h.RuleGroupBodyComponents,{...o})))};var Y=y(require("react")),Se=require("react"),q=require("react-native"),P=require("react-querybuilder");var Z=t=>{let o=(0,P.useRule)(t),e=o.schema,i=(0,Se.useMemo)(()=>({rule:q.StyleSheet.flatten([r.rule,e.styles?.rule])}),[e.styles?.rule]);return Y.createElement(q.View,{style:i.rule,testID:P.TestID.rule},Y.createElement(P.RuleComponents,{...o}))};var H={actionElement:d,addGroupAction:d,addRuleAction:d,cloneGroupAction:d,cloneRuleAction:d,combinatorSelector:m,dragHandle:(0,xe.forwardRef)(()=>null),fieldSelector:m,inlineCombinator:U,lockGroupAction:d,lockRuleAction:d,notToggle:$,operatorSelector:m,removeGroupAction:d,removeRuleAction:d,rule:Z,ruleGroup:X,shiftActions:z,valueEditor:V,valueSelector:m,valueSourceSelector:m},Qe={...H,combinatorSelector:N,fieldSelector:N,operatorSelector:N,valueEditor:J,valueSelector:m,valueSourceSelector:N};var be=require("react"),Ne=require("react-native"),ge=require("react-querybuilder"),he=(t,o)=>{let e=(0,ge.useQueryBuilderSchema)(t,o),i=(0,be.useMemo)(()=>Ne.StyleSheet.create(t.styles??{}),[t.styles]);return{...e,schema:{...e.schema,styles:i}}};var De=[],Ie=({props:t,setup:o})=>{let e=he(t,o),{ruleGroup:i}=e.schema.controls;return E.createElement(G.QueryBuilderContext.Provider,{value:e.rqbContext},E.createElement(i,{ruleGroup:e.rootGroup,...e.combinatorPropObject,path:De,translations:e.translations,schema:e.schema,actions:e.actions,id:e.rootGroup.id,disabled:e.rootGroupDisabled,parentDisabled:e.queryDisabled,context:e.context}))},Le=t=>{let o=(0,Ge.useMemo)(()=>({...H,...t.controlElements}),[t.controlElements]),e=(0,G.useQueryBuilderSetup)({...t,controlElements:o});return E.createElement(Re.Provider,{context:G.QueryBuilderStateContext,store:G.queryBuilderStore},E.createElement(Ie,{props:t,setup:e}))};0&&(module.exports={NativeActionElement,NativeInlineCombinator,NativeNotToggle,NativeShiftActions,NativeValueEditor,NativeValueEditorWeb,NativeValueSelector,NativeValueSelectorWeb,QueryBuilderNative,RuleGroupNative,RuleNative,defaultNativeControlElements,defaultNativeSelectStyles,defaultNativeStyles,defaultNativeWebControlElements});
"use strict";var Fe=Object.create;var I=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Be=Object.prototype.hasOwnProperty;var Ve=(t,o)=>{for(var e in o)I(t,e,{get:o[e],enumerable:!0})},ie=(t,o,e,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Pe(o))!Be.call(t,s)&&s!==e&&I(t,s,{get:()=>o[s],enumerable:!(i=Oe(o,s))||i.enumerable});return t};var y=(t,o,e)=>(e=t!=null?Fe(we(t)):{},ie(o||!t||!t.__esModule?I(e,"default",{value:t,enumerable:!0}):e,t)),Ee=t=>ie(I({},"__esModule",{value:!0}),t);var qe={};Ve(qe,{NativeActionElement:()=>d,NativeInlineCombinator:()=>U,NativeNotToggle:()=>$,NativeShiftActions:()=>z,NativeValueEditor:()=>V,NativeValueEditorWeb:()=>J,NativeValueSelector:()=>c,NativeValueSelectorWeb:()=>g,QueryBuilderNative:()=>Le,RuleGroupNative:()=>X,RuleNative:()=>Z,defaultNativeControlElements:()=>H,defaultNativeSelectStyles:()=>p,defaultNativeStyles:()=>r,defaultNativeWebControlElements:()=>Qe});module.exports=Ee(qe);var se=y(require("react")),ue=require("react-native"),d=({handleOnClick:t,label:o,disabled:e,disabledTranslation:i,testID:s})=>se.createElement(ue.Button,{testID:s,disabled:e&&!i,title:`${i&&e?i.label??"":o??""}`,onPress:n=>t()});var _=y(require("react")),ae=require("react"),D=require("react-native"),K=require("react-querybuilder");var ne=require("react-native"),p={selector:{borderWidth:1,height:32,width:100},option:{}},Ae={combinatorOption:p.option,combinatorSelector:p.selector,dragHandle:{},fieldOption:p.option,fieldSelector:p.selector,inlineCombinator:{},notToggle:{flexDirection:"row"},notToggleLabel:{},notToggleSwitch:{},operatorOption:p.option,operatorSelector:p.selector,rule:{flexDirection:"row",gap:10,alignItems:"center"},ruleGroup:{backgroundColor:"rgba(0, 75, 183, 0.2)",borderColor:"#8081a2",borderRadius:4,borderWidth:1,padding:10,gap:10},ruleGroupBody:{gap:10},ruleGroupHeader:{flexDirection:"row",gap:10,alignItems:"center"},shiftActions:{flexDirection:"column"},value:{borderWidth:1,height:32,width:150},valueEditorOption:p.option,valueEditorSelector:p.selector,valueEditorSwitch:{},valueList:{flexDirection:"row"},valueSourceOption:p.option,valueSourceSelector:p.selector},r=ne.StyleSheet.create(Ae);var U=({component:t,path:o,...e})=>{let i=(0,ae.useMemo)(()=>({inlineCombinator:D.StyleSheet.flatten([r.inlineCombinator,e.schema.styles?.inlineCombinator])}),[e.schema.styles?.inlineCombinator]);return _.createElement(D.View,{style:i.inlineCombinator,key:"no-dnd",testID:K.TestID.inlineCombinator},_.createElement(t,{...e,path:o,testID:K.TestID.combinators}))};var L=y(require("react")),pe=require("react"),f=require("react-native");var $=({handleOnChange:t,label:o,checked:e,disabled:i,schema:s,testID:n})=>{let l=(0,pe.useMemo)(()=>({notToggle:f.StyleSheet.flatten([r.notToggle,s.styles?.notToggle]),notToggleLabel:f.StyleSheet.flatten([r.notToggleLabel,s.styles?.notToggleLabel]),notToggleSwitch:f.StyleSheet.flatten([r.notToggleSwitch,s.styles?.notToggleSwitch])}),[s.styles?.notToggle,s.styles?.notToggleLabel,s.styles?.notToggleSwitch]);return L.createElement(f.View,{style:l.notToggle,testID:n},L.createElement(f.Text,{style:l.notToggleLabel},o),L.createElement(f.Switch,{style:l.notToggleSwitch,disabled:i,value:e,onValueChange:u=>t(u)}))};var T=y(require("react")),R=require("react-native");var z=({shiftUp:t,shiftDown:o,shiftUpDisabled:e,shiftDownDisabled:i,disabled:s,labels:n,testID:l,schema:{styles:u}})=>{let C=T.useMemo(()=>({shiftActions:R.StyleSheet.flatten([r.shiftActions,u?.shiftActions])}),[u?.shiftActions]);return T.createElement(R.View,{testID:l,style:C.shiftActions},T.createElement(R.Button,{disabled:s||e,onPress:t,accessibilityLabel:n?.shiftUp,title:n?.shiftUp}),T.createElement(R.Button,{disabled:s||i,onPress:o,accessibilityLabel:n?.shiftDown,title:n?.shiftDown}))};var N=y(require("react")),ye=require("react"),m=require("react-native"),F=require("react-querybuilder");var ce=y(require("react")),me=require("react"),a=require("react-native"),v=require("react-querybuilder");var c=({handleOnChange:t,options:o,value:e,disabled:i,multiple:s,listsAsArrays:n,schema:l,testID:u})=>{let C=(0,me.useMemo)(()=>u===v.TestID.combinators?{selector:a.StyleSheet.flatten([r.combinatorSelector,l.styles?.combinatorSelector]),option:a.StyleSheet.flatten([r.combinatorOption,l.styles?.combinatorOption])}:u===v.TestID.fields?{selector:a.StyleSheet.flatten([r.fieldSelector,l.styles?.fieldSelector]),option:a.StyleSheet.flatten([r.fieldOption,l.styles?.fieldOption])}:u===v.TestID.operators?{selector:a.StyleSheet.flatten([r.operatorSelector,l.styles?.operatorSelector]),option:a.StyleSheet.flatten([r.operatorOption,l.styles?.operatorOption])}:u===v.TestID.valueSourceSelector?{selector:a.StyleSheet.flatten([r.valueSourceSelector,l.styles?.valueSourceSelector]),option:a.StyleSheet.flatten([r.valueSourceOption,l.styles?.valueSourceOption])}:u===v.TestID.valueEditor?{selector:a.StyleSheet.flatten([r.valueEditorSelector,l.styles?.valueEditorSelector]),option:a.StyleSheet.flatten([r.valueEditorOption,l.styles?.valueEditorOption])}:a.StyleSheet.create(p),[l.styles?.combinatorOption,l.styles?.combinatorSelector,l.styles?.fieldOption,l.styles?.fieldSelector,l.styles?.operatorOption,l.styles?.operatorSelector,l.styles?.valueEditorOption,l.styles?.valueEditorSelector,l.styles?.valueSourceOption,l.styles?.valueSourceSelector,u]),{onChange:A}=(0,v.useValueSelector)({handleOnChange:t,listsAsArrays:n,multiple:s,value:e}),W=s&&Array.isArray(e)?(0,v.joinWith)(e,","):e;return ce.createElement(a.TextInput,{testID:u,"aria-disabled":i,style:C.selector,value:W,onChangeText:A})};var V=({operator:t,value:o,handleOnChange:e,title:i,className:s,type:n="text",inputType:l="text",values:u=[],listsAsArrays:C,parseNumbers:A,fieldData:W,disabled:k,separator:Re=null,skipHook:Te=!1,testID:w,selectorComponent:ee=c,...S})=>{let B=(0,ye.useMemo)(()=>({value:m.StyleSheet.flatten([r.value,S.schema.styles?.value]),valueEditorSwitch:m.StyleSheet.flatten([r.valueEditorSwitch,S.schema.styles?.valueEditorSwitch]),valueList:m.StyleSheet.flatten([r.valueList,S.schema.styles?.valueList])}),[S.schema.styles?.value,S.schema.styles?.valueEditorSwitch,S.schema.styles?.valueList]),{valueAsArray:te,multiValueHandler:oe}=(0,F.useValueEditor)({skipHook:Te,handleOnChange:e,inputType:l,operator:t,value:o,type:n,listsAsArrays:C,parseNumbers:A,values:u});if(t==="null"||t==="notNull")return null;let M=W?.placeholder??"",re="default";if((t==="between"||t==="notBetween")&&(n==="select"||n==="text")){let b=["from","to"].map((le,Q)=>n==="text"?N.createElement(m.TextInput,{key:le,style:B.value,keyboardType:re,placeholder:M,value:te[Q]??"",onChangeText:j=>oe(j,Q)}):N.createElement(ee,{...S,key:le,handleOnChange:j=>oe(j,Q),className:s,disabled:k,value:te[Q]??(0,F.getFirstOption)(u),options:u,listsAsArrays:C}));return N.createElement(m.View,{testID:w,style:B.valueList},b[0],Re,b[1])}switch(n){case"select":case"multiselect":return N.createElement(ee,{...S,testID:w,className:s,title:i,handleOnChange:e,disabled:k,value:o,options:u,multiple:n==="multiselect",listsAsArrays:C});case"textarea":return N.createElement(m.TextInput,{testID:w,style:B.value,placeholder:M,value:o,onChangeText:b=>e(b)});case"switch":case"checkbox":return N.createElement(m.Switch,{testID:w,style:B.valueEditorSwitch,disabled:k,value:!!o,onValueChange:b=>e(b)})}return N.createElement(m.TextInput,{testID:w,style:B.value,keyboardType:re,placeholder:M,value:o,onChangeText:b=>e((0,F.parseNumber)(b,{parseNumbers:A}))})};var fe=y(require("react"));var de=y(require("react"));var g=t=>de.createElement(c,{...t});var J=t=>fe.createElement(V,{...t,selectorComponent:g});var E=y(require("react")),Ge=require("react"),G=require("react-querybuilder"),Ce=require("react-redux");var be=require("react");var O=y(require("react")),ve=require("react"),x=require("react-native"),h=require("react-querybuilder");var X=t=>{let o=(0,h.useRuleGroup)(t),e=o.schema,i=(0,ve.useMemo)(()=>({ruleGroup:x.StyleSheet.flatten([r.ruleGroup,e.styles?.ruleGroup]),ruleGroupHeader:x.StyleSheet.flatten([r.ruleGroupHeader,e.styles?.ruleGroupHeader]),ruleGroupBody:x.StyleSheet.flatten([r.ruleGroupBody,e.styles?.ruleGroupBody])}),[e.styles?.ruleGroup,e.styles?.ruleGroupBody,e.styles?.ruleGroupHeader]);return O.createElement(x.View,{style:i.ruleGroup,testID:h.TestID.ruleGroup},O.createElement(x.View,{style:i.ruleGroupHeader},O.createElement(h.RuleGroupHeaderComponents,{...o})),O.createElement(x.View,{style:i.ruleGroupBody},O.createElement(h.RuleGroupBodyComponents,{...o})))};var Y=y(require("react")),Se=require("react"),q=require("react-native"),P=require("react-querybuilder");var Z=t=>{let o=(0,P.useRule)(t),e=o.schema,i=(0,Se.useMemo)(()=>({rule:q.StyleSheet.flatten([r.rule,e.styles?.rule])}),[e.styles?.rule]);return Y.createElement(q.View,{style:i.rule,testID:P.TestID.rule},Y.createElement(P.RuleComponents,{...o}))};var H={actionElement:d,addGroupAction:d,addRuleAction:d,cloneGroupAction:d,cloneRuleAction:d,combinatorSelector:c,dragHandle:(0,be.forwardRef)(()=>null),fieldSelector:c,inlineCombinator:U,lockGroupAction:d,lockRuleAction:d,notToggle:$,operatorSelector:c,removeGroupAction:d,removeRuleAction:d,rule:Z,ruleGroup:X,shiftActions:z,valueEditor:V,valueSelector:c,valueSourceSelector:c},Qe={...H,combinatorSelector:g,fieldSelector:g,operatorSelector:g,valueEditor:J,valueSelector:c,valueSourceSelector:g};var Ne=require("react"),ge=require("react-native"),xe=require("react-querybuilder"),he=(t,o)=>{let e=(0,xe.useQueryBuilderSchema)(t,o),i=(0,Ne.useMemo)(()=>ge.StyleSheet.create(t.styles??{}),[t.styles]);return{...e,schema:{...e.schema,styles:i}}};var Ie=[],De=({props:t,setup:o})=>{let e=he(t,o),{ruleGroup:i}=e.schema.controls;return E.createElement(G.QueryBuilderContext.Provider,{value:e.rqbContext},E.createElement(i,{ruleGroup:e.rootGroup,...e.combinatorPropObject,path:Ie,translations:e.translations,schema:e.schema,actions:e.actions,id:e.rootGroup.id,disabled:e.rootGroupDisabled,parentDisabled:e.queryDisabled,context:e.context}))},Le=t=>{let o=(0,Ge.useMemo)(()=>({...H,...t.controlElements}),[t.controlElements]),e=(0,G.useQueryBuilderSetup)({...t,controlElements:o});return E.createElement(Ce.Provider,{context:G.QueryBuilderStateContext,store:G.queryBuilderStore},E.createElement(De,{props:t,setup:e}))};0&&(module.exports={NativeActionElement,NativeInlineCombinator,NativeNotToggle,NativeShiftActions,NativeValueEditor,NativeValueEditorWeb,NativeValueSelector,NativeValueSelectorWeb,QueryBuilderNative,RuleGroupNative,RuleNative,defaultNativeControlElements,defaultNativeSelectStyles,defaultNativeStyles,defaultNativeWebControlElements});
//# sourceMappingURL=react-querybuilder_native.cjs.production.js.map

@@ -80,3 +80,3 @@ var __defProp = Object.defineProperty;

operatorSelector: defaultNativeSelectStyles.selector,
rule: { flexDirection: "row", paddingBottom: 10 },
rule: { flexDirection: "row", gap: 10, alignItems: "center" },
ruleGroup: {

@@ -87,10 +87,10 @@ backgroundColor: "rgba(0, 75, 183, 0.2)",

borderWidth: 1,
marginBottom: 10
padding: 10,
gap: 10
},
ruleGroupBody: { paddingTop: 10, paddingRight: 10, paddingLeft: 10 },
ruleGroupBody: { gap: 10 },
ruleGroupHeader: {
flexDirection: "row",
paddingTop: 10,
paddingRight: 10,
paddingLeft: 10
gap: 10,
alignItems: "center"
},

@@ -97,0 +97,0 @@ shiftActions: { flexDirection: "column" },

{
"name": "@react-querybuilder/native",
"description": "React Native components for react-querybuilder",
"version": "7.4.4",
"version": "7.5.0",
"publishConfig": {

@@ -27,2 +27,3 @@ "access": "public"

],
"sideEffects": false,
"repository": {

@@ -52,3 +53,3 @@ "type": "git",

"react-native-web": "~0.19.12",
"react-querybuilder": "7.4.4",
"react-querybuilder": "7.5.0",
"react-redux": "^9.1.2",

@@ -58,10 +59,10 @@ "react-test-renderer": "^18.3.1",

"typescript": "^5.4.5",
"vite": "^5.2.12"
"vite": "^5.3.1"
},
"peerDependencies": {
"react": ">=18",
"react-querybuilder": "7.4.4",
"react-querybuilder": "7.5.0",
"react-redux": "^9.1.0"
},
"gitHead": "65c8ca5e2d9af309a271735d4c24538287c5e2bf"
"gitHead": "28804b71a08aafa383e30e28205d31326316017a"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc