@svgrid/enterprise 3.1.48 → 3.1.50
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-niFUiHOa.js → index-BkQeYjgl.js} +1 -1
- package/dist/designer/index.html +1 -1
- package/dist/fields/AttachmentCell.svelte +28 -22
- package/dist/fields/BaseTabs.svelte +7 -2
- package/dist/fields/BaseTabs.svelte.d.ts +2 -0
- package/dist/fields/SvBase.svelte +2 -1
- package/dist/fields/SvBase.svelte.d.ts +8 -0
- package/dist/fields/base-export.d.ts +24 -0
- package/dist/fields/base-export.js +1 -1
- package/dist/fields/index.d.ts +1 -1
- package/dist/fields/index.js +1 -1
- package/dist/fields/messages/shell.d.ts +3 -0
- package/dist/fields/messages/shell.js +1 -1
- package/dist/fields/messages.svelte.d.ts +3 -0
- package/dist/node/studio.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wc/sv-base-element.js +95 -94
- package/package.json +1 -1
|
@@ -67,6 +67,7 @@ import { type AutomationRun, type BaseAutomation } from './automations.svelte.js
|
|
|
67
67
|
import { type BaseTrashItem, type BaseTrashStore } from './base-trash.js';
|
|
68
68
|
import { type CanEditField } from './field-access.svelte.js';
|
|
69
69
|
import { type BaseShare } from './base-share.js';
|
|
70
|
+
import { type BaseFilesExport } from './base-export.js';
|
|
70
71
|
import { type BasePermissions } from './base-permissions.js';
|
|
71
72
|
type $$ComponentProps = {
|
|
72
73
|
/** Several tables, shown as tabs. Without it, `data` and `columns` are the one table. */
|
|
@@ -87,6 +88,13 @@ type $$ComponentProps = {
|
|
|
87
88
|
* the table is made in the page. Not undone with Ctrl+Z: it is yours.
|
|
88
89
|
*/
|
|
89
90
|
onImportTable?: (table: BaseTable) => BaseTable | null | void | Promise<BaseTable | null | void>;
|
|
91
|
+
/**
|
|
92
|
+
* Download the shown view's files as a ZIP. Given, the list of tables offers it for a
|
|
93
|
+
* table with a file field; SvBase hands over the view's records in their order, each with
|
|
94
|
+
* its folder (the values the view is grouped by, else the record's name), and the file
|
|
95
|
+
* fields shown. The app reads the files and sends the ZIP (it holds them, and they may be large).
|
|
96
|
+
*/
|
|
97
|
+
onExportFiles?: (request: BaseFilesExport) => void | Promise<void>;
|
|
90
98
|
/**
|
|
91
99
|
* Read the files the import is given yourself, first: an app that reads
|
|
92
100
|
* .xls, .ods or .xlsb (with SheetJS, say) answers the rows as text, the
|
|
@@ -3,6 +3,30 @@ type Row = Record<string, unknown>;
|
|
|
3
3
|
export type BaseExportFormat = 'csv' | 'xlsx';
|
|
4
4
|
/** Rows of `{ column id: what the cell shows }` for these columns. */
|
|
5
5
|
export declare function recordsAsShown(columns: ReadonlyArray<FieldColumn>, rows: ReadonlyArray<Row>): Row[];
|
|
6
|
+
/** One record of a ZIP of a view's files (SvBase's `onExportFiles`): its id, and the folder its files go in. */
|
|
7
|
+
export interface BaseFilesRecord {
|
|
8
|
+
id: string;
|
|
9
|
+
folder: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* What SvBase hands `onExportFiles` for a ZIP of the shown view's files: the table, the
|
|
13
|
+
* view, the file fields it shows, and its records in their order, each with its folder.
|
|
14
|
+
* The app reads the files (it holds them) and sends the ZIP.
|
|
15
|
+
*/
|
|
16
|
+
export interface BaseFilesExport {
|
|
17
|
+
table: string;
|
|
18
|
+
view: string;
|
|
19
|
+
fields: string[];
|
|
20
|
+
records: BaseFilesRecord[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Each record with the folder its files go in: the values the view is grouped by (grouped
|
|
24
|
+
* by client, a folder for each client, a folder inside it for each further group), else
|
|
25
|
+
* the record's name (the first column given). A folder name keeps to what every system saves.
|
|
26
|
+
*/
|
|
27
|
+
export declare function filesFolders(columns: ReadonlyArray<FieldColumn>, groupBy: ReadonlyArray<string>, rows: ReadonlyArray<Row>, empty?: string): BaseFilesRecord[];
|
|
28
|
+
/** A folder name every system saves: no slashes, colons or wildcards, no leading dots, at most 80 characters. */
|
|
29
|
+
export declare function safeFolder(text: string): string;
|
|
6
30
|
/**
|
|
7
31
|
* The columns and rows of an Excel file: `recordsAsShown`, with what is a number,
|
|
8
32
|
* a date or a time as a number under the field's format, and a checkbox a boolean. A value that is none
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fieldText as d,fieldValue as c}from"./base-alerts.js";import{fieldCopyText as
|
|
1
|
+
import{fieldText as d,fieldValue as c}from"./base-alerts.js";import{fieldCopyText as $}from"./copy-text.js";import{excelDateFormat as M,excelDays as D,exactNumber as p,formatDuration as N,numberBoxText as P,numberFieldShape as w,numberKind as h}from"./format.js";import{isoDate as A}from"./formula.js";import{fieldPropsOf as E,fillFieldColumn as C}from"./registry.svelte.js";import{timeSeconds as k}from"./time-of-day.js";import{timerSeconds as G}from"./timer.js";export function recordsAsShown(e,t){return t.map(r=>{const n={};for(const o of e)n[o.id]=b(o,r);return n})}function b(e,t){const r=String(e.def.fieldType),n=r==="timer"?G(c(e,t)):c(e,t);if(r==="checkbox")return I(n);if(O.has(r))return String($({value:n,column:{id:e.id,columnDef:e.def},row:t})??"");const o=y(e.def)?p(n):n;return typeof o=="number"&&Number.isFinite(o)&&(y(e.def)||r==="formula"||!e.def.formatter)?K(e,o)??o:d(e,t)}const y=e=>e.cellDataType==="number"||e.fieldType==="rating";export function filesFolders(e,t,r,n="(empty)"){const o=t.map(l=>e.find(u=>u.id===l)).filter(l=>!!l),i=o.length?o:e.slice(0,1);return r.map(l=>({id:String(l.id??""),folder:i.map(u=>safeFolder(String(b(u,l)??""))||n).join("/")})).filter(l=>l.id!=="")}export function safeFolder(e){return e.replace(/[\\/:*?"<>|\u0000-\u001f]+/g," ").replace(/\s+/g," ").trim().replace(/^\.+/,"").slice(0,80).trim()}function I(e){return e==null||e===""?"":e===!0||e===1||e==="true"?"true":"false"}const O=new Set(["multiSelect","user","link","vote"]),B=e=>h(e.def.fieldType,e.def.fieldProps??{})==="percent";function K(e,t){return e.def.fieldType==="duration"||e.def.fieldType==="timer"?N(t,Number.isInteger(t)?"h:mm:ss":"h:mm:ss.SSS"):B(e)?`${P(t,"percent",{...e.def.fieldProps,separators:"comma-period"})}%`:null}const a=e=>{const t=p(e);return typeof t=="number"?t:null};function S(e,t){const{places:r}=w(e,t),n=`${t.showThousands===!1?"0":"#,##0"}${r?`.${"0".repeat(r)}`:""}`;if(e==="percent")return`${n}%`;const o={thousand:',"K"',million:',,"M"',billion:',,,"B"'}[String(t.abbreviation)]??"",i=e==="currency"?String(t.symbol??"$").replace(/"/g,""):"";return i?t.symbolPosition==="after"?`${n}${o}" ${i}"`:`"${i}"${n}${o}`:n+o}function x(e,t){const r=e==="percent"&&!!t.points,n=o=>{const i=a(o);return i!=null&&r?Number((i/100).toPrecision(15)):i};return{numFmt:S(e,t),cell:n}}const g=(e,t=r=>r)=>({numFmt:M(e),cell:r=>D(t(r),e)}),W=e=>({numFmt:`${e.timeFormat==="24hour"?"hh":"h"}:mm${e.showSeconds?":ss":""}${e.timeFormat==="24hour"?"":" AM/PM"}`,cell:t=>{const r=k(t);return r==null?null:r/86400}}),j=e=>typeof e=="string"?A(e):e instanceof Date?e:null;function F(e,t){const r=e.fieldSource?.();return r?.fieldType?C({...r,fieldProps:{...r.fieldProps,...t==null?{}:{precision:t}}}):null}function f(e,t){const r=E(e);switch(e.fieldType){case"checkbox":return null;case"number":case"currency":case"percent":return x(h(e.fieldType,r),r);case"date":case"createdTime":case"lastModifiedTime":return g(r);case"timeOfDay":return W(r);case"rating":case"autoNumber":return{cell:a};case"count":return{numFmt:"#,##0",cell:a};case"formula":return r.result==="number"||r.result==="currency"||r.result==="percent"?x(r.result,{...r,format:void 0}):r.result==="date"||t()instanceof Date?g(r,j):{cell:n=>typeof n=="number"?n:null};case"rollup":{if(!e.cellDataType)return null;const n=["SUM","AVERAGE","MIN","MAX"].includes(String(r.aggregation)),o=n?F(e,r.precision):null;return(o?f(o,t):null)??{numFmt:n?S("number",{precision:r.precision??0,format:"decimal"}):"#,##0",cell:a}}case"lookup":{const n=F(e),o=n?f(n,t):null;return o?{numFmt:o.numFmt,cell:i=>Array.isArray(i)&&i.length===1?o.cell(i[0]):null}:null}default:return!e.formatter&&typeof t()=="number"?{cell:n=>typeof n=="number"?n:null}:null}}function J(e,t){let r=e.header.length;for(let n=0;n<Math.min(t.length,200);n++)r=Math.max(r,d(e,t[n]).length);return Math.max(48,Math.min(400,r*7+14))}export function recordsForExcel(e,t){const r=recordsAsShown(e,t),n=e.map(o=>f(o.def,()=>{for(const i of t){const l=c(o,i);if(l!=null&&l!=="")return l}return null}));return e.forEach((o,i)=>{if(o.def.fieldType==="checkbox")return t.forEach((u,m)=>{const s=c(o,u);r[m][o.id]=s===!0||s==="true"||s===1});const l=n[i];l&&t.forEach((u,m)=>{const s=l.cell(c(o,u));s!=null&&Number.isFinite(s)&&(r[m][o.id]=s)})}),{columns:e.map((o,i)=>({field:o.id,header:o.header,numFmt:n[i]?.numFmt,width:J(o,t)})),records:r}}let T;export function canWriteExcel(){return globalThis.JSZip!=null?Promise.resolve(!0):T??(T=import("jszip").then(()=>!0,()=>!1))}export async function downloadAsShown(e,t,r,n,o){const{exportGrid:i}=await import("../export.js"),l=t==="xlsx"?recordsForExcel(n,o):{columns:n.map(u=>({field:u.id,header:u.header})),records:recordsAsShown(n,o)};await i(e,{format:t,filename:r.replace(/[\\/:*?"<>|]+/g," ").trim()||"base",columns:l.columns,rows:l.records,rawValues:!0,autoGroup:!1})}
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export { generateAIField, regenerateAIFields, cancelAIField, pendingAIField, set
|
|
|
77
77
|
export { aiPromptError, readAIAnswer, type AIFieldProps, type AIFieldOutput } from './ai-prompt.js';
|
|
78
78
|
export { moveTile, newTile, putTile, removeTile, tileResult, tileRows, tileTitle, type DashboardTile, type DashboardTileKind, type DashboardTileSize, type NumberAggregation, type TileResult, } from './dashboard.js';
|
|
79
79
|
export { sharedTables, sharedViews, shareOf, type BaseShare } from './base-share.js';
|
|
80
|
-
export { recordsAsShown, downloadAsShown, type BaseExportFormat } from './base-export.js';
|
|
80
|
+
export { recordsAsShown, downloadAsShown, filesFolders, safeFolder, type BaseExportFormat, type BaseFilesExport, type BaseFilesRecord } from './base-export.js';
|
|
81
81
|
export { permittedTables, permittedRecords, permittedViews, tablePermissions, gridPermissions, type BasePermissions, type TablePermissions } from './base-permissions.js';
|
|
82
82
|
export { computeRecords, computeRecord, computedValues, computedFields, evaluateFilter, filterRecords, type ComputeTable, type ComputeOptions, type FilterContext } from './base-compute.js';
|
|
83
83
|
export { queryRecords, fieldFilterToSql, fieldFilterToPostgrest, supabaseFieldFilter, viewFilterOf, type QueryOptions, type FieldFilterSqlOptions, type FieldFilterPostgrestOptions } from './base-query.js';
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerCellEditor as f,registerGridExtension as I,registerGridShortcuts as g}from"@svgrid/grid";import{nudgeEnterpriseFor as B}from"../license.js";import P from"./FieldCell.svelte";import L from"./RowAdder.svelte";import V from"./FootRowAdder.svelte";import H from"./AttachmentEditor.svelte";import K from"./FieldsHeaderEnd.svelte";import{askDeleteField as U,openFieldEditor as C,openRecord as _}from"./editor-request.svelte.js";import{enableAdvancedFilter as N,registerFilterKind as G}from"../advanced-filter-enable.js";import{compileFieldFilter as z,newCondition as F,resolveMeWith as $}from"./filter-model.js";import{hasBar as q,openBarPanel as w}from"./bar-request.svelte.js";import{groupRules as X,userSorts as j,writeSortState as W}from"./viewbar/sort-state.js";import{sortLabels as Y}from"./view-model.js";import{changesOf as J,noteChange as T}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 A,fillFieldColumn as ge,getFieldType as E,isServerGroupRow as Ce,originalColumn as b,registerFieldType as be,typeDrawsCell as ye}from"./registry.svelte.js";import he from"./RatingEditor.svelte";import Fe from"./LinkPickerEditor.svelte";import we from"./DateEditor.svelte";import Te from"./SelectEditor.svelte";import ve from"./NumberEditor.svelte";import Me from"./LongTextEditor.svelte";import Ae from"./RichTextEditor.svelte";import Ee from"./VoteEditor.svelte";import xe from"./TimerEditor.svelte";import ke from"./ChecklistEditor.svelte";import Se from"./ColorEditor.svelte";import Re from"./TimeOfDayEditor.svelte";import De from"./RowHeader.svelte";import Oe from"./GroupHeader.svelte";import Ie from"./SummaryCell.svelte";import{getCurrentUser as x}from"./sources.svelte.js";import{fieldColumns as Be,gridOf as y,primaryIdOf as h,rememberGrid as Pe}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,defaultCanEditField,fieldEditors,setCanEditField,setFieldProtection}from"./field-access.svelte.js";import{protectionText as Le}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{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}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{setRecordComments}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{setRecordHistory,historyOf,loadHistory}from"./activity.svelte.js";export{setMentionHandler}from"./activity.svelte.js";export{mentionToken,mentionIds,mentionText,parseMentions,encodeMentions}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,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&&q(o)?[...F(r,e)?[{key:"field-filter",label:p("fields.menuFilter"),icon:m.filter,separatorBefore:!0,run:()=>He(o,r,e)}]:[],...o.groupingControlsEnabled?[]:[{key:"field-group",label:p("fields.menuGroup"),icon:m.group,run:()=>Ke(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,...Ye(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?U({ctrl:o,columnId:r}):te(o,r)}]]}function k(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)=>!!k(o,r,e);function R(o,r,e){const i=k(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 He(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]}),w(o,"filter")}function Ke(o,r){const e=X(o);e.some(i=>i.id===r)||W(o.buildApi(),[...e,{id:r,desc:!1}],j(o)),w(o,"group")}function D(o,r,e,i,t){if(!r)return;const l=x()?.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=A(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),T(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;T(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(),_({ctrl:e,rowId:t.id}),!0)}function Ne(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 Ge}from"./base-keys.svelte.js";import{treeGridKey as ze}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 O=!1;export function enableFields(){if(O)return;O=!0;for(const e of ae)E(e.id)||be(e);I({column:(e,i)=>ge(e,i),cell:P,hasCell:e=>ye(e??{}),cellEdited:(e,i)=>{D(e,i.row,i.columnId,i.rowId,i.offGrid),Ue(e,i.row,i.columnId,i.rowId),We(e,i.row,i.columnId,i.rowId)},rangeAction:(e,i)=>e.props?.baseRangeAction?.(i)===!0,bodyEnd:L,footEnd:V,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=Le(b(e),A(b(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,rowHeader:e=>e?.props?.expandRows?De:null,groupRow:e=>!e?.props?.rowModel&&Be(e).some(i=>i.fieldType)?Oe:null,summaryCell:e=>e?.props?.rowModel?null:Ie,rootClass:e=>{Pe(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,onCommit:e.onCommit,onCancel:e.onCancel});f("fieldRating",{component:he,props:o,typeToEdit:e=>/^[0-9]$/.test(e)}),f("fieldLink",{component:Fe,props:o,typeToEdit:e=>e!==" "}),f("fieldNumber",{component:ve,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9.,:+\-(=]/.test(e)}),f("fieldLongText",{component:Me,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove})}),f("fieldSelect",{component:Te,props:e=>({...o(e),grid:e.grid,onChange:e.onChange,onCommitAndMove:e.onCommitAndMove})}),f("attachment",{component:H,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:ke,props:r}),f("fieldRichText",{component:Ae,props:r}),f("fieldVote",{component:Ee,props:r,typeToEdit:e=>e===" "}),f("fieldTimer",{component:xe,props:e=>({...r(e),rowId:e.rowId,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>e===" "||/[0-9:]/.test(e)}),f("fieldColor",{component:Se,props:r}),f("fieldTime",{component:Re,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)),$(()=>x()?.id),oe(),N(),g(_e,{id:"svgrid-fields-space"}),g(Ge,{id:"svgrid-fields-keys"}),g(Ne,{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(ze,{id:"svgrid-base-tree"}),B("base","SvGrid Base")}export{inboxRecords,listColumns,listGroups,viewRecords}from"./list-view.js";import{aiFieldEdited as We,aiFieldMenuItems as Ye}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}from"./base-export.js";export{permittedTables,permittedRecords,permittedViews,tablePermissions,gridPermissions}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";
|
|
1
|
+
import{registerCellEditor as f,registerGridExtension as I,registerGridShortcuts as g}from"@svgrid/grid";import{nudgeEnterpriseFor as B}from"../license.js";import P from"./FieldCell.svelte";import L from"./RowAdder.svelte";import V from"./FootRowAdder.svelte";import H from"./AttachmentEditor.svelte";import K from"./FieldsHeaderEnd.svelte";import{askDeleteField as U,openFieldEditor as C,openRecord as _}from"./editor-request.svelte.js";import{enableAdvancedFilter as N,registerFilterKind as G}from"../advanced-filter-enable.js";import{compileFieldFilter as z,newCondition as h,resolveMeWith as $}from"./filter-model.js";import{hasBar as q,openBarPanel as w}from"./bar-request.svelte.js";import{groupRules as X,userSorts as j,writeSortState as W}from"./viewbar/sort-state.js";import{sortLabels as Y}from"./view-model.js";import{changesOf as J,noteChange as T}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 A,fillFieldColumn as ge,getFieldType as E,isServerGroupRow as Ce,originalColumn as b,registerFieldType as be,typeDrawsCell as ye}from"./registry.svelte.js";import Fe from"./RatingEditor.svelte";import he from"./LinkPickerEditor.svelte";import we from"./DateEditor.svelte";import Te from"./SelectEditor.svelte";import ve from"./NumberEditor.svelte";import Me from"./LongTextEditor.svelte";import Ae from"./RichTextEditor.svelte";import Ee from"./VoteEditor.svelte";import xe from"./TimerEditor.svelte";import ke from"./ChecklistEditor.svelte";import Se from"./ColorEditor.svelte";import Re from"./TimeOfDayEditor.svelte";import De from"./RowHeader.svelte";import Oe from"./GroupHeader.svelte";import Ie from"./SummaryCell.svelte";import{getCurrentUser as x}from"./sources.svelte.js";import{fieldColumns as Be,gridOf as y,primaryIdOf as F,rememberGrid as Pe}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,defaultCanEditField,fieldEditors,setCanEditField,setFieldProtection}from"./field-access.svelte.js";import{protectionText as Le}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{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}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{setRecordComments}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{setRecordHistory,historyOf,loadHistory}from"./activity.svelte.js";export{setMentionHandler}from"./activity.svelte.js";export{mentionToken,mentionIds,mentionText,parseMentions,encodeMentions}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,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=F(o)===r,l=e&&q(o)?[...h(r,e)?[{key:"field-filter",label:p("fields.menuFilter"),icon:m.filter,separatorBefore:!0,run:()=>He(o,r,e)}]:[],...o.groupingControlsEnabled?[]:[{key:"field-group",label:p("fields.menuGroup"),icon:m.group,run:()=>Ke(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,...Ye(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?U({ctrl:o,columnId:r}):te(o,r)}]]}function k(o,r,e){const i=(o.allColumns??[]).map(l=>l.id),t=i[i.indexOf(r)+e];if(!(!t||t===F(o)||o.isColumnPinned?.(t)!==o.isColumnPinned?.(r)))return t}const S=(o,r,e)=>!!k(o,r,e);function R(o,r,e){const i=k(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 He(o,r,e){const i=h(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]}),w(o,"filter")}function Ke(o,r){const e=X(o);e.some(i=>i.id===r)||W(o.buildApi(),[...e,{id:r,desc:!1}],j(o)),w(o,"group")}function D(o,r,e,i,t){if(!r)return;const l=x()?.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=A(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),T(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;T(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(),_({ctrl:e,rowId:t.id}),!0)}function Ne(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 Ge}from"./base-keys.svelte.js";import{treeGridKey as ze}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 O=!1;export function enableFields(){if(O)return;O=!0;for(const e of ae)E(e.id)||be(e);I({column:(e,i)=>ge(e,i),cell:P,hasCell:e=>ye(e??{}),cellEdited:(e,i)=>{D(e,i.row,i.columnId,i.rowId,i.offGrid),Ue(e,i.row,i.columnId,i.rowId),We(e,i.row,i.columnId,i.rowId)},rangeAction:(e,i)=>e.props?.baseRangeAction?.(i)===!0,bodyEnd:L,footEnd:V,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=Le(b(e),A(b(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)=>F(e)===i,rowHeader:e=>e?.props?.expandRows?De:null,groupRow:e=>!e?.props?.rowModel&&Be(e).some(i=>i.fieldType)?Oe:null,summaryCell:e=>e?.props?.rowModel?null:Ie,rootClass:e=>{Pe(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,onCommit:e.onCommit,onCancel:e.onCancel});f("fieldRating",{component:Fe,props:o,typeToEdit:e=>/^[0-9]$/.test(e)}),f("fieldLink",{component:he,props:o,typeToEdit:e=>e!==" "}),f("fieldNumber",{component:ve,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9.,:+\-(=]/.test(e)}),f("fieldLongText",{component:Me,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove})}),f("fieldSelect",{component:Te,props:e=>({...o(e),grid:e.grid,onChange:e.onChange,onCommitAndMove:e.onCommitAndMove})}),f("attachment",{component:H,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:ke,props:r}),f("fieldRichText",{component:Ae,props:r}),f("fieldVote",{component:Ee,props:r,typeToEdit:e=>e===" "}),f("fieldTimer",{component:xe,props:e=>({...r(e),rowId:e.rowId,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>e===" "||/[0-9:]/.test(e)}),f("fieldColor",{component:Se,props:r}),f("fieldTime",{component:Re,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)),$(()=>x()?.id),oe(),N(),g(_e,{id:"svgrid-fields-space"}),g(Ge,{id:"svgrid-fields-keys"}),g(Ne,{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(ze,{id:"svgrid-base-tree"}),B("base","SvGrid Base")}export{inboxRecords,listColumns,listGroups,viewRecords}from"./list-view.js";import{aiFieldEdited as We,aiFieldMenuItems as Ye}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}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";
|
|
@@ -265,6 +265,9 @@ export declare const SHELL_MESSAGES: {
|
|
|
265
265
|
readonly 'shell.excelNeedsZip': "This app cannot write Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip.";
|
|
266
266
|
readonly 'shell.exportFailed': "Could not make the file. Try again.";
|
|
267
267
|
readonly 'shell.downloadSql': "Download as SQL";
|
|
268
|
+
readonly 'shell.downloadFiles': "Download the files (ZIP)";
|
|
269
|
+
readonly 'shell.downloadFilesTitle': "Every file this view shows, in a folder for each group, or for each record";
|
|
270
|
+
readonly 'shell.exportNoFiles': "This view shows no files.";
|
|
268
271
|
readonly 'shell.downloadSqlTitle': "The tables, links, records, views and automations, ready for Postgres or Supabase";
|
|
269
272
|
readonly 'shell.addTable': "Add table";
|
|
270
273
|
readonly 'shell.addTableWays': "More ways to add a table";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SHELL_MESSAGES={"shell.records.one":"{count} record","shell.records.other":"{count} records","shell.tables.one":"{count} table","shell.tables.other":"{count} tables","shell.items.one":"{count} item","shell.items.other":"{count} items","shell.loadingRecords":"Loading records…","shell.deleteTableOnServer":"It leaves this base. Its records stay in the database.","shell.converting":"Converting {done} of {total} records…","shell.writingOptions":"Updating {done} records…","shell.convertTitle":"Convert the stored values?","shell.convertBody":"{name} holds {count} records in the database. Convert their values to the new type, or change the field only and leave them as they are?","shell.convertValues":"Convert the values","shell.convertKeep":"Change the field only","shell.exporting":"Exporting {done} of {total} records…","shell.copying":"Copying {done} of {total} records…","shell.reading":"Reading {done} of {total} records…","shell.saving":"Saving…","shell.allSaved":"All changes saved","shell.notSaved":"Not saved: {message}","shell.savingSlow":"Still saving: the server has not answered yet","shell.tryAgain":"Try again","shell.dismissStatus":"Dismiss","shell.failSave":"Could not save {field} of {record}. {reason}","shell.failSaveTyped":"Could not save {field} of {record}. {reason} You entered: {value}","shell.failSaveRecord":"Could not save {record}. {reason}","shell.failAdd":"Could not add {record}. {reason}","shell.failAddMany":"Could not add {records}. {reason}","shell.failDelete":"Could not delete {record}. {reason} It is still in the table.","shell.failDeleteMany":"Could not delete {records}. {reason} They are still in the table.","shell.failPurge":"Could not delete {record} forever. {reason} It is still in the trash.","shell.failPurgeMany":"Could not delete {records} forever. {reason} They are still in the trash.","shell.undoLeftAway":"{records} left out: someone deleted them. If they are restored, they keep the edit.","shell.failLinkGone":"The record {record} linked to was deleted forever, so this link cannot come back.","shell.linkToTrash":"The record you linked to is in the trash. The link stays empty until someone restores it.","shell.failPurgeHalf":"Could not delete {record} forever. {reason} It stopped half way, so its links may be gone and it cannot be restored. Press Delete forever again to finish.","shell.failPurgeHalfMany":"Could not delete {records} forever. {reason} It stopped half way, so their links may be gone and they cannot be restored. Press Delete forever again to finish.","shell.purgeUnderWay":"{record} cannot be restored: someone has started to delete it forever. If it stays in the trash, that delete did not finish, and Delete forever will finish it.","shell.purgeUnderWayMany":"{records} cannot be restored: someone has started to delete them forever. If they stay in the trash, that delete did not finish, and Delete forever will finish it.","shell.cannotRestorePurging":"A delete forever of this record did not finish. Its links may be gone, so it cannot be restored. Delete it forever to finish.","shell.purgeCameBack":"{record} was not deleted: someone restored it first.","shell.purgeCameBackMany":"{records} were not deleted: someone restored them first.","shell.undoPurged":"{record} was deleted forever, so it cannot come back.","shell.undoPurgedMany":"{records} were deleted forever, so they cannot come back.","shell.failRestore":"Could not put {record} back. {reason} It is still in the trash.","shell.failRestoreMany":"Could not put {records} back. {reason} They are still in the trash.","shell.failMany":"{count} changes could not be saved. {reason}","shell.why.offline":"The server could not be reached.","shell.why.noAnswer":"The server did not answer, so it may not have been stored.","shell.why.required":"This field needs a value.","shell.why.duplicate":"Another record already has this value.","shell.why.notAccepted":"The database does not accept this value.","shell.why.idTooLong":"Record ids need {need} characters; this table's id column holds {holds}. Ask whoever runs the database to make it wider.","shell.why.linked":"Other records depend on it.","shell.why.linkedCircle":"These records link to each other in a circle, and this database checks each link as it deletes, so they were not deleted. Empty the link of one of them first.","shell.why.linkRefused":"The linked record is not there, or you may not link to it. Pick another.","shell.why.noPermission":"You do not have permission to do this.","shell.why.gone":"This record no longer exists.","shell.why.notDeleted":"The database kept it, so you may not have permission.","shell.why.noRead":"The server did not answer.","shell.why.readError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.linkMissing":"The record it points to is not there.","shell.why.linkMissingField":"The record {field} points to is not there.","shell.why.linkMissingFields":"The record that {fields} point to is not there.","shell.why.serverError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.unknown":"No reason came with the error that this page may show. Whoever runs the database can see it in its log.","shell.why.said":"The server said: {said}","shell.why.readSaid":"The server answered with an error: {said}","shell.couldNotLoad":"Could not load {table}: {message}","shell.loadFailedTitle":"Could not load {table}","shell.loadTryAgain":"Try again","shell.loadTrying":"Trying again…","shell.couldNotSave":"Could not save {table}: {message}","shell.trashSaveFailed":"Could not save the trash: {message}","shell.trashReadFailed":"Could not read the trash: {message}","shell.deleted":"Deleted {what}","shell.restored":"Restored {what}","shell.theField":"the field {name}","shell.theTable":"the table {name}","shell.theView":"the view {name}","shell.stepDeleteView":"delete view {name}","shell.aField":"a field","shell.importedNewTable":"Imported {records} into a new table, {name}","shell.importedInto":"Imported {records} into {table}","shell.importedIntoFallback":"the table","shell.stepCellEdit":"cell edit","shell.stepCells.one":"{count} cell","shell.stepCells.other":"{count} cells","shell.stepResize":"resize","shell.stepMoveField":"move field","shell.stepAddRecord":"add record","shell.stepMoveRecord":"move record","shell.undoRecordStays":"Someone has changed this record since, so it stays. Delete it if it should go.","shell.undoCellStays.one":"Someone has changed this cell since, so it keeps their value.","shell.undoCellStays.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoCellsKept.one":"Someone has changed 1 of these cells since, so it keeps their value.","shell.undoCellsKept.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoRecordsKept.one":"Someone has changed 1 of these records since, so it keeps their value.","shell.undoRecordsKept.other":"Someone has changed {count} of these records since, so they keep their values.","shell.undoCannotCheck":"The database could not be reached to check this cell, so nothing was changed. Try again in a moment.","shell.undoStillSaving":"This record is still saving, so nothing was changed. Try again once it has saved.","shell.undoRunning":"Undo is still running.","shell.redoRunning":"Redo is still running.","shell.undoStopped":"Undo stopped: {done} of {total} records were put back. Undo again to put back the rest.","shell.redoStopped":"Redo stopped: {done} of {total} records were changed again. Redo again to do the rest.","shell.undoCellsStopped":"Undo stopped: {done} of {total} cells were put back. Undo again to put back the rest.","shell.redoCellsStopped":"Redo stopped: {done} of {total} cells were changed again. Redo again to do the rest.","shell.undoAddStopped":"Undo stopped: {done} of {total} new records were taken out. Undo again to take out the rest.","shell.redoAddStopped":"Redo stopped: {done} of {total} records were added again. Redo again to add the rest.","shell.redoDeleteStopped":"Redo stopped: {done} of {total} records were deleted again. The rest stay, and Undo brings back those it deleted.","shell.undoRecordGone":"This record has been deleted, so nothing was changed.","shell.retryChanged.one":"This cell has changed since, so it keeps its new value.","shell.retryChanged.other":"{count} cells have changed since, so they keep their new values.","shell.retryGone.one":"The record has been deleted, so this was not saved.","shell.retryGone.other":"{count} records have been deleted, so these were not saved.","shell.retryGoneTyped":'The record has been deleted, so "{value}" was not saved.',"shell.retryUnread":"The record could not be read to check it, so nothing was saved.","shell.deleteCannotRead":"The database could not be read, so these records were not deleted. Try again in a moment.","shell.pasteLeftOut.one":'"{text}" does not fit {field}, so that cell keeps its value.',"shell.pasteLeftOut.other":"{count} values do not fit their fields, so those cells keep their values.","shell.pasteLoading":"The view is still loading, so nothing was pasted. Paste again when the rows are shown.","shell.formulaInField":"In a base, a formula is a field of its own: it works out a value for every record at once.","shell.formulaMakeField":"Make a formula field","shell.formulaIsSummary":"The summary bar under the table works this out for {field}, and keeps it up to date as records change.","shell.formulaShowSummary":"Show it for {field}","shell.sumShown":"The sum of {field} is in the summary bar under the table. It keeps up as records change.","shell.sumNotNumbers":"{field} does not hold numbers, so there is nothing to add up. Select a number field and press Alt+= again.","shell.sumNoBar":"A base adds up a field in the summary bar under the table, and this view does not show one.","shell.totalRecord":"No total record needed: the summary bar under the table adds up each number field, and keeps up as records change.","shell.totalShowSums":"Show the sums","shell.formatInBase":"A base keeps no bold or colors typed into cells, so every screen reads the same data. Color rows or cells by what they hold with Color in the toolbar.","shell.formatOpenColor":"Open Color","shell.pasteNoField.one":"One column of the paste had no field to go in, so it was left out.","shell.pasteNoField.other":"{count} columns of the paste had no field to go in, so they were left out.","shell.pasteNamesLeftOut":"The first line holds the names of the fields, so it is not pasted as a record.","shell.pasteFieldsTitle.one":"Add a field for this paste?","shell.pasteFieldsTitle.other":"Add {count} fields for this paste?","shell.pasteFieldsBody.one":"The paste has one more column than the table has from here. Add a field for it:","shell.pasteFieldsBody.other":"The paste has {count} more columns than the table has from here. Add a field for each:","shell.pasteFirstLineNames":"The first line holds the names of the fields","shell.pasteWithout":"Paste without them","shell.pasteAddFields.one":"Add the field and paste","shell.pasteAddFields.other":"Add {count} fields and paste","shell.pasteNewTitle":"New records","shell.pasteNewAsk":"This paste runs past the last record. Add {records}?","shell.pasteNewConfirm":"Add records","shell.pasteNewPart":"{done} of {total} new records were added.","shell.rangeLoading":"The view is still loading, so nothing was changed. Try again when the rows are shown.","shell.rangeMovedPaste":'Records moved while this was read. Nothing was changed. Try again pastes from "{name}" down over the rows as they are now.',"shell.rangeMovedValue":'Records moved while this was read. Nothing was changed. Try again puts the value in from "{name}" down over the rows as they are now.',"shell.rangeMovedClear":'Records moved while this was read. Nothing was changed. Try again clears from "{name}" down over the rows as they are now.',"shell.rangeMovedFill":'Records moved while this was read. Nothing was changed. Try again fills from "{name}" down over the rows as they are now.',"shell.rangeMovedSelect":"Records moved while this was read. Nothing was changed. Select the cells again.","shell.rangeAnchorGone":'"{name}" is no longer among the rows shown, so nothing was changed. Select the cells again.',"shell.rangeAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.rangeAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.copyAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.copyAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.rangeAgainCovers":'From "{name}" down over {count} rows, selected in the view.',"shell.rangeElsewhere":"That view is no longer open, so nothing was changed.","shell.rangeViewChanged":"The view has changed since, so nothing was changed.","shell.copyElsewhere":"That view is no longer open, so nothing was copied.","shell.copyViewChanged":"The view has changed since, so nothing was copied.","shell.rangeDraftsLeft.one":"1 new record is not stored yet, so it was left out. Change it on its own row.","shell.rangeDraftsLeft.other":"{count} new records are not stored yet, so they were left out. Change them on their own rows.","shell.rangeMoveRefused":"A move can only use rows that are on screen, and {records} of this one are not loaded, so nothing moved. Copy and paste reach them.","shell.copyTitle":"Copy","shell.copyReading":"Reading the selection: {done} rows so far","shell.copyTooBig":"This selection is {cells} cells, more than the {limit} a copy can hold, so nothing was copied. Download this view instead: it holds every record.","shell.copyMovedFrom":'Records moved while this was read. Nothing was copied. Try again copies from "{name}" down over the rows as they are now.',"shell.copyMovedSelect":"Records moved while this was read. Nothing was copied. Select the cells again.","shell.copyAnchorGone":'"{name}" is no longer among the rows shown, so nothing was copied. Select the cells again.',"shell.copyFailed":"Could not read the selection, so nothing was copied: {message}","shell.copyDone":"Copied {count} rows","shell.copyReady":"{count} rows are ready. The browser needs one more click to put them on the clipboard.","shell.copyButton":"Copy","shell.copyRefused":"The browser would not put this much on the clipboard. Download this view instead.","shell.cutRefused":"The browser would not put the cells on the clipboard, so nothing was cut.","shell.cutMoved":"The selection changed before the cells reached the clipboard, so nothing was cleared.","shell.stepPasteRecords":"paste {records}","shell.stepBulkEdit":"edit {records}","shell.bulkReading":"Reading the selection: {done} records so far","shell.bulkFailed":"Could not read the selection, so nothing was changed: {message}","shell.bulkTitle":"Edit records","shell.bulkAsk":"Change {count}?","shell.bulkRuns":"Also run automations: up to {count} runs","shell.bulkRunsTime":"They run one at a time in this tab after the save: about {time} at {rate} a second. Runs left when the tab closes do not happen.","shell.bulkRunsTab":"They run one at a time in this tab after the save. Runs left when the tab closes do not happen.","shell.runsLine":"Running automations: {done} of {total}","shell.runsLineLeft":"Running automations: {done} of {total}, about {time} left","shell.runsStop":"Stop","shell.runsDone":"Automations ran on {total} changes.","shell.runsStopped":"Stopped: {done} of {total} automation runs are done. The other {left} will not run.","shell.timeSeconds":"less than a minute","shell.timeMinutes.one":"1 minute","shell.timeMinutes.other":"{count} minutes","shell.timeHours.one":"1 hour","shell.timeHours.other":"{count} hours","shell.bulkAskNoUndo":"That is too many to undo: once changed, they cannot be changed back from here.","shell.bulkConfirm":"Change records","shell.bulkWriting":"Saving {done} of {total} records...","shell.cellsWriting":"Saving {done} of {total} cells...","shell.bulkDone":"Changed {done} of {total} records","shell.bulkStopped":"Stopped: {done} of {total} records were changed.","shell.bulkFailedPart":"{done} of {total} records were changed, then the save stopped. {reason}","shell.bulkFailedUnsure":"At least {done} of {total} records were changed, then the save stopped and the database could not be read to check the last block. {reason}","shell.bulkUndoLeft":"Undo takes these back.","shell.bulkNoUndoLeft":"That is too many to undo.","shell.failSaveMany":"Could not save {records}. {reason}","shell.stepDeleteRecords":"delete {records}","shell.addColumnFailed":"The column for {field} was not added: {error}","shell.addColumnYourself":"{field} needs a column in {table} before it can store values. Add it to the database: {sql}","shell.duplicateNeedsColumn":"A copy of {field} needs a column of its own in {table}, and the base cannot add one there, so nothing was copied. Add the column to the database first: {sql}","shell.deleting":"Deleting {done} of {total} records...","shell.deleteNoTrash":"That is too many for the trash: they cannot be restored.","shell.scanDrift":"Records changed while this view was being read, so its count may be out by a few.","shell.noSqlSort":"This database cannot work out {fields}, so the view does not sort or total on it.","shell.noSqlView":"This database cannot work out {fields}, so the view cannot filter or group on it. Take it out of the filter or the grouping.","shell.deleteGroupShort":"The group {key} read back {read} records of {size}, so what was left out of the selection cannot be told apart. Nothing was deleted.","shell.deleteGroupUnknown":"How many records the group {key} holds is not known here, so what was left out of the selection cannot be told apart. Nothing was deleted. Tick what should go instead.","shell.deleteTitle":"Delete records","shell.deleteReading":"Finding the records to delete: {done} read...","shell.deleteAsk":"Delete {count}?","shell.deleteAskTrash":"They go to the trash, and undo brings them back.","shell.deleteNothing":"None of the selected records are there any more.","shell.deleteStop":"Stop","shell.deleteCancel":"Cancel","shell.deleteConfirm":"Delete","shell.deleteDone":"Deleted {done} of {total} records","shell.deleteFailed":"Could not read the selection, so nothing was deleted: {message}","shell.columnExists":"The column {column} already exists in {table}, so {field} was stored as {name}.","shell.stepAddField":"add field {name}","shell.stepChangeField":"change field {name}","shell.stepDeleteField":"delete field {name}","shell.stepAddTable":"add table {name}","shell.stepRenameTable":"rename table to {name}","shell.stepDuplicateTable":"duplicate table {name}","shell.stepDeleteTable":"delete table {name}","shell.stepRestore":"restore from the trash","shell.stepImportTable":"import {name}","shell.stepImportRecords":"import {records}","shell.tablesLabel":"Tables","shell.tableName":"Table name","shell.tableActions":"Table actions","shell.tableOptions":"{name} table options","shell.renameTable":"Rename table","shell.duplicateTable":"Duplicate table","shell.importRecordsFromFile":"Import records from a file","shell.keepOneTable":"A base keeps at least one table","shell.deleteTable":"Delete table","shell.allTables":"All tables","shell.importAsTable":"Import a file as a table","shell.importAsTableTitle":"A CSV, TSV, Excel or JSON file as a new table, with a field type for each column","shell.downloadCsv":"Download this view as CSV","shell.downloadExcel":"Download this view as Excel","shell.downloadViewTitle":"The records and fields this view shows, as they read on screen","shell.exportNothing":"This view has no records to download.","shell.excelNeedsZip":"This app cannot write Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip.","shell.exportFailed":"Could not make the file. Try again.","shell.downloadSql":"Download as SQL","shell.downloadSqlTitle":"The tables, links, records, views and automations, ready for Postgres or Supabase","shell.addTable":"Add table","shell.addTableWays":"More ways to add a table","shell.blankTable":"Blank table","shell.viewOnly":"View only","shell.viewOnlyTitle":"You can look at these tables but not change them","shell.undo":"Undo","shell.undoStep":"Undo {step}","shell.undoStepTitle":"Undo {step} (Ctrl+Z)","shell.nothingToUndo":"Nothing to undo","shell.redo":"Redo","shell.redoStep":"Redo {step}","shell.redoStepTitle":"Redo {step} (Ctrl+Shift+Z)","shell.nothingToRedo":"Nothing to redo","shell.trashButton":"Trash, {items}","shell.trashTitle":"Deleted records, fields and tables","shell.deleteNamed":"Delete {name}?","shell.deleteTableRecords.one":"Its {count} record goes with it, and so do its views.","shell.deleteTableRecords.other":"Its {count} records go with it, and so do its views.","shell.deleteTableLinks":"These fields of other tables link to it, or read a link to it, and are deleted too:","shell.readsLink":"{table}: {field} (reads {link})","shell.cancel":"Cancel","shell.searchAllTables":"Search all tables","shell.searchResults":"Search results","shell.searchRecords":"Records","shell.searchMore":"{count} more in {table}","shell.searchNone":"No records match.","shell.searchFoot":"{records} in {tables}","shell.trash":"Trash","shell.trashShow":"Show","shell.trashAll":"All","shell.trashRecords":"Records","shell.trashFields":"Fields","shell.trashTables":"Tables","shell.trashViews":"Views","shell.findInTrash":"Find in trash","shell.trashEmpty":"The trash is empty. Deleted records, fields and tables come here.","shell.trashEmptyDays":"The trash is empty. Deleted records, fields and tables come here and stay {days} days.","shell.trashNoMatch":"Nothing in the trash matches.","shell.trashItems":"Deleted items","shell.kindRecord":"Record","shell.kindView":"View","shell.kindField":"Field","shell.kindTable":"Table","shell.trashIn":"{kind} in {table}","shell.trashTableRecords.one":"{kind}, {count} record","shell.trashTableRecords.other":"{kind}, {count} records","shell.trashDeletedTable":"{name} (deleted)","shell.trashADeletedTable":"a deleted table","shell.trashBy":"by","shell.agoNow":"just now","shell.agoMinutes":"{n} min ago","shell.agoHours":"{n} h ago","shell.agoYesterday":"yesterday","shell.agoDays":"{n} days ago","shell.restore":"Restore","shell.restoreItem":"Restore {name}","shell.restoreAll":"Restore all","shell.restoreThese":"Restore these","shell.deleteForever":"Delete forever","shell.deleteItemForever":"Delete {name} forever","shell.deleteCountForever":"Delete {count} forever","shell.keepThem":"Keep them","shell.keepIt":"Keep it","shell.deleteAskForever":"Delete this forever? It cannot be undone.","shell.emptyTrash":"Empty trash","shell.trashNoteDays":"Items are deleted for good after {days} days.","shell.trashNoteKeep":"Items stay until the trash is emptied.","shell.trashNotePage":"Items stay until this page is closed or reloaded.","shell.trashNoteMarked":"Records stay in their table until they are deleted forever. Fields, views and tables stay until this page is closed or reloaded.","shell.trashClosed":"Deleted records are listed for people who may delete. Ask whoever runs this base if you need one back.","shell.trashEmptyMarked":"The trash is empty. Deleted records stay in their table and come here. Deleted fields, views and tables stay until this page is closed or reloaded.","shell.trashMore":"Showing the latest {shown} of {total} deleted records.","shell.trashEmptyPage":"The trash is empty. Deleted records, fields and tables come here and stay until this page is closed or reloaded.","shell.unnamedRecord":"Untitled record","shell.fieldFallback":"Field","shell.cannotRestoreTable":"A table with its id is in the base","shell.cannotRestoreNoTable":"Its table was deleted: restore the table first","shell.cannotRestoreRecord":"The record is in its table","shell.cannotRestoreField":"A field with its id is in the table","shell.importNewTitle":"Import a file as a new table","shell.importIntoTitle":"Import records into {table}","shell.thisTable":"this table","shell.importChoose":"Choose a CSV or Excel file","shell.importReading":"Reading the file…","shell.importDrop":"Drop a file here, or click to choose one","shell.importFormats":"CSV, TSV, Excel (.xlsx) or JSON. The first row names the columns.","shell.importNoRecords":"The file has a header row and no records.","shell.importBinary":"This file is not text. Choose a CSV, TSV, Excel (.xlsx) or JSON file.","shell.importNeedsZip":"This app cannot read Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip, or import the file as CSV.","shell.importBadExcel":"This file could not be read as an Excel workbook. Open it in Excel and save it again as .xlsx.","shell.importBadJson":'This file could not be read as JSON. It needs to be a list of records: [{ "name": "Ana" }, ...].',"shell.importSeparator":"Separator","shell.importEncoding":"Encoding","shell.importComma":"Comma","shell.importSemicolon":"Semicolon","shell.importTab":"Tab","shell.importPipe":"Pipe","shell.importWarnEncoding":"This file is not UTF-8, so it was read as {encoding}. If letters look wrong, choose another encoding above.","shell.importWarnUnclosed.one":"A quote on line {line} is never closed. It was kept as text, and the rows after it were read as usual. Check that row after the import.","shell.importWarnUnclosed.other":"{count} quotes are never closed, the first on line {line}. They were kept as text, and the rows after them were read as usual. Check those rows after the import.","shell.importWarnStray.one":"A quote on line {line} is in an unusual place and was kept as text. Check that row after the import.","shell.importWarnStray.other":"{count} lines have a quote in an unusual place, the first on line {line}. They were kept as text. Check those rows after the import.","shell.importWarnLong.one":"The row on line {line} has more cells than the header row. The extra cells are in columns of their own below.","shell.importWarnLong.other":"{count} rows have more cells than the header row, the first on line {line}. The extra cells are in columns of their own below.","shell.importWarnShort.one":"The row on line {line} has fewer cells than the header row. Its missing cells stay empty.","shell.importWarnShort.other":"{count} rows have fewer cells than the header row, the first on line {line}. Their missing cells stay empty.","shell.importWarnLost.one":"1 value does not fit the field it goes to and would be left empty. Change that field type or skip the column to keep it.","shell.importWarnLost.other":"{count} values do not fit the fields they go to and would be left empty. Change those field types or skip the columns to keep them.","shell.importWarnUnmatched.one":"1 cell names a person or a record that was not found, so that name is not imported.","shell.importWarnUnmatched.other":"{count} cells name a person or a record that was not found, so those names are not imported.","shell.importWarnRepeated.one":"1 record has the same name as a record already in this table. Importing adds it as a second record.","shell.importWarnRepeated.other":"{count} records have the same name as records already in this table. Importing adds them as second records.","shell.importSummary.one":"{file}: {count} record, {columns} columns","shell.importSummary.other":"{file}: {count} records, {columns} columns","shell.importAnother":"Choose another file","shell.importInto":"Import into","shell.importModeNew":"A new table","shell.importModeAppend":"Add records to {table}","shell.theShownTable":"the shown table","shell.importColumn":"Column","shell.importFieldType":"Field type","shell.importFirstValues":"First values","shell.importFileColumn":"Column in the file","shell.importGoesTo":"Goes to field","shell.importNamesRecords":"names the records","shell.importFieldTypeOf":"Field type of {name}","shell.importFieldFor":"Field for {name}","shell.importSkip":"Skip this column","shell.importNoMapping":"No column goes to a field yet.","shell.importButton.one":"Import {count} record","shell.importButton.other":"Import {count} records","shell.importFieldName":"Field {n}","shell.importedName":"Imported","shell.importedRecordName":"Imported {n}","shell.deleteRecordTitle":"Delete record?","shell.deleteRecordNamed":"{name} is deleted, and its links from other records go with it.","shell.deleteRecordUnnamed":"This record is deleted, and its links from other records go with it.","shell.deleteRecord":"Delete record","shell.fieldLinksTo":"{name} links to {table}.","shell.anotherTable":"another table","shell.fieldLinkBack":"The field there that links back, {name}, is deleted with it.","shell.fieldLinksGo":"The links between the records go too.","shell.fieldReaders":"These fields read it and are deleted too: {fields}.","shell.fieldDeleted":"{name} and its values are deleted.","shell.fieldFormulas":"These formulas read it and will show #ERROR: {fields}.","shell.deleteField":"Delete field","shell.fieldUses":"Used by:","shell.usesView":"{name}: {uses}","shell.usesAutomation":"Automation {name}: it no longer reads or writes this field","shell.usesStack":"stacks its cards by it, and shows as a plain grid without it","shell.usesDates":"places its records by it, and shows as a plain grid without it","shell.usesBars":"draws its bars with it","shell.usesCover":"shows it as the card cover","shell.usesChart":"charts it","shell.usesFilter":"filters by it","shell.usesSort":"sorts by it","shell.usesGroup":"groups by it","shell.usesColor":"colors records by it","shell.usesForm":"asks for it","shell.usesList":"lists it","shell.usesTile":"a tile reads it","shell.cellChanged":"{field} changed to {value}","shell.cellCleared":"{field} cleared","shell.cellsChanged.one":"{count} cell changed","shell.cellsChanged.other":"{count} cells changed","shell.undoneStep":"Undone: {step}","shell.redoneStep":"Redone: {step}","shell.summarize":"Summarize","shell.summarizeField":"Summarize {field}","shell.summaryChange":"{summary} {value}, change summary","shell.summaryCount.one":"{count} record, summarize {field}","shell.summaryCount.other":"{count} records, summarize {field}","shell.recordsWord.one":"record","shell.recordsWord.other":"records","shell.summaryMenu":"Summary","shell.summary.none":"None","shell.summary.empty":"Empty","shell.summary.filled":"Filled","shell.summary.unique":"Unique","shell.summary.percentEmpty":"Percent empty","shell.summary.percentFilled":"Percent filled","shell.summary.sum":"Sum","shell.summary.avg":"Average","shell.summary.median":"Median","shell.summary.min":"Min","shell.summary.max":"Max","shell.summary.range":"Range","shell.summary.checked":"Checked","shell.summary.unchecked":"Unchecked","shell.summary.percentChecked":"Percent checked","shell.summary.earliest":"Earliest date","shell.summary.latest":"Latest date","shell.summary.dateRange":"Date range (days)","shell.searchKey":"Ctrl K","shell.tabHint":"Tab moves between cells. Press Esc, then Tab, to leave the grid.","shell.menuExpand":"Expand record","shell.menuSelect":"Select record","shell.menuDeselect":"Deselect record","shell.recordActions":"Actions for row {row}","shell.menuComment":"Comment","shell.menuInsertAbove":"Insert record above","shell.menuInsertBelow":"Insert record below","shell.menuAddSubtask":"Add subtask","shell.subtasks":"Subtasks","shell.treeNoLoop":"A record cannot go under itself or one of its own subtasks.","shell.treeMovedUnder":"{name} is now under {parent}","shell.treeMovedTop":"{name} is now at the top level","shell.menuDuplicate":"Duplicate record","shell.addField":"Add a field","shell.addRow":"Add row","shell.addRecord":"Add record","shell.groupEmpty":"Empty","shell.groupAdd":"Add a record to this group","shell.groupAddTo":"Add a record to {field} {value}","shell.groupColumn":"Group","shell.someoneElse":"Someone else","shell.unseenAdded":"{who} added this record {ago}","shell.unseenChanged":"{who} changed this record {ago}","shell.selectRow":"Select row {row}","shell.selectAllRows":"Select all rows","shell.expandRow":"Expand row","shell.expandRowN":"Expand row {row}","shell.comments.one":"{count} comment","shell.comments.other":"{count} comments","shell.commentsOnRow.one":"{count} comment on row {row}","shell.commentsOnRow.other":"{count} comments on row {row}","shell.changedBy":"{count} changed by {who}","shell.changedBySomeone":"someone else","shell.changedByOthers":"others","shell.dashboardRecords":"Records"};
|
|
1
|
+
export const SHELL_MESSAGES={"shell.records.one":"{count} record","shell.records.other":"{count} records","shell.tables.one":"{count} table","shell.tables.other":"{count} tables","shell.items.one":"{count} item","shell.items.other":"{count} items","shell.loadingRecords":"Loading records…","shell.deleteTableOnServer":"It leaves this base. Its records stay in the database.","shell.converting":"Converting {done} of {total} records…","shell.writingOptions":"Updating {done} records…","shell.convertTitle":"Convert the stored values?","shell.convertBody":"{name} holds {count} records in the database. Convert their values to the new type, or change the field only and leave them as they are?","shell.convertValues":"Convert the values","shell.convertKeep":"Change the field only","shell.exporting":"Exporting {done} of {total} records…","shell.copying":"Copying {done} of {total} records…","shell.reading":"Reading {done} of {total} records…","shell.saving":"Saving…","shell.allSaved":"All changes saved","shell.notSaved":"Not saved: {message}","shell.savingSlow":"Still saving: the server has not answered yet","shell.tryAgain":"Try again","shell.dismissStatus":"Dismiss","shell.failSave":"Could not save {field} of {record}. {reason}","shell.failSaveTyped":"Could not save {field} of {record}. {reason} You entered: {value}","shell.failSaveRecord":"Could not save {record}. {reason}","shell.failAdd":"Could not add {record}. {reason}","shell.failAddMany":"Could not add {records}. {reason}","shell.failDelete":"Could not delete {record}. {reason} It is still in the table.","shell.failDeleteMany":"Could not delete {records}. {reason} They are still in the table.","shell.failPurge":"Could not delete {record} forever. {reason} It is still in the trash.","shell.failPurgeMany":"Could not delete {records} forever. {reason} They are still in the trash.","shell.undoLeftAway":"{records} left out: someone deleted them. If they are restored, they keep the edit.","shell.failLinkGone":"The record {record} linked to was deleted forever, so this link cannot come back.","shell.linkToTrash":"The record you linked to is in the trash. The link stays empty until someone restores it.","shell.failPurgeHalf":"Could not delete {record} forever. {reason} It stopped half way, so its links may be gone and it cannot be restored. Press Delete forever again to finish.","shell.failPurgeHalfMany":"Could not delete {records} forever. {reason} It stopped half way, so their links may be gone and they cannot be restored. Press Delete forever again to finish.","shell.purgeUnderWay":"{record} cannot be restored: someone has started to delete it forever. If it stays in the trash, that delete did not finish, and Delete forever will finish it.","shell.purgeUnderWayMany":"{records} cannot be restored: someone has started to delete them forever. If they stay in the trash, that delete did not finish, and Delete forever will finish it.","shell.cannotRestorePurging":"A delete forever of this record did not finish. Its links may be gone, so it cannot be restored. Delete it forever to finish.","shell.purgeCameBack":"{record} was not deleted: someone restored it first.","shell.purgeCameBackMany":"{records} were not deleted: someone restored them first.","shell.undoPurged":"{record} was deleted forever, so it cannot come back.","shell.undoPurgedMany":"{records} were deleted forever, so they cannot come back.","shell.failRestore":"Could not put {record} back. {reason} It is still in the trash.","shell.failRestoreMany":"Could not put {records} back. {reason} They are still in the trash.","shell.failMany":"{count} changes could not be saved. {reason}","shell.why.offline":"The server could not be reached.","shell.why.noAnswer":"The server did not answer, so it may not have been stored.","shell.why.required":"This field needs a value.","shell.why.duplicate":"Another record already has this value.","shell.why.notAccepted":"The database does not accept this value.","shell.why.idTooLong":"Record ids need {need} characters; this table's id column holds {holds}. Ask whoever runs the database to make it wider.","shell.why.linked":"Other records depend on it.","shell.why.linkedCircle":"These records link to each other in a circle, and this database checks each link as it deletes, so they were not deleted. Empty the link of one of them first.","shell.why.linkRefused":"The linked record is not there, or you may not link to it. Pick another.","shell.why.noPermission":"You do not have permission to do this.","shell.why.gone":"This record no longer exists.","shell.why.notDeleted":"The database kept it, so you may not have permission.","shell.why.noRead":"The server did not answer.","shell.why.readError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.linkMissing":"The record it points to is not there.","shell.why.linkMissingField":"The record {field} points to is not there.","shell.why.linkMissingFields":"The record that {fields} point to is not there.","shell.why.serverError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.unknown":"No reason came with the error that this page may show. Whoever runs the database can see it in its log.","shell.why.said":"The server said: {said}","shell.why.readSaid":"The server answered with an error: {said}","shell.couldNotLoad":"Could not load {table}: {message}","shell.loadFailedTitle":"Could not load {table}","shell.loadTryAgain":"Try again","shell.loadTrying":"Trying again…","shell.couldNotSave":"Could not save {table}: {message}","shell.trashSaveFailed":"Could not save the trash: {message}","shell.trashReadFailed":"Could not read the trash: {message}","shell.deleted":"Deleted {what}","shell.restored":"Restored {what}","shell.theField":"the field {name}","shell.theTable":"the table {name}","shell.theView":"the view {name}","shell.stepDeleteView":"delete view {name}","shell.aField":"a field","shell.importedNewTable":"Imported {records} into a new table, {name}","shell.importedInto":"Imported {records} into {table}","shell.importedIntoFallback":"the table","shell.stepCellEdit":"cell edit","shell.stepCells.one":"{count} cell","shell.stepCells.other":"{count} cells","shell.stepResize":"resize","shell.stepMoveField":"move field","shell.stepAddRecord":"add record","shell.stepMoveRecord":"move record","shell.undoRecordStays":"Someone has changed this record since, so it stays. Delete it if it should go.","shell.undoCellStays.one":"Someone has changed this cell since, so it keeps their value.","shell.undoCellStays.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoCellsKept.one":"Someone has changed 1 of these cells since, so it keeps their value.","shell.undoCellsKept.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoRecordsKept.one":"Someone has changed 1 of these records since, so it keeps their value.","shell.undoRecordsKept.other":"Someone has changed {count} of these records since, so they keep their values.","shell.undoCannotCheck":"The database could not be reached to check this cell, so nothing was changed. Try again in a moment.","shell.undoStillSaving":"This record is still saving, so nothing was changed. Try again once it has saved.","shell.undoRunning":"Undo is still running.","shell.redoRunning":"Redo is still running.","shell.undoStopped":"Undo stopped: {done} of {total} records were put back. Undo again to put back the rest.","shell.redoStopped":"Redo stopped: {done} of {total} records were changed again. Redo again to do the rest.","shell.undoCellsStopped":"Undo stopped: {done} of {total} cells were put back. Undo again to put back the rest.","shell.redoCellsStopped":"Redo stopped: {done} of {total} cells were changed again. Redo again to do the rest.","shell.undoAddStopped":"Undo stopped: {done} of {total} new records were taken out. Undo again to take out the rest.","shell.redoAddStopped":"Redo stopped: {done} of {total} records were added again. Redo again to add the rest.","shell.redoDeleteStopped":"Redo stopped: {done} of {total} records were deleted again. The rest stay, and Undo brings back those it deleted.","shell.undoRecordGone":"This record has been deleted, so nothing was changed.","shell.retryChanged.one":"This cell has changed since, so it keeps its new value.","shell.retryChanged.other":"{count} cells have changed since, so they keep their new values.","shell.retryGone.one":"The record has been deleted, so this was not saved.","shell.retryGone.other":"{count} records have been deleted, so these were not saved.","shell.retryGoneTyped":'The record has been deleted, so "{value}" was not saved.',"shell.retryUnread":"The record could not be read to check it, so nothing was saved.","shell.deleteCannotRead":"The database could not be read, so these records were not deleted. Try again in a moment.","shell.pasteLeftOut.one":'"{text}" does not fit {field}, so that cell keeps its value.',"shell.pasteLeftOut.other":"{count} values do not fit their fields, so those cells keep their values.","shell.pasteLoading":"The view is still loading, so nothing was pasted. Paste again when the rows are shown.","shell.formulaInField":"In a base, a formula is a field of its own: it works out a value for every record at once.","shell.formulaMakeField":"Make a formula field","shell.formulaIsSummary":"The summary bar under the table works this out for {field}, and keeps it up to date as records change.","shell.formulaShowSummary":"Show it for {field}","shell.sumShown":"The sum of {field} is in the summary bar under the table. It keeps up as records change.","shell.sumNotNumbers":"{field} does not hold numbers, so there is nothing to add up. Select a number field and press Alt+= again.","shell.sumNoBar":"A base adds up a field in the summary bar under the table, and this view does not show one.","shell.totalRecord":"No total record needed: the summary bar under the table adds up each number field, and keeps up as records change.","shell.totalShowSums":"Show the sums","shell.formatInBase":"A base keeps no bold or colors typed into cells, so every screen reads the same data. Color rows or cells by what they hold with Color in the toolbar.","shell.formatOpenColor":"Open Color","shell.pasteNoField.one":"One column of the paste had no field to go in, so it was left out.","shell.pasteNoField.other":"{count} columns of the paste had no field to go in, so they were left out.","shell.pasteNamesLeftOut":"The first line holds the names of the fields, so it is not pasted as a record.","shell.pasteFieldsTitle.one":"Add a field for this paste?","shell.pasteFieldsTitle.other":"Add {count} fields for this paste?","shell.pasteFieldsBody.one":"The paste has one more column than the table has from here. Add a field for it:","shell.pasteFieldsBody.other":"The paste has {count} more columns than the table has from here. Add a field for each:","shell.pasteFirstLineNames":"The first line holds the names of the fields","shell.pasteWithout":"Paste without them","shell.pasteAddFields.one":"Add the field and paste","shell.pasteAddFields.other":"Add {count} fields and paste","shell.pasteNewTitle":"New records","shell.pasteNewAsk":"This paste runs past the last record. Add {records}?","shell.pasteNewConfirm":"Add records","shell.pasteNewPart":"{done} of {total} new records were added.","shell.rangeLoading":"The view is still loading, so nothing was changed. Try again when the rows are shown.","shell.rangeMovedPaste":'Records moved while this was read. Nothing was changed. Try again pastes from "{name}" down over the rows as they are now.',"shell.rangeMovedValue":'Records moved while this was read. Nothing was changed. Try again puts the value in from "{name}" down over the rows as they are now.',"shell.rangeMovedClear":'Records moved while this was read. Nothing was changed. Try again clears from "{name}" down over the rows as they are now.',"shell.rangeMovedFill":'Records moved while this was read. Nothing was changed. Try again fills from "{name}" down over the rows as they are now.',"shell.rangeMovedSelect":"Records moved while this was read. Nothing was changed. Select the cells again.","shell.rangeAnchorGone":'"{name}" is no longer among the rows shown, so nothing was changed. Select the cells again.',"shell.rangeAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.rangeAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.copyAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.copyAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.rangeAgainCovers":'From "{name}" down over {count} rows, selected in the view.',"shell.rangeElsewhere":"That view is no longer open, so nothing was changed.","shell.rangeViewChanged":"The view has changed since, so nothing was changed.","shell.copyElsewhere":"That view is no longer open, so nothing was copied.","shell.copyViewChanged":"The view has changed since, so nothing was copied.","shell.rangeDraftsLeft.one":"1 new record is not stored yet, so it was left out. Change it on its own row.","shell.rangeDraftsLeft.other":"{count} new records are not stored yet, so they were left out. Change them on their own rows.","shell.rangeMoveRefused":"A move can only use rows that are on screen, and {records} of this one are not loaded, so nothing moved. Copy and paste reach them.","shell.copyTitle":"Copy","shell.copyReading":"Reading the selection: {done} rows so far","shell.copyTooBig":"This selection is {cells} cells, more than the {limit} a copy can hold, so nothing was copied. Download this view instead: it holds every record.","shell.copyMovedFrom":'Records moved while this was read. Nothing was copied. Try again copies from "{name}" down over the rows as they are now.',"shell.copyMovedSelect":"Records moved while this was read. Nothing was copied. Select the cells again.","shell.copyAnchorGone":'"{name}" is no longer among the rows shown, so nothing was copied. Select the cells again.',"shell.copyFailed":"Could not read the selection, so nothing was copied: {message}","shell.copyDone":"Copied {count} rows","shell.copyReady":"{count} rows are ready. The browser needs one more click to put them on the clipboard.","shell.copyButton":"Copy","shell.copyRefused":"The browser would not put this much on the clipboard. Download this view instead.","shell.cutRefused":"The browser would not put the cells on the clipboard, so nothing was cut.","shell.cutMoved":"The selection changed before the cells reached the clipboard, so nothing was cleared.","shell.stepPasteRecords":"paste {records}","shell.stepBulkEdit":"edit {records}","shell.bulkReading":"Reading the selection: {done} records so far","shell.bulkFailed":"Could not read the selection, so nothing was changed: {message}","shell.bulkTitle":"Edit records","shell.bulkAsk":"Change {count}?","shell.bulkRuns":"Also run automations: up to {count} runs","shell.bulkRunsTime":"They run one at a time in this tab after the save: about {time} at {rate} a second. Runs left when the tab closes do not happen.","shell.bulkRunsTab":"They run one at a time in this tab after the save. Runs left when the tab closes do not happen.","shell.runsLine":"Running automations: {done} of {total}","shell.runsLineLeft":"Running automations: {done} of {total}, about {time} left","shell.runsStop":"Stop","shell.runsDone":"Automations ran on {total} changes.","shell.runsStopped":"Stopped: {done} of {total} automation runs are done. The other {left} will not run.","shell.timeSeconds":"less than a minute","shell.timeMinutes.one":"1 minute","shell.timeMinutes.other":"{count} minutes","shell.timeHours.one":"1 hour","shell.timeHours.other":"{count} hours","shell.bulkAskNoUndo":"That is too many to undo: once changed, they cannot be changed back from here.","shell.bulkConfirm":"Change records","shell.bulkWriting":"Saving {done} of {total} records...","shell.cellsWriting":"Saving {done} of {total} cells...","shell.bulkDone":"Changed {done} of {total} records","shell.bulkStopped":"Stopped: {done} of {total} records were changed.","shell.bulkFailedPart":"{done} of {total} records were changed, then the save stopped. {reason}","shell.bulkFailedUnsure":"At least {done} of {total} records were changed, then the save stopped and the database could not be read to check the last block. {reason}","shell.bulkUndoLeft":"Undo takes these back.","shell.bulkNoUndoLeft":"That is too many to undo.","shell.failSaveMany":"Could not save {records}. {reason}","shell.stepDeleteRecords":"delete {records}","shell.addColumnFailed":"The column for {field} was not added: {error}","shell.addColumnYourself":"{field} needs a column in {table} before it can store values. Add it to the database: {sql}","shell.duplicateNeedsColumn":"A copy of {field} needs a column of its own in {table}, and the base cannot add one there, so nothing was copied. Add the column to the database first: {sql}","shell.deleting":"Deleting {done} of {total} records...","shell.deleteNoTrash":"That is too many for the trash: they cannot be restored.","shell.scanDrift":"Records changed while this view was being read, so its count may be out by a few.","shell.noSqlSort":"This database cannot work out {fields}, so the view does not sort or total on it.","shell.noSqlView":"This database cannot work out {fields}, so the view cannot filter or group on it. Take it out of the filter or the grouping.","shell.deleteGroupShort":"The group {key} read back {read} records of {size}, so what was left out of the selection cannot be told apart. Nothing was deleted.","shell.deleteGroupUnknown":"How many records the group {key} holds is not known here, so what was left out of the selection cannot be told apart. Nothing was deleted. Tick what should go instead.","shell.deleteTitle":"Delete records","shell.deleteReading":"Finding the records to delete: {done} read...","shell.deleteAsk":"Delete {count}?","shell.deleteAskTrash":"They go to the trash, and undo brings them back.","shell.deleteNothing":"None of the selected records are there any more.","shell.deleteStop":"Stop","shell.deleteCancel":"Cancel","shell.deleteConfirm":"Delete","shell.deleteDone":"Deleted {done} of {total} records","shell.deleteFailed":"Could not read the selection, so nothing was deleted: {message}","shell.columnExists":"The column {column} already exists in {table}, so {field} was stored as {name}.","shell.stepAddField":"add field {name}","shell.stepChangeField":"change field {name}","shell.stepDeleteField":"delete field {name}","shell.stepAddTable":"add table {name}","shell.stepRenameTable":"rename table to {name}","shell.stepDuplicateTable":"duplicate table {name}","shell.stepDeleteTable":"delete table {name}","shell.stepRestore":"restore from the trash","shell.stepImportTable":"import {name}","shell.stepImportRecords":"import {records}","shell.tablesLabel":"Tables","shell.tableName":"Table name","shell.tableActions":"Table actions","shell.tableOptions":"{name} table options","shell.renameTable":"Rename table","shell.duplicateTable":"Duplicate table","shell.importRecordsFromFile":"Import records from a file","shell.keepOneTable":"A base keeps at least one table","shell.deleteTable":"Delete table","shell.allTables":"All tables","shell.importAsTable":"Import a file as a table","shell.importAsTableTitle":"A CSV, TSV, Excel or JSON file as a new table, with a field type for each column","shell.downloadCsv":"Download this view as CSV","shell.downloadExcel":"Download this view as Excel","shell.downloadViewTitle":"The records and fields this view shows, as they read on screen","shell.exportNothing":"This view has no records to download.","shell.excelNeedsZip":"This app cannot write Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip.","shell.exportFailed":"Could not make the file. Try again.","shell.downloadSql":"Download as SQL","shell.downloadFiles":"Download the files (ZIP)","shell.downloadFilesTitle":"Every file this view shows, in a folder for each group, or for each record","shell.exportNoFiles":"This view shows no files.","shell.downloadSqlTitle":"The tables, links, records, views and automations, ready for Postgres or Supabase","shell.addTable":"Add table","shell.addTableWays":"More ways to add a table","shell.blankTable":"Blank table","shell.viewOnly":"View only","shell.viewOnlyTitle":"You can look at these tables but not change them","shell.undo":"Undo","shell.undoStep":"Undo {step}","shell.undoStepTitle":"Undo {step} (Ctrl+Z)","shell.nothingToUndo":"Nothing to undo","shell.redo":"Redo","shell.redoStep":"Redo {step}","shell.redoStepTitle":"Redo {step} (Ctrl+Shift+Z)","shell.nothingToRedo":"Nothing to redo","shell.trashButton":"Trash, {items}","shell.trashTitle":"Deleted records, fields and tables","shell.deleteNamed":"Delete {name}?","shell.deleteTableRecords.one":"Its {count} record goes with it, and so do its views.","shell.deleteTableRecords.other":"Its {count} records go with it, and so do its views.","shell.deleteTableLinks":"These fields of other tables link to it, or read a link to it, and are deleted too:","shell.readsLink":"{table}: {field} (reads {link})","shell.cancel":"Cancel","shell.searchAllTables":"Search all tables","shell.searchResults":"Search results","shell.searchRecords":"Records","shell.searchMore":"{count} more in {table}","shell.searchNone":"No records match.","shell.searchFoot":"{records} in {tables}","shell.trash":"Trash","shell.trashShow":"Show","shell.trashAll":"All","shell.trashRecords":"Records","shell.trashFields":"Fields","shell.trashTables":"Tables","shell.trashViews":"Views","shell.findInTrash":"Find in trash","shell.trashEmpty":"The trash is empty. Deleted records, fields and tables come here.","shell.trashEmptyDays":"The trash is empty. Deleted records, fields and tables come here and stay {days} days.","shell.trashNoMatch":"Nothing in the trash matches.","shell.trashItems":"Deleted items","shell.kindRecord":"Record","shell.kindView":"View","shell.kindField":"Field","shell.kindTable":"Table","shell.trashIn":"{kind} in {table}","shell.trashTableRecords.one":"{kind}, {count} record","shell.trashTableRecords.other":"{kind}, {count} records","shell.trashDeletedTable":"{name} (deleted)","shell.trashADeletedTable":"a deleted table","shell.trashBy":"by","shell.agoNow":"just now","shell.agoMinutes":"{n} min ago","shell.agoHours":"{n} h ago","shell.agoYesterday":"yesterday","shell.agoDays":"{n} days ago","shell.restore":"Restore","shell.restoreItem":"Restore {name}","shell.restoreAll":"Restore all","shell.restoreThese":"Restore these","shell.deleteForever":"Delete forever","shell.deleteItemForever":"Delete {name} forever","shell.deleteCountForever":"Delete {count} forever","shell.keepThem":"Keep them","shell.keepIt":"Keep it","shell.deleteAskForever":"Delete this forever? It cannot be undone.","shell.emptyTrash":"Empty trash","shell.trashNoteDays":"Items are deleted for good after {days} days.","shell.trashNoteKeep":"Items stay until the trash is emptied.","shell.trashNotePage":"Items stay until this page is closed or reloaded.","shell.trashNoteMarked":"Records stay in their table until they are deleted forever. Fields, views and tables stay until this page is closed or reloaded.","shell.trashClosed":"Deleted records are listed for people who may delete. Ask whoever runs this base if you need one back.","shell.trashEmptyMarked":"The trash is empty. Deleted records stay in their table and come here. Deleted fields, views and tables stay until this page is closed or reloaded.","shell.trashMore":"Showing the latest {shown} of {total} deleted records.","shell.trashEmptyPage":"The trash is empty. Deleted records, fields and tables come here and stay until this page is closed or reloaded.","shell.unnamedRecord":"Untitled record","shell.fieldFallback":"Field","shell.cannotRestoreTable":"A table with its id is in the base","shell.cannotRestoreNoTable":"Its table was deleted: restore the table first","shell.cannotRestoreRecord":"The record is in its table","shell.cannotRestoreField":"A field with its id is in the table","shell.importNewTitle":"Import a file as a new table","shell.importIntoTitle":"Import records into {table}","shell.thisTable":"this table","shell.importChoose":"Choose a CSV or Excel file","shell.importReading":"Reading the file…","shell.importDrop":"Drop a file here, or click to choose one","shell.importFormats":"CSV, TSV, Excel (.xlsx) or JSON. The first row names the columns.","shell.importNoRecords":"The file has a header row and no records.","shell.importBinary":"This file is not text. Choose a CSV, TSV, Excel (.xlsx) or JSON file.","shell.importNeedsZip":"This app cannot read Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip, or import the file as CSV.","shell.importBadExcel":"This file could not be read as an Excel workbook. Open it in Excel and save it again as .xlsx.","shell.importBadJson":'This file could not be read as JSON. It needs to be a list of records: [{ "name": "Ana" }, ...].',"shell.importSeparator":"Separator","shell.importEncoding":"Encoding","shell.importComma":"Comma","shell.importSemicolon":"Semicolon","shell.importTab":"Tab","shell.importPipe":"Pipe","shell.importWarnEncoding":"This file is not UTF-8, so it was read as {encoding}. If letters look wrong, choose another encoding above.","shell.importWarnUnclosed.one":"A quote on line {line} is never closed. It was kept as text, and the rows after it were read as usual. Check that row after the import.","shell.importWarnUnclosed.other":"{count} quotes are never closed, the first on line {line}. They were kept as text, and the rows after them were read as usual. Check those rows after the import.","shell.importWarnStray.one":"A quote on line {line} is in an unusual place and was kept as text. Check that row after the import.","shell.importWarnStray.other":"{count} lines have a quote in an unusual place, the first on line {line}. They were kept as text. Check those rows after the import.","shell.importWarnLong.one":"The row on line {line} has more cells than the header row. The extra cells are in columns of their own below.","shell.importWarnLong.other":"{count} rows have more cells than the header row, the first on line {line}. The extra cells are in columns of their own below.","shell.importWarnShort.one":"The row on line {line} has fewer cells than the header row. Its missing cells stay empty.","shell.importWarnShort.other":"{count} rows have fewer cells than the header row, the first on line {line}. Their missing cells stay empty.","shell.importWarnLost.one":"1 value does not fit the field it goes to and would be left empty. Change that field type or skip the column to keep it.","shell.importWarnLost.other":"{count} values do not fit the fields they go to and would be left empty. Change those field types or skip the columns to keep them.","shell.importWarnUnmatched.one":"1 cell names a person or a record that was not found, so that name is not imported.","shell.importWarnUnmatched.other":"{count} cells name a person or a record that was not found, so those names are not imported.","shell.importWarnRepeated.one":"1 record has the same name as a record already in this table. Importing adds it as a second record.","shell.importWarnRepeated.other":"{count} records have the same name as records already in this table. Importing adds them as second records.","shell.importSummary.one":"{file}: {count} record, {columns} columns","shell.importSummary.other":"{file}: {count} records, {columns} columns","shell.importAnother":"Choose another file","shell.importInto":"Import into","shell.importModeNew":"A new table","shell.importModeAppend":"Add records to {table}","shell.theShownTable":"the shown table","shell.importColumn":"Column","shell.importFieldType":"Field type","shell.importFirstValues":"First values","shell.importFileColumn":"Column in the file","shell.importGoesTo":"Goes to field","shell.importNamesRecords":"names the records","shell.importFieldTypeOf":"Field type of {name}","shell.importFieldFor":"Field for {name}","shell.importSkip":"Skip this column","shell.importNoMapping":"No column goes to a field yet.","shell.importButton.one":"Import {count} record","shell.importButton.other":"Import {count} records","shell.importFieldName":"Field {n}","shell.importedName":"Imported","shell.importedRecordName":"Imported {n}","shell.deleteRecordTitle":"Delete record?","shell.deleteRecordNamed":"{name} is deleted, and its links from other records go with it.","shell.deleteRecordUnnamed":"This record is deleted, and its links from other records go with it.","shell.deleteRecord":"Delete record","shell.fieldLinksTo":"{name} links to {table}.","shell.anotherTable":"another table","shell.fieldLinkBack":"The field there that links back, {name}, is deleted with it.","shell.fieldLinksGo":"The links between the records go too.","shell.fieldReaders":"These fields read it and are deleted too: {fields}.","shell.fieldDeleted":"{name} and its values are deleted.","shell.fieldFormulas":"These formulas read it and will show #ERROR: {fields}.","shell.deleteField":"Delete field","shell.fieldUses":"Used by:","shell.usesView":"{name}: {uses}","shell.usesAutomation":"Automation {name}: it no longer reads or writes this field","shell.usesStack":"stacks its cards by it, and shows as a plain grid without it","shell.usesDates":"places its records by it, and shows as a plain grid without it","shell.usesBars":"draws its bars with it","shell.usesCover":"shows it as the card cover","shell.usesChart":"charts it","shell.usesFilter":"filters by it","shell.usesSort":"sorts by it","shell.usesGroup":"groups by it","shell.usesColor":"colors records by it","shell.usesForm":"asks for it","shell.usesList":"lists it","shell.usesTile":"a tile reads it","shell.cellChanged":"{field} changed to {value}","shell.cellCleared":"{field} cleared","shell.cellsChanged.one":"{count} cell changed","shell.cellsChanged.other":"{count} cells changed","shell.undoneStep":"Undone: {step}","shell.redoneStep":"Redone: {step}","shell.summarize":"Summarize","shell.summarizeField":"Summarize {field}","shell.summaryChange":"{summary} {value}, change summary","shell.summaryCount.one":"{count} record, summarize {field}","shell.summaryCount.other":"{count} records, summarize {field}","shell.recordsWord.one":"record","shell.recordsWord.other":"records","shell.summaryMenu":"Summary","shell.summary.none":"None","shell.summary.empty":"Empty","shell.summary.filled":"Filled","shell.summary.unique":"Unique","shell.summary.percentEmpty":"Percent empty","shell.summary.percentFilled":"Percent filled","shell.summary.sum":"Sum","shell.summary.avg":"Average","shell.summary.median":"Median","shell.summary.min":"Min","shell.summary.max":"Max","shell.summary.range":"Range","shell.summary.checked":"Checked","shell.summary.unchecked":"Unchecked","shell.summary.percentChecked":"Percent checked","shell.summary.earliest":"Earliest date","shell.summary.latest":"Latest date","shell.summary.dateRange":"Date range (days)","shell.searchKey":"Ctrl K","shell.tabHint":"Tab moves between cells. Press Esc, then Tab, to leave the grid.","shell.menuExpand":"Expand record","shell.menuSelect":"Select record","shell.menuDeselect":"Deselect record","shell.recordActions":"Actions for row {row}","shell.menuComment":"Comment","shell.menuInsertAbove":"Insert record above","shell.menuInsertBelow":"Insert record below","shell.menuAddSubtask":"Add subtask","shell.subtasks":"Subtasks","shell.treeNoLoop":"A record cannot go under itself or one of its own subtasks.","shell.treeMovedUnder":"{name} is now under {parent}","shell.treeMovedTop":"{name} is now at the top level","shell.menuDuplicate":"Duplicate record","shell.addField":"Add a field","shell.addRow":"Add row","shell.addRecord":"Add record","shell.groupEmpty":"Empty","shell.groupAdd":"Add a record to this group","shell.groupAddTo":"Add a record to {field} {value}","shell.groupColumn":"Group","shell.someoneElse":"Someone else","shell.unseenAdded":"{who} added this record {ago}","shell.unseenChanged":"{who} changed this record {ago}","shell.selectRow":"Select row {row}","shell.selectAllRows":"Select all rows","shell.expandRow":"Expand row","shell.expandRowN":"Expand row {row}","shell.comments.one":"{count} comment","shell.comments.other":"{count} comments","shell.commentsOnRow.one":"{count} comment on row {row}","shell.commentsOnRow.other":"{count} comments on row {row}","shell.changedBy":"{count} changed by {who}","shell.changedBySomeone":"someone else","shell.changedByOthers":"others","shell.dashboardRecords":"Records"};
|
|
@@ -1741,6 +1741,9 @@ export declare const BASE_MESSAGES: {
|
|
|
1741
1741
|
readonly 'shell.excelNeedsZip': "This app cannot write Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip.";
|
|
1742
1742
|
readonly 'shell.exportFailed': "Could not make the file. Try again.";
|
|
1743
1743
|
readonly 'shell.downloadSql': "Download as SQL";
|
|
1744
|
+
readonly 'shell.downloadFiles': "Download the files (ZIP)";
|
|
1745
|
+
readonly 'shell.downloadFilesTitle': "Every file this view shows, in a folder for each group, or for each record";
|
|
1746
|
+
readonly 'shell.exportNoFiles': "This view shows no files.";
|
|
1744
1747
|
readonly 'shell.downloadSqlTitle': "The tables, links, records, views and automations, ready for Postgres or Supabase";
|
|
1745
1748
|
readonly 'shell.addTable': "Add table";
|
|
1746
1749
|
readonly 'shell.addTableWays': "More ways to add a table";
|
package/dist/node/studio.js
CHANGED
|
@@ -913,7 +913,7 @@ ${E}
|
|
|
913
913
|
@keyframes st-home-spin { to { transform: rotate(360deg); } }
|
|
914
914
|
</style>
|
|
915
915
|
`}}function Ka(e){for(const r of e)je(r);const t=new Map(e.map(r=>[r.name,r])),a=e.map(r=>{const o=Eu(r,t);return{schema:Fu(r,o),infos:o}});return{entries:a,seed:Du(a)}}function fo(e,t={}){const{entries:a,seed:r}=Ka(e),{file:o,needs:n}=em(a,r,t.sources,t.supabaseConn,t.serverMemory),i=[Lu(a),o];(n.supabase||t.supabaseAuth)&&!n.supabaseUrl&&(t.supabaseConn?.url||t.supabaseConn?.key)&&(n.supabaseUrl=t.supabaseConn.url,n.supabaseKey=t.supabaseConn.key),(n.supabase||t.supabaseAuth)&&i.push(tm(n));for(const s of n.sqlRoutes)i.push(Hu(s.schema,s.table,s.dialect,{access:t.accessEnabled,audit:t.auditEnabled,screenIds:t.screensByEntity?.get(s.schema.name)??[],triggers:t.triggers?.[s.schema.name],dbSchema:s.dbSchema,tenantField:t.tenantField&&t.tenantScoped?.(s.schema.name)!==!1?t.tenantField:void 0}));if(n.memoryRoutes.length){i.push(Gu(n.memoryRoutes));for(const s of n.memoryRoutes)i.push(Vu(s.schema,{access:t.accessEnabled,audit:t.auditEnabled,screenIds:t.screensByEntity?.get(s.schema.name)??[],triggers:t.triggers?.[s.schema.name],tenantField:t.tenantField&&t.tenantScoped?.(s.schema.name)!==!1?t.tenantField:void 0}))}return{files:i,prepared:a.map(s=>s.schema)}}function am(e){if(e.length===0)throw new Error("emitStudioApp: no schemas to emit");const{files:t,prepared:a}=fo(e),r=a.map(n=>{const i=z(n);return{href:`/${i.route}`,label:i.label}}),o={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. */
|
|
916
|
-
`};return[...t,...a.map(n=>Ni(n)),Mi(r),ji(r),o]}function rm(e){return e.fields.some(t=>!!t.when&&(!!t.when.visible||!!t.when.disabled||!!t.when.required))}var om="3.1.
|
|
916
|
+
`};return[...t,...a.map(n=>Ni(n)),Mi(r),ji(r),o]}function rm(e){return e.fields.some(t=>!!t.when&&(!!t.when.visible||!!t.when.disabled||!!t.when.required))}var om="3.1.50",nm="3.0.37",V=(e,t)=>e.some(a=>a.config.kind===t),qi=e=>`activeTab_${e.replace(/[^a-zA-Z0-9_$]/g,"_")}`,aa=(e,t)=>`${e}-${t}`,zi=e=>`accOpen_${e.replace(/[^a-zA-Z0-9_$]/g,"_")}`,ra=(e,t)=>`${e}-s${t}`,oa=e=>`md_${e.replace(/[^a-zA-Z0-9]/g,"_")}_rows`;function im(e){switch(e.type){case"number":{const t=e.decimals;return t!=null?`{ type: 'number', options: { minimumFractionDigits: ${t}, maximumFractionDigits: ${t} } }`:"{ type: 'number' }"}case"currency":return`{ type: 'currency', currency: ${S(e.currency||"USD")} }`;case"percent":{const t=["type: 'percent'"];return e.valueIsPercentPoints&&t.push("valueIsPercentPoints: true"),e.decimals!=null&&t.push(`options: { minimumFractionDigits: ${e.decimals}, maximumFractionDigits: ${e.decimals} }`),`{ ${t.join(", ")} }`}case"date":case"datetime":return e.pattern?`{ type: '${e.type}', pattern: ${S(e.pattern)} }`:`{ type: '${e.type}' }`}}function sm(e,t,a,r){if(t.config.kind!=="grid")return`schemaToColumns(${e})`;const o=t.config,n=t.id.replace(/-/g,"_"),i=o.columns.filter(b=>b.show),s=new Set(i.map(b=>b.field)),d=new Set,l=i.map(b=>{const y=r?.get(b.field);return{c:b,col:y&&!s.has(y)?y:b.field}}).filter(b=>!d.has(b.col)&&!!d.add(b.col)),c=o.editing==="inline"?"":", editable: false";if(l.length===0)return c?`schemaToColumns(${e}).map((c) => ({ ...c${c} }))`:`schemaToColumns(${e})`;const p=l.map(b=>`'${b.col}'`),u=l.map(({c:b,col:y})=>{const w=[];return b.header&&w.push(`header: ${JSON.stringify(b.header)}`),b.width!=null&&w.push(`width: ${b.width}`),b.align&&w.push(`align: '${b.align}'`),b.aggregate&&w.push(`aggregate: '${b.aggregate}'`),o.treeData&&b.field===o.treeData.labelField&&a?w.push(`cell: (ctx: CellContext<${a}>) => renderSnippet(treeCell_${n}, { value: ctx.getValue(), row: ctx.row.original })`):b.cellType&&a?w.push(`cell: (ctx: CellContext<${a}>) => renderSnippet(${Gi(n,b.field)}, { value: ctx.getValue() })`):b.format&&w.push(`format: ${im(b.format)}`),w.length?`'${y}': { ${w.join(", ")} }`:null}).filter(b=>!!b),m=u.length?` const ov: Record<string, Partial<(typeof all)[number]>> = { ${u.join(", ")} };`:"",g=u.length?", ...(ov[String(c.field)] ?? {})":"",h=`[${p.join(", ")}].map((f) => all.find((c) => c.field === f)).filter((c): c is (typeof all)[number] => !!c)`;return`(() => { const all = schemaToColumns(${e});${m} return ${c||g?`${h}.map((c) => ({ ...c${c}${g} }))`:h} })()`}function Ae(e,t){const a=[`grid-column: span ${ei(e)}`,"min-width: 0"];t&&a.push(t);const r=ti(e.style);return r&&a.push(r),`style="${a.join("; ")}"`}var lm=e=>e&&e.replace(/[^#a-zA-Z0-9(),.%\s_-]/g,"").slice(0,40)||"var(--sg-accent)";function Ue(e,t){const a=[t,Xn(e)].filter(Boolean).join(" ");return a?` class="${a}"`:""}function Ha(e){const t=Ta(e.className);return t?` ${t}`:""}function dm(e){const t=Fe(e);if(t==="grid"){const a=ui(e),r=a.maxWidth?` max-width: ${a.maxWidth}px; margin-inline: auto;`:"";return` .st-screen { grid-template-columns: repeat(12, 1fr); gap: ${a.rowGap}px ${a.colGap}px; align-items: ${a.align};${r} }
|
|
917
917
|
@media (max-width: ${a.mobileBreakpoint}px) { .st-screen { grid-template-columns: 1fr; gap: 12px; } }
|
|
918
918
|
`}if(t==="stack"){const a=mi(e),r=a.maxWidth?` max-width: ${a.maxWidth}px;${a.align==="center"?" margin-inline: auto;":""}`:"",o=a.minHeight?`
|
|
919
919
|
.st-stack > * { min-height: ${a.minHeight}px; }`:"",n=a.dividers?`
|
package/dist/version.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* `version.test.ts` asserts this matches `package.json`, so the two cannot drift.
|
|
12
12
|
*/
|
|
13
|
-
export declare const SVGRID_VERSION = "3.1.
|
|
13
|
+
export declare const SVGRID_VERSION = "3.1.50";
|
|
14
14
|
/**
|
|
15
15
|
* The version of `@svgrid/grid`, which releases on its own line: enterprise is
|
|
16
16
|
* on 3.1.x while the grid is on 3.0.x.
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SVGRID_VERSION="3.1.
|
|
1
|
+
export const SVGRID_VERSION="3.1.50",GRID_VERSION="3.0.37";
|