@svgrid/enterprise 3.1.39 → 3.1.41
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/SvGridBoard.svelte +20 -3
- package/dist/SvGridScheduler.svelte +112 -6
- package/dist/cdn/smart.export.entry-BvRk9kiK.js +0 -0
- package/dist/cdn/svgrid-enterprise.svelte-external.js +541 -538
- package/dist/designer/assets/GridFind-DSgjlakI.js +1 -0
- package/dist/designer/assets/GridFooter-EjA_7y8w.js +1 -0
- package/dist/designer/assets/GridMenus-BBsuf2vC.js +1 -0
- package/dist/designer/assets/PinSplitter-oi6ffxQy.js +1 -0
- package/dist/designer/assets/SvChartMenu-Durtznhb.js +1 -0
- package/dist/designer/assets/SvDateRangeInput-oZyXTEr3.js +1 -0
- package/dist/designer/assets/SvDateTimePicker-CUobIgHE.js +1 -0
- package/dist/designer/assets/SvGridCellEditor-D_rvqE02.js +3 -0
- package/dist/designer/assets/SvGridChart-D0XxAoxS.js +2 -0
- package/dist/designer/assets/SvGridChartBuilder-CkuDEcl1.js +1 -0
- package/dist/designer/assets/SvGridChartPanel-BUsAzEtx.js +3 -0
- package/dist/designer/assets/SvGridChartView-CU_9mwuA.js +1 -0
- package/dist/designer/assets/SvGridDropdown-BtnFfHzX.js +1 -0
- package/dist/designer/assets/SvListBox-0SCz8lCl.js +2 -0
- package/dist/designer/assets/SvMenuList-DpXScUvp.js +1 -0
- package/dist/designer/assets/SvTabs-CYhfWOzJ.js +1 -0
- package/dist/designer/assets/chart-D0Hi9Ajj.js +1 -0
- package/dist/designer/assets/{chart-panel-messages-D2esv6rR.js → chart-panel-messages-CUwx2rdP.js} +1 -1
- package/dist/designer/assets/date-format-C5MG3rPF.js +1 -0
- package/dist/designer/assets/dismissable-BA8Sdkgf.js +1 -0
- package/dist/designer/assets/grid-extension.svelte-BKJJBM8e.js +1 -0
- package/dist/designer/assets/{index-6iBLPJQo.js → index-OcSC-rI4.js} +654 -654
- package/dist/designer/assets/index-axFTZtlf.css +1 -0
- package/dist/designer/assets/index-client-CwjHmKgT.js +2 -0
- package/dist/designer/assets/{range-commit-CvP8vrGh.js → range-commit-B_t6HYjs.js} +1 -1
- package/dist/designer/assets/row-drag-Dt3zdAss.js +1 -0
- package/dist/designer/assets/smart.export.entry-BvRk9kiK.js +0 -0
- package/dist/designer/assets/src-CYr2fa73.js +35 -0
- package/dist/designer/assets/src-rcijGyZS.js +1 -0
- package/dist/designer/index.html +17 -18
- package/dist/export.js +1 -1
- package/dist/fields/AttachmentDialog.svelte +5 -1
- package/dist/fields/AutomationAction.svelte +159 -0
- package/dist/fields/AutomationAction.svelte.d.ts +25 -0
- package/dist/fields/AutomationSteps.svelte +32 -0
- package/dist/fields/AutomationSteps.svelte.d.ts +25 -0
- package/dist/fields/AutomationTrigger.svelte +54 -0
- package/dist/fields/AutomationTrigger.svelte.d.ts +15 -0
- package/dist/fields/BarcodeScanner.svelte +17 -0
- package/dist/fields/BarcodeScanner.svelte.d.ts +6 -0
- package/dist/fields/BaseAutomations.svelte +11 -128
- package/dist/fields/BaseAutomations.svelte.d.ts +4 -0
- package/dist/fields/BaseDashboardView.svelte +58 -6
- package/dist/fields/BaseImport.svelte +2 -2
- package/dist/fields/BaseImport.svelte.d.ts +7 -0
- package/dist/fields/BasePivotView.svelte +56 -0
- package/dist/fields/BasePivotView.svelte.d.ts +9 -0
- package/dist/fields/BaseTableView.svelte +25 -3
- package/dist/fields/BaseTableView.svelte.d.ts +16 -1
- package/dist/fields/BaseTabs.svelte +54 -6
- package/dist/fields/BaseTabs.svelte.d.ts +7 -1
- package/dist/fields/DashboardTileEditor.svelte +62 -5
- package/dist/fields/DashboardTileEditor.svelte.d.ts +2 -0
- package/dist/fields/DateEditor.svelte +8 -3
- package/dist/fields/FieldInput.svelte +9 -2
- package/dist/fields/LinkPickerEditor.svelte +3 -2
- package/dist/fields/RecordTemplates.svelte +52 -0
- package/dist/fields/RecordTemplates.svelte.d.ts +10 -0
- package/dist/fields/RecordView.svelte +15 -3
- package/dist/fields/RowAdder.svelte +21 -3
- package/dist/fields/RowHeader.svelte +21 -2
- package/dist/fields/SelectEditor.svelte +12 -6
- package/dist/fields/SummaryCell.svelte +1 -1
- package/dist/fields/SvBase.svelte +13 -4
- package/dist/fields/SvBase.svelte.d.ts +52 -1
- package/dist/fields/SvBaseAutomations.svelte +205 -0
- package/dist/fields/SvBaseAutomations.svelte.d.ts +27 -0
- package/dist/fields/SvBaseForm.svelte +69 -34
- package/dist/fields/SvBaseForm.svelte.d.ts +13 -0
- package/dist/fields/SvBaseViewBar.svelte +29 -9
- package/dist/fields/SvBaseViewBar.svelte.d.ts +10 -0
- package/dist/fields/TimerCell.svelte +28 -0
- package/dist/fields/TimerCell.svelte.d.ts +16 -0
- package/dist/fields/TimerEditor.svelte +7 -0
- package/dist/fields/TimerEditor.svelte.d.ts +14 -0
- package/dist/fields/activity.svelte.d.ts +5 -0
- package/dist/fields/airtable.js +1 -1
- package/dist/fields/attachments.d.ts +8 -0
- package/dist/fields/attachments.js +1 -1
- package/dist/fields/automation-edit.d.ts +36 -0
- package/dist/fields/automation-edit.js +12 -0
- package/dist/fields/automation-outbound.d.ts +17 -0
- package/dist/fields/automation-outbound.js +1 -1
- package/dist/fields/automation-script.d.ts +59 -0
- package/dist/fields/automation-script.js +101 -0
- package/dist/fields/automation-server.d.ts +3 -0
- package/dist/fields/automation-server.js +1 -1
- package/dist/fields/automations.svelte.d.ts +74 -5
- package/dist/fields/automations.svelte.js +1 -1
- package/dist/fields/barcode-scan.d.ts +8 -0
- package/dist/fields/barcode-scan.js +1 -0
- package/dist/fields/base-compute.js +1 -1
- package/dist/fields/base-export.js +1 -1
- package/dist/fields/base-import.d.ts +6 -0
- package/dist/fields/base-import.js +1 -1
- package/dist/fields/base-permissions.d.ts +1 -1
- package/dist/fields/base-permissions.js +1 -1
- package/dist/fields/base-search.js +1 -1
- package/dist/fields/base-sync.d.ts +12 -2
- package/dist/fields/base-sync.js +1 -1
- package/dist/fields/base-tables.d.ts +20 -0
- package/dist/fields/base-tables.js +1 -1
- package/dist/fields/builtin-types.js +1 -1
- package/dist/fields/chart-view.d.ts +4 -0
- package/dist/fields/chart-view.js +1 -1
- package/dist/fields/convert.js +1 -1
- package/dist/fields/copy-text.js +1 -1
- package/dist/fields/dashboard.d.ts +84 -1
- package/dist/fields/dashboard.js +1 -1
- package/dist/fields/field-ops.js +1 -1
- package/dist/fields/filter-model.d.ts +1 -1
- package/dist/fields/filter-model.js +1 -1
- package/dist/fields/index.d.ts +12 -4
- package/dist/fields/index.js +1 -1
- package/dist/fields/messages/extras.d.ts +94 -0
- package/dist/fields/messages/extras.js +1 -1
- package/dist/fields/messages/fields.d.ts +19 -0
- package/dist/fields/messages/fields.js +1 -1
- package/dist/fields/messages/record.d.ts +13 -0
- package/dist/fields/messages/record.js +1 -1
- package/dist/fields/messages/shell.d.ts +5 -0
- package/dist/fields/messages/shell.js +1 -1
- package/dist/fields/messages/viewbar.d.ts +68 -2
- package/dist/fields/messages/viewbar.js +1 -1
- package/dist/fields/messages.svelte.d.ts +199 -2
- package/dist/fields/phone-sheet.d.ts +6 -0
- package/dist/fields/phone-sheet.js +1 -0
- package/dist/fields/record-actions.d.ts +23 -0
- package/dist/fields/record-actions.js +1 -0
- package/dist/fields/record-menu.js +1 -1
- package/dist/fields/record-store.svelte.d.ts +6 -2
- package/dist/fields/record-store.svelte.js +1 -1
- package/dist/fields/sources.svelte.d.ts +8 -0
- package/dist/fields/summaries.js +1 -1
- package/dist/fields/timer-clock.svelte.d.ts +4 -0
- package/dist/fields/timer-clock.svelte.js +1 -0
- package/dist/fields/timer.d.ts +22 -0
- package/dist/fields/timer.js +1 -0
- package/dist/fields/tree-edit.d.ts +47 -0
- package/dist/fields/tree-edit.js +1 -0
- package/dist/fields/view-actions.d.ts +23 -0
- package/dist/fields/view-actions.js +1 -0
- package/dist/fields/view-model.d.ts +28 -3
- package/dist/fields/view-model.js +1 -1
- package/dist/fields/viewbar/FilterPanel.svelte +1 -1
- package/dist/fields/viewbar/GanttPanel.svelte +13 -3
- package/dist/fields/viewbar/GanttPanel.svelte.d.ts +3 -1
- package/dist/fields/viewbar/HideFieldsPanel.svelte +13 -2
- package/dist/fields/viewbar/ViewsMenu.svelte +69 -7
- package/dist/fields/viewbar/ViewsMenu.svelte.d.ts +4 -0
- package/dist/node/studio.js +2 -2
- package/dist/scheduler-config.d.ts +10 -0
- package/dist/smart.export.entry.d.ts +3 -0
- package/dist/smart.export.entry.js +1 -0
- package/dist/smart.export.shim.d.ts +1 -0
- package/dist/smart.export.shim.js +1 -0
- package/dist/sources/rest.d.ts +5 -2
- package/dist/sources/rest.js +1 -1
- package/dist/studio/ui-components.generated.js +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/dist/wc/CardMenu-D7hQ19pw.js +1 -0
- package/dist/wc/GridFind-CBZMU9J6.js +1 -0
- package/dist/wc/GridFind-DtGF31ks.js +1 -0
- package/dist/wc/GridFooter-DQq6qsE3.js +1 -0
- package/dist/wc/GridFooter-p4dE9uns.js +1 -0
- package/dist/wc/GridMenus-C4QZ5jnj.js +16 -0
- package/dist/wc/GridMenus-sqW-Y7S5.js +16 -0
- package/dist/wc/{PinSplitter-DyRfU4Wz.js → PinSplitter-3i65naKl.js} +2 -2
- package/dist/wc/{PinSplitter-1fKh3Bwq.js → PinSplitter-CLTE0bRc.js} +2 -2
- package/dist/wc/SvChartMenu-B9HnHez5.js +3 -0
- package/dist/wc/SvChartMenu-B_tNFTkg.js +1 -0
- package/dist/wc/SvDateRangeInput-BPlKigkO.js +1 -0
- package/dist/wc/SvDateRangeInput-Djc93m9x.js +1 -0
- package/dist/wc/SvDateTimePicker-BEAAe3-f.js +4 -0
- package/dist/wc/SvDateTimePicker-DgPz0cBp.js +4 -0
- package/dist/wc/{SvField-DUBHk-OY.js → SvField-JpRX8GTw.js} +2 -2
- package/dist/wc/SvGridCellEditor-BrFHlf2T.js +3 -0
- package/dist/wc/SvGridCellEditor-DK9sYePL.js +3 -0
- package/dist/wc/SvGridChart-BHlM2v-1.js +171 -0
- package/dist/wc/SvGridChart-CH3IBusu.js +171 -0
- package/dist/wc/SvGridChartBuilder-BPbq8uLi.js +7 -0
- package/dist/wc/SvGridChartBuilder-Dil4AM1y.js +8 -0
- package/dist/wc/SvGridChartPanel-BNX4ElVR.js +5 -0
- package/dist/wc/{SvGridChartPanel-CTW5z6Vb.js → SvGridChartPanel-gLhTPhip.js} +3 -3
- package/dist/wc/{SvGridChartView-DOOboBce.js → SvGridChartView-CIogzaUy.js} +2 -2
- package/dist/wc/{SvGridChartView-CcIMqWgn.js → SvGridChartView-TujvKvl6.js} +2 -2
- package/dist/wc/{SvGridDropdown-Co1FnDeB.js → SvGridDropdown-B1iMiyRf.js} +2 -2
- package/dist/wc/{SvGridDropdown-CbVCAI1K.js → SvGridDropdown-DauXQKai.js} +2 -2
- package/dist/wc/SvMenuList-DD8DyfUc.js +3 -0
- package/dist/wc/SvModal-BN4l4cAE.js +7 -0
- package/dist/wc/SvModal-CbOvVSpm.js +7 -0
- package/dist/wc/SvTabs-CGPGO9Vn.js +2 -0
- package/dist/wc/board-DS5OxhbF.js +23 -0
- package/dist/wc/board-view.svelte-DZiQ6CpS.js +1 -0
- package/dist/wc/{card-marks.svelte-DEmCHZCd.js → card-marks.svelte-Dym4W2PD.js} +1 -1
- package/dist/wc/chart-0z2N0RUb.js +1 -0
- package/dist/wc/chart-Cbakc50a.js +1 -0
- package/dist/wc/chart-panel-messages-P6qAeRsp.js +1 -0
- package/dist/wc/client-CjVagnyk.js +3 -0
- package/dist/wc/client-DTHOsJhV.js +3 -0
- package/dist/wc/core-BhGMIO3G.js +1 -0
- package/dist/wc/date-format-DAQ3T50M.js +18 -0
- package/dist/wc/{date-format-C_AhjL_N.js → date-format-DYC0HfpK.js} +3 -3
- package/dist/wc/dismissable-CuL0k6PX.js +1 -0
- package/dist/wc/{dist-xwz8hbY3.js → dist-CU5leork.js} +1 -1
- package/dist/wc/{export-CduUYesa.js → export-CzdwAsQD.js} +2 -2
- package/dist/wc/extent-Dg7_h_Do.js +1 -0
- package/dist/wc/gallery-Bij5kkwt.js +11 -0
- package/dist/wc/gantt-DkHZhrMS.js +114 -0
- package/dist/wc/grid-extension.svelte-BhPbpIEL.js +1 -0
- package/dist/wc/grid-extension.svelte-CgyuY7mw.js +1 -0
- package/dist/wc/{js-scroller.svelte-yqKev7S0.js → js-scroller.svelte-DhpfIqCT.js} +1 -1
- package/dist/wc/palette-DkaM8TCP.js +46 -0
- package/dist/wc/popover-sheets.svelte-DkljoAro.js +2 -0
- package/dist/wc/popover-sheets.svelte-ra8as21o.js +2 -0
- package/dist/wc/{range-commit-BeTBd6HK.js → range-commit-CGSw1ziH.js} +1 -1
- package/dist/wc/{range-commit-CKuvQBcr.js → range-commit-i3L3UjPV.js} +1 -1
- package/dist/wc/row-drag-DbVYQ0eO.js +1 -0
- package/dist/wc/row-drag-DevACK09.js +1 -0
- package/dist/wc/scheduler-BMmQ_wly.js +156 -0
- package/dist/wc/scheduler-view.svelte-B4snqguw.js +1 -0
- package/dist/wc/{server-block-cache-CQ03vNXZ.js → server-block-cache-C9XwJyu2.js} +1 -1
- package/dist/wc/{server-row-model-DHuIO53Q.js → server-row-model-C-FV79zV.js} +1 -1
- package/dist/wc/smart.export.entry-BvRk9kiK.js +0 -0
- package/dist/wc/sv-base-element.js +229 -84
- package/dist/wc/sv-sheet-element.js +54 -158
- package/dist/wc/{validate-Blppk1Na.js → validate--KGSlMvP.js} +1 -1
- package/package.json +3 -3
- package/dist/cdn/smart.export-0xDkly3x.js +0 -250
- package/dist/designer/assets/GridFind-PWsi9BvQ.js +0 -1
- package/dist/designer/assets/GridFooter-CsnWeWLs.js +0 -1
- package/dist/designer/assets/GridMenus-Cu5uIXlg.js +0 -1
- package/dist/designer/assets/PinSplitter-66yg1L9j.js +0 -1
- package/dist/designer/assets/SvChartMenu-CdTEogez.js +0 -1
- package/dist/designer/assets/SvDateRangeInput-DsFP11vx.js +0 -1
- package/dist/designer/assets/SvDateTimePicker-Bzaaz3Kp.js +0 -1
- package/dist/designer/assets/SvGridCellEditor-DkBK-Cs_.js +0 -3
- package/dist/designer/assets/SvGridChart-BqMTsa_R.js +0 -2
- package/dist/designer/assets/SvGridChartBuilder-BNcFOTeW.js +0 -1
- package/dist/designer/assets/SvGridChartPanel-wUSKfW0h.js +0 -3
- package/dist/designer/assets/SvGridChartView-D_815ueY.js +0 -1
- package/dist/designer/assets/SvGridDropdown-CvyfuIx7.js +0 -1
- package/dist/designer/assets/SvListBox-BZg4K2A3.js +0 -2
- package/dist/designer/assets/SvMenuList-COwzLYsg.js +0 -1
- package/dist/designer/assets/SvTabs-DkOt7l9F.js +0 -1
- package/dist/designer/assets/chart-SJcjQYZM.js +0 -1
- package/dist/designer/assets/date-format-rjHbB1Og.js +0 -1
- package/dist/designer/assets/dismissable-ChWRPkoa.js +0 -1
- package/dist/designer/assets/grid-extension.svelte-BoCs0zu4.js +0 -1
- package/dist/designer/assets/index-client-C8cere9K.js +0 -2
- package/dist/designer/assets/index-nV1iesTT.css +0 -1
- package/dist/designer/assets/row-drag-D5c8CRVe.js +0 -1
- package/dist/designer/assets/smart.export-AxSFVWeW.js +0 -250
- package/dist/designer/assets/src--KGN0Gre.js +0 -1
- package/dist/designer/assets/src-DfTRqPD7.js +0 -35
- package/dist/wc/CardMenu-Bufk2vwa.js +0 -1
- package/dist/wc/GridFind-BMXaq4Jr.js +0 -1
- package/dist/wc/GridFind-vvGzjjGo.js +0 -1
- package/dist/wc/GridFooter-DPREGhF6.js +0 -1
- package/dist/wc/GridFooter-DwsjY5ez.js +0 -1
- package/dist/wc/GridMenus-BV3fRFIY.js +0 -16
- package/dist/wc/GridMenus-VSOeAZFV.js +0 -16
- package/dist/wc/SvChartMenu-DJqv1cuY.js +0 -1
- package/dist/wc/SvChartMenu-NRen7QjH.js +0 -3
- package/dist/wc/SvDateRangeInput-Fw2yWBDs.js +0 -1
- package/dist/wc/SvDateRangeInput-v249WzvQ.js +0 -1
- package/dist/wc/SvDateTimePicker-B5kJLiH0.js +0 -4
- package/dist/wc/SvDateTimePicker-DrUJNzaQ.js +0 -4
- package/dist/wc/SvGridCellEditor-BNPMZZF7.js +0 -3
- package/dist/wc/SvGridCellEditor-ChV2GkV8.js +0 -3
- package/dist/wc/SvGridChart-DKSo4yAM.js +0 -171
- package/dist/wc/SvGridChart-D_AKt54D.js +0 -171
- package/dist/wc/SvGridChartBuilder-BOSvwoMN.js +0 -8
- package/dist/wc/SvGridChartBuilder-DE8Lua1j.js +0 -7
- package/dist/wc/SvGridChartPanel-D1Dn-DNm.js +0 -5
- package/dist/wc/SvMenuList-QPKlIa2U.js +0 -3
- package/dist/wc/SvModal-CT6ZMBaI.js +0 -7
- package/dist/wc/SvModal-Cf-6zzOA.js +0 -7
- package/dist/wc/SvTabs-pQfMJw-6.js +0 -2
- package/dist/wc/board-D39-qF4t.js +0 -23
- package/dist/wc/board-view.svelte-BctMVU40.js +0 -1
- package/dist/wc/chart-QqgKrWNe.js +0 -1
- package/dist/wc/chart-j-Izih1o.js +0 -1
- package/dist/wc/chart-panel-messages-Ce4fBC6l.js +0 -1
- package/dist/wc/client-BzI-P2yq.js +0 -3
- package/dist/wc/client-DA6JtMaz.js +0 -3
- package/dist/wc/core-SYwyf5FD.js +0 -1
- package/dist/wc/custom-filter-Dp8JxlQu.js +0 -2
- package/dist/wc/date-format-DFerRDR7.js +0 -18
- package/dist/wc/dismissable-CQ6XFXsk.js +0 -1
- package/dist/wc/extent-CcmrrtGQ.js +0 -1
- package/dist/wc/gallery-v54gmeKF.js +0 -11
- package/dist/wc/gantt-CQ4bjQWL.js +0 -114
- package/dist/wc/grid-extension.svelte-CVqh736Q.js +0 -1
- package/dist/wc/grid-extension.svelte-DvHfl92l.js +0 -1
- package/dist/wc/palette-ChsQ7Bm9.js +0 -46
- package/dist/wc/row-drag-DD3TudN_.js +0 -1
- package/dist/wc/row-drag-DLQMyiV3.js +0 -1
- package/dist/wc/scheduler-GWTte7aX.js +0 -153
- package/dist/wc/scheduler-view.svelte-BFCITmR8.js +0 -1
- package/dist/wc/smart.export-0xDkly3x.js +0 -250
- package/dist/wc/svelte-virtualizer.svelte-DYCT_xZg.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checklistProgress as T,checklistSortValue as I,toChecklist as M}from"./checklist.js";import{parseTimeOfDay as W,timeSeconds as A}from"./time-of-day.js";import{isRichHtml as F,richPlain as R}from"./rich-html.js";import{VIEWBAR_MESSAGES as C}from"./messages/viewbar.js";import{tokenize as U}from"./formula.js";export const ME="@me";let N=()=>{};export function resolveMeWith(e){N=e}const D=(e,t)=>t;let E=D;export function setFilterWords(e){E=e??D}const l=(e,t)=>{const n=E(e,C[e]);return t?n.replace(/\{(\w+)\}/g,(i,r)=>r in t?String(t[r]):i):n};export const isGroup=e=>Array.isArray(e.conditions);const B=new Set(["text","longText","richText","url","email","phone","barcode","color"]),P=new Set(["number","currency","percent","rating","duration","autoNumber","count"]),_=new Set(["date","createdTime","lastModifiedTime"]),L={formula:"text",lookup:"text",rollup:"text"},Y=new Set(["AND","OR"]),j=new Set(["LEN","FIND","SEARCH","VALUE","SUM","AVERAGE","MAX","MIN","COUNT","COUNTA","COUNTALL","ROUND","ROUNDUP","ROUNDDOWN","INT","ABS","MOD","POWER","SQRT","EXP","LOG","EVEN","ODD","CEILING","FLOOR","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","WEEKDAY","WEEKNUM","DATETIME_DIFF","TONOW","FROMNOW","WORKDAY_DIFF"]),H=new Set(["TODAY","NOW","DATEADD","DATETIME_PARSE","SET_LOCALE","SET_TIMEZONE","WORKDAY"]),V=new Set(["AND","OR","NOT","XOR","TRUE","FALSE","ISERROR","REGEX_MATCH","IS_BEFORE","IS_AFTER","IS_SAME"]);function K(e){let t;try{t=U(String(e??""))}catch{return null}let n=0;const i=(...f)=>t[n]?.k==="op"&&f.includes(t[n].v),r=f=>f.reduce((m,b)=>m==="blank"?b:b==="blank"||m===b?m:null,"blank"),a=()=>{let f=s();for(;i("=","!=","<",">","<=",">=");)n+=1,s(),f="checkbox";return f},s=()=>{let f=o();for(;i("&");)n+=1,o(),f="text";return f},o=()=>{let f=u();for(;i("+","-");)n+=1,u(),f="number";return f},u=()=>{let f=p();for(;i("*","/");)n+=1,p(),f="number";return f},p=()=>i("-")?(n+=1,p(),"number"):c(),c=()=>{const f=t[n++];if(!f)throw new Error("the formula ends");if(f.k==="num")return"number";if(f.k==="str")return f.v===""?"blank":"text";if(f.k==="ref")return null;if(f.k==="("){const d=a();if(t[n++]?.k!==")")throw new Error("no closing bracket");return d}if(f.k!=="id")throw new Error("not a value");const m=f.v.toUpperCase();if(t[n]?.k!=="(")return m==="TRUE"||m==="FALSE"?"checkbox":null;n+=1;const b=[];if(t[n]?.k!==")")for(b.push(a());t[n]?.k===",";)n+=1,b.push(a());if(t[n++]?.k!==")")throw new Error("no closing bracket");return m==="BLANK"?"blank":m==="IF"?r(b.slice(1)):m==="SWITCH"?r(b.filter((d,h)=>h>0&&h%2===0||h===b.length-1&&h%2===1)):j.has(m)?"number":H.has(m)?"date":V.has(m)?"checkbox":null};try{const f=a();return n===t.length&&f!=="blank"?f:null}catch{return null}}function G(e){const t=e.cellDataType;return t==="number"?"number":t==="date"||t==="dateString"?"date":t==="boolean"?"checkbox":null}export function filterKindOf(e){const t=e.fieldType;if(t==="button")return null;if(t==="singleSelect")return"select";if(t==="multiSelect")return"multi";if(t==="user"||t==="createdBy"||t==="lastModifiedBy")return e.fieldProps?.multiple?"multi":"select";if(t==="checkbox")return"checkbox";if(t==="vote")return"multi";if(t==="sparkline")return null;if(t==="attachment")return"files";if(t==="link")return"link";if(t==="checklist")return"checklist";if(t==="timeOfDay")return"time";if(t&&_.has(t))return"date";if(t&&P.has(t))return"number";if(t&&B.has(t))return"text";if(t==="ai")return e.fieldProps?.output==="singleSelect"?"select":e.fieldProps?.output==="number"?"number":"text";if(t==="rollup"&&!e.cellDataType&&Y.has(String(e.fieldProps?.aggregation)))return"checkbox";const n=t==="formula"?e.fieldProps?.result:void 0;return n==="number"||n==="currency"||n==="percent"?"number":n==="date"?"date":G(e)??(t==="formula"?K(e.fieldProps?.formula):null)??(t?L[t]:void 0)??"text"}export function operatorsFor(e){const t=[{op:"isEmpty",label:l("viewbar.opIsEmpty")},{op:"isNotEmpty",label:l("viewbar.opIsNotEmpty")}];switch(e){case"number":return[{op:"eq",label:"="},{op:"neq",label:"≠"},{op:"lt",label:"<"},{op:"gt",label:">"},{op:"lte",label:"≤"},{op:"gte",label:"≥"},...t];case"select":return[{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},{op:"isAnyOf",label:l("viewbar.opIsAnyOf")},{op:"isNoneOf",label:l("viewbar.opIsNoneOf")},...t];case"multi":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasAllOf",label:l("viewbar.opHasAllOf")},{op:"isExactly",label:l("viewbar.opIsExactly")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")},...t];case"checkbox":return[{op:"is",label:l("viewbar.opIs")}];case"date":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsOnOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsOnOrAfter")},{op:"isWithin",label:l("viewbar.opIsWithin")},...t];case"files":return[{op:"contains",label:l("viewbar.opFileNameContains")},...t];case"checklist":return[{op:"allDone",label:l("viewbar.opIsComplete")},{op:"notAllDone",label:l("viewbar.opIsNotComplete")},{op:"gte",label:l("viewbar.opDoneAtLeast")},{op:"lt",label:l("viewbar.opDoneUnder")},{op:"contains",label:l("viewbar.opHasItemContaining")},...t];case"time":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsAtOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsAtOrAfter")},...t];case"link":case"text":return[{op:"contains",label:l("viewbar.opContains")},{op:"notContains",label:l("viewbar.opDoesNotContain")},{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},...t]}}export const NO_VALUE=new Set(["isEmpty","isNotEmpty","allDone","notAllDone"]);export function defaultValue(e,t){if(!NO_VALUE.has(t))return e==="checkbox"?!0:e==="date"?t==="isWithin"?{span:"pastWeek"}:{mode:"today"}:e==="select"&&(t==="is"||t==="isNot")?"":e==="select"||e==="multi"?[]:""}export function newCondition(e,t){const n=filterKindOf(t);if(!n)return null;const i=operatorsFor(n)[0].op,r=n==="link"&&typeof t.fieldProps?.table=="string"?t.fieldProps.table:void 0;return{column:e,kind:n,op:i,value:defaultValue(n,i),...r?{table:r}:{}}}export function isComplete(e){if(NO_VALUE.has(e.op)||e.kind==="checkbox")return!0;const t=e.value;if(t==null)return!1;if(Array.isArray(t))return t.length>0;if(typeof t=="string")return t.trim()!=="";if(e.kind==="date"&&typeof t=="object"){const n=t;if(n.mode==="exactDate")return!!n.date;if(n.span==="pastDays"||n.span==="nextDays")return Number(n.days)>0}return!0}export function conditionCount(e){if(!e)return 0;let t=0;for(const n of e.conditions)isGroup(n)?t+=n.conditions.filter(isComplete).length:isComplete(n)&&(t+=1);return t}const w=e=>String(e??"").trim().toLocaleLowerCase(),y=e=>e==null||e===""?[]:Array.isArray(e)?e.map(t=>String(t&&typeof t=="object"?t.id??t.name??"":t)):[String(e)],O=e=>e==null||e===""||Array.isArray(e)&&e.length===0||typeof e=="number"&&Number.isNaN(e),k=864e5;export function dayOf(e){if(e==null||e==="")return null;let t;if(e instanceof Date)t=e;else if(typeof e=="number")t=new Date(e);else{const n=String(e),i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);t=i?new Date(Number(i[1]),Number(i[2])-1,Number(i[3])):new Date(n)}return Number.isNaN(t.getTime())?null:Math.floor((t.getTime()-t.getTimezoneOffset()*6e4)/k)}function g(e,t){switch(e.mode){case"today":return t;case"tomorrow":return t+1;case"yesterday":return t-1;case"oneWeekAgo":return t-7;case"oneWeekFromNow":return t+7;case"oneMonthAgo":return t-30;case"oneMonthFromNow":return t+30;case"exactDate":return dayOf(e.date)}}function x(e,t){const n=Math.max(1,Math.floor(Number(e.days)||1));switch(e.span){case"pastWeek":return[t-7,t];case"pastMonth":return[t-30,t];case"pastYear":return[t-365,t];case"nextWeek":return[t,t+7];case"nextMonth":return[t,t+30];case"nextYear":return[t,t+365];case"pastDays":return[t-n,t];case"nextDays":return[t,t+n]}}export function dateConditionDays(e,t=new Date){const n=dayOf(t);if(e.op==="isWithin")return x(e.value??{span:"pastWeek"},n);const i=g(e.value??{mode:"today"},n);if(i==null)return null;switch(e.op){case"is":return[i,i];case"isBefore":return[null,i-1];case"isAfter":return[i+1,null];case"isOnOrBefore":return[null,i];case"isOnOrAfter":return[i,null];default:return null}}export function conditionMoment(e){const t=e.value;return(e.op==="isBefore"||e.op==="isOnOrAfter")&&t?.mode==="exactDate"&&typeof t.at=="string"?t.at:null}export const isMoment=e=>e instanceof Date||typeof e=="string"&&e.length>10&&/(?:z|[+-]\d{2}(?::?\d{2})?)$/i.test(e);const S=e=>{const t=new Date(e*k);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())};export function viewerMoments(e,t=new Date){if(e.kind!=="date"||e.op==="isEmpty"||e.op==="isNotEmpty"||conditionMoment(e))return null;const n=dateConditionDays(e,t);if(!n)return null;const[i,r]=n;return{from:i==null?null:S(i).toISOString(),to:r==null?null:S(r+1).toISOString()}}export function withViewerDays(e,t=new Date){let n=!1;const i=a=>{const s=viewerMoments(a,t);return s?(n=!0,{...a,moments:s}):a},r=e.conditions.map(a=>isGroup(a)?{...a,conditions:a.conditions.map(i)}:i(a));return n?{...e,conditions:r}:e}export function expressionWithViewerDays(e,t=new Date){const n=e;if(!n||typeof n!="object")return e;if(n.kind==="fieldFilter"&&Array.isArray(n.conditions))return withViewerDays(n,t);const i=n.payload;if(n.kind==="ext"&&n.type==="fieldFilter"&&i&&Array.isArray(i.conditions)){const r=withViewerDays({...i,kind:"fieldFilter",conjunction:i.conjunction??"and"},t);return r.conditions===i.conditions?e:{...n,payload:{...i,conditions:r.conditions}}}return e}export function compileCondition(e,t,n=new Date){const i=e.kind==="link"&&e.table&&t?.isEmpty?r=>O(r)||t.isEmpty(e.table,r):O;if(e.op==="isEmpty")return i;if(e.op==="isNotEmpty")return r=>!i(r);switch(e.kind){case"number":{const r=Number(e.value);if(!Number.isFinite(r))return()=>!0;const a=u=>O(u)?NaN:Number(u),o={eq:u=>u===r,neq:u=>u!==r,lt:u=>u<r,gt:u=>u>r,lte:u=>u<=r,gte:u=>u>=r}[e.op]??(()=>!0);return u=>{const p=a(u);return Number.isNaN(p)?e.op==="neq":o(p)}}case"checkbox":{const r=e.value!==!1;return a=>!!a===r}case"select":case"multi":{const r=N(),a=y(e.value).map(o=>o===ME&&r!=null?r:o),s=new Set(a);return e.op==="is"?o=>y(o)[0]===a[0]:e.op==="isNot"?o=>y(o)[0]!==a[0]:e.op==="isAnyOf"||e.op==="hasAnyOf"?o=>y(o).some(u=>s.has(u)):e.op==="isNoneOf"||e.op==="hasNoneOf"?o=>!y(o).some(u=>s.has(u)):e.op==="hasAllOf"?o=>{const u=new Set(y(o));return[...s].every(p=>u.has(p))}:e.op==="isExactly"?o=>{const u=new Set(y(o));return u.size===s.size&&[...s].every(p=>u.has(p))}:()=>!0}case"date":{const r=dayOf(n),a=conditionMoment(e),s=a?e.op==="isBefore"?{from:null,to:a}:{from:a,to:null}:e.moments;if(s&&(s.from!=null||s.to!=null)){const c=s.from==null?-1/0:Date.parse(s.from),f=s.to==null?1/0:Date.parse(s.to),m={...e,moments:void 0,value:a?{...e.value,at:void 0}:e.value},b=compileCondition(m,t,n);return d=>{if(!isMoment(d))return b(d);const h=d instanceof Date?d.getTime():Date.parse(String(d));return Number.isFinite(h)&&h>=c&&h<f}}if(e.op==="isWithin"){const[c,f]=x(e.value??{span:"pastWeek"},r);return m=>{const b=dayOf(m);return b!=null&&b>=c&&b<=f}}const o=g(e.value??{mode:"today"},r);if(o==null)return()=>!0;const p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=dayOf(c);return f!=null&&p(f)}}case"files":{const r=w(e.value);return a=>(Array.isArray(a)?a:[]).some(s=>w(s?.name).includes(r))}case"checklist":{const r=s=>{const o=T(s);return o.total>0&&o.done===o.total};if(e.op==="allDone")return r;if(e.op==="notAllDone")return s=>!r(s);if(e.op==="contains"){const s=w(e.value);return o=>M(o).some(u=>w(u.text).includes(s))}const a=parseFloat(String(e.value??""));return Number.isFinite(a)?s=>{const o=I(s);return o==null?!1:e.op==="lt"?o*100<a:o*100>=a}:()=>!0}case"time":{const r=W(String(e.value??"")),a=A(r);if(r==null||a==null)return()=>!0;const s=r.length>5?1:60,o=Math.floor(a/s),p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=A(c);return f!=null&&p(Math.floor(f/s))}}case"link":case"text":{const r=w(e.value),a=s=>F(s)?w(R(s)):e.kind==="link"&&e.table&&t?w(t(e.table,s).join(", ")):w(Array.isArray(s)?s.map(o=>o&&typeof o=="object"?o.name??"":o).join(", "):s);return e.op==="contains"?s=>a(s).includes(r):e.op==="notContains"?s=>!a(s).includes(r):e.op==="is"?s=>a(s)===r:e.op==="isNot"?s=>a(s)!==r:()=>!0}}}export function compileFieldFilter(e,t,n,i){const r=o=>{const u=compileCondition(o,n,i);return p=>{const c=t(p,o.column);return u(Array.isArray(c)&&c.some(Array.isArray)?c.flat(1/0):c)}},a=(o,u)=>o==="or"?p=>u.some(c=>c(p)):p=>u.every(c=>c(p)),s=[];for(const o of e.conditions)if(isGroup(o)){const u=o.conditions.filter(isComplete).map(r);u.length&&s.push(a(o.conjunction,u))}else isComplete(o)&&s.push(r(o));return s.length?a(e.conjunction,s):null}const X={today:"viewbar.dayToday",tomorrow:"viewbar.dayTomorrow",yesterday:"viewbar.dayYesterday",oneWeekAgo:"viewbar.dayOneWeekAgo",oneWeekFromNow:"viewbar.dayOneWeekFromNow",oneMonthAgo:"viewbar.dayOneMonthAgo",oneMonthFromNow:"viewbar.dayOneMonthFromNow"},q={pastWeek:"viewbar.spanPastWeek",pastMonth:"viewbar.spanPastMonth",pastYear:"viewbar.spanPastYear",nextWeek:"viewbar.spanNextWeek",nextMonth:"viewbar.spanNextMonth",nextYear:"viewbar.spanNextYear"},v=e=>e==="or"?l("viewbar.conjOr"):e==="and"?l("viewbar.conjAnd"):e;function z(e){if(NO_VALUE.has(e.op))return"";if(e.kind==="checkbox")return e.value===!1?l("viewbar.valueUnchecked"):l("viewbar.valueChecked");if(e.kind==="date"){if(e.op==="isWithin"){const r=e.value??{span:"pastWeek"};if(r.span==="pastDays")return l("viewbar.spanPastDays",{days:r.days??0});if(r.span==="nextDays")return l("viewbar.spanNextDays",{days:r.days??0});const a=q[r.span];return a?l(a):r.span}const n=e.value??{mode:"today"};if(n.mode==="exactDate")return n.date;const i=X[n.mode];return i?l(i):n.mode}const t=n=>n===ME?l("viewbar.valueMe"):String(n);return Array.isArray(e.value)?e.value.map(t).join(", "):t(e.value??"")}export function describeCondition(e,t=n=>n){const n=operatorsFor(e.kind).find(i=>i.op===e.op)?.label??e.op;return[t(e.column),n,z(e)].filter(Boolean).join(" ")}export function describeFieldFilter(e,t){const n=[];for(const i of e.conditions)if(isGroup(i)){const r=i.conditions.filter(isComplete).map(a=>describeCondition(a,t));r.length&&n.push(r.length>1?`(${r.join(` ${v(i.conjunction)} `)})`:r[0])}else isComplete(i)&&n.push(describeCondition(i,t));return n.length?n.join(` ${v(e.conjunction)} `):l("viewbar.everyRecord")}export function fieldFilterColumns(e){const t=new Set;for(const n of e.conditions)for(const i of isGroup(n)?n.conditions:[n])isComplete(i)&&t.add(i.column);return[...t]}
|
|
1
|
+
import{checklistProgress as T,checklistSortValue as I,toChecklist as M}from"./checklist.js";import{parseTimeOfDay as W,timeSeconds as O}from"./time-of-day.js";import{isRichHtml as F,richPlain as R}from"./rich-html.js";import{VIEWBAR_MESSAGES as C}from"./messages/viewbar.js";import{tokenize as U}from"./formula.js";export const ME="@me";let N=()=>{};export function resolveMeWith(e){N=e}const k=(e,t)=>t;let D=k;export function setFilterWords(e){D=e??k}const l=(e,t)=>{const n=D(e,C[e]);return t?n.replace(/\{(\w+)\}/g,(s,r)=>r in t?String(t[r]):s):n};export const isGroup=e=>Array.isArray(e.conditions);const B=new Set(["text","longText","richText","url","email","phone","barcode","color"]),P=new Set(["number","currency","percent","rating","duration","timer","autoNumber","count"]),_=new Set(["date","createdTime","lastModifiedTime"]),L={formula:"text",lookup:"text",rollup:"text"},Y=new Set(["AND","OR"]),j=new Set(["LEN","FIND","SEARCH","VALUE","SUM","AVERAGE","MAX","MIN","COUNT","COUNTA","COUNTALL","ROUND","ROUNDUP","ROUNDDOWN","INT","ABS","MOD","POWER","SQRT","EXP","LOG","EVEN","ODD","CEILING","FLOOR","YEAR","MONTH","DAY","HOUR","MINUTE","SECOND","WEEKDAY","WEEKNUM","DATETIME_DIFF","TONOW","FROMNOW","WORKDAY_DIFF"]),H=new Set(["TODAY","NOW","DATEADD","DATETIME_PARSE","SET_LOCALE","SET_TIMEZONE","WORKDAY"]),V=new Set(["AND","OR","NOT","XOR","TRUE","FALSE","ISERROR","REGEX_MATCH","IS_BEFORE","IS_AFTER","IS_SAME"]);function K(e){let t;try{t=U(String(e??""))}catch{return null}let n=0;const s=(...f)=>t[n]?.k==="op"&&f.includes(t[n].v),r=f=>f.reduce((m,b)=>m==="blank"?b:b==="blank"||m===b?m:null,"blank"),a=()=>{let f=i();for(;s("=","!=","<",">","<=",">=");)n+=1,i(),f="checkbox";return f},i=()=>{let f=o();for(;s("&");)n+=1,o(),f="text";return f},o=()=>{let f=u();for(;s("+","-");)n+=1,u(),f="number";return f},u=()=>{let f=p();for(;s("*","/");)n+=1,p(),f="number";return f},p=()=>s("-")?(n+=1,p(),"number"):c(),c=()=>{const f=t[n++];if(!f)throw new Error("the formula ends");if(f.k==="num")return"number";if(f.k==="str")return f.v===""?"blank":"text";if(f.k==="ref")return null;if(f.k==="("){const d=a();if(t[n++]?.k!==")")throw new Error("no closing bracket");return d}if(f.k!=="id")throw new Error("not a value");const m=f.v.toUpperCase();if(t[n]?.k!=="(")return m==="TRUE"||m==="FALSE"?"checkbox":null;n+=1;const b=[];if(t[n]?.k!==")")for(b.push(a());t[n]?.k===",";)n+=1,b.push(a());if(t[n++]?.k!==")")throw new Error("no closing bracket");return m==="BLANK"?"blank":m==="IF"?r(b.slice(1)):m==="SWITCH"?r(b.filter((d,h)=>h>0&&h%2===0||h===b.length-1&&h%2===1)):j.has(m)?"number":H.has(m)?"date":V.has(m)?"checkbox":null};try{const f=a();return n===t.length&&f!=="blank"?f:null}catch{return null}}function G(e){const t=e.cellDataType;return t==="number"?"number":t==="date"||t==="dateString"?"date":t==="boolean"?"checkbox":null}export function filterKindOf(e){const t=e.fieldType;if(t==="button")return null;if(t==="singleSelect")return"select";if(t==="multiSelect")return"multi";if(t==="user"||t==="createdBy"||t==="lastModifiedBy")return e.fieldProps?.multiple?"multi":"select";if(t==="checkbox")return"checkbox";if(t==="vote")return"multi";if(t==="sparkline")return null;if(t==="attachment")return"files";if(t==="link")return"link";if(t==="checklist")return"checklist";if(t==="timeOfDay")return"time";if(t&&_.has(t))return"date";if(t&&P.has(t))return"number";if(t&&B.has(t))return"text";if(t==="ai")return e.fieldProps?.output==="singleSelect"?"select":e.fieldProps?.output==="number"?"number":"text";if(t==="rollup"&&!e.cellDataType&&Y.has(String(e.fieldProps?.aggregation)))return"checkbox";const n=t==="formula"?e.fieldProps?.result:void 0;return n==="number"||n==="currency"||n==="percent"?"number":n==="date"?"date":G(e)??(t==="formula"?K(e.fieldProps?.formula):null)??(t?L[t]:void 0)??"text"}export function operatorsFor(e){const t=[{op:"isEmpty",label:l("viewbar.opIsEmpty")},{op:"isNotEmpty",label:l("viewbar.opIsNotEmpty")}];switch(e){case"number":return[{op:"eq",label:"="},{op:"neq",label:"≠"},{op:"lt",label:"<"},{op:"gt",label:">"},{op:"lte",label:"≤"},{op:"gte",label:"≥"},...t];case"select":return[{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},{op:"isAnyOf",label:l("viewbar.opIsAnyOf")},{op:"isNoneOf",label:l("viewbar.opIsNoneOf")},...t];case"multi":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasAllOf",label:l("viewbar.opHasAllOf")},{op:"isExactly",label:l("viewbar.opIsExactly")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")},...t];case"checkbox":return[{op:"is",label:l("viewbar.opIs")}];case"date":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsOnOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsOnOrAfter")},{op:"isWithin",label:l("viewbar.opIsWithin")},...t];case"files":return[{op:"contains",label:l("viewbar.opFileNameContains")},...t];case"checklist":return[{op:"allDone",label:l("viewbar.opIsComplete")},{op:"notAllDone",label:l("viewbar.opIsNotComplete")},{op:"gte",label:l("viewbar.opDoneAtLeast")},{op:"lt",label:l("viewbar.opDoneUnder")},{op:"contains",label:l("viewbar.opHasItemContaining")},...t];case"time":return[{op:"is",label:l("viewbar.opIs")},{op:"isBefore",label:l("viewbar.opIsBefore")},{op:"isAfter",label:l("viewbar.opIsAfter")},{op:"isOnOrBefore",label:l("viewbar.opIsAtOrBefore")},{op:"isOnOrAfter",label:l("viewbar.opIsAtOrAfter")},...t];case"linked":return[{op:"hasAnyOf",label:l("viewbar.opHasAnyOf")},{op:"hasNoneOf",label:l("viewbar.opHasNoneOf")}];case"link":case"text":return[{op:"contains",label:l("viewbar.opContains")},{op:"notContains",label:l("viewbar.opDoesNotContain")},{op:"is",label:l("viewbar.opIs")},{op:"isNot",label:l("viewbar.opIsNot")},...t]}}export const NO_VALUE=new Set(["isEmpty","isNotEmpty","allDone","notAllDone"]);export function defaultValue(e,t){if(!NO_VALUE.has(t))return e==="checkbox"?!0:e==="date"?t==="isWithin"?{span:"pastWeek"}:{mode:"today"}:e==="select"&&(t==="is"||t==="isNot")?"":e==="select"||e==="multi"?[]:""}export function newCondition(e,t){const n=filterKindOf(t);if(!n)return null;const s=operatorsFor(n)[0].op,r=n==="link"&&typeof t.fieldProps?.table=="string"?t.fieldProps.table:void 0;return{column:e,kind:n,op:s,value:defaultValue(n,s),...r?{table:r}:{}}}export function isComplete(e){if(NO_VALUE.has(e.op)||e.kind==="checkbox")return!0;const t=e.value;if(t==null)return!1;if(Array.isArray(t))return t.length>0;if(typeof t=="string")return t.trim()!=="";if(e.kind==="date"&&typeof t=="object"){const n=t;if(n.mode==="exactDate")return!!n.date;if(n.span==="pastDays"||n.span==="nextDays")return Number(n.days)>0}return!0}export function conditionCount(e){if(!e)return 0;let t=0;for(const n of e.conditions)isGroup(n)?t+=n.conditions.filter(isComplete).length:isComplete(n)&&(t+=1);return t}const w=e=>String(e??"").trim().toLocaleLowerCase(),y=e=>e==null||e===""?[]:Array.isArray(e)?e.map(t=>String(t&&typeof t=="object"?t.id??t.name??"":t)):[String(e)],A=e=>e==null||e===""||Array.isArray(e)&&e.length===0||typeof e=="number"&&Number.isNaN(e),E=864e5;export function dayOf(e){if(e==null||e==="")return null;let t;if(e instanceof Date)t=e;else if(typeof e=="number")t=new Date(e);else{const n=String(e),s=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:Math.floor((t.getTime()-t.getTimezoneOffset()*6e4)/E)}function S(e,t){switch(e.mode){case"today":return t;case"tomorrow":return t+1;case"yesterday":return t-1;case"oneWeekAgo":return t-7;case"oneWeekFromNow":return t+7;case"oneMonthAgo":return t-30;case"oneMonthFromNow":return t+30;case"exactDate":return dayOf(e.date)}}function g(e,t){const n=Math.max(1,Math.floor(Number(e.days)||1));switch(e.span){case"pastWeek":return[t-7,t];case"pastMonth":return[t-30,t];case"pastYear":return[t-365,t];case"nextWeek":return[t,t+7];case"nextMonth":return[t,t+30];case"nextYear":return[t,t+365];case"pastDays":return[t-n,t];case"nextDays":return[t,t+n]}}export function dateConditionDays(e,t=new Date){const n=dayOf(t);if(e.op==="isWithin")return g(e.value??{span:"pastWeek"},n);const s=S(e.value??{mode:"today"},n);if(s==null)return null;switch(e.op){case"is":return[s,s];case"isBefore":return[null,s-1];case"isAfter":return[s+1,null];case"isOnOrBefore":return[null,s];case"isOnOrAfter":return[s,null];default:return null}}export function conditionMoment(e){const t=e.value;return(e.op==="isBefore"||e.op==="isOnOrAfter")&&t?.mode==="exactDate"&&typeof t.at=="string"?t.at:null}export const isMoment=e=>e instanceof Date||typeof e=="string"&&e.length>10&&/(?:z|[+-]\d{2}(?::?\d{2})?)$/i.test(e);const v=e=>{const t=new Date(e*E);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())};export function viewerMoments(e,t=new Date){if(e.kind!=="date"||e.op==="isEmpty"||e.op==="isNotEmpty"||conditionMoment(e))return null;const n=dateConditionDays(e,t);if(!n)return null;const[s,r]=n;return{from:s==null?null:v(s).toISOString(),to:r==null?null:v(r+1).toISOString()}}export function withViewerDays(e,t=new Date){let n=!1;const s=a=>{const i=viewerMoments(a,t);return i?(n=!0,{...a,moments:i}):a},r=e.conditions.map(a=>isGroup(a)?{...a,conditions:a.conditions.map(s)}:s(a));return n?{...e,conditions:r}:e}export function expressionWithViewerDays(e,t=new Date){const n=e;if(!n||typeof n!="object")return e;if(n.kind==="fieldFilter"&&Array.isArray(n.conditions))return withViewerDays(n,t);const s=n.payload;if(n.kind==="ext"&&n.type==="fieldFilter"&&s&&Array.isArray(s.conditions)){const r=withViewerDays({...s,kind:"fieldFilter",conjunction:s.conjunction??"and"},t);return r.conditions===s.conditions?e:{...n,payload:{...s,conditions:r.conditions}}}return e}export function compileCondition(e,t,n=new Date){const s=e.kind==="link"&&e.table&&t?.isEmpty?r=>A(r)||t.isEmpty(e.table,r):A;if(e.op==="isEmpty")return s;if(e.op==="isNotEmpty")return r=>!s(r);if(e.kind==="linked"){const r=new Set((Array.isArray(e.value)?e.value:[e.value]).map(i=>String(i))),a=i=>(Array.isArray(i)?i:A(i)?[]:[i]).map(o=>String(o&&typeof o=="object"?o.id??"":o));return e.op==="hasNoneOf"?i=>!a(i).some(o=>r.has(o)):i=>a(i).some(o=>r.has(o))}switch(e.kind){case"number":{const r=Number(e.value);if(!Number.isFinite(r))return()=>!0;const a=u=>A(u)?NaN:Number(u),o={eq:u=>u===r,neq:u=>u!==r,lt:u=>u<r,gt:u=>u>r,lte:u=>u<=r,gte:u=>u>=r}[e.op]??(()=>!0);return u=>{const p=a(u);return Number.isNaN(p)?e.op==="neq":o(p)}}case"checkbox":{const r=e.value!==!1;return a=>!!a===r}case"select":case"multi":{const r=N(),a=y(e.value).map(o=>o===ME&&r!=null?r:o),i=new Set(a);return e.op==="is"?o=>y(o)[0]===a[0]:e.op==="isNot"?o=>y(o)[0]!==a[0]:e.op==="isAnyOf"||e.op==="hasAnyOf"?o=>y(o).some(u=>i.has(u)):e.op==="isNoneOf"||e.op==="hasNoneOf"?o=>!y(o).some(u=>i.has(u)):e.op==="hasAllOf"?o=>{const u=new Set(y(o));return[...i].every(p=>u.has(p))}:e.op==="isExactly"?o=>{const u=new Set(y(o));return u.size===i.size&&[...i].every(p=>u.has(p))}:()=>!0}case"date":{const r=dayOf(n),a=conditionMoment(e),i=a?e.op==="isBefore"?{from:null,to:a}:{from:a,to:null}:e.moments;if(i&&(i.from!=null||i.to!=null)){const c=i.from==null?-1/0:Date.parse(i.from),f=i.to==null?1/0:Date.parse(i.to),m={...e,moments:void 0,value:a?{...e.value,at:void 0}:e.value},b=compileCondition(m,t,n);return d=>{if(!isMoment(d))return b(d);const h=d instanceof Date?d.getTime():Date.parse(String(d));return Number.isFinite(h)&&h>=c&&h<f}}if(e.op==="isWithin"){const[c,f]=g(e.value??{span:"pastWeek"},r);return m=>{const b=dayOf(m);return b!=null&&b>=c&&b<=f}}const o=S(e.value??{mode:"today"},r);if(o==null)return()=>!0;const p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=dayOf(c);return f!=null&&p(f)}}case"files":{const r=w(e.value);return a=>(Array.isArray(a)?a:[]).some(i=>w(i?.name).includes(r))}case"checklist":{const r=i=>{const o=T(i);return o.total>0&&o.done===o.total};if(e.op==="allDone")return r;if(e.op==="notAllDone")return i=>!r(i);if(e.op==="contains"){const i=w(e.value);return o=>M(o).some(u=>w(u.text).includes(i))}const a=parseFloat(String(e.value??""));return Number.isFinite(a)?i=>{const o=I(i);return o==null?!1:e.op==="lt"?o*100<a:o*100>=a}:()=>!0}case"time":{const r=W(String(e.value??"")),a=O(r);if(r==null||a==null)return()=>!0;const i=r.length>5?1:60,o=Math.floor(a/i),p={is:c=>c===o,isBefore:c=>c<o,isAfter:c=>c>o,isOnOrBefore:c=>c<=o,isOnOrAfter:c=>c>=o}[e.op]??(()=>!0);return c=>{const f=O(c);return f!=null&&p(Math.floor(f/i))}}case"link":case"text":{const r=w(e.value),a=i=>F(i)?w(R(i)):e.kind==="link"&&e.table&&t?w(t(e.table,i).join(", ")):w(Array.isArray(i)?i.map(o=>o&&typeof o=="object"?o.name??"":o).join(", "):i);return e.op==="contains"?i=>a(i).includes(r):e.op==="notContains"?i=>!a(i).includes(r):e.op==="is"?i=>a(i)===r:e.op==="isNot"?i=>a(i)!==r:()=>!0}}}export function compileFieldFilter(e,t,n,s){const r=o=>{const u=compileCondition(o,n,s);return p=>{const c=t(p,o.column);return u(Array.isArray(c)&&c.some(Array.isArray)?c.flat(1/0):c)}},a=(o,u)=>o==="or"?p=>u.some(c=>c(p)):p=>u.every(c=>c(p)),i=[];for(const o of e.conditions)if(isGroup(o)){const u=o.conditions.filter(isComplete).map(r);u.length&&i.push(a(o.conjunction,u))}else isComplete(o)&&i.push(r(o));return i.length?a(e.conjunction,i):null}const X={today:"viewbar.dayToday",tomorrow:"viewbar.dayTomorrow",yesterday:"viewbar.dayYesterday",oneWeekAgo:"viewbar.dayOneWeekAgo",oneWeekFromNow:"viewbar.dayOneWeekFromNow",oneMonthAgo:"viewbar.dayOneMonthAgo",oneMonthFromNow:"viewbar.dayOneMonthFromNow"},q={pastWeek:"viewbar.spanPastWeek",pastMonth:"viewbar.spanPastMonth",pastYear:"viewbar.spanPastYear",nextWeek:"viewbar.spanNextWeek",nextMonth:"viewbar.spanNextMonth",nextYear:"viewbar.spanNextYear"},x=e=>e==="or"?l("viewbar.conjOr"):e==="and"?l("viewbar.conjAnd"):e;function z(e){if(NO_VALUE.has(e.op))return"";if(e.kind==="checkbox")return e.value===!1?l("viewbar.valueUnchecked"):l("viewbar.valueChecked");if(e.kind==="date"){if(e.op==="isWithin"){const r=e.value??{span:"pastWeek"};if(r.span==="pastDays")return l("viewbar.spanPastDays",{days:r.days??0});if(r.span==="nextDays")return l("viewbar.spanNextDays",{days:r.days??0});const a=q[r.span];return a?l(a):r.span}const n=e.value??{mode:"today"};if(n.mode==="exactDate")return n.date;const s=X[n.mode];return s?l(s):n.mode}const t=n=>n===ME?l("viewbar.valueMe"):String(n);return Array.isArray(e.value)?e.value.map(t).join(", "):t(e.value??"")}export function describeCondition(e,t=n=>n){const n=operatorsFor(e.kind).find(s=>s.op===e.op)?.label??e.op;return[t(e.column),n,z(e)].filter(Boolean).join(" ")}export function describeFieldFilter(e,t){const n=[];for(const s of e.conditions)if(isGroup(s)){const r=s.conditions.filter(isComplete).map(a=>describeCondition(a,t));r.length&&n.push(r.length>1?`(${r.join(` ${x(s.conjunction)} `)})`:r[0])}else isComplete(s)&&n.push(describeCondition(s,t));return n.length?n.join(` ${x(e.conjunction)} `):l("viewbar.everyRecord")}export function fieldFilterColumns(e){const t=new Set;for(const n of e.conditions)for(const s of isGroup(n)?n.conditions:[n])isComplete(s)&&t.add(s.column);return[...t]}
|
package/dist/fields/index.d.ts
CHANGED
|
@@ -4,25 +4,33 @@ export { setFieldUsers, getFieldUsers, setCurrentUser, getCurrentUser, registerL
|
|
|
4
4
|
export { canEditField, defaultCanEditField, fieldEditors, setCanEditField, setFieldProtection, type CanEditField, type FieldAccessField, } from './field-access.svelte.js';
|
|
5
5
|
export { compileFormula, formulaError, FORMULA_FUNCTIONS, FormulaError } from './formula.js';
|
|
6
6
|
export { formatNumber, formatCurrency, formatPercent, formatDuration, parseDuration, formatDate } from './format.js';
|
|
7
|
+
export { timerRunning, timerSeconds, timerToggle, timerTotal, type TimerRunning, type TimerValue } from './timer.js';
|
|
7
8
|
export { BRIGHT, OPTION_COLORS } from './palette.js';
|
|
8
9
|
export { convertValue, countCleared } from './convert.js';
|
|
9
10
|
export { openFieldEditor, closeFieldEditor, openRecord, closeRecord, type OpenRecordRequest } from './editor-request.svelte.js';
|
|
10
11
|
export { default as SvBaseViewBar } from './SvBaseViewBar.svelte';
|
|
11
12
|
export { default as SvBaseForm } from './SvBaseForm.svelte';
|
|
13
|
+
export { default as SvBaseAutomations } from './SvBaseAutomations.svelte';
|
|
12
14
|
export { formPrefillLink, readFormPrefill, type FormPrefill } from './form-logic.js';
|
|
13
15
|
export { default as SvBase } from './SvBase.svelte';
|
|
14
|
-
export { blankTable, newRecordId, type BaseTable } from './base-tables.js';
|
|
16
|
+
export { addSubtasks, blankTable, newRecordId, type BaseTable } from './base-tables.js';
|
|
15
17
|
export { baseSource, createBaseSync, type BaseSource, type BaseSourceOptions, type BaseSyncStatus, type BaseRemoteChange, type BaseSourceChange, type BaseChangeInput, type ForeignKeyLink, type JunctionLink, } from './base-sync.js';
|
|
16
18
|
export { baseFieldsFromSchema, baseTablesFromSchemas, baseSpecFromSchemas, baseTablesFromSpec, type BaseTableSpec, type BaseLinkSpec } from './base-schema.js';
|
|
17
19
|
export { baseToSql, sqlName, type BaseToSqlOptions, type BaseTableComment, type BaseJunctionComment } from './base-sql.js';
|
|
18
20
|
export { applyBaseComments, withInverses, type BaseComments } from './base-schema.js';
|
|
19
21
|
export { restoreItems, trashLabel, type BaseTrashItem, type BaseTrashStore } from './base-trash.js';
|
|
20
|
-
export { guessField, tableFromMatrix, recordsFromMatrix, matchColumns, type BaseImportResult, type ImportedField } from './base-import.js';
|
|
22
|
+
export { guessField, tableFromMatrix, recordsFromMatrix, matchColumns, type BaseImportResult, type ImportedField, type ImportReader } from './base-import.js';
|
|
21
23
|
export { baseFromDatabase, describeDatabase, createBaseEndpoint, baseFromEndpoint, createBaseFeed, baseFromSupabase, isSecretColumn, type DatabaseOptions, type BaseEndpointOptions, type BaseFromEndpointOptions, type SupabaseBaseOptions, type SoftDeleteOption } from './base-connect.js';
|
|
22
24
|
export { baseFromAirtable, airtableFormulaSupport, airtableColor, formulaFunctionsUsed, type AirtableSchema, type AirtableTable, type AirtableField, type AirtableView, type AirtableRecord, type AirtableRecords, type AirtableCollaborator, type AirtableImportOptions, type AirtableImport, type AirtableReportItem, type AirtableFormulaSupport, type AirtableFormulaStatus, type AirtableFormulaGroup } from './airtable.js';
|
|
23
|
-
export { registerAutomationAction, listAutomationActions, MAX_DEPTH as AUTOMATION_MAX_DEPTH, type BaseAutomation, type AutomationTrigger, type AutomationAction, type AutomationRun, type AutomationStep, type AutomationActionContext, type RegisteredAutomationAction, } from './automations.svelte.js';
|
|
25
|
+
export { registerAutomationAction, listAutomationActions, MAX_DEPTH as AUTOMATION_MAX_DEPTH, type BaseAutomation, type AutomationTrigger, type AutomationAction, type AutomationRun, type AutomationStep, type AutomationActionContext, type RegisteredAutomationAction, type RunValues, REPEAT_MOST as AUTOMATION_REPEAT_MOST, allActions as allAutomationActions, scriptRecord, scriptInput, webhookValues, triggerValues, } from './automations.svelte.js';
|
|
24
26
|
export { createAutomationServer, type AutomationServer, type AutomationServerOptions, type AutomationNotice } from './automation-server.js';
|
|
25
|
-
export type { WebhookAction, EmailAction, OutgoingEmail } from './automation-outbound.js';
|
|
27
|
+
export type { WebhookAction, EmailAction, OutgoingEmail, ChatAction } from './automation-outbound.js';
|
|
28
|
+
export { chatPayload, chatHostOk } from './automation-outbound.js';
|
|
29
|
+
export { runScript, SCRIPT_MAX_LENGTH, type ScriptBridge, type ScriptRecord, type ScriptResult, type ScriptOptions } from './automation-script.js';
|
|
30
|
+
export { newWebhookToken } from './automation-edit.js';
|
|
31
|
+
export { setViewActions, type ViewAction } from './view-actions.js';
|
|
32
|
+
export type { RecordTemplate } from './base-tables.js';
|
|
33
|
+
export { setRecordActions, type RecordAction, type RecordActionContext } from './record-actions.js';
|
|
26
34
|
export { setRecordComments, type RecordComment, type RecordCommentContext, type RecordCommentStore } from './activity.svelte.js';
|
|
27
35
|
export { setBaseMessages, baseMessages, BASE_MESSAGES, type BaseMessages, type BaseMessageKey } from './messages.svelte.js';
|
|
28
36
|
export { setRecordHistory, historyOf, loadHistory, type RecordChange, type RecordHistoryStore, type RecordHistoryContext } from './activity.svelte.js';
|
package/dist/fields/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{registerCellEditor as m,registerGridExtension as O,registerGridShortcuts as g}from"@svgrid/grid";import{nudgeEnterpriseFor as B}from"../license.js";import P from"./FieldCell.svelte";import L from"./RowAdder.svelte";import H from"./FootRowAdder.svelte";import V from"./AttachmentEditor.svelte";import U from"./FieldsHeaderEnd.svelte";import{askDeleteField as K,openFieldEditor as C,openRecord as N}from"./editor-request.svelte.js";import{enableAdvancedFilter as G,registerFilterKind as _}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 j,userSorts as X,writeSortState as Y}from"./viewbar/sort-state.js";import{sortLabels as W}from"./view-model.js";import{changesOf as J,noteChange as v}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 M,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 fe,rowColorRootClass as me,tallRowClass as pe,rowMarkColor as ue,rowMarkLabel as ce}from"./row-colors.js";import{chooseRowColor as T}from"./row-color-choice.svelte.js";import{fieldPropsOf as E,fillFieldColumn as ge,getFieldType as k,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 ve from"./SelectEditor.svelte";import Me from"./NumberEditor.svelte";import Te from"./LongTextEditor.svelte";import Ee from"./RichTextEditor.svelte";import ke from"./VoteEditor.svelte";import xe from"./ChecklistEditor.svelte";import Ae from"./ColorEditor.svelte";import Se from"./TimeOfDayEditor.svelte";import Re from"./RowHeader.svelte";import De from"./GroupHeader.svelte";import Ie from"./SummaryCell.svelte";import{getCurrentUser as x}from"./sources.svelte.js";import{fieldColumns as Oe,gridOf as y,primaryIdOf as F,rememberGrid as Be}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 Pe}from"./field-access.svelte.js";export{compileFormula,formulaError,FORMULA_FUNCTIONS,FormulaError}from"./formula.js";export{formatNumber,formatCurrency,formatPercent,formatDuration,parseDuration,formatDate}from"./format.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{default as SvBaseViewBar}from"./SvBaseViewBar.svelte";export{default as SvBaseForm}from"./SvBaseForm.svelte";export{formPrefillLink,readFormPrefill}from"./form-logic.js";export{default as SvBase}from"./SvBase.svelte";export{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}from"./automations.svelte.js";export{createAutomationServer}from"./automation-server.js";export{setRecordComments}from"./activity.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 f={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 Le(o,r){const e=(o?.internalColumns??[]).find(d=>String(d.id??d.field)===r),i=e?.fieldType==="singleSelect"&&e.field?fe(o)?.field===e.field?{key:"field-rowcolor",label:p("fields.menuStopColoring"),icon:f.color,run:()=>T(o,null)}:{key:"field-rowcolor",label:p("fields.menuColorRows"),icon:f.color,run:()=>T(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:f.filter,separatorBefore:!0,run:()=>He(o,r,e)}]:[],...o.groupingControlsEnabled?[]:[{key:"field-group",label:p("fields.menuGroup"),icon:f.group,run:()=>Ve(o,r)}]]:[];return[...i?[i]:[],{key:"field-edit",label:p("fields.menuEdit"),icon:f.edit,run:()=>C({ctrl:o,mode:"edit",columnId:r})},...t?[]:[{key:"field-left",label:p("fields.menuInsertLeft"),icon:f.left,run:()=>C({ctrl:o,mode:"add",index:M(o,r,"left")})}],{key:"field-right",label:p("fields.menuInsertRight"),icon:f.right,run:()=>C({ctrl:o,mode:"add",index:M(o,r,"right")})},{key:"field-duplicate",label:p("fields.menuDuplicate"),icon:f.duplicate,run:()=>{o.props.baseRefuseDuplicate?.(r)||re(o,r)}},...t?[]:[{key:"field-move-left",label:p("fields.menuMoveLeft"),icon:f.left,disabled:!S(o,r,-1),run:()=>R(o,r,-1)},{key:"field-move-right",label:p("fields.menuMoveRight"),icon:f.right,disabled:!S(o,r,1),run:()=>R(o,r,1)}],...l,...qe(o,r,e),...t?[]:[{key:"field-hide",label:p("fields.menuHide"),icon:f.hide,run:()=>ie(o,r)},{key:"field-delete",label:p("fields.menuDelete"),icon:f.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?K({ctrl:o,columnId:r}):te(o,r)}]]}function A(o,r,e){const i=(o.allColumns??[]).map(l=>l.id),t=i[i.indexOf(r)+e];if(!(!t||t===F(o)||o.isColumnPinned?.(t)!==o.isColumnPinned?.(r)))return t}const S=(o,r,e)=>!!A(o,r,e);function R(o,r,e){const i=A(o,r,e);if(!i)return;const t=o.allColumns.map(n=>n.id),l=t.indexOf(r),d=t.indexOf(i);t[l]=i,t[d]=r;const a=o.grid.getAllColumns().map(n=>n.id),s=o.userColumnOrder??[];o.moveColumnsByUser(ze(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 Ve(o,r){const e=j(o);e.some(i=>i.id===r)||Y(o.buildApi(),[...e,{id:r,desc:!1}],X(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=E(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),v(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;v(o,d,e,a,void 0,void 0,u)}function Ke(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(),N({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{fillDownKey as _e}from"./base-fill.js";import{orderKeepingScreen as ze}from"./column-order.js";let I=!1;export function enableFields(){if(I)return;I=!0;for(const e of ae)k(e.id)||be(e);O({column:(e,i)=>ge(e,i),cell: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),$e(e,i.row,i.columnId,i.rowId)},rangeAction:(e,i)=>e.props?.baseRangeAction?.(i)===!0,bodyEnd:L,footEnd:H,rowMarkColor:(e,i)=>ue(e,i),rowMarkLabel:(e,i)=>ce(e,i),headerIcon:e=>e?.fieldType?k(e.fieldType)?.icon:null,headerNote:e=>{if(!e?.fieldType)return null;const i=typeof e.description=="string"?e.description:"",t=Pe(b(e),E(b(e)));return t?{text:i?`${t} ${i}`:t,icon:f.lock}:i?{text:i,icon:f.info}:null},sortLabels:e=>e?.fieldType?W(e):null,lockColumn:(e,i)=>F(e)===i,rowHeader:e=>e?.props?.expandRows?Re:null,groupRow:e=>!e?.props?.rowModel&&Oe(e).some(i=>i.fieldType)?De:null,summaryCell:e=>e?.props?.rowModel?null:Ie,rootClass:e=>{Be(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[me(e),pe(e),i,t,l].filter(Boolean).join(" ")||null},headerEnd:U,columnMenuItems:(e,i)=>e?.props?.fieldMenu?le(e,Le(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});m("fieldRating",{component:Fe,props:o,typeToEdit:e=>/^[0-9]$/.test(e)}),m("fieldLink",{component:he,props:o,typeToEdit:e=>e!==" "}),m("fieldNumber",{component:Me,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove,onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9.,:+\-(]/.test(e)}),m("fieldLongText",{component:Te,props:e=>({...o(e),onCommitAndMove:e.onCommitAndMove})}),m("fieldSelect",{component:ve,props:e=>({...o(e),grid:e.grid,onChange:e.onChange,onCommitAndMove:e.onCommitAndMove})}),m("attachment",{component:V,props:e=>({value:e.value,columnDef:e.columnDef,columnId:e.columnId,row:e.row,onCommit:e.onCommit,onCancel:e.onCancel}),typeToEdit:!1});const r=e=>({...o(e),onCommitAndMove:e.onCommitAndMove});m("fieldChecklist",{component:xe,props:r}),m("fieldRichText",{component:Ee,props:r}),m("fieldVote",{component:ke,props:r,typeToEdit:e=>e===" "}),m("fieldColor",{component:Ae,props:r}),m("fieldTime",{component:Se,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9]/.test(e)}),m("fieldDate",{component:we,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9a-z]/i.test(e)}),_("fieldFilter",(e,i)=>z(e,i.getValue,ee)),$(()=>x()?.id),oe(),G(),g(Ke,{id:"svgrid-fields-space"}),g(Ge,{id:"svgrid-fields-keys"}),g(Ne,{id:"svgrid-base-keys"}),g(_e,{id:"svgrid-base-fill-down"}),B("base","SvGrid Base")}export{inboxRecords,listColumns,listGroups,viewRecords}from"./list-view.js";import{aiFieldEdited as $e,aiFieldMenuItems as qe}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 O,registerGridShortcuts as g}from"@svgrid/grid";import{nudgeEnterpriseFor as P}from"../license.js";import B from"./FieldCell.svelte";import L from"./RowAdder.svelte";import V from"./FootRowAdder.svelte";import H from"./AttachmentEditor.svelte";import N from"./FieldsHeaderEnd.svelte";import{askDeleteField as U,openFieldEditor as C,openRecord as _}from"./editor-request.svelte.js";import{enableAdvancedFilter as G,registerFilterKind as K}from"../advanced-filter-enable.js";import{compileFieldFilter as z,newCondition as w,resolveMeWith as $}from"./filter-model.js";import{hasBar as q,openBarPanel as F}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 we from"./LinkPickerEditor.svelte";import Fe 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 ke from"./TimerEditor.svelte";import xe from"./ChecklistEditor.svelte";import Se from"./ColorEditor.svelte";import Re from"./TimeOfDayEditor.svelte";import De from"./RowHeader.svelte";import Ie from"./GroupHeader.svelte";import Oe from"./SummaryCell.svelte";import{getCurrentUser as k}from"./sources.svelte.js";import{fieldColumns as Pe,gridOf as y,primaryIdOf as h,rememberGrid as Be}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{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{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{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)?[...w(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:()=>Ne(o,r)}]]:[];return[...i?[i]:[],{key:"field-edit",label:p("fields.menuEdit"),icon:m.edit,run:()=>C({ctrl:o,mode:"edit",columnId:r})},...t?[]:[{key:"field-left",label:p("fields.menuInsertLeft"),icon:m.left,run:()=>C({ctrl:o,mode:"add",index:v(o,r,"left")})}],{key:"field-right",label:p("fields.menuInsertRight"),icon:m.right,run:()=>C({ctrl:o,mode:"add",index:v(o,r,"right")})},{key:"field-duplicate",label:p("fields.menuDuplicate"),icon:m.duplicate,run:()=>{o.props.baseRefuseDuplicate?.(r)||re(o,r)}},...t?[]:[{key:"field-move-left",label:p("fields.menuMoveLeft"),icon:m.left,disabled:!S(o,r,-1),run:()=>R(o,r,-1)},{key:"field-move-right",label:p("fields.menuMoveRight"),icon:m.right,disabled:!S(o,r,1),run:()=>R(o,r,1)}],...l,...je(o,r,e),...t?[]:[{key:"field-hide",label:p("fields.menuHide"),icon:m.hide,run:()=>ie(o,r)},{key:"field-delete",label:p("fields.menuDelete"),icon:m.remove,separatorBefore:!0,run:()=>e?.fieldType==="link"&&(e.fieldProps?.inverse&&Z(e.fieldProps.table)||ne({columns:o.internalColumns},e).length)||e&&de(o.internalColumns??[],e).length||Q(o,e).length?U({ctrl:o,columnId:r}):te(o,r)}]]}function x(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)=>!!x(o,r,e);function R(o,r,e){const i=x(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(qe(s.length?[...s,...a.filter(n=>!s.includes(n))]:a,t))}function He(o,r,e){const i=w(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]}),F(o,"filter")}function Ne(o,r){const e=X(o);e.some(i=>i.id===r)||W(o.buildApi(),[...e,{id:r,desc:!1}],j(o)),F(o,"group")}function D(o,r,e,i,t){if(!r)return;const l=k()?.id,d=i??o.buildApi?.().getRowId?.(r),a=(s,n)=>{d!=null&&!t&&o.editedCellValues&&(o.editedCellValues={...o.editedCellValues,[`${d}:${s}`]:n})};for(const s of o?.internalColumns??[]){if(s.fieldType!=="lastModifiedTime"&&s.fieldType!=="lastModifiedBy")continue;const n=String(s.id??s.field);if(n===e||!s.field)continue;const u=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 Ge(o,r){if(o.key!=="Enter"&&o.key!==" "||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||r.editing||!r.activeCell)return!1;const e=y(r.api);if(!e?.props?.baseDeleteSelection)return!1;const{rowIndex:i,colIndex:t}=r.activeCell,l=e.allColumns?.[t]?.columnDef.editorType,d=l==="checkbox";if(o.key===" "&&!d&&l!=="fieldVote")return!1;const a=r.ranges.at(-1);return o.key==="Enter"&&(r.ranges.length>1||a&&(a[0]!==a[2]||a[1]!==a[3]))||!e.isCellEditableAt(i,t)?!1:(o.preventDefault(),d?(e.toggleBooleanCell(i,t),!0):(r.startEditing(i,t),!!e.editingCell))}import{baseGridKey as Ke}from"./base-keys.svelte.js";import{treeGridKey as ze}from"./tree-edit.js";import{fillDownKey as $e}from"./base-fill.js";import{orderKeepingScreen as qe}from"./column-order.js";let I=!1;export function enableFields(){if(I)return;I=!0;for(const e of ae)E(e.id)||be(e);O({column:(e,i)=>ge(e,i),cell:B,hasCell:e=>ye(e??{}),cellEdited:(e,i)=>{D(e,i.row,i.columnId,i.rowId,i.offGrid),Ue(e,i.row,i.columnId,i.rowId),Xe(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&&Pe(e).some(i=>i.fieldType)?Ie:null,summaryCell:e=>e?.props?.rowModel?null:Oe,rootClass:e=>{Be(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:N,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:we,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:xe,props:r}),f("fieldRichText",{component:Ae,props:r}),f("fieldVote",{component:Ee,props:r,typeToEdit:e=>e===" "}),f("fieldTimer",{component:ke,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:Fe,props:e=>({...r(e),onCommitAndMoveDown:e.onCommitAndMoveDown}),typeToEdit:e=>/[0-9a-z]/i.test(e)}),K("fieldFilter",(e,i)=>z(e,i.getValue,ee)),$(()=>k()?.id),oe(),G(),g(_e,{id:"svgrid-fields-space"}),g(Ke,{id:"svgrid-fields-keys"}),g(Ge,{id:"svgrid-base-keys"}),g($e,{id:"svgrid-base-fill-down"}),g(ze,{id:"svgrid-base-tree"}),P("base","SvGrid Base")}export{inboxRecords,listColumns,listGroups,viewRecords}from"./list-view.js";import{aiFieldEdited as Xe,aiFieldMenuItems as je}from"./ai-field.svelte.js";export{generateAIField,regenerateAIFields,cancelAIField,pendingAIField,setAIFieldConcurrency}from"./ai-field.svelte.js";export{aiPromptError,readAIAnswer}from"./ai-prompt.js";export{moveTile,newTile,putTile,removeTile,tileResult,tileRows,tileTitle}from"./dashboard.js";export{sharedTables,sharedViews,shareOf}from"./base-share.js";export{recordsAsShown,downloadAsShown}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";
|
|
@@ -156,4 +156,98 @@ export declare const EXTRAS_MESSAGES: {
|
|
|
156
156
|
readonly 'extras.pickAutomation': "Pick an automation, or add one.";
|
|
157
157
|
readonly 'extras.noName': "(no name)";
|
|
158
158
|
readonly 'extras.noRecordValue': "(no record)";
|
|
159
|
+
readonly 'extras.pageLabel': "Automations of the base";
|
|
160
|
+
readonly 'extras.createAutomation': "+ Create automation";
|
|
161
|
+
readonly 'extras.runHistory': "Run history";
|
|
162
|
+
readonly 'extras.pageEmpty': "No automations yet. An automation does something on its own: when a record is added or changes, a form is sent, a button is pressed or at a time you set.";
|
|
163
|
+
readonly 'extras.pickOne': "Pick an automation on the left, or create one.";
|
|
164
|
+
readonly 'extras.triggerCard': "Trigger";
|
|
165
|
+
readonly 'extras.whenIn': "{when}, in {table}";
|
|
166
|
+
readonly 'extras.conditionCard': "Only for records where";
|
|
167
|
+
readonly 'extras.conditionEvery': "Every record";
|
|
168
|
+
readonly 'extras.conditionCount.one': "{count} condition";
|
|
169
|
+
readonly 'extras.conditionCount.other': "{count} conditions";
|
|
170
|
+
readonly 'extras.addCondition': "+ Add a condition";
|
|
171
|
+
readonly 'extras.actionCard': "Action {n}";
|
|
172
|
+
readonly 'extras.insertAction': "Add an action here";
|
|
173
|
+
readonly 'extras.addActionPage': "+ Add an action";
|
|
174
|
+
readonly 'extras.flowLabel': "What {name} does";
|
|
175
|
+
readonly 'extras.summarySet': "Set {fields}";
|
|
176
|
+
readonly 'extras.summaryNothing': "No fields set yet";
|
|
177
|
+
readonly 'extras.summaryCreate': "A new record in {table}";
|
|
178
|
+
readonly 'extras.summaryEmail': "To {to}";
|
|
179
|
+
readonly 'extras.summaryNoTo': "No address yet";
|
|
180
|
+
readonly 'extras.summaryColor': "While it matches";
|
|
181
|
+
readonly 'extras.tableOfTrigger': "Table";
|
|
182
|
+
readonly 'extras.tableMoveHint': "Its trigger, condition and fields are for this table: a new table starts them again.";
|
|
183
|
+
readonly 'extras.settingsOf': "Settings";
|
|
184
|
+
readonly 'extras.testOn': "Test on";
|
|
185
|
+
readonly 'extras.test': "Test";
|
|
186
|
+
readonly 'extras.testRuns': "Its runs show in the run history.";
|
|
187
|
+
readonly 'extras.allRunsOf': "Runs of {name}";
|
|
188
|
+
readonly 'extras.allRuns': "All runs";
|
|
189
|
+
readonly 'extras.showAllRuns': "Show every automation's runs";
|
|
190
|
+
readonly 'extras.whenWebhook': "When a webhook is received";
|
|
191
|
+
readonly 'extras.triggerWebhook': "A webhook is received";
|
|
192
|
+
readonly 'extras.webhookAddress': "Webhook address";
|
|
193
|
+
readonly 'extras.webhookNoUrl': "This automation listens for the token {token}: give it to your server runner (webhookReceived).";
|
|
194
|
+
readonly 'extras.webhookHint': "Send a POST with a JSON body to this address. Its values are {webhook.name} in the steps ({webhook.order.id} inside objects). Anyone with the address can start the automation: keep it secret.";
|
|
195
|
+
readonly 'extras.newAddress': "Make a new address";
|
|
196
|
+
readonly 'extras.copy': "Copy";
|
|
197
|
+
readonly 'extras.copied': "Copied";
|
|
198
|
+
readonly 'extras.actionChat': "Send a message";
|
|
199
|
+
readonly 'extras.actionRepeat': "Find records";
|
|
200
|
+
readonly 'extras.actionIf': "If";
|
|
201
|
+
readonly 'extras.actionAi': "Ask AI";
|
|
202
|
+
readonly 'extras.actionScript': "Run a script";
|
|
203
|
+
readonly 'extras.doChat': "Send a Slack, Teams or Google Chat message";
|
|
204
|
+
readonly 'extras.doRepeat': "Find records and, for each, do";
|
|
205
|
+
readonly 'extras.doIf': "If a condition holds, do";
|
|
206
|
+
readonly 'extras.doAi': "Ask AI";
|
|
207
|
+
readonly 'extras.doScript': "Run a script";
|
|
208
|
+
readonly 'extras.stepChat': "Message";
|
|
209
|
+
readonly 'extras.stepIf': "If";
|
|
210
|
+
readonly 'extras.stepIfThen': "It matched: the Then steps ran";
|
|
211
|
+
readonly 'extras.stepIfElse': "It did not match: the Otherwise steps ran";
|
|
212
|
+
readonly 'extras.stepFound': "Find records";
|
|
213
|
+
readonly 'extras.foundIn': "{count} in {table}";
|
|
214
|
+
readonly 'extras.stepAi': "AI";
|
|
215
|
+
readonly 'extras.stepScript': "Script";
|
|
216
|
+
readonly 'extras.noAi': "No AI model is set up here.";
|
|
217
|
+
readonly 'extras.aiNoPrompt': "The prompt is empty.";
|
|
218
|
+
readonly 'extras.scriptFailed': "The script failed.";
|
|
219
|
+
readonly 'extras.noField': "No field named {field}.";
|
|
220
|
+
readonly 'extras.noRecordId': "No record {id}.";
|
|
221
|
+
readonly 'extras.stepKind': "{list}, step {n}";
|
|
222
|
+
readonly 'extras.addStep': "+ Add a step";
|
|
223
|
+
readonly 'extras.addStepTo': "Add a step to {list}";
|
|
224
|
+
readonly 'extras.chatApp': "Chat app";
|
|
225
|
+
readonly 'extras.chatUrl': "Webhook address";
|
|
226
|
+
readonly 'extras.chatHintSlack': "In Slack: Apps, Incoming Webhooks, Add to a channel; paste the address it gives here.";
|
|
227
|
+
readonly 'extras.chatHintTeams': "In Teams: the channel's Workflows, \"Post to a channel when a webhook request is received\"; paste the address it gives here.";
|
|
228
|
+
readonly 'extras.chatHintGoogle': "In Google Chat: the space's Apps and integrations, Webhooks, Add webhook; paste the address it gives here.";
|
|
229
|
+
readonly 'extras.ifHint': "When the record matches this condition the Then steps run, otherwise the Otherwise steps.";
|
|
230
|
+
readonly 'extras.ifAlways': "No condition: Then always runs";
|
|
231
|
+
readonly 'extras.then': "Then";
|
|
232
|
+
readonly 'extras.otherwise': "Otherwise";
|
|
233
|
+
readonly 'extras.findIn': "Find in";
|
|
234
|
+
readonly 'extras.whichRecords': "Records where";
|
|
235
|
+
readonly 'extras.atMost': "At most";
|
|
236
|
+
readonly 'extras.forEach': "For each record found";
|
|
237
|
+
readonly 'extras.repeatHint': "In these steps {Field} is the found record's field, {trigger.Field} the field of the record that set the automation off, and {found} how many were found.";
|
|
238
|
+
readonly 'extras.aiPrompt': "Prompt";
|
|
239
|
+
readonly 'extras.aiPlaceholder': "Write a two-line summary of {{field}} for a weekly report.";
|
|
240
|
+
readonly 'extras.aiInto': "Put the answer in";
|
|
241
|
+
readonly 'extras.aiNowhere': "No field (use {ai} in the next steps)";
|
|
242
|
+
readonly 'extras.aiHint': "Name fields in braces. The answer is {ai} in the next steps.";
|
|
243
|
+
readonly 'extras.scriptCode': "Script";
|
|
244
|
+
readonly 'extras.scriptNeedsBrowser': "A script runs in the browser: set Runs in to The browser.";
|
|
245
|
+
readonly 'extras.scriptHint': "JavaScript, as in Airtable: input.config() has the record's fields by name; base.getTable('Name') reads and changes a table (selectRecordsAsync, updateRecordAsync, createRecordAsync, deleteRecordAsync); output.set('name', value) is {script.name} in the next steps; fetch() calls https addresses that allow it. It runs in a sandbox for up to 30 seconds.";
|
|
246
|
+
readonly 'extras.scriptInPageHint': "It runs in the page of the person who made the change, with what they may do. A run with no one's page behind it (a schedule, a webhook, a change through the API) stops at this step and says so.";
|
|
247
|
+
readonly 'extras.summaryNoText': "Nothing written yet";
|
|
248
|
+
readonly 'extras.stepCount.one': "{count} step";
|
|
249
|
+
readonly 'extras.stepCount.other': "{count} steps";
|
|
250
|
+
readonly 'extras.summaryRepeat': "{steps} for each record in {table}";
|
|
251
|
+
readonly 'extras.summaryIf': "Then {then}; otherwise {otherwise}";
|
|
252
|
+
readonly 'extras.summaryScript': "{lines} lines";
|
|
159
253
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const EXTRAS_MESSAGES={"extras.whenCreated":"When a record is created","extras.whenCreatedWhere":"When a record is created, where {condition}","extras.whenRecordChanges":"When a record changes","extras.whenRecordChangesWhere":"When a record changes, where {condition}","extras.whenFieldsChange":"When {fields} changes","extras.whenFieldsChangeWhere":"When {fields} changes, where {condition}","extras.fieldsOr":" or ","extras.whenMatches":"When a record matches: {condition}","extras.noConditionYet":"no condition yet","extras.whenForm":"When a form is sent","extras.whenFormWhere":"When a form is sent, where {condition}","extras.whenPressed":"When {field} is pressed","extras.onSchedule":"On a schedule ({cron})","extras.onScheduleWhere":"On a schedule ({cron}), for records where {condition}","extras.actionUpdateRecord":"Update record","extras.actionCreateRecord":"Create record","extras.actionNotify":"Show a notice","extras.actionHighlight":"Color the record","extras.actionWebhook":"Call a webhook","extras.actionEmail":"Send an email","extras.stepStopped":"Stopped","extras.stepLoop":"Automations set each other off {max} times in a row; this one did not run, so they cannot loop.","extras.stepNotice":"Notice","extras.stepWebhook":"Webhook","extras.stepEmail":"Email","extras.stepNotRun":"Not run","extras.stepNoMatch":"The record does not match the condition","extras.stepDone":"Done","extras.noRecordToUpdate":"No record to update","extras.alreadySet":"Already set","extras.noTable":'No table "{table}"',"extras.noAction":'No action "{action}" is registered',"extras.aRecord":"a record","extras.createdIn":"{name} in {table}","extras.saidValue":"{field}: {value}","extras.saidChecked":"{field}: checked","extras.saidUnchecked":"{field}: unchecked","extras.saidEmpty":"empty","extras.title":"Automations in {table}","extras.listLabel":"Automations","extras.untitled":"Untitled","extras.switchOn":"{name} on","extras.noAutomations":"No automations yet. An automation does something when a record is added, changes or matches a condition.","extras.addAutomation":"+ New automation","extras.newAutomation":"New automation","extras.newRecordMessage":"New record: {{field}}","extras.nameFallback":"Name","extras.runs":"Runs","extras.clearRuns":"Clear this page's runs","extras.serverRunsFailed":"The server's runs did not load: {message}","extras.statusDone":"Done","extras.statusFailed":"Failed","extras.statusStopped":"Stopped","extras.runOn":"on {record}","extras.runIn":"in {table}","extras.serverTag":"Server","extras.noRuns":"Nothing has run yet. Runs show here with what each action did.","extras.name":"Name","extras.runsIn":"Runs in","extras.runsInBrowser":"This browser","extras.runsInServer":"The server","extras.serverHint":"Your server runs it (createAutomationServer): it hears changes from the database, whoever made them, reads secrets and sends email.","extras.browserHint":"It runs in the browser of the person who makes the change, right away.","extras.when":"When","extras.trigger":"Trigger","extras.triggerCreated":"A record is created","extras.triggerUpdated":"A record changes","extras.triggerMatches":"A record matches a condition","extras.triggerForm":"A form is sent","extras.triggerButton":"A button is pressed","extras.triggerScheduled":"At a scheduled time","extras.watchSome":"Only when one of these fields changes:","extras.watchAny":"Any field. Pick fields to watch only those:","extras.form":"Form","extras.anyForm":"Any form of this table","extras.buttonField":"Button field","extras.addButtonFirst":"Add a Button field to the table first.","extras.schedule":"Schedule","extras.customSchedule":"Custom","extras.cronExpression":"Cron expression","extras.scheduleHint":"Runs while the base is open in a browser. With a condition, it runs once for each record that matches at that time.","extras.condition":"Condition","extras.onlyWhere":"Only for records where","extras.startsToMatch":"Runs when a record starts to match","extras.addMatchCondition":"Add the condition a record has to start matching.","extras.everyRecord":"Every record. Add a condition to narrow it.","extras.do":"Do","extras.action":"Action","extras.doUpdateRecord":"Update the record","extras.doCreateRecord":"Create a record","extras.doHighlight":"Color the record while it matches","extras.moveUp":"Move up","extras.moveDown":"Move down","extras.moveStepUp":"Move step {step} up","extras.moveStepDown":"Move step {step} down","extras.removeStep":"Remove step {step}","extras.stepMoved":"Step {from} is now step {to}.","extras.removeAction":"Remove action","extras.message":"Message","extras.notifyPlaceholder":"{{field}} needs a look","extras.kind":"Kind","extras.severityInfo":"Info","extras.severitySuccess":"Success","extras.severityWarning":"Warning","extras.severityError":"Error","extras.notifyHint":"Name a field in braces for its value: {fields}.","extras.highlightNeedsCondition":"Colors records while they match the condition above; add one.","extras.fill":"Fill","extras.text":"Text","extras.sample":"Sample","extras.wholeRow":"Whole row","extras.in":"In","extras.table":"Table","extras.linkBack":"Link it back","extras.linkField":"Link field","extras.noLink":"No link","extras.through":"through {field}","extras.valueOf":"{field} value","extras.valuePlaceholder":"a value, or {Field}","extras.numberPlaceholder":"0, or 100% for a percent","extras.linkPlaceholder":"a record name, or {record}","extras.userPlaceholder":"a name","extras.doNotSet":"Do not set {field}","extras.remove":"Remove","extras.setField":"Set a field","extras.addSetField":"+ Set a field","extras.runsApp":"Runs {action}, an action the app registered.","extras.method":"Method","extras.url":"URL","extras.headers":"Headers","extras.body":"Body","extras.webhookHintServer":"Empty body: the record as JSON. {secret} is read on the server only.","extras.webhookHintBrowser":"Empty body: the record as JSON. {secret} is read on the server only; set Runs in to The server to use one.","extras.emailNeedsServer":"Email is sent by the server: set Runs in to The server.","extras.to":"To","extras.toPlaceholder":"team@example.com, {Owner email}","extras.subject":"Subject","extras.emailText":"Email text","extras.addAction":"Add an action","extras.addActionOption":"+ Add an action","extras.deleteIt":"Delete it?","extras.delete":"Delete","extras.keep":"Keep","extras.deleteAutomation":"Delete automation","extras.runsOnServer":"Runs on your server when its trigger happens.","extras.tryRecord":"Record to try it on","extras.noRecord":"No record","extras.runNow":"Run now","extras.pickAutomation":"Pick an automation, or add one.","extras.noName":"(no name)","extras.noRecordValue":"(no record)"};
|
|
1
|
+
export const EXTRAS_MESSAGES={"extras.whenCreated":"When a record is created","extras.whenCreatedWhere":"When a record is created, where {condition}","extras.whenRecordChanges":"When a record changes","extras.whenRecordChangesWhere":"When a record changes, where {condition}","extras.whenFieldsChange":"When {fields} changes","extras.whenFieldsChangeWhere":"When {fields} changes, where {condition}","extras.fieldsOr":" or ","extras.whenMatches":"When a record matches: {condition}","extras.noConditionYet":"no condition yet","extras.whenForm":"When a form is sent","extras.whenFormWhere":"When a form is sent, where {condition}","extras.whenPressed":"When {field} is pressed","extras.onSchedule":"On a schedule ({cron})","extras.onScheduleWhere":"On a schedule ({cron}), for records where {condition}","extras.actionUpdateRecord":"Update record","extras.actionCreateRecord":"Create record","extras.actionNotify":"Show a notice","extras.actionHighlight":"Color the record","extras.actionWebhook":"Call a webhook","extras.actionEmail":"Send an email","extras.stepStopped":"Stopped","extras.stepLoop":"Automations set each other off {max} times in a row; this one did not run, so they cannot loop.","extras.stepNotice":"Notice","extras.stepWebhook":"Webhook","extras.stepEmail":"Email","extras.stepNotRun":"Not run","extras.stepNoMatch":"The record does not match the condition","extras.stepDone":"Done","extras.noRecordToUpdate":"No record to update","extras.alreadySet":"Already set","extras.noTable":'No table "{table}"',"extras.noAction":'No action "{action}" is registered',"extras.aRecord":"a record","extras.createdIn":"{name} in {table}","extras.saidValue":"{field}: {value}","extras.saidChecked":"{field}: checked","extras.saidUnchecked":"{field}: unchecked","extras.saidEmpty":"empty","extras.title":"Automations in {table}","extras.listLabel":"Automations","extras.untitled":"Untitled","extras.switchOn":"{name} on","extras.noAutomations":"No automations yet. An automation does something when a record is added, changes or matches a condition.","extras.addAutomation":"+ New automation","extras.newAutomation":"New automation","extras.newRecordMessage":"New record: {{field}}","extras.nameFallback":"Name","extras.runs":"Runs","extras.clearRuns":"Clear this page's runs","extras.serverRunsFailed":"The server's runs did not load: {message}","extras.statusDone":"Done","extras.statusFailed":"Failed","extras.statusStopped":"Stopped","extras.runOn":"on {record}","extras.runIn":"in {table}","extras.serverTag":"Server","extras.noRuns":"Nothing has run yet. Runs show here with what each action did.","extras.name":"Name","extras.runsIn":"Runs in","extras.runsInBrowser":"This browser","extras.runsInServer":"The server","extras.serverHint":"Your server runs it (createAutomationServer): it hears changes from the database, whoever made them, reads secrets and sends email.","extras.browserHint":"It runs in the browser of the person who makes the change, right away.","extras.when":"When","extras.trigger":"Trigger","extras.triggerCreated":"A record is created","extras.triggerUpdated":"A record changes","extras.triggerMatches":"A record matches a condition","extras.triggerForm":"A form is sent","extras.triggerButton":"A button is pressed","extras.triggerScheduled":"At a scheduled time","extras.watchSome":"Only when one of these fields changes:","extras.watchAny":"Any field. Pick fields to watch only those:","extras.form":"Form","extras.anyForm":"Any form of this table","extras.buttonField":"Button field","extras.addButtonFirst":"Add a Button field to the table first.","extras.schedule":"Schedule","extras.customSchedule":"Custom","extras.cronExpression":"Cron expression","extras.scheduleHint":"Runs while the base is open in a browser. With a condition, it runs once for each record that matches at that time.","extras.condition":"Condition","extras.onlyWhere":"Only for records where","extras.startsToMatch":"Runs when a record starts to match","extras.addMatchCondition":"Add the condition a record has to start matching.","extras.everyRecord":"Every record. Add a condition to narrow it.","extras.do":"Do","extras.action":"Action","extras.doUpdateRecord":"Update the record","extras.doCreateRecord":"Create a record","extras.doHighlight":"Color the record while it matches","extras.moveUp":"Move up","extras.moveDown":"Move down","extras.moveStepUp":"Move step {step} up","extras.moveStepDown":"Move step {step} down","extras.removeStep":"Remove step {step}","extras.stepMoved":"Step {from} is now step {to}.","extras.removeAction":"Remove action","extras.message":"Message","extras.notifyPlaceholder":"{{field}} needs a look","extras.kind":"Kind","extras.severityInfo":"Info","extras.severitySuccess":"Success","extras.severityWarning":"Warning","extras.severityError":"Error","extras.notifyHint":"Name a field in braces for its value: {fields}.","extras.highlightNeedsCondition":"Colors records while they match the condition above; add one.","extras.fill":"Fill","extras.text":"Text","extras.sample":"Sample","extras.wholeRow":"Whole row","extras.in":"In","extras.table":"Table","extras.linkBack":"Link it back","extras.linkField":"Link field","extras.noLink":"No link","extras.through":"through {field}","extras.valueOf":"{field} value","extras.valuePlaceholder":"a value, or {Field}","extras.numberPlaceholder":"0, or 100% for a percent","extras.linkPlaceholder":"a record name, or {record}","extras.userPlaceholder":"a name","extras.doNotSet":"Do not set {field}","extras.remove":"Remove","extras.setField":"Set a field","extras.addSetField":"+ Set a field","extras.runsApp":"Runs {action}, an action the app registered.","extras.method":"Method","extras.url":"URL","extras.headers":"Headers","extras.body":"Body","extras.webhookHintServer":"Empty body: the record as JSON. {secret} is read on the server only.","extras.webhookHintBrowser":"Empty body: the record as JSON. {secret} is read on the server only; set Runs in to The server to use one.","extras.emailNeedsServer":"Email is sent by the server: set Runs in to The server.","extras.to":"To","extras.toPlaceholder":"team@example.com, {Owner email}","extras.subject":"Subject","extras.emailText":"Email text","extras.addAction":"Add an action","extras.addActionOption":"+ Add an action","extras.deleteIt":"Delete it?","extras.delete":"Delete","extras.keep":"Keep","extras.deleteAutomation":"Delete automation","extras.runsOnServer":"Runs on your server when its trigger happens.","extras.tryRecord":"Record to try it on","extras.noRecord":"No record","extras.runNow":"Run now","extras.pickAutomation":"Pick an automation, or add one.","extras.noName":"(no name)","extras.noRecordValue":"(no record)","extras.pageLabel":"Automations of the base","extras.createAutomation":"+ Create automation","extras.runHistory":"Run history","extras.pageEmpty":"No automations yet. An automation does something on its own: when a record is added or changes, a form is sent, a button is pressed or at a time you set.","extras.pickOne":"Pick an automation on the left, or create one.","extras.triggerCard":"Trigger","extras.whenIn":"{when}, in {table}","extras.conditionCard":"Only for records where","extras.conditionEvery":"Every record","extras.conditionCount.one":"{count} condition","extras.conditionCount.other":"{count} conditions","extras.addCondition":"+ Add a condition","extras.actionCard":"Action {n}","extras.insertAction":"Add an action here","extras.addActionPage":"+ Add an action","extras.flowLabel":"What {name} does","extras.summarySet":"Set {fields}","extras.summaryNothing":"No fields set yet","extras.summaryCreate":"A new record in {table}","extras.summaryEmail":"To {to}","extras.summaryNoTo":"No address yet","extras.summaryColor":"While it matches","extras.tableOfTrigger":"Table","extras.tableMoveHint":"Its trigger, condition and fields are for this table: a new table starts them again.","extras.settingsOf":"Settings","extras.testOn":"Test on","extras.test":"Test","extras.testRuns":"Its runs show in the run history.","extras.allRunsOf":"Runs of {name}","extras.allRuns":"All runs","extras.showAllRuns":"Show every automation's runs","extras.whenWebhook":"When a webhook is received","extras.triggerWebhook":"A webhook is received","extras.webhookAddress":"Webhook address","extras.webhookNoUrl":"This automation listens for the token {token}: give it to your server runner (webhookReceived).","extras.webhookHint":"Send a POST with a JSON body to this address. Its values are {webhook.name} in the steps ({webhook.order.id} inside objects). Anyone with the address can start the automation: keep it secret.","extras.newAddress":"Make a new address","extras.copy":"Copy","extras.copied":"Copied","extras.actionChat":"Send a message","extras.actionRepeat":"Find records","extras.actionIf":"If","extras.actionAi":"Ask AI","extras.actionScript":"Run a script","extras.doChat":"Send a Slack, Teams or Google Chat message","extras.doRepeat":"Find records and, for each, do","extras.doIf":"If a condition holds, do","extras.doAi":"Ask AI","extras.doScript":"Run a script","extras.stepChat":"Message","extras.stepIf":"If","extras.stepIfThen":"It matched: the Then steps ran","extras.stepIfElse":"It did not match: the Otherwise steps ran","extras.stepFound":"Find records","extras.foundIn":"{count} in {table}","extras.stepAi":"AI","extras.stepScript":"Script","extras.noAi":"No AI model is set up here.","extras.aiNoPrompt":"The prompt is empty.","extras.scriptFailed":"The script failed.","extras.noField":"No field named {field}.","extras.noRecordId":"No record {id}.","extras.stepKind":"{list}, step {n}","extras.addStep":"+ Add a step","extras.addStepTo":"Add a step to {list}","extras.chatApp":"Chat app","extras.chatUrl":"Webhook address","extras.chatHintSlack":"In Slack: Apps, Incoming Webhooks, Add to a channel; paste the address it gives here.","extras.chatHintTeams":`In Teams: the channel's Workflows, "Post to a channel when a webhook request is received"; paste the address it gives here.`,"extras.chatHintGoogle":"In Google Chat: the space's Apps and integrations, Webhooks, Add webhook; paste the address it gives here.","extras.ifHint":"When the record matches this condition the Then steps run, otherwise the Otherwise steps.","extras.ifAlways":"No condition: Then always runs","extras.then":"Then","extras.otherwise":"Otherwise","extras.findIn":"Find in","extras.whichRecords":"Records where","extras.atMost":"At most","extras.forEach":"For each record found","extras.repeatHint":"In these steps {Field} is the found record's field, {trigger.Field} the field of the record that set the automation off, and {found} how many were found.","extras.aiPrompt":"Prompt","extras.aiPlaceholder":"Write a two-line summary of {{field}} for a weekly report.","extras.aiInto":"Put the answer in","extras.aiNowhere":"No field (use {ai} in the next steps)","extras.aiHint":"Name fields in braces. The answer is {ai} in the next steps.","extras.scriptCode":"Script","extras.scriptNeedsBrowser":"A script runs in the browser: set Runs in to The browser.","extras.scriptHint":"JavaScript, as in Airtable: input.config() has the record's fields by name; base.getTable('Name') reads and changes a table (selectRecordsAsync, updateRecordAsync, createRecordAsync, deleteRecordAsync); output.set('name', value) is {script.name} in the next steps; fetch() calls https addresses that allow it. It runs in a sandbox for up to 30 seconds.","extras.scriptInPageHint":"It runs in the page of the person who made the change, with what they may do. A run with no one's page behind it (a schedule, a webhook, a change through the API) stops at this step and says so.","extras.summaryNoText":"Nothing written yet","extras.stepCount.one":"{count} step","extras.stepCount.other":"{count} steps","extras.summaryRepeat":"{steps} for each record in {table}","extras.summaryIf":"Then {then}; otherwise {otherwise}","extras.summaryScript":"{lines} lines"};
|
|
@@ -51,6 +51,20 @@ export declare const FIELDS_MESSAGES: {
|
|
|
51
51
|
readonly 'fields.optionsSameName': "Two options cannot have the same name: {name}.";
|
|
52
52
|
readonly 'fields.optionNeedsName': "An option in use needs a name: {name}. Name it, or remove it.";
|
|
53
53
|
readonly 'fields.cancel': "Cancel";
|
|
54
|
+
readonly 'fields.templatesOf': "Record templates of {table}";
|
|
55
|
+
readonly 'fields.templatesHint': "A template fills in some fields of a new record. Pick it from the arrow beside + Add row.";
|
|
56
|
+
readonly 'fields.templateNew': "New template";
|
|
57
|
+
readonly 'fields.templateAdd': "+ New template";
|
|
58
|
+
readonly 'fields.templateName': "Template name";
|
|
59
|
+
readonly 'fields.templateHint': "The fields a new record starts with, written as the field shows them: an option's name, a person's name, today or today+7 for a date, a linked record's name.";
|
|
60
|
+
readonly 'fields.templateDone': "Done";
|
|
61
|
+
readonly 'fields.templateFields.one': "{count} field set";
|
|
62
|
+
readonly 'fields.templateFields.other': "{count} fields set";
|
|
63
|
+
readonly 'fields.templateDelete': "Delete the template {name}";
|
|
64
|
+
readonly 'fields.templateDeleteAsk': "Delete \"{name}\"?";
|
|
65
|
+
readonly 'fields.templateDeleteYes': "Delete";
|
|
66
|
+
readonly 'fields.fromTemplate': "Add from a template";
|
|
67
|
+
readonly 'fields.manageTemplates': "Manage templates";
|
|
54
68
|
readonly 'fields.save': "Save";
|
|
55
69
|
readonly 'fields.createField': "Create field";
|
|
56
70
|
readonly 'fields.choose': "Choose...";
|
|
@@ -130,6 +144,8 @@ export declare const FIELDS_MESSAGES: {
|
|
|
130
144
|
readonly 'fields.typeTimeOfDayDescription': "A time on the clock with no date, typed as 9:30 am, 14:05 or 2pm.";
|
|
131
145
|
readonly 'fields.typeRating': "Rating";
|
|
132
146
|
readonly 'fields.typeRatingDescription': "One to ten stars, hearts, thumbs, flags or dots.";
|
|
147
|
+
readonly 'fields.typeTimer': "Timer";
|
|
148
|
+
readonly 'fields.typeTimerDescription': "Time counted with a start and stop button; each run adds to the total.";
|
|
133
149
|
readonly 'fields.typeVote': "Vote";
|
|
134
150
|
readonly 'fields.typeVoteDescription': "Who voted for it: one click adds your vote or takes it back.";
|
|
135
151
|
readonly 'fields.typeSparkline': "Sparkline";
|
|
@@ -208,6 +224,9 @@ export declare const FIELDS_MESSAGES: {
|
|
|
208
224
|
readonly 'fields.propTable': "Table";
|
|
209
225
|
readonly 'fields.propTableHint': "The table gets a field that links back to this one.";
|
|
210
226
|
readonly 'fields.propMultipleRecords': "Allow linking to multiple records";
|
|
227
|
+
readonly 'fields.propPickFrom': "Pick records from";
|
|
228
|
+
readonly 'fields.pickFromAll': "All records";
|
|
229
|
+
readonly 'fields.propPickFromHint': "People pick only the records this view of the linked table shows (its filter).";
|
|
211
230
|
readonly 'fields.propAggregation': "Aggregation";
|
|
212
231
|
readonly 'fields.propPrompt': "Prompt";
|
|
213
232
|
readonly 'fields.propPromptPlaceholder': "Write a one-line pitch for {Name}, aimed at {Audience}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const FIELDS_MESSAGES={"fields.editorTitleEdit":"Edit field","fields.editorTitleAdd":"Add field","fields.name":"Name","fields.namePlaceholder":"Field name","fields.fallbackName":"Field","fields.nameRequired":"A field needs a name","fields.needLinkField":"Pick the link field this reads.","fields.needLinkFieldFirst":"This table has no link field yet: add one first.","fields.needLinkedField":"Pick the field to read from the linked table.","fields.needPrompt":"Write what the field should work out.","fields.nameTaken":"Another field has this name","fields.fixFormulaFirst":"Fix the formula first: {message}","fields.fixPromptFirst":"Fix the prompt first: {message}","fields.fieldType":"Field type","fields.keyFixed":"This field is the record key the database gives each record. Its type and values cannot change; its name and description can.","fields.findType":"Find a type","fields.findTypeLabel":"Find a field type","fields.noTypeMatches":'No type matches "{search}".',"fields.groupBasic":"Fields","fields.groupNumber":"Numbers and time","fields.groupDate":"Dates","fields.groupPeople":"People","fields.groupComputed":"Computed and automatic","fields.groupRelation":"Other tables","fields.whoCanEdit":"Who can edit its values","fields.whoEveryone":"Everyone who can edit the base","fields.whoOnly":"Only these people","fields.peopleWhoCanEdit":"People who can edit","fields.nameYou":"{name} (you)","fields.nobodyCanChange":"Nobody will be able to change its values.","fields.youCannotChange":"You will not be able to change its values yourself.","fields.othersReadOnly":"Others see the field read-only. Its name, type and options stay editable.","fields.description":"Description","fields.optional":"optional","fields.descriptionPlaceholder":"What goes in this field","fields.convertsValues":"{from} to {to} converts the values.","fields.everyValueConverts":"Every value converts.","fields.cellsCleared.one":"{count} cell will be cleared or cut short.","fields.cellsCleared.other":"{count} cells will be cleared or cut short.","fields.optionRemoved.one":"{count} record holds {name}. Saving clears it from that record.","fields.optionRemoved.other":"{count} records hold {name}. Saving clears it from those records.","fields.optionRenamed.one":"Renames {name} on {count} record.","fields.optionRenamed.other":"Renames {name} on {count} records.","fields.optionsSameName":"Two options cannot have the same name: {name}.","fields.optionNeedsName":"An option in use needs a name: {name}. Name it, or remove it.","fields.cancel":"Cancel","fields.save":"Save","fields.createField":"Create field","fields.choose":"Choose...","fields.checked":"Checked","fields.defaultNone":"None","fields.addOptionsFirst":"Add options first.","fields.nobody":"Nobody","fields.empty":"Empty","fields.formulaPlaceholder":'IF({Budget} > 2000, "Large", "Small")',"fields.insertField":"Insert a field","fields.functions":"Functions","fields.hideFunctions":"Hide functions","fields.optionsList":"Options","fields.colorOf":"Color of {name}","fields.colorOfOption":"Color of option {n}","fields.optionName":"Option name","fields.optionN":"Option {n}","fields.moveUp":"Move up","fields.moveDown":"Move down","fields.removeNamed":"Remove {name}","fields.removeOption":"Remove option","fields.addOption":"+ Add option","fields.sortAZ":"Sort A to Z","fields.menuColorRows":"Color rows by this field","fields.menuStopColoring":"Stop coloring rows","fields.menuFilter":"Filter by this field","fields.menuGroup":"Group by this field","fields.menuEdit":"Edit field","fields.menuInsertLeft":"Insert left","fields.menuInsertRight":"Insert right","fields.menuMoveLeft":"Move left","fields.menuMoveRight":"Move right","fields.menuDuplicate":"Duplicate field","fields.menuHide":"Hide field","fields.menuDelete":"Delete field","fields.typeText":"Single line text","fields.typeTextDescription":"A short line of text, like a name or a title.","fields.typeLongText":"Long text","fields.typeLongTextDescription":"Several lines of text; Alt+Enter starts a new line.","fields.typeRichText":"Rich text","fields.typeRichTextDescription":"Formatted notes: bold, italic, lists and links from a toolbar.","fields.typeAttachment":"Attachment","fields.typeAttachmentDescription":"Images and files: thumbnails in the cell, a dialog to add more.","fields.typeCheckbox":"Checkbox","fields.typeCheckboxDescription":"Done or not done: one click to toggle.","fields.typeSingleSelect":"Single select","fields.typeSingleSelectDescription":"One choice from a list of colored options.","fields.typeMultiSelect":"Multiple select","fields.typeMultiSelectDescription":"Any number of choices from a list of colored options.","fields.typeUser":"User","fields.typeUserDescription":"A person (or several) from the people the app lists.","fields.typeDate":"Date","fields.typeDateDescription":"A calendar date, with or without the time.","fields.typePhone":"Phone number","fields.typePhoneDescription":"A phone number, shown as a tel link.","fields.typeEmail":"Email","fields.typeEmailDescription":"An email address, shown as a mailto link.","fields.typeUrl":"URL","fields.typeUrlDescription":"A web address, shown as a link.","fields.typeBarcode":"Barcode","fields.typeBarcodeDescription":"A barcode's text, from a scanner or typed.","fields.typeButton":"Button","fields.typeButtonDescription":"A button in every row that opens a link made from the row.","fields.typeChecklist":"Checklist","fields.typeChecklistDescription":"A list of to-dos; the cell shows how many are done.","fields.typeColor":"Color","fields.typeColorDescription":"A color from the palette, or any hex code.","fields.typeNumber":"Number","fields.typeNumberDescription":"A number: whole, decimal, an amount of money or a percentage.","fields.typeCurrency":"Currency","fields.typeCurrencyDescription":"An amount, with a currency symbol.","fields.typePercent":"Percent","fields.typePercentDescription":"A share, shown with a percent sign.","fields.typeDuration":"Duration","fields.typeDurationDescription":"A length of time, typed as 1:30 or 1h 30m.","fields.typeTimeOfDay":"Time of day","fields.typeTimeOfDayDescription":"A time on the clock with no date, typed as 9:30 am, 14:05 or 2pm.","fields.typeRating":"Rating","fields.typeRatingDescription":"One to ten stars, hearts, thumbs, flags or dots.","fields.typeVote":"Vote","fields.typeVoteDescription":"Who voted for it: one click adds your vote or takes it back.","fields.typeSparkline":"Sparkline","fields.typeSparklineDescription":"A list of numbers drawn as a small line, area or column chart.","fields.typeFormula":"Formula","fields.typeFormulaDescription":"A value computed from the row's other fields.","fields.typeCreatedTime":"Created time","fields.typeCreatedTimeDescription":"When the row was added. Set automatically.","fields.typeLastModifiedTime":"Last modified time","fields.typeLastModifiedTimeDescription":"When the row last changed. Set automatically.","fields.typeCreatedBy":"Created by","fields.typeCreatedByDescription":"Who added the row. Set automatically.","fields.typeLastModifiedBy":"Last modified by","fields.typeLastModifiedByDescription":"Who last changed the row. Set automatically.","fields.typeAutoNumber":"Autonumber","fields.typeAutoNumberDescription":"A number every row gets, counting up. Set automatically.","fields.typeLink":"Link to records","fields.typeLinkDescription":"Rows of another table this row points at.","fields.typeLookup":"Lookup","fields.typeLookupDescription":"A field of the linked rows, shown here.","fields.typeRollup":"Rollup","fields.typeRollupDescription":"A summary of a field over the linked rows (a sum, a count, a list).","fields.typeCount":"Count","fields.typeCountDescription":"How many rows a link field points at.","fields.typeAi":"AI","fields.typeAiDescription":"A model writes the value from a prompt that names the record's fields. Stored, and editable by hand.","fields.propSeparators":"Separators","fields.propShowThousands":"Show thousands separator","fields.propAbbreviation":"Large number abbreviation","fields.propAllowNegative":"Allow negative numbers","fields.propDefault":"Default value","fields.propDefaultHint":"New rows start with this value.","fields.propDateFormat":"Date format","fields.propIncludeTime":"Include time","fields.propTimeFormat":"Time format","fields.propGmt":"Use the same time zone (GMT) for everyone","fields.propShowTimeZone":"Display time zone","fields.propLinkField":"Link field","fields.propLinkFieldHint":"A link-to-records field of this table.","fields.propLinkedField":"Field in the linked table","fields.propWatch":"Changes to","fields.propWatchFields":"Fields","fields.propMarkdown":"Format with Markdown","fields.propMarkdownHint":"**bold**, *italic*, `code`, [links](https://...) and lists. For a toolbar, use Rich text.","fields.propToolbar":"Toolbar","fields.propToolbarHint":"Full adds headings, quotes, code blocks, undo and redo.","fields.propAccept":"Accepted types","fields.propAcceptPlaceholder":"image/*,.pdf (any when empty)","fields.propMaxFiles":"Most files per cell","fields.propIcon":"Icon","fields.propColor":"Color","fields.propOptions":"Options","fields.propMultipleUsers":"Allow adding multiple users","fields.propDefaultToday":"Default to today","fields.propButtonLabel":"Label","fields.propButtonLabelPlaceholder":"Open","fields.propButtonStyle":"Style","fields.propButtonUrl":"URL","fields.propButtonUrlPlaceholder":"https://example.com/orders/{Order id}","fields.propButtonUrlHint":"Use {Field name} for that field's value in the row. An app can set fieldProps.onClick instead.","fields.propFormat":"Format","fields.propCurrencySymbol":"Currency symbol","fields.propSymbolPosition":"Symbol position","fields.propPrecision":"Precision","fields.propStep":"Spinner step","fields.propStepHint":"What the editor's arrows and Up / Down add or take away; Shift for ten times as much.","fields.propShowBar":"Show as a progress bar","fields.propPoints":"Values are 0 to 100 (not 0 to 1)","fields.propDurationFormat":"Duration format","fields.propShowSeconds":"Show seconds","fields.propMaximum":"Maximum","fields.propChart":"Chart","fields.propShowLast":"Show the last value","fields.propFormula":"Formula","fields.propResult":"Format the result as","fields.propTable":"Table","fields.propTableHint":"The table gets a field that links back to this one.","fields.propMultipleRecords":"Allow linking to multiple records","fields.propAggregation":"Aggregation","fields.propPrompt":"Prompt","fields.propPromptPlaceholder":"Write a one-line pitch for {Name}, aimed at {Audience}","fields.propPromptHint":"Use {Field name} for that field's value in the record.","fields.propOutput":"The model writes","fields.propAuto":"Generate again when a field the prompt names changes","fields.propAutoHint":"Off: only when someone presses the button or uses the column menu.","fields.choiceLocal":"Local","fields.choiceNone":"None","fields.choiceThousand":"Thousand (K)","fields.choiceMillion":"Million (M)","fields.choiceBillion":"Billion (B)","fields.choiceFriendly":"Friendly (October 14, 2026)","fields.choiceUs":"US (10/14/2026)","fields.choiceEuropean":"European (14/10/2026)","fields.choiceIso":"ISO (2026-10-14)","fields.choice12Hour":"12 hour","fields.choice24Hour":"24 hour","fields.choiceAllFields":"All fields","fields.choiceSpecificFields":"Specific fields","fields.choiceStandard":"Standard","fields.choiceFull":"Full","fields.choiceInteger":"Integer","fields.choiceDecimal":"Decimal","fields.choiceCurrency":"Currency","fields.choicePercent":"Percent","fields.choiceBefore":"Before ($1.00)","fields.choiceAfter":"After (1.00 kr)","fields.choiceArrow":"Arrow","fields.choiceThumb":"Thumb","fields.choiceHeart":"Heart","fields.choiceLine":"Line","fields.choiceArea":"Area","fields.choiceColumns":"Columns","fields.choiceAsComputed":"As computed","fields.choiceNumber":"Number","fields.choiceDate":"Date","fields.choiceText":"Text","fields.choiceOneOption":"One option","fields.choiceANumber":"A number","fields.notJson":"{field} holds JSON, and this text is not valid JSON. Check its brackets and quotes.","fields.negativeNotAllowed":"Negative numbers are not allowed","fields.aiStop":"Stop generating ({count} left)","fields.aiGenerateEmpty.one":"Generate for {count} empty record","fields.aiGenerateEmpty.other":"Generate for {count} empty records","fields.aiAllTitle.one":"Generate for {count} record?","fields.aiAllTitle.other":"Generate for all {count} records?","fields.aiAllBody.one":"This replaces the value 1 record holds, and sends the AI provider a request for each of {records}. One Undo takes the replaced values back.","fields.aiAllBody.other":"This replaces the values {count} records hold, and sends the AI provider a request for each of {records}. One Undo takes the replaced values back.","fields.aiAllRecords.one":"{count} record","fields.aiAllRecords.other":"{count} records","fields.aiAllYes":"Generate","fields.aiGenerateAll.one":"Generate for all {count} record","fields.aiGenerateAll.other":"Generate for all {count} records","fields.aiNoProvider":"No AI provider. The app sets one with setAIProvider() from @svgrid/grid.","fields.aiNotEditable":"You cannot edit this field, so nothing was written.","fields.aiNotShown":"The record is not in the grid (filtered out or deleted).","fields.aiNotAiField":"The field is no longer an AI field.","fields.aiNoPrompt":"The field has no prompt yet: write one in Edit field.","fields.aiRequestFailed":"The request failed","fields.aiNotNumber":'The model answered "{answer}", which is not a number',"fields.aiNotOption":'The model answered "{answer}", which is not one of the options',"fields.promptNotClosed":"The { at {at} is not closed","fields.promptEmptyRef":"Empty {} at {at}: put a field name in it","fields.promptInvalid":"The prompt is not valid","fields.promptOwnField":"A prompt cannot read its own field {{name}}","fields.promptNoField":"No field is named {{name}}"};
|
|
1
|
+
export const FIELDS_MESSAGES={"fields.editorTitleEdit":"Edit field","fields.editorTitleAdd":"Add field","fields.name":"Name","fields.namePlaceholder":"Field name","fields.fallbackName":"Field","fields.nameRequired":"A field needs a name","fields.needLinkField":"Pick the link field this reads.","fields.needLinkFieldFirst":"This table has no link field yet: add one first.","fields.needLinkedField":"Pick the field to read from the linked table.","fields.needPrompt":"Write what the field should work out.","fields.nameTaken":"Another field has this name","fields.fixFormulaFirst":"Fix the formula first: {message}","fields.fixPromptFirst":"Fix the prompt first: {message}","fields.fieldType":"Field type","fields.keyFixed":"This field is the record key the database gives each record. Its type and values cannot change; its name and description can.","fields.findType":"Find a type","fields.findTypeLabel":"Find a field type","fields.noTypeMatches":'No type matches "{search}".',"fields.groupBasic":"Fields","fields.groupNumber":"Numbers and time","fields.groupDate":"Dates","fields.groupPeople":"People","fields.groupComputed":"Computed and automatic","fields.groupRelation":"Other tables","fields.whoCanEdit":"Who can edit its values","fields.whoEveryone":"Everyone who can edit the base","fields.whoOnly":"Only these people","fields.peopleWhoCanEdit":"People who can edit","fields.nameYou":"{name} (you)","fields.nobodyCanChange":"Nobody will be able to change its values.","fields.youCannotChange":"You will not be able to change its values yourself.","fields.othersReadOnly":"Others see the field read-only. Its name, type and options stay editable.","fields.description":"Description","fields.optional":"optional","fields.descriptionPlaceholder":"What goes in this field","fields.convertsValues":"{from} to {to} converts the values.","fields.everyValueConverts":"Every value converts.","fields.cellsCleared.one":"{count} cell will be cleared or cut short.","fields.cellsCleared.other":"{count} cells will be cleared or cut short.","fields.optionRemoved.one":"{count} record holds {name}. Saving clears it from that record.","fields.optionRemoved.other":"{count} records hold {name}. Saving clears it from those records.","fields.optionRenamed.one":"Renames {name} on {count} record.","fields.optionRenamed.other":"Renames {name} on {count} records.","fields.optionsSameName":"Two options cannot have the same name: {name}.","fields.optionNeedsName":"An option in use needs a name: {name}. Name it, or remove it.","fields.cancel":"Cancel","fields.templatesOf":"Record templates of {table}","fields.templatesHint":"A template fills in some fields of a new record. Pick it from the arrow beside + Add row.","fields.templateNew":"New template","fields.templateAdd":"+ New template","fields.templateName":"Template name","fields.templateHint":"The fields a new record starts with, written as the field shows them: an option's name, a person's name, today or today+7 for a date, a linked record's name.","fields.templateDone":"Done","fields.templateFields.one":"{count} field set","fields.templateFields.other":"{count} fields set","fields.templateDelete":"Delete the template {name}","fields.templateDeleteAsk":'Delete "{name}"?',"fields.templateDeleteYes":"Delete","fields.fromTemplate":"Add from a template","fields.manageTemplates":"Manage templates","fields.save":"Save","fields.createField":"Create field","fields.choose":"Choose...","fields.checked":"Checked","fields.defaultNone":"None","fields.addOptionsFirst":"Add options first.","fields.nobody":"Nobody","fields.empty":"Empty","fields.formulaPlaceholder":'IF({Budget} > 2000, "Large", "Small")',"fields.insertField":"Insert a field","fields.functions":"Functions","fields.hideFunctions":"Hide functions","fields.optionsList":"Options","fields.colorOf":"Color of {name}","fields.colorOfOption":"Color of option {n}","fields.optionName":"Option name","fields.optionN":"Option {n}","fields.moveUp":"Move up","fields.moveDown":"Move down","fields.removeNamed":"Remove {name}","fields.removeOption":"Remove option","fields.addOption":"+ Add option","fields.sortAZ":"Sort A to Z","fields.menuColorRows":"Color rows by this field","fields.menuStopColoring":"Stop coloring rows","fields.menuFilter":"Filter by this field","fields.menuGroup":"Group by this field","fields.menuEdit":"Edit field","fields.menuInsertLeft":"Insert left","fields.menuInsertRight":"Insert right","fields.menuMoveLeft":"Move left","fields.menuMoveRight":"Move right","fields.menuDuplicate":"Duplicate field","fields.menuHide":"Hide field","fields.menuDelete":"Delete field","fields.typeText":"Single line text","fields.typeTextDescription":"A short line of text, like a name or a title.","fields.typeLongText":"Long text","fields.typeLongTextDescription":"Several lines of text; Alt+Enter starts a new line.","fields.typeRichText":"Rich text","fields.typeRichTextDescription":"Formatted notes: bold, italic, lists and links from a toolbar.","fields.typeAttachment":"Attachment","fields.typeAttachmentDescription":"Images and files: thumbnails in the cell, a dialog to add more.","fields.typeCheckbox":"Checkbox","fields.typeCheckboxDescription":"Done or not done: one click to toggle.","fields.typeSingleSelect":"Single select","fields.typeSingleSelectDescription":"One choice from a list of colored options.","fields.typeMultiSelect":"Multiple select","fields.typeMultiSelectDescription":"Any number of choices from a list of colored options.","fields.typeUser":"User","fields.typeUserDescription":"A person (or several) from the people the app lists.","fields.typeDate":"Date","fields.typeDateDescription":"A calendar date, with or without the time.","fields.typePhone":"Phone number","fields.typePhoneDescription":"A phone number, shown as a tel link.","fields.typeEmail":"Email","fields.typeEmailDescription":"An email address, shown as a mailto link.","fields.typeUrl":"URL","fields.typeUrlDescription":"A web address, shown as a link.","fields.typeBarcode":"Barcode","fields.typeBarcodeDescription":"A barcode's text, from a scanner or typed.","fields.typeButton":"Button","fields.typeButtonDescription":"A button in every row that opens a link made from the row.","fields.typeChecklist":"Checklist","fields.typeChecklistDescription":"A list of to-dos; the cell shows how many are done.","fields.typeColor":"Color","fields.typeColorDescription":"A color from the palette, or any hex code.","fields.typeNumber":"Number","fields.typeNumberDescription":"A number: whole, decimal, an amount of money or a percentage.","fields.typeCurrency":"Currency","fields.typeCurrencyDescription":"An amount, with a currency symbol.","fields.typePercent":"Percent","fields.typePercentDescription":"A share, shown with a percent sign.","fields.typeDuration":"Duration","fields.typeDurationDescription":"A length of time, typed as 1:30 or 1h 30m.","fields.typeTimeOfDay":"Time of day","fields.typeTimeOfDayDescription":"A time on the clock with no date, typed as 9:30 am, 14:05 or 2pm.","fields.typeRating":"Rating","fields.typeRatingDescription":"One to ten stars, hearts, thumbs, flags or dots.","fields.typeTimer":"Timer","fields.typeTimerDescription":"Time counted with a start and stop button; each run adds to the total.","fields.typeVote":"Vote","fields.typeVoteDescription":"Who voted for it: one click adds your vote or takes it back.","fields.typeSparkline":"Sparkline","fields.typeSparklineDescription":"A list of numbers drawn as a small line, area or column chart.","fields.typeFormula":"Formula","fields.typeFormulaDescription":"A value computed from the row's other fields.","fields.typeCreatedTime":"Created time","fields.typeCreatedTimeDescription":"When the row was added. Set automatically.","fields.typeLastModifiedTime":"Last modified time","fields.typeLastModifiedTimeDescription":"When the row last changed. Set automatically.","fields.typeCreatedBy":"Created by","fields.typeCreatedByDescription":"Who added the row. Set automatically.","fields.typeLastModifiedBy":"Last modified by","fields.typeLastModifiedByDescription":"Who last changed the row. Set automatically.","fields.typeAutoNumber":"Autonumber","fields.typeAutoNumberDescription":"A number every row gets, counting up. Set automatically.","fields.typeLink":"Link to records","fields.typeLinkDescription":"Rows of another table this row points at.","fields.typeLookup":"Lookup","fields.typeLookupDescription":"A field of the linked rows, shown here.","fields.typeRollup":"Rollup","fields.typeRollupDescription":"A summary of a field over the linked rows (a sum, a count, a list).","fields.typeCount":"Count","fields.typeCountDescription":"How many rows a link field points at.","fields.typeAi":"AI","fields.typeAiDescription":"A model writes the value from a prompt that names the record's fields. Stored, and editable by hand.","fields.propSeparators":"Separators","fields.propShowThousands":"Show thousands separator","fields.propAbbreviation":"Large number abbreviation","fields.propAllowNegative":"Allow negative numbers","fields.propDefault":"Default value","fields.propDefaultHint":"New rows start with this value.","fields.propDateFormat":"Date format","fields.propIncludeTime":"Include time","fields.propTimeFormat":"Time format","fields.propGmt":"Use the same time zone (GMT) for everyone","fields.propShowTimeZone":"Display time zone","fields.propLinkField":"Link field","fields.propLinkFieldHint":"A link-to-records field of this table.","fields.propLinkedField":"Field in the linked table","fields.propWatch":"Changes to","fields.propWatchFields":"Fields","fields.propMarkdown":"Format with Markdown","fields.propMarkdownHint":"**bold**, *italic*, `code`, [links](https://...) and lists. For a toolbar, use Rich text.","fields.propToolbar":"Toolbar","fields.propToolbarHint":"Full adds headings, quotes, code blocks, undo and redo.","fields.propAccept":"Accepted types","fields.propAcceptPlaceholder":"image/*,.pdf (any when empty)","fields.propMaxFiles":"Most files per cell","fields.propIcon":"Icon","fields.propColor":"Color","fields.propOptions":"Options","fields.propMultipleUsers":"Allow adding multiple users","fields.propDefaultToday":"Default to today","fields.propButtonLabel":"Label","fields.propButtonLabelPlaceholder":"Open","fields.propButtonStyle":"Style","fields.propButtonUrl":"URL","fields.propButtonUrlPlaceholder":"https://example.com/orders/{Order id}","fields.propButtonUrlHint":"Use {Field name} for that field's value in the row. An app can set fieldProps.onClick instead.","fields.propFormat":"Format","fields.propCurrencySymbol":"Currency symbol","fields.propSymbolPosition":"Symbol position","fields.propPrecision":"Precision","fields.propStep":"Spinner step","fields.propStepHint":"What the editor's arrows and Up / Down add or take away; Shift for ten times as much.","fields.propShowBar":"Show as a progress bar","fields.propPoints":"Values are 0 to 100 (not 0 to 1)","fields.propDurationFormat":"Duration format","fields.propShowSeconds":"Show seconds","fields.propMaximum":"Maximum","fields.propChart":"Chart","fields.propShowLast":"Show the last value","fields.propFormula":"Formula","fields.propResult":"Format the result as","fields.propTable":"Table","fields.propTableHint":"The table gets a field that links back to this one.","fields.propMultipleRecords":"Allow linking to multiple records","fields.propPickFrom":"Pick records from","fields.pickFromAll":"All records","fields.propPickFromHint":"People pick only the records this view of the linked table shows (its filter).","fields.propAggregation":"Aggregation","fields.propPrompt":"Prompt","fields.propPromptPlaceholder":"Write a one-line pitch for {Name}, aimed at {Audience}","fields.propPromptHint":"Use {Field name} for that field's value in the record.","fields.propOutput":"The model writes","fields.propAuto":"Generate again when a field the prompt names changes","fields.propAutoHint":"Off: only when someone presses the button or uses the column menu.","fields.choiceLocal":"Local","fields.choiceNone":"None","fields.choiceThousand":"Thousand (K)","fields.choiceMillion":"Million (M)","fields.choiceBillion":"Billion (B)","fields.choiceFriendly":"Friendly (October 14, 2026)","fields.choiceUs":"US (10/14/2026)","fields.choiceEuropean":"European (14/10/2026)","fields.choiceIso":"ISO (2026-10-14)","fields.choice12Hour":"12 hour","fields.choice24Hour":"24 hour","fields.choiceAllFields":"All fields","fields.choiceSpecificFields":"Specific fields","fields.choiceStandard":"Standard","fields.choiceFull":"Full","fields.choiceInteger":"Integer","fields.choiceDecimal":"Decimal","fields.choiceCurrency":"Currency","fields.choicePercent":"Percent","fields.choiceBefore":"Before ($1.00)","fields.choiceAfter":"After (1.00 kr)","fields.choiceArrow":"Arrow","fields.choiceThumb":"Thumb","fields.choiceHeart":"Heart","fields.choiceLine":"Line","fields.choiceArea":"Area","fields.choiceColumns":"Columns","fields.choiceAsComputed":"As computed","fields.choiceNumber":"Number","fields.choiceDate":"Date","fields.choiceText":"Text","fields.choiceOneOption":"One option","fields.choiceANumber":"A number","fields.notJson":"{field} holds JSON, and this text is not valid JSON. Check its brackets and quotes.","fields.negativeNotAllowed":"Negative numbers are not allowed","fields.aiStop":"Stop generating ({count} left)","fields.aiGenerateEmpty.one":"Generate for {count} empty record","fields.aiGenerateEmpty.other":"Generate for {count} empty records","fields.aiAllTitle.one":"Generate for {count} record?","fields.aiAllTitle.other":"Generate for all {count} records?","fields.aiAllBody.one":"This replaces the value 1 record holds, and sends the AI provider a request for each of {records}. One Undo takes the replaced values back.","fields.aiAllBody.other":"This replaces the values {count} records hold, and sends the AI provider a request for each of {records}. One Undo takes the replaced values back.","fields.aiAllRecords.one":"{count} record","fields.aiAllRecords.other":"{count} records","fields.aiAllYes":"Generate","fields.aiGenerateAll.one":"Generate for all {count} record","fields.aiGenerateAll.other":"Generate for all {count} records","fields.aiNoProvider":"No AI provider. The app sets one with setAIProvider() from @svgrid/grid.","fields.aiNotEditable":"You cannot edit this field, so nothing was written.","fields.aiNotShown":"The record is not in the grid (filtered out or deleted).","fields.aiNotAiField":"The field is no longer an AI field.","fields.aiNoPrompt":"The field has no prompt yet: write one in Edit field.","fields.aiRequestFailed":"The request failed","fields.aiNotNumber":'The model answered "{answer}", which is not a number',"fields.aiNotOption":'The model answered "{answer}", which is not one of the options',"fields.promptNotClosed":"The { at {at} is not closed","fields.promptEmptyRef":"Empty {} at {at}: put a field name in it","fields.promptInvalid":"The prompt is not valid","fields.promptOwnField":"A prompt cannot read its own field {{name}}","fields.promptNoField":"No field is named {{name}}"};
|
|
@@ -21,6 +21,7 @@ export declare const RECORD_MESSAGES: {
|
|
|
21
21
|
readonly 'record.you': "You";
|
|
22
22
|
readonly 'record.byAutomation': "Automation: {name}";
|
|
23
23
|
readonly 'record.acceptedBy': "{source} (accepted by {person})";
|
|
24
|
+
readonly 'record.through': "{person} via {source}";
|
|
24
25
|
readonly 'record.changedField': "changed {field}";
|
|
25
26
|
readonly 'record.undidField': "undid a change to {field}";
|
|
26
27
|
readonly 'record.redidField': "redid a change to {field}";
|
|
@@ -86,6 +87,10 @@ export declare const RECORD_MESSAGES: {
|
|
|
86
87
|
readonly 'record.formThanks': "Thank you";
|
|
87
88
|
readonly 'record.formAdded': "The record was added.";
|
|
88
89
|
readonly 'record.formSubmitAnother': "Submit another";
|
|
90
|
+
readonly 'record.formNext': "Next";
|
|
91
|
+
readonly 'record.formBack': "Back";
|
|
92
|
+
readonly 'record.formStepOf': "Question {n} of {count}";
|
|
93
|
+
readonly 'record.formPressEnter': "or press Enter";
|
|
89
94
|
readonly 'record.unnamed': "Untitled";
|
|
90
95
|
readonly 'record.linkedGone': "This record is not in its table any more.";
|
|
91
96
|
readonly 'record.openIn': "Open in {table}";
|
|
@@ -93,6 +98,7 @@ export declare const RECORD_MESSAGES: {
|
|
|
93
98
|
readonly 'record.linkToRecords': "Link to records";
|
|
94
99
|
readonly 'record.linkTableMissing': "The table this field links to is not available.";
|
|
95
100
|
readonly 'record.searchTable': "Search {table}";
|
|
101
|
+
readonly 'record.pickingFromView': "Records of the view \"{view}\"";
|
|
96
102
|
readonly 'record.noRecordsMatch': "No records match.";
|
|
97
103
|
readonly 'record.createRecord': "Create “{name}”";
|
|
98
104
|
readonly 'record.showingOf': "Showing {shown} of {total}. Type to narrow.";
|
|
@@ -114,6 +120,11 @@ export declare const RECORD_MESSAGES: {
|
|
|
114
120
|
readonly 'record.retry': "Retry";
|
|
115
121
|
readonly 'record.remove': "Remove";
|
|
116
122
|
readonly 'record.addFiles': "Add files";
|
|
123
|
+
readonly 'record.takePhoto': "Take a photo";
|
|
124
|
+
readonly 'record.scanCode': "Scan a code";
|
|
125
|
+
readonly 'record.scanHint': "Point the camera at a barcode or a QR code.";
|
|
126
|
+
readonly 'record.scanUnsupported': "This browser cannot read codes from the camera.";
|
|
127
|
+
readonly 'record.scanNoCamera': "The camera is not available: allow it for this site, or close another app using it.";
|
|
117
128
|
readonly 'record.pasteUrl': "or paste a URL";
|
|
118
129
|
readonly 'record.addByUrl': "Add a file by URL";
|
|
119
130
|
readonly 'record.uploadingCount': "Uploading {count}...";
|
|
@@ -194,6 +205,8 @@ export declare const RECORD_MESSAGES: {
|
|
|
194
205
|
readonly 'record.noVotes': "No votes yet";
|
|
195
206
|
readonly 'record.votes.one': "{count} vote";
|
|
196
207
|
readonly 'record.votes.other': "{count} votes";
|
|
208
|
+
readonly 'record.timerStart': "Start the timer";
|
|
209
|
+
readonly 'record.timerStop': "Stop the timer";
|
|
197
210
|
readonly 'record.votesMine.one': "{count} vote, including yours";
|
|
198
211
|
readonly 'record.votesMine.other': "{count} votes, including yours";
|
|
199
212
|
readonly 'record.buttonOpen': "Open";
|