@react-querybuilder/bulma
Advanced tools
Comparing version 7.2.1 to 7.3.0
@@ -5,16 +5,7 @@ import * as React from 'react'; | ||
declare const BulmaNotToggle: { | ||
({ className, handleOnChange, label, checked, title, disabled, }: NotToggleProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
declare const BulmaNotToggle: ({ className, handleOnChange, label, checked, title, disabled, }: NotToggleProps) => React.JSX.Element; | ||
declare const BulmaValueEditor: { | ||
(props: ValueEditorProps): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const BulmaValueEditor: (props: ValueEditorProps) => React.JSX.Element | null; | ||
declare const BulmaValueSelector: { | ||
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: ValueSelectorProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
declare const BulmaValueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: ValueSelectorProps) => React.JSX.Element; | ||
@@ -25,14 +16,5 @@ declare const bulmaControlClassnames: { | ||
declare const bulmaControlElements: { | ||
notToggle: { | ||
({ className, handleOnChange, label, checked, title, disabled, }: react_querybuilder.NotToggleProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
valueEditor: { | ||
(props: react_querybuilder.ValueEditorProps<FullField<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
valueSelector: { | ||
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: react_querybuilder.ValueSelectorProps<react_querybuilder.FullOption<string>>): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
notToggle: ({ className, handleOnChange, label, checked, title, disabled, }: react_querybuilder.NotToggleProps) => React.JSX.Element; | ||
valueEditor: (props: react_querybuilder.ValueEditorProps<FullField<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>) => React.JSX.Element | null; | ||
valueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: react_querybuilder.ValueSelectorProps<react_querybuilder.FullOption<string>>) => React.JSX.Element; | ||
}; | ||
@@ -39,0 +21,0 @@ declare const QueryBuilderBulma: react_querybuilder.QueryBuilderContextProvider<Record<string, any>>; |
@@ -61,3 +61,2 @@ "use strict"; | ||
), label); | ||
BulmaNotToggle.displayName = "BulmaNotToggle"; | ||
@@ -152,3 +151,2 @@ // src/BulmaValueEditor.tsx | ||
}; | ||
BulmaValueEditor.displayName = "BulmaValueEditor"; | ||
@@ -186,3 +184,2 @@ // src/BulmaValueSelector.tsx | ||
}; | ||
BulmaValueSelector.displayName = "BulmaValueSelector"; | ||
@@ -189,0 +186,0 @@ // src/index.ts |
@@ -5,16 +5,7 @@ import * as React from 'react'; | ||
declare const BulmaNotToggle: { | ||
({ className, handleOnChange, label, checked, title, disabled, }: NotToggleProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
declare const BulmaNotToggle: ({ className, handleOnChange, label, checked, title, disabled, }: NotToggleProps) => React.JSX.Element; | ||
declare const BulmaValueEditor: { | ||
(props: ValueEditorProps): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
declare const BulmaValueEditor: (props: ValueEditorProps) => React.JSX.Element | null; | ||
declare const BulmaValueSelector: { | ||
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: ValueSelectorProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
declare const BulmaValueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: ValueSelectorProps) => React.JSX.Element; | ||
@@ -25,14 +16,5 @@ declare const bulmaControlClassnames: { | ||
declare const bulmaControlElements: { | ||
notToggle: { | ||
({ className, handleOnChange, label, checked, title, disabled, }: react_querybuilder.NotToggleProps): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
valueEditor: { | ||
(props: react_querybuilder.ValueEditorProps<FullField<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>): React.JSX.Element | null; | ||
displayName: string; | ||
}; | ||
valueSelector: { | ||
({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: react_querybuilder.ValueSelectorProps<react_querybuilder.FullOption<string>>): React.JSX.Element; | ||
displayName: string; | ||
}; | ||
notToggle: ({ className, handleOnChange, label, checked, title, disabled, }: react_querybuilder.NotToggleProps) => React.JSX.Element; | ||
valueEditor: (props: react_querybuilder.ValueEditorProps<FullField<string, string, string, react_querybuilder.Option<string>, react_querybuilder.Option<string>>, string>) => React.JSX.Element | null; | ||
valueSelector: ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: react_querybuilder.ValueSelectorProps<react_querybuilder.FullOption<string>>) => React.JSX.Element; | ||
}; | ||
@@ -39,0 +21,0 @@ declare const QueryBuilderBulma: react_querybuilder.QueryBuilderContextProvider<Record<string, any>>; |
@@ -1,2 +0,2 @@ | ||
"use strict";var B=Object.create;var d=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var a in t)d(e,a,{get:t[a],enumerable:!0})},x=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of S(t))!P.call(e,o)&&o!==a&&d(e,o,{get:()=>t[o],enumerable:!(n=O(t,o))||n.enumerable});return e};var C=(e,t,a)=>(a=e!=null?B(T(e)):{},x(t||!e||!e.__esModule?d(a,"default",{value:e,enumerable:!0}):a,e)),H=e=>x(d({},"__esModule",{value:!0}),e);var w={};$(w,{BulmaNotToggle:()=>y,BulmaValueEditor:()=>b,BulmaValueSelector:()=>g,QueryBuilderBulma:()=>F,bulmaControlClassnames:()=>A,bulmaControlElements:()=>V});module.exports=H(w);var k=require("react-querybuilder");var v=C(require("react")),y=({className:e,handleOnChange:t,label:a,checked:n,title:o,disabled:i})=>v.createElement("label",{className:`${e} checkbox`,title:o},v.createElement("input",{type:"checkbox",disabled:i,checked:n,onChange:l=>t(l.target.checked)}),a);y.displayName="BulmaNotToggle";var s=C(require("react")),r=require("react-querybuilder"),b=e=>{let{valueAsArray:t,multiValueHandler:a}=(0,r.useValueEditor)({handleOnChange:e.handleOnChange,inputType:e.inputType,operator:e.operator,value:e.value,type:e.type,listsAsArrays:e.listsAsArrays,parseNumbers:e.parseNumbers,values:e.values}),{selectorComponent:n=e.schema.controls.valueSelector}=e;if(e.operator==="null"||e.operator==="notNull")return null;let o=e.fieldData?.placeholder??"",{values:i=[]}=e;if((e.operator==="between"||e.operator==="notBetween")&&(e.type==="select"||e.type==="text")){let l=["from","to"].map((u,m)=>e.type==="text"?s.createElement("input",{key:u,type:e.inputType||"text",placeholder:o,value:t[m]??"",className:`${r.standardClassnames.valueListItem} input`,disabled:e.disabled,onChange:c=>a(c.target.value,m)}):s.createElement(n,{...e,key:u,className:r.standardClassnames.valueListItem,handleOnChange:c=>a(c,m),disabled:e.disabled,value:t[m]??(0,r.getFirstOption)(i),options:i,listsAsArrays:e.listsAsArrays}));return s.createElement("span",{"data-testid":e.testID,className:e.className,title:e.title},l[0],e.separator,l[1])}switch(e.type){case"select":case"multiselect":return s.createElement(n,{...e,title:e.title,className:e.className,handleOnChange:e.handleOnChange,options:i,value:e.value,disabled:e.disabled,multiple:e.type==="multiselect",listsAsArrays:e.listsAsArrays});case"textarea":return s.createElement("div",{className:`${e.className} control`},s.createElement(r.ValueEditor,{skipHook:!0,...e,className:"textarea"}));case"switch":case"checkbox":return s.createElement("label",{title:e.title,className:`${e.className} checkbox`},s.createElement(r.ValueEditor,{skipHook:!0,...e,title:"",className:""}));case"radio":return s.createElement("div",{className:`${e.className} control`,title:e.title},i.map(l=>s.createElement("label",{key:l.name,className:"radio"},s.createElement("input",{type:"radio",value:l.name,checked:e.value===l.name,onChange:()=>e.handleOnChange(l.name),disabled:e.disabled}),l.label)))}return s.createElement("div",{className:`${e.className} control`},s.createElement(r.ValueEditor,{skipHook:!0,...e,disabled:e.disabled,className:"input"}))};b.displayName="BulmaValueEditor";var f=C(require("react")),N=require("react-querybuilder");var h=require("react-querybuilder");var g=({className:e,handleOnChange:t,options:a,value:n,title:o,disabled:i,multiple:l,listsAsArrays:u})=>{let{onChange:m,val:c}=(0,N.useValueSelector)({handleOnChange:t,listsAsArrays:u,multiple:l,value:n}),E=(0,N.useSelectElementChangeHandler)({multiple:l,onChange:m});return f.createElement("div",{title:o,className:`${e} select${l?" is-multiple":""}`},f.createElement("select",{value:c,multiple:l,disabled:i,onChange:E},(0,h.toOptions)(a)))};g.displayName="BulmaValueSelector";var A={actionElement:"button"},V={notToggle:y,valueEditor:b,valueSelector:g},F=(0,k.getCompatContextProvider)({key:"bulma",controlElements:V,controlClassnames:A});0&&(module.exports={BulmaNotToggle,BulmaValueEditor,BulmaValueSelector,QueryBuilderBulma,bulmaControlClassnames,bulmaControlElements}); | ||
"use strict";var O=Object.create;var d=Object.defineProperty;var B=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var a in t)d(e,a,{get:t[a],enumerable:!0})},x=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!T.call(e,o)&&o!==a&&d(e,o,{get:()=>t[o],enumerable:!(r=B(t,o))||r.enumerable});return e};var h=(e,t,a)=>(a=e!=null?O(S(e)):{},x(t||!e||!e.__esModule?d(a,"default",{value:e,enumerable:!0}):a,e)),H=e=>x(d({},"__esModule",{value:!0}),e);var w={};$(w,{BulmaNotToggle:()=>N,BulmaValueEditor:()=>C,BulmaValueSelector:()=>f,QueryBuilderBulma:()=>F,bulmaControlClassnames:()=>A,bulmaControlElements:()=>E});module.exports=H(w);var k=require("react-querybuilder");var g=h(require("react")),N=({className:e,handleOnChange:t,label:a,checked:r,title:o,disabled:i})=>g.createElement("label",{className:`${e} checkbox`,title:o},g.createElement("input",{type:"checkbox",disabled:i,checked:r,onChange:l=>t(l.target.checked)}),a);var s=h(require("react")),n=require("react-querybuilder"),C=e=>{let{valueAsArray:t,multiValueHandler:a}=(0,n.useValueEditor)({handleOnChange:e.handleOnChange,inputType:e.inputType,operator:e.operator,value:e.value,type:e.type,listsAsArrays:e.listsAsArrays,parseNumbers:e.parseNumbers,values:e.values}),{selectorComponent:r=e.schema.controls.valueSelector}=e;if(e.operator==="null"||e.operator==="notNull")return null;let o=e.fieldData?.placeholder??"",{values:i=[]}=e;if((e.operator==="between"||e.operator==="notBetween")&&(e.type==="select"||e.type==="text")){let l=["from","to"].map((u,c)=>e.type==="text"?s.createElement("input",{key:u,type:e.inputType||"text",placeholder:o,value:t[c]??"",className:`${n.standardClassnames.valueListItem} input`,disabled:e.disabled,onChange:m=>a(m.target.value,c)}):s.createElement(r,{...e,key:u,className:n.standardClassnames.valueListItem,handleOnChange:m=>a(m,c),disabled:e.disabled,value:t[c]??(0,n.getFirstOption)(i),options:i,listsAsArrays:e.listsAsArrays}));return s.createElement("span",{"data-testid":e.testID,className:e.className,title:e.title},l[0],e.separator,l[1])}switch(e.type){case"select":case"multiselect":return s.createElement(r,{...e,title:e.title,className:e.className,handleOnChange:e.handleOnChange,options:i,value:e.value,disabled:e.disabled,multiple:e.type==="multiselect",listsAsArrays:e.listsAsArrays});case"textarea":return s.createElement("div",{className:`${e.className} control`},s.createElement(n.ValueEditor,{skipHook:!0,...e,className:"textarea"}));case"switch":case"checkbox":return s.createElement("label",{title:e.title,className:`${e.className} checkbox`},s.createElement(n.ValueEditor,{skipHook:!0,...e,title:"",className:""}));case"radio":return s.createElement("div",{className:`${e.className} control`,title:e.title},i.map(l=>s.createElement("label",{key:l.name,className:"radio"},s.createElement("input",{type:"radio",value:l.name,checked:e.value===l.name,onChange:()=>e.handleOnChange(l.name),disabled:e.disabled}),l.label)))}return s.createElement("div",{className:`${e.className} control`},s.createElement(n.ValueEditor,{skipHook:!0,...e,disabled:e.disabled,className:"input"}))};var v=h(require("react")),y=require("react-querybuilder");var b=require("react-querybuilder");var f=({className:e,handleOnChange:t,options:a,value:r,title:o,disabled:i,multiple:l,listsAsArrays:u})=>{let{onChange:c,val:m}=(0,y.useValueSelector)({handleOnChange:t,listsAsArrays:u,multiple:l,value:r}),V=(0,y.useSelectElementChangeHandler)({multiple:l,onChange:c});return v.createElement("div",{title:o,className:`${e} select${l?" is-multiple":""}`},v.createElement("select",{value:m,multiple:l,disabled:i,onChange:V},(0,b.toOptions)(a)))};var A={actionElement:"button"},E={notToggle:N,valueEditor:C,valueSelector:f},F=(0,k.getCompatContextProvider)({key:"bulma",controlElements:E,controlClassnames:A});0&&(module.exports={BulmaNotToggle,BulmaValueEditor,BulmaValueSelector,QueryBuilderBulma,bulmaControlClassnames,bulmaControlElements}); | ||
//# sourceMappingURL=react-querybuilder_bulma.cjs.production.js.map |
@@ -42,3 +42,2 @@ var __defProp = Object.defineProperty; | ||
), label); | ||
BulmaNotToggle.displayName = "BulmaNotToggle"; | ||
@@ -138,3 +137,2 @@ // src/BulmaValueEditor.tsx | ||
}; | ||
BulmaValueEditor.displayName = "BulmaValueEditor"; | ||
@@ -172,3 +170,2 @@ // src/BulmaValueSelector.tsx | ||
}; | ||
BulmaValueSelector.displayName = "BulmaValueSelector"; | ||
@@ -175,0 +172,0 @@ // src/index.ts |
{ | ||
"name": "@react-querybuilder/bulma", | ||
"description": "Custom Bulma components for react-querybuilder", | ||
"version": "7.2.1", | ||
"version": "7.3.0", | ||
"publishConfig": { | ||
@@ -47,3 +47,3 @@ "access": "public" | ||
"react-dom": "^18.3.1", | ||
"react-querybuilder": "^7.2.1", | ||
"react-querybuilder": "^7.3.0", | ||
"rollup-plugin-visualizer": "^5.12.0", | ||
@@ -56,5 +56,5 @@ "typescript": "^5.4.5", | ||
"react": ">=18", | ||
"react-querybuilder": "^7.2.1" | ||
"react-querybuilder": "^7.3.0" | ||
}, | ||
"gitHead": "a622cc25eaf454275bb19d2d605fd63bbf496c01" | ||
"gitHead": "ffac253d42030a9607ce33247860f036c0a3a705" | ||
} |
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
89175
618