@svgrid/enterprise 3.1.74 → 3.1.76
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.
- package/dist/cdn/svgrid-enterprise.svelte-external.js +2 -2
- package/dist/designer/assets/{index-C2M7tfqh.js → index-ZttiuDcp.js} +1 -1
- package/dist/designer/index.html +1 -1
- package/dist/fields/AutomationAction.svelte +2 -1
- package/dist/fields/AutomationGallery.svelte +152 -0
- package/dist/fields/AutomationGallery.svelte.d.ts +29 -0
- package/dist/fields/AutomationTrigger.svelte +10 -4
- package/dist/fields/AutomationTrigger.svelte.d.ts +5 -0
- package/dist/fields/SvBaseAutomations.svelte +46 -21
- package/dist/fields/SvBaseAutomations.svelte.d.ts +2 -0
- package/dist/fields/automation-edit.d.ts +6 -0
- package/dist/fields/automation-edit.js +2 -2
- package/dist/fields/automation-recipes.d.ts +85 -0
- package/dist/fields/automation-recipes.js +2 -0
- package/dist/fields/automations.svelte.d.ts +15 -2
- package/dist/fields/automations.svelte.js +6 -1
- package/dist/fields/builtin-types.js +1 -1
- package/dist/fields/filter-model.d.ts +5 -0
- package/dist/fields/filter-model.js +1 -1
- package/dist/fields/index.d.ts +1 -0
- package/dist/fields/index.js +1 -1
- package/dist/fields/messages/extras.d.ts +131 -0
- package/dist/fields/messages/extras.js +16 -1
- package/dist/fields/messages/viewbar.d.ts +4 -0
- package/dist/fields/messages/viewbar.js +1 -1
- package/dist/fields/messages.svelte.d.ts +135 -0
- package/dist/fields/rollups.d.ts +2 -0
- package/dist/fields/rollups.js +1 -1
- package/dist/fields/viewbar/ConditionValue.svelte +11 -2
- package/dist/node/studio.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wc/{PageEditor-B_aDbCVD.js → PageEditor-uCGeOX5e.js} +1 -1
- package/dist/wc/embed-url-CozXxwvR.js +16 -0
- package/dist/wc/sv-base-element.js +102 -94
- package/package.json +1 -1
- package/dist/wc/embed-url-CGl6lpsT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checklistProgress as T,checklistSortValue as I,toChecklist as M}from"./checklist.js";import{parseTimeOfDay as W,timeSeconds as O}from"./time-of-day.js";import{isRichHtml as F,richPlain as R}from"./rich-html.js";import{VIEWBAR_MESSAGES as C}from"./messages/viewbar.js";import{tokenize as U}from"./formula.js";export const ME="@me";let N=()=>{};export function resolveMeWith(e){N=e}const k=(e,t)=>t;let D=k;export function setFilterWords(e){D=e??k}const l=(e,t)=>{const n=D(e,C[e]);return t?n.replace(/\{(\w+)\}/g,(s,r)=>r in t?String(t[r]):s):n};export const isGroup=e=>Array.isArray(e.conditions);const B=new Set(["text","longText","richText","url","email","phone","barcode","color"]),P=new Set(["number","currency","percent","rating","duration","timer","autoNumber","count"]),_=new Set(["date","createdTime","lastModifiedTime"]),L={formula:"text",lookup:"text",rollup:"text"},Y=new Set(["AND","OR"]),j=new Set(["LEN","FIND","SEARCH","VALUE","SUM","AVERAGE","MAX","MIN","COUNT","COUNTA","COUNTALL","ROUND","ROUNDUP","ROUNDDOWN","INT","ABS","MOD","POWER","SQRT","EXP","LOG","EVEN","ODD","CEILING","FLOOR","DISTANCE","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","WEEKDAY","WEEKNUM","DATETIME_DIFF","TONOW","FROMNOW","WORKDAY_DIFF"]),H=new Set(["TODAY","NOW","DATEADD","DATETIME_PARSE","SET_LOCALE","SET_TIMEZONE","WORKDAY"]),V=new Set(["AND","OR","NOT","XOR","TRUE","FALSE","ISERROR","REGEX_MATCH","IS_BEFORE","IS_AFTER","IS_SAME"]);function K(e){let t;try{t=U(String(e??""))}catch{return null}let n=0;const s=(...f)=>t[n]?.k==="op"&&f.includes(t[n].v),r=f=>f.reduce((m,b)=>m==="blank"?b:b==="blank"||m===b?m:null,"blank"),a=()=>{let f=i();for(;s("=","!=","<",">","<=",">=");)n+=1,i(),f="checkbox";return f},i=()=>{let f=o();for(;s("&");)n+=1,o(),f="text";return f},o=()=>{let f=u();for(;s("+","-");)n+=1,u(),f="number";return f},u=()=>{let f=p();for(;s("*","/");)n+=1,p(),f="number";return f},p=()=>s("-")?(n+=1,p(),"number"):c(),c=()=>{const f=t[n++];if(!f)throw new Error("the formula ends");if(f.k==="num")return"number";if(f.k==="str")return f.v===""?"blank":"text";if(f.k==="ref")return null;if(f.k==="("){const d=a();if(t[n++]?.k!==")")throw new Error("no closing bracket");return d}if(f.k!=="id")throw new Error("not a value");const m=f.v.toUpperCase();if(t[n]?.k!=="(")return m==="TRUE"||m==="FALSE"?"checkbox":null;n+=1;const b=[];if(t[n]?.k!==")")for(b.push(a());t[n]?.k===",";)n+=1,b.push(a());if(t[n++]?.k!==")")throw new Error("no closing bracket");return m==="BLANK"?"blank":m==="IF"?r(b.slice(1)):m==="SWITCH"?r(b.filter((d,h)=>h>0&&h%2===0||h===b.length-1&&h%2===1)):j.has(m)?"number":H.has(m)?"date":V.has(m)?"checkbox":null};try{const f=a();return n===t.length&&f!=="blank"?f:null}catch{return null}}function G(e){const t=e.cellDataType;return t==="number"?"number":t==="date"||t==="dateString"?"date":t==="boolean"?"checkbox":null}export function filterKindOf(e){const t=e.fieldType;if(t==="button")return null;if(t==="singleSelect")return"select";if(t==="multiSelect")return"multi";if(t==="user"||t==="createdBy"||t==="lastModifiedBy")return e.fieldProps?.multiple?"multi":"select";if(t==="checkbox")return"checkbox";if(t==="vote")return"multi";if(t==="sparkline")return null;if(t==="attachment")return"files";if(t==="link")return"link";if(t==="checklist")return"checklist";if(t==="timeOfDay")return"time";if(t&&_.has(t))return"date";if(t&&P.has(t))return"number";if(t&&B.has(t))return"text";if(t==="ai")return e.fieldProps?.output==="singleSelect"?"select":e.fieldProps?.output==="number"?"number":"text";if(t==="rollup"&&!e.cellDataType&&Y.has(String(e.fieldProps?.aggregation)))return"checkbox";const n=t==="formula"?e.fieldProps?.result:void 0;return n==="number"||n==="currency"||n==="percent"?"number":n==="date"?"date":G(e)??(t==="formula"?K(e.fieldProps?.formula):null)??(t?L[t]:void 0)??"text"}export function operatorsFor(e){const t=[{op:"isEmpty",label:l("viewbar.opIsEmpty")},{op:"isNotEmpty",label:l("viewbar.opIsNotEmpty")}];switch(e){case"number":return[{op:"eq",label:"="},{op:"neq",label:"≠"},{op:"lt",label:"<"},{op:"gt",label:">"},{op:"lte",label:"≤"},{op:"gte",label:"≥"},...t];case"select":return[{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},{op:"isAnyOf",label:l("viewbar.opIsAnyOf")},{op:"isNoneOf",label:l("viewbar.opIsNoneOf")},...t];case"multi":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasAllOf",label:l("viewbar.opHasAllOf")},{op:"isExactly",label:l("viewbar.opIsExactly")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")},...t];case"checkbox":return[{op:"is",label:l("viewbar.opIs")}];case"date":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsOnOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsOnOrAfter")},{op:"isWithin",label:l("viewbar.opIsWithin")},...t];case"files":return[{op:"contains",label:l("viewbar.opFileNameContains")},...t];case"checklist":return[{op:"allDone",label:l("viewbar.opIsComplete")},{op:"notAllDone",label:l("viewbar.opIsNotComplete")},{op:"gte",label:l("viewbar.opDoneAtLeast")},{op:"lt",label:l("viewbar.opDoneUnder")},{op:"contains",label:l("viewbar.opHasItemContaining")},...t];case"time":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsAtOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsAtOrAfter")},...t];case"linked":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")}];case"link":case"text":return[{op:"contains",label:l("viewbar.opContains")},{op:"notContains",label:l("viewbar.opDoesNotContain")},{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},...t]}}export const NO_VALUE=new Set(["isEmpty","isNotEmpty","allDone","notAllDone"]);export function defaultValue(e,t){if(!NO_VALUE.has(t))return e==="checkbox"?!0:e==="date"?t==="isWithin"?{span:"pastWeek"}:{mode:"today"}:e==="select"&&(t==="is"||t==="isNot")?"":e==="select"||e==="multi"?[]:""}export function newCondition(e,t){const n=filterKindOf(t);if(!n)return null;const s=operatorsFor(n)[0].op,r=n==="link"&&typeof t.fieldProps?.table=="string"?t.fieldProps.table:void 0;return{column:e,kind:n,op:s,value:defaultValue(n,s),...r?{table:r}:{}}}export function isComplete(e){if(NO_VALUE.has(e.op)||e.kind==="checkbox")return!0;const t=e.value;if(t==null)return!1;if(Array.isArray(t))return t.length>0;if(typeof t=="string")return t.trim()!=="";if(e.kind==="date"&&typeof t=="object"){const n=t;if(n.mode==="exactDate")return!!n.date;if(n.span==="pastDays"||n.span==="nextDays")return Number(n.days)>0}return!0}export function conditionCount(e){if(!e)return 0;let t=0;for(const n of e.conditions)isGroup(n)?t+=n.conditions.filter(isComplete).length:isComplete(n)&&(t+=1);return t}const w=e=>String(e??"").trim().toLocaleLowerCase(),y=e=>e==null||e===""?[]:Array.isArray(e)?e.map(t=>String(t&&typeof t=="object"?t.id??t.name??"":t)):[String(e)],A=e=>e==null||e===""||Array.isArray(e)&&e.length===0||typeof e=="number"&&Number.isNaN(e),E=864e5;export function dayOf(e){if(e==null||e==="")return null;let t;if(e instanceof Date)t=e;else if(typeof e=="number")t=new Date(e);else{const n=String(e),s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:Math.floor((t.getTime()-t.getTimezoneOffset()*6e4)/E)}function S(e,t){switch(e.mode){case"today":return t;case"tomorrow":return t+1;case"yesterday":return t-1;case"oneWeekAgo":return t-7;case"oneWeekFromNow":return t+7;case"oneMonthAgo":return t-30;case"oneMonthFromNow":return t+30;case"exactDate":return dayOf(e.date)}}function g(e,t){const n=Math.max(1,Math.floor(Number(e.days)||1));switch(e.span){case"pastWeek":return[t-7,t];case"pastMonth":return[t-30,t];case"pastYear":return[t-365,t];case"nextWeek":return[t,t+7];case"nextMonth":return[t,t+30];case"nextYear":return[t,t+365];case"pastDays":return[t-n,t];case"nextDays":return[t,t+n]}}export function dateConditionDays(e,t=new Date){const n=dayOf(t);if(e.op==="isWithin")return g(e.value??{span:"pastWeek"},n);const s=S(e.value??{mode:"today"},n);if(s==null)return null;switch(e.op){case"is":return[s,s];case"isBefore":return[null,s-1];case"isAfter":return[s+1,null];case"isOnOrBefore":return[null,s];case"isOnOrAfter":return[s,null];default:return null}}export function conditionMoment(e){const t=e.value;return(e.op==="isBefore"||e.op==="isOnOrAfter")&&t?.mode==="exactDate"&&typeof t.at=="string"?t.at:null}export const isMoment=e=>e instanceof Date||typeof e=="string"&&e.length>10&&/(?:z|[+-]\d{2}(?::?\d{2})?)$/i.test(e);const v=e=>{const t=new Date(e*E);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())};export function viewerMoments(e,t=new Date){if(e.kind!=="date"||e.op==="isEmpty"||e.op==="isNotEmpty"||conditionMoment(e))return null;const n=dateConditionDays(e,t);if(!n)return null;const[s,r]=n;return{from:s==null?null:v(s).toISOString(),to:r==null?null:v(r+1).toISOString()}}export function withViewerDays(e,t=new Date){let n=!1;const s=a=>{const i=viewerMoments(a,t);return i?(n=!0,{...a,moments:i}):a},r=e.conditions.map(a=>isGroup(a)?{...a,conditions:a.conditions.map(s)}:s(a));return n?{...e,conditions:r}:e}export function expressionWithViewerDays(e,t=new Date){const n=e;if(!n||typeof n!="object")return e;if(n.kind==="fieldFilter"&&Array.isArray(n.conditions))return withViewerDays(n,t);const s=n.payload;if(n.kind==="ext"&&n.type==="fieldFilter"&&s&&Array.isArray(s.conditions)){const r=withViewerDays({...s,kind:"fieldFilter",conjunction:s.conjunction??"and"},t);return r.conditions===s.conditions?e:{...n,payload:{...s,conditions:r.conditions}}}return e}export function compileCondition(e,t,n=new Date){const s=e.kind==="link"&&e.table&&t?.isEmpty?r=>A(r)||t.isEmpty(e.table,r):A;if(e.op==="isEmpty")return s;if(e.op==="isNotEmpty")return r=>!s(r);if(e.kind==="linked"){const r=new Set((Array.isArray(e.value)?e.value:[e.value]).map(i=>String(i))),a=i=>(Array.isArray(i)?i:A(i)?[]:[i]).map(o=>String(o&&typeof o=="object"?o.id??"":o));return e.op==="hasNoneOf"?i=>!a(i).some(o=>r.has(o)):i=>a(i).some(o=>r.has(o))}switch(e.kind){case"number":{const r=Number(e.value);if(!Number.isFinite(r))return()=>!0;const a=u=>A(u)?NaN:Number(u),o={eq:u=>u===r,neq:u=>u!==r,lt:u=>u<r,gt:u=>u>r,lte:u=>u<=r,gte:u=>u>=r}[e.op]??(()=>!0);return u=>{const p=a(u);return Number.isNaN(p)?e.op==="neq":o(p)}}case"checkbox":{const r=e.value!==!1;return a=>!!a===r}case"select":case"multi":{const r=N(),a=y(e.value).map(o=>o===ME&&r!=null?r:o),i=new Set(a);return e.op==="is"?o=>y(o)[0]===a[0]:e.op==="isNot"?o=>y(o)[0]!==a[0]:e.op==="isAnyOf"||e.op==="hasAnyOf"?o=>y(o).some(u=>i.has(u)):e.op==="isNoneOf"||e.op==="hasNoneOf"?o=>!y(o).some(u=>i.has(u)):e.op==="hasAllOf"?o=>{const u=new Set(y(o));return[...i].every(p=>u.has(p))}:e.op==="isExactly"?o=>{const u=new Set(y(o));return u.size===i.size&&[...i].every(p=>u.has(p))}:()=>!0}case"date":{const r=dayOf(n),a=conditionMoment(e),i=a?e.op==="isBefore"?{from:null,to:a}:{from:a,to:null}:e.moments;if(i&&(i.from!=null||i.to!=null)){const c=i.from==null?-1/0:Date.parse(i.from),f=i.to==null?1/0:Date.parse(i.to),m={...e,moments:void 0,value:a?{...e.value,at:void 0}:e.value},b=compileCondition(m,t,n);return d=>{if(!isMoment(d))return b(d);const h=d instanceof Date?d.getTime():Date.parse(String(d));return Number.isFinite(h)&&h>=c&&h<f}}if(e.op==="isWithin"){const[c,f]=g(e.value??{span:"pastWeek"},r);return m=>{const b=dayOf(m);return b!=null&&b>=c&&b<=f}}const o=S(e.value??{mode:"today"},r);if(o==null)return()=>!0;const p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=dayOf(c);return f!=null&&p(f)}}case"files":{const r=w(e.value);return a=>(Array.isArray(a)?a:[]).some(i=>w(i?.name).includes(r))}case"checklist":{const r=i=>{const o=T(i);return o.total>0&&o.done===o.total};if(e.op==="allDone")return r;if(e.op==="notAllDone")return i=>!r(i);if(e.op==="contains"){const i=w(e.value);return o=>M(o).some(u=>w(u.text).includes(i))}const a=parseFloat(String(e.value??""));return Number.isFinite(a)?i=>{const o=I(i);return o==null?!1:e.op==="lt"?o*100<a:o*100>=a}:()=>!0}case"time":{const r=W(String(e.value??"")),a=O(r);if(r==null||a==null)return()=>!0;const i=r.length>5?1:60,o=Math.floor(a/i),p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=O(c);return f!=null&&p(Math.floor(f/i))}}case"link":case"text":{const r=w(e.value),a=i=>F(i)?w(R(i)):e.kind==="link"&&e.table&&t?w(t(e.table,i).join(", ")):w(Array.isArray(i)?i.map(o=>o&&typeof o=="object"?o.name??"":o).join(", "):i);return e.op==="contains"?i=>a(i).includes(r):e.op==="notContains"?i=>!a(i).includes(r):e.op==="is"?i=>a(i)===r:e.op==="isNot"?i=>a(i)!==r:()=>!0}}}export function compileFieldFilter(e,t,n,s){const r=o=>{const u=compileCondition(o,n,s);return p=>{const c=t(p,o.column);return u(Array.isArray(c)&&c.some(Array.isArray)?c.flat(1/0):c)}},a=(o,u)=>o==="or"?p=>u.some(c=>c(p)):p=>u.every(c=>c(p)),i=[];for(const o of e.conditions)if(isGroup(o)){const u=o.conditions.filter(isComplete).map(r);u.length&&i.push(a(o.conjunction,u))}else isComplete(o)&&i.push(r(o));return i.length?a(e.conjunction,i):null}const X={today:"viewbar.dayToday",tomorrow:"viewbar.dayTomorrow",yesterday:"viewbar.dayYesterday",oneWeekAgo:"viewbar.dayOneWeekAgo",oneWeekFromNow:"viewbar.dayOneWeekFromNow",oneMonthAgo:"viewbar.dayOneMonthAgo",oneMonthFromNow:"viewbar.dayOneMonthFromNow"},q={pastWeek:"viewbar.spanPastWeek",pastMonth:"viewbar.spanPastMonth",pastYear:"viewbar.spanPastYear",nextWeek:"viewbar.spanNextWeek",nextMonth:"viewbar.spanNextMonth",nextYear:"viewbar.spanNextYear"},x=e=>e==="or"?l("viewbar.conjOr"):e==="and"?l("viewbar.conjAnd"):e;function z(e){if(NO_VALUE.has(e.op))return"";if(e.kind==="checkbox")return e.value===!1?l("viewbar.valueUnchecked"):l("viewbar.valueChecked");if(e.kind==="date"){if(e.op==="isWithin"){const r=e.value??{span:"pastWeek"};if(r.span==="pastDays")return l("viewbar.spanPastDays",{days:r.days??0});if(r.span==="nextDays")return l("viewbar.spanNextDays",{days:r.days??0});const a=q[r.span];return a?l(a):r.span}const n=e.value??{mode:"today"};if(n.mode==="exactDate")return n.date;const s=X[n.mode];return s?l(s):n.mode}const t=n=>n===ME?l("viewbar.valueMe"):String(n);return Array.isArray(e.value)?e.value.map(t).join(", "):t(e.value??"")}export function describeCondition(e,t=n=>n){const n=operatorsFor(e.kind).find(s=>s.op===e.op)?.label??e.op;return[t(e.column),n,z(e)].filter(Boolean).join(" ")}export function describeFieldFilter(e,t){const n=[];for(const s of e.conditions)if(isGroup(s)){const r=s.conditions.filter(isComplete).map(a=>describeCondition(a,t));r.length&&n.push(r.length>1?`(${r.join(` ${x(s.conjunction)} `)})`:r[0])}else isComplete(s)&&n.push(describeCondition(s,t));return n.length?n.join(` ${x(e.conjunction)} `):l("viewbar.everyRecord")}export function fieldFilterColumns(e){const t=new Set;for(const n of e.conditions)for(const s of isGroup(n)?n.conditions:[n])isComplete(s)&&t.add(s.column);return[...t]}
|
|
1
|
+
import{checklistProgress as T,checklistSortValue as I,toChecklist as M}from"./checklist.js";import{parseTimeOfDay as F,timeSeconds as O}from"./time-of-day.js";import{isRichHtml as W,richPlain as R}from"./rich-html.js";import{VIEWBAR_MESSAGES as C}from"./messages/viewbar.js";import{tokenize as U}from"./formula.js";export const ME="@me";let N=()=>{};export function resolveMeWith(e){N=e}const D=(e,t)=>t;let k=D;export function setFilterWords(e){k=e??D}const l=(e,t)=>{const n=k(e,C[e]);return t?n.replace(/\{(\w+)\}/g,(s,r)=>r in t?String(t[r]):s):n};export const isGroup=e=>Array.isArray(e.conditions);const B=new Set(["text","longText","richText","url","email","phone","barcode","color"]),P=new Set(["number","currency","percent","rating","duration","timer","autoNumber","count"]),_=new Set(["date","createdTime","lastModifiedTime"]),L={formula:"text",lookup:"text",rollup:"text"},Y=new Set(["AND","OR"]),j=new Set(["LEN","FIND","SEARCH","VALUE","SUM","AVERAGE","MAX","MIN","COUNT","COUNTA","COUNTALL","ROUND","ROUNDUP","ROUNDDOWN","INT","ABS","MOD","POWER","SQRT","EXP","LOG","EVEN","ODD","CEILING","FLOOR","DISTANCE","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","WEEKDAY","WEEKNUM","DATETIME_DIFF","TONOW","FROMNOW","WORKDAY_DIFF"]),H=new Set(["TODAY","NOW","DATEADD","DATETIME_PARSE","SET_LOCALE","SET_TIMEZONE","WORKDAY"]),V=new Set(["AND","OR","NOT","XOR","TRUE","FALSE","ISERROR","REGEX_MATCH","IS_BEFORE","IS_AFTER","IS_SAME"]);function K(e){let t;try{t=U(String(e??""))}catch{return null}let n=0;const s=(...f)=>t[n]?.k==="op"&&f.includes(t[n].v),r=f=>f.reduce((m,d)=>m==="blank"?d:d==="blank"||m===d?m:null,"blank"),a=()=>{let f=i();for(;s("=","!=","<",">","<=",">=");)n+=1,i(),f="checkbox";return f},i=()=>{let f=o();for(;s("&");)n+=1,o(),f="text";return f},o=()=>{let f=u();for(;s("+","-");)n+=1,u(),f="number";return f},u=()=>{let f=p();for(;s("*","/");)n+=1,p(),f="number";return f},p=()=>s("-")?(n+=1,p(),"number"):c(),c=()=>{const f=t[n++];if(!f)throw new Error("the formula ends");if(f.k==="num")return"number";if(f.k==="str")return f.v===""?"blank":"text";if(f.k==="ref")return null;if(f.k==="("){const b=a();if(t[n++]?.k!==")")throw new Error("no closing bracket");return b}if(f.k!=="id")throw new Error("not a value");const m=f.v.toUpperCase();if(t[n]?.k!=="(")return m==="TRUE"||m==="FALSE"?"checkbox":null;n+=1;const d=[];if(t[n]?.k!==")")for(d.push(a());t[n]?.k===",";)n+=1,d.push(a());if(t[n++]?.k!==")")throw new Error("no closing bracket");return m==="BLANK"?"blank":m==="IF"?r(d.slice(1)):m==="SWITCH"?r(d.filter((b,y)=>y>0&&y%2===0||y===d.length-1&&y%2===1)):j.has(m)?"number":H.has(m)?"date":V.has(m)?"checkbox":null};try{const f=a();return n===t.length&&f!=="blank"?f:null}catch{return null}}function G(e){const t=e.cellDataType;return t==="number"?"number":t==="date"||t==="dateString"?"date":t==="boolean"?"checkbox":null}export function filterKindOf(e){const t=e.fieldType;if(t==="button")return null;if(t==="singleSelect")return"select";if(t==="multiSelect")return"multi";if(t==="user"||t==="createdBy"||t==="lastModifiedBy")return e.fieldProps?.multiple?"multi":"select";if(t==="checkbox")return"checkbox";if(t==="vote")return"multi";if(t==="sparkline")return null;if(t==="attachment")return"files";if(t==="link")return"link";if(t==="checklist")return"checklist";if(t==="timeOfDay")return"time";if(t&&_.has(t))return"date";if(t&&P.has(t))return"number";if(t&&B.has(t))return"text";if(t==="ai")return e.fieldProps?.output==="singleSelect"?"select":e.fieldProps?.output==="number"?"number":"text";if(t==="rollup"&&!e.cellDataType&&Y.has(String(e.fieldProps?.aggregation)))return"checkbox";const n=t==="formula"?e.fieldProps?.result:void 0;return n==="number"||n==="currency"||n==="percent"?"number":n==="date"?"date":G(e)??(t==="formula"?K(e.fieldProps?.formula):null)??(t?L[t]:void 0)??"text"}export function operatorsFor(e){const t=[{op:"isEmpty",label:l("viewbar.opIsEmpty")},{op:"isNotEmpty",label:l("viewbar.opIsNotEmpty")}];switch(e){case"number":return[{op:"eq",label:"="},{op:"neq",label:"≠"},{op:"lt",label:"<"},{op:"gt",label:">"},{op:"lte",label:"≤"},{op:"gte",label:"≥"},...t];case"select":return[{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},{op:"isAnyOf",label:l("viewbar.opIsAnyOf")},{op:"isNoneOf",label:l("viewbar.opIsNoneOf")},...t];case"multi":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasAllOf",label:l("viewbar.opHasAllOf")},{op:"isExactly",label:l("viewbar.opIsExactly")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")},...t];case"checkbox":return[{op:"is",label:l("viewbar.opIs")}];case"date":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsOnOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsOnOrAfter")},{op:"isWithin",label:l("viewbar.opIsWithin")},...t];case"files":return[{op:"contains",label:l("viewbar.opFileNameContains")},...t];case"checklist":return[{op:"allDone",label:l("viewbar.opIsComplete")},{op:"notAllDone",label:l("viewbar.opIsNotComplete")},{op:"gte",label:l("viewbar.opDoneAtLeast")},{op:"lt",label:l("viewbar.opDoneUnder")},{op:"contains",label:l("viewbar.opHasItemContaining")},...t];case"time":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsAtOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsAtOrAfter")},...t];case"linked":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")}];case"link":case"text":return[{op:"contains",label:l("viewbar.opContains")},{op:"notContains",label:l("viewbar.opDoesNotContain")},{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},...t]}}export const NO_VALUE=new Set(["isEmpty","isNotEmpty","allDone","notAllDone"]);export function defaultValue(e,t){if(!NO_VALUE.has(t))return e==="checkbox"?!0:e==="date"?t==="isWithin"?{span:"pastWeek"}:{mode:"today"}:e==="select"&&(t==="is"||t==="isNot")?"":e==="select"||e==="multi"?[]:""}export function newCondition(e,t){const n=filterKindOf(t);if(!n)return null;const s=operatorsFor(n)[0].op,r=n==="link"&&typeof t.fieldProps?.table=="string"?t.fieldProps.table:void 0;return{column:e,kind:n,op:s,value:defaultValue(n,s),...r?{table:r}:{}}}export function isComplete(e){if(NO_VALUE.has(e.op)||e.kind==="checkbox")return!0;const t=e.value;if(t==null)return!1;if(Array.isArray(t))return t.length>0;if(typeof t=="string")return t.trim()!=="";if(e.kind==="date"&&typeof t=="object"){const n=t;if(n.mode==="exactDate")return!!n.date;if(n.mode==="daysFromNow"||n.mode==="daysAgo")return Number.isFinite(Number(n.days))&&Number(n.days)>=0;if(n.span==="pastDays"||n.span==="nextDays")return Number(n.days)>0}return!0}export function conditionCount(e){if(!e)return 0;let t=0;for(const n of e.conditions)isGroup(n)?t+=n.conditions.filter(isComplete).length:isComplete(n)&&(t+=1);return t}const h=e=>String(e??"").trim().toLocaleLowerCase(),w=e=>e==null||e===""?[]:Array.isArray(e)?e.map(t=>String(t&&typeof t=="object"?t.id??t.name??"":t)):[String(e)],A=e=>e==null||e===""||Array.isArray(e)&&e.length===0||typeof e=="number"&&Number.isNaN(e),E=864e5;export function dayOf(e){if(e==null||e==="")return null;let t;if(e instanceof Date)t=e;else if(typeof e=="number")t=new Date(e);else{const n=String(e),s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:Math.floor((t.getTime()-t.getTimezoneOffset()*6e4)/E)}function g(e,t){switch(e.mode){case"today":return t;case"tomorrow":return t+1;case"yesterday":return t-1;case"oneWeekAgo":return t-7;case"oneWeekFromNow":return t+7;case"oneMonthAgo":return t-30;case"oneMonthFromNow":return t+30;case"daysFromNow":case"daysAgo":{const n=Math.floor(Number(e.days));return Number.isFinite(n)?e.mode==="daysAgo"?t-n:t+n:null}case"exactDate":return dayOf(e.date)}}function S(e,t){const n=Math.max(1,Math.floor(Number(e.days)||1));switch(e.span){case"pastWeek":return[t-7,t];case"pastMonth":return[t-30,t];case"pastYear":return[t-365,t];case"nextWeek":return[t,t+7];case"nextMonth":return[t,t+30];case"nextYear":return[t,t+365];case"pastDays":return[t-n,t];case"nextDays":return[t,t+n]}}export function dateConditionDays(e,t=new Date){const n=dayOf(t);if(e.op==="isWithin")return S(e.value??{span:"pastWeek"},n);const s=g(e.value??{mode:"today"},n);if(s==null)return null;switch(e.op){case"is":return[s,s];case"isBefore":return[null,s-1];case"isAfter":return[s+1,null];case"isOnOrBefore":return[null,s];case"isOnOrAfter":return[s,null];default:return null}}export function conditionMoment(e){const t=e.value;return(e.op==="isBefore"||e.op==="isOnOrAfter")&&t?.mode==="exactDate"&&typeof t.at=="string"?t.at:null}export const isMoment=e=>e instanceof Date||typeof e=="string"&&e.length>10&&/(?:z|[+-]\d{2}(?::?\d{2})?)$/i.test(e);const v=e=>{const t=new Date(e*E);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())};export function viewerMoments(e,t=new Date){if(e.kind!=="date"||e.op==="isEmpty"||e.op==="isNotEmpty"||conditionMoment(e))return null;const n=dateConditionDays(e,t);if(!n)return null;const[s,r]=n;return{from:s==null?null:v(s).toISOString(),to:r==null?null:v(r+1).toISOString()}}export function withViewerDays(e,t=new Date){let n=!1;const s=a=>{const i=viewerMoments(a,t);return i?(n=!0,{...a,moments:i}):a},r=e.conditions.map(a=>isGroup(a)?{...a,conditions:a.conditions.map(s)}:s(a));return n?{...e,conditions:r}:e}export function expressionWithViewerDays(e,t=new Date){const n=e;if(!n||typeof n!="object")return e;if(n.kind==="fieldFilter"&&Array.isArray(n.conditions))return withViewerDays(n,t);const s=n.payload;if(n.kind==="ext"&&n.type==="fieldFilter"&&s&&Array.isArray(s.conditions)){const r=withViewerDays({...s,kind:"fieldFilter",conjunction:s.conjunction??"and"},t);return r.conditions===s.conditions?e:{...n,payload:{...s,conditions:r.conditions}}}return e}export function compileCondition(e,t,n=new Date){const s=e.kind==="link"&&e.table&&t?.isEmpty?r=>A(r)||t.isEmpty(e.table,r):A;if(e.op==="isEmpty")return s;if(e.op==="isNotEmpty")return r=>!s(r);if(e.kind==="linked"){const r=new Set((Array.isArray(e.value)?e.value:[e.value]).map(i=>String(i))),a=i=>(Array.isArray(i)?i:A(i)?[]:[i]).map(o=>String(o&&typeof o=="object"?o.id??"":o));return e.op==="hasNoneOf"?i=>!a(i).some(o=>r.has(o)):i=>a(i).some(o=>r.has(o))}switch(e.kind){case"number":{const r=Number(e.value);if(!Number.isFinite(r))return()=>!0;const a=u=>A(u)?NaN:Number(u),o={eq:u=>u===r,neq:u=>u!==r,lt:u=>u<r,gt:u=>u>r,lte:u=>u<=r,gte:u=>u>=r}[e.op]??(()=>!0);return u=>{const p=a(u);return Number.isNaN(p)?e.op==="neq":o(p)}}case"checkbox":{const r=e.value!==!1;return a=>!!a===r}case"select":case"multi":{const r=N(),a=w(e.value).map(o=>o===ME&&r!=null?r:o),i=new Set(a);return e.op==="is"?o=>w(o)[0]===a[0]:e.op==="isNot"?o=>w(o)[0]!==a[0]:e.op==="isAnyOf"||e.op==="hasAnyOf"?o=>w(o).some(u=>i.has(u)):e.op==="isNoneOf"||e.op==="hasNoneOf"?o=>!w(o).some(u=>i.has(u)):e.op==="hasAllOf"?o=>{const u=new Set(w(o));return[...i].every(p=>u.has(p))}:e.op==="isExactly"?o=>{const u=new Set(w(o));return u.size===i.size&&[...i].every(p=>u.has(p))}:()=>!0}case"date":{const r=dayOf(n),a=conditionMoment(e),i=a?e.op==="isBefore"?{from:null,to:a}:{from:a,to:null}:e.moments;if(i&&(i.from!=null||i.to!=null)){const c=i.from==null?-1/0:Date.parse(i.from),f=i.to==null?1/0:Date.parse(i.to),m={...e,moments:void 0,value:a?{...e.value,at:void 0}:e.value},d=compileCondition(m,t,n);return b=>{if(!isMoment(b))return d(b);const y=b instanceof Date?b.getTime():Date.parse(String(b));return Number.isFinite(y)&&y>=c&&y<f}}if(e.op==="isWithin"){const[c,f]=S(e.value??{span:"pastWeek"},r);return m=>{const d=dayOf(m);return d!=null&&d>=c&&d<=f}}const o=g(e.value??{mode:"today"},r);if(o==null)return()=>!0;const p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=dayOf(c);return f!=null&&p(f)}}case"files":{const r=h(e.value);return a=>(Array.isArray(a)?a:[]).some(i=>h(i?.name).includes(r))}case"checklist":{const r=i=>{const o=T(i);return o.total>0&&o.done===o.total};if(e.op==="allDone")return r;if(e.op==="notAllDone")return i=>!r(i);if(e.op==="contains"){const i=h(e.value);return o=>M(o).some(u=>h(u.text).includes(i))}const a=parseFloat(String(e.value??""));return Number.isFinite(a)?i=>{const o=I(i);return o==null?!1:e.op==="lt"?o*100<a:o*100>=a}:()=>!0}case"time":{const r=F(String(e.value??"")),a=O(r);if(r==null||a==null)return()=>!0;const i=r.length>5?1:60,o=Math.floor(a/i),p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=O(c);return f!=null&&p(Math.floor(f/i))}}case"link":case"text":{const r=h(e.value),a=i=>W(i)?h(R(i)):e.kind==="link"&&e.table&&t?h(t(e.table,i).join(", ")):h(Array.isArray(i)?i.map(o=>o&&typeof o=="object"?o.name??"":o).join(", "):i);return e.op==="contains"?i=>a(i).includes(r):e.op==="notContains"?i=>!a(i).includes(r):e.op==="is"?i=>a(i)===r:e.op==="isNot"?i=>a(i)!==r:()=>!0}}}export function compileFieldFilter(e,t,n,s){const r=o=>{const u=compileCondition(o,n,s);return p=>{const c=t(p,o.column);return u(Array.isArray(c)&&c.some(Array.isArray)?c.flat(1/0):c)}},a=(o,u)=>o==="or"?p=>u.some(c=>c(p)):p=>u.every(c=>c(p)),i=[];for(const o of e.conditions)if(isGroup(o)){const u=o.conditions.filter(isComplete).map(r);u.length&&i.push(a(o.conjunction,u))}else isComplete(o)&&i.push(r(o));return i.length?a(e.conjunction,i):null}const X={today:"viewbar.dayToday",tomorrow:"viewbar.dayTomorrow",yesterday:"viewbar.dayYesterday",oneWeekAgo:"viewbar.dayOneWeekAgo",oneWeekFromNow:"viewbar.dayOneWeekFromNow",oneMonthAgo:"viewbar.dayOneMonthAgo",oneMonthFromNow:"viewbar.dayOneMonthFromNow"},q={pastWeek:"viewbar.spanPastWeek",pastMonth:"viewbar.spanPastMonth",pastYear:"viewbar.spanPastYear",nextWeek:"viewbar.spanNextWeek",nextMonth:"viewbar.spanNextMonth",nextYear:"viewbar.spanNextYear"},x=e=>e==="or"?l("viewbar.conjOr"):e==="and"?l("viewbar.conjAnd"):e;function z(e){if(NO_VALUE.has(e.op))return"";if(e.kind==="checkbox")return e.value===!1?l("viewbar.valueUnchecked"):l("viewbar.valueChecked");if(e.kind==="date"){if(e.op==="isWithin"){const r=e.value??{span:"pastWeek"};if(r.span==="pastDays")return l("viewbar.spanPastDays",{days:r.days??0});if(r.span==="nextDays")return l("viewbar.spanNextDays",{days:r.days??0});const a=q[r.span];return a?l(a):r.span}const n=e.value??{mode:"today"};if(n.mode==="exactDate")return n.date;if(n.mode==="daysFromNow")return l("viewbar.dayDaysFromNow",{days:n.days});if(n.mode==="daysAgo")return l("viewbar.dayDaysAgo",{days:n.days});const s=X[n.mode];return s?l(s):n.mode}const t=n=>n===ME?l("viewbar.valueMe"):String(n);return Array.isArray(e.value)?e.value.map(t).join(", "):t(e.value??"")}export function describeCondition(e,t=n=>n){const n=operatorsFor(e.kind).find(s=>s.op===e.op)?.label??e.op;return[t(e.column),n,z(e)].filter(Boolean).join(" ")}export function describeFieldFilter(e,t){const n=[];for(const s of e.conditions)if(isGroup(s)){const r=s.conditions.filter(isComplete).map(a=>describeCondition(a,t));r.length&&n.push(r.length>1?`(${r.join(` ${x(s.conjunction)} `)})`:r[0])}else isComplete(s)&&n.push(describeCondition(s,t));return n.length?n.join(` ${x(e.conjunction)} `):l("viewbar.everyRecord")}export function fieldFilterColumns(e){const t=new Set;for(const n of e.conditions)for(const s of isGroup(n)?n.conditions:[n])isComplete(s)&&t.add(s.column);return[...t]}
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { setViewActions, type ViewAction } from './view-actions.js';
|
|
|
38
38
|
export type { BasePage, RecordTemplate } from './base-tables.js';
|
|
39
39
|
export { setRecordActions, type RecordAction, type RecordActionContext, type RecordActionRecord } from './record-actions.js';
|
|
40
40
|
export { setAutomationDrafter, type AutomationDrafter, type AutomationDraft } from './automation-drafter.js';
|
|
41
|
+
export { RECIPES, buildRecipe, recipeStart, recipeMissing, recipeText, type Recipe, type RecipeValues } from './automation-recipes.js';
|
|
41
42
|
export { setRecordSeries, refreshRecordSeries, type RecordSeries, type SeriesOccurrence, type SeriesScope } from './record-series.svelte.js';
|
|
42
43
|
export { cronWords } from './cron-words.js';
|
|
43
44
|
export { setRecordComments, commentThreads, resolveComment, type RecordComment, type RecordCommentContext, type RecordCommentStore, type CommentVotes, type CommentVote } from './activity.svelte.js';
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerCellEditor as f,registerGridExtension as O,registerGridShortcuts as g}from"@svgrid/grid";import{nudgeEnterpriseFor as P}from"../license.js";import B from"./FieldCell.svelte";import L from"./RowAdder.svelte";import H from"./FootRowAdder.svelte";import V from"./AttachmentEditor.svelte";import K from"./FieldsHeaderEnd.svelte";import{askDeleteField as N,openFieldEditor as C,openRecord as U}from"./editor-request.svelte.js";import{enableAdvancedFilter as _,registerFilterKind as G}from"../advanced-filter-enable.js";import{compileFieldFilter as z,newCondition as F,resolveMeWith as W}from"./filter-model.js";import{hasBar as $,openBarPanel as T}from"./bar-request.svelte.js";import{groupRules as q,userSorts as X,writeSortState as j}from"./viewbar/sort-state.js";import{sortLabels as Y}from"./view-model.js";import{changesOf as J,noteChange as w}from"./activity.svelte.js";import{fieldUses as Q}from"./field-uses.js";import{getLinkedTable as Z}from"./sources.svelte.js";import{linkNames as ee,registerBaseCondition as oe}from"./base-alerts.js";import{duplicateField as re,hideField as ie,indexBeside as v,removeField as te}from"./field-ops.js";import{linkReaders as ne}from"./base-tables.js";import{viewOnlyItems as le}from"./base-share.js";import{canEditSchemaIn as se}from"./base-permissions.js";import{formulaReaders as de}from"./formula.js";import{BUILTIN_FIELD_TYPES as ae}from"./builtin-types.js";import{rowColorOf as me,rowColorRootClass as fe,tallRowClass as pe,rowMarkColor as ue,rowMarkLabel as ce}from"./row-colors.js";import{chooseRowColor as M}from"./row-color-choice.svelte.js";import{fieldPropsOf as k,fillFieldColumn as ge,getFieldType as x,isServerGroupRow as Ce,originalColumn as b,registerFieldType as be,ruleFieldNames as ye,typeDrawsCell as he}from"./registry.svelte.js";import Fe from"./RatingEditor.svelte";import Te from"./LinkPickerEditor.svelte";import we from"./DateEditor.svelte";import ve from"./SelectEditor.svelte";import Me from"./NumberEditor.svelte";import ke from"./LongTextEditor.svelte";import xe from"./RichTextEditor.svelte";import Ae from"./VoteEditor.svelte";import Ee from"./TimerEditor.svelte";import Se from"./ChecklistEditor.svelte";import Re from"./ColorEditor.svelte";import De from"./TimeOfDayEditor.svelte";import Ie from"./RowHeader.svelte";import Oe from"./GroupHeader.svelte";import Pe from"./SummaryCell.svelte";import{getCurrentUser as A}from"./sources.svelte.js";import{fieldColumns as Be,gridOf as y,primaryIdOf as h,rememberGrid as Le}from"./grid-access.js";import{bm as p}from"./messages.svelte.js";export{registerFieldType,getFieldType,listFieldTypes,fieldPropsOf,fillFieldColumn}from"./registry.svelte.js";export{linkHref,linkText}from"./links.js";export{setFieldUsers,getFieldUsers,setCurrentUser,getCurrentUser,registerLinkedTable,unregisterLinkedTable,getLinkedTable,listLinkedTables}from"./sources.svelte.js";export{canEditField,canPickChoice,defaultCanEditField,fieldEditorChoices,fieldEditors,setCanEditField,setFieldProtection}from"./field-access.svelte.js";export{FIELD_PREFIX,fieldToken,isFieldToken,personIds,recordOf,ruleFields,ruleNames,ruleUsers,tokenField}from"./people-rule.js";import{protectionText as He}from"./field-access.svelte.js";export{compileFormula,formulaError,FORMULA_FUNCTIONS,FormulaError}from"./formula.js";export{FORMULA_DOCS,syntaxArgs}from"./formula-docs.js";export{formatNumber,formatCurrency,formatPercent,formatDuration,parseDuration,formatDate}from"./format.js";export{timerRunning,timerSeconds,timerToggle,timerTotal}from"./timer.js";export{BRIGHT,OPTION_COLORS}from"./palette.js";export{convertValue,countCleared}from"./convert.js";export{openFieldEditor,closeFieldEditor,openRecord,closeRecord}from"./editor-request.svelte.js";export{setBarcodeScanner,barcodeScanSupported,scanBarcode}from"./barcode-scan.js";export{setDictation,dictationSupported,dictate}from"./dictation.svelte.js";export{default as SvBaseViewBar}from"./SvBaseViewBar.svelte";export{default as SvBaseForm}from"./SvBaseForm.svelte";export{default as SvBaseAutomations}from"./SvBaseAutomations.svelte";export{formPrefillLink,readFormPrefill}from"./form-logic.js";export{default as SvBase}from"./SvBase.svelte";export{default as SvPageEditor}from"./page/SvPageEditor.svelte";export{addSubtasks,blankTable,newRecordId}from"./base-tables.js";export{baseSource,createBaseSync}from"./base-sync.js";export{baseFieldsFromSchema,baseTablesFromSchemas,baseSpecFromSchemas,baseTablesFromSpec}from"./base-schema.js";export{baseToSql,sqlName}from"./base-sql.js";export{applyBaseComments,withInverses}from"./base-schema.js";export{restoreItems,trashLabel}from"./base-trash.js";export{guessField,tableFromMatrix,recordsFromMatrix,matchColumns,mergeByKey}from"./base-import.js";export{baseFromDatabase,describeDatabase,createBaseEndpoint,baseFromEndpoint,createBaseFeed,baseFromSupabase,isSecretColumn}from"./base-connect.js";export{baseFromAirtable,airtableFormulaSupport,airtableColor,formulaFunctionsUsed}from"./airtable.js";export{registerAutomationAction,listAutomationActions,MAX_DEPTH as AUTOMATION_MAX_DEPTH,REPEAT_MOST as AUTOMATION_REPEAT_MOST,allActions as allAutomationActions,scriptRecord,scriptInput,webhookValues,triggerValues}from"./automations.svelte.js";export{createAutomationServer}from"./automation-server.js";export{chatPayload,chatHostOk}from"./automation-outbound.js";export{runScript,SCRIPT_MAX_LENGTH}from"./automation-script.js";export{newWebhookToken}from"./automation-edit.js";export{setViewActions}from"./view-actions.js";export{setRecordActions}from"./record-actions.js";export{setAutomationDrafter}from"./automation-drafter.js";export{setRecordSeries,refreshRecordSeries}from"./record-series.svelte.js";export{cronWords}from"./cron-words.js";export{setRecordComments,commentThreads,resolveComment}from"./activity.svelte.js";export{setCommentSnippets}from"./comment-snippets.svelte.js";export{setFormSuggestions}from"./form-suggestions.svelte.js";export{setBaseMessages,baseMessages,BASE_MESSAGES}from"./messages.svelte.js";export{setDateLocale,dateLocale}from"../date-locale.js";export{setRecordHistory,historyOf,loadHistory}from"./activity.svelte.js";export{setMentionHandler}from"./activity.svelte.js";export{mentionToken,mentionIds,mentionText,parseMentions,encodeMentions,setMentionLinks,findMentionLinks,linkToken,safeHref}from"./mentions.js";export{baseCondition,baseFilterOf}from"./base-alerts.js";export{compileFieldFilter,describeFieldFilter,filterKindOf,operatorsFor,ME}from"./filter-model.js";export{BUILTIN_FIELD_TYPES}from"./builtin-types.js";export{setAttachmentUploader,setAttachmentSources,attachmentsFromText,attachmentsText,toAttachments}from"./attachments.js";const m={edit:"M4 20h4L19 9l-4-4L4 16zM14 6l4 4",left:"M10 6l-6 6 6 6M4 12h11M20 5v14",right:"M14 6l6 6-6 6M20 12H9M4 5v14",duplicate:"M8 8h12v12H8zM16 8V4H4v12h4",hide:"M3 3l18 18M10.6 10.6a2 2 0 0 0 2.8 2.8M9.9 5.1A9.8 9.8 0 0 1 12 5c5 0 9 5 10 7a13.4 13.4 0 0 1-3 3.9M6.6 6.6A13.5 13.5 0 0 0 2 12c1 2 5 7 10 7a9.6 9.6 0 0 0 4.4-1.1",remove:"M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13",color:"M12 3l6 7a6.5 6.5 0 1 1-12 0l6-7z",filter:"M4 5h16l-6 7v6l-4 2v-8z",group:"M4 5h16M4 10h10M4 15h16M4 20h10",info:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM12 11v5M12 8h.01",lock:"M6 11h12v9H6zM8.5 11V8a3.5 3.5 0 0 1 7 0v3"};function Ve(o,r){const e=(o?.internalColumns??[]).find(d=>String(d.id??d.field)===r),i=e?.fieldType==="singleSelect"&&e.field?me(o)?.field===e.field?{key:"field-rowcolor",label:p("fields.menuStopColoring"),icon:m.color,run:()=>M(o,null)}:{key:"field-rowcolor",label:p("fields.menuColorRows"),icon:m.color,run:()=>M(o,{field:String(e.field),...o.props.rowColor?.target?{target:o.props.rowColor.target}:{}})}:null,t=h(o)===r,l=e&&$(o)?[...F(r,e)?[{key:"field-filter",label:p("fields.menuFilter"),icon:m.filter,separatorBefore:!0,run:()=>Ke(o,r,e)}]:[],...o.groupingControlsEnabled?[]:[{key:"field-group",label:p("fields.menuGroup"),icon:m.group,run:()=>Ne(o,r)}]]:[];return[...i?[i]:[],{key:"field-edit",label:p("fields.menuEdit"),icon:m.edit,run:()=>C({ctrl:o,mode:"edit",columnId:r})},...t?[]:[{key:"field-left",label:p("fields.menuInsertLeft"),icon:m.left,run:()=>C({ctrl:o,mode:"add",index:v(o,r,"left")})}],{key:"field-right",label:p("fields.menuInsertRight"),icon:m.right,run:()=>C({ctrl:o,mode:"add",index:v(o,r,"right")})},{key:"field-duplicate",label:p("fields.menuDuplicate"),icon:m.duplicate,run:()=>{o.props.baseRefuseDuplicate?.(r)||re(o,r)}},...t?[]:[{key:"field-move-left",label:p("fields.menuMoveLeft"),icon:m.left,disabled:!S(o,r,-1),run:()=>R(o,r,-1)},{key:"field-move-right",label:p("fields.menuMoveRight"),icon:m.right,disabled:!S(o,r,1),run:()=>R(o,r,1)}],...l,...Je(o,r,e),...t?[]:[{key:"field-hide",label:p("fields.menuHide"),icon:m.hide,run:()=>ie(o,r)},{key:"field-delete",label:p("fields.menuDelete"),icon:m.remove,separatorBefore:!0,run:()=>e?.fieldType==="link"&&(e.fieldProps?.inverse&&Z(e.fieldProps.table)||ne({columns:o.internalColumns},e).length)||e&&de(o.internalColumns??[],e).length||Q(o,e).length?N({ctrl:o,columnId:r}):te(o,r)}]]}function E(o,r,e){const i=(o.allColumns??[]).map(l=>l.id),t=i[i.indexOf(r)+e];if(!(!t||t===h(o)||o.isColumnPinned?.(t)!==o.isColumnPinned?.(r)))return t}const S=(o,r,e)=>!!E(o,r,e);function R(o,r,e){const i=E(o,r,e);if(!i)return;const t=o.allColumns.map(n=>n.id),l=t.indexOf(r),d=t.indexOf(i);t[l]=i,t[d]=r;const a=o.grid.getAllColumns().map(n=>n.id),s=o.userColumnOrder??[];o.moveColumnsByUser(je(s.length?[...s,...a.filter(n=>!s.includes(n))]:a,t))}function Ke(o,r,e){const i=F(r,e);if(!i)return;const t=o.advancedFilter,l=t?.kind==="fieldFilter"?t:{kind:"fieldFilter",conjunction:"and",conditions:[]};o.buildApi().setAdvancedFilter({...l,conditions:[...l.conditions,i]}),T(o,"filter")}function Ne(o,r){const e=q(o);e.some(i=>i.id===r)||j(o.buildApi(),[...e,{id:r,desc:!1}],X(o)),T(o,"group")}function D(o,r,e,i,t){if(!r)return;const l=A()?.id,d=i??o.buildApi?.().getRowId?.(r),a=(s,n)=>{d!=null&&!t&&o.editedCellValues&&(o.editedCellValues={...o.editedCellValues,[`${d}:${s}`]:n})};for(const s of o?.internalColumns??[]){if(s.fieldType!=="lastModifiedTime"&&s.fieldType!=="lastModifiedBy")continue;const n=String(s.id??s.field);if(n===e||!s.field)continue;const u=k(b(s));u.watch==="specific"&&!(u.watchFields??[]).includes(e)||(s.fieldType==="lastModifiedTime"?a(n,r[s.field]=new Date().toISOString()):l!==void 0&&a(n,r[s.field]=l))}}export function baseReviewApplied(o){return(r,e,i)=>{const t=y(typeof o=="function"?o():o);if(!t)return;const l=t.buildApi?.(),d=l?.getOption?.("getRowId"),a=new Map;(i??l?.getData?.()??[]).forEach((n,u)=>a.set(String(d?d(n,u):u),n));const s=new Map((t.allColumns??[]).map(n=>[n.columnDef?.field,n.id]));for(const n of r){const u=a.get(n.rowId),c=s.get(n.field);!u||!c||(D(t,u,c),w(t,n.rowId,c,u[n.field],void 0,e==="undo"?void 0:n.source.label))}}}function Ue(o,r,e,i){if(!r)return;const t=(o?.allColumns??[]).find(c=>c.id===e)?.columnDef;if(!t?.field)return;const l=i??o.buildApi?.().getRowId?.(r);if(l==null)return;const d=String(l),a=r[t.field],s=o.history?.[o.historyPtr],n=[...J(o,d)].reverse().find(c=>c.columnId===e),u=s?.rowId===d&&s.columnId===e&&s.after===a?{from:s.before}:n?{from:n.value}:void 0;w(o,d,e,a,void 0,void 0,u)}function _e(o,r){if(o.key!==" "||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||r.editing||!r.activeCell)return!1;const e=y(r.api);if(!e?.props?.expandRows)return!1;const i=(e.allColumns??[]).find(l=>l.id===r.activeCell.columnId);if(i?.columnDef.editorType==="checkbox"||i?.columnDef.editorType==="fieldVote")return!1;const t=(e.allRows??[])[r.activeCell.rowIndex];return!t||e.isGroupRow?.(t)||Ce(t.original)?!1:(o.preventDefault(),U({ctrl:e,rowId:t.id}),!0)}function Ge(o,r){if(o.key!=="Enter"&&o.key!==" "||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||r.editing||!r.activeCell)return!1;const e=y(r.api);if(!e?.props?.baseDeleteSelection)return!1;const{rowIndex:i,colIndex:t}=r.activeCell,l=e.allColumns?.[t]?.columnDef.editorType,d=l==="checkbox";if(o.key===" "&&!d&&l!=="fieldVote")return!1;const a=r.ranges.at(-1);return o.key==="Enter"&&(r.ranges.length>1||a&&(a[0]!==a[2]||a[1]!==a[3]))||!e.isCellEditableAt(i,t)?!1:(o.preventDefault(),d?(e.toggleBooleanCell(i,t),!0):(r.startEditing(i,t),!!e.editingCell))}import{baseGridKey as ze}from"./base-keys.svelte.js";import{treeGridKey as We}from"./tree-edit.js";import{fillDownKey as $e}from"./base-fill.js";import{autoSumKey as qe,formatKey as Xe}from"./excel-habits.svelte.js";import{orderKeepingScreen as je}from"./column-order.js";let I=!1;export function enableFields(){if(I)return;I=!0;for(const e of ae)x(e.id)||be(e);O({column:(e,i)=>ge(e,i),cell:B,hasCell:e=>he(e??{}),cellEdited:(e,i)=>{D(e,i.row,i.columnId,i.rowId,i.offGrid),Ue(e,i.row,i.columnId,i.rowId),Ye(e,i.row,i.columnId,i.rowId)},rangeAction:(e,i)=>e.props?.baseRangeAction?.(i)===!0,bodyEnd:L,footEnd:H,rowMarkColor:(e,i)=>ue(e,i),rowMarkLabel:(e,i)=>ce(e,i),headerIcon:e=>e?.fieldType?x(e.fieldType)?.icon:null,headerNote:e=>{if(!e?.fieldType)return null;const i=typeof e.description=="string"?e.description:"",t=He(b(e),k(b(e)),ye(e));return t?{text:i?`${t} ${i}`:t,icon:m.lock}:i?{text:i,icon:m.info}:null},sortLabels:e=>e?.fieldType?Y(e):null,lockColumn:(e,i)=>h(e)===i?"right":!1,rowHeader:e=>e?.props?.expandRows?Ie:null,groupRow:e=>!e?.props?.rowModel&&Be(e).some(i=>i.fieldType)?Oe:null,summaryCell:e=>e?.props?.rowModel?null:Pe,rootClass:e=>{Le(e);const i=e?.advancedFilter?.kind==="fieldFilter"?"sv-fields-own-filter":"",t=i&&!e?.toolPanelEnabled&&!e?.chartingEnabled?"sv-fields-filter-only":"",l=e?.groupingColumns?.length?"sv-fields-grouped":"";return[fe(e),pe(e),i,t,l].filter(Boolean).join(" ")||null},headerEnd:K,columnMenuItems:(e,i)=>e?.props?.fieldMenu?le(e,Ve(e,i),!se(e)):[]});const o=e=>({value:e.value,typed:e.typed,columnDef:e.columnDef,columnId:e.columnId,row:e.row,inCell:e.inCell!==!1,onCommit:e.onCommit,onCancel:e.onCancel});f("fieldRating",{component:Fe,props:o,typeToEdit:e=>/^[0-9]$/.test(e)}),f("fieldLink",{component:Te,props:o,typeToEdit:e=>e!==" "}),f("fieldNumber",{component:Me,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9.,:+\-(=]/.test(e)}),f("fieldLongText",{component:ke,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove})}),f("fieldSelect",{component:ve,props:e=>({...o(e),grid:e.grid,onChange:e.onChange,onCommitAndMove:e.onCommitAndMove})}),f("attachment",{component:V,props:e=>({value:e.value,columnDef:e.columnDef,columnId:e.columnId,row:e.row,onCommit:e.onCommit,onCancel:e.onCancel}),typeToEdit:!1});const r=e=>({...o(e),onCommitAndMove:e.onCommitAndMove});f("fieldChecklist",{component:Se,props:r}),f("fieldRichText",{component:xe,props:r}),f("fieldVote",{component:Ae,props:r,typeToEdit:e=>e===" "}),f("fieldTimer",{component:Ee,props:e=>({...r(e),rowId:e.rowId,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>e===" "||/[0-9:]/.test(e)}),f("fieldColor",{component:Re,props:r}),f("fieldTime",{component:De,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9]/.test(e)}),f("fieldDate",{component:we,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9a-z]/i.test(e)}),G("fieldFilter",(e,i)=>z(e,i.getValue,ee)),W(()=>A()?.id),oe(),_(),g(_e,{id:"svgrid-fields-space"}),g(ze,{id:"svgrid-fields-keys"}),g(Ge,{id:"svgrid-base-keys"}),g($e,{id:"svgrid-base-fill-down"}),g(qe,{id:"svgrid-base-autosum",priority:200}),g(Xe,{id:"svgrid-base-format-keys",priority:200}),g(We,{id:"svgrid-base-tree"}),P("base","SvGrid Base")}export{inboxRecords,listColumns,listGroups,viewRecords}from"./list-view.js";import{aiFieldEdited as Ye,aiFieldMenuItems as Je}from"./ai-field.svelte.js";export{generateAIField,regenerateAIFields,cancelAIField,pendingAIField,setAIFieldConcurrency}from"./ai-field.svelte.js";export{aiPromptError,readAIAnswer}from"./ai-prompt.js";export{moveTile,newTile,putTile,removeTile,tileResult,tileRows,tileTitle}from"./dashboard.js";export{sharedTables,sharedViews,shareOf}from"./base-share.js";export{recordsAsShown,downloadAsShown,filesFolders,safeFolder}from"./base-export.js";export{permittedTables,permittedRecords,permittedViews,tablePermissions,gridPermissions,canDeleteRecord}from"./base-permissions.js";export{computeRecords,computeRecord,computedValues,computedFields,evaluateFilter,filterRecords}from"./base-compute.js";export{queryRecords,fieldFilterToSql,fieldFilterToPostgrest,supabaseFieldFilter,viewFilterOf}from"./base-query.js";export{searchBase}from"./base-search.js";export{toChecklist,parseChecklist,checklistText,checklistProgress}from"./checklist.js";export{parseColor}from"./color-value.js";export{parseTimeOfDay,formatTimeOfDay,timeSeconds}from"./time-of-day.js";export{recordDock,setRecordDock,recordDockWidth,setRecordDockWidth}from"./record-dock.svelte.js";
|
|
1
|
+
import{registerCellEditor as f,registerGridExtension as O,registerGridShortcuts as g}from"@svgrid/grid";import{nudgeEnterpriseFor as P}from"../license.js";import B from"./FieldCell.svelte";import L from"./RowAdder.svelte";import H from"./FootRowAdder.svelte";import V from"./AttachmentEditor.svelte";import K from"./FieldsHeaderEnd.svelte";import{askDeleteField as N,openFieldEditor as C,openRecord as U}from"./editor-request.svelte.js";import{enableAdvancedFilter as _,registerFilterKind as G}from"../advanced-filter-enable.js";import{compileFieldFilter as z,newCondition as F,resolveMeWith as W}from"./filter-model.js";import{hasBar as $,openBarPanel as T}from"./bar-request.svelte.js";import{groupRules as q,userSorts as X,writeSortState as j}from"./viewbar/sort-state.js";import{sortLabels as Y}from"./view-model.js";import{changesOf as J,noteChange as w}from"./activity.svelte.js";import{fieldUses as Q}from"./field-uses.js";import{getLinkedTable as Z}from"./sources.svelte.js";import{linkNames as ee,registerBaseCondition as oe}from"./base-alerts.js";import{duplicateField as re,hideField as ie,indexBeside as v,removeField as te}from"./field-ops.js";import{linkReaders as ne}from"./base-tables.js";import{viewOnlyItems as le}from"./base-share.js";import{canEditSchemaIn as se}from"./base-permissions.js";import{formulaReaders as de}from"./formula.js";import{BUILTIN_FIELD_TYPES as ae}from"./builtin-types.js";import{rowColorOf as me,rowColorRootClass as fe,tallRowClass as pe,rowMarkColor as ue,rowMarkLabel as ce}from"./row-colors.js";import{chooseRowColor as M}from"./row-color-choice.svelte.js";import{fieldPropsOf as x,fillFieldColumn as ge,getFieldType as k,isServerGroupRow as Ce,originalColumn as b,registerFieldType as be,ruleFieldNames as ye,typeDrawsCell as he}from"./registry.svelte.js";import Fe from"./RatingEditor.svelte";import Te from"./LinkPickerEditor.svelte";import we from"./DateEditor.svelte";import ve from"./SelectEditor.svelte";import Me from"./NumberEditor.svelte";import xe from"./LongTextEditor.svelte";import ke from"./RichTextEditor.svelte";import Ee from"./VoteEditor.svelte";import Ae from"./TimerEditor.svelte";import Se from"./ChecklistEditor.svelte";import Re from"./ColorEditor.svelte";import De from"./TimeOfDayEditor.svelte";import Ie from"./RowHeader.svelte";import Oe from"./GroupHeader.svelte";import Pe from"./SummaryCell.svelte";import{getCurrentUser as E}from"./sources.svelte.js";import{fieldColumns as Be,gridOf as y,primaryIdOf as h,rememberGrid as Le}from"./grid-access.js";import{bm as p}from"./messages.svelte.js";export{registerFieldType,getFieldType,listFieldTypes,fieldPropsOf,fillFieldColumn}from"./registry.svelte.js";export{linkHref,linkText}from"./links.js";export{setFieldUsers,getFieldUsers,setCurrentUser,getCurrentUser,registerLinkedTable,unregisterLinkedTable,getLinkedTable,listLinkedTables}from"./sources.svelte.js";export{canEditField,canPickChoice,defaultCanEditField,fieldEditorChoices,fieldEditors,setCanEditField,setFieldProtection}from"./field-access.svelte.js";export{FIELD_PREFIX,fieldToken,isFieldToken,personIds,recordOf,ruleFields,ruleNames,ruleUsers,tokenField}from"./people-rule.js";import{protectionText as He}from"./field-access.svelte.js";export{compileFormula,formulaError,FORMULA_FUNCTIONS,FormulaError}from"./formula.js";export{FORMULA_DOCS,syntaxArgs}from"./formula-docs.js";export{formatNumber,formatCurrency,formatPercent,formatDuration,parseDuration,formatDate}from"./format.js";export{timerRunning,timerSeconds,timerToggle,timerTotal}from"./timer.js";export{BRIGHT,OPTION_COLORS}from"./palette.js";export{convertValue,countCleared}from"./convert.js";export{openFieldEditor,closeFieldEditor,openRecord,closeRecord}from"./editor-request.svelte.js";export{setBarcodeScanner,barcodeScanSupported,scanBarcode}from"./barcode-scan.js";export{setDictation,dictationSupported,dictate}from"./dictation.svelte.js";export{default as SvBaseViewBar}from"./SvBaseViewBar.svelte";export{default as SvBaseForm}from"./SvBaseForm.svelte";export{default as SvBaseAutomations}from"./SvBaseAutomations.svelte";export{formPrefillLink,readFormPrefill}from"./form-logic.js";export{default as SvBase}from"./SvBase.svelte";export{default as SvPageEditor}from"./page/SvPageEditor.svelte";export{addSubtasks,blankTable,newRecordId}from"./base-tables.js";export{baseSource,createBaseSync}from"./base-sync.js";export{baseFieldsFromSchema,baseTablesFromSchemas,baseSpecFromSchemas,baseTablesFromSpec}from"./base-schema.js";export{baseToSql,sqlName}from"./base-sql.js";export{applyBaseComments,withInverses}from"./base-schema.js";export{restoreItems,trashLabel}from"./base-trash.js";export{guessField,tableFromMatrix,recordsFromMatrix,matchColumns,mergeByKey}from"./base-import.js";export{baseFromDatabase,describeDatabase,createBaseEndpoint,baseFromEndpoint,createBaseFeed,baseFromSupabase,isSecretColumn}from"./base-connect.js";export{baseFromAirtable,airtableFormulaSupport,airtableColor,formulaFunctionsUsed}from"./airtable.js";export{registerAutomationAction,listAutomationActions,MAX_DEPTH as AUTOMATION_MAX_DEPTH,REPEAT_MOST as AUTOMATION_REPEAT_MOST,allActions as allAutomationActions,scriptRecord,scriptInput,webhookValues,triggerValues}from"./automations.svelte.js";export{createAutomationServer}from"./automation-server.js";export{chatPayload,chatHostOk}from"./automation-outbound.js";export{runScript,SCRIPT_MAX_LENGTH}from"./automation-script.js";export{newWebhookToken}from"./automation-edit.js";export{setViewActions}from"./view-actions.js";export{setRecordActions}from"./record-actions.js";export{setAutomationDrafter}from"./automation-drafter.js";export{RECIPES,buildRecipe,recipeStart,recipeMissing,recipeText}from"./automation-recipes.js";export{setRecordSeries,refreshRecordSeries}from"./record-series.svelte.js";export{cronWords}from"./cron-words.js";export{setRecordComments,commentThreads,resolveComment}from"./activity.svelte.js";export{setCommentSnippets}from"./comment-snippets.svelte.js";export{setFormSuggestions}from"./form-suggestions.svelte.js";export{setBaseMessages,baseMessages,BASE_MESSAGES}from"./messages.svelte.js";export{setDateLocale,dateLocale}from"../date-locale.js";export{setRecordHistory,historyOf,loadHistory}from"./activity.svelte.js";export{setMentionHandler}from"./activity.svelte.js";export{mentionToken,mentionIds,mentionText,parseMentions,encodeMentions,setMentionLinks,findMentionLinks,linkToken,safeHref}from"./mentions.js";export{baseCondition,baseFilterOf}from"./base-alerts.js";export{compileFieldFilter,describeFieldFilter,filterKindOf,operatorsFor,ME}from"./filter-model.js";export{BUILTIN_FIELD_TYPES}from"./builtin-types.js";export{setAttachmentUploader,setAttachmentSources,attachmentsFromText,attachmentsText,toAttachments}from"./attachments.js";const m={edit:"M4 20h4L19 9l-4-4L4 16zM14 6l4 4",left:"M10 6l-6 6 6 6M4 12h11M20 5v14",right:"M14 6l6 6-6 6M20 12H9M4 5v14",duplicate:"M8 8h12v12H8zM16 8V4H4v12h4",hide:"M3 3l18 18M10.6 10.6a2 2 0 0 0 2.8 2.8M9.9 5.1A9.8 9.8 0 0 1 12 5c5 0 9 5 10 7a13.4 13.4 0 0 1-3 3.9M6.6 6.6A13.5 13.5 0 0 0 2 12c1 2 5 7 10 7a9.6 9.6 0 0 0 4.4-1.1",remove:"M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13",color:"M12 3l6 7a6.5 6.5 0 1 1-12 0l6-7z",filter:"M4 5h16l-6 7v6l-4 2v-8z",group:"M4 5h16M4 10h10M4 15h16M4 20h10",info:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM12 11v5M12 8h.01",lock:"M6 11h12v9H6zM8.5 11V8a3.5 3.5 0 0 1 7 0v3"};function Ve(o,r){const e=(o?.internalColumns??[]).find(d=>String(d.id??d.field)===r),i=e?.fieldType==="singleSelect"&&e.field?me(o)?.field===e.field?{key:"field-rowcolor",label:p("fields.menuStopColoring"),icon:m.color,run:()=>M(o,null)}:{key:"field-rowcolor",label:p("fields.menuColorRows"),icon:m.color,run:()=>M(o,{field:String(e.field),...o.props.rowColor?.target?{target:o.props.rowColor.target}:{}})}:null,t=h(o)===r,l=e&&$(o)?[...F(r,e)?[{key:"field-filter",label:p("fields.menuFilter"),icon:m.filter,separatorBefore:!0,run:()=>Ke(o,r,e)}]:[],...o.groupingControlsEnabled?[]:[{key:"field-group",label:p("fields.menuGroup"),icon:m.group,run:()=>Ne(o,r)}]]:[];return[...i?[i]:[],{key:"field-edit",label:p("fields.menuEdit"),icon:m.edit,run:()=>C({ctrl:o,mode:"edit",columnId:r})},...t?[]:[{key:"field-left",label:p("fields.menuInsertLeft"),icon:m.left,run:()=>C({ctrl:o,mode:"add",index:v(o,r,"left")})}],{key:"field-right",label:p("fields.menuInsertRight"),icon:m.right,run:()=>C({ctrl:o,mode:"add",index:v(o,r,"right")})},{key:"field-duplicate",label:p("fields.menuDuplicate"),icon:m.duplicate,run:()=>{o.props.baseRefuseDuplicate?.(r)||re(o,r)}},...t?[]:[{key:"field-move-left",label:p("fields.menuMoveLeft"),icon:m.left,disabled:!S(o,r,-1),run:()=>R(o,r,-1)},{key:"field-move-right",label:p("fields.menuMoveRight"),icon:m.right,disabled:!S(o,r,1),run:()=>R(o,r,1)}],...l,...Je(o,r,e),...t?[]:[{key:"field-hide",label:p("fields.menuHide"),icon:m.hide,run:()=>ie(o,r)},{key:"field-delete",label:p("fields.menuDelete"),icon:m.remove,separatorBefore:!0,run:()=>e?.fieldType==="link"&&(e.fieldProps?.inverse&&Z(e.fieldProps.table)||ne({columns:o.internalColumns},e).length)||e&&de(o.internalColumns??[],e).length||Q(o,e).length?N({ctrl:o,columnId:r}):te(o,r)}]]}function A(o,r,e){const i=(o.allColumns??[]).map(l=>l.id),t=i[i.indexOf(r)+e];if(!(!t||t===h(o)||o.isColumnPinned?.(t)!==o.isColumnPinned?.(r)))return t}const S=(o,r,e)=>!!A(o,r,e);function R(o,r,e){const i=A(o,r,e);if(!i)return;const t=o.allColumns.map(n=>n.id),l=t.indexOf(r),d=t.indexOf(i);t[l]=i,t[d]=r;const a=o.grid.getAllColumns().map(n=>n.id),s=o.userColumnOrder??[];o.moveColumnsByUser(je(s.length?[...s,...a.filter(n=>!s.includes(n))]:a,t))}function Ke(o,r,e){const i=F(r,e);if(!i)return;const t=o.advancedFilter,l=t?.kind==="fieldFilter"?t:{kind:"fieldFilter",conjunction:"and",conditions:[]};o.buildApi().setAdvancedFilter({...l,conditions:[...l.conditions,i]}),T(o,"filter")}function Ne(o,r){const e=q(o);e.some(i=>i.id===r)||j(o.buildApi(),[...e,{id:r,desc:!1}],X(o)),T(o,"group")}function D(o,r,e,i,t){if(!r)return;const l=E()?.id,d=i??o.buildApi?.().getRowId?.(r),a=(s,n)=>{d!=null&&!t&&o.editedCellValues&&(o.editedCellValues={...o.editedCellValues,[`${d}:${s}`]:n})};for(const s of o?.internalColumns??[]){if(s.fieldType!=="lastModifiedTime"&&s.fieldType!=="lastModifiedBy")continue;const n=String(s.id??s.field);if(n===e||!s.field)continue;const u=x(b(s));u.watch==="specific"&&!(u.watchFields??[]).includes(e)||(s.fieldType==="lastModifiedTime"?a(n,r[s.field]=new Date().toISOString()):l!==void 0&&a(n,r[s.field]=l))}}export function baseReviewApplied(o){return(r,e,i)=>{const t=y(typeof o=="function"?o():o);if(!t)return;const l=t.buildApi?.(),d=l?.getOption?.("getRowId"),a=new Map;(i??l?.getData?.()??[]).forEach((n,u)=>a.set(String(d?d(n,u):u),n));const s=new Map((t.allColumns??[]).map(n=>[n.columnDef?.field,n.id]));for(const n of r){const u=a.get(n.rowId),c=s.get(n.field);!u||!c||(D(t,u,c),w(t,n.rowId,c,u[n.field],void 0,e==="undo"?void 0:n.source.label))}}}function Ue(o,r,e,i){if(!r)return;const t=(o?.allColumns??[]).find(c=>c.id===e)?.columnDef;if(!t?.field)return;const l=i??o.buildApi?.().getRowId?.(r);if(l==null)return;const d=String(l),a=r[t.field],s=o.history?.[o.historyPtr],n=[...J(o,d)].reverse().find(c=>c.columnId===e),u=s?.rowId===d&&s.columnId===e&&s.after===a?{from:s.before}:n?{from:n.value}:void 0;w(o,d,e,a,void 0,void 0,u)}function _e(o,r){if(o.key!==" "||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||r.editing||!r.activeCell)return!1;const e=y(r.api);if(!e?.props?.expandRows)return!1;const i=(e.allColumns??[]).find(l=>l.id===r.activeCell.columnId);if(i?.columnDef.editorType==="checkbox"||i?.columnDef.editorType==="fieldVote")return!1;const t=(e.allRows??[])[r.activeCell.rowIndex];return!t||e.isGroupRow?.(t)||Ce(t.original)?!1:(o.preventDefault(),U({ctrl:e,rowId:t.id}),!0)}function Ge(o,r){if(o.key!=="Enter"&&o.key!==" "||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||r.editing||!r.activeCell)return!1;const e=y(r.api);if(!e?.props?.baseDeleteSelection)return!1;const{rowIndex:i,colIndex:t}=r.activeCell,l=e.allColumns?.[t]?.columnDef.editorType,d=l==="checkbox";if(o.key===" "&&!d&&l!=="fieldVote")return!1;const a=r.ranges.at(-1);return o.key==="Enter"&&(r.ranges.length>1||a&&(a[0]!==a[2]||a[1]!==a[3]))||!e.isCellEditableAt(i,t)?!1:(o.preventDefault(),d?(e.toggleBooleanCell(i,t),!0):(r.startEditing(i,t),!!e.editingCell))}import{baseGridKey as ze}from"./base-keys.svelte.js";import{treeGridKey as We}from"./tree-edit.js";import{fillDownKey as $e}from"./base-fill.js";import{autoSumKey as qe,formatKey as Xe}from"./excel-habits.svelte.js";import{orderKeepingScreen as je}from"./column-order.js";let I=!1;export function enableFields(){if(I)return;I=!0;for(const e of ae)k(e.id)||be(e);O({column:(e,i)=>ge(e,i),cell:B,hasCell:e=>he(e??{}),cellEdited:(e,i)=>{D(e,i.row,i.columnId,i.rowId,i.offGrid),Ue(e,i.row,i.columnId,i.rowId),Ye(e,i.row,i.columnId,i.rowId)},rangeAction:(e,i)=>e.props?.baseRangeAction?.(i)===!0,bodyEnd:L,footEnd:H,rowMarkColor:(e,i)=>ue(e,i),rowMarkLabel:(e,i)=>ce(e,i),headerIcon:e=>e?.fieldType?k(e.fieldType)?.icon:null,headerNote:e=>{if(!e?.fieldType)return null;const i=typeof e.description=="string"?e.description:"",t=He(b(e),x(b(e)),ye(e));return t?{text:i?`${t} ${i}`:t,icon:m.lock}:i?{text:i,icon:m.info}:null},sortLabels:e=>e?.fieldType?Y(e):null,lockColumn:(e,i)=>h(e)===i?"right":!1,rowHeader:e=>e?.props?.expandRows?Ie:null,groupRow:e=>!e?.props?.rowModel&&Be(e).some(i=>i.fieldType)?Oe:null,summaryCell:e=>e?.props?.rowModel?null:Pe,rootClass:e=>{Le(e);const i=e?.advancedFilter?.kind==="fieldFilter"?"sv-fields-own-filter":"",t=i&&!e?.toolPanelEnabled&&!e?.chartingEnabled?"sv-fields-filter-only":"",l=e?.groupingColumns?.length?"sv-fields-grouped":"";return[fe(e),pe(e),i,t,l].filter(Boolean).join(" ")||null},headerEnd:K,columnMenuItems:(e,i)=>e?.props?.fieldMenu?le(e,Ve(e,i),!se(e)):[]});const o=e=>({value:e.value,typed:e.typed,columnDef:e.columnDef,columnId:e.columnId,row:e.row,inCell:e.inCell!==!1,onCommit:e.onCommit,onCancel:e.onCancel});f("fieldRating",{component:Fe,props:o,typeToEdit:e=>/^[0-9]$/.test(e)}),f("fieldLink",{component:Te,props:o,typeToEdit:e=>e!==" "}),f("fieldNumber",{component:Me,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9.,:+\-(=]/.test(e)}),f("fieldLongText",{component:xe,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove})}),f("fieldSelect",{component:ve,props:e=>({...o(e),grid:e.grid,onChange:e.onChange,onCommitAndMove:e.onCommitAndMove})}),f("attachment",{component:V,props:e=>({value:e.value,columnDef:e.columnDef,columnId:e.columnId,row:e.row,onCommit:e.onCommit,onCancel:e.onCancel}),typeToEdit:!1});const r=e=>({...o(e),onCommitAndMove:e.onCommitAndMove});f("fieldChecklist",{component:Se,props:r}),f("fieldRichText",{component:ke,props:r}),f("fieldVote",{component:Ee,props:r,typeToEdit:e=>e===" "}),f("fieldTimer",{component:Ae,props:e=>({...r(e),rowId:e.rowId,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>e===" "||/[0-9:]/.test(e)}),f("fieldColor",{component:Re,props:r}),f("fieldTime",{component:De,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9]/.test(e)}),f("fieldDate",{component:we,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9a-z]/i.test(e)}),G("fieldFilter",(e,i)=>z(e,i.getValue,ee)),W(()=>E()?.id),oe(),_(),g(_e,{id:"svgrid-fields-space"}),g(ze,{id:"svgrid-fields-keys"}),g(Ge,{id:"svgrid-base-keys"}),g($e,{id:"svgrid-base-fill-down"}),g(qe,{id:"svgrid-base-autosum",priority:200}),g(Xe,{id:"svgrid-base-format-keys",priority:200}),g(We,{id:"svgrid-base-tree"}),P("base","SvGrid Base")}export{inboxRecords,listColumns,listGroups,viewRecords}from"./list-view.js";import{aiFieldEdited as Ye,aiFieldMenuItems as Je}from"./ai-field.svelte.js";export{generateAIField,regenerateAIFields,cancelAIField,pendingAIField,setAIFieldConcurrency}from"./ai-field.svelte.js";export{aiPromptError,readAIAnswer}from"./ai-prompt.js";export{moveTile,newTile,putTile,removeTile,tileResult,tileRows,tileTitle}from"./dashboard.js";export{sharedTables,sharedViews,shareOf}from"./base-share.js";export{recordsAsShown,downloadAsShown,filesFolders,safeFolder}from"./base-export.js";export{permittedTables,permittedRecords,permittedViews,tablePermissions,gridPermissions,canDeleteRecord}from"./base-permissions.js";export{computeRecords,computeRecord,computedValues,computedFields,evaluateFilter,filterRecords}from"./base-compute.js";export{queryRecords,fieldFilterToSql,fieldFilterToPostgrest,supabaseFieldFilter,viewFilterOf}from"./base-query.js";export{searchBase}from"./base-search.js";export{toChecklist,parseChecklist,checklistText,checklistProgress}from"./checklist.js";export{parseColor}from"./color-value.js";export{parseTimeOfDay,formatTimeOfDay,timeSeconds}from"./time-of-day.js";export{recordDock,setRecordDock,recordDockWidth,setRecordDockWidth}from"./record-dock.svelte.js";
|
|
@@ -303,6 +303,8 @@ export declare const EXTRAS_MESSAGES: {
|
|
|
303
303
|
readonly 'extras.aiInto': "Put the answer in";
|
|
304
304
|
readonly 'extras.aiNowhere': "No field (use {ai} in the next steps)";
|
|
305
305
|
readonly 'extras.aiHint': "Name fields in braces. The answer is {ai} in the next steps.";
|
|
306
|
+
readonly 'extras.aiBase': "Send it the whole base";
|
|
307
|
+
readonly 'extras.aiBaseHint': "The records of every table go with the prompt, for a letter about all of it (\"What should I do this week?\").";
|
|
306
308
|
readonly 'extras.scriptCode': "Script";
|
|
307
309
|
readonly 'extras.scriptNeedsBrowser': "A script runs in the browser: set Runs in to The browser.";
|
|
308
310
|
readonly '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.";
|
|
@@ -313,4 +315,133 @@ export declare const EXTRAS_MESSAGES: {
|
|
|
313
315
|
readonly 'extras.summaryRepeat': "{steps} for each record in {table}";
|
|
314
316
|
readonly 'extras.summaryIf': "Then {then}; otherwise {otherwise}";
|
|
315
317
|
readonly 'extras.summaryScript': "{lines} lines";
|
|
318
|
+
readonly 'extras.whenChangesFrom': "When a record changes from {from}";
|
|
319
|
+
readonly 'extras.whenChangesFromTo': "When a record changes from {from} to {condition}";
|
|
320
|
+
readonly 'extras.fromTitle': "Only when, before the change";
|
|
321
|
+
readonly 'extras.fromAny': "Whatever it was before the change";
|
|
322
|
+
readonly 'extras.tabCreate': "Create";
|
|
323
|
+
readonly 'extras.tabManage': "Manage";
|
|
324
|
+
readonly 'extras.gallerySearch': "Search recipes";
|
|
325
|
+
readonly 'extras.galleryCategories': "Categories";
|
|
326
|
+
readonly 'extras.galleryExplore': "Explore";
|
|
327
|
+
readonly 'extras.galleryBasics': "Start with the basics";
|
|
328
|
+
readonly 'extras.galleryNone': "No recipe has these words. Try other words, describe it with AI on Explore, or build it step by step.";
|
|
329
|
+
readonly 'extras.galleryNoneTitle': "No recipes";
|
|
330
|
+
readonly 'extras.recipeCount.one': "{count} recipe";
|
|
331
|
+
readonly 'extras.recipeCount.other': "{count} recipes";
|
|
332
|
+
readonly 'extras.cat_status': "Status changes";
|
|
333
|
+
readonly 'extras.cat_created': "New records";
|
|
334
|
+
readonly 'extras.cat_dates': "Dates and reminders";
|
|
335
|
+
readonly 'extras.cat_forms': "Forms and buttons";
|
|
336
|
+
readonly 'extras.cat_ai': "AI";
|
|
337
|
+
readonly 'extras.cat_messages': "E-mail and messages";
|
|
338
|
+
readonly 'extras.cat_records': "Other tables";
|
|
339
|
+
readonly 'extras.cat_connect': "Connect other apps";
|
|
340
|
+
readonly 'extras.fromScratch': "Create from scratch";
|
|
341
|
+
readonly 'extras.fromScratchHint': "Pick what starts it and what it does, step by step.";
|
|
342
|
+
readonly 'extras.describeCard': "Describe it with AI";
|
|
343
|
+
readonly 'extras.useRecipe': "Use template";
|
|
344
|
+
readonly 'extras.recipeTable': "In table";
|
|
345
|
+
readonly 'extras.recipeAdd': "Add automation";
|
|
346
|
+
readonly 'extras.recipeCancel': "Cancel";
|
|
347
|
+
readonly 'extras.showAll': "Show all";
|
|
348
|
+
readonly 'extras.recipeAdded': "Added and switched on. Check it here, and try it with Test.";
|
|
349
|
+
readonly 'extras.recipeFill': "Fill in the words in bold";
|
|
350
|
+
readonly 'extras.blankTheField': "the {field}";
|
|
351
|
+
readonly 'extras.blankAnyForm': "any form";
|
|
352
|
+
readonly 'extras.blankTyped': "Type it, or pick one";
|
|
353
|
+
readonly 'extras.blankMe': "me ({name})";
|
|
354
|
+
readonly 'extras.recipe_statusNotify': "When {status} changes to {value}, notify {who}";
|
|
355
|
+
readonly 'extras.recipe_statusFromTo': "When {status} changes from {from} to {value}, notify {who}";
|
|
356
|
+
readonly 'extras.recipe_statusAssign': "When {status} changes to {value}, assign {member} as {person}";
|
|
357
|
+
readonly 'extras.recipe_statusMove': "When {status} changes to {value}, set {status2} to {value2}";
|
|
358
|
+
readonly 'extras.recipe_statusStamp': "When {status} changes to {value}, set {date} to today";
|
|
359
|
+
readonly 'extras.recipe_checkboxStatus': "When {box} is checked, set {status} to {value}";
|
|
360
|
+
readonly 'extras.recipe_createdNotify': "When a record is created, notify {who}";
|
|
361
|
+
readonly 'extras.recipe_createdCreator': "When a record is created, assign {creator} as {person}";
|
|
362
|
+
readonly 'extras.recipe_createdStatus': "When a record is created, set {status} to {value}";
|
|
363
|
+
readonly 'extras.recipe_createdDue': "When a record is created, set {date} to {days} days from today";
|
|
364
|
+
readonly 'extras.recipe_dateNotify': "When {date} arrives, notify {who}";
|
|
365
|
+
readonly 'extras.recipe_dateBeforeNotify': "{days} days before {date}, notify {who}";
|
|
366
|
+
readonly 'extras.recipe_dateOverdue': "The day after {date}, if {status} is not {value}, notify {who}";
|
|
367
|
+
readonly 'extras.recipe_dateStatus': "When {date} arrives, set {status} to {value}";
|
|
368
|
+
readonly 'extras.recipe_dateBeforeEmail': "{days} days before {date}, e-mail a reminder to {email}";
|
|
369
|
+
readonly 'extras.recipe_dateBeforeText': "{days} days before {date}, send a text message to {phone}";
|
|
370
|
+
readonly 'extras.recipe_everyCreate': "{every}, create a record in {table}";
|
|
371
|
+
readonly 'extras.recipe_formNotify': "When {form} is sent, notify {who}";
|
|
372
|
+
readonly 'extras.recipe_formEmail': "When {form} is sent, e-mail it to {to}";
|
|
373
|
+
readonly 'extras.recipe_everyRemind': "{every}, remind {who} to look through this table";
|
|
374
|
+
readonly 'extras.recipe_formThanks': "When a form is sent, send a thank you to {email}";
|
|
375
|
+
readonly 'extras.recipe_buttonStatus': "When {button} is pressed, set {status} to {value}";
|
|
376
|
+
readonly 'extras.recipe_buttonEmail': "When {button} is pressed, send an e-mail to {email}";
|
|
377
|
+
readonly 'extras.recipe_aiWrite': "When a record is created, AI writes {target} from {source}";
|
|
378
|
+
readonly 'extras.recipe_aiSort': "When a record is created, AI picks {status} from {source}";
|
|
379
|
+
readonly 'extras.recipe_aiFormSummary': "When a form is sent, AI sums it up in {target}";
|
|
380
|
+
readonly 'extras.recipe_aiReply': "When {status} changes to {value}, AI drafts a reply in {target}";
|
|
381
|
+
readonly 'extras.recipe_aiWeekly': "{every}, AI sums up the base and e-mails it to {to}";
|
|
382
|
+
readonly 'extras.recipe_statusEmail': "When {status} changes to {value}, send an e-mail to {email}";
|
|
383
|
+
readonly 'extras.recipe_statusText': "When {status} changes to {value}, send a text message to {phone}";
|
|
384
|
+
readonly 'extras.recipe_createdEmail': "When a record is created, e-mail {to}";
|
|
385
|
+
readonly 'extras.recipe_createdChat': "When a record is created, post it to Slack, Teams or Google Chat at {url}";
|
|
386
|
+
readonly 'extras.recipe_statusCreate': "When {status} changes to {value}, create a record in {table}";
|
|
387
|
+
readonly 'extras.recipe_createdCreate': "When a record is created, create a linked record in {table}";
|
|
388
|
+
readonly 'extras.recipe_webhookOut': "When a record is created, send it to another app at {url}";
|
|
389
|
+
readonly 'extras.recipe_webhookIn': "When another app sends data to a web address, create a record";
|
|
390
|
+
readonly 'extras.blank_select': "status";
|
|
391
|
+
readonly 'extras.blank_choice': "something";
|
|
392
|
+
readonly 'extras.blank_checkbox': "a checkbox";
|
|
393
|
+
readonly 'extras.blank_date': "date";
|
|
394
|
+
readonly 'extras.blank_days': "N";
|
|
395
|
+
readonly 'extras.blank_who': "someone";
|
|
396
|
+
readonly 'extras.blank_member': "someone";
|
|
397
|
+
readonly 'extras.blank_personField': "person";
|
|
398
|
+
readonly 'extras.blank_creator': "creator";
|
|
399
|
+
readonly 'extras.blank_emailField': "their e-mail";
|
|
400
|
+
readonly 'extras.blank_emailTo': "an address";
|
|
401
|
+
readonly 'extras.blank_phoneField': "their phone";
|
|
402
|
+
readonly 'extras.blank_textField': "a text field";
|
|
403
|
+
readonly 'extras.blank_sourceField': "a field";
|
|
404
|
+
readonly 'extras.blank_table': "a table";
|
|
405
|
+
readonly 'extras.blank_button': "a button";
|
|
406
|
+
readonly 'extras.blank_form': "a form";
|
|
407
|
+
readonly 'extras.blank_every': "Every day";
|
|
408
|
+
readonly 'extras.blank_url': "an address";
|
|
409
|
+
readonly 'extras.recipeNeeds_select': "Needs a single select field";
|
|
410
|
+
readonly 'extras.recipeNeeds_checkbox': "Needs a checkbox field";
|
|
411
|
+
readonly 'extras.recipeNeeds_date': "Needs a date field";
|
|
412
|
+
readonly 'extras.recipeNeeds_who': "Needs a person field or people in the base";
|
|
413
|
+
readonly 'extras.recipeNeeds_member': "Needs people in the base";
|
|
414
|
+
readonly 'extras.recipeNeeds_personField': "Needs a person field";
|
|
415
|
+
readonly 'extras.recipeNeeds_creator': "Needs a Created by field";
|
|
416
|
+
readonly 'extras.recipeNeeds_emailField': "Needs an e-mail field";
|
|
417
|
+
readonly 'extras.recipeNeeds_phoneField': "Needs a phone field";
|
|
418
|
+
readonly 'extras.recipeNeeds_textField': "Needs a text field";
|
|
419
|
+
readonly 'extras.recipeNeeds_sourceField': "Needs a field";
|
|
420
|
+
readonly 'extras.recipeNeeds_table': "Needs a table";
|
|
421
|
+
readonly 'extras.recipeNeeds_button': "Needs a button field";
|
|
422
|
+
readonly 'extras.recipeMsgNowIs': "{name} is now {field}";
|
|
423
|
+
readonly 'extras.recipeMsgFromTo': "{name} went from {from} to {to}";
|
|
424
|
+
readonly 'extras.recipeMsgNew': "New: {name}";
|
|
425
|
+
readonly 'extras.recipeMsgToday': "{field} is today: {name}";
|
|
426
|
+
readonly 'extras.recipeMsgSoon': "{name}: {field} is on {date}";
|
|
427
|
+
readonly 'extras.recipeMsgLate': "{name} is late: {field} was {date}";
|
|
428
|
+
readonly 'extras.recipeMsgForm': "A form was sent: {name}";
|
|
429
|
+
readonly 'extras.recipeMailReminderSubject': "Reminder: {name}";
|
|
430
|
+
readonly 'extras.recipeMailReminderBody': "Hello,\n\nA reminder about {name}: {field} is on {date}.\n\nThank you";
|
|
431
|
+
readonly 'extras.recipeTextReminder': "Reminder: {name} on {date}";
|
|
432
|
+
readonly 'extras.recipeMailThanksSubject': "Thank you, we have it";
|
|
433
|
+
readonly 'extras.recipeMailThanksBody': "Hello,\n\nThank you for writing to us. We have it ({name}) and will come back to you soon.";
|
|
434
|
+
readonly 'extras.recipeMailFormBody': "A new answer came in to {table}: {name}.";
|
|
435
|
+
readonly 'extras.recipeMsgLook': "Time to look through {table}.";
|
|
436
|
+
readonly 'extras.recipeMailButtonBody': "Hello,\n\nAbout {name}.\n\nThank you";
|
|
437
|
+
readonly 'extras.recipeMailStatusSubject': "{name}: {value}";
|
|
438
|
+
readonly 'extras.recipeMailStatusBody': "Hello,\n\n{name} is now {value}.\n\nThank you";
|
|
439
|
+
readonly 'extras.recipeTextStatus': "{name} is now {value}";
|
|
440
|
+
readonly 'extras.recipeMailNewSubject': "New: {name}";
|
|
441
|
+
readonly 'extras.recipeMailWeeklySubject': "Your summary from the base";
|
|
442
|
+
readonly 'extras.recipeAiWrite': "Write the {target} for this record in a few plain sentences, from this: {source}";
|
|
443
|
+
readonly 'extras.recipeAiSort': "Pick the {field} that fits best. Answer with exactly one of these and nothing else: {choices}. The record: {source}";
|
|
444
|
+
readonly 'extras.recipeAiSummary': "Sum up this form answer in two or three plain sentences, saying what the person wants:\n{answers}";
|
|
445
|
+
readonly 'extras.recipeAiReply': "Write a short, friendly reply to the client about {name}, from what the record says.";
|
|
446
|
+
readonly 'extras.recipeAiWeekly': "Sum up what is in this base: what is new, what is waiting and what is late. Plain words, short lines.";
|
|
316
447
|
};
|
|
@@ -1 +1,16 @@
|
|
|
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"};
|
|
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.aiBase":"Send it the whole base","extras.aiBaseHint":'The records of every table go with the prompt, for a letter about all of it ("What should I do this week?").',"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","extras.whenChangesFrom":"When a record changes from {from}","extras.whenChangesFromTo":"When a record changes from {from} to {condition}","extras.fromTitle":"Only when, before the change","extras.fromAny":"Whatever it was before the change","extras.tabCreate":"Create","extras.tabManage":"Manage","extras.gallerySearch":"Search recipes","extras.galleryCategories":"Categories","extras.galleryExplore":"Explore","extras.galleryBasics":"Start with the basics","extras.galleryNone":"No recipe has these words. Try other words, describe it with AI on Explore, or build it step by step.","extras.galleryNoneTitle":"No recipes","extras.recipeCount.one":"{count} recipe","extras.recipeCount.other":"{count} recipes","extras.cat_status":"Status changes","extras.cat_created":"New records","extras.cat_dates":"Dates and reminders","extras.cat_forms":"Forms and buttons","extras.cat_ai":"AI","extras.cat_messages":"E-mail and messages","extras.cat_records":"Other tables","extras.cat_connect":"Connect other apps","extras.fromScratch":"Create from scratch","extras.fromScratchHint":"Pick what starts it and what it does, step by step.","extras.describeCard":"Describe it with AI","extras.useRecipe":"Use template","extras.recipeTable":"In table","extras.recipeAdd":"Add automation","extras.recipeCancel":"Cancel","extras.showAll":"Show all","extras.recipeAdded":"Added and switched on. Check it here, and try it with Test.","extras.recipeFill":"Fill in the words in bold","extras.blankTheField":"the {field}","extras.blankAnyForm":"any form","extras.blankTyped":"Type it, or pick one","extras.blankMe":"me ({name})","extras.recipe_statusNotify":"When {status} changes to {value}, notify {who}","extras.recipe_statusFromTo":"When {status} changes from {from} to {value}, notify {who}","extras.recipe_statusAssign":"When {status} changes to {value}, assign {member} as {person}","extras.recipe_statusMove":"When {status} changes to {value}, set {status2} to {value2}","extras.recipe_statusStamp":"When {status} changes to {value}, set {date} to today","extras.recipe_checkboxStatus":"When {box} is checked, set {status} to {value}","extras.recipe_createdNotify":"When a record is created, notify {who}","extras.recipe_createdCreator":"When a record is created, assign {creator} as {person}","extras.recipe_createdStatus":"When a record is created, set {status} to {value}","extras.recipe_createdDue":"When a record is created, set {date} to {days} days from today","extras.recipe_dateNotify":"When {date} arrives, notify {who}","extras.recipe_dateBeforeNotify":"{days} days before {date}, notify {who}","extras.recipe_dateOverdue":"The day after {date}, if {status} is not {value}, notify {who}","extras.recipe_dateStatus":"When {date} arrives, set {status} to {value}","extras.recipe_dateBeforeEmail":"{days} days before {date}, e-mail a reminder to {email}","extras.recipe_dateBeforeText":"{days} days before {date}, send a text message to {phone}","extras.recipe_everyCreate":"{every}, create a record in {table}","extras.recipe_formNotify":"When {form} is sent, notify {who}","extras.recipe_formEmail":"When {form} is sent, e-mail it to {to}","extras.recipe_everyRemind":"{every}, remind {who} to look through this table","extras.recipe_formThanks":"When a form is sent, send a thank you to {email}","extras.recipe_buttonStatus":"When {button} is pressed, set {status} to {value}","extras.recipe_buttonEmail":"When {button} is pressed, send an e-mail to {email}","extras.recipe_aiWrite":"When a record is created, AI writes {target} from {source}","extras.recipe_aiSort":"When a record is created, AI picks {status} from {source}","extras.recipe_aiFormSummary":"When a form is sent, AI sums it up in {target}","extras.recipe_aiReply":"When {status} changes to {value}, AI drafts a reply in {target}","extras.recipe_aiWeekly":"{every}, AI sums up the base and e-mails it to {to}","extras.recipe_statusEmail":"When {status} changes to {value}, send an e-mail to {email}","extras.recipe_statusText":"When {status} changes to {value}, send a text message to {phone}","extras.recipe_createdEmail":"When a record is created, e-mail {to}","extras.recipe_createdChat":"When a record is created, post it to Slack, Teams or Google Chat at {url}","extras.recipe_statusCreate":"When {status} changes to {value}, create a record in {table}","extras.recipe_createdCreate":"When a record is created, create a linked record in {table}","extras.recipe_webhookOut":"When a record is created, send it to another app at {url}","extras.recipe_webhookIn":"When another app sends data to a web address, create a record","extras.blank_select":"status","extras.blank_choice":"something","extras.blank_checkbox":"a checkbox","extras.blank_date":"date","extras.blank_days":"N","extras.blank_who":"someone","extras.blank_member":"someone","extras.blank_personField":"person","extras.blank_creator":"creator","extras.blank_emailField":"their e-mail","extras.blank_emailTo":"an address","extras.blank_phoneField":"their phone","extras.blank_textField":"a text field","extras.blank_sourceField":"a field","extras.blank_table":"a table","extras.blank_button":"a button","extras.blank_form":"a form","extras.blank_every":"Every day","extras.blank_url":"an address","extras.recipeNeeds_select":"Needs a single select field","extras.recipeNeeds_checkbox":"Needs a checkbox field","extras.recipeNeeds_date":"Needs a date field","extras.recipeNeeds_who":"Needs a person field or people in the base","extras.recipeNeeds_member":"Needs people in the base","extras.recipeNeeds_personField":"Needs a person field","extras.recipeNeeds_creator":"Needs a Created by field","extras.recipeNeeds_emailField":"Needs an e-mail field","extras.recipeNeeds_phoneField":"Needs a phone field","extras.recipeNeeds_textField":"Needs a text field","extras.recipeNeeds_sourceField":"Needs a field","extras.recipeNeeds_table":"Needs a table","extras.recipeNeeds_button":"Needs a button field","extras.recipeMsgNowIs":"{name} is now {field}","extras.recipeMsgFromTo":"{name} went from {from} to {to}","extras.recipeMsgNew":"New: {name}","extras.recipeMsgToday":"{field} is today: {name}","extras.recipeMsgSoon":"{name}: {field} is on {date}","extras.recipeMsgLate":"{name} is late: {field} was {date}","extras.recipeMsgForm":"A form was sent: {name}","extras.recipeMailReminderSubject":"Reminder: {name}","extras.recipeMailReminderBody":`Hello,
|
|
2
|
+
|
|
3
|
+
A reminder about {name}: {field} is on {date}.
|
|
4
|
+
|
|
5
|
+
Thank you`,"extras.recipeTextReminder":"Reminder: {name} on {date}","extras.recipeMailThanksSubject":"Thank you, we have it","extras.recipeMailThanksBody":`Hello,
|
|
6
|
+
|
|
7
|
+
Thank you for writing to us. We have it ({name}) and will come back to you soon.`,"extras.recipeMailFormBody":"A new answer came in to {table}: {name}.","extras.recipeMsgLook":"Time to look through {table}.","extras.recipeMailButtonBody":`Hello,
|
|
8
|
+
|
|
9
|
+
About {name}.
|
|
10
|
+
|
|
11
|
+
Thank you`,"extras.recipeMailStatusSubject":"{name}: {value}","extras.recipeMailStatusBody":`Hello,
|
|
12
|
+
|
|
13
|
+
{name} is now {value}.
|
|
14
|
+
|
|
15
|
+
Thank you`,"extras.recipeTextStatus":"{name} is now {value}","extras.recipeMailNewSubject":"New: {name}","extras.recipeMailWeeklySubject":"Your summary from the base","extras.recipeAiWrite":"Write the {target} for this record in a few plain sentences, from this: {source}","extras.recipeAiSort":"Pick the {field} that fits best. Answer with exactly one of these and nothing else: {choices}. The record: {source}","extras.recipeAiSummary":`Sum up this form answer in two or three plain sentences, saying what the person wants:
|
|
16
|
+
{answers}`,"extras.recipeAiReply":"Write a short, friendly reply to the client about {name}, from what the record says.","extras.recipeAiWeekly":"Sum up what is in this base: what is new, what is waiting and what is late. Plain words, short lines."};
|
|
@@ -388,6 +388,10 @@ export declare const VIEWBAR_MESSAGES: {
|
|
|
388
388
|
readonly 'viewbar.dayOneWeekFromNow': "one week from now";
|
|
389
389
|
readonly 'viewbar.dayOneMonthAgo': "one month ago";
|
|
390
390
|
readonly 'viewbar.dayOneMonthFromNow': "one month from now";
|
|
391
|
+
readonly 'viewbar.dayNumberFromNow': "number of days from now";
|
|
392
|
+
readonly 'viewbar.dayNumberAgo': "number of days ago";
|
|
393
|
+
readonly 'viewbar.dayDaysFromNow': "{days} days from now";
|
|
394
|
+
readonly 'viewbar.dayDaysAgo': "{days} days ago";
|
|
391
395
|
readonly 'viewbar.spanPastWeek': "the past week";
|
|
392
396
|
readonly 'viewbar.spanPastMonth': "the past month";
|
|
393
397
|
readonly 'viewbar.spanPastYear': "the past year";
|