@react-querybuilder/bulma
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -1,2 +0,2 @@ | ||
"use strict";var h=Object.defineProperty,v=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var x=(e,t,l)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,S=(e,t)=>{for(var l in t||(t={}))B.call(t,l)&&x(e,l,t[l]);if(E)for(var l of E(t))N.call(t,l)&&x(e,l,t[l]);return e},$=(e,t)=>v(e,G(t));var w=(e,t)=>{var l={};for(var c in e)B.call(e,c)&&t.indexOf(c)<0&&(l[c]=e[c]);if(e!=null&&E)for(var c of E(e))t.indexOf(c)<0&&N.call(e,c)&&(l[c]=e[c]);return l};Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";var d=require("react");function _(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var o=_(d);const m=({className:e,handleOnClick:t,label:l,title:c,disabled:n,disabledTranslation:a})=>o.default.createElement("button",{type:"button",className:`${e} button is-small`,title:a&&n?a.title:c,onClick:u=>t(u),disabled:n&&!a},a&&n?a.label:l);m.displayName="BulmaActionElement";const y=({className:e,handleOnChange:t,label:l,checked:c,title:n,disabled:a})=>o.default.createElement("label",{className:`${e} checkbox`,title:n},o.default.createElement("input",{type:"checkbox",disabled:a,checked:c,onChange:u=>t(u.target.checked)}),l);y.displayName="BulmaNotToggle";const j=e=>Array.isArray(e)&&e.length>0&&"options"in e[0],M=e=>j(e)?e.map(t=>o.default.createElement("optgroup",{key:t.label,label:t.label},t.options.map(l=>o.default.createElement("option",{key:l.name,value:l.name},l.label)))):Array.isArray(e)?e.map(t=>o.default.createElement("option",{key:t.name,value:t.name},t.label)):null,i=({className:e,handleOnChange:t,options:l,value:c,title:n,disabled:a,multiple:u})=>{const f=d.useMemo(()=>u?p=>t([...p.target.options].filter(s=>s.selected).map(s=>s.value).join(",")):p=>t(p.target.value),[t,u]);return o.default.createElement("div",{title:n,className:`${e} select is-small`},o.default.createElement("select",{value:u&&c?c.split(","):c,multiple:!!u,disabled:a,onChange:f},M(l)))};i.displayName="BulmaValueSelector";const b=I=>{var g=I,{fieldData:e,operator:t,value:l,handleOnChange:c,title:n,className:a,type:u,inputType:f,values:p,disabled:s}=g,R=w(g,["fieldData","operator","value","handleOnChange","title","className","type","inputType","values","disabled"]);var A;if(d.useEffect(()=>{f==="number"&&!["between","notBetween","in","notIn"].includes(t)&&typeof l=="string"&&l.includes(",")&&c("")},[f,t,l,c]),t==="null"||t==="notNull")return null;const k=(A=e==null?void 0:e.placeholder)!=null?A:"",V=["between","notBetween","in","notIn"].includes(t)?"text":f||"text";switch(u){case"select":case"multiselect":return o.default.createElement(i,$(S({},R),{title:n,className:a,handleOnChange:c,options:p,value:l,disabled:s,multiple:u==="multiselect"}));case"textarea":return o.default.createElement("div",{className:`${a} control`},o.default.createElement("textarea",{value:l,title:n,disabled:s,className:"textarea",placeholder:k,onChange:r=>c(r.target.value)}));case"switch":case"checkbox":return o.default.createElement("label",{title:n,className:`${a} checkbox`},o.default.createElement("input",{type:"checkbox",checked:!!l,disabled:s,onChange:r=>c(r.target.checked)}));case"radio":return o.default.createElement("div",{className:`${a} control`,title:n},p.map(r=>o.default.createElement("label",{key:r.name,className:"radio"},o.default.createElement("input",{type:"radio",value:r.name,checked:l===r.name,onChange:()=>c(r.name),disabled:s}),r.label)))}return o.default.createElement("div",{className:`${a} control`},o.default.createElement("input",{type:V,value:l,title:n,disabled:s,className:"input is-small",placeholder:k,onChange:r=>c(r.target.value)}))};b.displayName="BulmaValueEditor";const C={notToggle:y,valueEditor:b,addGroupAction:m,addRuleAction:m,cloneGroupAction:m,cloneRuleAction:m,combinatorSelector:i,fieldSelector:i,operatorSelector:i,lockRuleAction:m,lockGroupAction:m,removeGroupAction:m,removeRuleAction:m,valueSourceSelector:i};exports.BulmaActionElement=m;exports.BulmaNotToggle=y;exports.BulmaValueEditor=b;exports.BulmaValueSelector=i;exports.bulmaControlElements=C; | ||
"use strict";var V=Object.defineProperty,h=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var B=(e,t,l)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,S=(e,t)=>{for(var l in t||(t={}))N.call(t,l)&&B(e,l,t[l]);if(E)for(var l of E(t))x.call(t,l)&&B(e,l,t[l]);return e},$=(e,t)=>h(e,G(t));var v=(e,t)=>{var l={};for(var c in e)N.call(e,c)&&t.indexOf(c)<0&&(l[c]=e[c]);if(e!=null&&E)for(var c of E(e))t.indexOf(c)<0&&x.call(e,c)&&(l[c]=e[c]);return l};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var d=require("react");function _(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var a=_(d);const m=({className:e,handleOnClick:t,label:l,title:c,disabled:n,disabledTranslation:o})=>a.default.createElement("button",{type:"button",className:`${e} button is-small`,title:o&&n?o.title:c,onClick:u=>t(u),disabled:n&&!o},o&&n?o.label:l);m.displayName="BulmaActionElement";const y=({className:e,handleOnChange:t,label:l,checked:c,title:n,disabled:o})=>a.default.createElement("label",{className:`${e} checkbox`,title:n},a.default.createElement("input",{type:"checkbox",disabled:o,checked:c,onChange:u=>t(u.target.checked)}),l);y.displayName="BulmaNotToggle";const j=e=>Array.isArray(e)&&e.length>0&&"options"in e[0],M=e=>j(e)?e.map(t=>a.default.createElement("optgroup",{key:t.label,label:t.label},t.options.map(l=>a.default.createElement("option",{key:l.name,value:l.name},l.label)))):Array.isArray(e)?e.map(t=>a.default.createElement("option",{key:t.name,value:t.name},t.label)):null,i=({className:e,handleOnChange:t,options:l,value:c,title:n,disabled:o,multiple:u})=>{const f=d.useMemo(()=>u?p=>t([...p.target.options].filter(s=>s.selected).map(s=>s.value).join(",")):p=>t(p.target.value),[t,u]);return a.default.createElement("div",{title:n,className:`${e} select is-small`},a.default.createElement("select",{value:u&&c?c.split(","):c,multiple:!!u,disabled:o,onChange:f},M(l)))};i.displayName="BulmaValueSelector";const b=I=>{var g=I,{fieldData:e,operator:t,value:l,handleOnChange:c,title:n,className:o,type:u,inputType:f,values:p,disabled:s}=g,w=v(g,["fieldData","operator","value","handleOnChange","title","className","type","inputType","values","disabled"]);var A;if(d.useEffect(()=>{f==="number"&&!["between","notBetween","in","notIn"].includes(t)&&typeof l=="string"&&l.includes(",")&&c("")},[f,t,l,c]),t==="null"||t==="notNull")return null;const k=(A=e==null?void 0:e.placeholder)!=null?A:"",R=["between","notBetween","in","notIn"].includes(t)?"text":f||"text";switch(u){case"select":case"multiselect":return a.default.createElement(i,$(S({},w),{title:n,className:o,handleOnChange:c,options:p,value:l,disabled:s,multiple:u==="multiselect"}));case"textarea":return a.default.createElement("div",{className:`${o} control`},a.default.createElement("textarea",{value:l,title:n,disabled:s,className:"textarea",placeholder:k,onChange:r=>c(r.target.value)}));case"switch":case"checkbox":return a.default.createElement("label",{title:n,className:`${o} checkbox`},a.default.createElement("input",{type:"checkbox",checked:!!l,disabled:s,onChange:r=>c(r.target.checked)}));case"radio":return a.default.createElement("div",{className:`${o} control`,title:n},p.map(r=>a.default.createElement("label",{key:r.name,className:"radio"},a.default.createElement("input",{type:"radio",value:r.name,checked:l===r.name,onChange:()=>c(r.name),disabled:s}),r.label)))}return a.default.createElement("div",{className:`${o} control`},a.default.createElement("input",{type:R,value:l,title:n,disabled:s,className:"input is-small",placeholder:k,onChange:r=>c(r.target.value)}))};b.displayName="BulmaValueEditor";const C={notToggle:y,valueEditor:b,addGroupAction:m,addRuleAction:m,cloneGroupAction:m,cloneRuleAction:m,combinatorSelector:i,fieldSelector:i,operatorSelector:i,lockRuleAction:m,lockGroupAction:m,removeGroupAction:m,removeRuleAction:m,valueSourceSelector:i};exports.BulmaActionElement=m;exports.BulmaNotToggle=y;exports.BulmaValueEditor=b;exports.BulmaValueSelector=i;exports.bulmaControlElements=C; | ||
//# sourceMappingURL=index.cjs.js.map |
{ | ||
"name": "@react-querybuilder/bulma", | ||
"description": "Custom Bulma components for react-querybuilder", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"publishConfig": { | ||
@@ -29,3 +29,3 @@ "access": "public" | ||
"react": "^17.0.1", | ||
"react-querybuilder": "^4.2.2", | ||
"react-querybuilder": "^4.2.3", | ||
"typescript": "^4.5.0" | ||
@@ -38,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "7cbb02520fd4f2839115c607303090bb31bfbf54" | ||
"gitHead": "9b24113aaec6fc64711bcbaa694ff2eeb12c5e70" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37632