PageSourceSearch

https://www.abrakam.com/_nuxt/Ti6VjZWe.js

js abrakam.com collected 2026-10-05 11:14:23 UTC 3,372 bytes, 1 lines download raw bytes

1import{_ as D}from"./CCznr5nm.js";import{i as E,f as y}from"./u7C6va8a.js";import{u as T}from"./CzNJiMGN.js";import{e as W,Z as i,r as C,I as j,ab as I,b1 as S,m as w,q as c,aB as A,Q as p,x as u,t as B,z as x,y as V,E as k,a7 as v,aH as F,a2 as P,b7 as U}from"./QioNVTSo.js";import"./DOpAuep7.js";import"./Cnc5sV1b.js";import"./CaXIdjsj.js";import"./CirhvtmI.js";const G={class:"flex gap-2"},Y=W({__name:"FilterRule",props:{fieldChoices:{type:Object,required:!0},rule:{type:Object,required:!0}},emits:["delete"],async setup(o,{emit:R}){let $,h;const r=o,b=T(),f=Object.fromEntries(Object.entries(E).map(([t,e])=>[t,e()])),d=b.value.collections[b.value.collection],s={$eq:i("pruvious-dashboard","Equal to"),$eqi:i("pruvious-dashboard","Equal to (case-insensitive)"),$ne:i("pruvious-dashboard","Not equal to"),$gt:i("pruvious-dashboard","Greater than"),$gte:i("pruvious-dashboard","Greater than or equal to"),$lt:i("pruvious-dashboard","Less than"),$lte:i("pruvious-dashboard","Less than or equal to"),$startsWith:i("pruvious-dashboard","Starts with (case-insensitive)"),$endsWith:i("pruvious-dashboard","Ends with (case-insensitive)"),$iLike:i("pruvious-dashboard","Contains (case-insensitive)"),$notILike:i("pruvious-dashboard","Does not contain (case-insensitive)")},a=C({}),g=C({});N(),q(),[$,h]=j(()=>I("pruvious-dashboard")),await $,h();function N(){g.value={...d.fields[r.rule.fieldName].options,description:"",label:"",trim:!0}}function L(t){const e=y[d.fields[t.fieldName].type];t.operator="$eq",t.value=e==="boolean"?!1:e==="number"?0:"",N(),q()}function q(){const t=y[d.fields[r.rule.fieldName].type];a.value={$eq:s.$eq},t==="string"&&(a.value.$eqi=s.$eqi),a.value.$ne=s.$ne,t==="number"&&(a.value.$gt=s.$gt,a.value.$gte=s.$gte,a.value.$lt=s.$lt,a.value.$lte=s.$lte),t==="string"&&(a.value.$startsWith=s.$startsWith,a.value.$endsWith=s.$endsWith,a.value.$iLike=s.$iLike,a.value.$notILike=s.$notILike)}async function O(t,e){if(!F(t))return[];const m=await P(`collections/${d.name}`,{query:{select:r.rule.fieldName,where:`${r.rule.fieldName}[!=][]`+(t.trim()?",every:["+U(t).map(n=>`${r.rule.fieldName}[ilike][%${n}%]`).join(",")+"]":""),page:e,perPage:30,order:r.rule.fieldName,group:r.rule.fieldName}});return m.success?m.data.records.map(n=>({value:n[r.rule.fieldName],label:n[r.rule.fieldName]})):[]}return(t,e)=>{const m=D,n=S("pruvious-tooltip");return c(),w("div",G,[A((c(),w("button",{onClick:e[0]||(e[0]=l=>t.$emit("delete")),"data-ignore-autofocus":"",type:"button",class:"button button-white-red button-square"},[B(m)])),[[n,u(i)("pruvious-dashboard","Remove")]]),(c(),p(v(u(f).select),{modelValue:o.rule.fieldName,"onUpdate:modelValue":[e[1]||(e[1]=l=>o.rule.fieldName=l),e[2]||(e[2]=l=>L(o.rule))],ignoreAutofocus:!0,options:{choices:o.fieldChoices},class:"!w-0 flex-1"},{default:x(()=>[V(k(o.rule.fieldName),1)]),_:1},8,["modelValue","options"])),(c(),p(v(u(f).select),{modelValue:o.rule.operator,"onUpdate:modelValue":e[3]||(e[3]=l=>o.rule.operator=l),ignoreAutofocus:!0,options:{choices:u(a)},class:"!w-0 flex-1"},{default:x(()=>[V(k(o.rule.operator),1)]),_:1},8,["modelValue","options"])),(c(),p(v(u(f)[u(d).fields[o.rule.fieldName].type]),{modelValue:o.rule.value,"onUpdate:modelValue":e[4]||(e[4]=l=>o.rule.value=l),ignoreAutofocus:!0,options:u(g),suggestions:O,class:"!w-0 flex-1"},null,8,["modelValue","options"]))])}}});export{Y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.