New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-querybuilder/bulma

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-querybuilder/bulma - npm Package Compare versions

Comparing version 4.5.2 to 5.0.0-alpha.0

22

dist/index.cjs.js

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

"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var R=require("react"),m=require("react-querybuilder");function q(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var I=q(R),k={exports:{}},v={};/**
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react-querybuilder"),Ie=require("react"),mr=f=>f&&typeof f=="object"&&"default"in f?f:{default:f},Be=mr(Ie);var le={exports:{}},L={};/**
* @license React

@@ -9,3 +9,21 @@ * react-jsx-runtime.production.min.js

* LICENSE file in the root directory of this source tree.
*/var L=I.default,P=Symbol.for("react.element"),T=Symbol.for("react.fragment"),G=Object.prototype.hasOwnProperty,O=L.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,W={key:!0,ref:!0,__self:!0,__source:!0};function w(o,t,n){var e,c={},r=null,a=null;n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),t.ref!==void 0&&(a=t.ref);for(e in t)G.call(t,e)&&!W.hasOwnProperty(e)&&(c[e]=t[e]);if(o&&o.defaultProps)for(e in t=o.defaultProps,t)c[e]===void 0&&(c[e]=t[e]);return{$$typeof:P,type:o,key:r,ref:a,props:c,_owner:O.current}}v.Fragment=T;v.jsx=w;v.jsxs=w;k.exports=v;const u=k.exports.jsx,g=k.exports.jsxs,s=({className:o,handleOnClick:t,label:n,title:e,disabled:c,disabledTranslation:r})=>u("button",{type:"button",className:`button is-small ${o}`,title:r&&c?r.title:e,onClick:a=>t(a),disabled:c&&!r,children:r&&c?r.label:n});s.displayName="BulmaActionElement";const b=({className:o,handleOnChange:t,label:n,checked:e,title:c,disabled:r})=>g("label",{className:`${o} checkbox`,title:c,children:[u("input",{type:"checkbox",disabled:r,checked:e,onChange:a=>t(a.target.checked)}),n]});b.displayName="BulmaNotToggle";const p=({className:o,handleOnChange:t,options:n,value:e,title:c,disabled:r,multiple:a,listsAsArrays:f})=>{const d=R.useMemo(()=>a?i=>{const _=Array.from(i.target.selectedOptions).map(h=>h.value);t(f?_:m.joinWith(_,","))}:i=>t(i.target.value),[t,f,a]),y=a?Array.isArray(e)?e:m.splitBy(e,","):e;return u("div",{title:c,className:`${o} select is-small`,children:u("select",{value:y,multiple:!!a,disabled:r,onChange:d,children:m.toOptions(n)})})};p.displayName="BulmaValueSelector";const B=({fieldData:o,operator:t,value:n,handleOnChange:e,title:c,className:r,type:a,inputType:f,values:d=[],listsAsArrays:y,disabled:i,testID:_,...h})=>{var S;if(m.useValueEditor({handleOnChange:e,inputType:f,operator:t,value:n}),t==="null"||t==="notNull")return null;const E=(S=o==null?void 0:o.placeholder)!=null?S:"",A=["between","notBetween","in","notIn"].includes(t)?"text":f||"text";if((t==="between"||t==="notBetween")&&a==="select"){const l=m.toArray(n),C=N=>{var j,$;const x=[N,($=l[1])!=null?$:(j=d[0])==null?void 0:j.name,...l.slice(2)];e(y?x:m.joinWith(x,","))},V=N=>{const x=[l[0],N,...l.slice(2)];e(y?x:m.joinWith(x,","))};return g("span",{"data-testid":_,className:r,title:c,children:[u(p,{...h,className:m.standardClassnames.valueListItem,handleOnChange:C,disabled:i,value:l[0],options:d,listsAsArrays:y}),u(p,{...h,className:m.standardClassnames.valueListItem,handleOnChange:V,disabled:i,value:l[1],options:d,listsAsArrays:y})]})}switch(a){case"select":case"multiselect":return u(p,{...h,title:c,className:r,handleOnChange:e,options:d,value:n,disabled:i,multiple:a==="multiselect",listsAsArrays:y});case"textarea":return u("div",{className:`${r} control`,children:u("textarea",{value:n,title:c,disabled:i,className:"textarea",placeholder:E,onChange:l=>e(l.target.value)})});case"switch":case"checkbox":return u("label",{title:c,className:`${r} checkbox`,children:u("input",{type:"checkbox",checked:!!n,disabled:i,onChange:l=>e(l.target.checked)})});case"radio":return u("div",{className:`${r} control`,title:c,children:d.map(l=>g("label",{className:"radio",children:[u("input",{type:"radio",value:l.name,checked:n===l.name,onChange:()=>e(l.name),disabled:i}),l.label]},l.name))})}return u("div",{className:`${r} control`,children:u("input",{type:A,value:n,title:c,disabled:i,className:"input is-small",placeholder:E,onChange:l=>e(l.target.value)})})};B.displayName="BulmaValueEditor";const M={notToggle:b,valueEditor:B,addGroupAction:s,addRuleAction:s,cloneGroupAction:s,cloneRuleAction:s,combinatorSelector:p,fieldSelector:p,operatorSelector:p,lockRuleAction:s,lockGroupAction:s,removeGroupAction:s,removeRuleAction:s,valueSourceSelector:p};exports.BulmaActionElement=s;exports.BulmaNotToggle=b;exports.BulmaValueEditor=B;exports.BulmaValueSelector=p;exports.bulmaControlElements=M;
*/var $e;function hr(){if($e)return L;$e=1;var f=Be.default,p=Symbol.for("react.element"),b=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,g=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function y(C,s,T){var l,S={},x=null,D=null;T!==void 0&&(x=""+T),s.key!==void 0&&(x=""+s.key),s.ref!==void 0&&(D=s.ref);for(l in s)c.call(s,l)&&!d.hasOwnProperty(l)&&(S[l]=s[l]);if(C&&C.defaultProps)for(l in s=C.defaultProps,s)S[l]===void 0&&(S[l]=s[l]);return{$$typeof:p,type:C,key:x,ref:D,props:S,_owner:g.current}}return L.Fragment=b,L.jsx=y,L.jsxs=y,L}var M={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ne;function gr(){return Ne||(Ne=1,process.env.NODE_ENV!=="production"&&function(){var f=Be.default,p=Symbol.for("react.element"),b=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),C=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),U=Symbol.iterator,q="@@iterator";function m(e){if(e===null||typeof e!="object")return null;var r=U&&e[U]||e[q];return typeof r=="function"?r:null}var F=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];W("error",e,t)}}function W(e,r,t){{var n=F.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var $=!1,G=!1,J=!1,Ve=!1,Ye=!1,fe;fe=Symbol.for("react.module.reference");function Le(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===d||Ye||e===g||e===T||e===l||Ve||e===D||$||G||J||typeof e=="object"&&e!==null&&(e.$$typeof===x||e.$$typeof===S||e.$$typeof===y||e.$$typeof===C||e.$$typeof===s||e.$$typeof===fe||e.getModuleId!==void 0))}function Me(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function de(e){return e.displayName||"Context"}function j(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case b:return"Portal";case d:return"Profiler";case g:return"StrictMode";case T:return"Suspense";case l:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C:var r=e;return de(r)+".Consumer";case y:var t=e;return de(t._context)+".Provider";case s:return Me(e,e.render,"ForwardRef");case S:var n=e.displayName||null;return n!==null?n:j(e.type)||"Memo";case x:{var i=e,u=i._payload,o=i._init;try{return j(o(u))}catch{return null}}}return null}var N=Object.assign,V=0,ve,pe,me,he,ge,ye,be;function Ee(){}Ee.__reactDisabledLog=!0;function Ue(){{if(V===0){ve=console.log,pe=console.info,me=console.warn,he=console.error,ge=console.group,ye=console.groupCollapsed,be=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ee,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}}function qe(){{if(V--,V===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},e,{value:ve}),info:N({},e,{value:pe}),warn:N({},e,{value:me}),error:N({},e,{value:he}),group:N({},e,{value:ge}),groupCollapsed:N({},e,{value:ye}),groupEnd:N({},e,{value:be})})}V<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=F.ReactCurrentDispatcher,ee;function z(e,r,t){{if(ee===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ee=n&&n[1]||""}return`
`+ee+e}}var re=!1,H;{var Ge=typeof WeakMap=="function"?WeakMap:Map;H=new Ge}function _e(e,r){if(!e||re)return"";{var t=H.get(e);if(t!==void 0)return t}var n;re=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=Z.current,Z.current=null,Ue();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(k){n=k}Reflect.construct(e,[],o)}else{try{o.call()}catch(k){n=k}e.call(o.prototype)}}else{try{throw Error()}catch(k){n=k}e()}}catch(k){if(k&&n&&typeof k.stack=="string"){for(var a=k.stack.split(`
`),_=n.stack.split(`
`),v=a.length-1,h=_.length-1;v>=1&&h>=0&&a[v]!==_[h];)h--;for(;v>=1&&h>=0;v--,h--)if(a[v]!==_[h]){if(v!==1||h!==1)do if(v--,h--,h<0||a[v]!==_[h]){var w=`
`+a[v].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,w),w}while(v>=1&&h>=0);break}}}finally{re=!1,Z.current=u,qe(),Error.prepareStackTrace=i}var B=e?e.displayName||e.name:"",De=B?z(B):"";return typeof e=="function"&&H.set(e,De),De}function Je(e,r,t){return _e(e,!1)}function ze(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,ze(e));if(typeof e=="string")return z(e);switch(e){case T:return z("Suspense");case l:return z("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case s:return Je(e.render);case S:return K(e.type,r,t);case x:{var n=e,i=n._payload,u=n._init;try{return K(u(i),r,t)}catch{}}}return""}var Q=Object.prototype.hasOwnProperty,Re={},Te=F.ReactDebugCurrentFrame;function X(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function He(e,r,t,n,i){{var u=Function.call.bind(Q);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var _=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){a=v}a&&!(a instanceof Error)&&(X(i),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),X(null)),a instanceof Error&&!(a.message in Re)&&(Re[a.message]=!0,X(i),E("Failed %s type: %s",t,a.message),X(null))}}}var Ke=Array.isArray;function te(e){return Ke(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Xe(e){try{return Se(e),!1}catch{return!0}}function Se(e){return""+e}function Ce(e){if(Xe(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),Se(e)}var Y=F.ReactCurrentOwner,Ze={key:!0,ref:!0,__self:!0,__source:!0},xe,we,ne;ne={};function er(e){if(Q.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if(Q.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var t=j(Y.current.type);ne[t]||(E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',j(Y.current.type),e.ref),ne[t]=!0)}}function nr(e,r){{var t=function(){xe||(xe=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){we||(we=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var or=function(e,r,t,n,i,u,o){var a={$$typeof:p,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ir(e,r,t,n,i){{var u,o={},a=null,_=null;t!==void 0&&(Ce(t),a=""+t),rr(r)&&(Ce(r.key),a=""+r.key),er(r)&&(_=r.ref,tr(r,i));for(u in r)Q.call(r,u)&&!Ze.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var v=e.defaultProps;for(u in v)o[u]===void 0&&(o[u]=v[u])}if(a||_){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&nr(o,h),_&&ar(o,h)}return or(e,a,_,i,n,Y.current,o)}}var ae=F.ReactCurrentOwner,Pe=F.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var oe;oe=!1;function ie(e){return typeof e=="object"&&e!==null&&e.$$typeof===p}function Oe(){{if(ae.current){var e=j(ae.current.type);if(e)return`
Check the render method of \``+e+"`."}return""}}function ur(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
Check your code at `+r+":"+t+"."}return""}}var je={};function lr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
Check the top-level render call using <`+t+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(je[t])return;je[t]=!0;var n="";e&&e._owner&&e._owner!==ae.current&&(n=" It was passed a child from "+j(e._owner.type)+"."),I(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),I(null)}}function Ae(e,r){{if(typeof e!="object")return;if(te(e))for(var t=0;t<e.length;t++){var n=e[t];ie(n)&&ke(n,r)}else if(ie(e))e._store&&(e._store.validated=!0);else if(e){var i=m(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)ie(o.value)&&ke(o.value,r)}}}function cr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===s||r.$$typeof===S))t=r.propTypes;else return;if(t){var n=j(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!oe){oe=!0;var i=j(r);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){I(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),I(null);break}}e.ref!==null&&(I(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}}function Fe(e,r,t,n,i,u){{var o=Le(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _=ur(i);_?a+=_:a+=Oe();var v;e===null?v="null":te(e)?v="array":e!==void 0&&e.$$typeof===p?(v="<"+(j(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,a)}var h=ir(e,r,t,i,u);if(h==null)return h;if(o){var w=r.children;if(w!==void 0)if(n)if(te(w)){for(var B=0;B<w.length;B++)Ae(w[B],e);Object.freeze&&Object.freeze(w)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(w,e)}return e===c?sr(h):cr(h),h}}function fr(e,r,t){return Fe(e,r,t,!0)}function dr(e,r,t){return Fe(e,r,t,!1)}var vr=dr,pr=fr;M.Fragment=c,M.jsx=vr,M.jsxs=pr}()),M}(function(f){process.env.NODE_ENV==="production"?f.exports=hr():f.exports=gr()})(le);const R=le.exports.jsx,ue=le.exports.jsxs,P=({className:f,handleOnClick:p,label:b,title:c,disabled:g,disabledTranslation:d})=>R("button",{type:"button",className:`button is-small ${f}`,title:d&&g?d.title:c,onClick:y=>p(y),disabled:g&&!d,children:d&&g?d.label:b});P.displayName="BulmaActionElement";const ce=({className:f,handleOnChange:p,label:b,checked:c,title:g,disabled:d})=>ue("label",{className:`${f} checkbox`,title:g,children:[R("input",{type:"checkbox",disabled:d,checked:c,onChange:y=>p(y.target.checked)}),b]});ce.displayName="BulmaNotToggle";const A=({className:f,handleOnChange:p,options:b,value:c,title:g,disabled:d,multiple:y,listsAsArrays:C})=>{const s=Ie.useMemo(()=>y?l=>{const S=Array.from(l.target.selectedOptions).map(x=>x.value);p(C?S:O.joinWith(S,","))}:l=>p(l.target.value),[p,C,y]),T=y?Array.isArray(c)?c:O.splitBy(c,","):c;return R("div",{title:g,className:`${f} select is-small`,children:R("select",{value:T,multiple:!!y,disabled:d,onChange:s,children:O.toOptions(b)})})};A.displayName="BulmaValueSelector";const se=({fieldData:f,operator:p,value:b,handleOnChange:c,title:g,className:d,type:y,inputType:C,values:s=[],listsAsArrays:T,disabled:l,testID:S,...x})=>{var q;if(O.useValueEditor({handleOnChange:c,inputType:C,operator:p,value:b}),p==="null"||p==="notNull")return null;const D=(q=f==null?void 0:f.placeholder)!=null?q:"",U=["between","notBetween","in","notIn"].includes(p)?"text":C||"text";if((p==="between"||p==="notBetween")&&y==="select"){const m=O.toArray(b),F=W=>{var G,J;const $=[W,(J=m[1])!=null?J:(G=s[0])==null?void 0:G.name,...m.slice(2)];c(T?$:O.joinWith($,","))},E=W=>{const $=[m[0],W,...m.slice(2)];c(T?$:O.joinWith($,","))};return ue("span",{"data-testid":S,className:d,title:g,children:[R(A,{...x,className:O.standardClassnames.valueListItem,handleOnChange:F,disabled:l,value:m[0],options:s,listsAsArrays:T}),R(A,{...x,className:O.standardClassnames.valueListItem,handleOnChange:E,disabled:l,value:m[1],options:s,listsAsArrays:T})]})}switch(y){case"select":case"multiselect":return R(A,{...x,title:g,className:d,handleOnChange:c,options:s,value:b,disabled:l,multiple:y==="multiselect",listsAsArrays:T});case"textarea":return R("div",{className:`${d} control`,children:R("textarea",{value:b,title:g,disabled:l,className:"textarea",placeholder:D,onChange:m=>c(m.target.value)})});case"switch":case"checkbox":return R("label",{title:g,className:`${d} checkbox`,children:R("input",{type:"checkbox",checked:!!b,disabled:l,onChange:m=>c(m.target.checked)})});case"radio":return R("div",{className:`${d} control`,title:g,children:s.map(m=>ue("label",{className:"radio",children:[R("input",{type:"radio",value:m.name,checked:b===m.name,onChange:()=>c(m.name),disabled:l}),m.label]},m.name))})}return R("div",{className:`${d} control`,children:R("input",{type:U,value:b,title:g,disabled:l,className:"input is-small",placeholder:D,onChange:m=>c(m.target.value)})})};se.displayName="BulmaValueEditor";const We={notToggle:ce,valueEditor:se,addGroupAction:P,addRuleAction:P,cloneGroupAction:P,cloneRuleAction:P,combinatorSelector:A,fieldSelector:A,operatorSelector:A,lockRuleAction:P,lockGroupAction:P,removeGroupAction:P,removeRuleAction:P,valueSourceSelector:A},yr=O.getCompatContextProvider({key:"bulma",controlElements:We});exports.BulmaActionElement=P;exports.BulmaNotToggle=ce;exports.BulmaValueEditor=se;exports.BulmaValueSelector=A;exports.QueryBuilderBulma=yr;exports.bulmaControlElements=We;
//# sourceMappingURL=index.cjs.js.map

