@react-querybuilder/native
Advanced tools
Comparing version 7.3.0 to 7.4.0
@@ -61,3 +61,3 @@ import * as react from 'react'; | ||
declare const NativeInlineCombinator: ({ component: CombinatorSelectorComponent, path, independentCombinators: _independentCombinators, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
declare const NativeInlineCombinator: ({ component: CombinatorSelectorComponent, path, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
@@ -91,3 +91,3 @@ declare const NativeNotToggle: ({ handleOnChange, label, checked, disabled, schema, testID, }: NotToggleNativeProps) => react.JSX.Element; | ||
fieldSelector: <Opt extends react_querybuilder.FullOption<string> = react_querybuilder.FullOption<string>>({ handleOnChange, options: _options, value, disabled, multiple, listsAsArrays, schema, testID, }: ValueSelectorNativeProps<Opt>) => react.JSX.Element; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, independentCombinators: _independentCombinators, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
lockGroupAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; | ||
@@ -119,3 +119,3 @@ lockRuleAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; | ||
dragHandle: react.ForwardRefExoticComponent<Omit<react_querybuilder.DragHandleProps & react.RefAttributes<HTMLElement>, "ref"> & react.RefAttributes<HTMLElement>>; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, independentCombinators: _independentCombinators, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
lockGroupAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; | ||
@@ -122,0 +122,0 @@ lockRuleAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; |
@@ -125,3 +125,2 @@ "use strict"; | ||
path, | ||
independentCombinators: _independentCombinators, | ||
...props | ||
@@ -128,0 +127,0 @@ }) => { |
@@ -61,3 +61,3 @@ import * as react from 'react'; | ||
declare const NativeInlineCombinator: ({ component: CombinatorSelectorComponent, path, independentCombinators: _independentCombinators, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
declare const NativeInlineCombinator: ({ component: CombinatorSelectorComponent, path, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
@@ -91,3 +91,3 @@ declare const NativeNotToggle: ({ handleOnChange, label, checked, disabled, schema, testID, }: NotToggleNativeProps) => react.JSX.Element; | ||
fieldSelector: <Opt extends react_querybuilder.FullOption<string> = react_querybuilder.FullOption<string>>({ handleOnChange, options: _options, value, disabled, multiple, listsAsArrays, schema, testID, }: ValueSelectorNativeProps<Opt>) => react.JSX.Element; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, independentCombinators: _independentCombinators, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
lockGroupAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; | ||
@@ -119,3 +119,3 @@ lockRuleAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; | ||
dragHandle: react.ForwardRefExoticComponent<Omit<react_querybuilder.DragHandleProps & react.RefAttributes<HTMLElement>, "ref"> & react.RefAttributes<HTMLElement>>; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, independentCombinators: _independentCombinators, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
inlineCombinator: ({ component: CombinatorSelectorComponent, path, ...props }: InlineCombinatorNativeProps) => react.JSX.Element; | ||
lockGroupAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; | ||
@@ -122,0 +122,0 @@ lockRuleAction: ({ handleOnClick, label, disabled, disabledTranslation, testID, }: ActionNativeProps) => react.JSX.Element; |
@@ -1,2 +0,2 @@ | ||
"use strict";var Oe=Object.create;var I=Object.defineProperty;var Fe=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=Fe(o,s))||i.enumerable});return t};var y=(t,o,e)=>(e=t!=null?Oe(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:()=>m,NativeValueSelectorWeb:()=>N,QueryBuilderNative:()=>Le,RuleGroupNative:()=>X,RuleNative:()=>Z,defaultNativeControlElements:()=>W,defaultNativeSelectStyles:()=>p,defaultNativeStyles:()=>r,defaultNativeWebControlElements:()=>Qe});module.exports=Ee(qe);var se=y(require("react")),ne=require("react-native"),d=({handleOnClick:t,label:o,disabled:e,disabledTranslation:i,testID:s})=>se.createElement(ne.Button,{testID:s,disabled:e&&!i,title:`${i&&e?i.label??"":o??""}`,onPress:u=>t()});var j=y(require("react")),ae=require("react"),D=require("react-native"),K=require("react-querybuilder");var ue=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=ue.StyleSheet.create(Ae);var U=({component:t,path:o,independentCombinators:e,...i})=>{let s=(0,ae.useMemo)(()=>({inlineCombinator:D.StyleSheet.flatten([r.inlineCombinator,i.schema.styles?.inlineCombinator])}),[i.schema.styles?.inlineCombinator]);return j.createElement(D.View,{style:s.inlineCombinator,key:"no-dnd",testID:K.TestID.inlineCombinator},j.createElement(t,{...i,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:u})=>{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:u},L.createElement(f.Text,{style:l.notToggleLabel},o),L.createElement(f.Switch,{style:l.notToggleSwitch,disabled:i,value:e,onValueChange:n=>t(n)}))};var T=y(require("react")),R=require("react-native");var z=({shiftUp:t,shiftDown:o,shiftUpDisabled:e,shiftDownDisabled:i,disabled:s,labels:u,testID:l,schema:{styles:n}})=>{let C=T.useMemo(()=>({shiftActions:R.StyleSheet.flatten([r.shiftActions,n?.shiftActions])}),[n?.shiftActions]);return T.createElement(R.View,{testID:l,style:C.shiftActions},T.createElement(R.Button,{disabled:s||e,onPress:t,accessibilityLabel:u?.shiftUp,title:u?.shiftUp}),T.createElement(R.Button,{disabled:s||i,onPress:o,accessibilityLabel:u?.shiftDown,title:u?.shiftDown}))};var x=y(require("react")),ye=require("react"),c=require("react-native"),O=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:u,schema:l,testID:n})=>{let C=(0,ce.useMemo)(()=>n===v.TestID.combinators?{selector:a.StyleSheet.flatten([r.combinatorSelector,l.styles?.combinatorSelector]),option:a.StyleSheet.flatten([r.combinatorOption,l.styles?.combinatorOption])}:n===v.TestID.fields?{selector:a.StyleSheet.flatten([r.fieldSelector,l.styles?.fieldSelector]),option:a.StyleSheet.flatten([r.fieldOption,l.styles?.fieldOption])}:n===v.TestID.operators?{selector:a.StyleSheet.flatten([r.operatorSelector,l.styles?.operatorSelector]),option:a.StyleSheet.flatten([r.operatorOption,l.styles?.operatorOption])}:n===v.TestID.valueSourceSelector?{selector:a.StyleSheet.flatten([r.valueSourceSelector,l.styles?.valueSourceSelector]),option:a.StyleSheet.flatten([r.valueSourceOption,l.styles?.valueSourceOption])}:n===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,n]),{onChange:A}=(0,v.useValueSelector)({handleOnChange:t,listsAsArrays:u,multiple:s,value:e}),H=s&&Array.isArray(e)?(0,v.joinWith)(e,","):e;return me.createElement(a.TextInput,{testID:n,"aria-disabled":i,style:C.selector,value:H,onChangeText:A})};var V=({operator:t,value:o,handleOnChange:e,title:i,className:s,type:u="text",inputType:l="text",values:n=[],listsAsArrays:C,parseNumbers:A,fieldData:H,disabled:k,separator:Re=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,O.useValueEditor)({skipHook:Te,handleOnChange:e,inputType:l,operator:t,value:o,type:u,listsAsArrays:C,parseNumbers:A,values:n});if(t==="null"||t==="notNull")return null;let M=H?.placeholder??"",re="default";if((t==="between"||t==="notBetween")&&(u==="select"||u==="text")){let b=["from","to"].map((le,Q)=>u==="text"?x.createElement(c.TextInput,{key:le,style:B.value,keyboardType:re,placeholder:M,value:te[Q]??"",onChangeText:_=>oe(_,Q)}):x.createElement(ee,{...S,key:le,handleOnChange:_=>oe(_,Q),className:s,disabled:k,value:te[Q]??(0,O.getFirstOption)(n),options:n,listsAsArrays:C}));return x.createElement(c.View,{testID:w,style:B.valueList},b[0],Re,b[1])}switch(u){case"select":case"multiselect":return x.createElement(ee,{...S,testID:w,className:s,title:i,handleOnChange:e,disabled:k,value:o,options:n,multiple:u==="multiselect",listsAsArrays:C});case"textarea":return x.createElement(c.TextInput,{testID:w,style:B.value,placeholder:M,value:o,onChangeText:b=>e(b)});case"switch":case"checkbox":return x.createElement(c.Switch,{testID:w,style:B.valueEditorSwitch,disabled:k,value:!!o,onValueChange:b=>e(b)})}return x.createElement(c.TextInput,{testID:w,style:B.value,keyboardType:re,placeholder:M,value:o,onChangeText:b=>e((0,O.parseNumber)(b,{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"),Ce=require("react-redux");var be=require("react");var F=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 F.createElement(g.View,{style:i.ruleGroup,testID:h.TestID.ruleGroup},F.createElement(g.View,{style:i.ruleGroupHeader},F.createElement(h.RuleGroupHeaderComponents,{...o})),F.createElement(g.View,{style:i.ruleGroupBody},F.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 W={actionElement:d,addGroupAction:d,addRuleAction:d,cloneGroupAction:d,cloneRuleAction:d,combinatorSelector:m,dragHandle:(0,be.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={...W,combinatorSelector:N,fieldSelector:N,operatorSelector:N,valueEditor:J,valueSelector:m,valueSourceSelector:N};var xe=require("react"),Ne=require("react-native"),ge=require("react-querybuilder"),he=(t,o)=>{let e=(0,ge.useQueryBuilderSchema)(t,o);return e.schema.styles=(0,xe.useMemo)(()=>Ne.StyleSheet.create(t.styles??{}),[t.styles]),e};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)(()=>({...W,...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 Oe=Object.create;var I=Object.defineProperty;var Fe=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=Fe(o,s))||i.enumerable});return t};var y=(t,o,e)=>(e=t!=null?Oe(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:()=>m,NativeValueSelectorWeb:()=>b,QueryBuilderNative:()=>Le,RuleGroupNative:()=>X,RuleNative:()=>Z,defaultNativeControlElements:()=>W,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",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: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 C=y(require("react")),T=require("react-native");var z=({shiftUp:t,shiftDown:o,shiftUpDisabled:e,shiftDownDisabled:i,disabled:s,labels:n,testID:l,schema:{styles:u}})=>{let R=C.useMemo(()=>({shiftActions:T.StyleSheet.flatten([r.shiftActions,u?.shiftActions])}),[u?.shiftActions]);return C.createElement(T.View,{testID:l,style:R.shiftActions},C.createElement(T.Button,{disabled:s||e,onPress:t,accessibilityLabel:n?.shiftUp,title:n?.shiftUp}),C.createElement(T.Button,{disabled:s||i,onPress:o,accessibilityLabel:n?.shiftDown,title:n?.shiftDown}))};var N=y(require("react")),ye=require("react"),c=require("react-native"),O=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}),H=s&&Array.isArray(e)?(0,v.joinWith)(e,","):e;return me.createElement(a.TextInput,{testID:u,"aria-disabled":i,style:R.selector,value:H,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:H,disabled:k,separator:Te=null,skipHook:Ce=!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,O.useValueEditor)({skipHook:Ce,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=H?.placeholder??"",re="default";if((t==="between"||t==="notBetween")&&(n==="select"||n==="text")){let x=["from","to"].map((le,Q)=>n==="text"?N.createElement(c.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,O.getFirstOption)(u),options:u,listsAsArrays:R}));return N.createElement(c.View,{testID:w,style:B.valueList},x[0],Te,x[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:R});case"textarea":return N.createElement(c.TextInput,{testID:w,style:B.value,placeholder:M,value:o,onChangeText:x=>e(x)});case"switch":case"checkbox":return N.createElement(c.Switch,{testID:w,style:B.valueEditorSwitch,disabled:k,value:!!o,onValueChange:x=>e(x)})}return N.createElement(c.TextInput,{testID:w,style:B.value,keyboardType:re,placeholder:M,value:o,onChangeText:x=>e((0,O.parseNumber)(x,{parseNumbers:A}))})};var fe=y(require("react"));var de=y(require("react"));var b=t=>de.createElement(m,{...t});var J=t=>fe.createElement(V,{...t,selectorComponent:b});var E=y(require("react")),Ge=require("react"),G=require("react-querybuilder"),Re=require("react-redux");var xe=require("react");var F=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 F.createElement(g.View,{style:i.ruleGroup,testID:h.TestID.ruleGroup},F.createElement(g.View,{style:i.ruleGroupHeader},F.createElement(h.RuleGroupHeaderComponents,{...o})),F.createElement(g.View,{style:i.ruleGroupBody},F.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 W={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={...W,combinatorSelector:b,fieldSelector:b,operatorSelector:b,valueEditor:J,valueSelector:m,valueSourceSelector:b};var Ne=require("react"),be=require("react-native"),ge=require("react-querybuilder"),he=(t,o)=>{let e=(0,ge.useQueryBuilderSchema)(t,o);return e.schema.styles=(0,Ne.useMemo)(()=>be.StyleSheet.create(t.styles??{}),[t.styles]),e};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)(()=>({...W,...t.controlElements}),[t.controlElements]),e=(0,G.useQueryBuilderSetup)({...t,controlElements:o});return E.createElement(Re.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 |
@@ -110,8 +110,6 @@ var __defProp = Object.defineProperty; | ||
component: CombinatorSelectorComponent, | ||
path, | ||
independentCombinators: _independentCombinators | ||
path | ||
} = _b, props = __objRest(_b, [ | ||
"component", | ||
"path", | ||
"independentCombinators" | ||
"path" | ||
]); | ||
@@ -118,0 +116,0 @@ var _a2; |
{ | ||
"name": "@react-querybuilder/native", | ||
"description": "React Native components for react-querybuilder", | ||
"version": "7.3.0", | ||
"version": "7.4.0", | ||
"publishConfig": { | ||
@@ -51,3 +51,3 @@ "access": "public" | ||
"react-native-web": "~0.19.11", | ||
"react-querybuilder": "^7.3.0", | ||
"react-querybuilder": "^7.4.0", | ||
"react-redux": "^9.1.2", | ||
@@ -61,6 +61,6 @@ "react-test-renderer": "^18.3.1", | ||
"react": ">=18", | ||
"react-querybuilder": "^7.3.0", | ||
"react-querybuilder": "^7.4.0", | ||
"react-redux": "^9.1.0" | ||
}, | ||
"gitHead": "ffac253d42030a9607ce33247860f036c0a3a705" | ||
"gitHead": "f5ce82d93eccd37d0fbe357e2268934a4e0341da" | ||
} |
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
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
324998
2239