@svgrid/enterprise 3.1.76 → 3.1.77
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 +1 -1
- package/dist/designer/assets/{index-ZttiuDcp.js → index-zykhGYWN.js} +1 -1
- package/dist/designer/index.html +1 -1
- package/dist/fields/AutomationAction.svelte +17 -1
- package/dist/fields/AutomationGallery.svelte +18 -8
- package/dist/fields/automation-connections.d.ts +58 -0
- package/dist/fields/automation-connections.js +1 -0
- package/dist/fields/automation-outbound.d.ts +2 -0
- package/dist/fields/index.d.ts +1 -0
- package/dist/fields/index.js +1 -1
- package/dist/fields/messages/extras.d.ts +6 -0
- package/dist/fields/messages/extras.js +1 -1
- package/dist/fields/messages.svelte.d.ts +6 -0
- package/dist/node/studio.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wc/{PageEditor-uCGeOX5e.js → PageEditor-B8dNf_dV.js} +1 -1
- package/dist/wc/{embed-url-CozXxwvR.js → embed-url-WIqXrKpb.js} +1 -1
- package/dist/wc/sv-base-element.js +93 -93
- package/package.json +1 -1
|
@@ -1538,7 +1538,7 @@ ${F}
|
|
|
1538
1538
|
@keyframes st-home-spin { to { transform: rotate(360deg); } }
|
|
1539
1539
|
</style>
|
|
1540
1540
|
`}}function $S(t){for(let a of t)gs(a);let r=new Map(t.map(a=>[a.name,a])),n=t.map(a=>{let l=Pse(a,r);return{schema:jse(a,l),infos:l}});return{entries:n,seed:Use(n)}}function ID(t,r={}){let{entries:n,seed:a}=$S(t),{file:l,needs:i}=sde(n,a,r.sources,r.supabaseConn,r.serverMemory),o=[Vse(n),l];(i.supabase||r.supabaseAuth)&&!i.supabaseUrl&&(r.supabaseConn?.url||r.supabaseConn?.key)&&(i.supabaseUrl=r.supabaseConn.url,i.supabaseKey=r.supabaseConn.key),(i.supabase||r.supabaseAuth)&&o.push(dde(i));for(let s of i.sqlRoutes)o.push(Qse(s.schema,s.table,s.dialect,{access:r.accessEnabled,audit:r.auditEnabled,screenIds:r.screensByEntity?.get(s.schema.name)??[],triggers:r.triggers?.[s.schema.name],dbSchema:s.dbSchema,tenantField:r.tenantField&&r.tenantScoped?.(s.schema.name)!==!1?r.tenantField:void 0}));if(i.memoryRoutes.length){o.push(tde(i.memoryRoutes));for(let s of i.memoryRoutes)o.push(ede(s.schema,{access:r.accessEnabled,audit:r.auditEnabled,screenIds:r.screensByEntity?.get(s.schema.name)??[],triggers:r.triggers?.[s.schema.name],tenantField:r.tenantField&&r.tenantScoped?.(s.schema.name)!==!1?r.tenantField:void 0}))}return{files:o,prepared:n.map(s=>s.schema)}}function ude(t){if(t.length===0)throw Error("emitStudioApp: no schemas to emit");let{files:r,prepared:n}=ID(t),a=n.map(i=>{let o=Ua(i);return{href:`/${o.route}`,label:o.label}}),l={path:"src/custom.css",description:"Your custom styles (imported after app.css so it overrides).",userOwned:!0,contents:`/* Your custom styles. Imported after app.css, so these rules override the defaults. */
|
|
1541
|
-
`};return[...r,...n.map(i=>cde(i)),ED(a),RD(a),l]}var pde="3.1.
|
|
1541
|
+
`};return[...r,...n.map(i=>cde(i)),ED(a),RD(a),l]}var pde="3.1.77",gde="3.0.43",ml=(t,r)=>t.some(n=>n.config.kind===r),DD=t=>`activeTab_${t.replace(/[^a-zA-Z0-9_$]/g,"_")}`,ev=(t,r)=>`${t}-${r}`,ND=t=>`accOpen_${t.replace(/[^a-zA-Z0-9_$]/g,"_")}`,tv=(t,r)=>`${t}-s${r}`,rv=t=>`md_${t.replace(/[^a-zA-Z0-9]/g,"_")}_rows`;function fde(t){switch(t.type){case"number":{let r=t.decimals;return r==null?"{ type: 'number' }":`{ type: 'number', options: { minimumFractionDigits: ${r}, maximumFractionDigits: ${r} } }`}case"currency":return`{ type: 'currency', currency: ${Qr(t.currency||"USD")} }`;case"percent":{let r=["type: 'percent'"];return t.valueIsPercentPoints&&r.push("valueIsPercentPoints: true"),t.decimals!=null&&r.push(`options: { minimumFractionDigits: ${t.decimals}, maximumFractionDigits: ${t.decimals} }`),`{ ${r.join(", ")} }`}case"date":case"datetime":return t.pattern?`{ type: '${t.type}', pattern: ${Qr(t.pattern)} }`:`{ type: '${t.type}' }`}}function hde(t,r,n,a){if(r.config.kind!=="grid")return`schemaToColumns(${t})`;let l=r.config,i=r.id.replace(/-/g,"_"),o=l.columns.filter(y=>y.show),s=new Set(o.map(y=>y.field)),c=new Set,d=o.map(y=>{let w=a?.get(y.field);return{c:y,col:w&&!s.has(w)?w:y.field}}).filter(y=>!c.has(y.col)&&!!c.add(y.col)),p=l.editing==="inline"?"":", editable: false";if(d.length===0)return p?`schemaToColumns(${t}).map((c) => ({ ...c${p} }))`:`schemaToColumns(${t})`;let u=d.map(y=>`'${y.col}'`),f=d.map(({c:y,col:w})=>{let v=[];return y.header&&v.push(`header: ${JSON.stringify(y.header)}`),y.width!=null&&v.push(`width: ${y.width}`),y.align&&v.push(`align: '${y.align}'`),y.aggregate&&v.push(`aggregate: '${y.aggregate}'`),l.treeData&&y.field===l.treeData.labelField&&n?v.push(`cell: (ctx: CellContext<${n}>) => renderSnippet(treeCell_${i}, { value: ctx.getValue(), row: ctx.row.original })`):y.cellType&&n?v.push(`cell: (ctx: CellContext<${n}>) => renderSnippet(${jD(i,y.field)}, { value: ctx.getValue() })`):y.format&&v.push(`format: ${fde(y.format)}`),v.length?`'${w}': { ${v.join(", ")} }`:null}).filter(y=>!!y),b=f.length?` const ov: Record<string, Partial<(typeof all)[number]>> = { ${f.join(", ")} };`:"",h=f.length?", ...(ov[String(c.field)] ?? {})":"",S=`[${u.join(", ")}].map((f) => all.find((c) => c.field === f)).filter((c): c is (typeof all)[number] => !!c)`;return`(() => { const all = schemaToColumns(${t});${b} return ${p||h?`${S}.map((c) => ({ ...c${p}${h} }))`:S} })()`}function ic(t,r){let n=[`grid-column: span ${foe(t)}`,"min-width: 0"];r&&n.push(r);let a=moe(t.style);return a&&n.push(a),`style="${n.join("; ")}"`}var mde=t=>t&&t.replace(/[^#a-zA-Z0-9(),.%\s_-]/g,"").slice(0,40)||"var(--sg-accent)";function Lu(t,r){let n=[r,goe(t)].filter(Boolean).join(" ");return n?` class="${n}"`:""}function n1(t){let r=cS(t.className);return r?` ${r}`:""}function vde(t){let r=If(t);if(r==="grid"){let n=Roe(t),a=n.maxWidth?` max-width: ${n.maxWidth}px; margin-inline: auto;`:"";return` .st-screen { grid-template-columns: repeat(12, 1fr); gap: ${n.rowGap}px ${n.colGap}px; align-items: ${n.align};${a} }
|
|
1542
1542
|
@media (max-width: ${n.mobileBreakpoint}px) { .st-screen { grid-template-columns: 1fr; gap: 12px; } }
|
|
1543
1543
|
`}if(r==="stack"){let n=Ioe(t),a=n.maxWidth?` max-width: ${n.maxWidth}px;${n.align==="center"?" margin-inline: auto;":""}`:"",l=n.minHeight?`
|
|
1544
1544
|
.st-stack > * { min-height: ${n.minHeight}px; }`:"",i=n.dividers?`
|
|
@@ -76332,7 +76332,7 @@ ${st}
|
|
|
76332
76332
|
.st-home a { color: var(--sg-accent, #6366f1); font-weight: 600; }
|
|
76333
76333
|
@keyframes st-home-spin { to { transform: rotate(360deg); } }
|
|
76334
76334
|
</style>
|
|
76335
|
-
`}}function s2e(a){for(let p of a)G4(p);let i=new Map(a.map(p=>[p.name,p])),l=a.map(p=>{let f=kpr(p,i);return{schema:Ppr(p,f),infos:f}});return{entries:l,seed:Cpr(l)}}function rur(a,i={}){let{entries:l,seed:p}=s2e(a),{file:f,needs:g}=Ypr(l,p,i.sources,i.supabaseConn,i.serverMemory),_=[Opr(l),f];(g.supabase||i.supabaseAuth)&&!g.supabaseUrl&&(i.supabaseConn?.url||i.supabaseConn?.key)&&(g.supabaseUrl=i.supabaseConn.url,g.supabaseKey=i.supabaseConn.key),(g.supabase||i.supabaseAuth)&&_.push(Zpr(g));for(let S of g.sqlRoutes)_.push(Upr(S.schema,S.table,S.dialect,{access:i.accessEnabled,audit:i.auditEnabled,screenIds:i.screensByEntity?.get(S.schema.name)??[],triggers:i.triggers?.[S.schema.name],dbSchema:S.dbSchema,tenantField:i.tenantField&&i.tenantScoped?.(S.schema.name)!==!1?i.tenantField:void 0}));if(g.memoryRoutes.length){_.push(Hpr(g.memoryRoutes));for(let S of g.memoryRoutes)_.push(Vpr(S.schema,{access:i.accessEnabled,audit:i.auditEnabled,screenIds:i.screensByEntity?.get(S.schema.name)??[],triggers:i.triggers?.[S.schema.name],tenantField:i.tenantField&&i.tenantScoped?.(S.schema.name)!==!1?i.tenantField:void 0}))}return{files:_,prepared:l.map(S=>S.schema)}}var nur="3.1.
|
|
76335
|
+
`}}function s2e(a){for(let p of a)G4(p);let i=new Map(a.map(p=>[p.name,p])),l=a.map(p=>{let f=kpr(p,i);return{schema:Ppr(p,f),infos:f}});return{entries:l,seed:Cpr(l)}}function rur(a,i={}){let{entries:l,seed:p}=s2e(a),{file:f,needs:g}=Ypr(l,p,i.sources,i.supabaseConn,i.serverMemory),_=[Opr(l),f];(g.supabase||i.supabaseAuth)&&!g.supabaseUrl&&(i.supabaseConn?.url||i.supabaseConn?.key)&&(g.supabaseUrl=i.supabaseConn.url,g.supabaseKey=i.supabaseConn.key),(g.supabase||i.supabaseAuth)&&_.push(Zpr(g));for(let S of g.sqlRoutes)_.push(Upr(S.schema,S.table,S.dialect,{access:i.accessEnabled,audit:i.auditEnabled,screenIds:i.screensByEntity?.get(S.schema.name)??[],triggers:i.triggers?.[S.schema.name],dbSchema:S.dbSchema,tenantField:i.tenantField&&i.tenantScoped?.(S.schema.name)!==!1?i.tenantField:void 0}));if(g.memoryRoutes.length){_.push(Hpr(g.memoryRoutes));for(let S of g.memoryRoutes)_.push(Vpr(S.schema,{access:i.accessEnabled,audit:i.auditEnabled,screenIds:i.screensByEntity?.get(S.schema.name)??[],triggers:i.triggers?.[S.schema.name],tenantField:i.tenantField&&i.tenantScoped?.(S.schema.name)!==!1?i.tenantField:void 0}))}return{files:_,prepared:l.map(S=>S.schema)}}var nur="3.1.77",our="3.0.43",sb=(a,i)=>a.some(l=>l.config.kind===i),qit=a=>`activeTab_${a.replace(/[^a-zA-Z0-9_$]/g,"_")}`,XZ=(a,i)=>`${a}-${i}`,Kit=a=>`accOpen_${a.replace(/[^a-zA-Z0-9_$]/g,"_")}`,JZ=(a,i)=>`${a}-s${i}`,YZ=a=>`md_${a.replace(/[^a-zA-Z0-9]/g,"_")}_rows`;function aur(a){switch(a.type){case"number":{let i=a.decimals;return i==null?"{ type: 'number' }":`{ type: 'number', options: { minimumFractionDigits: ${i}, maximumFractionDigits: ${i} } }`}case"currency":return`{ type: 'currency', currency: ${cu(a.currency||"USD")} }`;case"percent":{let i=["type: 'percent'"];return a.valueIsPercentPoints&&i.push("valueIsPercentPoints: true"),a.decimals!=null&&i.push(`options: { minimumFractionDigits: ${a.decimals}, maximumFractionDigits: ${a.decimals} }`),`{ ${i.join(", ")} }`}case"date":case"datetime":return a.pattern?`{ type: '${a.type}', pattern: ${cu(a.pattern)} }`:`{ type: '${a.type}' }`}}function iur(a,i,l,p){if(i.config.kind!=="grid")return`schemaToColumns(${a})`;let f=i.config,g=i.id.replace(/-/g,"_"),_=f.columns.filter(be=>be.show),S=new Set(_.map(be=>be.field)),A=new Set,k=_.map(be=>{let Be=p?.get(be.field);return{c:be,col:Be&&!S.has(Be)?Be:be.field}}).filter(be=>!A.has(be.col)&&!!A.add(be.col)),L=f.editing==="inline"?"":", editable: false";if(k.length===0)return L?`schemaToColumns(${a}).map((c) => ({ ...c${L} }))`:`schemaToColumns(${a})`;let F=k.map(be=>`'${be.col}'`),ee=k.map(({c:be,col:Be})=>{let Ue=[];return be.header&&Ue.push(`header: ${JSON.stringify(be.header)}`),be.width!=null&&Ue.push(`width: ${be.width}`),be.align&&Ue.push(`align: '${be.align}'`),be.aggregate&&Ue.push(`aggregate: '${be.aggregate}'`),f.treeData&&be.field===f.treeData.labelField&&l?Ue.push(`cell: (ctx: CellContext<${l}>) => renderSnippet(treeCell_${g}, { value: ctx.getValue(), row: ctx.row.original })`):be.cellType&&l?Ue.push(`cell: (ctx: CellContext<${l}>) => renderSnippet(${est(g,be.field)}, { value: ctx.getValue() })`):be.format&&Ue.push(`format: ${aur(be.format)}`),Ue.length?`'${Be}': { ${Ue.join(", ")} }`:null}).filter(be=>!!be),J=ee.length?` const ov: Record<string, Partial<(typeof all)[number]>> = { ${ee.join(", ")} };`:"",te=ee.length?", ...(ov[String(c.field)] ?? {})":"",Ie=`[${F.join(", ")}].map((f) => all.find((c) => c.field === f)).filter((c): c is (typeof all)[number] => !!c)`;return`(() => { const all = schemaToColumns(${a});${J} return ${L||te?`${Ie}.map((c) => ({ ...c${L}${te} }))`:Ie} })()`}function eW(a,i){let l=[`grid-column: span ${yM(a)}`,"min-width: 0"];i&&l.push(i);let p=vit(a.style);return p&&l.push(p),`style="${l.join("; ")}"`}var sur=a=>a&&a.replace(/[^#a-zA-Z0-9(),.%\s_-]/g,"").slice(0,40)||"var(--sg-accent)";function z8(a,i){let l=[i,LH(a)].filter(Boolean).join(" ");return l?` class="${l}"`:""}function ofe(a){let i=WZ(a.className);return i?` ${i}`:""}function lur(a){let i=iR(a);if(i==="grid"){let l=qDe(a),p=l.maxWidth?` max-width: ${l.maxWidth}px; margin-inline: auto;`:"";return` .st-screen { grid-template-columns: repeat(12, 1fr); gap: ${l.rowGap}px ${l.colGap}px; align-items: ${l.align};${p} }
|
|
76336
76336
|
@media (max-width: ${l.mobileBreakpoint}px) { .st-screen { grid-template-columns: 1fr; gap: 12px; } }
|
|
76337
76337
|
`}if(i==="stack"){let l=que(a),p=l.maxWidth?` max-width: ${l.maxWidth}px;${l.align==="center"?" margin-inline: auto;":""}`:"",f=l.minHeight?`
|
|
76338
76338
|
.st-stack > * { min-height: ${l.minHeight}px; }`:"",g=l.dividers?`
|
package/dist/designer/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>SvGrid Studio - Designer</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-zykhGYWN.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-Dd_uD5pT.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/index-client-CwjHmKgT.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="./assets/disclose-version-xihTtKlq.js">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import{safeColor}from"./palette";import{primaryOf}from"./base-tables";import{getFieldUsers}from"./sources.svelte";import{tableFields}from"./automations.svelte";import{fieldsOf,writableFields}from"./automation-edit";import FilterPanel from"./viewbar/FilterPanel.svelte";import AutomationSteps from"./AutomationSteps.svelte";import{bm}from"./messages.svelte";let{action,automation,table,tables,serverSide=false,scriptsInPage=false,idPrefix="sv-baac",level=0,onChange}=$props();const EMPTY={kind:"fieldFilter",conjunction:"and",conditions:[]};function standIn(t){const cols=[...tableFields(t).values()];return{internalColumns:cols.map(c=>({...c.def,id:c.id})),allColumns:cols.map(c=>({id:c.id})),hiddenColumns:{}}}const TEXT_TYPES=new Set(["text","longText","richText","email","url","phone"]);const CHAT_SAMPLE={slack:"https://hooks.slack.com/services/",teams:"https://",googleChat:"https://chat.googleapis.com/v1/spaces/"};const fields=$derived(fieldsOf(table));function setValue(values,id,value){if(action.type!=="updateRecord"&&action.type!=="createRecord")return;onChange({...action,values:{...values,[id]:value}})}function dropValue(id){if(action.type!=="updateRecord"&&action.type!=="createRecord")return;const{[id]:_gone,...values}=action.values;onChange({...action,values})}function suggestions(t,c){const tokens=fields.map(f=>`{${f.header}}`);switch(c.fieldType){case"singleSelect":case"multiSelect":return(c.def.fieldProps?.options??[]).map(o=>o.value);case"user":return getFieldUsers().map(u=>u.name);case"checkbox":return["true","false"];case"date":return["today","today+1","today+7","today-1","now"];case"link":{const target=tables.find(x=>x.id===c.def.fieldProps?.table);const names=target?(target.data??[]).slice(0,50).map(r=>String(r?.[primaryOf(target)]??"")).filter(Boolean):[];return[...target?.id===table.id||c.def.fieldProps?.table===table.id?["{record}"]:[],...names]}default:return t?tokens:[]}}const placeholderOf=type=>{switch(type){case"date":return"today+7";case"checkbox":return"true";case"number":return bm("extras.numberPlaceholder");case"link":return bm("extras.linkPlaceholder");case"user":return bm("extras.userPlaceholder");default:return bm("extras.valuePlaceholder")}};const lookText=$derived(bm("extras.notifyPlaceholder",{field:fields[0]?.header??bm("extras.nameFallback")}));const around=(message,token)=>{const at=message.indexOf(`{${token}}`);return at<0?[message,""]:[message.slice(0,at),message.slice(at+token.length+2)]};function parseHeaders(text){const out={};for(const line of text.split("\n")){const at=line.indexOf(":");if(at>0)out[line.slice(0,at).trim()]=line.slice(at+1).trim()}return out}const headerText=h=>Object.entries(h??{}).map(([k,v])=>`${k}: ${v}`).join("\n");
|
|
2
|
+
import{emailSenders}from"./automation-connections";import{safeColor}from"./palette";import{primaryOf}from"./base-tables";import{getFieldUsers}from"./sources.svelte";import{tableFields}from"./automations.svelte";import{fieldsOf,writableFields}from"./automation-edit";import FilterPanel from"./viewbar/FilterPanel.svelte";import AutomationSteps from"./AutomationSteps.svelte";import{bm}from"./messages.svelte";let{action,automation,table,tables,serverSide=false,scriptsInPage=false,idPrefix="sv-baac",level=0,onChange}=$props();const EMPTY={kind:"fieldFilter",conjunction:"and",conditions:[]};function standIn(t){const cols=[...tableFields(t).values()];return{internalColumns:cols.map(c=>({...c.def,id:c.id})),allColumns:cols.map(c=>({id:c.id})),hiddenColumns:{}}}const TEXT_TYPES=new Set(["text","longText","richText","email","url","phone"]);const CHAT_SAMPLE={slack:"https://hooks.slack.com/services/",teams:"https://",googleChat:"https://chat.googleapis.com/v1/spaces/"};const fields=$derived(fieldsOf(table));const senderSource=emailSenders();let senders=$state.raw([]);$effect(()=>{if(action.type!=="email"||!senderSource)return;let live=true;Promise.resolve().then(()=>senderSource.list()).then(list=>{if(live)senders=list??[]},()=>{if(live)senders=[]});return()=>{live=false}});const sender=$derived(action.type==="email"?senders.find(s=>s.value===(action.from??""))??null:null);function setValue(values,id,value){if(action.type!=="updateRecord"&&action.type!=="createRecord")return;onChange({...action,values:{...values,[id]:value}})}function dropValue(id){if(action.type!=="updateRecord"&&action.type!=="createRecord")return;const{[id]:_gone,...values}=action.values;onChange({...action,values})}function suggestions(t,c){const tokens=fields.map(f=>`{${f.header}}`);switch(c.fieldType){case"singleSelect":case"multiSelect":return(c.def.fieldProps?.options??[]).map(o=>o.value);case"user":return getFieldUsers().map(u=>u.name);case"checkbox":return["true","false"];case"date":return["today","today+1","today+7","today-1","now"];case"link":{const target=tables.find(x=>x.id===c.def.fieldProps?.table);const names=target?(target.data??[]).slice(0,50).map(r=>String(r?.[primaryOf(target)]??"")).filter(Boolean):[];return[...target?.id===table.id||c.def.fieldProps?.table===table.id?["{record}"]:[],...names]}default:return t?tokens:[]}}const placeholderOf=type=>{switch(type){case"date":return"today+7";case"checkbox":return"true";case"number":return bm("extras.numberPlaceholder");case"link":return bm("extras.linkPlaceholder");case"user":return bm("extras.userPlaceholder");default:return bm("extras.valuePlaceholder")}};const lookText=$derived(bm("extras.notifyPlaceholder",{field:fields[0]?.header??bm("extras.nameFallback")}));const around=(message,token)=>{const at=message.indexOf(`{${token}}`);return at<0?[message,""]:[message.slice(0,at),message.slice(at+token.length+2)]};function parseHeaders(text){const out={};for(const line of text.split("\n")){const at=line.indexOf(":");if(at>0)out[line.slice(0,at).trim()]=line.slice(at+1).trim()}return out}const headerText=h=>Object.entries(h??{}).map(([k,v])=>`${k}: ${v}`).join("\n");
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
{#if action.type === 'notify'}
|
|
@@ -103,6 +103,22 @@ import{safeColor}from"./palette";import{primaryOf}from"./base-tables";import{get
|
|
|
103
103
|
<div class="sv-baac-row"><span class="sv-baac-label">{bm('extras.to')}</span><input class="sv-fvb-input" aria-label={bm('extras.to')} value={action.to} placeholder={bm('extras.toPlaceholder')} onchange={(e) => onChange({ ...action, to: e.currentTarget.value })} /></div>
|
|
104
104
|
<div class="sv-baac-row"><span class="sv-baac-label">{bm('extras.subject')}</span><input class="sv-fvb-input" aria-label={bm('extras.subject')} value={action.subject} onchange={(e) => onChange({ ...action, subject: e.currentTarget.value })} /></div>
|
|
105
105
|
<textarea class="sv-fvb-input sv-baac-text" aria-label={bm('extras.emailText')} rows="3" value={action.body} onchange={(e) => onChange({ ...action, body: e.currentTarget.value })}></textarea>
|
|
106
|
+
{#if senders.length > 1}
|
|
107
|
+
<div class="sv-baac-row">
|
|
108
|
+
<span class="sv-baac-label">{bm('extras.sendFrom')}</span>
|
|
109
|
+
<select class="sv-fvb-select" aria-label={bm('extras.sendFrom')} value={action.from ?? ''} onchange={(e) => {
|
|
110
|
+
const from = e.currentTarget.value
|
|
111
|
+
const next = { ...action, from }
|
|
112
|
+
if (!from) delete next.from
|
|
113
|
+
onChange(next)
|
|
114
|
+
}}>
|
|
115
|
+
{#each senders as s (s.value)}<option value={s.value}>{s.label}{s.ready ? '' : bm('extras.senderNotReady')}</option>{/each}
|
|
116
|
+
</select>
|
|
117
|
+
</div>
|
|
118
|
+
{#if sender && !sender.ready}
|
|
119
|
+
<p class="sv-baac-hint sv-baac-bad sv-baac-sender">{sender.note || bm('extras.senderNotReadyHint')}{#if senderSource?.setup}{' '}<a href={senderSource.setup}>{bm('extras.senderSetUp')}</a>{/if}</p>
|
|
120
|
+
{/if}
|
|
121
|
+
{/if}
|
|
106
122
|
{:else if action.type === 'chat'}
|
|
107
123
|
<div class="sv-baac-row">
|
|
108
124
|
<span class="sv-baac-label">{bm('extras.chatApp')}</span>
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import{RECIPES,RECIPE_CATEGORIES,TYPED,blankOptions,blankWord,buildRecipe,missingWords,recipeFilled,recipeMissing,recipeParts,recipeStart,recipeText}from"./automation-recipes";import{bm,bmCount}from"./messages.svelte";let{tables,newId,onAdd,onScratch,describe,featured=[],startTable}=$props();let category=$state("explore");let search=$state("");const fitting=r=>tables.filter(t=>!recipeMissing(r,t,tables));const missing=r=>fitting(r).length?null:tables[0]?recipeMissing(r,tables[0],tables):"table";const ordered=$derived([...RECIPES].sort((a,b)=>Number(!!missing(a))-Number(!!missing(b))));const basics=$derived.by(()=>{const first=featured.map(id=>RECIPES.find(r=>r.id===id)).filter(r=>!!r);const usable=ordered.filter(r=>!first.includes(r)&&!missing(r));const rest=[...usable.filter(r=>r.basic),...usable.filter(r=>!r.basic)];return[...first,...rest].slice(0,describe?6:7)});const words=r=>recipeText(r).toLocaleLowerCase();const found=$derived.by(()=>{const q=search.trim().toLocaleLowerCase();if(!q)return[];const parts=q.split(/\s+/);return ordered.filter(r=>{const text=words(r)+" "+r.categories.map(c=>bm(`extras.cat_${c}`)).join(" ").toLocaleLowerCase();return parts.every(p=>text.includes(p))})});const inCategory=c=>ordered.filter(r=>r.categories.includes(c));let main=$state(null);function show(c){category=c;search="";if(main)main.scrollTop=0}const isUrl=v=>/^https?:\/\/[^\s/]+\.[^\s]+$/i.test(v.trim());const ready=(r,v)=>recipeFilled(r,v)&&r.blanks.every(b=>b.kind!=="url"||isUrl(v[b.name]??""));let using=$state(null);let usingTable=$state("");let values=$state({});let dialog=$state(null);let opener=null;function use(r,e){opener=e.currentTarget;const fits=fitting(r);const t=fits.find(x=>x.id===startTable)??fits[0];if(!t)return;using=r;usingTable=t.id;values=recipeStart(r,t,tables);queueMicrotask(()=>dialog?.querySelector("select, input, button")?.focus())}function close(){using=null;opener?.focus()}const table=$derived(tables.find(t=>t.id===usingTable));function setTable(id){const t=tables.find(x=>x.id===id);if(!t||!using)return;usingTable=id;values=recipeStart(using,t,tables)}function setValue(b,value){if(!using||!table)return;const next={...values,[b.name]:value};for(const x of using.blanks){if(x.kind==="choice"&&x.of===b.name)next[x.name]=blankOptions(x,table,tables,next)[0]?.value??""}values=next}function add(){if(!using||!table||!ready(using,values))return;const a=buildRecipe(using,table,tables,$state.snapshot(values),newId(table));using=null;onAdd(table.id,a)}const ICON={status:"M4 12l5 5L20 6",created:"M12 5v14M5 12h14",dates:"M4 6h16v14H4zM4 10h16M8 3v4M16 3v4",forms:"M5 4h14v16H5zM8 9h8M8 13h8M8 17h5",ai:"M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z",messages:"M3 6h18v12H3zM3 7l9 6 9-6",records:"M4 4h7v7H4zM13 13h7v7h-7zM11 7.5h4.5V13",explore:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM15.5 8.5l-2 5-5 2 2-5z",connect:"M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1"};
|
|
2
|
+
import{RECIPES,RECIPE_CATEGORIES,TYPED,blankOptions,blankWord,buildRecipe,missingWords,recipeFilled,recipeMissing,recipeParts,recipeStart,recipeText}from"./automation-recipes";import{bm,bmCount}from"./messages.svelte";import{automationConnections}from"./automation-connections";let{tables,newId,onAdd,onScratch,describe,featured=[],startTable}=$props();let category=$state("explore");let search=$state("");const fitting=r=>tables.filter(t=>!recipeMissing(r,t,tables));const missing=r=>fitting(r).length?null:tables[0]?recipeMissing(r,tables[0],tables):"table";const ordered=$derived([...RECIPES].sort((a,b)=>Number(!!missing(a))-Number(!!missing(b))));const basics=$derived.by(()=>{const first=featured.map(id=>RECIPES.find(r=>r.id===id)).filter(r=>!!r);const usable=ordered.filter(r=>!first.includes(r)&&!missing(r));const rest=[...usable.filter(r=>r.basic),...usable.filter(r=>!r.basic)];return[...first,...rest].slice(0,describe?6:7)});const words=r=>recipeText(r).toLocaleLowerCase();const found=$derived.by(()=>{const q=search.trim().toLocaleLowerCase();if(!q)return[];const parts=q.split(/\s+/);return ordered.filter(r=>{const text=words(r)+" "+r.categories.map(c=>bm(`extras.cat_${c}`)).join(" ").toLocaleLowerCase();return parts.every(p=>text.includes(p))})});const inCategory=c=>ordered.filter(r=>r.categories.includes(c));const links=automationConnections();const countOf=c=>inCategory(c).length+(c==="connect"?links.length:0);let main=$state(null);function show(c){category=c;search="";if(main)main.scrollTop=0}const isUrl=v=>/^https?:\/\/[^\s/]+\.[^\s]+$/i.test(v.trim());const ready=(r,v)=>recipeFilled(r,v)&&r.blanks.every(b=>b.kind!=="url"||isUrl(v[b.name]??""));let using=$state(null);let usingTable=$state("");let values=$state({});let dialog=$state(null);let opener=null;function use(r,e){opener=e.currentTarget;const fits=fitting(r);const t=fits.find(x=>x.id===startTable)??fits[0];if(!t)return;using=r;usingTable=t.id;values=recipeStart(r,t,tables);queueMicrotask(()=>dialog?.querySelector("select, input, button")?.focus())}function close(){using=null;opener?.focus()}const table=$derived(tables.find(t=>t.id===usingTable));function setTable(id){const t=tables.find(x=>x.id===id);if(!t||!using)return;usingTable=id;values=recipeStart(using,t,tables)}function setValue(b,value){if(!using||!table)return;const next={...values,[b.name]:value};for(const x of using.blanks){if(x.kind==="choice"&&x.of===b.name)next[x.name]=blankOptions(x,table,tables,next)[0]?.value??""}values=next}function add(){if(!using||!table||!ready(using,values))return;const a=buildRecipe(using,table,tables,$state.snapshot(values),newId(table));using=null;onAdd(table.id,a)}const ICON={status:"M4 12l5 5L20 6",created:"M12 5v14M5 12h14",dates:"M4 6h16v14H4zM4 10h16M8 3v4M16 3v4",forms:"M5 4h14v16H5zM8 9h8M8 13h8M8 17h5",ai:"M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z",messages:"M3 6h18v12H3zM3 7l9 6 9-6",records:"M4 4h7v7H4zM13 13h7v7h-7zM11 7.5h4.5V13",explore:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zM15.5 8.5l-2 5-5 2 2-5z",connect:"M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1"};
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
{#snippet mark(kind: string)}
|
|
6
6
|
<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d={ICON[kind as RecipeCategory] ?? ICON.status} fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
7
7
|
{/snippet}
|
|
8
8
|
|
|
9
|
+
{#snippet linkCard(l: AutomationConnection)}
|
|
10
|
+
<article class="sv-bag-card is-link" data-connection={l.id}>
|
|
11
|
+
<span class="sv-bag-icon" data-cat="connect">{@render mark(l.icon === 'calendar' ? 'dates' : l.icon === 'mail' ? 'messages' : 'connect')}</span>
|
|
12
|
+
<p class="sv-bag-sentence"><b>{l.title}</b><br />{l.text}</p>
|
|
13
|
+
{#if l.connected}<p class="sv-bag-on">✓ {bm('extras.connectConnected')}</p>{/if}
|
|
14
|
+
<button type="button" class="sv-bag-use" onclick={() => l.open()}>{l.action || bm('extras.connectSetUp')}</button>
|
|
15
|
+
</article>
|
|
16
|
+
{/snippet}
|
|
17
|
+
|
|
9
18
|
{#snippet card(r: Recipe, cat?: RecipeCategory)}
|
|
10
19
|
{@const lacks = missing(r)}
|
|
11
20
|
{@const kind = cat && r.categories.includes(cat) ? cat : r.categories[0]!}
|
|
@@ -30,7 +39,7 @@ import{RECIPES,RECIPE_CATEGORIES,TYPED,blankOptions,blankWord,buildRecipe,missin
|
|
|
30
39
|
</button>
|
|
31
40
|
{#each RECIPE_CATEGORIES as c (c)}
|
|
32
41
|
<button type="button" class="sv-bag-cat" class:is-on={category === c && !search} aria-current={category === c && !search ? 'true' : undefined} onclick={() => show(c)}>
|
|
33
|
-
<span class="sv-bag-cat-icon" data-cat={c}>{@render mark(c)}</span>{bm(`extras.cat_${c}` as BaseMessageKey)}<span class="sv-bag-n">{
|
|
42
|
+
<span class="sv-bag-cat-icon" data-cat={c}>{@render mark(c)}</span>{bm(`extras.cat_${c}` as BaseMessageKey)}<span class="sv-bag-n">{countOf(c)}</span>
|
|
34
43
|
</button>
|
|
35
44
|
{/each}
|
|
36
45
|
</nav>
|
|
@@ -76,19 +85,20 @@ import{RECIPES,RECIPE_CATEGORIES,TYPED,blankOptions,blankWord,buildRecipe,missin
|
|
|
76
85
|
</section>
|
|
77
86
|
{#each RECIPE_CATEGORIES as c (c)}
|
|
78
87
|
{@const list = inCategory(c)}
|
|
88
|
+
{@const own = c === 'connect' ? links.slice(0, 4) : []}
|
|
79
89
|
<section class="sv-bag-section">
|
|
80
90
|
<h3>
|
|
81
91
|
{bm(`extras.cat_${c}` as BaseMessageKey)}
|
|
82
|
-
<span class="sv-bag-count">· {bmCount('extras.recipeCount',
|
|
83
|
-
{#if
|
|
92
|
+
<span class="sv-bag-count">· {bmCount('extras.recipeCount', countOf(c))}</span>
|
|
93
|
+
{#if countOf(c) > 4}<button type="button" class="sv-bag-all" onclick={() => show(c)}>{bm('extras.showAll')} ›</button>{/if}
|
|
84
94
|
</h3>
|
|
85
|
-
<div class="sv-bag-cards">{#each list.slice(0, 4) as r (r.id)}{@render card(r, c)}{/each}</div>
|
|
95
|
+
<div class="sv-bag-cards">{#each own as l (l.id)}{@render linkCard(l)}{/each}{#each list.slice(0, 4 - own.length) as r (r.id)}{@render card(r, c)}{/each}</div>
|
|
86
96
|
</section>
|
|
87
97
|
{/each}
|
|
88
98
|
{:else}
|
|
89
99
|
<section class="sv-bag-section">
|
|
90
|
-
<h3>{bm(`extras.cat_${category}` as BaseMessageKey)} <span class="sv-bag-count">· {bmCount('extras.recipeCount',
|
|
91
|
-
<div class="sv-bag-cards">{#each inCategory(category) as r (r.id)}{@render card(r, category)}{/each}</div>
|
|
100
|
+
<h3>{bm(`extras.cat_${category}` as BaseMessageKey)} <span class="sv-bag-count">· {bmCount('extras.recipeCount', countOf(category))}</span></h3>
|
|
101
|
+
<div class="sv-bag-cards">{#if category === 'connect'}{#each links as l (l.id)}{@render linkCard(l)}{/each}{/if}{#each inCategory(category) as r (r.id)}{@render card(r, category)}{/each}</div>
|
|
92
102
|
</section>
|
|
93
103
|
{/if}
|
|
94
104
|
</div>
|
|
@@ -148,5 +158,5 @@ import{RECIPES,RECIPE_CATEGORIES,TYPED,blankOptions,blankWord,buildRecipe,missin
|
|
|
148
158
|
</div>
|
|
149
159
|
|
|
150
160
|
<style>
|
|
151
|
-
.sv-bag{position:relative;display:grid;grid-template-columns:230px minmax(0,1fr);min-height:0;height:100%;font-size:13px;color:var(--sg-fg, #0f172a);background:var(--sg-bg, #fff)}.sv-bag-side{display:flex;flex-direction:column;gap:2px;padding:16px 10px;overflow:auto;border-right:1px solid var(--sg-border, #e2e8f0);background:color-mix(in srgb,var(--sg-fg, #0f172a) 2%,var(--sg-bg, #fff))}.sv-bag-side h2{margin:0 8px 10px;font-size:15px}.sv-bag-cat{display:flex;align-items:center;gap:8px;padding:7px 8px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.sv-bag-cat:hover{background:color-mix(in srgb,var(--sg-fg, #0f172a) 5%,transparent)}.sv-bag-cat.is-on{background:color-mix(in srgb,var(--sg-accent, #2563eb) 14%,transparent);font-weight:600}.sv-bag-cat-icon{display:inline-flex;color:var(--sg-muted, #64748b)}.sv-bag-n{margin-left:auto;font-size:11px;color:var(--sg-muted, #64748b)}.sv-bag-main{min-width:0;min-height:0;overflow:auto;padding:18px 24px 40px}.sv-bag-find{position:relative;display:block;max-width:720px}.sv-bag-find svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--sg-muted, #64748b);pointer-events:none}.sv-bag-search{width:100%;box-sizing:border-box;height:38px;padding-left:34px}.sv-bag-none{display:grid;justify-items:start;gap:12px;max-width:520px;color:var(--sg-muted, #64748b)}.sv-bag-none p{margin:0;line-height:1.5}.sv-bag-section{margin-top:22px}.sv-bag-section h3{display:flex;align-items:baseline;gap:8px;margin:0 0 12px;font-size:18px;font-weight:600}.sv-bag-count{font-size:13px;font-weight:400;color:var(--sg-muted, #64748b)}.sv-bag-all{padding:0;border:0;background:none;color:var(--sg-accent, #2563eb);font:inherit;font-size:13px;font-weight:500;cursor:pointer}.sv-bag-all:hover{text-decoration:underline}.sv-bag-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}.sv-bag-card{display:flex;flex-direction:column;gap:10px;min-height:170px;padding:14px 16px;border:1px solid var(--sg-border, #e2e8f0);border-radius:12px;background:var(--sg-bg, #fff);box-shadow:0 1px 2px #0f172a0f;box-sizing:border-box}.sv-bag-card{transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.sv-bag-card:not(.is-off):hover{border-color:color-mix(in srgb,var(--sg-accent, #2563eb) 45%,var(--sg-border, #e2e8f0));box-shadow:0 6px 18px color-mix(in srgb,var(--sg-accent, #2563eb) 12%,transparent);transform:translateY(-1px)}@media(prefers-reduced-motion:reduce){.sv-bag-card{transition:none}.sv-bag-card:not(.is-off):hover{transform:none}}.sv-bag-card.is-off{opacity:.7}.sv-bag-icon{display:inline-flex;align-self:flex-start;padding:6px;border-radius:8px;color:var(--sg-accent, #2563eb);background:color-mix(in srgb,var(--sg-accent, #2563eb) 12%,transparent)}[data-cat=dates]{color:#d97706;background:color-mix(in srgb,#d97706 12%,transparent)}[data-cat=ai]{color:#7c3aed;background:color-mix(in srgb,#7c3aed 12%,transparent)}[data-cat=messages],[data-cat=connect]{color:#0d9488;background:color-mix(in srgb,#0d9488 12%,transparent)}[data-cat=forms],[data-cat=records]{color:#db2777;background:color-mix(in srgb,#db2777 12%,transparent)}.sv-bag-cat-icon[data-cat]{background:none}.sv-bag-sentence{flex:1;margin:0;font-size:15px;line-height:1.45;color:color-mix(in srgb,var(--sg-fg, #0f172a) 75%,transparent)}.sv-bag-sentence b{color:var(--sg-fg, #0f172a);font-weight:650}.sv-bag-use{height:32px;border:1px solid var(--sg-border, #cbd5e1);border-radius:8px;background:none;color:inherit;font:inherit;cursor:pointer}.sv-bag-use:hover,.sv-bag-use:focus-visible{border-color:var(--sg-accent, #2563eb);color:var(--sg-accent, #2563eb)}.sv-bag-needs{margin:0;font-size:12px;color:var(--sg-muted, #64748b)}.sv-bag-card.is-start{padding:0}.sv-bag-card.is-ai{padding:14px 16px;gap:8px}.sv-bag-card.is-ai :global(label){font-size:15px}.sv-bag-card.is-ai :global(.sv-bap-describe){border-bottom:0;padding-bottom:0}.sv-bag-card.is-ai :global(textarea){min-height:56px}.sv-bag-scratch{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:14px;border:0;border-radius:12px;background:none;color:inherit;font:inherit;cursor:pointer;text-align:center}.sv-bag-scratch:hover{background:color-mix(in srgb,var(--sg-accent, #2563eb) 5%,transparent)}.sv-bag-plus{font-size:34px;line-height:1;font-weight:300}.sv-bag-scratch-title{font-size:16px}.sv-bag-scratch-hint{font-size:12px;color:var(--sg-muted, #64748b)}.sv-bag-empty{margin:0;color:var(--sg-muted, #64748b)}.sv-bag-veil{position:absolute;inset:0;z-index:5;display:grid;place-items:start center;padding-top:70px;background:color-mix(in srgb,var(--sg-fg, #0f172a) 25%,transparent)}.sv-bag-dialog{width:min(640px,calc(100% - 32px));display:grid;gap:14px;padding:20px 22px;border-radius:14px;background:var(--sg-bg, #fff);box-shadow:0 20px 50px #0f172a40}.sv-bag-dialog h3{margin:0;font-size:15px;color:var(--sg-muted, #64748b);font-weight:600}.sv-bag-table{display:flex;align-items:center;gap:8px}.sv-bag-table span{color:var(--sg-muted, #64748b);white-space:nowrap}.sv-bag-table select{width:auto;max-width:100%}.sv-bag-fill{margin:0;font-size:18px;line-height:2.1}.sv-bag-blank{height:34px;max-width:100%;margin:0 2px;padding:0 8px;border:0;border-bottom:2px solid var(--sg-accent, #2563eb);border-radius:6px 6px 0 0;background:color-mix(in srgb,var(--sg-accent, #2563eb) 9%,transparent);color:var(--sg-fg, #0f172a);font:inherit;font-size:16px;font-weight:600;vertical-align:baseline}.sv-bag-blank.is-days{width:70px}.sv-bag-blank.is-url{width:min(360px,100%);font-weight:400}.sv-bag-blank.is-typed{width:min(260px,100%)}.sv-bag-actions{display:flex;justify-content:flex-end;gap:10px}.sv-bag-actions button:disabled{opacity:.45;cursor:default}.sv-bag-dialog form{display:grid;gap:14px}@media(max-width:720px){.sv-bag{grid-template-columns:minmax(0,1fr);height:auto}.sv-bag-side{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;padding:8px 10px;border-right:0;border-bottom:1px solid var(--sg-border, #e2e8f0);scrollbar-width:none}.sv-bag-cat{flex:none;white-space:nowrap}.sv-bag-side h2{display:none}.sv-bag-main{padding:14px}.sv-bag-card{min-height:0}.sv-bag-scratch{padding:18px 14px}}
|
|
161
|
+
.sv-bag{position:relative;display:grid;grid-template-columns:230px minmax(0,1fr);min-height:0;height:100%;font-size:13px;color:var(--sg-fg, #0f172a);background:var(--sg-bg, #fff)}.sv-bag-side{display:flex;flex-direction:column;gap:2px;padding:16px 10px;overflow:auto;border-right:1px solid var(--sg-border, #e2e8f0);background:color-mix(in srgb,var(--sg-fg, #0f172a) 2%,var(--sg-bg, #fff))}.sv-bag-side h2{margin:0 8px 10px;font-size:15px}.sv-bag-cat{display:flex;align-items:center;gap:8px;padding:7px 8px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.sv-bag-cat:hover{background:color-mix(in srgb,var(--sg-fg, #0f172a) 5%,transparent)}.sv-bag-cat.is-on{background:color-mix(in srgb,var(--sg-accent, #2563eb) 14%,transparent);font-weight:600}.sv-bag-cat-icon{display:inline-flex;color:var(--sg-muted, #64748b)}.sv-bag-n{margin-left:auto;font-size:11px;color:var(--sg-muted, #64748b)}.sv-bag-main{min-width:0;min-height:0;overflow:auto;padding:18px 24px 40px}.sv-bag-find{position:relative;display:block;max-width:720px}.sv-bag-find svg{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--sg-muted, #64748b);pointer-events:none}.sv-bag-search{width:100%;box-sizing:border-box;height:38px;padding-left:34px}.sv-bag-none{display:grid;justify-items:start;gap:12px;max-width:520px;color:var(--sg-muted, #64748b)}.sv-bag-none p{margin:0;line-height:1.5}.sv-bag-section{margin-top:22px}.sv-bag-section h3{display:flex;align-items:baseline;gap:8px;margin:0 0 12px;font-size:18px;font-weight:600}.sv-bag-count{font-size:13px;font-weight:400;color:var(--sg-muted, #64748b)}.sv-bag-all{padding:0;border:0;background:none;color:var(--sg-accent, #2563eb);font:inherit;font-size:13px;font-weight:500;cursor:pointer}.sv-bag-all:hover{text-decoration:underline}.sv-bag-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}.sv-bag-card{display:flex;flex-direction:column;gap:10px;min-height:170px;padding:14px 16px;border:1px solid var(--sg-border, #e2e8f0);border-radius:12px;background:var(--sg-bg, #fff);box-shadow:0 1px 2px #0f172a0f;box-sizing:border-box}.sv-bag-card{transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.sv-bag-card:not(.is-off):hover{border-color:color-mix(in srgb,var(--sg-accent, #2563eb) 45%,var(--sg-border, #e2e8f0));box-shadow:0 6px 18px color-mix(in srgb,var(--sg-accent, #2563eb) 12%,transparent);transform:translateY(-1px)}@media(prefers-reduced-motion:reduce){.sv-bag-card{transition:none}.sv-bag-card:not(.is-off):hover{transform:none}}.sv-bag-card.is-off{opacity:.7}.sv-bag-icon{display:inline-flex;align-self:flex-start;padding:6px;border-radius:8px;color:var(--sg-accent, #2563eb);background:color-mix(in srgb,var(--sg-accent, #2563eb) 12%,transparent)}[data-cat=dates]{color:#d97706;background:color-mix(in srgb,#d97706 12%,transparent)}[data-cat=ai]{color:#7c3aed;background:color-mix(in srgb,#7c3aed 12%,transparent)}[data-cat=messages],[data-cat=connect]{color:#0d9488;background:color-mix(in srgb,#0d9488 12%,transparent)}[data-cat=forms],[data-cat=records]{color:#db2777;background:color-mix(in srgb,#db2777 12%,transparent)}.sv-bag-cat-icon[data-cat]{background:none}.sv-bag-sentence{flex:1;margin:0;font-size:15px;line-height:1.45;color:color-mix(in srgb,var(--sg-fg, #0f172a) 75%,transparent)}.sv-bag-sentence b{color:var(--sg-fg, #0f172a);font-weight:650}.sv-bag-use{height:32px;border:1px solid var(--sg-border, #cbd5e1);border-radius:8px;background:none;color:inherit;font:inherit;cursor:pointer}.sv-bag-use:hover,.sv-bag-use:focus-visible{border-color:var(--sg-accent, #2563eb);color:var(--sg-accent, #2563eb)}.sv-bag-needs{margin:0;font-size:12px;color:var(--sg-muted, #64748b)}.sv-bag-card.is-link .sv-bag-sentence{font-size:14px}.sv-bag-card.is-link .sv-bag-sentence b{display:inline-block;margin-bottom:4px;font-size:15px}.sv-bag-on{margin:0;font-size:12px;font-weight:600;color:var(--sg-success, #16a34a)}.sv-bag-card.is-start{padding:0}.sv-bag-card.is-ai{padding:14px 16px;gap:8px}.sv-bag-card.is-ai :global(label){font-size:15px}.sv-bag-card.is-ai :global(.sv-bap-describe){border-bottom:0;padding-bottom:0}.sv-bag-card.is-ai :global(textarea){min-height:56px}.sv-bag-scratch{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:14px;border:0;border-radius:12px;background:none;color:inherit;font:inherit;cursor:pointer;text-align:center}.sv-bag-scratch:hover{background:color-mix(in srgb,var(--sg-accent, #2563eb) 5%,transparent)}.sv-bag-plus{font-size:34px;line-height:1;font-weight:300}.sv-bag-scratch-title{font-size:16px}.sv-bag-scratch-hint{font-size:12px;color:var(--sg-muted, #64748b)}.sv-bag-empty{margin:0;color:var(--sg-muted, #64748b)}.sv-bag-veil{position:absolute;inset:0;z-index:5;display:grid;place-items:start center;padding-top:70px;background:color-mix(in srgb,var(--sg-fg, #0f172a) 25%,transparent)}.sv-bag-dialog{width:min(640px,calc(100% - 32px));display:grid;gap:14px;padding:20px 22px;border-radius:14px;background:var(--sg-bg, #fff);box-shadow:0 20px 50px #0f172a40}.sv-bag-dialog h3{margin:0;font-size:15px;color:var(--sg-muted, #64748b);font-weight:600}.sv-bag-table{display:flex;align-items:center;gap:8px}.sv-bag-table span{color:var(--sg-muted, #64748b);white-space:nowrap}.sv-bag-table select{width:auto;max-width:100%}.sv-bag-fill{margin:0;font-size:18px;line-height:2.1}.sv-bag-blank{height:34px;max-width:100%;margin:0 2px;padding:0 8px;border:0;border-bottom:2px solid var(--sg-accent, #2563eb);border-radius:6px 6px 0 0;background:color-mix(in srgb,var(--sg-accent, #2563eb) 9%,transparent);color:var(--sg-fg, #0f172a);font:inherit;font-size:16px;font-weight:600;vertical-align:baseline}.sv-bag-blank.is-days{width:70px}.sv-bag-blank.is-url{width:min(360px,100%);font-weight:400}.sv-bag-blank.is-typed{width:min(260px,100%)}.sv-bag-actions{display:flex;justify-content:flex-end;gap:10px}.sv-bag-actions button:disabled{opacity:.45;cursor:default}.sv-bag-dialog form{display:grid;gap:14px}@media(max-width:720px){.sv-bag{grid-template-columns:minmax(0,1fr);height:auto}.sv-bag-side{flex-direction:row;flex-wrap:nowrap;overflow-x:auto;padding:8px 10px;border-right:0;border-bottom:1px solid var(--sg-border, #e2e8f0);scrollbar-width:none}.sv-bag-cat{flex:none;white-space:nowrap}.sv-bag-side h2{display:none}.sv-bag-main{padding:14px}.sv-bag-card{min-height:0}.sv-bag-scratch{padding:18px 14px}}
|
|
152
162
|
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an app connects automations to, beyond the base: where an e-mail step
|
|
3
|
+
* can send from, and other apps it links tables to.
|
|
4
|
+
*
|
|
5
|
+
* setEmailSenders({
|
|
6
|
+
* list: async () => [
|
|
7
|
+
* { value: '', label: 'Our app (replies come to you)', ready: true },
|
|
8
|
+
* { value: 'outlook', label: 'Your Outlook', ready: false, note: 'Allow sending first.' },
|
|
9
|
+
* ],
|
|
10
|
+
* setup: '/settings/mail',
|
|
11
|
+
* })
|
|
12
|
+
*
|
|
13
|
+
* The e-mail step then shows "Send from" with these choices; the one picked is
|
|
14
|
+
* the step's `from` (empty: the first). One not ready yet shows its note and a
|
|
15
|
+
* link to `setup`. Without senders (the default) there is no "Send from".
|
|
16
|
+
*
|
|
17
|
+
* setAutomationConnections([
|
|
18
|
+
* { id: 'outlook', title: 'Outlook calendar', text: 'Records with a date are events, both ways.', icon: 'calendar', open: () => ... },
|
|
19
|
+
* ])
|
|
20
|
+
*
|
|
21
|
+
* The Automations page's Create tab lists them as cards in "Connect other
|
|
22
|
+
* apps" (and first in Explore's), each with the app's own button.
|
|
23
|
+
*/
|
|
24
|
+
export type EmailSender = {
|
|
25
|
+
/** The step's `from`: '' for the app's own way. */
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
/** Whether it can send now; one that cannot is offered with its note. */
|
|
29
|
+
ready: boolean;
|
|
30
|
+
/** What to do before it can (shown when it is picked and not ready). */
|
|
31
|
+
note?: string;
|
|
32
|
+
};
|
|
33
|
+
export type EmailSenders = {
|
|
34
|
+
list: () => ReadonlyArray<EmailSender> | Promise<ReadonlyArray<EmailSender>>;
|
|
35
|
+
/** Where the senders are set up: the link beside a note. */
|
|
36
|
+
setup?: string;
|
|
37
|
+
};
|
|
38
|
+
/** The app's senders for the e-mail step's "Send from", or `null` for none. */
|
|
39
|
+
export declare function setEmailSenders(value: EmailSenders | null): void;
|
|
40
|
+
/** The senders set, if any. */
|
|
41
|
+
export declare function emailSenders(): EmailSenders | null;
|
|
42
|
+
export type AutomationConnection = {
|
|
43
|
+
id: string;
|
|
44
|
+
title: string;
|
|
45
|
+
/** One line on what it does for the person. */
|
|
46
|
+
text: string;
|
|
47
|
+
icon?: 'calendar' | 'mail' | 'link';
|
|
48
|
+
/** The card's button, "Set up" when left out. */
|
|
49
|
+
action?: string;
|
|
50
|
+
/** Whether it is set up already (the card says so). */
|
|
51
|
+
connected?: boolean;
|
|
52
|
+
/** Opens the app's own setup for it. */
|
|
53
|
+
open: () => void;
|
|
54
|
+
};
|
|
55
|
+
/** The app's connections for the Create tab, or `[]` for none. */
|
|
56
|
+
export declare function setAutomationConnections(list: ReadonlyArray<AutomationConnection> | null): void;
|
|
57
|
+
/** The connections set. */
|
|
58
|
+
export declare function automationConnections(): ReadonlyArray<AutomationConnection>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=null;export function setEmailSenders(n){t=n}export function emailSenders(){return t}let e=[];export function setAutomationConnections(n){e=n??[]}export function automationConnections(){return e}
|
|
@@ -23,11 +23,13 @@ export type WebhookAction = {
|
|
|
23
23
|
body?: string;
|
|
24
24
|
};
|
|
25
25
|
/** An email, sent by the server runner's `sendEmail`. */
|
|
26
|
+
/** `from`: where it goes out from, one of the app's senders (setEmailSenders); empty, the app's own way. */
|
|
26
27
|
export type EmailAction = {
|
|
27
28
|
type: 'email';
|
|
28
29
|
to: string;
|
|
29
30
|
subject: string;
|
|
30
31
|
body: string;
|
|
32
|
+
from?: string;
|
|
31
33
|
};
|
|
32
34
|
/**
|
|
33
35
|
* A text message to phones, sent by the server runner's `sendText` (your SMS
|
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 { setEmailSenders, setAutomationConnections, type EmailSender, type EmailSenders, type AutomationConnection } from './automation-connections.js';
|
|
41
42
|
export { RECIPES, buildRecipe, recipeStart, recipeMissing, recipeText, type Recipe, type RecipeValues } from './automation-recipes.js';
|
|
42
43
|
export { setRecordSeries, refreshRecordSeries, type RecordSeries, type SeriesOccurrence, type SeriesScope } from './record-series.svelte.js';
|
|
43
44
|
export { cronWords } from './cron-words.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 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";
|
|
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 E,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 Ee from"./RichTextEditor.svelte";import ke 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 k}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{setEmailSenders,setAutomationConnections}from"./automation-connections.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=k()?.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)E(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?E(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:Ee,props:r}),f("fieldVote",{component:ke,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(()=>k()?.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";
|
|
@@ -345,6 +345,12 @@ export declare const EXTRAS_MESSAGES: {
|
|
|
345
345
|
readonly 'extras.recipeAdd': "Add automation";
|
|
346
346
|
readonly 'extras.recipeCancel': "Cancel";
|
|
347
347
|
readonly 'extras.showAll': "Show all";
|
|
348
|
+
readonly 'extras.sendFrom': "Send from";
|
|
349
|
+
readonly 'extras.senderNotReady': " (not set up yet)";
|
|
350
|
+
readonly 'extras.senderNotReadyHint': "This is not set up yet, so the e-mail will not go out.";
|
|
351
|
+
readonly 'extras.senderSetUp': "Set it up";
|
|
352
|
+
readonly 'extras.connectSetUp': "Set up";
|
|
353
|
+
readonly 'extras.connectConnected': "Connected";
|
|
348
354
|
readonly 'extras.recipeAdded': "Added and switched on. Check it here, and try it with Test.";
|
|
349
355
|
readonly 'extras.recipeFill': "Fill in the words in bold";
|
|
350
356
|
readonly 'extras.blankTheField': "the {field}";
|
|
@@ -1,4 +1,4 @@
|
|
|
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,
|
|
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.sendFrom":"Send from","extras.senderNotReady":" (not set up yet)","extras.senderNotReadyHint":"This is not set up yet, so the e-mail will not go out.","extras.senderSetUp":"Set it up","extras.connectSetUp":"Set up","extras.connectConnected":"Connected","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
2
|
|
|
3
3
|
A reminder about {name}: {field} is on {date}.
|
|
4
4
|
|
|
@@ -494,6 +494,12 @@ export declare const BASE_MESSAGES: {
|
|
|
494
494
|
readonly 'extras.recipeAdd': "Add automation";
|
|
495
495
|
readonly 'extras.recipeCancel': "Cancel";
|
|
496
496
|
readonly 'extras.showAll': "Show all";
|
|
497
|
+
readonly 'extras.sendFrom': "Send from";
|
|
498
|
+
readonly 'extras.senderNotReady': " (not set up yet)";
|
|
499
|
+
readonly 'extras.senderNotReadyHint': "This is not set up yet, so the e-mail will not go out.";
|
|
500
|
+
readonly 'extras.senderSetUp': "Set it up";
|
|
501
|
+
readonly 'extras.connectSetUp': "Set up";
|
|
502
|
+
readonly 'extras.connectConnected': "Connected";
|
|
497
503
|
readonly 'extras.recipeAdded': "Added and switched on. Check it here, and try it with Test.";
|
|
498
504
|
readonly 'extras.recipeFill': "Fill in the words in bold";
|
|
499
505
|
readonly 'extras.blankTheField': "the {field}";
|