@@ -1,5 +0,4 @@

import require$$0, { useMemo } from "react";
import { joinWith, splitBy, toOptions, useValueEditor, toArray, standardClassnames } from "react-querybuilder";
var jsxRuntime = { exports: {} };
var reactJsxRuntime_production_min = {};
import { joinWith as ie, splitBy as pr, toOptions as mr, useValueEditor as hr, toArray as gr, standardClassnames as Fe, getCompatContextProvider as yr } from "react-querybuilder";
import $e, { useMemo as Er } from "react";
var ce = { exports: {} }, V = {};
/**

@@ -14,170 +13,752 @@ * @license React

*/
var f = require$$0, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
function q(c, a, g) {
var b, d = {}, e = null, h = null;
g !== void 0 && (e = "" + g);
a.key !== void 0 && (e = "" + a.key);
a.ref !== void 0 && (h = a.ref);
for (b in a)
m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
if (c && c.defaultProps)
for (b in a = c.defaultProps, a)
d[b] === void 0 && (d[b] = a[b]);
return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
var De;
function br() {
if (De)
return V;
De = 1;
var b = $e, v = Symbol.for("react.element"), y = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, h = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
function g(S, s, T) {
var c, x = {}, C = null, F = null;
T !== void 0 && (C = "" + T), s.key !== void 0 && (C = "" + s.key), s.ref !== void 0 && (F = s.ref);
for (c in s)
l.call(s, c) && !f.hasOwnProperty(c) && (x[c] = s[c]);
if (S && S.defaultProps)
for (c in s = S.defaultProps, s)
x[c] === void 0 && (x[c] = s[c]);
return { $$typeof: v, type: S, key: C, ref: F, props: x, _owner: h.current };
}
return V.Fragment = y, V.jsx = g, V.jsxs = g, V;
}
reactJsxRuntime_production_min.Fragment = l;
reactJsxRuntime_production_min.jsx = q;
reactJsxRuntime_production_min.jsxs = q;
{
jsxRuntime.exports = reactJsxRuntime_production_min;
var L = {};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var Ne;
function Rr() {
return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
var b = $e, v = Symbol.for("react.element"), y = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), S = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), M = Symbol.iterator, U = "@@iterator";
function p(e) {
if (e === null || typeof e != "object")
return null;
var r = M && e[M] || e[U];
return typeof r == "function" ? r : null;
}
var j = b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function E(e) {
{
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
t[n - 1] = arguments[n];
W("error", e, t);
}
}
function W(e, r, t) {
{
var n = j.ReactDebugCurrentFrame, i = n.getStackAddendum();
i !== "" && (r += "%s", t = t.concat([i]));
var u = t.map(function(o) {
return String(o);
});
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
}
}
var D = !1, G = !1, q = !1, Ye = !1, Be = !1, le;
le = Symbol.for("react.module.reference");
function Ve(e) {
return !!(typeof e == "string" || typeof e == "function" || e === l || e === f || Be || e === h || e === T || e === c || Ye || e === F || D || G || q || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === x || e.$$typeof === g || e.$$typeof === S || e.$$typeof === s || e.$$typeof === le || e.getModuleId !== void 0));
}
function Le(e, r, t) {
var n = e.displayName;
if (n)
return n;
var i = r.displayName || r.name || "";
return i !== "" ? t + "(" + i + ")" : t;
}
function se(e) {
return e.displayName || "Context";
}
function P(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
return e.displayName || e.name || null;
if (typeof e == "string")
return e;
switch (e) {
case l:
return "Fragment";
case y:
return "Portal";
case f:
return "Profiler";
case h:
return "StrictMode";
case T:
return "Suspense";
case c:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case S:
var r = e;
return se(r) + ".Consumer";
case g:
var t = e;
return se(t._context) + ".Provider";
case s:
return Le(e, e.render, "ForwardRef");
case x:
var n = e.displayName || null;
return n !== null ? n : P(e.type) || "Memo";
case C: {
var i = e, u = i._payload, o = i._init;
try {
return P(o(u));
} catch {
return null;
}
}
}
return null;
}
var N = Object.assign, Y = 0, fe, de, ve, pe, me, he, ge;
function ye() {
}
ye.__reactDisabledLog = !0;
function Me() {
{
if (Y === 0) {
fe = console.log, de = console.info, ve = console.warn, pe = console.error, me = console.group, he = console.groupCollapsed, ge = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: ye,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
});
}
Y++;
}
}
function Ue() {
{
if (Y--, Y === 0) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: N({}, e, {
value: fe
}),
info: N({}, e, {
value: de
}),
warn: N({}, e, {
value: ve
}),
error: N({}, e, {
value: pe
}),
group: N({}, e, {
value: me
}),
groupCollapsed: N({}, e, {
value: he
}),
groupEnd: N({}, e, {
value: ge
})
});
}
Y < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var Q = j.ReactCurrentDispatcher, Z;
function J(e, r, t) {
{
if (Z === void 0)
try {
throw Error();
} catch (i) {
var n = i.stack.trim().match(/\n( *(at )?)/);
Z = n && n[1] || "";
}
return `
` + Z + e;
}
}
var ee = !1, z;
{
var Ge = typeof WeakMap == "function" ? WeakMap : Map;
z = new Ge();
}
function Ee(e, r) {
if (!e || ee)
return "";
{
var t = z.get(e);
if (t !== void 0)
return t;
}
var n;
ee = !0;
var i = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var u;
u = Q.current, Q.current = null, Me();
try {
if (r) {
var o = function() {
throw Error();
};
if (Object.defineProperty(o.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(o, []);
} catch (O) {
n = O;
}
Reflect.construct(e, [], o);
} else {
try {
o.call();
} catch (O) {
n = O;
}
e.call(o.prototype);
}
} else {
try {
throw Error();
} catch (O) {
n = O;
}
e();
}
} catch (O) {
if (O && n && typeof O.stack == "string") {
for (var a = O.stack.split(`
`), R = n.stack.split(`
`), d = a.length - 1, m = R.length - 1; d >= 1 && m >= 0 && a[d] !== R[m]; )
m--;
for (; d >= 1 && m >= 0; d--, m--)
if (a[d] !== R[m]) {
if (d !== 1 || m !== 1)
do
if (d--, m--, m < 0 || a[d] !== R[m]) {
var w = `
` + a[d].replace(" at new ", " at ");
return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, w), w;
}
while (d >= 1 && m >= 0);
break;
}
}
} finally {
ee = !1, Q.current = u, Ue(), Error.prepareStackTrace = i;
}
var I = e ? e.displayName || e.name : "", Ae = I ? J(I) : "";
return typeof e == "function" && z.set(e, Ae), Ae;
}
function qe(e, r, t) {
return Ee(e, !1);
}
function Je(e) {
var r = e.prototype;
return !!(r && r.isReactComponent);
}
function H(e, r, t) {
if (e == null)
return "";
if (typeof e == "function")
return Ee(e, Je(e));
if (typeof e == "string")
return J(e);
switch (e) {
case T:
return J("Suspense");
case c:
return J("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case s:
return qe(e.render);
case x:
return H(e.type, r, t);
case C: {
var n = e, i = n._payload, u = n._init;
try {
return H(u(i), r, t);
} catch {
}
}
}
return "";
}
var K = Object.prototype.hasOwnProperty, be = {}, Re = j.ReactDebugCurrentFrame;
function X(e) {
if (e) {
var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
Re.setExtraStackFrame(t);
} else
Re.setExtraStackFrame(null);
}
function ze(e, r, t, n, i) {
{
var u = Function.call.bind(K);
for (var o in e)
if (u(e, o)) {
var a = void 0;
try {
if (typeof e[o] != "function") {
var R = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw R.name = "Invariant Violation", R;
}
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (d) {
a = d;
}
a && !(a instanceof Error) && (X(i), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), X(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, X(i), E("Failed %s type: %s", t, a.message), X(null));
}
}
}
var He = Array.isArray;
function re(e) {
return He(e);
}
function Ke(e) {
{
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
return t;
}
}
function Xe(e) {
try {
return _e(e), !1;
} catch {
return !0;
}
}
function _e(e) {
return "" + e;
}
function Te(e) {
if (Xe(e))
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), _e(e);
}
var B = j.ReactCurrentOwner, Qe = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, xe, Se, te;
te = {};
function Ze(e) {
if (K.call(e, "ref")) {
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
if (r && r.isReactWarning)
return !1;
}
return e.ref !== void 0;
}
function er(e) {
if (K.call(e, "key")) {
var r = Object.getOwnPropertyDescriptor(e, "key").get;
if (r && r.isReactWarning)
return !1;
}
return e.key !== void 0;
}
function rr(e, r) {
if (typeof e.ref == "string" && B.current && r && B.current.stateNode !== r) {
var t = P(B.current.type);
te[t] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(B.current.type), e.ref), te[t] = !0);
}
}
function tr(e, r) {
{
var t = function() {
xe || (xe = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};
t.isReactWarning = !0, Object.defineProperty(e, "key", {
get: t,
configurable: !0
});
}
}
function nr(e, r) {
{
var t = function() {
Se || (Se = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
};
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
get: t,
configurable: !0
});
}
}
var ar = function(e, r, t, n, i, u, o) {
var a = {
$$typeof: v,
type: e,
key: r,
ref: t,
props: o,
_owner: u
};
return a._store = {}, Object.defineProperty(a._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(a, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: n
}), Object.defineProperty(a, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: i
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
};
function or(e, r, t, n, i) {
{
var u, o = {}, a = null, R = null;
t !== void 0 && (Te(t), a = "" + t), er(r) && (Te(r.key), a = "" + r.key), Ze(r) && (R = r.ref, rr(r, i));
for (u in r)
K.call(r, u) && !Qe.hasOwnProperty(u) && (o[u] = r[u]);
if (e && e.defaultProps) {
var d = e.defaultProps;
for (u in d)
o[u] === void 0 && (o[u] = d[u]);
}
if (a || R) {
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
a && tr(o, m), R && nr(o, m);
}
return ar(e, a, R, i, n, B.current, o);
}
}
var ne = j.ReactCurrentOwner, Ce = j.ReactDebugCurrentFrame;
function $(e) {
if (e) {
var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
Ce.setExtraStackFrame(t);
} else
Ce.setExtraStackFrame(null);
}
var ae;
ae = !1;
function oe(e) {
return typeof e == "object" && e !== null && e.$$typeof === v;
}
function we() {
{
if (ne.current) {
var e = P(ne.current.type);
if (e)
return `
Check the render method of \`` + e + "`.";
}
return "";
}
}
function ir(e) {
{
if (e !== void 0) {
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
return `
Check your code at ` + r + ":" + t + ".";
}
return "";
}
}
var Pe = {};
function ur(e) {
{
var r = we();
if (!r) {
var t = typeof e == "string" ? e : e.displayName || e.name;
t && (r = `
Check the top-level render call using <` + t + ">.");
}
return r;
}
}
function Oe(e, r) {
{
if (!e._store || e._store.validated || e.key != null)
return;
e._store.validated = !0;
var t = ur(r);
if (Pe[t])
return;
Pe[t] = !0;
var n = "";
e && e._owner && e._owner !== ne.current && (n = " It was passed a child from " + P(e._owner.type) + "."), $(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), $(null);
}
}
function ke(e, r) {
{
if (typeof e != "object")
return;
if (re(e))
for (var t = 0; t < e.length; t++) {
var n = e[t];
oe(n) && Oe(n, r);
}
else if (oe(e))
e._store && (e._store.validated = !0);
else if (e) {
var i = p(e);
if (typeof i == "function" && i !== e.entries)
for (var u = i.call(e), o; !(o = u.next()).done; )
oe(o.value) && Oe(o.value, r);
}
}
}
function cr(e) {
{
var r = e.type;
if (r == null || typeof r == "string")
return;
var t;
if (typeof r == "function")
t = r.propTypes;
else if (typeof r == "object" && (r.$$typeof === s || r.$$typeof === x))
t = r.propTypes;
else
return;
if (t) {
var n = P(r);
ze(t, e.props, "prop", n, e);
} else if (r.PropTypes !== void 0 && !ae) {
ae = !0;
var i = P(r);
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function lr(e) {
{
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
var n = r[t];
if (n !== "children" && n !== "key") {
$(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), $(null);
break;
}
}
e.ref !== null && ($(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
}
}
function je(e, r, t, n, i, u) {
{
var o = Ve(e);
if (!o) {
var a = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var R = ir(i);
R ? a += R : a += we();
var d;
e === null ? d = "null" : re(e) ? d = "array" : e !== void 0 && e.$$typeof === v ? (d = "<" + (P(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
}
var m = or(e, r, t, i, u);
if (m == null)
return m;
if (o) {
var w = r.children;
if (w !== void 0)
if (n)
if (re(w)) {
for (var I = 0; I < w.length; I++)
ke(w[I], e);
Object.freeze && Object.freeze(w);
} else
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
ke(w, e);
}
return e === l ? lr(m) : cr(m), m;
}
}
function sr(e, r, t) {
return je(e, r, t, !0);
}
function fr(e, r, t) {
return je(e, r, t, !1);
}
var dr = fr, vr = sr;
L.Fragment = l, L.jsx = dr, L.jsxs = vr;
}()), L;
}
const jsx = jsxRuntime.exports.jsx;
const jsxs = jsxRuntime.exports.jsxs;
const BulmaActionElement = ({
className,
handleOnClick,
label,
title,
disabled,
disabledTranslation
}) => /* @__PURE__ */ jsx("button", {
(function(b) {
process.env.NODE_ENV === "production" ? b.exports = br() : b.exports = Rr();
})(ce);
const _ = ce.exports.jsx, ue = ce.exports.jsxs, k = ({
className: b,
handleOnClick: v,
label: y,
title: l,
disabled: h,
disabledTranslation: f
}) => /* @__PURE__ */ _("button", {
type: "button",
className: `button is-small ${className}`,
title: disabledTranslation && disabled ? disabledTranslation.title : title,
onClick: (e) => handleOnClick(e),
disabled: disabled && !disabledTranslation,
children: disabledTranslation && disabled ? disabledTranslation.label : label
className: `button is-small ${b}`,
title: f && h ? f.title : l,
onClick: (g) => v(g),
disabled: h && !f,
children: f && h ? f.label : y
});
BulmaActionElement.displayName = "BulmaActionElement";
const BulmaNotToggle = ({
className,
handleOnChange,
label,
checked,
title,
disabled
}) => /* @__PURE__ */ jsxs("label", {
className: `${className} checkbox`,
title,
children: [/* @__PURE__ */ jsx("input", {
k.displayName = "BulmaActionElement";
const Ie = ({
className: b,
handleOnChange: v,
label: y,
checked: l,
title: h,
disabled: f
}) => /* @__PURE__ */ ue("label", {
className: `${b} checkbox`,
title: h,
children: [/* @__PURE__ */ _("input", {
type: "checkbox",
disabled,
checked,
onChange: (e) => handleOnChange(e.target.checked)
}), label]
disabled: f,
checked: l,
onChange: (g) => v(g.target.checked)
}), y]
});
BulmaNotToggle.displayName = "BulmaNotToggle";
const BulmaValueSelector = ({
className,
handleOnChange,
options,
value,
title,
disabled,
multiple,
listsAsArrays
Ie.displayName = "BulmaNotToggle";
const A = ({
className: b,
handleOnChange: v,
options: y,
value: l,
title: h,
disabled: f,
multiple: g,
listsAsArrays: S
}) => {
const onChange = useMemo(() => multiple ? (e) => {
const valArray = Array.from(e.target.selectedOptions).map((o) => o.value);
handleOnChange(listsAsArrays ? valArray : joinWith(valArray, ","));
} : (e) => handleOnChange(e.target.value), [handleOnChange, listsAsArrays, multiple]);
const val = multiple ? Array.isArray(value) ? value : splitBy(value, ",") : value;
return /* @__PURE__ */ jsx("div", {
title,
className: `${className} select is-small`,
children: /* @__PURE__ */ jsx("select", {
value: val,
multiple: !!multiple,
disabled,
onChange,
children: toOptions(options)
const s = Er(() => g ? (c) => {
const x = Array.from(c.target.selectedOptions).map((C) => C.value);
v(S ? x : ie(x, ","));
} : (c) => v(c.target.value), [v, S, g]), T = g ? Array.isArray(l) ? l : pr(l, ",") : l;
return /* @__PURE__ */ _("div", {
title: h,
className: `${b} select is-small`,
children: /* @__PURE__ */ _("select", {
value: T,
multiple: !!g,
disabled: f,
onChange: s,
children: mr(y)
})
});
};
BulmaValueSelector.displayName = "BulmaValueSelector";
const BulmaValueEditor = ({
fieldData,
operator,
value,
handleOnChange,
title,
className,
type,
inputType,
values = [],
listsAsArrays,
disabled,
testID,
...props
A.displayName = "BulmaValueSelector";
const We = ({
fieldData: b,
operator: v,
value: y,
handleOnChange: l,
title: h,
className: f,
type: g,
inputType: S,
values: s = [],
listsAsArrays: T,
disabled: c,
testID: x,
...C
}) => {
var _a;
useValueEditor({
handleOnChange,
inputType,
operator,
value
});
if (operator === "null" || operator === "notNull") {
var U;
if (hr({
handleOnChange: l,
inputType: S,
operator: v,
value: y
}), v === "null" || v === "notNull")
return null;
}
const placeHolderText = (_a = fieldData == null ? void 0 : fieldData.placeholder) != null ? _a : "";
const inputTypeCoerced = ["between", "notBetween", "in", "notIn"].includes(operator) ? "text" : inputType || "text";
if ((operator === "between" || operator === "notBetween") && type === "select") {
const valArray = toArray(value);
const selector1handler = (v) => {
var _a2, _b;
const val = [v, (_b = valArray[1]) != null ? _b : (_a2 = values[0]) == null ? void 0 : _a2.name, ...valArray.slice(2)];
handleOnChange(listsAsArrays ? val : joinWith(val, ","));
const F = (U = b == null ? void 0 : b.placeholder) != null ? U : "", M = ["between", "notBetween", "in", "notIn"].includes(v) ? "text" : S || "text";
if ((v === "between" || v === "notBetween") && g === "select") {
const p = gr(y), j = (W) => {
var G, q;
const D = [W, (q = p[1]) != null ? q : (G = s[0]) == null ? void 0 : G.name, ...p.slice(2)];
l(T ? D : ie(D, ","));
}, E = (W) => {
const D = [p[0], W, ...p.slice(2)];
l(T ? D : ie(D, ","));
};
const selector2handler = (v) => {
const val = [valArray[0], v, ...valArray.slice(2)];
handleOnChange(listsAsArrays ? val : joinWith(val, ","));
};
return /* @__PURE__ */ jsxs("span", {
"data-testid": testID,
className,
title,
children: [/* @__PURE__ */ jsx(BulmaValueSelector, {
...props,
className: standardClassnames.valueListItem,
handleOnChange: selector1handler,
disabled,
value: valArray[0],
options: values,
listsAsArrays
}), /* @__PURE__ */ jsx(BulmaValueSelector, {
...props,
className: standardClassnames.valueListItem,
handleOnChange: selector2handler,
disabled,
value: valArray[1],
options: values,
listsAsArrays
return /* @__PURE__ */ ue("span", {
"data-testid": x,
className: f,
title: h,
children: [/* @__PURE__ */ _(A, {
...C,
className: Fe.valueListItem,
handleOnChange: j,
disabled: c,
value: p[0],
options: s,
listsAsArrays: T
}), /* @__PURE__ */ _(A, {
...C,
className: Fe.valueListItem,
handleOnChange: E,
disabled: c,
value: p[1],
options: s,
listsAsArrays: T
})]
});
}
switch (type) {
switch (g) {
case "select":
case "multiselect":
return /* @__PURE__ */ jsx(BulmaValueSelector, {
...props,
title,
className,
handleOnChange,
options: values,
value,
disabled,
multiple: type === "multiselect",
listsAsArrays
return /* @__PURE__ */ _(A, {
...C,
title: h,
className: f,
handleOnChange: l,
options: s,
value: y,
disabled: c,
multiple: g === "multiselect",
listsAsArrays: T
});
case "textarea":
return /* @__PURE__ */ jsx("div", {
className: `${className} control`,
children: /* @__PURE__ */ jsx("textarea", {
value,
title,
disabled,
return /* @__PURE__ */ _("div", {
className: `${f} control`,
children: /* @__PURE__ */ _("textarea", {
value: y,
title: h,
disabled: c,
className: "textarea",
placeholder: placeHolderText,
onChange: (e) => handleOnChange(e.target.value)
placeholder: F,
onChange: (p) => l(p.target.value)
})

@@ -187,59 +768,69 @@ });

case "checkbox":
return /* @__PURE__ */ jsx("label", {
title,
className: `${className} checkbox`,
children: /* @__PURE__ */ jsx("input", {
return /* @__PURE__ */ _("label", {
title: h,
className: `${f} checkbox`,
children: /* @__PURE__ */ _("input", {
type: "checkbox",
checked: !!value,
disabled,
onChange: (e) => handleOnChange(e.target.checked)
checked: !!y,
disabled: c,
onChange: (p) => l(p.target.checked)
})
});
case "radio":
return /* @__PURE__ */ jsx("div", {
className: `${className} control`,
title,
children: values.map((v) => /* @__PURE__ */ jsxs("label", {
return /* @__PURE__ */ _("div", {
className: `${f} control`,
title: h,
children: s.map((p) => /* @__PURE__ */ ue("label", {
className: "radio",
children: [/* @__PURE__ */ jsx("input", {
children: [/* @__PURE__ */ _("input", {
type: "radio",
value: v.name,
checked: value === v.name,
onChange: () => handleOnChange(v.name),
disabled
}), v.label]
}, v.name))
value: p.name,
checked: y === p.name,
onChange: () => l(p.name),
disabled: c
}), p.label]
}, p.name))
});
}
return /* @__PURE__ */ jsx("div", {
className: `${className} control`,
children: /* @__PURE__ */ jsx("input", {
type: inputTypeCoerced,
value,
title,
disabled,
return /* @__PURE__ */ _("div", {
className: `${f} control`,
children: /* @__PURE__ */ _("input", {
type: M,
value: y,
title: h,
disabled: c,
className: "input is-small",
placeholder: placeHolderText,
onChange: (e) => handleOnChange(e.target.value)
placeholder: F,
onChange: (p) => l(p.target.value)
})
});
};
BulmaValueEditor.displayName = "BulmaValueEditor";
const bulmaControlElements = {
notToggle: BulmaNotToggle,
valueEditor: BulmaValueEditor,
addGroupAction: BulmaActionElement,
addRuleAction: BulmaActionElement,
cloneGroupAction: BulmaActionElement,
cloneRuleAction: BulmaActionElement,
combinatorSelector: BulmaValueSelector,
fieldSelector: BulmaValueSelector,
operatorSelector: BulmaValueSelector,
lockRuleAction: BulmaActionElement,
lockGroupAction: BulmaActionElement,
removeGroupAction: BulmaActionElement,
removeRuleAction: BulmaActionElement,
valueSourceSelector: BulmaValueSelector
We.displayName = "BulmaValueEditor";
const _r = {
notToggle: Ie,
valueEditor: We,
addGroupAction: k,
addRuleAction: k,
cloneGroupAction: k,
cloneRuleAction: k,
combinatorSelector: A,
fieldSelector: A,
operatorSelector: A,
lockRuleAction: k,
lockGroupAction: k,
removeGroupAction: k,
removeRuleAction: k,
valueSourceSelector: A
}, Sr = yr({
key: "bulma",
controlElements: _r
});
export {
k as BulmaActionElement,
Ie as BulmaNotToggle,
We as BulmaValueEditor,
A as BulmaValueSelector,
Sr as QueryBuilderBulma,
_r as bulmaControlElements
};
export { BulmaActionElement, BulmaNotToggle, BulmaValueEditor, BulmaValueSelector, bulmaControlElements };
//# sourceMappingURL=index.es.js.map

@@ -0,1 +1,4 @@

declare global {
var __RQB_DEV__: boolean;
}
export {};

1

dist/types/BulmaActionElement.d.ts

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

/// <reference types="react" />
import type { ActionProps } from 'react-querybuilder';

@@ -3,0 +2,0 @@ export declare const BulmaActionElement: {

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

/// <reference types="react" />
import type { NotToggleProps } from 'react-querybuilder';

@@ -3,0 +2,0 @@ export declare const BulmaNotToggle: {

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

/// <reference types="react" />
import { type ValueEditorProps } from 'react-querybuilder';

@@ -3,0 +2,0 @@ export declare const BulmaValueEditor: {

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

/// <reference types="react" />
import { type ValueSelectorProps } from 'react-querybuilder';
import type { ValueSelectorProps } from 'react-querybuilder';
export declare const BulmaValueSelector: {

@@ -4,0 +3,0 @@ ({ className, handleOnChange, options, value, title, disabled, multiple, listsAsArrays, }: ValueSelectorProps): JSX.Element;

@@ -7,2 +7,3 @@ import type { Controls } from 'react-querybuilder';

export declare const bulmaControlElements: Partial<Controls>;
export declare const QueryBuilderBulma: import("react-querybuilder").QueryBuilderContextProvider;
export { BulmaActionElement, BulmaNotToggle, BulmaValueEditor, BulmaValueSelector };
{
"name": "@react-querybuilder/bulma",
"description": "Custom Bulma components for react-querybuilder",
"version": "4.5.2",
"version": "5.0.0-alpha.0",
"publishConfig": {

@@ -28,7 +28,10 @@ "access": "public"

"devDependencies": {
"@types/react": "^18.0.0",
"@vitejs/plugin-react": "^1.3.0",
"react": "^18.1.0",
"react-querybuilder": "^4.5.2",
"typescript": "^4.5.0"
"@testing-library/react": "^13.3.0",
"@types/react": "^18.0.17",
"@vitejs/plugin-react": "^2.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-querybuilder": "^5.0.0-alpha.0",
"typescript": "^4.7.4",
"vite": "^3.0.9"
},

@@ -38,5 +41,5 @@ "peerDependencies": {

"react": ">=16.8.0",
"react-querybuilder": ">=4"
"react-querybuilder": "^5.0.0-alpha.0"
},
"gitHead": "3d6c5159ede5b976429dddaa0d8ce079bd6b82a3"
"gitHead": "cf2b33d6a179741aca874e3f62735790071605ac"
}

@@ -17,6 +17,8 @@ ## @react-querybuilder/bulma

This package exports `bulmaControlElements` which can be assigned directly to the `controlElements` prop on `<QueryBuilder />`, and also exports each component individually. However, the recommended usage is to wrap a `<QueryBuilder />` element in `<QueryBuilderBulma />`, like this:
```tsx
import { bulmaControlElements } from '@react-querybuilder/bulma';
import { QueryBuilderBulma } from '@react-querybuilder/bulma';
import 'bulma/bulma.sass';
import { QueryBuilder, RuleGroupType } from 'react-querybuilder';
import 'bulma/bulma.sass';

@@ -32,8 +34,5 @@ const fields = [

return (
<QueryBuilder
fields={fields}
query={query}
onQueryChange={q => setQuery(q)}
controlElements={bulmaControlElements}
/>
<QueryBuilderBulma>
<QueryBuilder fields={fields} query={query} onQueryChange={q => setQuery(q)} />
</QueryBuilderBulma>
);

@@ -40,0 +39,0 @@ };

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