@react-querybuilder/native
Advanced tools
Comparing version 7.5.0 to 7.5.1
@@ -585,3 +585,3 @@ "use strict"; | ||
parentDisabled: qb.queryDisabled, | ||
context: qb.context | ||
context: props.context | ||
} | ||
@@ -588,0 +588,0 @@ )); |
@@ -1,2 +0,2 @@ | ||
"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}); | ||
"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:t.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 |
@@ -623,3 +623,3 @@ var __defProp = Object.defineProperty; | ||
parentDisabled: qb.queryDisabled, | ||
context: qb.context | ||
context: props.context | ||
}) | ||
@@ -626,0 +626,0 @@ )); |
{ | ||
"name": "@react-querybuilder/native", | ||
"description": "React Native components for react-querybuilder", | ||
"version": "7.5.0", | ||
"version": "7.5.1", | ||
"publishConfig": { | ||
@@ -52,3 +52,3 @@ "access": "public" | ||
"react-native-web": "~0.19.12", | ||
"react-querybuilder": "7.5.0", | ||
"react-querybuilder": "7.5.1", | ||
"react-redux": "^9.1.2", | ||
@@ -65,3 +65,3 @@ "react-test-renderer": "^18.3.1", | ||
}, | ||
"gitHead": "28804b71a08aafa383e30e28205d31326316017a" | ||
"gitHead": "c2eaa377d378e5bcffb43924944602fe113d5c0f" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
324206