@svgrid/enterprise 3.1.61 → 3.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{toDate as b}from"./format.js";import{maxOf as nt,minOf as rt}from"../extent.js";export class FormulaError extends Error{}export function tokenize(t){const n=[];let e=0;for(;e<t.length;){const r=t[e];if(/\s/.test(r)){e++;continue}if(r==="{"){const i=t.indexOf("}",e);if(i<0)throw new FormulaError(`Unclosed "{" at ${e+1}`);n.push({k:"ref",v:t.slice(e+1,i).trim(),at:e}),e=i+1;continue}if(r==='"'||r==="'"){let i=e+1,c="";for(;i<t.length&&t[i]!==r;){if(t[i]==="\\"&&i+1<t.length){c+=t[i+1],i+=2;continue}c+=t[i++]}if(i>=t.length)throw new FormulaError(`Unclosed text at ${e+1}`);n.push({k:"str",v:c,at:e}),e=i+1;continue}const l=/^\d+(\.\d+)?|^\.\d+/.exec(t.slice(e));if(l){n.push({k:"num",v:l[0],at:e}),e+=l[0].length;continue}const s=/^[A-Za-z_][A-Za-z0-9_]*/.exec(t.slice(e));if(s){n.push({k:"id",v:s[0],at:e}),e+=s[0].length;continue}const f=/^(!=|<=|>=|<>|[-+*/&=<>])/.exec(t.slice(e));if(f){n.push({k:"op",v:f[0]==="<>"?"!=":f[0],at:e}),e+=f[0].length;continue}if(r==="("||r===")"||r===","){n.push({k:r,v:r,at:e}),e++;continue}throw new FormulaError(`Unexpected "${r}" at ${e+1}`)}return n}const S=t=>t==null||t===""||Array.isArray(t)&&t.length===0,u=t=>{if(typeof t=="number")return t;if(typeof t=="boolean")return t?1:0;if(t instanceof Date)return t.getTime();if(t==null||t==="")return 0;if(Array.isArray(t))return t.reduce((e,r)=>e+u(r),0);const n=Number(t);return Number.isFinite(n)?n:NaN},o=t=>t==null?"":t instanceof Date?t.toISOString():Array.isArray(t)?t.map(o).join(", "):String(t),A=t=>!S(t)&&t!==!1&&t!==0,lt=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;export function isoDate(t){const n=t.trim();return lt.test(n)?b(n):null}const h=t=>{if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;if(t==null||t===""||typeof t=="boolean")return null;if(typeof t=="number")return b(t);const n=o(t).trim();return isoDate(n)??(/\d{4}/.test(n)&&/[/\s,.-]/.test(n)?b(n):null)},d=t=>t.flatMap(n=>Array.isArray(n)?n:[n]),k=t=>{const n=o(Array.isArray(t)?t.find(s=>!S(s))??null:t).replace(/%2C/gi,","),e=/(?<![\d.])(-?\d{1,2}(?:\.\d+)?)\s*,\s*(-?\d{1,3}(?:\.\d+)?)/.exec(n);if(!e)return null;const r=Number(e[1]),l=Number(e[2]);return Math.abs(r)<=90&&Math.abs(l)<=180?{lat:r,lng:l}:null},st=(t,n)=>{const e=l=>l*Math.PI/180,r=Math.sin(e(n.lat-t.lat)/2)**2+Math.cos(e(t.lat))*Math.cos(e(n.lat))*Math.sin(e(n.lng-t.lng)/2)**2;return Math.round(2*6371e3*Math.asin(Math.min(1,Math.sqrt(r))))},M=t=>String(t).padStart(2,"0"),R=t=>Number(t.toPrecision(12)),ot={milliseconds:"ms",millisecond:"ms",ms:"ms",seconds:"s",second:"s",s:"s",minutes:"m",minute:"m",m:"m",hours:"h",hour:"h",h:"h",days:"d",day:"d",d:"d",weeks:"w",week:"w",w:"w",months:"mo",month:"mo",quarters:"q",quarter:"q",q:"q",years:"y",year:"y",y:"y"},x={ms:1,s:1e3,m:6e4,h:36e5},L=t=>ot[o(t).trim().toLowerCase()]??null;function W(t,n){const e=new Date(t),r=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+n),e.setDate(Math.min(r,new Date(e.getFullYear(),e.getMonth()+1,0).getDate())),e}function ut(t,n,e){if(x[e])return new Date(t.getTime()+n*x[e]);if(e==="mo"||e==="q"||e==="y")return W(t,Math.trunc(n)*(e==="y"?12:e==="q"?3:1));const r=n*(e==="w"?7:1),l=new Date(t);return l.setDate(l.getDate()+Math.trunc(r)),new Date(l.getTime()+(r-Math.trunc(r))*864e5)}const I=t=>t.getTime()-t.getTimezoneOffset()*6e4;function _(t,n,e){if(x[e])return Math.trunc((t.getTime()-n.getTime())/x[e]);if(e==="d"||e==="w")return Math.trunc((I(t)-I(n))/(e==="w"?6048e5:864e5));let r=(t.getFullYear()-n.getFullYear())*12+t.getMonth()-n.getMonth();const l=W(n,r).getTime();return r>0&&l>t.getTime()?r-=1:r<0&&l<t.getTime()&&(r+=1),e==="y"?Math.trunc(r/12):e==="q"?Math.trunc(r/3):r}function O(t,n){if(n==="ms")return t.getTime();const e=new Date(t);return n==="s"?e.setMilliseconds(0):n==="m"?e.setSeconds(0,0):n==="h"?e.setMinutes(0,0,0):(e.setHours(0,0,0,0),n==="w"&&e.setDate(e.getDate()-e.getDay()),(n==="mo"||n==="q"||n==="y")&&e.setDate(1),n==="q"&&e.setMonth(e.getMonth()-e.getMonth()%3),n==="y"&&e.setMonth(0),e.getTime())}const N=t=>`${t.getFullYear()}-${M(t.getMonth()+1)}-${M(t.getDate())}`;function z(t){const n=d([t??null]).flatMap(e=>typeof e=="string"?e.split(","):[e]);return new Set(n.map(e=>h(typeof e=="string"?e.trim():e)).filter(e=>!!e).map(N))}const X=(t,n)=>t.getDay()!==0&&t.getDay()!==6&&!n.has(N(t)),q=1e5;class it extends Date{}function j(t,n){const e=new it(t.getTime()),r=t;return e.locale=n.locale??r.locale,e.zone=n.zone??r.zone,e}const v=new Map;function G(t){let n=v.get(t);return n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hourCycle:"h23",weekday:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),v.set(t,n)),n}const ct=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function at(t){const n=t.zone,e=t.getMilliseconds();if(!n)return{y:t.getFullYear(),mo:t.getMonth(),d:t.getDate(),h:t.getHours(),mi:t.getMinutes(),s:t.getSeconds(),ms:e,wd:t.getDay(),offset:-t.getTimezoneOffset()};const r={};for(const s of G(n).formatToParts(t))r[s.type]=s.value;const l={y:+r.year,mo:+r.month-1,d:+r.day,h:+r.hour%24,mi:+r.minute,s:+r.second,ms:e,wd:ct.indexOf(r.weekday),offset:0};return l.offset=Math.round((Date.UTC(l.y,l.mo,l.d,l.h,l.mi,l.s,e)-t.getTime())/6e4),l}const K=new Map;function $(t,n,e,r){const l=`${t??"en"}|${n}|${e}`;let s=K.get(l);return s||K.set(l,s=new Intl.DateTimeFormat(t??"en",{[n]:e,timeZone:"UTC"})),s.format(n==="month"?Date.UTC(2023,r,1):Date.UTC(2023,0,1+r))}const ft=t=>{const n=t%100;return`${t}${n>=11&&n<=13?"th":["th","st","nd","rd"][t%10]??"th"}`},B=(t,n)=>{const e=Math.abs(t);return`${t<0?"-":"+"}${M(Math.floor(e/60))}${n?":":""}${M(e%60)}`},ht={LTS:"h:mm:ss A",LT:"h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A",LLL:"MMMM D, YYYY h:mm A",LL:"MMMM D, YYYY",L:"MM/DD/YYYY"},mt=/\[([^\]]*)]|YYYY|YY|Q|MMMM|MMM|MM|M|DDDD|DDD|Do|DD|D|dddd|ddd|d|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z|X|x/g;function dt(t,n){const e=at(t),r=t.locale,l=n.replace(/\[[^\]]*]|LTS|LT|LLLL|LLL|LL|L/g,i=>ht[i]??i),s=e.h%12||12,f=Math.round((Date.UTC(e.y,e.mo,e.d)-Date.UTC(e.y,0,1))/864e5)+1;return l.replace(mt,(i,c)=>{if(c!==void 0)return c;switch(i){case"YYYY":return String(e.y).padStart(4,"0");case"YY":return M(e.y%100);case"Q":return String(Math.floor(e.mo/3)+1);case"MMMM":return $(r,"month","long",e.mo);case"MMM":return $(r,"month","short",e.mo);case"MM":return M(e.mo+1);case"M":return String(e.mo+1);case"DDDD":return String(f).padStart(3,"0");case"DDD":return String(f);case"Do":return ft(e.d);case"DD":return M(e.d);case"D":return String(e.d);case"dddd":return $(r,"weekday","long",e.wd);case"ddd":return $(r,"weekday","short",e.wd);case"d":return String(e.wd);case"HH":return M(e.h);case"H":return String(e.h);case"hh":return M(s);case"h":return String(s);case"mm":return M(e.mi);case"m":return String(e.mi);case"ss":return M(e.s);case"s":return String(e.s);case"SSS":return String(e.ms).padStart(3,"0");case"SS":return M(Math.floor(e.ms/10));case"S":return String(Math.floor(e.ms/100));case"A":return e.h<12?"AM":"PM";case"a":return e.h<12?"am":"pm";case"ZZ":return B(e.offset,!1);case"Z":return B(e.offset,!0);case"X":return String(Math.floor(t.getTime()/1e3));default:return String(t.getTime())}})}const Mt=["january","february","march","april","may","june","july","august","september","october","november","december"],gt=/\[([^\]]*)]|YYYY|YY|MMMM|MMM|MM|M|Do|DD|D|dddd|ddd|HH|H|hh|h|mm|m|ss|s|SSS|A|a|ZZ|Z|X|x/g;function Dt(t,n){const e=[];let r="^\\s*",l=0;const s=D=>D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+");for(const D of n.matchAll(gt)){if(r+=s(n.slice(l,D.index)),l=D.index+D[0].length,D[1]!==void 0){r+=s(D[1]);continue}const a=D[0];e.push(a),r+=a==="YYYY"?"(\\d{4})":a==="MMMM"||a==="MMM"||a==="dddd"||a==="ddd"?"([A-Za-z]+)\\.?":a==="Do"?"(\\d{1,2})(?:st|nd|rd|th)":a==="SSS"?"(\\d{1,3})":a==="A"||a==="a"?"([AaPp][Mm])":a==="Z"||a==="ZZ"?"(Z|[+-]\\d{2}:?\\d{2})":a==="X"||a==="x"?"(-?\\d+)":"(\\d{1,2})"}r+=`${s(n.slice(l))}\\s*$`;const f=new RegExp(r,"i").exec(t);if(!f)return null;let i=new Date().getFullYear(),c=0,m=1,g=0,E=0,y=0,w=0,C=null,Y=null;for(let D=0;D<e.length;D++){const a=e[D],T=f[D+1],p=Number(T);if(a==="X"||a==="x")return new Date(a==="X"?p*1e3:p);if(a==="YYYY")i=p;else if(a==="YY")i=p+(p<69?2e3:1900);else if(a==="MMMM"||a==="MMM"){const P=Mt.findIndex(et=>et.startsWith(T.toLowerCase().slice(0,3)));if(P<0)return null;c=P}else a==="MM"||a==="M"?c=p-1:a==="DD"||a==="D"||a==="Do"?m=p:a==="HH"||a==="H"||a==="hh"||a==="h"?g=p:a==="mm"||a==="m"?E=p:a==="ss"||a==="s"?y=p:a==="SSS"?w=Number(T.padEnd(3,"0")):a==="A"||a==="a"?C=T.toLowerCase()==="pm":(a==="Z"||a==="ZZ")&&(Y=T.toUpperCase()==="Z"?0:(T[0]==="-"?-1:1)*(Number(T.slice(1,3))*60+Number(T.slice(-2))))}if(C!=null&&(g=g%12+(C?12:0)),c<0||c>11||m<1||m>31||g>23||E>59||y>59)return null;const U=Y==null?new Date(i,c,m,g,E,y,w):new Date(Date.UTC(i,c,m,g,E,y,w)-Y*6e4);return Y==null&&U.getDate()!==m||Number.isNaN(U.getTime())?null:U}const F=new Map;function H(t,n=!1){const e=`${n?"g":""}|${t}`;let r=F.get(e);if(!r){const l=/^\(\?([ims]+)\)/.exec(t);r=new RegExp(l?t.slice(l[0].length):t,`${l?.[1]??""}${n?"g":""}`),F.size>200&&F.clear(),F.set(e,r)}return r.lastIndex=0,r}const Z="#ERROR",V=t=>`${t instanceof Date?"d":typeof t}:${o(t)}`;function pt(t,n,e){const r=n<0?t.length+n:Math.max(0,n-1),l=e==null?t.length:e<0?t.length+e+1:e;return t.slice(r,l)}function Q(t,n){const e=t<0?-1:1;let r=Math.ceil(Math.abs(t));return r%2===1!==n&&(r+=1),e*r}const J={IF:t=>A(t[0]??null)?t[1]??null:t[2]??null,AND:t=>d(t).every(A),OR:t=>d(t).some(A),NOT:t=>!A(t[0]??null),XOR:t=>d(t).filter(A).length%2===1,TRUE:()=>!0,FALSE:()=>!1,BLANK:()=>null,ERROR:()=>{throw new FormulaError("ERROR()")},ISERROR:t=>t[0]===Z,RECORD_ID:()=>null,SWITCH:t=>{for(let n=1;n+1<t.length;n+=2)if(o(t[0]??null)===o(t[n]??null))return t[n+1]??null;return t.length%2===0?t[t.length-1]??null:null},CONCATENATE:t=>t.map(o).join(""),LEN:t=>o(t[0]??null).length,UPPER:t=>o(t[0]??null).toUpperCase(),LOWER:t=>o(t[0]??null).toLowerCase(),TRIM:t=>o(t[0]??null).trim(),LEFT:t=>o(t[0]??null).slice(0,u(t[1]??1)),RIGHT:t=>{const n=o(t[0]??null),e=u(t[1]??1);return e<=0?"":n.slice(-e)},MID:t=>{const n=o(t[0]??null),e=Math.max(0,u(t[1]??1)-1);return t.length>2?n.slice(e,e+Math.max(0,u(t[2]??0))):n.slice(e)},FIND:t=>o(t[1]??null).indexOf(o(t[0]??null),Math.max(0,u(t[2]??1)-1))+1,SEARCH:t=>{const n=o(t[1]??null).indexOf(o(t[0]??null),Math.max(0,u(t[2]??1)-1));return n<0?null:n+1},SUBSTITUTE:t=>{const n=o(t[0]??null).split(o(t[1]??null));if(t.length<4)return n.join(o(t[2]??null));const e=u(t[3]??null);return n.reduce((r,l,s)=>s===0?l:r+o(s===e?t[2]??null:t[1]??null)+l,"")},REPLACE:t=>{const n=o(t[0]??null),e=Math.max(0,u(t[1]??1)-1);return n.slice(0,e)+o(t[3]??null)+n.slice(e+Math.max(0,u(t[2]??0)))},ENCODE_URL_COMPONENT:t=>encodeURIComponent(o(t[0]??null)),REGEX_MATCH:t=>H(o(t[1]??null)).test(o(t[0]??null)),REGEX_EXTRACT:t=>H(o(t[1]??null)).exec(o(t[0]??null))?.[0]??null,REGEX_REPLACE:t=>o(t[0]??null).replace(H(o(t[1]??null),!0),o(t[2]??null)),REPT:t=>o(t[0]??null).repeat(Math.max(0,Math.min(1e3,u(t[1]??0)))),T:t=>typeof t[0]=="string"?t[0]:"",VALUE:t=>{const n=o(t[0]??null).replace(/[^0-9.eE+-]/g,""),e=/\d/.test(n)?Number(n):NaN;return Number.isFinite(e)?e:null},ARRAYJOIN:t=>d([t[0]??null]).map(o).filter(Boolean).join(t.length>1?o(t[1]??null):", "),ARRAYCOMPACT:t=>d([t[0]??null]).filter(n=>n!=null&&n!==""),ARRAYFLATTEN:t=>t.flat(1/0),ARRAYUNIQUE:t=>{const n=new Set;return d([t[0]??null]).filter(e=>!n.has(V(e))&&!!n.add(V(e)))},ARRAYSLICE:t=>pt(d([t[0]??null]),u(t[1]??1),t.length>2?u(t[2]??null):void 0),SUM:t=>d(t).reduce((n,e)=>n+u(e),0),AVERAGE:t=>{const n=d(t).filter(e=>!S(e));return n.length?n.reduce((e,r)=>e+u(r),0)/n.length:null},MAX:t=>{const n=d(t).filter(e=>!S(e)).map(u);return n.length?nt(n):null},MIN:t=>{const n=d(t).filter(e=>!S(e)).map(u);return n.length?rt(n):null},COUNT:t=>d(t).filter(n=>typeof n=="number").length,COUNTA:t=>d(t).filter(n=>!S(n)).length,COUNTALL:t=>d(t).length,ROUND:t=>{const n=10**u(t[1]??0);return Math.round(u(t[0]??null)*n)/n},ROUNDUP:t=>{const n=10**u(t[1]??0),e=u(t[0]??null);return Math.sign(e)*Math.ceil(R(Math.abs(e)*n))/n},ROUNDDOWN:t=>{const n=10**u(t[1]??0),e=u(t[0]??null);return Math.sign(e)*Math.floor(R(Math.abs(e)*n))/n},INT:t=>Math.floor(u(t[0]??null)),ABS:t=>Math.abs(u(t[0]??null)),MOD:t=>u(t[0]??null)%u(t[1]??1),POWER:t=>u(t[0]??null)**u(t[1]??1),SQRT:t=>Math.sqrt(u(t[0]??null)),EXP:t=>Math.exp(u(t[0]??null)),LOG:t=>Math.log(u(t[0]??null))/Math.log(t.length>1?u(t[1]??null):10),EVEN:t=>Q(u(t[0]??null),!1),ODD:t=>Q(u(t[0]??null),!0),CEILING:t=>{const n=u(t[1]??1);return n===0?0:R(Math.ceil(R(u(t[0]??null)/n))*n)},FLOOR:t=>{const n=u(t[1]??1);return n===0?0:R(Math.floor(R(u(t[0]??null)/n))*n)},DISTANCE:t=>{const n=t.length>=4?k(`${o(t[0]??null)}, ${o(t[1]??null)}`):k(t[0]??null),e=t.length>=4?k(`${o(t[2]??null)}, ${o(t[3]??null)}`):k(t[1]??null);return n&&e?st(n,e):null},TODAY:()=>{const t=new Date;return t.setHours(0,0,0,0),t},NOW:()=>new Date,YEAR:t=>h(t[0]??null)?.getFullYear()??null,MONTH:t=>{const n=h(t[0]??null);return n?n.getMonth()+1:null},DAY:t=>h(t[0]??null)?.getDate()??null,HOUR:t=>h(t[0]??null)?.getHours()??null,MINUTE:t=>h(t[0]??null)?.getMinutes()??null,SECOND:t=>h(t[0]??null)?.getSeconds()??null,WEEKDAY:t=>{const n=h(t[0]??null);return n?/^mon/i.test(o(t[1]??null))?(n.getDay()+6)%7:n.getDay():null},WEEKNUM:t=>{const n=h(t[0]??null);if(!n)return null;const e=/^mon/i.test(o(t[1]??null))?1:0,r=new Date(n.getFullYear(),0,1),l=Math.round((I(new Date(n.getFullYear(),n.getMonth(),n.getDate()))-I(r))/864e5);return Math.floor((l+(r.getDay()-e+7)%7)/7)+1},DATEADD:t=>{const n=h(t[0]??null),e=t.length>2?L(t[2]??null):"d";return n&&e?ut(n,u(t[1]??0),e):null},DATETIME_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?L(t[2]??null):"s";return n&&e&&r?_(n,e,r):null},IS_BEFORE:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n<e},IS_AFTER:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n>e},IS_SAME:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?L(t[2]??null):"ms";return!!n&&!!e&&!!r&&O(n,r)===O(e,r)},DATESTR:t=>{const n=h(t[0]??null);return n?N(n):null},TIMESTR:t=>{const n=h(t[0]??null);return n?`${M(n.getHours())}:${M(n.getMinutes())}:${M(n.getSeconds())}`:null},DATETIME_FORMAT:t=>{const n=h(t[0]??null);return n?dt(n,t.length>1&&!S(t[1]??null)?o(t[1]??null):"YYYY-MM-DDTHH:mm:ss.SSSZ"):null},DATETIME_PARSE:t=>t.length>1&&!S(t[1]??null)?Dt(o(t[0]??null),o(t[1]??null)):h(t[0]??null),SET_LOCALE:t=>{const n=h(t[0]??null),e=o(t[1]??null).trim();return!n||!e?n:j(n,{locale:Intl.DateTimeFormat.supportedLocalesOf(e)[0]??e})},SET_TIMEZONE:t=>{const n=h(t[0]??null),e=o(t[1]??null).trim();return!n||!e?n:(G(e),j(n,{zone:e}))},TONOW:t=>{const n=h(t[0]??null);return n?_(new Date(O(new Date,"d")),new Date(O(n,"d")),"d"):null},FROMNOW:t=>{const n=h(t[0]??null);return n?_(new Date(O(n,"d")),new Date(O(new Date,"d")),"d"):null},WORKDAY:t=>{const n=h(t[0]??null);if(!n)return null;const e=Math.trunc(u(t[1]??0)),r=e<0?-1:1,l=z(t[2]),s=new Date(n);for(let f=Math.abs(e),i=0;f>0;){if(++i>q)return null;s.setDate(s.getDate()+r),X(s,l)&&(f-=1)}return s},WORKDAY_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null);if(!n||!e)return null;const r=z(t[2]),l=n>e?-1:1,s=new Date(l>0?n:e),f=N(l>0?e:n);let i=0;for(let c=0;N(s)<=f;c++){if(c>q)return null;X(s,r)&&(i+=1),s.setDate(s.getDate()+1)}return l*i}};function tt(t,n,e){switch(t){case"=":return n===e;case"!=":return n!==e;case"<":return n<e;case">":return n>e;case"<=":return n<=e;default:return n>=e}}const Tt=new Set(["DATEADD","DATETIME_DIFF","IS_SAME"]);export const FORMULA_FUNCTIONS=Object.keys(J).sort(),selfReferenceError=t=>new FormulaError(`A formula cannot read its own field {${t.trim()}}`);export function columnResolver(t,n=[]){const e=new Set(n.filter(r=>r!=null&&String(r).trim()!=="").map(r=>String(r).trim().toLowerCase()));return r=>{const l=r.trim().toLowerCase();if(e.has(l))throw selfReferenceError(r);const s=t.find(f=>String(f.header??"").trim().toLowerCase()===l||String(f.field??"").toLowerCase()===l);return s?String(s.field??s.id):null}}class St{constructor(n,e,r){this.toks=n,this.resolve=e,this.refs=r,this.i=0}peek(){return this.toks[this.i]}next(){return this.toks[this.i++]}expect(n,e){const r=this.next();if(!r||r.k!==n||e&&r.v!==e)throw new FormulaError(`Expected "${e??n}"${r?` at ${r.at+1}`:" at the end"}`);return r}parse(){const n=this.compare();if(this.peek())throw new FormulaError(`Unexpected "${this.peek().v}" at ${this.peek().at+1}`);return n}compare(){let n=this.concat();for(let e=this.peek();e&&e.k==="op"&&["=","!=","<",">","<=",">="].includes(e.v);e=this.peek()){this.next();const r=e.v,l=n,s=this.concat();n=f=>{const i=l(f),c=s(f);if(i instanceof Date||c instanceof Date){const y=h(i),w=h(c);return!y||!w?r==="!=":tt(r,y.getTime(),w.getTime())}const m=typeof i=="number"||typeof c=="number",g=m?u(i):o(i),E=m?u(c):o(c);return tt(r,g,E)}}return n}concat(){let n=this.add();for(;this.peek()?.k==="op"&&this.peek().v==="&";){this.next();const e=n,r=this.add();n=l=>o(e(l))+o(r(l))}return n}add(){let n=this.mul();for(let e=this.peek();e&&e.k==="op"&&(e.v==="+"||e.v==="-");e=this.peek()){this.next();const r=n,l=this.mul(),s=e.v==="+";n=f=>s?u(r(f))+u(l(f)):u(r(f))-u(l(f))}return n}mul(){let n=this.unary();for(let e=this.peek();e&&e.k==="op"&&(e.v==="*"||e.v==="/");e=this.peek()){this.next();const r=n,l=this.unary(),s=e.v==="*";n=f=>{if(s)return u(r(f))*u(l(f));const i=u(l(f));return i===0?null:u(r(f))/i}}return n}unary(){const n=this.peek();if(n?.k==="op"&&n.v==="-"){this.next();const e=this.unary();return r=>-u(e(r))}return this.primary()}primary(){const n=this.next();if(!n)throw new FormulaError("The formula ends too early");if(n.k==="num"){const e=Number(n.v);return()=>e}if(n.k==="str"){const e=n.v;return()=>e}if(n.k==="ref"){const e=this.resolve(n.v);if(e==null)throw new FormulaError(`No field named "${n.v}"`);return this.refs.add(e),r=>r?.[e]??null}if(n.k==="("){const e=this.compare();return this.expect(")"),e}if(n.k==="id"){const e=n.v.toUpperCase();if(e==="TRUE"&&this.peek()?.k!=="(")return()=>!0;if(e==="FALSE"&&this.peek()?.k!=="(")return()=>!1;const r=J[e];if(!r)throw new FormulaError(`Unknown function ${n.v}`);this.expect("(");const l=[],s=[],f=()=>{const c=this.i;l.push(this.compare());const m=this.i===c+1?this.toks[c]:void 0;s.push(m?.k==="str"?m.v:void 0)};if(this.peek()?.k!==")")for(f();this.peek()?.k===",";)this.next(),f();this.expect(")");const i=s[2];if(Tt.has(e)&&i!==void 0&&!L(i))throw new FormulaError(`Unknown unit "${i}" in ${e}: use ms, seconds, minutes, hours, days, weeks, months, quarters or years`);return e==="RECORD_ID"?c=>c?.id==null?null:String(c.id):e==="ISERROR"?c=>{try{const m=l[0]?.(c)??null;return m===Z||typeof m=="number"&&!Number.isFinite(m)}catch{return!0}}:e==="IF"?c=>A(l[0]?.(c)??null)?l[1]?.(c)??null:l[2]?.(c)??null:e==="SWITCH"?c=>{if(!l.length)return null;const m=o(l[0](c));for(let g=1;g+1<l.length;g+=2)if(m===o(l[g](c)))return l[g+1](c);return l.length%2===0?l[l.length-1](c):null}:c=>r(l.map(m=>m(c)))}throw new FormulaError(`Unexpected "${n.v}" at ${n.at+1}`)}}export function compileFormula(t,n){if(!t.trim())throw new FormulaError("The formula is empty");const e=new Set,r=new St(tokenize(t),n,e).parse();return{fn:l=>{try{const s=r(l);return typeof s=="number"&&!Number.isFinite(s)?null:s}catch(s){return s instanceof FormulaError?Z:null}},refs:[...e]}}export function renameFormulaRefs(t,n){let e;try{e=tokenize(t)}catch{return t}let r="",l=0;for(const s of e){if(s.k!=="ref")continue;const f=n(s.v);if(f==null)continue;const i=t.indexOf("}",s.at);r+=`${t.slice(l,s.at)}{${f}}`,l=i+1}return l?r+t.slice(l):t}export function formulaRefs(t,n){let e;try{e=tokenize(t)}catch{return[]}const r=new Set;for(const l of e)if(l.k==="ref")try{const s=n(l.v);s!=null&&r.add(s)}catch{}return[...r]}export function formulaReaders(t,n){const e=new Set([n.field,n.id].filter(l=>l!=null&&l!=="").map(String));if(!e.size)return[];const r=columnResolver(t);return t.filter(l=>l.fieldType!=="formula"||e.has(String(l.field??l.id??""))?!1:formulaRefs(String(l.fieldProps?.formula??""),r).some(s=>e.has(s)))}export function formulaError(t,n){try{return compileFormula(t,n),null}catch(e){return e instanceof FormulaError?e.message:"The formula is not valid"}}
1
+ import{toDate as _}from"./format.js";import{maxOf as nt,minOf as rt}from"../extent.js";export class FormulaError extends Error{}export function tokenize(t){const n=[];let e=0;for(;e<t.length;){const r=t[e];if(/\s/.test(r)){e++;continue}if(r==="{"){const c=t.indexOf("}",e);if(c<0)throw new FormulaError(`Unclosed "{" at ${e+1}`);n.push({k:"ref",v:t.slice(e+1,c).trim(),at:e}),e=c+1;continue}if(r==='"'||r==="'"){let c=e+1,i="";for(;c<t.length&&t[c]!==r;){if(t[c]==="\\"&&c+1<t.length){i+=t[c+1],c+=2;continue}i+=t[c++]}if(c>=t.length)throw new FormulaError(`Unclosed text at ${e+1}`);n.push({k:"str",v:i,at:e}),e=c+1;continue}const l=/^\d+(\.\d+)?|^\.\d+/.exec(t.slice(e));if(l){n.push({k:"num",v:l[0],at:e}),e+=l[0].length;continue}const s=/^[A-Za-z_][A-Za-z0-9_]*/.exec(t.slice(e));if(s){n.push({k:"id",v:s[0],at:e}),e+=s[0].length;continue}const f=/^(!=|<=|>=|<>|[-+*/&=<>])/.exec(t.slice(e));if(f){n.push({k:"op",v:f[0]==="<>"?"!=":f[0],at:e}),e+=f[0].length;continue}if(r==="("||r===")"||r===","){n.push({k:r,v:r,at:e}),e++;continue}throw new FormulaError(`Unexpected "${r}" at ${e+1}`)}return n}const S=t=>t==null||t===""||Array.isArray(t)&&t.length===0,o=t=>{if(typeof t=="number")return t;if(typeof t=="boolean")return t?1:0;if(t instanceof Date)return t.getTime();if(t==null||t==="")return 0;if(Array.isArray(t))return t.reduce((e,r)=>e+o(r),0);const n=Number(t);return Number.isFinite(n)?n:NaN},u=t=>t==null?"":t instanceof Date?t.toISOString():Array.isArray(t)?t.map(u).join(", "):String(t),w=t=>!S(t)&&t!==!1&&t!==0,lt=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;export function isoDate(t){const n=t.trim();return lt.test(n)?_(n):null}const h=t=>{if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;if(t==null||t===""||typeof t=="boolean")return null;if(typeof t=="number")return _(t);const n=u(t).trim();return isoDate(n)??(/\d{4}/.test(n)&&/[/\s,.-]/.test(n)?_(n):null)},d=t=>t.flatMap(n=>Array.isArray(n)?n:[n]),k=t=>{const n=u(Array.isArray(t)?t.find(s=>!S(s))??null:t).replace(/%2C/gi,","),e=/(?<![\d.])(-?\d{1,2}(?:\.\d+)?)\s*,\s*(-?\d{1,3}(?:\.\d+)?)/.exec(n);if(!e)return null;const r=Number(e[1]),l=Number(e[2]);return Math.abs(r)<=90&&Math.abs(l)<=180?{lat:r,lng:l}:null},st=(t,n)=>{const e=l=>l*Math.PI/180,r=Math.sin(e(n.lat-t.lat)/2)**2+Math.cos(e(t.lat))*Math.cos(e(n.lat))*Math.sin(e(n.lng-t.lng)/2)**2;return Math.round(2*6371e3*Math.asin(Math.min(1,Math.sqrt(r))))},M=t=>String(t).padStart(2,"0"),R=t=>Number(t.toPrecision(12)),ut={milliseconds:"ms",millisecond:"ms",ms:"ms",seconds:"s",second:"s",s:"s",minutes:"m",minute:"m",m:"m",hours:"h",hour:"h",h:"h",days:"d",day:"d",d:"d",weeks:"w",week:"w",w:"w",months:"mo",month:"mo",quarters:"q",quarter:"q",q:"q",years:"y",year:"y",y:"y"},x={ms:1,s:1e3,m:6e4,h:36e5},I=t=>ut[u(t).trim().toLowerCase()]??null;function W(t,n){const e=new Date(t),r=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+n),e.setDate(Math.min(r,new Date(e.getFullYear(),e.getMonth()+1,0).getDate())),e}function ot(t,n,e){if(x[e])return new Date(t.getTime()+n*x[e]);if(e==="mo"||e==="q"||e==="y")return W(t,Math.trunc(n)*(e==="y"?12:e==="q"?3:1));const r=n*(e==="w"?7:1),l=new Date(t);return l.setDate(l.getDate()+Math.trunc(r)),new Date(l.getTime()+(r-Math.trunc(r))*864e5)}const L=t=>t.getTime()-t.getTimezoneOffset()*6e4;function b(t,n,e){if(x[e])return Math.trunc((t.getTime()-n.getTime())/x[e]);if(e==="d"||e==="w")return Math.trunc((L(t)-L(n))/(e==="w"?6048e5:864e5));let r=(t.getFullYear()-n.getFullYear())*12+t.getMonth()-n.getMonth();const l=W(n,r).getTime();return r>0&&l>t.getTime()?r-=1:r<0&&l<t.getTime()&&(r+=1),e==="y"?Math.trunc(r/12):e==="q"?Math.trunc(r/3):r}function O(t,n){if(n==="ms")return t.getTime();const e=new Date(t);return n==="s"?e.setMilliseconds(0):n==="m"?e.setSeconds(0,0):n==="h"?e.setMinutes(0,0,0):(e.setHours(0,0,0,0),n==="w"&&e.setDate(e.getDate()-e.getDay()),(n==="mo"||n==="q"||n==="y")&&e.setDate(1),n==="q"&&e.setMonth(e.getMonth()-e.getMonth()%3),n==="y"&&e.setMonth(0),e.getTime())}const N=t=>`${t.getFullYear()}-${M(t.getMonth()+1)}-${M(t.getDate())}`;function z(t){const n=d([t??null]).flatMap(e=>typeof e=="string"?e.split(","):[e]);return new Set(n.map(e=>h(typeof e=="string"?e.trim():e)).filter(e=>!!e).map(N))}const X=(t,n)=>t.getDay()!==0&&t.getDay()!==6&&!n.has(N(t)),q=1e5;class it extends Date{}function j(t,n){const e=new it(t.getTime()),r=t;return e.locale=n.locale??r.locale,e.zone=n.zone??r.zone,e}const v=new Map;function G(t){let n=v.get(t);return n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hourCycle:"h23",weekday:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),v.set(t,n)),n}const ct=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function at(t){const n=t.zone,e=t.getMilliseconds();if(!n)return{y:t.getFullYear(),mo:t.getMonth(),d:t.getDate(),h:t.getHours(),mi:t.getMinutes(),s:t.getSeconds(),ms:e,wd:t.getDay(),offset:-t.getTimezoneOffset()};const r={};for(const s of G(n).formatToParts(t))r[s.type]=s.value;const l={y:+r.year,mo:+r.month-1,d:+r.day,h:+r.hour%24,mi:+r.minute,s:+r.second,ms:e,wd:ct.indexOf(r.weekday),offset:0};return l.offset=Math.round((Date.UTC(l.y,l.mo,l.d,l.h,l.mi,l.s,e)-t.getTime())/6e4),l}const K=new Map;function F(t,n,e,r){const l=`${t??"en"}|${n}|${e}`;let s=K.get(l);return s||K.set(l,s=new Intl.DateTimeFormat(t??"en",{[n]:e,timeZone:"UTC"})),s.format(n==="month"?Date.UTC(2023,r,1):Date.UTC(2023,0,1+r))}const ft=t=>{const n=t%100;return`${t}${n>=11&&n<=13?"th":["th","st","nd","rd"][t%10]??"th"}`},B=(t,n)=>{const e=Math.abs(t);return`${t<0?"-":"+"}${M(Math.floor(e/60))}${n?":":""}${M(e%60)}`},ht={LTS:"h:mm:ss A",LT:"h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A",LLL:"MMMM D, YYYY h:mm A",LL:"MMMM D, YYYY",L:"MM/DD/YYYY"},mt=/\[([^\]]*)]|YYYY|YY|Q|MMMM|MMM|MM|M|DDDD|DDD|Do|DD|D|dddd|ddd|d|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z|X|x/g;function dt(t,n){const e=at(t),r=t.locale,l=n.replace(/\[[^\]]*]|LTS|LT|LLLL|LLL|LL|L/g,c=>ht[c]??c),s=e.h%12||12,f=Math.round((Date.UTC(e.y,e.mo,e.d)-Date.UTC(e.y,0,1))/864e5)+1;return l.replace(mt,(c,i)=>{if(i!==void 0)return i;switch(c){case"YYYY":return String(e.y).padStart(4,"0");case"YY":return M(e.y%100);case"Q":return String(Math.floor(e.mo/3)+1);case"MMMM":return F(r,"month","long",e.mo);case"MMM":return F(r,"month","short",e.mo);case"MM":return M(e.mo+1);case"M":return String(e.mo+1);case"DDDD":return String(f).padStart(3,"0");case"DDD":return String(f);case"Do":return ft(e.d);case"DD":return M(e.d);case"D":return String(e.d);case"dddd":return F(r,"weekday","long",e.wd);case"ddd":return F(r,"weekday","short",e.wd);case"d":return String(e.wd);case"HH":return M(e.h);case"H":return String(e.h);case"hh":return M(s);case"h":return String(s);case"mm":return M(e.mi);case"m":return String(e.mi);case"ss":return M(e.s);case"s":return String(e.s);case"SSS":return String(e.ms).padStart(3,"0");case"SS":return M(Math.floor(e.ms/10));case"S":return String(Math.floor(e.ms/100));case"A":return e.h<12?"AM":"PM";case"a":return e.h<12?"am":"pm";case"ZZ":return B(e.offset,!1);case"Z":return B(e.offset,!0);case"X":return String(Math.floor(t.getTime()/1e3));default:return String(t.getTime())}})}const Mt=["january","february","march","april","may","june","july","august","september","october","november","december"],gt=/\[([^\]]*)]|YYYY|YY|MMMM|MMM|MM|M|Do|DD|D|dddd|ddd|HH|H|hh|h|mm|m|ss|s|SSS|A|a|ZZ|Z|X|x/g;function Dt(t,n){const e=[];let r="^\\s*",l=0;const s=D=>D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+");for(const D of n.matchAll(gt)){if(r+=s(n.slice(l,D.index)),l=D.index+D[0].length,D[1]!==void 0){r+=s(D[1]);continue}const a=D[0];e.push(a),r+=a==="YYYY"?"(\\d{4})":a==="MMMM"||a==="MMM"||a==="dddd"||a==="ddd"?"([A-Za-z]+)\\.?":a==="Do"?"(\\d{1,2})(?:st|nd|rd|th)":a==="SSS"?"(\\d{1,3})":a==="A"||a==="a"?"([AaPp][Mm])":a==="Z"||a==="ZZ"?"(Z|[+-]\\d{2}:?\\d{2})":a==="X"||a==="x"?"(-?\\d+)":"(\\d{1,2})"}r+=`${s(n.slice(l))}\\s*$`;const f=new RegExp(r,"i").exec(t);if(!f)return null;let c=new Date().getFullYear(),i=0,m=1,g=0,y=0,E=0,A=0,$=null,Y=null;for(let D=0;D<e.length;D++){const a=e[D],T=f[D+1],p=Number(T);if(a==="X"||a==="x")return new Date(a==="X"?p*1e3:p);if(a==="YYYY")c=p;else if(a==="YY")c=p+(p<69?2e3:1900);else if(a==="MMMM"||a==="MMM"){const P=Mt.findIndex(et=>et.startsWith(T.toLowerCase().slice(0,3)));if(P<0)return null;i=P}else a==="MM"||a==="M"?i=p-1:a==="DD"||a==="D"||a==="Do"?m=p:a==="HH"||a==="H"||a==="hh"||a==="h"?g=p:a==="mm"||a==="m"?y=p:a==="ss"||a==="s"?E=p:a==="SSS"?A=Number(T.padEnd(3,"0")):a==="A"||a==="a"?$=T.toLowerCase()==="pm":(a==="Z"||a==="ZZ")&&(Y=T.toUpperCase()==="Z"?0:(T[0]==="-"?-1:1)*(Number(T.slice(1,3))*60+Number(T.slice(-2))))}if($!=null&&(g=g%12+($?12:0)),i<0||i>11||m<1||m>31||g>23||y>59||E>59)return null;const U=Y==null?new Date(c,i,m,g,y,E,A):new Date(Date.UTC(c,i,m,g,y,E,A)-Y*6e4);return Y==null&&U.getDate()!==m||Number.isNaN(U.getTime())?null:U}const C=new Map;function H(t,n=!1){const e=`${n?"g":""}|${t}`;let r=C.get(e);if(!r){const l=/^\(\?([ims]+)\)/.exec(t);r=new RegExp(l?t.slice(l[0].length):t,`${l?.[1]??""}${n?"g":""}`),C.size>200&&C.clear(),C.set(e,r)}return r.lastIndex=0,r}const Z="#ERROR",V=t=>`${t instanceof Date?"d":typeof t}:${u(t)}`;function pt(t,n,e){const r=n<0?t.length+n:Math.max(0,n-1),l=e==null?t.length:e<0?t.length+e+1:e;return t.slice(r,l)}function Q(t,n){const e=t<0?-1:1;let r=Math.ceil(Math.abs(t));return r%2===1!==n&&(r+=1),e*r}const J={IF:t=>w(t[0]??null)?t[1]??null:t[2]??null,AND:t=>d(t).every(w),OR:t=>d(t).some(w),NOT:t=>!w(t[0]??null),XOR:t=>d(t).filter(w).length%2===1,TRUE:()=>!0,FALSE:()=>!1,BLANK:()=>null,ERROR:()=>{throw new FormulaError("ERROR()")},ISERROR:t=>t[0]===Z,RECORD_ID:()=>null,CREATED_TIME:()=>null,LAST_MODIFIED_TIME:()=>null,SWITCH:t=>{for(let n=1;n+1<t.length;n+=2)if(u(t[0]??null)===u(t[n]??null))return t[n+1]??null;return t.length%2===0?t[t.length-1]??null:null},CONCATENATE:t=>t.map(u).join(""),LEN:t=>u(t[0]??null).length,UPPER:t=>u(t[0]??null).toUpperCase(),LOWER:t=>u(t[0]??null).toLowerCase(),TRIM:t=>u(t[0]??null).trim(),LEFT:t=>u(t[0]??null).slice(0,o(t[1]??1)),RIGHT:t=>{const n=u(t[0]??null),e=o(t[1]??1);return e<=0?"":n.slice(-e)},MID:t=>{const n=u(t[0]??null),e=Math.max(0,o(t[1]??1)-1);return t.length>2?n.slice(e,e+Math.max(0,o(t[2]??0))):n.slice(e)},FIND:t=>u(t[1]??null).indexOf(u(t[0]??null),Math.max(0,o(t[2]??1)-1))+1,SEARCH:t=>{const n=u(t[1]??null).indexOf(u(t[0]??null),Math.max(0,o(t[2]??1)-1));return n<0?null:n+1},SUBSTITUTE:t=>{const n=u(t[0]??null).split(u(t[1]??null));if(t.length<4)return n.join(u(t[2]??null));const e=o(t[3]??null);return n.reduce((r,l,s)=>s===0?l:r+u(s===e?t[2]??null:t[1]??null)+l,"")},REPLACE:t=>{const n=u(t[0]??null),e=Math.max(0,o(t[1]??1)-1);return n.slice(0,e)+u(t[3]??null)+n.slice(e+Math.max(0,o(t[2]??0)))},ENCODE_URL_COMPONENT:t=>encodeURIComponent(u(t[0]??null)),REGEX_MATCH:t=>H(u(t[1]??null)).test(u(t[0]??null)),REGEX_EXTRACT:t=>H(u(t[1]??null)).exec(u(t[0]??null))?.[0]??null,REGEX_REPLACE:t=>u(t[0]??null).replace(H(u(t[1]??null),!0),u(t[2]??null)),REPT:t=>u(t[0]??null).repeat(Math.max(0,Math.min(1e3,o(t[1]??0)))),T:t=>typeof t[0]=="string"?t[0]:"",VALUE:t=>{const n=u(t[0]??null).replace(/[^0-9.eE+-]/g,""),e=/\d/.test(n)?Number(n):NaN;return Number.isFinite(e)?e:null},ARRAYJOIN:t=>d([t[0]??null]).map(u).filter(Boolean).join(t.length>1?u(t[1]??null):", "),ARRAYCOMPACT:t=>d([t[0]??null]).filter(n=>n!=null&&n!==""),ARRAYFLATTEN:t=>t.flat(1/0),ARRAYUNIQUE:t=>{const n=new Set;return d([t[0]??null]).filter(e=>!n.has(V(e))&&!!n.add(V(e)))},ARRAYSLICE:t=>pt(d([t[0]??null]),o(t[1]??1),t.length>2?o(t[2]??null):void 0),SUM:t=>d(t).reduce((n,e)=>n+o(e),0),AVERAGE:t=>{const n=d(t).filter(e=>!S(e));return n.length?n.reduce((e,r)=>e+o(r),0)/n.length:null},MAX:t=>{const n=d(t).filter(e=>!S(e)).map(o);return n.length?nt(n):null},MIN:t=>{const n=d(t).filter(e=>!S(e)).map(o);return n.length?rt(n):null},COUNT:t=>d(t).filter(n=>typeof n=="number").length,COUNTA:t=>d(t).filter(n=>!S(n)).length,COUNTALL:t=>d(t).length,ROUND:t=>{const n=10**o(t[1]??0);return Math.round(o(t[0]??null)*n)/n},ROUNDUP:t=>{const n=10**o(t[1]??0),e=o(t[0]??null);return Math.sign(e)*Math.ceil(R(Math.abs(e)*n))/n},ROUNDDOWN:t=>{const n=10**o(t[1]??0),e=o(t[0]??null);return Math.sign(e)*Math.floor(R(Math.abs(e)*n))/n},INT:t=>Math.floor(o(t[0]??null)),ABS:t=>Math.abs(o(t[0]??null)),MOD:t=>o(t[0]??null)%o(t[1]??1),POWER:t=>o(t[0]??null)**o(t[1]??1),SQRT:t=>Math.sqrt(o(t[0]??null)),EXP:t=>Math.exp(o(t[0]??null)),LOG:t=>Math.log(o(t[0]??null))/Math.log(t.length>1?o(t[1]??null):10),EVEN:t=>Q(o(t[0]??null),!1),ODD:t=>Q(o(t[0]??null),!0),CEILING:t=>{const n=o(t[1]??1);return n===0?0:R(Math.ceil(R(o(t[0]??null)/n))*n)},FLOOR:t=>{const n=o(t[1]??1);return n===0?0:R(Math.floor(R(o(t[0]??null)/n))*n)},DISTANCE:t=>{const n=t.length>=4?k(`${u(t[0]??null)}, ${u(t[1]??null)}`):k(t[0]??null),e=t.length>=4?k(`${u(t[2]??null)}, ${u(t[3]??null)}`):k(t[1]??null);return n&&e?st(n,e):null},TODAY:()=>{const t=new Date;return t.setHours(0,0,0,0),t},NOW:()=>new Date,YEAR:t=>h(t[0]??null)?.getFullYear()??null,MONTH:t=>{const n=h(t[0]??null);return n?n.getMonth()+1:null},DAY:t=>h(t[0]??null)?.getDate()??null,HOUR:t=>h(t[0]??null)?.getHours()??null,MINUTE:t=>h(t[0]??null)?.getMinutes()??null,SECOND:t=>h(t[0]??null)?.getSeconds()??null,WEEKDAY:t=>{const n=h(t[0]??null);return n?/^mon/i.test(u(t[1]??null))?(n.getDay()+6)%7:n.getDay():null},WEEKNUM:t=>{const n=h(t[0]??null);if(!n)return null;const e=/^mon/i.test(u(t[1]??null))?1:0,r=new Date(n.getFullYear(),0,1),l=Math.round((L(new Date(n.getFullYear(),n.getMonth(),n.getDate()))-L(r))/864e5);return Math.floor((l+(r.getDay()-e+7)%7)/7)+1},DATEADD:t=>{const n=h(t[0]??null),e=t.length>2?I(t[2]??null):"d";return n&&e?ot(n,o(t[1]??0),e):null},DATETIME_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?I(t[2]??null):"s";return n&&e&&r?b(n,e,r):null},IS_BEFORE:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n<e},IS_AFTER:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n>e},IS_SAME:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?I(t[2]??null):"ms";return!!n&&!!e&&!!r&&O(n,r)===O(e,r)},DATESTR:t=>{const n=h(t[0]??null);return n?N(n):null},TIMESTR:t=>{const n=h(t[0]??null);return n?`${M(n.getHours())}:${M(n.getMinutes())}:${M(n.getSeconds())}`:null},DATETIME_FORMAT:t=>{const n=h(t[0]??null);return n?dt(n,t.length>1&&!S(t[1]??null)?u(t[1]??null):"YYYY-MM-DDTHH:mm:ss.SSSZ"):null},DATETIME_PARSE:t=>t.length>1&&!S(t[1]??null)?Dt(u(t[0]??null),u(t[1]??null)):h(t[0]??null),SET_LOCALE:t=>{const n=h(t[0]??null),e=u(t[1]??null).trim();return!n||!e?n:j(n,{locale:Intl.DateTimeFormat.supportedLocalesOf(e)[0]??e})},SET_TIMEZONE:t=>{const n=h(t[0]??null),e=u(t[1]??null).trim();return!n||!e?n:(G(e),j(n,{zone:e}))},TONOW:t=>{const n=h(t[0]??null);return n?b(new Date(O(new Date,"d")),new Date(O(n,"d")),"d"):null},FROMNOW:t=>{const n=h(t[0]??null);return n?b(new Date(O(n,"d")),new Date(O(new Date,"d")),"d"):null},WORKDAY:t=>{const n=h(t[0]??null);if(!n)return null;const e=Math.trunc(o(t[1]??0)),r=e<0?-1:1,l=z(t[2]),s=new Date(n);for(let f=Math.abs(e),c=0;f>0;){if(++c>q)return null;s.setDate(s.getDate()+r),X(s,l)&&(f-=1)}return s},WORKDAY_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null);if(!n||!e)return null;const r=z(t[2]),l=n>e?-1:1,s=new Date(l>0?n:e),f=N(l>0?e:n);let c=0;for(let i=0;N(s)<=f;i++){if(i>q)return null;X(s,r)&&(c+=1),s.setDate(s.getDate()+1)}return l*c}};function tt(t,n,e){switch(t){case"=":return n===e;case"!=":return n!==e;case"<":return n<e;case">":return n>e;case"<=":return n<=e;default:return n>=e}}const Tt=new Set(["DATEADD","DATETIME_DIFF","IS_SAME"]);export const FORMULA_FUNCTIONS=Object.keys(J).sort(),selfReferenceError=t=>new FormulaError(`A formula cannot read its own field {${t.trim()}}`);export function columnResolver(t,n=[]){const e=new Set(n.filter(r=>r!=null&&String(r).trim()!=="").map(r=>String(r).trim().toLowerCase()));return r=>{const l=r.trim().toLowerCase();if(e.has(l))throw selfReferenceError(r);const s=t.find(f=>String(f.header??"").trim().toLowerCase()===l||String(f.field??"").toLowerCase()===l);return s?String(s.field??s.id):null}}class St{constructor(n,e,r){this.toks=n,this.resolve=e,this.refs=r,this.i=0}peek(){return this.toks[this.i]}next(){return this.toks[this.i++]}expect(n,e){const r=this.next();if(!r||r.k!==n||e&&r.v!==e)throw new FormulaError(`Expected "${e??n}"${r?` at ${r.at+1}`:" at the end"}`);return r}parse(){const n=this.compare();if(this.peek())throw new FormulaError(`Unexpected "${this.peek().v}" at ${this.peek().at+1}`);return n}compare(){let n=this.concat();for(let e=this.peek();e&&e.k==="op"&&["=","!=","<",">","<=",">="].includes(e.v);e=this.peek()){this.next();const r=e.v,l=n,s=this.concat();n=f=>{const c=l(f),i=s(f);if(c instanceof Date||i instanceof Date){const E=h(c),A=h(i);return!E||!A?r==="!=":tt(r,E.getTime(),A.getTime())}const m=typeof c=="number"||typeof i=="number",g=m?o(c):u(c),y=m?o(i):u(i);return tt(r,g,y)}}return n}concat(){let n=this.add();for(;this.peek()?.k==="op"&&this.peek().v==="&";){this.next();const e=n,r=this.add();n=l=>u(e(l))+u(r(l))}return n}add(){let n=this.mul();for(let e=this.peek();e&&e.k==="op"&&(e.v==="+"||e.v==="-");e=this.peek()){this.next();const r=n,l=this.mul(),s=e.v==="+";n=f=>s?o(r(f))+o(l(f)):o(r(f))-o(l(f))}return n}mul(){let n=this.unary();for(let e=this.peek();e&&e.k==="op"&&(e.v==="*"||e.v==="/");e=this.peek()){this.next();const r=n,l=this.unary(),s=e.v==="*";n=f=>{if(s)return o(r(f))*o(l(f));const c=o(l(f));return c===0?null:o(r(f))/c}}return n}unary(){const n=this.peek();if(n?.k==="op"&&n.v==="-"){this.next();const e=this.unary();return r=>-o(e(r))}return this.primary()}primary(){const n=this.next();if(!n)throw new FormulaError("The formula ends too early");if(n.k==="num"){const e=Number(n.v);return()=>e}if(n.k==="str"){const e=n.v;return()=>e}if(n.k==="ref"){const e=this.resolve(n.v);if(e==null)throw new FormulaError(`No field named "${n.v}"`);return this.refs.add(e),r=>r?.[e]??null}if(n.k==="("){const e=this.compare();return this.expect(")"),e}if(n.k==="id"){const e=n.v.toUpperCase();if(e==="TRUE"&&this.peek()?.k!=="(")return()=>!0;if(e==="FALSE"&&this.peek()?.k!=="(")return()=>!1;const r=J[e];if(!r)throw new FormulaError(`Unknown function ${n.v}`);this.expect("(");const l=[],s=[],f=()=>{const i=this.i;l.push(this.compare());const m=this.i===i+1?this.toks[i]:void 0;s.push(m?.k==="str"?m.v:void 0)};if(this.peek()?.k!==")")for(f();this.peek()?.k===",";)this.next(),f();this.expect(")");const c=s[2];if(Tt.has(e)&&c!==void 0&&!I(c))throw new FormulaError(`Unknown unit "${c}" in ${e}: use ms, seconds, minutes, hours, days, weeks, months, quarters or years`);return e==="RECORD_ID"?i=>i?.id==null?null:String(i.id):e==="CREATED_TIME"?i=>h(i?.created_at??i?.createdTime??null):e==="LAST_MODIFIED_TIME"?i=>h(i?.updated_at??i?.lastModifiedTime??i?.created_at??i?.createdTime??null):e==="ISERROR"?i=>{try{const m=l[0]?.(i)??null;return m===Z||typeof m=="number"&&!Number.isFinite(m)}catch{return!0}}:e==="IF"?i=>w(l[0]?.(i)??null)?l[1]?.(i)??null:l[2]?.(i)??null:e==="SWITCH"?i=>{if(!l.length)return null;const m=u(l[0](i));for(let g=1;g+1<l.length;g+=2)if(m===u(l[g](i)))return l[g+1](i);return l.length%2===0?l[l.length-1](i):null}:i=>r(l.map(m=>m(i)))}throw new FormulaError(`Unexpected "${n.v}" at ${n.at+1}`)}}export function compileFormula(t,n){if(!t.trim())throw new FormulaError("The formula is empty");const e=new Set,r=new St(tokenize(t),n,e).parse();return{fn:l=>{try{const s=r(l);return typeof s=="number"&&!Number.isFinite(s)?null:s}catch(s){return s instanceof FormulaError?Z:null}},refs:[...e]}}export function renameFormulaRefs(t,n){let e;try{e=tokenize(t)}catch{return t}let r="",l=0;for(const s of e){if(s.k!=="ref")continue;const f=n(s.v);if(f==null)continue;const c=t.indexOf("}",s.at);r+=`${t.slice(l,s.at)}{${f}}`,l=c+1}return l?r+t.slice(l):t}export function formulaRefs(t,n){let e;try{e=tokenize(t)}catch{return[]}const r=new Set;for(const l of e)if(l.k==="ref")try{const s=n(l.v);s!=null&&r.add(s)}catch{}return[...r]}export function formulaReaders(t,n){const e=new Set([n.field,n.id].filter(l=>l!=null&&l!=="").map(String));if(!e.size)return[];const r=columnResolver(t);return t.filter(l=>l.fieldType!=="formula"||e.has(String(l.field??l.id??""))?!1:formulaRefs(String(l.fieldProps?.formula??""),r).some(s=>e.has(s)))}export function formulaError(t,n){try{return compileFormula(t,n),null}catch(e){return e instanceof FormulaError?e.message:"The formula is not valid"}}
@@ -180,6 +180,24 @@ export declare const EXTRAS_MESSAGES: {
180
180
  readonly 'extras.delete': "Delete";
181
181
  readonly 'extras.keep': "Keep";
182
182
  readonly 'extras.deleteAutomation': "Delete automation";
183
+ readonly 'extras.triggerEntersView': "A record enters a view";
184
+ readonly 'extras.view': "View";
185
+ readonly 'extras.pickView': "Pick a view";
186
+ readonly 'extras.aView': "a view";
187
+ readonly 'extras.entersViewHint': "Runs once when a record starts to show in this view, through its filter, as the view has it then. It runs again only after the record has left the view.";
188
+ readonly 'extras.addViewFilterFirst': "First give a view of this table a filter: this trigger runs when a record starts to show in it.";
189
+ readonly 'extras.whenEntersView': "When a record enters {view}";
190
+ readonly 'extras.whenEntersViewWhere': "When a record enters {view}, where {condition}";
191
+ readonly 'extras.doDeleteRecord': "Delete the record";
192
+ readonly 'extras.actionDeleteRecord': "Delete record";
193
+ readonly 'extras.deleteRecordHint': "Deletes the record that started the automation (inside Find records, each record found). It goes to the trash, where it can be restored for 30 days.";
194
+ readonly 'extras.noRecordToDelete': "No record to delete";
195
+ readonly 'extras.deletedRecord': "Deleted {name}";
196
+ readonly 'extras.cannotDeleteHere': "This table cannot delete records from an automation.";
197
+ readonly 'extras.summaryDelete': "Deletes the record";
198
+ readonly 'extras.duplicateAutomation': "Duplicate";
199
+ readonly 'extras.copyOf': "{name} copy";
200
+ readonly 'extras.duplicated': "Copied. The copy is off until you turn it on.";
183
201
  readonly 'extras.runsOnServer': "Runs on your server when its trigger happens.";
184
202
  readonly 'extras.tryRecord': "Record to try it on";
185
203
  readonly 'extras.noRecord': "No record";
@@ -1 +1 @@
1
- export const EXTRAS_MESSAGES={"extras.whenCreated":"When a record is created","extras.whenCreatedWhere":"When a record is created, where {condition}","extras.whenRecordChanges":"When a record changes","extras.whenRecordChangesWhere":"When a record changes, where {condition}","extras.whenFieldsChange":"When {fields} changes","extras.whenFieldsChangeWhere":"When {fields} changes, where {condition}","extras.fieldsOr":" or ","extras.whenMatches":"When a record matches: {condition}","extras.noConditionYet":"no condition yet","extras.whenForm":"When a form is sent","extras.whenFormWhere":"When a form is sent, where {condition}","extras.whenPressed":"When {field} is pressed","extras.onSchedule":"{cron}","extras.onScheduleWhere":"{cron}, for records where {condition}","extras.cronOther":"On a schedule ({cron})","extras.cronEveryMinute":"Every minute","extras.cronEveryMinutes":"Every {n} minutes","extras.cronHourly":"Every hour, on the hour","extras.cronHourlyAt":"Every hour at {minute} past","extras.cronDaily":"Every day at {time}","extras.cronWeekdays":"Every weekday at {time}","extras.cronWeekly0":"Every Sunday at {time}","extras.cronWeekly1":"Every Monday at {time}","extras.cronWeekly2":"Every Tuesday at {time}","extras.cronWeekly3":"Every Wednesday at {time}","extras.cronWeekly4":"Every Thursday at {time}","extras.cronWeekly5":"Every Friday at {time}","extras.cronWeekly6":"Every Saturday at {time}","extras.cronDays":"Every {days} at {time}","extras.cronDay0":"Sunday","extras.cronDay1":"Monday","extras.cronDay2":"Tuesday","extras.cronDay3":"Wednesday","extras.cronDay4":"Thursday","extras.cronDay5":"Friday","extras.cronDay6":"Saturday","extras.cronMonthly":"Day {day} of every month at {time}","extras.actionUpdateRecord":"Update record","extras.actionCreateRecord":"Create record","extras.actionNotify":"Show a notice","extras.actionHighlight":"Color the record","extras.actionWebhook":"Call a webhook","extras.actionEmail":"Send an email","extras.stepStopped":"Stopped","extras.stepLoop":"Automations set each other off {max} times in a row; this one did not run, so they cannot loop.","extras.stepNotice":"Notice","extras.stepWebhook":"Webhook","extras.stepEmail":"Email","extras.stepNotRun":"Not run","extras.stepNoMatch":"The record does not match the condition","extras.stepDone":"Done","extras.noRecordToUpdate":"No record to update","extras.alreadySet":"Already set","extras.noTable":'No table "{table}"',"extras.noAction":'No action "{action}" is registered',"extras.aRecord":"a record","extras.createdIn":"{name} in {table}","extras.saidValue":"{field}: {value}","extras.saidChecked":"{field}: checked","extras.saidUnchecked":"{field}: unchecked","extras.saidEmpty":"empty","extras.title":"Automations in {table}","extras.listLabel":"Automations","extras.untitled":"Untitled","extras.switchOn":"{name} on","extras.noAutomations":"No automations yet. An automation does something when a record is added, changes or matches a condition.","extras.addAutomation":"+ New automation","extras.describeLabel":"Describe what should happen","extras.describePlaceholder":"For example: every Monday at 8:00, e-mail me the tasks that are not done","extras.describeButton":"Draft it","extras.describing":"Drafting...","extras.describeAgain":"Say a little more about what should happen, then try again.","extras.drafted":"Drafted from your words and switched off. Check each part, then switch it on.","extras.newAutomation":"New automation","extras.newRecordMessage":"New record: {{field}}","extras.nameFallback":"Name","extras.runs":"Runs","extras.clearRuns":"Clear this page's runs","extras.serverRunsFailed":"The server's runs did not load: {message}","extras.statusDone":"Done","extras.statusFailed":"Failed","extras.statusStopped":"Stopped","extras.runOn":"on {record}","extras.runIn":"in {table}","extras.serverTag":"Server","extras.noRuns":"Nothing has run yet. Runs show here with what each action did.","extras.name":"Name","extras.runsIn":"Runs in","extras.runsInBrowser":"This browser","extras.runsInServer":"The server","extras.serverHint":"Your server runs it (createAutomationServer): it hears changes from the database, whoever made them, reads secrets and sends email.","extras.browserHint":"It runs in the browser of the person who makes the change, right away.","extras.when":"When","extras.trigger":"Trigger","extras.triggerCreated":"A record is created","extras.triggerUpdated":"A record changes","extras.triggerMatches":"A record matches a condition","extras.triggerForm":"A form is sent","extras.triggerButton":"A button is pressed","extras.triggerScheduled":"At a scheduled time","extras.watchSome":"Only when one of these fields changes:","extras.watchAny":"Any field. Pick fields to watch only those:","extras.form":"Form","extras.anyForm":"Any form of this table","extras.buttonField":"Button field","extras.addButtonFirst":"Add a Button field to the table first.","extras.schedule":"Schedule","extras.customSchedule":"Custom","extras.cronExpression":"Cron expression","extras.scheduleHint":"Runs while the base is open in a browser. With a condition, it runs once for each record that matches at that time.","extras.condition":"Condition","extras.onlyWhere":"Only for records where","extras.startsToMatch":"Runs when a record starts to match","extras.addMatchCondition":"Add the condition a record has to start matching.","extras.everyRecord":"Every record. Add a condition to narrow it.","extras.do":"Do","extras.action":"Action","extras.doUpdateRecord":"Update the record","extras.doCreateRecord":"Create a record","extras.doHighlight":"Color the record while it matches","extras.moveUp":"Move up","extras.moveDown":"Move down","extras.moveStepUp":"Move step {step} up","extras.moveStepDown":"Move step {step} down","extras.removeStep":"Remove step {step}","extras.stepMoved":"Step {from} is now step {to}.","extras.removeAction":"Remove action","extras.message":"Message","extras.notifyPlaceholder":"{{field}} needs a look","extras.kind":"Kind","extras.severityInfo":"Info","extras.severitySuccess":"Success","extras.severityWarning":"Warning","extras.severityError":"Error","extras.notifyHint":"Name a field in braces for its value: {fields}.","extras.notifyTo":"Also send it to the notifications of:","extras.notifyToField":"The people in {field}","extras.highlightNeedsCondition":"Colors records while they match the condition above; add one.","extras.fill":"Fill","extras.text":"Text","extras.sample":"Sample","extras.wholeRow":"Whole row","extras.in":"In","extras.table":"Table","extras.linkBack":"Link it back","extras.linkField":"Link field","extras.noLink":"No link","extras.through":"through {field}","extras.valueOf":"{field} value","extras.valuePlaceholder":"a value, or {Field}","extras.numberPlaceholder":"0, or 100% for a percent","extras.linkPlaceholder":"a record name, or {record}","extras.userPlaceholder":"a name","extras.doNotSet":"Do not set {field}","extras.remove":"Remove","extras.setField":"Set a field","extras.addSetField":"+ Set a field","extras.runsApp":"Runs {action}, an action the app registered.","extras.method":"Method","extras.url":"URL","extras.headers":"Headers","extras.body":"Body","extras.webhookHintServer":"Empty body: the record as JSON. {secret} is read on the server only.","extras.webhookHintBrowser":"Empty body: the record as JSON. {secret} is read on the server only; set Runs in to The server to use one.","extras.emailNeedsServer":"Email is sent by the server: set Runs in to The server.","extras.to":"To","extras.toPlaceholder":"team@example.com, {Owner email}","extras.subject":"Subject","extras.emailText":"Email text","extras.addAction":"Add an action","extras.addActionOption":"+ Add an action","extras.deleteIt":"Delete it?","extras.delete":"Delete","extras.keep":"Keep","extras.deleteAutomation":"Delete automation","extras.runsOnServer":"Runs on your server when its trigger happens.","extras.tryRecord":"Record to try it on","extras.noRecord":"No record","extras.runNow":"Run now","extras.pickAutomation":"Pick an automation, or add one.","extras.noName":"(no name)","extras.noRecordValue":"(no record)","extras.pageLabel":"Automations of the base","extras.createAutomation":"+ Create automation","extras.runHistory":"Run history","extras.pageEmpty":"No automations yet. An automation does something on its own: when a record is added or changes, a form is sent, a button is pressed or at a time you set.","extras.pickOne":"Pick an automation on the left, or create one.","extras.triggerCard":"Trigger","extras.whenIn":"{when}, in {table}","extras.conditionCard":"Only for records where","extras.conditionEvery":"Every record","extras.conditionCount.one":"{count} condition","extras.conditionCount.other":"{count} conditions","extras.addCondition":"+ Add a condition","extras.actionCard":"Action {n}","extras.insertAction":"Add an action here","extras.addActionPage":"+ Add an action","extras.flowLabel":"What {name} does","extras.summarySet":"Set {fields}","extras.summaryNothing":"No fields set yet","extras.summaryCreate":"A new record in {table}","extras.summaryEmail":"To {to}","extras.summaryNoTo":"No address yet","extras.summaryColor":"While it matches","extras.tableOfTrigger":"Table","extras.tableMoveHint":"Its trigger, condition and fields are for this table: a new table starts them again.","extras.settingsOf":"Settings","extras.testOn":"Test on","extras.test":"Test","extras.testRuns":"Its runs show in the run history.","extras.allRunsOf":"Runs of {name}","extras.allRuns":"All runs","extras.showAllRuns":"Show every automation's runs","extras.whenWebhook":"When a webhook is received","extras.triggerWebhook":"A webhook is received","extras.webhookAddress":"Webhook address","extras.webhookNoUrl":"This automation listens for the token {token}: give it to your server runner (webhookReceived).","extras.webhookHint":"Send a POST with a JSON body to this address. Its values are {webhook.name} in the steps ({webhook.order.id} inside objects). Anyone with the address can start the automation: keep it secret.","extras.newAddress":"Make a new address","extras.copy":"Copy","extras.copied":"Copied","extras.actionChat":"Send a message","extras.actionRepeat":"Find records","extras.actionIf":"If","extras.actionAi":"Ask AI","extras.actionScript":"Run a script","extras.doChat":"Send a Slack, Teams or Google Chat message","extras.doRepeat":"Find records and, for each, do","extras.doIf":"If a condition holds, do","extras.doAi":"Ask AI","extras.doScript":"Run a script","extras.stepChat":"Message","extras.stepIf":"If","extras.stepIfThen":"It matched: the Then steps ran","extras.stepIfElse":"It did not match: the Otherwise steps ran","extras.stepFound":"Find records","extras.foundIn":"{count} in {table}","extras.stepAi":"AI","extras.stepScript":"Script","extras.noAi":"No AI model is set up here.","extras.aiNoPrompt":"The prompt is empty.","extras.scriptFailed":"The script failed.","extras.noField":"No field named {field}.","extras.noRecordId":"No record {id}.","extras.stepKind":"{list}, step {n}","extras.addStep":"+ Add a step","extras.addStepTo":"Add a step to {list}","extras.chatApp":"Chat app","extras.chatUrl":"Webhook address","extras.chatHintSlack":"In Slack: Apps, Incoming Webhooks, Add to a channel; paste the address it gives here.","extras.chatHintTeams":`In Teams: the channel's Workflows, "Post to a channel when a webhook request is received"; paste the address it gives here.`,"extras.chatHintGoogle":"In Google Chat: the space's Apps and integrations, Webhooks, Add webhook; paste the address it gives here.","extras.actionText":"Send a text message","extras.doText":"Send a text message (SMS or Viber)","extras.stepText":"Text message","extras.textNeedsServer":"Text messages are sent by the server: set Runs in to The server.","extras.textBy":"Send by","extras.textSms":"SMS","extras.textViber":"Viber (SMS if not on Viber)","extras.textTo":"To","extras.textToPlaceholder":"+359 88 123 4567, {Phone}","extras.textMessage":"Message","extras.textHint":"Phone numbers with their country code, or a phone field in braces; several apart with commas. The text names fields in braces.","extras.summarySms":"SMS to {to}","extras.summaryViber":"Viber to {to}","extras.summaryNoPhone":"No phone yet","extras.ifHint":"When the record matches this condition the Then steps run, otherwise the Otherwise steps.","extras.ifAlways":"No condition: Then always runs","extras.then":"Then","extras.otherwise":"Otherwise","extras.findIn":"Find in","extras.whichRecords":"Records where","extras.atMost":"At most","extras.forEach":"For each record found","extras.repeatHint":"In these steps {Field} is the found record's field, {trigger.Field} the field of the record that set the automation off, and {found} how many were found.","extras.aiPrompt":"Prompt","extras.aiPlaceholder":"Write a two-line summary of {{field}} for a weekly report.","extras.aiInto":"Put the answer in","extras.aiNowhere":"No field (use {ai} in the next steps)","extras.aiHint":"Name fields in braces. The answer is {ai} in the next steps.","extras.scriptCode":"Script","extras.scriptNeedsBrowser":"A script runs in the browser: set Runs in to The browser.","extras.scriptHint":"JavaScript, as in Airtable: input.config() has the record's fields by name; base.getTable('Name') reads and changes a table (selectRecordsAsync, updateRecordAsync, createRecordAsync, deleteRecordAsync); output.set('name', value) is {script.name} in the next steps; fetch() calls https addresses that allow it. It runs in a sandbox for up to 30 seconds.","extras.scriptInPageHint":"It runs in the page of the person who made the change, with what they may do. A run with no one's page behind it (a schedule, a webhook, a change through the API) stops at this step and says so.","extras.summaryNoText":"Nothing written yet","extras.stepCount.one":"{count} step","extras.stepCount.other":"{count} steps","extras.summaryRepeat":"{steps} for each record in {table}","extras.summaryIf":"Then {then}; otherwise {otherwise}","extras.summaryScript":"{lines} lines"};
1
+ export const EXTRAS_MESSAGES={"extras.whenCreated":"When a record is created","extras.whenCreatedWhere":"When a record is created, where {condition}","extras.whenRecordChanges":"When a record changes","extras.whenRecordChangesWhere":"When a record changes, where {condition}","extras.whenFieldsChange":"When {fields} changes","extras.whenFieldsChangeWhere":"When {fields} changes, where {condition}","extras.fieldsOr":" or ","extras.whenMatches":"When a record matches: {condition}","extras.noConditionYet":"no condition yet","extras.whenForm":"When a form is sent","extras.whenFormWhere":"When a form is sent, where {condition}","extras.whenPressed":"When {field} is pressed","extras.onSchedule":"{cron}","extras.onScheduleWhere":"{cron}, for records where {condition}","extras.cronOther":"On a schedule ({cron})","extras.cronEveryMinute":"Every minute","extras.cronEveryMinutes":"Every {n} minutes","extras.cronHourly":"Every hour, on the hour","extras.cronHourlyAt":"Every hour at {minute} past","extras.cronDaily":"Every day at {time}","extras.cronWeekdays":"Every weekday at {time}","extras.cronWeekly0":"Every Sunday at {time}","extras.cronWeekly1":"Every Monday at {time}","extras.cronWeekly2":"Every Tuesday at {time}","extras.cronWeekly3":"Every Wednesday at {time}","extras.cronWeekly4":"Every Thursday at {time}","extras.cronWeekly5":"Every Friday at {time}","extras.cronWeekly6":"Every Saturday at {time}","extras.cronDays":"Every {days} at {time}","extras.cronDay0":"Sunday","extras.cronDay1":"Monday","extras.cronDay2":"Tuesday","extras.cronDay3":"Wednesday","extras.cronDay4":"Thursday","extras.cronDay5":"Friday","extras.cronDay6":"Saturday","extras.cronMonthly":"Day {day} of every month at {time}","extras.actionUpdateRecord":"Update record","extras.actionCreateRecord":"Create record","extras.actionNotify":"Show a notice","extras.actionHighlight":"Color the record","extras.actionWebhook":"Call a webhook","extras.actionEmail":"Send an email","extras.stepStopped":"Stopped","extras.stepLoop":"Automations set each other off {max} times in a row; this one did not run, so they cannot loop.","extras.stepNotice":"Notice","extras.stepWebhook":"Webhook","extras.stepEmail":"Email","extras.stepNotRun":"Not run","extras.stepNoMatch":"The record does not match the condition","extras.stepDone":"Done","extras.noRecordToUpdate":"No record to update","extras.alreadySet":"Already set","extras.noTable":'No table "{table}"',"extras.noAction":'No action "{action}" is registered',"extras.aRecord":"a record","extras.createdIn":"{name} in {table}","extras.saidValue":"{field}: {value}","extras.saidChecked":"{field}: checked","extras.saidUnchecked":"{field}: unchecked","extras.saidEmpty":"empty","extras.title":"Automations in {table}","extras.listLabel":"Automations","extras.untitled":"Untitled","extras.switchOn":"{name} on","extras.noAutomations":"No automations yet. An automation does something when a record is added, changes or matches a condition.","extras.addAutomation":"+ New automation","extras.describeLabel":"Describe what should happen","extras.describePlaceholder":"For example: every Monday at 8:00, e-mail me the tasks that are not done","extras.describeButton":"Draft it","extras.describing":"Drafting...","extras.describeAgain":"Say a little more about what should happen, then try again.","extras.drafted":"Drafted from your words and switched off. Check each part, then switch it on.","extras.newAutomation":"New automation","extras.newRecordMessage":"New record: {{field}}","extras.nameFallback":"Name","extras.runs":"Runs","extras.clearRuns":"Clear this page's runs","extras.serverRunsFailed":"The server's runs did not load: {message}","extras.statusDone":"Done","extras.statusFailed":"Failed","extras.statusStopped":"Stopped","extras.runOn":"on {record}","extras.runIn":"in {table}","extras.serverTag":"Server","extras.noRuns":"Nothing has run yet. Runs show here with what each action did.","extras.name":"Name","extras.runsIn":"Runs in","extras.runsInBrowser":"This browser","extras.runsInServer":"The server","extras.serverHint":"Your server runs it (createAutomationServer): it hears changes from the database, whoever made them, reads secrets and sends email.","extras.browserHint":"It runs in the browser of the person who makes the change, right away.","extras.when":"When","extras.trigger":"Trigger","extras.triggerCreated":"A record is created","extras.triggerUpdated":"A record changes","extras.triggerMatches":"A record matches a condition","extras.triggerForm":"A form is sent","extras.triggerButton":"A button is pressed","extras.triggerScheduled":"At a scheduled time","extras.watchSome":"Only when one of these fields changes:","extras.watchAny":"Any field. Pick fields to watch only those:","extras.form":"Form","extras.anyForm":"Any form of this table","extras.buttonField":"Button field","extras.addButtonFirst":"Add a Button field to the table first.","extras.schedule":"Schedule","extras.customSchedule":"Custom","extras.cronExpression":"Cron expression","extras.scheduleHint":"Runs while the base is open in a browser. With a condition, it runs once for each record that matches at that time.","extras.condition":"Condition","extras.onlyWhere":"Only for records where","extras.startsToMatch":"Runs when a record starts to match","extras.addMatchCondition":"Add the condition a record has to start matching.","extras.everyRecord":"Every record. Add a condition to narrow it.","extras.do":"Do","extras.action":"Action","extras.doUpdateRecord":"Update the record","extras.doCreateRecord":"Create a record","extras.doHighlight":"Color the record while it matches","extras.moveUp":"Move up","extras.moveDown":"Move down","extras.moveStepUp":"Move step {step} up","extras.moveStepDown":"Move step {step} down","extras.removeStep":"Remove step {step}","extras.stepMoved":"Step {from} is now step {to}.","extras.removeAction":"Remove action","extras.message":"Message","extras.notifyPlaceholder":"{{field}} needs a look","extras.kind":"Kind","extras.severityInfo":"Info","extras.severitySuccess":"Success","extras.severityWarning":"Warning","extras.severityError":"Error","extras.notifyHint":"Name a field in braces for its value: {fields}.","extras.notifyTo":"Also send it to the notifications of:","extras.notifyToField":"The people in {field}","extras.highlightNeedsCondition":"Colors records while they match the condition above; add one.","extras.fill":"Fill","extras.text":"Text","extras.sample":"Sample","extras.wholeRow":"Whole row","extras.in":"In","extras.table":"Table","extras.linkBack":"Link it back","extras.linkField":"Link field","extras.noLink":"No link","extras.through":"through {field}","extras.valueOf":"{field} value","extras.valuePlaceholder":"a value, or {Field}","extras.numberPlaceholder":"0, or 100% for a percent","extras.linkPlaceholder":"a record name, or {record}","extras.userPlaceholder":"a name","extras.doNotSet":"Do not set {field}","extras.remove":"Remove","extras.setField":"Set a field","extras.addSetField":"+ Set a field","extras.runsApp":"Runs {action}, an action the app registered.","extras.method":"Method","extras.url":"URL","extras.headers":"Headers","extras.body":"Body","extras.webhookHintServer":"Empty body: the record as JSON. {secret} is read on the server only.","extras.webhookHintBrowser":"Empty body: the record as JSON. {secret} is read on the server only; set Runs in to The server to use one.","extras.emailNeedsServer":"Email is sent by the server: set Runs in to The server.","extras.to":"To","extras.toPlaceholder":"team@example.com, {Owner email}","extras.subject":"Subject","extras.emailText":"Email text","extras.addAction":"Add an action","extras.addActionOption":"+ Add an action","extras.deleteIt":"Delete it?","extras.delete":"Delete","extras.keep":"Keep","extras.deleteAutomation":"Delete automation","extras.triggerEntersView":"A record enters a view","extras.view":"View","extras.pickView":"Pick a view","extras.aView":"a view","extras.entersViewHint":"Runs once when a record starts to show in this view, through its filter, as the view has it then. It runs again only after the record has left the view.","extras.addViewFilterFirst":"First give a view of this table a filter: this trigger runs when a record starts to show in it.","extras.whenEntersView":"When a record enters {view}","extras.whenEntersViewWhere":"When a record enters {view}, where {condition}","extras.doDeleteRecord":"Delete the record","extras.actionDeleteRecord":"Delete record","extras.deleteRecordHint":"Deletes the record that started the automation (inside Find records, each record found). It goes to the trash, where it can be restored for 30 days.","extras.noRecordToDelete":"No record to delete","extras.deletedRecord":"Deleted {name}","extras.cannotDeleteHere":"This table cannot delete records from an automation.","extras.summaryDelete":"Deletes the record","extras.duplicateAutomation":"Duplicate","extras.copyOf":"{name} copy","extras.duplicated":"Copied. The copy is off until you turn it on.","extras.runsOnServer":"Runs on your server when its trigger happens.","extras.tryRecord":"Record to try it on","extras.noRecord":"No record","extras.runNow":"Run now","extras.pickAutomation":"Pick an automation, or add one.","extras.noName":"(no name)","extras.noRecordValue":"(no record)","extras.pageLabel":"Automations of the base","extras.createAutomation":"+ Create automation","extras.runHistory":"Run history","extras.pageEmpty":"No automations yet. An automation does something on its own: when a record is added or changes, a form is sent, a button is pressed or at a time you set.","extras.pickOne":"Pick an automation on the left, or create one.","extras.triggerCard":"Trigger","extras.whenIn":"{when}, in {table}","extras.conditionCard":"Only for records where","extras.conditionEvery":"Every record","extras.conditionCount.one":"{count} condition","extras.conditionCount.other":"{count} conditions","extras.addCondition":"+ Add a condition","extras.actionCard":"Action {n}","extras.insertAction":"Add an action here","extras.addActionPage":"+ Add an action","extras.flowLabel":"What {name} does","extras.summarySet":"Set {fields}","extras.summaryNothing":"No fields set yet","extras.summaryCreate":"A new record in {table}","extras.summaryEmail":"To {to}","extras.summaryNoTo":"No address yet","extras.summaryColor":"While it matches","extras.tableOfTrigger":"Table","extras.tableMoveHint":"Its trigger, condition and fields are for this table: a new table starts them again.","extras.settingsOf":"Settings","extras.testOn":"Test on","extras.test":"Test","extras.testRuns":"Its runs show in the run history.","extras.allRunsOf":"Runs of {name}","extras.allRuns":"All runs","extras.showAllRuns":"Show every automation's runs","extras.whenWebhook":"When a webhook is received","extras.triggerWebhook":"A webhook is received","extras.webhookAddress":"Webhook address","extras.webhookNoUrl":"This automation listens for the token {token}: give it to your server runner (webhookReceived).","extras.webhookHint":"Send a POST with a JSON body to this address. Its values are {webhook.name} in the steps ({webhook.order.id} inside objects). Anyone with the address can start the automation: keep it secret.","extras.newAddress":"Make a new address","extras.copy":"Copy","extras.copied":"Copied","extras.actionChat":"Send a message","extras.actionRepeat":"Find records","extras.actionIf":"If","extras.actionAi":"Ask AI","extras.actionScript":"Run a script","extras.doChat":"Send a Slack, Teams or Google Chat message","extras.doRepeat":"Find records and, for each, do","extras.doIf":"If a condition holds, do","extras.doAi":"Ask AI","extras.doScript":"Run a script","extras.stepChat":"Message","extras.stepIf":"If","extras.stepIfThen":"It matched: the Then steps ran","extras.stepIfElse":"It did not match: the Otherwise steps ran","extras.stepFound":"Find records","extras.foundIn":"{count} in {table}","extras.stepAi":"AI","extras.stepScript":"Script","extras.noAi":"No AI model is set up here.","extras.aiNoPrompt":"The prompt is empty.","extras.scriptFailed":"The script failed.","extras.noField":"No field named {field}.","extras.noRecordId":"No record {id}.","extras.stepKind":"{list}, step {n}","extras.addStep":"+ Add a step","extras.addStepTo":"Add a step to {list}","extras.chatApp":"Chat app","extras.chatUrl":"Webhook address","extras.chatHintSlack":"In Slack: Apps, Incoming Webhooks, Add to a channel; paste the address it gives here.","extras.chatHintTeams":`In Teams: the channel's Workflows, "Post to a channel when a webhook request is received"; paste the address it gives here.`,"extras.chatHintGoogle":"In Google Chat: the space's Apps and integrations, Webhooks, Add webhook; paste the address it gives here.","extras.actionText":"Send a text message","extras.doText":"Send a text message (SMS or Viber)","extras.stepText":"Text message","extras.textNeedsServer":"Text messages are sent by the server: set Runs in to The server.","extras.textBy":"Send by","extras.textSms":"SMS","extras.textViber":"Viber (SMS if not on Viber)","extras.textTo":"To","extras.textToPlaceholder":"+359 88 123 4567, {Phone}","extras.textMessage":"Message","extras.textHint":"Phone numbers with their country code, or a phone field in braces; several apart with commas. The text names fields in braces.","extras.summarySms":"SMS to {to}","extras.summaryViber":"Viber to {to}","extras.summaryNoPhone":"No phone yet","extras.ifHint":"When the record matches this condition the Then steps run, otherwise the Otherwise steps.","extras.ifAlways":"No condition: Then always runs","extras.then":"Then","extras.otherwise":"Otherwise","extras.findIn":"Find in","extras.whichRecords":"Records where","extras.atMost":"At most","extras.forEach":"For each record found","extras.repeatHint":"In these steps {Field} is the found record's field, {trigger.Field} the field of the record that set the automation off, and {found} how many were found.","extras.aiPrompt":"Prompt","extras.aiPlaceholder":"Write a two-line summary of {{field}} for a weekly report.","extras.aiInto":"Put the answer in","extras.aiNowhere":"No field (use {ai} in the next steps)","extras.aiHint":"Name fields in braces. The answer is {ai} in the next steps.","extras.scriptCode":"Script","extras.scriptNeedsBrowser":"A script runs in the browser: set Runs in to The browser.","extras.scriptHint":"JavaScript, as in Airtable: input.config() has the record's fields by name; base.getTable('Name') reads and changes a table (selectRecordsAsync, updateRecordAsync, createRecordAsync, deleteRecordAsync); output.set('name', value) is {script.name} in the next steps; fetch() calls https addresses that allow it. It runs in a sandbox for up to 30 seconds.","extras.scriptInPageHint":"It runs in the page of the person who made the change, with what they may do. A run with no one's page behind it (a schedule, a webhook, a change through the API) stops at this step and says so.","extras.summaryNoText":"Nothing written yet","extras.stepCount.one":"{count} step","extras.stepCount.other":"{count} steps","extras.summaryRepeat":"{steps} for each record in {table}","extras.summaryIf":"Then {then}; otherwise {otherwise}","extras.summaryScript":"{lines} lines"};
@@ -34,6 +34,10 @@ export declare const VIEWBAR_MESSAGES: {
34
34
  readonly 'viewbar.board.cardBlocked': "{card} is blocked and can't be moved.";
35
35
  readonly 'viewbar.board.selected': "Selected {card}. {count} selected.";
36
36
  readonly 'viewbar.board.deselected': "Deselected {card}. {count} selected.";
37
+ readonly 'viewbar.board.expand': "Expand {lane}";
38
+ readonly 'viewbar.board.collapse': "Collapse {lane}";
39
+ readonly 'viewbar.board.wipTitle': "At most {limit} cards";
40
+ readonly 'viewbar.board.none': "(none)";
37
41
  readonly 'viewbar.moveField': "Move {name}";
38
42
  readonly 'viewbar.moveFieldHint': "Drag, or press the up and down arrows";
39
43
  readonly 'viewbar.fieldMoved': "{name} moved to place {place} of {count}";
@@ -166,6 +170,8 @@ export declare const VIEWBAR_MESSAGES: {
166
170
  readonly 'viewbar.customizeList': "Customize list";
167
171
  readonly 'viewbar.customizeInbox': "Customize inbox";
168
172
  readonly 'viewbar.customizeBoard': "Customize board";
173
+ readonly 'viewbar.criticalPath': "Show the critical path";
174
+ readonly 'viewbar.criticalPathHint': "The tasks that set the finish date get a red outline: if one of them is late, so is the end. Point at any other task to see how many days it can slip.";
169
175
  readonly 'viewbar.boardRowsBy': "Rows by";
170
176
  readonly 'viewbar.boardDue': "Due date";
171
177
  readonly 'viewbar.boardFade': "Fade cards by";
@@ -1 +1 @@
1
- export const VIEWBAR_MESSAGES={"viewbar.board.board":"Board","viewbar.board.addCard":"+ Add a card","viewbar.board.addCardTo":"Add card to {lane}","viewbar.board.cardTitle":"Card title...","viewbar.board.noCards":"No cards","viewbar.board.cardActions":"Card actions","viewbar.board.clearFilters":"Clear filters","viewbar.board.blocked":"Blocked","viewbar.board.age":"Age","viewbar.board.comments":"Comments","viewbar.board.writeComment":"Write a comment...","viewbar.board.deleteComment":"Delete comment","viewbar.board.addSubtask":"Add subtask...","viewbar.board.rename":"Double-click, Enter, or F2 to rename","viewbar.board.cancel":"Cancel","viewbar.board.save":"Save","viewbar.board.grabbed":"Grabbed {card}. Use arrow keys to move, Space to drop, Escape to cancel.","viewbar.board.dropped":"Dropped {card} in {lane}.","viewbar.formMoved":"{field} moved to place {place} of {total}.","viewbar.board.movedTo":"Moved to {lane}.","viewbar.board.movedUp":"Moved up.","viewbar.board.movedDown":"Moved down.","viewbar.board.movedPosition":"Moved {lane} to position {position} of {total}.","viewbar.board.cancelled":"Cancelled.","viewbar.board.wipLimit":"{lane} is at its WIP limit ({limit}).","viewbar.board.cannotMove":"Cards can't be moved here.","viewbar.board.cardBlocked":"{card} is blocked and can't be moved.","viewbar.board.selected":"Selected {card}. {count} selected.","viewbar.board.deselected":"Deselected {card}. {count} selected.","viewbar.moveField":"Move {name}","viewbar.moveFieldHint":"Drag, or press the up and down arrows","viewbar.fieldMoved":"{name} moved to place {place} of {count}","viewbar.calendar.month":"Month","viewbar.calendar.week":"Week","viewbar.calendar.day":"Day","viewbar.calendar.agenda":"Agenda","viewbar.calendar.timelineDay":"Day","viewbar.calendar.timelineWeek":"Week","viewbar.calendar.timelineMonth":"Month","viewbar.calendar.timelineYear":"Year","viewbar.calendar.today":"Today","viewbar.calendar.previous":"Previous","viewbar.calendar.next":"Next","viewbar.calendar.allDay":"all day","viewbar.calendar.more":"+{count} more","viewbar.calendar.noEvents":"No events in this range.","viewbar.calendar.eventsColumn":"Events","viewbar.calendar.edit":"Edit","viewbar.calendar.duplicate":"Duplicate","viewbar.calendar.delete":"Delete","viewbar.calendar.moveGrabbed":"{title} picked up. Arrow keys move it, Space puts it down, Escape cancels.","viewbar.gantt.expandAll":"Expand all","viewbar.gantt.collapseAll":"Collapse all","viewbar.gantt.expandTask":"Expand {title}","viewbar.gantt.collapseTask":"Collapse {title}","viewbar.gantt.zoomIn":"Zoom in","viewbar.gantt.zoomOut":"Zoom out","viewbar.gantt.zoomDay":"day","viewbar.gantt.zoomWeek":"week","viewbar.gantt.zoomMonth":"month","viewbar.gantt.zoomQuarter":"quarter","viewbar.gantt.zoomYear":"year","viewbar.gantt.tableLabel":"Records","viewbar.gantt.chartLabel":"Gantt bars","viewbar.gantt.resizeTable":"Resize the record table","viewbar.gantt.days":"Days","viewbar.gantt.progress":"Progress","viewbar.gantt.slack":"Slack","viewbar.gantt.start":"Start","viewbar.gantt.finish":"Finish","viewbar.gantt.progressPercent":"Progress %","viewbar.gantt.task":"Record","viewbar.gantt.milestone":"Milestone","viewbar.gantt.day":"{count} day","viewbar.gantt.daysCount":"{count} days","viewbar.gantt.open":"Open","viewbar.gantt.openTask":"Open {title}","viewbar.gantt.edit":"Edit","viewbar.gantt.addSubtask":"Add subtask","viewbar.gantt.delete":"Delete","viewbar.gantt.deleteTask":"Delete record","viewbar.gantt.removeLink":"Remove link: {from} to {to}","viewbar.gantt.taskActions":"Record actions","viewbar.gantt.save":"Save","viewbar.gantt.cancel":"Cancel","viewbar.gantt.onBaseline":"On the baseline","viewbar.gantt.laterThanBaseline":"{count} days later than baseline","viewbar.gantt.aheadOfBaseline":"{count} days ahead of baseline","viewbar.gantt.dragProgress":"Drag to set progress","viewbar.gantt.linkFromStart":"Drag to link from the start","viewbar.gantt.linkFromFinish":"Drag to link from the finish","viewbar.gantt.workingDays":"{count} working days, {progress}%","viewbar.gantt.onCriticalPath":"On the critical path","viewbar.gantt.daysOfSlack":"{count} days of slack","viewbar.gantt.notMet":"not met","viewbar.gantt.peak":"peak {peak} / {capacity}","viewbar.gantt.loadOf":"{label}: {load} of {capacity}","viewbar.gantt.moveGrabbed":"{title} picked up. Arrow keys move it, Space puts it down, Escape cancels.","viewbar.gantt.moveDone":"{title} moved to {range}.","viewbar.gantt.moveCancelled":"Move cancelled.","viewbar.gantt.resized":"{title} now ends {date}.","viewbar.gantt.progressSet":"{title} at {progress}%.","viewbar.gantt.upcoming":"{title}, upcoming {date}","viewbar.calendar.moveDone":"{title} moved to {place}.","viewbar.calendar.moveCancelled":"Move cancelled.","viewbar.calendar.moveBlocked":"That time is not free.","viewbar.calendar.scopeEdit":"Edit recurring event","viewbar.calendar.scopeDelete":"Delete recurring event","viewbar.calendar.scopeOccurrence":"This event","viewbar.calendar.scopeFollowing":"This and following","viewbar.calendar.scopeSeries":"All events","viewbar.calendar.upcoming":"{name}, upcoming","viewbar.sortToOrder":"Sort this view by a number field to keep the order of its cards","viewbar.viewSettings":"View settings","viewbar.views":"Views","viewbar.defaultViewName":"Grid view","viewbar.viewCopy":"{name} copy","viewbar.rowShort":"Short","viewbar.rowMedium":"Medium","viewbar.rowTall":"Tall","viewbar.rowExtraTall":"Extra tall","viewbar.lockedTitle":"This view is locked: its settings stay as saved","viewbar.lockedTitleBy":"This view is locked by {name}: its settings stay as saved","viewbar.locked":"Locked","viewbar.lockedNotSaved":"Locked, not saved","viewbar.reset":"Reset","viewbar.personalTitle":"A personal view: only you see it","viewbar.personal":"Personal","viewbar.hideFields":"Hide fields","viewbar.hiddenFields.one":"{count} hidden field","viewbar.hiddenFields.other":"{count} hidden fields","viewbar.filter":"Filter","viewbar.filteredBy":"Filtered by {field}","viewbar.filteredByFields.one":"Filtered by {count} field","viewbar.filteredByFields.other":"Filtered by {count} fields","viewbar.group":"Group","viewbar.groupedBy.one":"Grouped by {count} field","viewbar.groupedBy.other":"Grouped by {count} fields","viewbar.sort":"Sort","viewbar.sortedBy.one":"Sorted by {count} field","viewbar.sortedBy.other":"Sorted by {count} fields","viewbar.color":"Color","viewbar.coloredBy":"Colored by {field}","viewbar.coloredByAField":"Colored by field","viewbar.coloredByConditions":"Colored by conditions","viewbar.customizeChart":"Customize chart","viewbar.customizeForm":"Customize form","viewbar.formTitle":"Title","viewbar.formDescription":"Line under the title","viewbar.formButton":"Button text","viewbar.formFields":"Fields the form asks for","viewbar.formRequiredColumn":"Required","viewbar.formAsk":"Ask for {field}","viewbar.formRequire":"{field} is required","viewbar.formMoveUp":"Move {field} up","viewbar.formMoveDown":"Move {field} down","viewbar.customizeTimeline":"Customize timeline","viewbar.customizeGantt":"Customize Gantt","viewbar.customizeList":"Customize list","viewbar.customizeInbox":"Customize inbox","viewbar.customizeBoard":"Customize board","viewbar.boardRowsBy":"Rows by","viewbar.boardDue":"Due date","viewbar.boardFade":"Fade cards by","viewbar.boardFadeHint":"Cards fade a little more each week after this date. Pick a Last modified time field to fade the ones nobody has changed.","viewbar.boardBlocked":"Blocked when","viewbar.boardOnCards":"On the cards (up to {count})","viewbar.boardQuickFilters":"Quick filters above the board","viewbar.boardLimits":"Most cards in a column","viewbar.boardNoLimit":"No limit","viewbar.rowHeight":"Row height","viewbar.markAllSeen":"Mark all as seen","viewbar.automations":"Automations","viewbar.automationCount.one":"{count} automation","viewbar.automationCount.other":"{count} automations","viewbar.records.one":"{count} record","viewbar.records.other":"{count} records","viewbar.findRecord":"Find a record","viewbar.search":"Search","viewbar.scanToFind":"Scan a code to find its record","viewbar.searchShortcut":"Search (Ctrl+F)","viewbar.myViews":"My views","viewbar.section":"Section","viewbar.moveToSection":"Move {name} to a section","viewbar.sectionOf":"Section of {name}","viewbar.sectionPlaceholder":"A section, or empty for none","viewbar.newView":"New {type} view","viewbar.name":"Name","viewbar.stackBy":"Stack records by","viewbar.startDate":"Start date","viewbar.dateField":"Date field","viewbar.endDate":"End date","viewbar.none":"None","viewbar.progress":"Progress","viewbar.dependsOn":"Depends on","viewbar.chartType":"Chart type","viewbar.groupBy":"Group by","viewbar.value":"Value","viewbar.numberOfRecords":"Number of records","viewbar.sumOf":"Sum of {field}","viewbar.averageOf":"Average of {field}","viewbar.newestFirstBy":"Newest first by","viewbar.viewsSort":"The view's sort","viewbar.coverImage":"Cover image","viewbar.personalCheck":"Personal view: only I see it","viewbar.cancel":"Cancel","viewbar.createView":"Create view","viewbar.viewName":"View name","viewbar.rename":"Rename","viewbar.renameView":"Rename {name}","viewbar.duplicate":"Duplicate","viewbar.duplicateView":"Duplicate {name}","viewbar.lockView":"Lock {name}","viewbar.unlockView":"Unlock {name}","viewbar.lockHint":"Lock: keep its settings as they are now","viewbar.unlockHint":"Unlock: anyone can change its settings","viewbar.delete":"Delete","viewbar.deleteView":"Delete {name}","viewbar.create":"Create","viewbar.createPersonal":"Create a personal view","viewbar.needsSelect":"Needs a single select field","viewbar.needsGroupField":"Needs a field to group by","viewbar.needsDate":"Needs a date field","viewbar.typeGrid":"Grid","viewbar.typeKanban":"Kanban","viewbar.typeCalendar":"Calendar","viewbar.typeTimeline":"Timeline","viewbar.typeGantt":"Gantt","viewbar.deleteViewAsk":"Delete {name}?","viewbar.typeGallery":"Gallery","viewbar.typeChart":"Chart","viewbar.typeForm":"Form","viewbar.typeList":"List","viewbar.typeInbox":"Inbox","viewbar.typeTree":"Tree","viewbar.typePivot":"Pivot","viewbar.parent":"Parent","viewbar.treeNeedsParent":"A tree needs a link to this table that names each record's parent.","viewbar.treeNeedsAll":"A tree needs every record at once, and this table is read a part at a time.","viewbar.pivotRows":"Rows","viewbar.pivotCols":"Columns","viewbar.pivotValues":"Values","viewbar.pivotAddRow":"Add a field","viewbar.pivotNoCols":"None","viewbar.pivotCount":"Count of records","viewbar.pivotSum":"Sum of {field}","viewbar.pivotAvg":"Average of {field}","viewbar.pivotMin":"Smallest {field}","viewbar.pivotMax":"Largest {field}","viewbar.pivotRemove":"Remove {field}","viewbar.pivotEmpty":"No records to add up.","viewbar.pivotLoaded":"Adds up the {count} records loaded in the page; the table has {total}.","viewbar.pivotTotal":"Total","viewbar.typeDashboard":"Dashboard","viewbar.sortFirstLast":"first → last","viewbar.sortLastFirst":"last → first","viewbar.sortDoneUp":"0% → 100% done","viewbar.sortDoneDown":"100% → 0% done","viewbar.sortHueUp":"red → pink","viewbar.sortHueDown":"pink → red","viewbar.sortAZ":"A → Z","viewbar.sortZA":"Z → A","viewbar.uncategorized":"Uncategorized","viewbar.expandRecord":"Expand record","viewbar.comment":"Comment","viewbar.moveTo":"Move to","viewbar.empty":"Empty","viewbar.duplicateRecord":"Duplicate record","viewbar.deleteRecord":"Delete record","viewbar.filterTitle":"In this view, show records","viewbar.filterEmpty":"No filter conditions are applied to this view","viewbar.where":"Where","viewbar.joinWith":"Join conditions with","viewbar.field":"Field","viewbar.fields":"Fields","viewbar.operator":"Operator","viewbar.removeCondition":"Remove condition","viewbar.addCondition":"+ Add condition","viewbar.addConditionGroup":"+ Add condition group","viewbar.sortBy":"Sort by","viewbar.direction":"Direction","viewbar.removeGroup":"Remove group","viewbar.removeSort":"Remove sort","viewbar.addSubgroup":"+ Add subgroup","viewbar.addSort":"+ Add another sort","viewbar.findField":"Find a field","viewbar.primaryAlwaysShown":"The primary field is always shown","viewbar.hideAll":"Hide all","viewbar.showAll":"Show all","viewbar.editFieldNamed":"Edit the field {name}","viewbar.colorRows":"Color rows","viewbar.selectField":"Select field","viewbar.conditions":"Conditions","viewbar.colorBySelect":"Color records the same as a single select field","viewbar.colorByConditions":"Color records that match a condition; the first match wins","viewbar.notColored":"Rows are not colored","viewbar.colorTabRows":"Rows","viewbar.colorTabCells":"Cells","viewbar.colorCellsHelp":"Color a field's cell while its value matches a condition. For one field, the first match wins.","viewbar.noCellColors":"No cells are colored","viewbar.addCellRule":"Add a rule","viewbar.coloredCells":"Colored cells","viewbar.highlightByHand":"Mark records by hand","viewbar.highlightByHandHelp":"Adds a Highlight field and colors each row by the color picked in it.","viewbar.highlightField":"Highlight","viewbar.chart":"Chart","viewbar.type":"Type","viewbar.chooseField":"Choose a field","viewbar.combine":"Combine","viewbar.sum":"Sum","viewbar.average":"Average","viewbar.timeline":"Timeline","viewbar.gantt":"Gantt","viewbar.laneBy":"Lanes by","viewbar.noneMilestone":"None (a milestone)","viewbar.ganttHint":"Arrows between records come from a link field to this same table.","viewbar.under":"Under {field}","viewbar.theName":"the name","viewbar.backToFirstThree":"Back to the first three shown","viewbar.me":"Me","viewbar.selectOption":"Select an option","viewbar.values":"Values","viewbar.noOptions":"No options","viewbar.span":"Span","viewbar.days":"Days","viewbar.day":"Day","viewbar.date":"Date","viewbar.enterValue":"Enter a value","viewbar.timePlaceholder":"9:30 am","viewbar.dayExactDate":"exact date","viewbar.spanPastNumberOfDays":"the past number of days","viewbar.spanNextNumberOfDays":"the next number of days","viewbar.opContains":"contains","viewbar.opDoesNotContain":"does not contain","viewbar.opIs":"is","viewbar.opIsNot":"is not","viewbar.opIsEmpty":"is empty","viewbar.opIsNotEmpty":"is not empty","viewbar.opIsAnyOf":"is any of","viewbar.opIsNoneOf":"is none of","viewbar.opHasAnyOf":"has any of","viewbar.opHasAllOf":"has all of","viewbar.opIsExactly":"is exactly","viewbar.opHasNoneOf":"has none of","viewbar.opIsBefore":"is before","viewbar.opIsAfter":"is after","viewbar.opIsOnOrBefore":"is on or before","viewbar.opIsOnOrAfter":"is on or after","viewbar.opIsWithin":"is within","viewbar.opIsAtOrBefore":"is at or before","viewbar.opIsAtOrAfter":"is at or after","viewbar.opFileNameContains":"file name contains","viewbar.opIsComplete":"is complete","viewbar.opIsNotComplete":"is not complete","viewbar.opDoneAtLeast":"% done ≥","viewbar.opDoneUnder":"% done <","viewbar.opHasItemContaining":"has an item containing","viewbar.dayToday":"today","viewbar.dayTomorrow":"tomorrow","viewbar.dayYesterday":"yesterday","viewbar.dayOneWeekAgo":"one week ago","viewbar.dayOneWeekFromNow":"one week from now","viewbar.dayOneMonthAgo":"one month ago","viewbar.dayOneMonthFromNow":"one month from now","viewbar.spanPastWeek":"the past week","viewbar.spanPastMonth":"the past month","viewbar.spanPastYear":"the past year","viewbar.spanNextWeek":"the next week","viewbar.spanNextMonth":"the next month","viewbar.spanNextYear":"the next year","viewbar.spanPastDays":"the past {days} days","viewbar.spanNextDays":"the next {days} days","viewbar.valueChecked":"checked","viewbar.valueUnchecked":"unchecked","viewbar.valueMe":"me","viewbar.conjAnd":"and","viewbar.conjOr":"or","viewbar.everyRecord":"every record","viewbar.untitled":"Untitled","viewbar.noRecordsInView":"No records. The view's filter may hide them all.","viewbar.groupLabel":"Group","viewbar.groupAria":"{field}: {value}","viewbar.changedTitle":"Changed by someone else","viewbar.changedSr":"Changed: ","viewbar.unread.one":"{count} unread","viewbar.unread.other":"{count} unread","viewbar.allRead":"All read","viewbar.markAllRead":"Mark all read","viewbar.recordsList":"Records","viewbar.selectedCard":"Selected","viewbar.record":"Record","viewbar.unreadSr":"Unread: ","viewbar.backToList":"Back to the list","viewbar.back":"Back","viewbar.previousRecord":"Previous record","viewbar.previousHint":"Previous (k)","viewbar.nextRecord":"Next record","viewbar.nextHint":"Next (j)","viewbar.expand":"Expand","viewbar.latestChanges":"Latest changes","viewbar.changedTo":"to","viewbar.byAutomation":"Automation: {name}","viewbar.someone":"Someone","viewbar.someoneElse":"Someone else","viewbar.you":"You","viewbar.addedRecord":"added this record","viewbar.changedField":"changed {field}","viewbar.cleared":"(cleared)","viewbar.comments.one":"{count} comment","viewbar.comments.other":"{count} comments","viewbar.addComment":"Add a comment","viewbar.pickRecord":"Pick a record to read it here. j and k move through the list.","viewbar.chartNoRecords":"No records to chart. The view's filter may hide them all.","viewbar.chartChooseField":"Choose a field to chart in Customize chart.","viewbar.chartBar":"Bar","viewbar.chartBarH":"Horizontal bar","viewbar.chartLine":"Line","viewbar.chartPie":"Pie","viewbar.chartDonut":"Donut","viewbar.chartChecked":"Checked","viewbar.chartUnchecked":"Unchecked","viewbar.chartRecords":"Records","viewbar.chartMonth":"{month} {year}","viewbar.monthJan":"Jan","viewbar.monthFeb":"Feb","viewbar.monthMar":"Mar","viewbar.monthApr":"Apr","viewbar.monthMay":"May","viewbar.monthJun":"Jun","viewbar.monthJul":"Jul","viewbar.monthAug":"Aug","viewbar.monthSep":"Sep","viewbar.monthOct":"Oct","viewbar.monthNov":"Nov","viewbar.monthDec":"Dec","viewbar.addTile":"Add tile","viewbar.addATile":"Add a tile","viewbar.dragTileHint":"Drag a tile to move it.","viewbar.done":"Done","viewbar.editDashboard":"Edit dashboard","viewbar.noTiles":"This dashboard has no tiles yet.","viewbar.dashboardTiles":"Dashboard tiles","viewbar.noRecordsMatch":"No records match.","viewbar.noRecordsYet":"No records yet.","viewbar.noRecordsToChart":"No records to chart.","viewbar.partOf":"{part} of {whole}","viewbar.openRecords.one":"Open the {count} record","viewbar.openRecords.other":"Open the {count} records","viewbar.tileSize":"Size of {title}","viewbar.moveTileEarlier":"Move {title} earlier","viewbar.moveEarlier":"Move earlier","viewbar.moveTileLater":"Move {title} later","viewbar.moveLater":"Move later","viewbar.editTileNamed":"Edit {title}","viewbar.editTile":"Edit tile","viewbar.removeTileNamed":"Remove {title}","viewbar.removeTile":"Remove tile","viewbar.removeTileAsk":"Remove this tile?","viewbar.removeTileYes":"Remove {title}","viewbar.tileRemoved":"{title} removed.","viewbar.tileMoved":"{title} moved to place {place} of {total}.","viewbar.shows":"Shows","viewbar.table":"Table","viewbar.deletedTable":"A deleted table","viewbar.ofField":"Of field","viewbar.caption":"Caption","viewbar.captionPlaceholder":"Target $500,000","viewbar.asEntered":"As entered","viewbar.lowToHigh":"Low to high","viewbar.highToLow":"High to low","viewbar.showBeside":"Show beside the name","viewbar.theSortField":"The sort field","viewbar.tileRecords":"Records","viewbar.progressHint":"Shows how many of the table's records match the filter below.","viewbar.doneWhen":"Done when","viewbar.progressEmpty":"Add the condition a record has to match to count as done.","viewbar.recordsEmpty":"Every record of the table. Add a condition to narrow it.","viewbar.title":"Title","viewbar.titlePlaceholder":"Named after what it shows","viewbar.size":"Size","viewbar.save":"Save","viewbar.inTable":"{count} in {table}","viewbar.openNamed":"Open {name}","viewbar.firstOf":"The first {shown} of {count}.","viewbar.tileNumber":"Number","viewbar.tileList":"List","viewbar.tileText":"Text","viewbar.tileButton":"Button","viewbar.tileTextLabel":"Text","viewbar.tileTextHint":"A line starting with # is a heading. **Bold**, and links as [words](https://...).","viewbar.tileTextEmpty":"Edit the tile to write its text.","viewbar.tileButtonLabel":"Label","viewbar.tileButtonUrl":"Opens","viewbar.tileButtonUrlHint":"An address starting with https://, http://, mailto: or /.","viewbar.tileButtonEmpty":"Edit the tile to say where it goes.","viewbar.tileButtonDefault":"Open","viewbar.tileImage":"Image","viewbar.tileDivider":"Divider","viewbar.tilePicker":"Record picker","viewbar.tileImageUrl":"Image address","viewbar.tileImageUrlHint":"An address starting with https://, http:// or /.","viewbar.tileImageAlt":"What it shows","viewbar.tileImageAltPlaceholder":"Said to people who cannot see it","viewbar.tileImageFit":"Fit","viewbar.tileImageContain":"Whole image","viewbar.tileImageCover":"Fill the tile","viewbar.tileImageEmpty":"Edit the tile to give it an image.","viewbar.tileDividerHint":"A line across the dashboard, with its title over it: a new section starts.","viewbar.tilePickerFields":"Fields shown","viewbar.tilePickerHint":"People pick a record here; tiles narrowed by this picker then count only the records linked to it.","viewbar.tilePickerChoose":"Choose a record","viewbar.tilePickerAll":"Every record","viewbar.tilePickerNone":"No records to choose from.","viewbar.tilePickerFirst":"The first {count} records are listed.","viewbar.tilePickerOpen":"Open the record","viewbar.tilePickerPick":"Pick a record to see it here.","viewbar.narrowedBy":"Narrowed by","viewbar.narrowNone":"No record picker","viewbar.narrowOption":"{picker}: records whose {field} is the one picked","viewbar.sizeSmall":"Small","viewbar.sizeWide":"Wide","viewbar.sizeLarge":"Large","viewbar.smallest":"Smallest","viewbar.largest":"Largest","viewbar.chooseFieldToAddUp":"Choose a field to add up.","viewbar.noValues":"No values","viewbar.unnamedRecord":"Untitled record","viewbar.tileTableGone":"The table this tile reads is gone. Edit the tile to pick another.","viewbar.chooseFieldToGroup":"Choose a field to group the records by.","viewbar.tile":"Tile","viewbar.titleTotal":"Total {field}","viewbar.titleAverage":"Average {field}","viewbar.titleSmallest":"Smallest {field}","viewbar.titleLargest":"Largest {field}","viewbar.titleBy":"{value} by {field}"};
1
+ export const VIEWBAR_MESSAGES={"viewbar.board.board":"Board","viewbar.board.addCard":"+ Add a card","viewbar.board.addCardTo":"Add card to {lane}","viewbar.board.cardTitle":"Card title...","viewbar.board.noCards":"No cards","viewbar.board.cardActions":"Card actions","viewbar.board.clearFilters":"Clear filters","viewbar.board.blocked":"Blocked","viewbar.board.age":"Age","viewbar.board.comments":"Comments","viewbar.board.writeComment":"Write a comment...","viewbar.board.deleteComment":"Delete comment","viewbar.board.addSubtask":"Add subtask...","viewbar.board.rename":"Double-click, Enter, or F2 to rename","viewbar.board.cancel":"Cancel","viewbar.board.save":"Save","viewbar.board.grabbed":"Grabbed {card}. Use arrow keys to move, Space to drop, Escape to cancel.","viewbar.board.dropped":"Dropped {card} in {lane}.","viewbar.formMoved":"{field} moved to place {place} of {total}.","viewbar.board.movedTo":"Moved to {lane}.","viewbar.board.movedUp":"Moved up.","viewbar.board.movedDown":"Moved down.","viewbar.board.movedPosition":"Moved {lane} to position {position} of {total}.","viewbar.board.cancelled":"Cancelled.","viewbar.board.wipLimit":"{lane} is at its WIP limit ({limit}).","viewbar.board.cannotMove":"Cards can't be moved here.","viewbar.board.cardBlocked":"{card} is blocked and can't be moved.","viewbar.board.selected":"Selected {card}. {count} selected.","viewbar.board.deselected":"Deselected {card}. {count} selected.","viewbar.board.expand":"Expand {lane}","viewbar.board.collapse":"Collapse {lane}","viewbar.board.wipTitle":"At most {limit} cards","viewbar.board.none":"(none)","viewbar.moveField":"Move {name}","viewbar.moveFieldHint":"Drag, or press the up and down arrows","viewbar.fieldMoved":"{name} moved to place {place} of {count}","viewbar.calendar.month":"Month","viewbar.calendar.week":"Week","viewbar.calendar.day":"Day","viewbar.calendar.agenda":"Agenda","viewbar.calendar.timelineDay":"Day","viewbar.calendar.timelineWeek":"Week","viewbar.calendar.timelineMonth":"Month","viewbar.calendar.timelineYear":"Year","viewbar.calendar.today":"Today","viewbar.calendar.previous":"Previous","viewbar.calendar.next":"Next","viewbar.calendar.allDay":"all day","viewbar.calendar.more":"+{count} more","viewbar.calendar.noEvents":"No events in this range.","viewbar.calendar.eventsColumn":"Events","viewbar.calendar.edit":"Edit","viewbar.calendar.duplicate":"Duplicate","viewbar.calendar.delete":"Delete","viewbar.calendar.moveGrabbed":"{title} picked up. Arrow keys move it, Space puts it down, Escape cancels.","viewbar.gantt.expandAll":"Expand all","viewbar.gantt.collapseAll":"Collapse all","viewbar.gantt.expandTask":"Expand {title}","viewbar.gantt.collapseTask":"Collapse {title}","viewbar.gantt.zoomIn":"Zoom in","viewbar.gantt.zoomOut":"Zoom out","viewbar.gantt.zoomDay":"day","viewbar.gantt.zoomWeek":"week","viewbar.gantt.zoomMonth":"month","viewbar.gantt.zoomQuarter":"quarter","viewbar.gantt.zoomYear":"year","viewbar.gantt.tableLabel":"Records","viewbar.gantt.chartLabel":"Gantt bars","viewbar.gantt.resizeTable":"Resize the record table","viewbar.gantt.days":"Days","viewbar.gantt.progress":"Progress","viewbar.gantt.slack":"Slack","viewbar.gantt.start":"Start","viewbar.gantt.finish":"Finish","viewbar.gantt.progressPercent":"Progress %","viewbar.gantt.task":"Record","viewbar.gantt.milestone":"Milestone","viewbar.gantt.day":"{count} day","viewbar.gantt.daysCount":"{count} days","viewbar.gantt.open":"Open","viewbar.gantt.openTask":"Open {title}","viewbar.gantt.edit":"Edit","viewbar.gantt.addSubtask":"Add subtask","viewbar.gantt.delete":"Delete","viewbar.gantt.deleteTask":"Delete record","viewbar.gantt.removeLink":"Remove link: {from} to {to}","viewbar.gantt.taskActions":"Record actions","viewbar.gantt.save":"Save","viewbar.gantt.cancel":"Cancel","viewbar.gantt.onBaseline":"On the baseline","viewbar.gantt.laterThanBaseline":"{count} days later than baseline","viewbar.gantt.aheadOfBaseline":"{count} days ahead of baseline","viewbar.gantt.dragProgress":"Drag to set progress","viewbar.gantt.linkFromStart":"Drag to link from the start","viewbar.gantt.linkFromFinish":"Drag to link from the finish","viewbar.gantt.workingDays":"{count} working days, {progress}%","viewbar.gantt.onCriticalPath":"On the critical path","viewbar.gantt.daysOfSlack":"{count} days of slack","viewbar.gantt.notMet":"not met","viewbar.gantt.peak":"peak {peak} / {capacity}","viewbar.gantt.loadOf":"{label}: {load} of {capacity}","viewbar.gantt.moveGrabbed":"{title} picked up. Arrow keys move it, Space puts it down, Escape cancels.","viewbar.gantt.moveDone":"{title} moved to {range}.","viewbar.gantt.moveCancelled":"Move cancelled.","viewbar.gantt.resized":"{title} now ends {date}.","viewbar.gantt.progressSet":"{title} at {progress}%.","viewbar.gantt.upcoming":"{title}, upcoming {date}","viewbar.calendar.moveDone":"{title} moved to {place}.","viewbar.calendar.moveCancelled":"Move cancelled.","viewbar.calendar.moveBlocked":"That time is not free.","viewbar.calendar.scopeEdit":"Edit recurring event","viewbar.calendar.scopeDelete":"Delete recurring event","viewbar.calendar.scopeOccurrence":"This event","viewbar.calendar.scopeFollowing":"This and following","viewbar.calendar.scopeSeries":"All events","viewbar.calendar.upcoming":"{name}, upcoming","viewbar.sortToOrder":"Sort this view by a number field to keep the order of its cards","viewbar.viewSettings":"View settings","viewbar.views":"Views","viewbar.defaultViewName":"Grid view","viewbar.viewCopy":"{name} copy","viewbar.rowShort":"Short","viewbar.rowMedium":"Medium","viewbar.rowTall":"Tall","viewbar.rowExtraTall":"Extra tall","viewbar.lockedTitle":"This view is locked: its settings stay as saved","viewbar.lockedTitleBy":"This view is locked by {name}: its settings stay as saved","viewbar.locked":"Locked","viewbar.lockedNotSaved":"Locked, not saved","viewbar.reset":"Reset","viewbar.personalTitle":"A personal view: only you see it","viewbar.personal":"Personal","viewbar.hideFields":"Hide fields","viewbar.hiddenFields.one":"{count} hidden field","viewbar.hiddenFields.other":"{count} hidden fields","viewbar.filter":"Filter","viewbar.filteredBy":"Filtered by {field}","viewbar.filteredByFields.one":"Filtered by {count} field","viewbar.filteredByFields.other":"Filtered by {count} fields","viewbar.group":"Group","viewbar.groupedBy.one":"Grouped by {count} field","viewbar.groupedBy.other":"Grouped by {count} fields","viewbar.sort":"Sort","viewbar.sortedBy.one":"Sorted by {count} field","viewbar.sortedBy.other":"Sorted by {count} fields","viewbar.color":"Color","viewbar.coloredBy":"Colored by {field}","viewbar.coloredByAField":"Colored by field","viewbar.coloredByConditions":"Colored by conditions","viewbar.customizeChart":"Customize chart","viewbar.customizeForm":"Customize form","viewbar.formTitle":"Title","viewbar.formDescription":"Line under the title","viewbar.formButton":"Button text","viewbar.formFields":"Fields the form asks for","viewbar.formRequiredColumn":"Required","viewbar.formAsk":"Ask for {field}","viewbar.formRequire":"{field} is required","viewbar.formMoveUp":"Move {field} up","viewbar.formMoveDown":"Move {field} down","viewbar.customizeTimeline":"Customize timeline","viewbar.customizeGantt":"Customize Gantt","viewbar.customizeList":"Customize list","viewbar.customizeInbox":"Customize inbox","viewbar.customizeBoard":"Customize board","viewbar.criticalPath":"Show the critical path","viewbar.criticalPathHint":"The tasks that set the finish date get a red outline: if one of them is late, so is the end. Point at any other task to see how many days it can slip.","viewbar.boardRowsBy":"Rows by","viewbar.boardDue":"Due date","viewbar.boardFade":"Fade cards by","viewbar.boardFadeHint":"Cards fade a little more each week after this date. Pick a Last modified time field to fade the ones nobody has changed.","viewbar.boardBlocked":"Blocked when","viewbar.boardOnCards":"On the cards (up to {count})","viewbar.boardQuickFilters":"Quick filters above the board","viewbar.boardLimits":"Most cards in a column","viewbar.boardNoLimit":"No limit","viewbar.rowHeight":"Row height","viewbar.markAllSeen":"Mark all as seen","viewbar.automations":"Automations","viewbar.automationCount.one":"{count} automation","viewbar.automationCount.other":"{count} automations","viewbar.records.one":"{count} record","viewbar.records.other":"{count} records","viewbar.findRecord":"Find a record","viewbar.search":"Search","viewbar.scanToFind":"Scan a code to find its record","viewbar.searchShortcut":"Search (Ctrl+F)","viewbar.myViews":"My views","viewbar.section":"Section","viewbar.moveToSection":"Move {name} to a section","viewbar.sectionOf":"Section of {name}","viewbar.sectionPlaceholder":"A section, or empty for none","viewbar.newView":"New {type} view","viewbar.name":"Name","viewbar.stackBy":"Stack records by","viewbar.startDate":"Start date","viewbar.dateField":"Date field","viewbar.endDate":"End date","viewbar.none":"None","viewbar.progress":"Progress","viewbar.dependsOn":"Depends on","viewbar.chartType":"Chart type","viewbar.groupBy":"Group by","viewbar.value":"Value","viewbar.numberOfRecords":"Number of records","viewbar.sumOf":"Sum of {field}","viewbar.averageOf":"Average of {field}","viewbar.newestFirstBy":"Newest first by","viewbar.viewsSort":"The view's sort","viewbar.coverImage":"Cover image","viewbar.personalCheck":"Personal view: only I see it","viewbar.cancel":"Cancel","viewbar.createView":"Create view","viewbar.viewName":"View name","viewbar.rename":"Rename","viewbar.renameView":"Rename {name}","viewbar.duplicate":"Duplicate","viewbar.duplicateView":"Duplicate {name}","viewbar.lockView":"Lock {name}","viewbar.unlockView":"Unlock {name}","viewbar.lockHint":"Lock: keep its settings as they are now","viewbar.unlockHint":"Unlock: anyone can change its settings","viewbar.delete":"Delete","viewbar.deleteView":"Delete {name}","viewbar.create":"Create","viewbar.createPersonal":"Create a personal view","viewbar.needsSelect":"Needs a single select field","viewbar.needsGroupField":"Needs a field to group by","viewbar.needsDate":"Needs a date field","viewbar.typeGrid":"Grid","viewbar.typeKanban":"Kanban","viewbar.typeCalendar":"Calendar","viewbar.typeTimeline":"Timeline","viewbar.typeGantt":"Gantt","viewbar.deleteViewAsk":"Delete {name}?","viewbar.typeGallery":"Gallery","viewbar.typeChart":"Chart","viewbar.typeForm":"Form","viewbar.typeList":"List","viewbar.typeInbox":"Inbox","viewbar.typeTree":"Tree","viewbar.typePivot":"Pivot","viewbar.parent":"Parent","viewbar.treeNeedsParent":"A tree needs a link to this table that names each record's parent.","viewbar.treeNeedsAll":"A tree needs every record at once, and this table is read a part at a time.","viewbar.pivotRows":"Rows","viewbar.pivotCols":"Columns","viewbar.pivotValues":"Values","viewbar.pivotAddRow":"Add a field","viewbar.pivotNoCols":"None","viewbar.pivotCount":"Count of records","viewbar.pivotSum":"Sum of {field}","viewbar.pivotAvg":"Average of {field}","viewbar.pivotMin":"Smallest {field}","viewbar.pivotMax":"Largest {field}","viewbar.pivotRemove":"Remove {field}","viewbar.pivotEmpty":"No records to add up.","viewbar.pivotLoaded":"Adds up the {count} records loaded in the page; the table has {total}.","viewbar.pivotTotal":"Total","viewbar.typeDashboard":"Dashboard","viewbar.sortFirstLast":"first → last","viewbar.sortLastFirst":"last → first","viewbar.sortDoneUp":"0% → 100% done","viewbar.sortDoneDown":"100% → 0% done","viewbar.sortHueUp":"red → pink","viewbar.sortHueDown":"pink → red","viewbar.sortAZ":"A → Z","viewbar.sortZA":"Z → A","viewbar.uncategorized":"Uncategorized","viewbar.expandRecord":"Expand record","viewbar.comment":"Comment","viewbar.moveTo":"Move to","viewbar.empty":"Empty","viewbar.duplicateRecord":"Duplicate record","viewbar.deleteRecord":"Delete record","viewbar.filterTitle":"In this view, show records","viewbar.filterEmpty":"No filter conditions are applied to this view","viewbar.where":"Where","viewbar.joinWith":"Join conditions with","viewbar.field":"Field","viewbar.fields":"Fields","viewbar.operator":"Operator","viewbar.removeCondition":"Remove condition","viewbar.addCondition":"+ Add condition","viewbar.addConditionGroup":"+ Add condition group","viewbar.sortBy":"Sort by","viewbar.direction":"Direction","viewbar.removeGroup":"Remove group","viewbar.removeSort":"Remove sort","viewbar.addSubgroup":"+ Add subgroup","viewbar.addSort":"+ Add another sort","viewbar.findField":"Find a field","viewbar.primaryAlwaysShown":"The primary field is always shown","viewbar.hideAll":"Hide all","viewbar.showAll":"Show all","viewbar.editFieldNamed":"Edit the field {name}","viewbar.colorRows":"Color rows","viewbar.selectField":"Select field","viewbar.conditions":"Conditions","viewbar.colorBySelect":"Color records the same as a single select field","viewbar.colorByConditions":"Color records that match a condition; the first match wins","viewbar.notColored":"Rows are not colored","viewbar.colorTabRows":"Rows","viewbar.colorTabCells":"Cells","viewbar.colorCellsHelp":"Color a field's cell while its value matches a condition. For one field, the first match wins.","viewbar.noCellColors":"No cells are colored","viewbar.addCellRule":"Add a rule","viewbar.coloredCells":"Colored cells","viewbar.highlightByHand":"Mark records by hand","viewbar.highlightByHandHelp":"Adds a Highlight field and colors each row by the color picked in it.","viewbar.highlightField":"Highlight","viewbar.chart":"Chart","viewbar.type":"Type","viewbar.chooseField":"Choose a field","viewbar.combine":"Combine","viewbar.sum":"Sum","viewbar.average":"Average","viewbar.timeline":"Timeline","viewbar.gantt":"Gantt","viewbar.laneBy":"Lanes by","viewbar.noneMilestone":"None (a milestone)","viewbar.ganttHint":"Arrows between records come from a link field to this same table.","viewbar.under":"Under {field}","viewbar.theName":"the name","viewbar.backToFirstThree":"Back to the first three shown","viewbar.me":"Me","viewbar.selectOption":"Select an option","viewbar.values":"Values","viewbar.noOptions":"No options","viewbar.span":"Span","viewbar.days":"Days","viewbar.day":"Day","viewbar.date":"Date","viewbar.enterValue":"Enter a value","viewbar.timePlaceholder":"9:30 am","viewbar.dayExactDate":"exact date","viewbar.spanPastNumberOfDays":"the past number of days","viewbar.spanNextNumberOfDays":"the next number of days","viewbar.opContains":"contains","viewbar.opDoesNotContain":"does not contain","viewbar.opIs":"is","viewbar.opIsNot":"is not","viewbar.opIsEmpty":"is empty","viewbar.opIsNotEmpty":"is not empty","viewbar.opIsAnyOf":"is any of","viewbar.opIsNoneOf":"is none of","viewbar.opHasAnyOf":"has any of","viewbar.opHasAllOf":"has all of","viewbar.opIsExactly":"is exactly","viewbar.opHasNoneOf":"has none of","viewbar.opIsBefore":"is before","viewbar.opIsAfter":"is after","viewbar.opIsOnOrBefore":"is on or before","viewbar.opIsOnOrAfter":"is on or after","viewbar.opIsWithin":"is within","viewbar.opIsAtOrBefore":"is at or before","viewbar.opIsAtOrAfter":"is at or after","viewbar.opFileNameContains":"file name contains","viewbar.opIsComplete":"is complete","viewbar.opIsNotComplete":"is not complete","viewbar.opDoneAtLeast":"% done ≥","viewbar.opDoneUnder":"% done <","viewbar.opHasItemContaining":"has an item containing","viewbar.dayToday":"today","viewbar.dayTomorrow":"tomorrow","viewbar.dayYesterday":"yesterday","viewbar.dayOneWeekAgo":"one week ago","viewbar.dayOneWeekFromNow":"one week from now","viewbar.dayOneMonthAgo":"one month ago","viewbar.dayOneMonthFromNow":"one month from now","viewbar.spanPastWeek":"the past week","viewbar.spanPastMonth":"the past month","viewbar.spanPastYear":"the past year","viewbar.spanNextWeek":"the next week","viewbar.spanNextMonth":"the next month","viewbar.spanNextYear":"the next year","viewbar.spanPastDays":"the past {days} days","viewbar.spanNextDays":"the next {days} days","viewbar.valueChecked":"checked","viewbar.valueUnchecked":"unchecked","viewbar.valueMe":"me","viewbar.conjAnd":"and","viewbar.conjOr":"or","viewbar.everyRecord":"every record","viewbar.untitled":"Untitled","viewbar.noRecordsInView":"No records. The view's filter may hide them all.","viewbar.groupLabel":"Group","viewbar.groupAria":"{field}: {value}","viewbar.changedTitle":"Changed by someone else","viewbar.changedSr":"Changed: ","viewbar.unread.one":"{count} unread","viewbar.unread.other":"{count} unread","viewbar.allRead":"All read","viewbar.markAllRead":"Mark all read","viewbar.recordsList":"Records","viewbar.selectedCard":"Selected","viewbar.record":"Record","viewbar.unreadSr":"Unread: ","viewbar.backToList":"Back to the list","viewbar.back":"Back","viewbar.previousRecord":"Previous record","viewbar.previousHint":"Previous (k)","viewbar.nextRecord":"Next record","viewbar.nextHint":"Next (j)","viewbar.expand":"Expand","viewbar.latestChanges":"Latest changes","viewbar.changedTo":"to","viewbar.byAutomation":"Automation: {name}","viewbar.someone":"Someone","viewbar.someoneElse":"Someone else","viewbar.you":"You","viewbar.addedRecord":"added this record","viewbar.changedField":"changed {field}","viewbar.cleared":"(cleared)","viewbar.comments.one":"{count} comment","viewbar.comments.other":"{count} comments","viewbar.addComment":"Add a comment","viewbar.pickRecord":"Pick a record to read it here. j and k move through the list.","viewbar.chartNoRecords":"No records to chart. The view's filter may hide them all.","viewbar.chartChooseField":"Choose a field to chart in Customize chart.","viewbar.chartBar":"Bar","viewbar.chartBarH":"Horizontal bar","viewbar.chartLine":"Line","viewbar.chartPie":"Pie","viewbar.chartDonut":"Donut","viewbar.chartChecked":"Checked","viewbar.chartUnchecked":"Unchecked","viewbar.chartRecords":"Records","viewbar.chartMonth":"{month} {year}","viewbar.monthJan":"Jan","viewbar.monthFeb":"Feb","viewbar.monthMar":"Mar","viewbar.monthApr":"Apr","viewbar.monthMay":"May","viewbar.monthJun":"Jun","viewbar.monthJul":"Jul","viewbar.monthAug":"Aug","viewbar.monthSep":"Sep","viewbar.monthOct":"Oct","viewbar.monthNov":"Nov","viewbar.monthDec":"Dec","viewbar.addTile":"Add tile","viewbar.addATile":"Add a tile","viewbar.dragTileHint":"Drag a tile to move it.","viewbar.done":"Done","viewbar.editDashboard":"Edit dashboard","viewbar.noTiles":"This dashboard has no tiles yet.","viewbar.dashboardTiles":"Dashboard tiles","viewbar.noRecordsMatch":"No records match.","viewbar.noRecordsYet":"No records yet.","viewbar.noRecordsToChart":"No records to chart.","viewbar.partOf":"{part} of {whole}","viewbar.openRecords.one":"Open the {count} record","viewbar.openRecords.other":"Open the {count} records","viewbar.tileSize":"Size of {title}","viewbar.moveTileEarlier":"Move {title} earlier","viewbar.moveEarlier":"Move earlier","viewbar.moveTileLater":"Move {title} later","viewbar.moveLater":"Move later","viewbar.editTileNamed":"Edit {title}","viewbar.editTile":"Edit tile","viewbar.removeTileNamed":"Remove {title}","viewbar.removeTile":"Remove tile","viewbar.removeTileAsk":"Remove this tile?","viewbar.removeTileYes":"Remove {title}","viewbar.tileRemoved":"{title} removed.","viewbar.tileMoved":"{title} moved to place {place} of {total}.","viewbar.shows":"Shows","viewbar.table":"Table","viewbar.deletedTable":"A deleted table","viewbar.ofField":"Of field","viewbar.caption":"Caption","viewbar.captionPlaceholder":"Target $500,000","viewbar.asEntered":"As entered","viewbar.lowToHigh":"Low to high","viewbar.highToLow":"High to low","viewbar.showBeside":"Show beside the name","viewbar.theSortField":"The sort field","viewbar.tileRecords":"Records","viewbar.progressHint":"Shows how many of the table's records match the filter below.","viewbar.doneWhen":"Done when","viewbar.progressEmpty":"Add the condition a record has to match to count as done.","viewbar.recordsEmpty":"Every record of the table. Add a condition to narrow it.","viewbar.title":"Title","viewbar.titlePlaceholder":"Named after what it shows","viewbar.size":"Size","viewbar.save":"Save","viewbar.inTable":"{count} in {table}","viewbar.openNamed":"Open {name}","viewbar.firstOf":"The first {shown} of {count}.","viewbar.tileNumber":"Number","viewbar.tileList":"List","viewbar.tileText":"Text","viewbar.tileButton":"Button","viewbar.tileTextLabel":"Text","viewbar.tileTextHint":"A line starting with # is a heading. **Bold**, and links as [words](https://...).","viewbar.tileTextEmpty":"Edit the tile to write its text.","viewbar.tileButtonLabel":"Label","viewbar.tileButtonUrl":"Opens","viewbar.tileButtonUrlHint":"An address starting with https://, http://, mailto: or /.","viewbar.tileButtonEmpty":"Edit the tile to say where it goes.","viewbar.tileButtonDefault":"Open","viewbar.tileImage":"Image","viewbar.tileDivider":"Divider","viewbar.tilePicker":"Record picker","viewbar.tileImageUrl":"Image address","viewbar.tileImageUrlHint":"An address starting with https://, http:// or /.","viewbar.tileImageAlt":"What it shows","viewbar.tileImageAltPlaceholder":"Said to people who cannot see it","viewbar.tileImageFit":"Fit","viewbar.tileImageContain":"Whole image","viewbar.tileImageCover":"Fill the tile","viewbar.tileImageEmpty":"Edit the tile to give it an image.","viewbar.tileDividerHint":"A line across the dashboard, with its title over it: a new section starts.","viewbar.tilePickerFields":"Fields shown","viewbar.tilePickerHint":"People pick a record here; tiles narrowed by this picker then count only the records linked to it.","viewbar.tilePickerChoose":"Choose a record","viewbar.tilePickerAll":"Every record","viewbar.tilePickerNone":"No records to choose from.","viewbar.tilePickerFirst":"The first {count} records are listed.","viewbar.tilePickerOpen":"Open the record","viewbar.tilePickerPick":"Pick a record to see it here.","viewbar.narrowedBy":"Narrowed by","viewbar.narrowNone":"No record picker","viewbar.narrowOption":"{picker}: records whose {field} is the one picked","viewbar.sizeSmall":"Small","viewbar.sizeWide":"Wide","viewbar.sizeLarge":"Large","viewbar.smallest":"Smallest","viewbar.largest":"Largest","viewbar.chooseFieldToAddUp":"Choose a field to add up.","viewbar.noValues":"No values","viewbar.unnamedRecord":"Untitled record","viewbar.tileTableGone":"The table this tile reads is gone. Edit the tile to pick another.","viewbar.chooseFieldToGroup":"Choose a field to group the records by.","viewbar.tile":"Tile","viewbar.titleTotal":"Total {field}","viewbar.titleAverage":"Average {field}","viewbar.titleSmallest":"Smallest {field}","viewbar.titleLargest":"Largest {field}","viewbar.titleBy":"{value} by {field}"};
@@ -329,6 +329,24 @@ export declare const BASE_MESSAGES: {
329
329
  readonly 'extras.delete': "Delete";
330
330
  readonly 'extras.keep': "Keep";
331
331
  readonly 'extras.deleteAutomation': "Delete automation";
332
+ readonly 'extras.triggerEntersView': "A record enters a view";
333
+ readonly 'extras.view': "View";
334
+ readonly 'extras.pickView': "Pick a view";
335
+ readonly 'extras.aView': "a view";
336
+ readonly 'extras.entersViewHint': "Runs once when a record starts to show in this view, through its filter, as the view has it then. It runs again only after the record has left the view.";
337
+ readonly 'extras.addViewFilterFirst': "First give a view of this table a filter: this trigger runs when a record starts to show in it.";
338
+ readonly 'extras.whenEntersView': "When a record enters {view}";
339
+ readonly 'extras.whenEntersViewWhere': "When a record enters {view}, where {condition}";
340
+ readonly 'extras.doDeleteRecord': "Delete the record";
341
+ readonly 'extras.actionDeleteRecord': "Delete record";
342
+ readonly 'extras.deleteRecordHint': "Deletes the record that started the automation (inside Find records, each record found). It goes to the trash, where it can be restored for 30 days.";
343
+ readonly 'extras.noRecordToDelete': "No record to delete";
344
+ readonly 'extras.deletedRecord': "Deleted {name}";
345
+ readonly 'extras.cannotDeleteHere': "This table cannot delete records from an automation.";
346
+ readonly 'extras.summaryDelete': "Deletes the record";
347
+ readonly 'extras.duplicateAutomation': "Duplicate";
348
+ readonly 'extras.copyOf': "{name} copy";
349
+ readonly 'extras.duplicated': "Copied. The copy is off until you turn it on.";
332
350
  readonly 'extras.runsOnServer': "Runs on your server when its trigger happens.";
333
351
  readonly 'extras.tryRecord': "Record to try it on";
334
352
  readonly 'extras.noRecord': "No record";
@@ -1103,6 +1121,10 @@ export declare const BASE_MESSAGES: {
1103
1121
  readonly 'viewbar.board.cardBlocked': "{card} is blocked and can't be moved.";
1104
1122
  readonly 'viewbar.board.selected': "Selected {card}. {count} selected.";
1105
1123
  readonly 'viewbar.board.deselected': "Deselected {card}. {count} selected.";
1124
+ readonly 'viewbar.board.expand': "Expand {lane}";
1125
+ readonly 'viewbar.board.collapse': "Collapse {lane}";
1126
+ readonly 'viewbar.board.wipTitle': "At most {limit} cards";
1127
+ readonly 'viewbar.board.none': "(none)";
1106
1128
  readonly 'viewbar.moveField': "Move {name}";
1107
1129
  readonly 'viewbar.moveFieldHint': "Drag, or press the up and down arrows";
1108
1130
  readonly 'viewbar.fieldMoved': "{name} moved to place {place} of {count}";
@@ -1235,6 +1257,8 @@ export declare const BASE_MESSAGES: {
1235
1257
  readonly 'viewbar.customizeList': "Customize list";
1236
1258
  readonly 'viewbar.customizeInbox': "Customize inbox";
1237
1259
  readonly 'viewbar.customizeBoard': "Customize board";
1260
+ readonly 'viewbar.criticalPath': "Show the critical path";
1261
+ readonly 'viewbar.criticalPathHint': "The tasks that set the finish date get a red outline: if one of them is late, so is the end. Point at any other task to see how many days it can slip.";
1238
1262
  readonly 'viewbar.boardRowsBy': "Rows by";
1239
1263
  readonly 'viewbar.boardDue': "Due date";
1240
1264
  readonly 'viewbar.boardFade': "Fade cards by";
@@ -69,6 +69,8 @@ export type FieldView = {
69
69
  progressField?: string;
70
70
  /** Gantt: a link field to the same table naming the records each one depends on. */
71
71
  dependencyField?: string;
72
+ /** Gantt: outline the critical path, the chain of tasks that sets the finish (needs dependencyField). */
73
+ criticalPath?: boolean;
72
74
  /** Gantt and timeline: the zoom it was left at (a timeline's: day, week, month or year). */
73
75
  zoom?: string;
74
76
  /** Timeline: the single select, person or link field whose values are its lanes (records in the same lane share a row). */