@svgrid/enterprise 3.1.60 → 3.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SvGridBoard.svelte +6 -5
- package/dist/cdn/svgrid-enterprise.svelte-external.js +248 -246
- package/dist/designer/assets/{index-BC3lgv-R.js → index-uxiZ_kt6.js} +1 -1
- package/dist/designer/index.html +1 -1
- package/dist/fields/AutomationAction.svelte +2 -0
- package/dist/fields/AutomationTrigger.svelte +11 -1
- package/dist/fields/SvBase.svelte +1 -1
- package/dist/fields/SvBaseAutomations.svelte +2 -1
- package/dist/fields/SvBaseViewBar.svelte +10 -1
- package/dist/fields/airtable.js +1 -1
- package/dist/fields/automation-edit.js +2 -2
- package/dist/fields/automation-server.js +1 -1
- package/dist/fields/automations.svelte.d.ts +17 -0
- package/dist/fields/automations.svelte.js +1 -1
- package/dist/fields/bar-request.svelte.d.ts +1 -1
- package/dist/fields/field-uses.js +1 -1
- package/dist/fields/formula-docs.js +1 -1
- package/dist/fields/formula.js +1 -1
- package/dist/fields/messages/extras.d.ts +18 -0
- package/dist/fields/messages/extras.js +1 -1
- package/dist/fields/messages/shell.d.ts +1 -0
- package/dist/fields/messages/shell.js +1 -1
- package/dist/fields/messages/viewbar.d.ts +16 -0
- package/dist/fields/messages/viewbar.js +1 -1
- package/dist/fields/messages.svelte.d.ts +35 -0
- package/dist/fields/view-model.d.ts +22 -0
- package/dist/fields/view-model.js +1 -1
- package/dist/fields/viewbar/BoardPanel.svelte +90 -0
- package/dist/fields/viewbar/BoardPanel.svelte.d.ts +9 -0
- package/dist/fields/viewbar/GanttPanel.svelte +7 -1
- package/dist/fields/viewbar/GanttPanel.svelte.d.ts +1 -1
- package/dist/node/studio.js +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +1 -1
- package/dist/wc/board-Cha_fBZ4.js +28 -0
- package/dist/wc/sv-base-element.js +95 -95
- package/package.json +3 -3
- package/dist/wc/board-CEIIZoaC.js +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
export const FORMULA_DOCS={IF:{syntax:"IF(condition, value if true, [value if false])",summary:"One value when the condition is true, another when it is not (empty if left out).",example:'IF({Qty} > 10, "Bulk", "Small")',group:"logic"},AND:{syntax:"AND(condition1, [condition2, ...])",summary:"True when every condition is true.",example:'AND({Paid}, {Status} = "Shipped")',group:"logic"},OR:{syntax:"OR(condition1, [condition2, ...])",summary:"True when at least one condition is true.",example:'OR({Status} = "Late", {Status} = "Lost")',group:"logic"},NOT:{syntax:"NOT(condition)",summary:"True when the condition is false or empty, false when it is true.",example:"NOT({Paid})",group:"logic"},XOR:{syntax:"XOR(condition1, [condition2, ...])",summary:"True when an odd number of the conditions are true.",example:"XOR({Paid}, {Refunded})",group:"logic"},TRUE:{syntax:"TRUE()",summary:"The value true. You can also write TRUE without the brackets.",example:"IF({Qty} > 0, TRUE(), FALSE())",group:"logic"},FALSE:{syntax:"FALSE()",summary:"The value false. You can also write FALSE without the brackets.",example:'IF({Status} = "Cancelled", FALSE(), TRUE())',group:"logic"},BLANK:{syntax:"BLANK()",summary:"An empty value, for leaving the cell empty.",example:"IF({Qty} = 0, BLANK(), {Qty} * {Unit price})",group:"logic"},ERROR:{syntax:"ERROR()",summary:"Makes the cell show #ERROR, to flag a record that needs a look.",example:"IF({Qty} < 0, ERROR(), {Qty})",group:"logic"},ISERROR:{syntax:"ISERROR(value)",summary:"True when the value is an error, such as ERROR() or a number that cannot be worked out.",example:"IF(ISERROR({Discount}), 0, {Discount})",group:"logic"},SWITCH:{syntax:"SWITCH(value, match1, result1, [match2, result2, ...], [default])",summary:"The result next to the first match for the value, or the default when none match.",example:'SWITCH({Status}, "New", 1, "Paid", 2, "Shipped", 3, 0)',group:"logic"},RECORD_ID:{syntax:"RECORD_ID()",summary:"The id of this record, as text.",example:'"https://example.com/orders/" & RECORD_ID()',group:"records"},CONCATENATE:{syntax:"CONCATENATE(text1, [text2, ...])",summary:"All the values joined into one text, in order. The & sign does the same.",example:'CONCATENATE({First name}, " ", {Last name})',group:"text"},LEN:{syntax:"LEN(text)",summary:"The number of characters in the text.",example:"LEN({Phone})",group:"text"},UPPER:{syntax:"UPPER(text)",summary:"The text in capital letters.",example:"UPPER({Country code})",group:"text"},LOWER:{syntax:"LOWER(text)",summary:"The text in small letters.",example:"LOWER({Email})",group:"text"},TRIM:{syntax:"TRIM(text)",summary:"The text without spaces at the start and the end.",example:"TRIM({Client})",group:"text"},LEFT:{syntax:"LEFT(text, [count])",summary:"The first characters of the text; one character if no count is given.",example:"LEFT({Postcode}, 2)",group:"text"},RIGHT:{syntax:"RIGHT(text, [count])",summary:"The last characters of the text; one character if no count is given.",example:"RIGHT({Phone}, 4)",group:"text"},MID:{syntax:"MID(text, start, [count])",summary:"Characters from a position (1 is the first); the rest of the text if no count.",example:"MID({Invoice no}, 5, 3)",group:"text"},FIND:{syntax:"FIND(text to find, text, [start])",summary:"Where the text is found (1 is the first character), or 0 if not. Case matters.",example:'FIND("@", {Email})',group:"text"},SEARCH:{syntax:"SEARCH(text to find, text, [start])",summary:"Where the text is found (1 is the first character), or empty if not. Case matters.",example:'SEARCH("urgent", {Notes})',group:"text"},SUBSTITUTE:{syntax:"SUBSTITUTE(text, old text, new text, [which one])",summary:"The text with the old text swapped for the new; only the nth one if you give n.",example:'SUBSTITUTE({Phone}, " ", "")',group:"text"},REPLACE:{syntax:"REPLACE(text, start, count, new text)",summary:"The text with count characters from the start position swapped for the new text.",example:'REPLACE({Card number}, 1, 12, "************")',group:"text"},ENCODE_URL_COMPONENT:{syntax:"ENCODE_URL_COMPONENT(text)",summary:"The text made safe to put in a web address.",example:'"https://maps.google.com/?q=" & ENCODE_URL_COMPONENT({Address})',group:"text"},REGEX_MATCH:{syntax:"REGEX_MATCH(text, pattern)",summary:"True when the text fits the pattern (a regular expression).",example:'REGEX_MATCH({Email}, "^[^@ ]+@[^@ ]+[.][a-z]+$")',group:"text"},REGEX_EXTRACT:{syntax:"REGEX_EXTRACT(text, pattern)",summary:"The first part of the text that fits the pattern, or empty if none does.",example:'REGEX_EXTRACT({Notes}, "[0-9]+")',group:"text"},REGEX_REPLACE:{syntax:"REGEX_REPLACE(text, pattern, new text)",summary:"The text with every part that fits the pattern swapped for the new text.",example:'REGEX_REPLACE({Phone}, "[^0-9]", "")',group:"text"},REPT:{syntax:"REPT(text, times)",summary:"The text repeated a number of times (at most 1,000).",example:'REPT("*", {Rating})',group:"text"},T:{syntax:"T(value)",summary:"The value if it is text, otherwise empty text.",example:"T({Notes})",group:"text"},VALUE:{syntax:"VALUE(text)",summary:"The number in the text, ignoring signs like $ and spaces; empty if there is none.",example:"VALUE({Price text}) * {Qty}",group:"text"},ARRAYJOIN:{syntax:"ARRAYJOIN(list, [separator])",summary:'The items of a list joined into one text, with ", " between them unless you say.',example:'ARRAYJOIN({Tags}, " / ")',group:"text"},ARRAYCOMPACT:{syntax:"ARRAYCOMPACT(list)",summary:"The list without its empty items.",example:"ARRAYCOMPACT({Phone numbers})",group:"lists"},ARRAYFLATTEN:{syntax:"ARRAYFLATTEN(list1, [list2, ...])",summary:"One flat list of all the items, with lists inside lists opened up.",example:"ARRAYFLATTEN({Tags}, {Categories})",group:"lists"},ARRAYUNIQUE:{syntax:"ARRAYUNIQUE(list)",summary:"The list with each item only once.",example:"ARRAYUNIQUE({Order cities})",group:"lists"},ARRAYSLICE:{syntax:"ARRAYSLICE(list, start, [end])",summary:"The items from start to end (1 is the first; a negative number counts from the end).",example:"ARRAYSLICE({Tags}, 1, 3)",group:"lists"},SUM:{syntax:"SUM(number1, [number2, ...])",summary:"All the numbers added up.",example:"SUM({Subtotal}, {Shipping}, {Tax})",group:"numbers"},AVERAGE:{syntax:"AVERAGE(number1, [number2, ...])",summary:"The average of the numbers, leaving out empty ones.",example:"AVERAGE({Q1 sales}, {Q2 sales}, {Q3 sales})",group:"numbers"},MAX:{syntax:"MAX(number1, [number2, ...])",summary:"The largest of the numbers.",example:"MAX({Quote A}, {Quote B})",group:"numbers"},MIN:{syntax:"MIN(number1, [number2, ...])",summary:"The smallest of the numbers.",example:"MIN({Stock}, {Qty})",group:"numbers"},COUNT:{syntax:"COUNT(value1, [value2, ...])",summary:"How many of the values are numbers.",example:"COUNT({Mon hours}, {Tue hours}, {Wed hours})",group:"numbers"},COUNTA:{syntax:"COUNTA(value1, [value2, ...])",summary:"How many of the values are not empty.",example:"COUNTA({Phone}, {Email}, {Address})",group:"numbers"},COUNTALL:{syntax:"COUNTALL(value1, [value2, ...])",summary:"How many values there are, empty ones included.",example:"COUNTALL({Attendees})",group:"numbers"},ROUND:{syntax:"ROUND(number, [decimals])",summary:"The number rounded to that many decimal places (none if left out).",example:"ROUND({Qty} * {Unit price}, 2)",group:"numbers"},ROUNDUP:{syntax:"ROUNDUP(number, [decimals])",summary:"The number rounded away from zero to that many decimal places.",example:"ROUNDUP({Hours worked}, 0)",group:"numbers"},ROUNDDOWN:{syntax:"ROUNDDOWN(number, [decimals])",summary:"The number rounded toward zero to that many decimal places.",example:"ROUNDDOWN({Total} * 0.1, 2)",group:"numbers"},INT:{syntax:"INT(number)",summary:"The number rounded down to a whole number.",example:"INT({Hours worked})",group:"numbers"},ABS:{syntax:"ABS(number)",summary:"The number without its minus sign.",example:"ABS({Balance})",group:"numbers"},MOD:{syntax:"MOD(number, divisor)",summary:"What is left after dividing; it takes the sign of the first number.",example:"MOD({Qty}, 12)",group:"numbers"},POWER:{syntax:"POWER(number, power)",summary:"The number raised to the power.",example:"{Deposit} * POWER(1 + {Rate}, {Years})",group:"numbers"},SQRT:{syntax:"SQRT(number)",summary:"The square root of the number.",example:"SQRT({Floor area})",group:"numbers"},EXP:{syntax:"EXP(number)",summary:"The number e (about 2.718) raised to the power you give.",example:"{Deposit} * EXP({Rate} * {Years})",group:"numbers"},LOG:{syntax:"LOG(number, [base])",summary:"The logarithm of the number, in base 10 unless you give another base.",example:"LOG({Visitors}, 10)",group:"numbers"},EVEN:{syntax:"EVEN(number)",summary:"The number rounded away from zero to the next even whole number.",example:"EVEN({Guests})",group:"numbers"},ODD:{syntax:"ODD(number)",summary:"The number rounded away from zero to the next odd whole number.",example:"ODD({Team size})",group:"numbers"},CEILING:{syntax:"CEILING(number, [multiple])",summary:"The number rounded up to a multiple (1 if left out): CEILING(7, 5) is 10.",example:"CEILING({Qty}, 6)",group:"numbers"},FLOOR:{syntax:"FLOOR(number, [multiple])",summary:"The number rounded down to a multiple (1 if left out): FLOOR(7, 5) is 5.",example:"FLOOR({Price}, 0.5)",group:"numbers"},DISTANCE:{syntax:"DISTANCE(place, place)",summary:'Metres between two places given as coordinates ("42.6977, 23.3219"), as a phone saves them.',example:"DISTANCE({Where the phone was}, '42.6977, 23.3219')",group:"numbers"},TODAY:{syntax:"TODAY()",summary:"Today's date, at midnight.",example:'DATETIME_DIFF({Due date}, TODAY(), "days")',group:"dates"},NOW:{syntax:"NOW()",summary:"The date and time right now.",example:'DATETIME_DIFF(NOW(), {Created}, "hours")',group:"dates"},YEAR:{syntax:"YEAR(date)",summary:"The year of a date, such as 2026.",example:"YEAR({Invoice date})",group:"dates"},MONTH:{syntax:"MONTH(date)",summary:"The month of a date, from 1 (January) to 12 (December).",example:"MONTH({Invoice date})",group:"dates"},DAY:{syntax:"DAY(date)",summary:"The day of the month of a date, from 1 to 31.",example:"DAY({Due date})",group:"dates"},HOUR:{syntax:"HOUR(date)",summary:"The hour of a date and time, from 0 to 23.",example:"HOUR({Appointment})",group:"dates"},MINUTE:{syntax:"MINUTE(date)",summary:"The minute of a date and time, from 0 to 59.",example:"MINUTE({Appointment})",group:"dates"},SECOND:{syntax:"SECOND(date)",summary:"The second of a date and time, from 0 to 59.",example:"SECOND({Logged at})",group:"dates"},WEEKDAY:{syntax:"WEEKDAY(date, [first day])",summary:'The day of the week, 0 for Sunday to 6; with "Monday" as first day, 0 is Monday.',example:'WEEKDAY({Delivery date}, "Monday")',group:"dates"},WEEKNUM:{syntax:"WEEKNUM(date, [first day])",summary:'The week of the year (week 1 holds January 1); weeks start Sunday, or "Monday".',example:'WEEKNUM({Order date}, "Monday")',group:"dates"},DATEADD:{syntax:"DATEADD(date, count, [unit])",summary:"The date moved on by a number of days, weeks, months, years... (days if no unit).",example:'DATEADD({Invoice date}, 30, "days")',group:"dates"},DATETIME_DIFF:{syntax:"DATETIME_DIFF(date1, date2, [unit])",summary:"The time between two dates: the first minus the second, in days or another unit.",example:'DATETIME_DIFF({Due date}, TODAY(), "days")',group:"dates"},IS_BEFORE:{syntax:"IS_BEFORE(date1, date2)",summary:"True when the first date is before the second.",example:"IS_BEFORE({Due date}, TODAY())",group:"dates"},IS_AFTER:{syntax:"IS_AFTER(date1, date2)",summary:"True when the first date is after the second.",example:"IS_AFTER({Delivered on}, {Due date})",group:"dates"},IS_SAME:{syntax:"IS_SAME(date1, date2, [unit])",summary:"True when two dates are the same moment, or the same day, month, year... by unit.",example:'IS_SAME({Order date}, TODAY(), "month")',group:"dates"},DATESTR:{syntax:"DATESTR(date)",summary:"The date as text, year first: 2026-12-04.",example:"DATESTR({Due date})",group:"dates"},TIMESTR:{syntax:"TIMESTR(date)",summary:"The time of a date as text, in 24 hours: 14:30:00.",example:"TIMESTR({Appointment})",group:"dates"},DATETIME_FORMAT:{syntax:"DATETIME_FORMAT(date, [format])",summary:'The date as text in the format you write, such as "DD/MM/YYYY" or "MMMM D".',example:'DATETIME_FORMAT({Due date}, "DD/MM/YYYY")',group:"dates"},DATETIME_PARSE:{syntax:"DATETIME_PARSE(text, [format])",summary:"The date written in the text, read with the format if you give one.",example:'DATETIME_PARSE({Date text}, "DD.MM.YYYY")',group:"dates"},SET_LOCALE:{syntax:"SET_LOCALE(date, locale)",summary:'The date, set to show month and day names in a language, such as "fr" or "de".',example:'DATETIME_FORMAT(SET_LOCALE({Due date}, "fr"), "D MMMM YYYY")',group:"dates"},SET_TIMEZONE:{syntax:"SET_TIMEZONE(date, time zone)",summary:'The date, set to show the clock of a time zone, such as "Europe/London".',example:'DATETIME_FORMAT(SET_TIMEZONE({Appointment}, "Europe/London"), "HH:mm")',group:"dates"},TONOW:{syntax:"TONOW(date)",summary:"The number of days from the date to today.",example:"TONOW({Last contacted})",group:"dates"},FROMNOW:{syntax:"FROMNOW(date)",summary:"The number of days from today to the date.",example:"FROMNOW({Due date})",group:"dates"},WORKDAY:{syntax:"WORKDAY(start date, days, [holidays])",summary:"The date that many working days on, skipping weekends and the holidays.",example:'WORKDAY({Order date}, 5, "2026-12-25, 2026-12-26")',group:"dates"},WORKDAY_DIFF:{syntax:"WORKDAY_DIFF(start date, end date, [holidays])",summary:"The working days from start to end, both days counted, skipping the holidays.",example:'WORKDAY_DIFF({Start date}, {End date}, "2026-12-25")',group:"dates"}};export function syntaxArgs(e){const t=e.indexOf("("),a=e.lastIndexOf(")");return t<0||a<=t?[]:e.slice(t+1,a).replace(/[[\]]/g,"").split(",").map(s=>s.replace(/\.{3}|…/g,"").trim()).filter(Boolean)}
|
|
1
|
+
export const FORMULA_DOCS={IF:{syntax:"IF(condition, value if true, [value if false])",summary:"One value when the condition is true, another when it is not (empty if left out).",example:'IF({Qty} > 10, "Bulk", "Small")',group:"logic"},AND:{syntax:"AND(condition1, [condition2, ...])",summary:"True when every condition is true.",example:'AND({Paid}, {Status} = "Shipped")',group:"logic"},OR:{syntax:"OR(condition1, [condition2, ...])",summary:"True when at least one condition is true.",example:'OR({Status} = "Late", {Status} = "Lost")',group:"logic"},NOT:{syntax:"NOT(condition)",summary:"True when the condition is false or empty, false when it is true.",example:"NOT({Paid})",group:"logic"},XOR:{syntax:"XOR(condition1, [condition2, ...])",summary:"True when an odd number of the conditions are true.",example:"XOR({Paid}, {Refunded})",group:"logic"},TRUE:{syntax:"TRUE()",summary:"The value true. You can also write TRUE without the brackets.",example:"IF({Qty} > 0, TRUE(), FALSE())",group:"logic"},FALSE:{syntax:"FALSE()",summary:"The value false. You can also write FALSE without the brackets.",example:'IF({Status} = "Cancelled", FALSE(), TRUE())',group:"logic"},BLANK:{syntax:"BLANK()",summary:"An empty value, for leaving the cell empty.",example:"IF({Qty} = 0, BLANK(), {Qty} * {Unit price})",group:"logic"},ERROR:{syntax:"ERROR()",summary:"Makes the cell show #ERROR, to flag a record that needs a look.",example:"IF({Qty} < 0, ERROR(), {Qty})",group:"logic"},ISERROR:{syntax:"ISERROR(value)",summary:"True when the value is an error, such as ERROR() or a number that cannot be worked out.",example:"IF(ISERROR({Discount}), 0, {Discount})",group:"logic"},SWITCH:{syntax:"SWITCH(value, match1, result1, [match2, result2, ...], [default])",summary:"The result next to the first match for the value, or the default when none match.",example:'SWITCH({Status}, "New", 1, "Paid", 2, "Shipped", 3, 0)',group:"logic"},RECORD_ID:{syntax:"RECORD_ID()",summary:"The id of this record, as text.",example:'"https://example.com/orders/" & RECORD_ID()',group:"records"},CREATED_TIME:{syntax:"CREATED_TIME()",summary:"When this record was made.",example:'DATETIME_DIFF(NOW(), CREATED_TIME(), "days")',group:"records"},LAST_MODIFIED_TIME:{syntax:"LAST_MODIFIED_TIME()",summary:"When this record was last changed.",example:'IF(DATETIME_DIFF(NOW(), LAST_MODIFIED_TIME(), "days") > 14, "Stale")',group:"records"},CONCATENATE:{syntax:"CONCATENATE(text1, [text2, ...])",summary:"All the values joined into one text, in order. The & sign does the same.",example:'CONCATENATE({First name}, " ", {Last name})',group:"text"},LEN:{syntax:"LEN(text)",summary:"The number of characters in the text.",example:"LEN({Phone})",group:"text"},UPPER:{syntax:"UPPER(text)",summary:"The text in capital letters.",example:"UPPER({Country code})",group:"text"},LOWER:{syntax:"LOWER(text)",summary:"The text in small letters.",example:"LOWER({Email})",group:"text"},TRIM:{syntax:"TRIM(text)",summary:"The text without spaces at the start and the end.",example:"TRIM({Client})",group:"text"},LEFT:{syntax:"LEFT(text, [count])",summary:"The first characters of the text; one character if no count is given.",example:"LEFT({Postcode}, 2)",group:"text"},RIGHT:{syntax:"RIGHT(text, [count])",summary:"The last characters of the text; one character if no count is given.",example:"RIGHT({Phone}, 4)",group:"text"},MID:{syntax:"MID(text, start, [count])",summary:"Characters from a position (1 is the first); the rest of the text if no count.",example:"MID({Invoice no}, 5, 3)",group:"text"},FIND:{syntax:"FIND(text to find, text, [start])",summary:"Where the text is found (1 is the first character), or 0 if not. Case matters.",example:'FIND("@", {Email})',group:"text"},SEARCH:{syntax:"SEARCH(text to find, text, [start])",summary:"Where the text is found (1 is the first character), or empty if not. Case matters.",example:'SEARCH("urgent", {Notes})',group:"text"},SUBSTITUTE:{syntax:"SUBSTITUTE(text, old text, new text, [which one])",summary:"The text with the old text swapped for the new; only the nth one if you give n.",example:'SUBSTITUTE({Phone}, " ", "")',group:"text"},REPLACE:{syntax:"REPLACE(text, start, count, new text)",summary:"The text with count characters from the start position swapped for the new text.",example:'REPLACE({Card number}, 1, 12, "************")',group:"text"},ENCODE_URL_COMPONENT:{syntax:"ENCODE_URL_COMPONENT(text)",summary:"The text made safe to put in a web address.",example:'"https://maps.google.com/?q=" & ENCODE_URL_COMPONENT({Address})',group:"text"},REGEX_MATCH:{syntax:"REGEX_MATCH(text, pattern)",summary:"True when the text fits the pattern (a regular expression).",example:'REGEX_MATCH({Email}, "^[^@ ]+@[^@ ]+[.][a-z]+$")',group:"text"},REGEX_EXTRACT:{syntax:"REGEX_EXTRACT(text, pattern)",summary:"The first part of the text that fits the pattern, or empty if none does.",example:'REGEX_EXTRACT({Notes}, "[0-9]+")',group:"text"},REGEX_REPLACE:{syntax:"REGEX_REPLACE(text, pattern, new text)",summary:"The text with every part that fits the pattern swapped for the new text.",example:'REGEX_REPLACE({Phone}, "[^0-9]", "")',group:"text"},REPT:{syntax:"REPT(text, times)",summary:"The text repeated a number of times (at most 1,000).",example:'REPT("*", {Rating})',group:"text"},T:{syntax:"T(value)",summary:"The value if it is text, otherwise empty text.",example:"T({Notes})",group:"text"},VALUE:{syntax:"VALUE(text)",summary:"The number in the text, ignoring signs like $ and spaces; empty if there is none.",example:"VALUE({Price text}) * {Qty}",group:"text"},ARRAYJOIN:{syntax:"ARRAYJOIN(list, [separator])",summary:'The items of a list joined into one text, with ", " between them unless you say.',example:'ARRAYJOIN({Tags}, " / ")',group:"text"},ARRAYCOMPACT:{syntax:"ARRAYCOMPACT(list)",summary:"The list without its empty items.",example:"ARRAYCOMPACT({Phone numbers})",group:"lists"},ARRAYFLATTEN:{syntax:"ARRAYFLATTEN(list1, [list2, ...])",summary:"One flat list of all the items, with lists inside lists opened up.",example:"ARRAYFLATTEN({Tags}, {Categories})",group:"lists"},ARRAYUNIQUE:{syntax:"ARRAYUNIQUE(list)",summary:"The list with each item only once.",example:"ARRAYUNIQUE({Order cities})",group:"lists"},ARRAYSLICE:{syntax:"ARRAYSLICE(list, start, [end])",summary:"The items from start to end (1 is the first; a negative number counts from the end).",example:"ARRAYSLICE({Tags}, 1, 3)",group:"lists"},SUM:{syntax:"SUM(number1, [number2, ...])",summary:"All the numbers added up.",example:"SUM({Subtotal}, {Shipping}, {Tax})",group:"numbers"},AVERAGE:{syntax:"AVERAGE(number1, [number2, ...])",summary:"The average of the numbers, leaving out empty ones.",example:"AVERAGE({Q1 sales}, {Q2 sales}, {Q3 sales})",group:"numbers"},MAX:{syntax:"MAX(number1, [number2, ...])",summary:"The largest of the numbers.",example:"MAX({Quote A}, {Quote B})",group:"numbers"},MIN:{syntax:"MIN(number1, [number2, ...])",summary:"The smallest of the numbers.",example:"MIN({Stock}, {Qty})",group:"numbers"},COUNT:{syntax:"COUNT(value1, [value2, ...])",summary:"How many of the values are numbers.",example:"COUNT({Mon hours}, {Tue hours}, {Wed hours})",group:"numbers"},COUNTA:{syntax:"COUNTA(value1, [value2, ...])",summary:"How many of the values are not empty.",example:"COUNTA({Phone}, {Email}, {Address})",group:"numbers"},COUNTALL:{syntax:"COUNTALL(value1, [value2, ...])",summary:"How many values there are, empty ones included.",example:"COUNTALL({Attendees})",group:"numbers"},ROUND:{syntax:"ROUND(number, [decimals])",summary:"The number rounded to that many decimal places (none if left out).",example:"ROUND({Qty} * {Unit price}, 2)",group:"numbers"},ROUNDUP:{syntax:"ROUNDUP(number, [decimals])",summary:"The number rounded away from zero to that many decimal places.",example:"ROUNDUP({Hours worked}, 0)",group:"numbers"},ROUNDDOWN:{syntax:"ROUNDDOWN(number, [decimals])",summary:"The number rounded toward zero to that many decimal places.",example:"ROUNDDOWN({Total} * 0.1, 2)",group:"numbers"},INT:{syntax:"INT(number)",summary:"The number rounded down to a whole number.",example:"INT({Hours worked})",group:"numbers"},ABS:{syntax:"ABS(number)",summary:"The number without its minus sign.",example:"ABS({Balance})",group:"numbers"},MOD:{syntax:"MOD(number, divisor)",summary:"What is left after dividing; it takes the sign of the first number.",example:"MOD({Qty}, 12)",group:"numbers"},POWER:{syntax:"POWER(number, power)",summary:"The number raised to the power.",example:"{Deposit} * POWER(1 + {Rate}, {Years})",group:"numbers"},SQRT:{syntax:"SQRT(number)",summary:"The square root of the number.",example:"SQRT({Floor area})",group:"numbers"},EXP:{syntax:"EXP(number)",summary:"The number e (about 2.718) raised to the power you give.",example:"{Deposit} * EXP({Rate} * {Years})",group:"numbers"},LOG:{syntax:"LOG(number, [base])",summary:"The logarithm of the number, in base 10 unless you give another base.",example:"LOG({Visitors}, 10)",group:"numbers"},EVEN:{syntax:"EVEN(number)",summary:"The number rounded away from zero to the next even whole number.",example:"EVEN({Guests})",group:"numbers"},ODD:{syntax:"ODD(number)",summary:"The number rounded away from zero to the next odd whole number.",example:"ODD({Team size})",group:"numbers"},CEILING:{syntax:"CEILING(number, [multiple])",summary:"The number rounded up to a multiple (1 if left out): CEILING(7, 5) is 10.",example:"CEILING({Qty}, 6)",group:"numbers"},FLOOR:{syntax:"FLOOR(number, [multiple])",summary:"The number rounded down to a multiple (1 if left out): FLOOR(7, 5) is 5.",example:"FLOOR({Price}, 0.5)",group:"numbers"},DISTANCE:{syntax:"DISTANCE(place, place)",summary:'Metres between two places given as coordinates ("42.6977, 23.3219"), as a phone saves them.',example:"DISTANCE({Where the phone was}, '42.6977, 23.3219')",group:"numbers"},TODAY:{syntax:"TODAY()",summary:"Today's date, at midnight.",example:'DATETIME_DIFF({Due date}, TODAY(), "days")',group:"dates"},NOW:{syntax:"NOW()",summary:"The date and time right now.",example:'DATETIME_DIFF(NOW(), {Created}, "hours")',group:"dates"},YEAR:{syntax:"YEAR(date)",summary:"The year of a date, such as 2026.",example:"YEAR({Invoice date})",group:"dates"},MONTH:{syntax:"MONTH(date)",summary:"The month of a date, from 1 (January) to 12 (December).",example:"MONTH({Invoice date})",group:"dates"},DAY:{syntax:"DAY(date)",summary:"The day of the month of a date, from 1 to 31.",example:"DAY({Due date})",group:"dates"},HOUR:{syntax:"HOUR(date)",summary:"The hour of a date and time, from 0 to 23.",example:"HOUR({Appointment})",group:"dates"},MINUTE:{syntax:"MINUTE(date)",summary:"The minute of a date and time, from 0 to 59.",example:"MINUTE({Appointment})",group:"dates"},SECOND:{syntax:"SECOND(date)",summary:"The second of a date and time, from 0 to 59.",example:"SECOND({Logged at})",group:"dates"},WEEKDAY:{syntax:"WEEKDAY(date, [first day])",summary:'The day of the week, 0 for Sunday to 6; with "Monday" as first day, 0 is Monday.',example:'WEEKDAY({Delivery date}, "Monday")',group:"dates"},WEEKNUM:{syntax:"WEEKNUM(date, [first day])",summary:'The week of the year (week 1 holds January 1); weeks start Sunday, or "Monday".',example:'WEEKNUM({Order date}, "Monday")',group:"dates"},DATEADD:{syntax:"DATEADD(date, count, [unit])",summary:"The date moved on by a number of days, weeks, months, years... (days if no unit).",example:'DATEADD({Invoice date}, 30, "days")',group:"dates"},DATETIME_DIFF:{syntax:"DATETIME_DIFF(date1, date2, [unit])",summary:"The time between two dates: the first minus the second, in days or another unit.",example:'DATETIME_DIFF({Due date}, TODAY(), "days")',group:"dates"},IS_BEFORE:{syntax:"IS_BEFORE(date1, date2)",summary:"True when the first date is before the second.",example:"IS_BEFORE({Due date}, TODAY())",group:"dates"},IS_AFTER:{syntax:"IS_AFTER(date1, date2)",summary:"True when the first date is after the second.",example:"IS_AFTER({Delivered on}, {Due date})",group:"dates"},IS_SAME:{syntax:"IS_SAME(date1, date2, [unit])",summary:"True when two dates are the same moment, or the same day, month, year... by unit.",example:'IS_SAME({Order date}, TODAY(), "month")',group:"dates"},DATESTR:{syntax:"DATESTR(date)",summary:"The date as text, year first: 2026-12-04.",example:"DATESTR({Due date})",group:"dates"},TIMESTR:{syntax:"TIMESTR(date)",summary:"The time of a date as text, in 24 hours: 14:30:00.",example:"TIMESTR({Appointment})",group:"dates"},DATETIME_FORMAT:{syntax:"DATETIME_FORMAT(date, [format])",summary:'The date as text in the format you write, such as "DD/MM/YYYY" or "MMMM D".',example:'DATETIME_FORMAT({Due date}, "DD/MM/YYYY")',group:"dates"},DATETIME_PARSE:{syntax:"DATETIME_PARSE(text, [format])",summary:"The date written in the text, read with the format if you give one.",example:'DATETIME_PARSE({Date text}, "DD.MM.YYYY")',group:"dates"},SET_LOCALE:{syntax:"SET_LOCALE(date, locale)",summary:'The date, set to show month and day names in a language, such as "fr" or "de".',example:'DATETIME_FORMAT(SET_LOCALE({Due date}, "fr"), "D MMMM YYYY")',group:"dates"},SET_TIMEZONE:{syntax:"SET_TIMEZONE(date, time zone)",summary:'The date, set to show the clock of a time zone, such as "Europe/London".',example:'DATETIME_FORMAT(SET_TIMEZONE({Appointment}, "Europe/London"), "HH:mm")',group:"dates"},TONOW:{syntax:"TONOW(date)",summary:"The number of days from the date to today.",example:"TONOW({Last contacted})",group:"dates"},FROMNOW:{syntax:"FROMNOW(date)",summary:"The number of days from today to the date.",example:"FROMNOW({Due date})",group:"dates"},WORKDAY:{syntax:"WORKDAY(start date, days, [holidays])",summary:"The date that many working days on, skipping weekends and the holidays.",example:'WORKDAY({Order date}, 5, "2026-12-25, 2026-12-26")',group:"dates"},WORKDAY_DIFF:{syntax:"WORKDAY_DIFF(start date, end date, [holidays])",summary:"The working days from start to end, both days counted, skipping the holidays.",example:'WORKDAY_DIFF({Start date}, {End date}, "2026-12-25")',group:"dates"}};export function syntaxArgs(e){const t=e.indexOf("("),a=e.lastIndexOf(")");return t<0||a<=t?[]:e.slice(t+1,a).replace(/[[\]]/g,"").split(",").map(s=>s.replace(/\.{3}|…/g,"").trim()).filter(Boolean)}
|
package/dist/fields/formula.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toDate as b}from"./format.js";import{maxOf as nt,minOf as rt}from"../extent.js";export class FormulaError extends Error{}export function tokenize(t){const n=[];let e=0;for(;e<t.length;){const r=t[e];if(/\s/.test(r)){e++;continue}if(r==="{"){const i=t.indexOf("}",e);if(i<0)throw new FormulaError(`Unclosed "{" at ${e+1}`);n.push({k:"ref",v:t.slice(e+1,i).trim(),at:e}),e=i+1;continue}if(r==='"'||r==="'"){let i=e+1,c="";for(;i<t.length&&t[i]!==r;){if(t[i]==="\\"&&i+1<t.length){c+=t[i+1],i+=2;continue}c+=t[i++]}if(i>=t.length)throw new FormulaError(`Unclosed text at ${e+1}`);n.push({k:"str",v:c,at:e}),e=i+1;continue}const l=/^\d+(\.\d+)?|^\.\d+/.exec(t.slice(e));if(l){n.push({k:"num",v:l[0],at:e}),e+=l[0].length;continue}const s=/^[A-Za-z_][A-Za-z0-9_]*/.exec(t.slice(e));if(s){n.push({k:"id",v:s[0],at:e}),e+=s[0].length;continue}const f=/^(!=|<=|>=|<>|[-+*/&=<>])/.exec(t.slice(e));if(f){n.push({k:"op",v:f[0]==="<>"?"!=":f[0],at:e}),e+=f[0].length;continue}if(r==="("||r===")"||r===","){n.push({k:r,v:r,at:e}),e++;continue}throw new FormulaError(`Unexpected "${r}" at ${e+1}`)}return n}const S=t=>t==null||t===""||Array.isArray(t)&&t.length===0,u=t=>{if(typeof t=="number")return t;if(typeof t=="boolean")return t?1:0;if(t instanceof Date)return t.getTime();if(t==null||t==="")return 0;if(Array.isArray(t))return t.reduce((e,r)=>e+u(r),0);const n=Number(t);return Number.isFinite(n)?n:NaN},o=t=>t==null?"":t instanceof Date?t.toISOString():Array.isArray(t)?t.map(o).join(", "):String(t),A=t=>!S(t)&&t!==!1&&t!==0,lt=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;export function isoDate(t){const n=t.trim();return lt.test(n)?b(n):null}const h=t=>{if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;if(t==null||t===""||typeof t=="boolean")return null;if(typeof t=="number")return b(t);const n=o(t).trim();return isoDate(n)??(/\d{4}/.test(n)&&/[/\s,.-]/.test(n)?b(n):null)},d=t=>t.flatMap(n=>Array.isArray(n)?n:[n]),k=t=>{const n=o(Array.isArray(t)?t.find(s=>!S(s))??null:t).replace(/%2C/gi,","),e=/(?<![\d.])(-?\d{1,2}(?:\.\d+)?)\s*,\s*(-?\d{1,3}(?:\.\d+)?)/.exec(n);if(!e)return null;const r=Number(e[1]),l=Number(e[2]);return Math.abs(r)<=90&&Math.abs(l)<=180?{lat:r,lng:l}:null},st=(t,n)=>{const e=l=>l*Math.PI/180,r=Math.sin(e(n.lat-t.lat)/2)**2+Math.cos(e(t.lat))*Math.cos(e(n.lat))*Math.sin(e(n.lng-t.lng)/2)**2;return Math.round(2*6371e3*Math.asin(Math.min(1,Math.sqrt(r))))},M=t=>String(t).padStart(2,"0"),R=t=>Number(t.toPrecision(12)),ot={milliseconds:"ms",millisecond:"ms",ms:"ms",seconds:"s",second:"s",s:"s",minutes:"m",minute:"m",m:"m",hours:"h",hour:"h",h:"h",days:"d",day:"d",d:"d",weeks:"w",week:"w",w:"w",months:"mo",month:"mo",quarters:"q",quarter:"q",q:"q",years:"y",year:"y",y:"y"},x={ms:1,s:1e3,m:6e4,h:36e5},L=t=>ot[o(t).trim().toLowerCase()]??null;function W(t,n){const e=new Date(t),r=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+n),e.setDate(Math.min(r,new Date(e.getFullYear(),e.getMonth()+1,0).getDate())),e}function ut(t,n,e){if(x[e])return new Date(t.getTime()+n*x[e]);if(e==="mo"||e==="q"||e==="y")return W(t,Math.trunc(n)*(e==="y"?12:e==="q"?3:1));const r=n*(e==="w"?7:1),l=new Date(t);return l.setDate(l.getDate()+Math.trunc(r)),new Date(l.getTime()+(r-Math.trunc(r))*864e5)}const I=t=>t.getTime()-t.getTimezoneOffset()*6e4;function _(t,n,e){if(x[e])return Math.trunc((t.getTime()-n.getTime())/x[e]);if(e==="d"||e==="w")return Math.trunc((I(t)-I(n))/(e==="w"?6048e5:864e5));let r=(t.getFullYear()-n.getFullYear())*12+t.getMonth()-n.getMonth();const l=W(n,r).getTime();return r>0&&l>t.getTime()?r-=1:r<0&&l<t.getTime()&&(r+=1),e==="y"?Math.trunc(r/12):e==="q"?Math.trunc(r/3):r}function O(t,n){if(n==="ms")return t.getTime();const e=new Date(t);return n==="s"?e.setMilliseconds(0):n==="m"?e.setSeconds(0,0):n==="h"?e.setMinutes(0,0,0):(e.setHours(0,0,0,0),n==="w"&&e.setDate(e.getDate()-e.getDay()),(n==="mo"||n==="q"||n==="y")&&e.setDate(1),n==="q"&&e.setMonth(e.getMonth()-e.getMonth()%3),n==="y"&&e.setMonth(0),e.getTime())}const N=t=>`${t.getFullYear()}-${M(t.getMonth()+1)}-${M(t.getDate())}`;function z(t){const n=d([t??null]).flatMap(e=>typeof e=="string"?e.split(","):[e]);return new Set(n.map(e=>h(typeof e=="string"?e.trim():e)).filter(e=>!!e).map(N))}const X=(t,n)=>t.getDay()!==0&&t.getDay()!==6&&!n.has(N(t)),q=1e5;class it extends Date{}function j(t,n){const e=new it(t.getTime()),r=t;return e.locale=n.locale??r.locale,e.zone=n.zone??r.zone,e}const v=new Map;function G(t){let n=v.get(t);return n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hourCycle:"h23",weekday:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),v.set(t,n)),n}const ct=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function at(t){const n=t.zone,e=t.getMilliseconds();if(!n)return{y:t.getFullYear(),mo:t.getMonth(),d:t.getDate(),h:t.getHours(),mi:t.getMinutes(),s:t.getSeconds(),ms:e,wd:t.getDay(),offset:-t.getTimezoneOffset()};const r={};for(const s of G(n).formatToParts(t))r[s.type]=s.value;const l={y:+r.year,mo:+r.month-1,d:+r.day,h:+r.hour%24,mi:+r.minute,s:+r.second,ms:e,wd:ct.indexOf(r.weekday),offset:0};return l.offset=Math.round((Date.UTC(l.y,l.mo,l.d,l.h,l.mi,l.s,e)-t.getTime())/6e4),l}const K=new Map;function $(t,n,e,r){const l=`${t??"en"}|${n}|${e}`;let s=K.get(l);return s||K.set(l,s=new Intl.DateTimeFormat(t??"en",{[n]:e,timeZone:"UTC"})),s.format(n==="month"?Date.UTC(2023,r,1):Date.UTC(2023,0,1+r))}const ft=t=>{const n=t%100;return`${t}${n>=11&&n<=13?"th":["th","st","nd","rd"][t%10]??"th"}`},B=(t,n)=>{const e=Math.abs(t);return`${t<0?"-":"+"}${M(Math.floor(e/60))}${n?":":""}${M(e%60)}`},ht={LTS:"h:mm:ss A",LT:"h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A",LLL:"MMMM D, YYYY h:mm A",LL:"MMMM D, YYYY",L:"MM/DD/YYYY"},mt=/\[([^\]]*)]|YYYY|YY|Q|MMMM|MMM|MM|M|DDDD|DDD|Do|DD|D|dddd|ddd|d|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z|X|x/g;function dt(t,n){const e=at(t),r=t.locale,l=n.replace(/\[[^\]]*]|LTS|LT|LLLL|LLL|LL|L/g,i=>ht[i]??i),s=e.h%12||12,f=Math.round((Date.UTC(e.y,e.mo,e.d)-Date.UTC(e.y,0,1))/864e5)+1;return l.replace(mt,(i,c)=>{if(c!==void 0)return c;switch(i){case"YYYY":return String(e.y).padStart(4,"0");case"YY":return M(e.y%100);case"Q":return String(Math.floor(e.mo/3)+1);case"MMMM":return $(r,"month","long",e.mo);case"MMM":return $(r,"month","short",e.mo);case"MM":return M(e.mo+1);case"M":return String(e.mo+1);case"DDDD":return String(f).padStart(3,"0");case"DDD":return String(f);case"Do":return ft(e.d);case"DD":return M(e.d);case"D":return String(e.d);case"dddd":return $(r,"weekday","long",e.wd);case"ddd":return $(r,"weekday","short",e.wd);case"d":return String(e.wd);case"HH":return M(e.h);case"H":return String(e.h);case"hh":return M(s);case"h":return String(s);case"mm":return M(e.mi);case"m":return String(e.mi);case"ss":return M(e.s);case"s":return String(e.s);case"SSS":return String(e.ms).padStart(3,"0");case"SS":return M(Math.floor(e.ms/10));case"S":return String(Math.floor(e.ms/100));case"A":return e.h<12?"AM":"PM";case"a":return e.h<12?"am":"pm";case"ZZ":return B(e.offset,!1);case"Z":return B(e.offset,!0);case"X":return String(Math.floor(t.getTime()/1e3));default:return String(t.getTime())}})}const Mt=["january","february","march","april","may","june","july","august","september","october","november","december"],gt=/\[([^\]]*)]|YYYY|YY|MMMM|MMM|MM|M|Do|DD|D|dddd|ddd|HH|H|hh|h|mm|m|ss|s|SSS|A|a|ZZ|Z|X|x/g;function Dt(t,n){const e=[];let r="^\\s*",l=0;const s=D=>D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+");for(const D of n.matchAll(gt)){if(r+=s(n.slice(l,D.index)),l=D.index+D[0].length,D[1]!==void 0){r+=s(D[1]);continue}const a=D[0];e.push(a),r+=a==="YYYY"?"(\\d{4})":a==="MMMM"||a==="MMM"||a==="dddd"||a==="ddd"?"([A-Za-z]+)\\.?":a==="Do"?"(\\d{1,2})(?:st|nd|rd|th)":a==="SSS"?"(\\d{1,3})":a==="A"||a==="a"?"([AaPp][Mm])":a==="Z"||a==="ZZ"?"(Z|[+-]\\d{2}:?\\d{2})":a==="X"||a==="x"?"(-?\\d+)":"(\\d{1,2})"}r+=`${s(n.slice(l))}\\s*$`;const f=new RegExp(r,"i").exec(t);if(!f)return null;let i=new Date().getFullYear(),c=0,m=1,g=0,E=0,y=0,w=0,C=null,Y=null;for(let D=0;D<e.length;D++){const a=e[D],T=f[D+1],p=Number(T);if(a==="X"||a==="x")return new Date(a==="X"?p*1e3:p);if(a==="YYYY")i=p;else if(a==="YY")i=p+(p<69?2e3:1900);else if(a==="MMMM"||a==="MMM"){const P=Mt.findIndex(et=>et.startsWith(T.toLowerCase().slice(0,3)));if(P<0)return null;c=P}else a==="MM"||a==="M"?c=p-1:a==="DD"||a==="D"||a==="Do"?m=p:a==="HH"||a==="H"||a==="hh"||a==="h"?g=p:a==="mm"||a==="m"?E=p:a==="ss"||a==="s"?y=p:a==="SSS"?w=Number(T.padEnd(3,"0")):a==="A"||a==="a"?C=T.toLowerCase()==="pm":(a==="Z"||a==="ZZ")&&(Y=T.toUpperCase()==="Z"?0:(T[0]==="-"?-1:1)*(Number(T.slice(1,3))*60+Number(T.slice(-2))))}if(C!=null&&(g=g%12+(C?12:0)),c<0||c>11||m<1||m>31||g>23||E>59||y>59)return null;const U=Y==null?new Date(i,c,m,g,E,y,w):new Date(Date.UTC(i,c,m,g,E,y,w)-Y*6e4);return Y==null&&U.getDate()!==m||Number.isNaN(U.getTime())?null:U}const F=new Map;function H(t,n=!1){const e=`${n?"g":""}|${t}`;let r=F.get(e);if(!r){const l=/^\(\?([ims]+)\)/.exec(t);r=new RegExp(l?t.slice(l[0].length):t,`${l?.[1]??""}${n?"g":""}`),F.size>200&&F.clear(),F.set(e,r)}return r.lastIndex=0,r}const Z="#ERROR",V=t=>`${t instanceof Date?"d":typeof t}:${o(t)}`;function pt(t,n,e){const r=n<0?t.length+n:Math.max(0,n-1),l=e==null?t.length:e<0?t.length+e+1:e;return t.slice(r,l)}function Q(t,n){const e=t<0?-1:1;let r=Math.ceil(Math.abs(t));return r%2===1!==n&&(r+=1),e*r}const J={IF:t=>A(t[0]??null)?t[1]??null:t[2]??null,AND:t=>d(t).every(A),OR:t=>d(t).some(A),NOT:t=>!A(t[0]??null),XOR:t=>d(t).filter(A).length%2===1,TRUE:()=>!0,FALSE:()=>!1,BLANK:()=>null,ERROR:()=>{throw new FormulaError("ERROR()")},ISERROR:t=>t[0]===Z,RECORD_ID:()=>null,SWITCH:t=>{for(let n=1;n+1<t.length;n+=2)if(o(t[0]??null)===o(t[n]??null))return t[n+1]??null;return t.length%2===0?t[t.length-1]??null:null},CONCATENATE:t=>t.map(o).join(""),LEN:t=>o(t[0]??null).length,UPPER:t=>o(t[0]??null).toUpperCase(),LOWER:t=>o(t[0]??null).toLowerCase(),TRIM:t=>o(t[0]??null).trim(),LEFT:t=>o(t[0]??null).slice(0,u(t[1]??1)),RIGHT:t=>{const n=o(t[0]??null),e=u(t[1]??1);return e<=0?"":n.slice(-e)},MID:t=>{const n=o(t[0]??null),e=Math.max(0,u(t[1]??1)-1);return t.length>2?n.slice(e,e+Math.max(0,u(t[2]??0))):n.slice(e)},FIND:t=>o(t[1]??null).indexOf(o(t[0]??null),Math.max(0,u(t[2]??1)-1))+1,SEARCH:t=>{const n=o(t[1]??null).indexOf(o(t[0]??null),Math.max(0,u(t[2]??1)-1));return n<0?null:n+1},SUBSTITUTE:t=>{const n=o(t[0]??null).split(o(t[1]??null));if(t.length<4)return n.join(o(t[2]??null));const e=u(t[3]??null);return n.reduce((r,l,s)=>s===0?l:r+o(s===e?t[2]??null:t[1]??null)+l,"")},REPLACE:t=>{const n=o(t[0]??null),e=Math.max(0,u(t[1]??1)-1);return n.slice(0,e)+o(t[3]??null)+n.slice(e+Math.max(0,u(t[2]??0)))},ENCODE_URL_COMPONENT:t=>encodeURIComponent(o(t[0]??null)),REGEX_MATCH:t=>H(o(t[1]??null)).test(o(t[0]??null)),REGEX_EXTRACT:t=>H(o(t[1]??null)).exec(o(t[0]??null))?.[0]??null,REGEX_REPLACE:t=>o(t[0]??null).replace(H(o(t[1]??null),!0),o(t[2]??null)),REPT:t=>o(t[0]??null).repeat(Math.max(0,Math.min(1e3,u(t[1]??0)))),T:t=>typeof t[0]=="string"?t[0]:"",VALUE:t=>{const n=o(t[0]??null).replace(/[^0-9.eE+-]/g,""),e=/\d/.test(n)?Number(n):NaN;return Number.isFinite(e)?e:null},ARRAYJOIN:t=>d([t[0]??null]).map(o).filter(Boolean).join(t.length>1?o(t[1]??null):", "),ARRAYCOMPACT:t=>d([t[0]??null]).filter(n=>n!=null&&n!==""),ARRAYFLATTEN:t=>t.flat(1/0),ARRAYUNIQUE:t=>{const n=new Set;return d([t[0]??null]).filter(e=>!n.has(V(e))&&!!n.add(V(e)))},ARRAYSLICE:t=>pt(d([t[0]??null]),u(t[1]??1),t.length>2?u(t[2]??null):void 0),SUM:t=>d(t).reduce((n,e)=>n+u(e),0),AVERAGE:t=>{const n=d(t).filter(e=>!S(e));return n.length?n.reduce((e,r)=>e+u(r),0)/n.length:null},MAX:t=>{const n=d(t).filter(e=>!S(e)).map(u);return n.length?nt(n):null},MIN:t=>{const n=d(t).filter(e=>!S(e)).map(u);return n.length?rt(n):null},COUNT:t=>d(t).filter(n=>typeof n=="number").length,COUNTA:t=>d(t).filter(n=>!S(n)).length,COUNTALL:t=>d(t).length,ROUND:t=>{const n=10**u(t[1]??0);return Math.round(u(t[0]??null)*n)/n},ROUNDUP:t=>{const n=10**u(t[1]??0),e=u(t[0]??null);return Math.sign(e)*Math.ceil(R(Math.abs(e)*n))/n},ROUNDDOWN:t=>{const n=10**u(t[1]??0),e=u(t[0]??null);return Math.sign(e)*Math.floor(R(Math.abs(e)*n))/n},INT:t=>Math.floor(u(t[0]??null)),ABS:t=>Math.abs(u(t[0]??null)),MOD:t=>u(t[0]??null)%u(t[1]??1),POWER:t=>u(t[0]??null)**u(t[1]??1),SQRT:t=>Math.sqrt(u(t[0]??null)),EXP:t=>Math.exp(u(t[0]??null)),LOG:t=>Math.log(u(t[0]??null))/Math.log(t.length>1?u(t[1]??null):10),EVEN:t=>Q(u(t[0]??null),!1),ODD:t=>Q(u(t[0]??null),!0),CEILING:t=>{const n=u(t[1]??1);return n===0?0:R(Math.ceil(R(u(t[0]??null)/n))*n)},FLOOR:t=>{const n=u(t[1]??1);return n===0?0:R(Math.floor(R(u(t[0]??null)/n))*n)},DISTANCE:t=>{const n=t.length>=4?k(`${o(t[0]??null)}, ${o(t[1]??null)}`):k(t[0]??null),e=t.length>=4?k(`${o(t[2]??null)}, ${o(t[3]??null)}`):k(t[1]??null);return n&&e?st(n,e):null},TODAY:()=>{const t=new Date;return t.setHours(0,0,0,0),t},NOW:()=>new Date,YEAR:t=>h(t[0]??null)?.getFullYear()??null,MONTH:t=>{const n=h(t[0]??null);return n?n.getMonth()+1:null},DAY:t=>h(t[0]??null)?.getDate()??null,HOUR:t=>h(t[0]??null)?.getHours()??null,MINUTE:t=>h(t[0]??null)?.getMinutes()??null,SECOND:t=>h(t[0]??null)?.getSeconds()??null,WEEKDAY:t=>{const n=h(t[0]??null);return n?/^mon/i.test(o(t[1]??null))?(n.getDay()+6)%7:n.getDay():null},WEEKNUM:t=>{const n=h(t[0]??null);if(!n)return null;const e=/^mon/i.test(o(t[1]??null))?1:0,r=new Date(n.getFullYear(),0,1),l=Math.round((I(new Date(n.getFullYear(),n.getMonth(),n.getDate()))-I(r))/864e5);return Math.floor((l+(r.getDay()-e+7)%7)/7)+1},DATEADD:t=>{const n=h(t[0]??null),e=t.length>2?L(t[2]??null):"d";return n&&e?ut(n,u(t[1]??0),e):null},DATETIME_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?L(t[2]??null):"s";return n&&e&&r?_(n,e,r):null},IS_BEFORE:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n<e},IS_AFTER:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n>e},IS_SAME:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?L(t[2]??null):"ms";return!!n&&!!e&&!!r&&O(n,r)===O(e,r)},DATESTR:t=>{const n=h(t[0]??null);return n?N(n):null},TIMESTR:t=>{const n=h(t[0]??null);return n?`${M(n.getHours())}:${M(n.getMinutes())}:${M(n.getSeconds())}`:null},DATETIME_FORMAT:t=>{const n=h(t[0]??null);return n?dt(n,t.length>1&&!S(t[1]??null)?o(t[1]??null):"YYYY-MM-DDTHH:mm:ss.SSSZ"):null},DATETIME_PARSE:t=>t.length>1&&!S(t[1]??null)?Dt(o(t[0]??null),o(t[1]??null)):h(t[0]??null),SET_LOCALE:t=>{const n=h(t[0]??null),e=o(t[1]??null).trim();return!n||!e?n:j(n,{locale:Intl.DateTimeFormat.supportedLocalesOf(e)[0]??e})},SET_TIMEZONE:t=>{const n=h(t[0]??null),e=o(t[1]??null).trim();return!n||!e?n:(G(e),j(n,{zone:e}))},TONOW:t=>{const n=h(t[0]??null);return n?_(new Date(O(new Date,"d")),new Date(O(n,"d")),"d"):null},FROMNOW:t=>{const n=h(t[0]??null);return n?_(new Date(O(n,"d")),new Date(O(new Date,"d")),"d"):null},WORKDAY:t=>{const n=h(t[0]??null);if(!n)return null;const e=Math.trunc(u(t[1]??0)),r=e<0?-1:1,l=z(t[2]),s=new Date(n);for(let f=Math.abs(e),i=0;f>0;){if(++i>q)return null;s.setDate(s.getDate()+r),X(s,l)&&(f-=1)}return s},WORKDAY_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null);if(!n||!e)return null;const r=z(t[2]),l=n>e?-1:1,s=new Date(l>0?n:e),f=N(l>0?e:n);let i=0;for(let c=0;N(s)<=f;c++){if(c>q)return null;X(s,r)&&(i+=1),s.setDate(s.getDate()+1)}return l*i}};function tt(t,n,e){switch(t){case"=":return n===e;case"!=":return n!==e;case"<":return n<e;case">":return n>e;case"<=":return n<=e;default:return n>=e}}const Tt=new Set(["DATEADD","DATETIME_DIFF","IS_SAME"]);export const FORMULA_FUNCTIONS=Object.keys(J).sort(),selfReferenceError=t=>new FormulaError(`A formula cannot read its own field {${t.trim()}}`);export function columnResolver(t,n=[]){const e=new Set(n.filter(r=>r!=null&&String(r).trim()!=="").map(r=>String(r).trim().toLowerCase()));return r=>{const l=r.trim().toLowerCase();if(e.has(l))throw selfReferenceError(r);const s=t.find(f=>String(f.header??"").trim().toLowerCase()===l||String(f.field??"").toLowerCase()===l);return s?String(s.field??s.id):null}}class St{constructor(n,e,r){this.toks=n,this.resolve=e,this.refs=r,this.i=0}peek(){return this.toks[this.i]}next(){return this.toks[this.i++]}expect(n,e){const r=this.next();if(!r||r.k!==n||e&&r.v!==e)throw new FormulaError(`Expected "${e??n}"${r?` at ${r.at+1}`:" at the end"}`);return r}parse(){const n=this.compare();if(this.peek())throw new FormulaError(`Unexpected "${this.peek().v}" at ${this.peek().at+1}`);return n}compare(){let n=this.concat();for(let e=this.peek();e&&e.k==="op"&&["=","!=","<",">","<=",">="].includes(e.v);e=this.peek()){this.next();const r=e.v,l=n,s=this.concat();n=f=>{const i=l(f),c=s(f);if(i instanceof Date||c instanceof Date){const y=h(i),w=h(c);return!y||!w?r==="!=":tt(r,y.getTime(),w.getTime())}const m=typeof i=="number"||typeof c=="number",g=m?u(i):o(i),E=m?u(c):o(c);return tt(r,g,E)}}return n}concat(){let n=this.add();for(;this.peek()?.k==="op"&&this.peek().v==="&";){this.next();const e=n,r=this.add();n=l=>o(e(l))+o(r(l))}return n}add(){let n=this.mul();for(let e=this.peek();e&&e.k==="op"&&(e.v==="+"||e.v==="-");e=this.peek()){this.next();const r=n,l=this.mul(),s=e.v==="+";n=f=>s?u(r(f))+u(l(f)):u(r(f))-u(l(f))}return n}mul(){let n=this.unary();for(let e=this.peek();e&&e.k==="op"&&(e.v==="*"||e.v==="/");e=this.peek()){this.next();const r=n,l=this.unary(),s=e.v==="*";n=f=>{if(s)return u(r(f))*u(l(f));const i=u(l(f));return i===0?null:u(r(f))/i}}return n}unary(){const n=this.peek();if(n?.k==="op"&&n.v==="-"){this.next();const e=this.unary();return r=>-u(e(r))}return this.primary()}primary(){const n=this.next();if(!n)throw new FormulaError("The formula ends too early");if(n.k==="num"){const e=Number(n.v);return()=>e}if(n.k==="str"){const e=n.v;return()=>e}if(n.k==="ref"){const e=this.resolve(n.v);if(e==null)throw new FormulaError(`No field named "${n.v}"`);return this.refs.add(e),r=>r?.[e]??null}if(n.k==="("){const e=this.compare();return this.expect(")"),e}if(n.k==="id"){const e=n.v.toUpperCase();if(e==="TRUE"&&this.peek()?.k!=="(")return()=>!0;if(e==="FALSE"&&this.peek()?.k!=="(")return()=>!1;const r=J[e];if(!r)throw new FormulaError(`Unknown function ${n.v}`);this.expect("(");const l=[],s=[],f=()=>{const c=this.i;l.push(this.compare());const m=this.i===c+1?this.toks[c]:void 0;s.push(m?.k==="str"?m.v:void 0)};if(this.peek()?.k!==")")for(f();this.peek()?.k===",";)this.next(),f();this.expect(")");const i=s[2];if(Tt.has(e)&&i!==void 0&&!L(i))throw new FormulaError(`Unknown unit "${i}" in ${e}: use ms, seconds, minutes, hours, days, weeks, months, quarters or years`);return e==="RECORD_ID"?c=>c?.id==null?null:String(c.id):e==="ISERROR"?c=>{try{const m=l[0]?.(c)??null;return m===Z||typeof m=="number"&&!Number.isFinite(m)}catch{return!0}}:e==="IF"?c=>A(l[0]?.(c)??null)?l[1]?.(c)??null:l[2]?.(c)??null:e==="SWITCH"?c=>{if(!l.length)return null;const m=o(l[0](c));for(let g=1;g+1<l.length;g+=2)if(m===o(l[g](c)))return l[g+1](c);return l.length%2===0?l[l.length-1](c):null}:c=>r(l.map(m=>m(c)))}throw new FormulaError(`Unexpected "${n.v}" at ${n.at+1}`)}}export function compileFormula(t,n){if(!t.trim())throw new FormulaError("The formula is empty");const e=new Set,r=new St(tokenize(t),n,e).parse();return{fn:l=>{try{const s=r(l);return typeof s=="number"&&!Number.isFinite(s)?null:s}catch(s){return s instanceof FormulaError?Z:null}},refs:[...e]}}export function renameFormulaRefs(t,n){let e;try{e=tokenize(t)}catch{return t}let r="",l=0;for(const s of e){if(s.k!=="ref")continue;const f=n(s.v);if(f==null)continue;const i=t.indexOf("}",s.at);r+=`${t.slice(l,s.at)}{${f}}`,l=i+1}return l?r+t.slice(l):t}export function formulaRefs(t,n){let e;try{e=tokenize(t)}catch{return[]}const r=new Set;for(const l of e)if(l.k==="ref")try{const s=n(l.v);s!=null&&r.add(s)}catch{}return[...r]}export function formulaReaders(t,n){const e=new Set([n.field,n.id].filter(l=>l!=null&&l!=="").map(String));if(!e.size)return[];const r=columnResolver(t);return t.filter(l=>l.fieldType!=="formula"||e.has(String(l.field??l.id??""))?!1:formulaRefs(String(l.fieldProps?.formula??""),r).some(s=>e.has(s)))}export function formulaError(t,n){try{return compileFormula(t,n),null}catch(e){return e instanceof FormulaError?e.message:"The formula is not valid"}}
|
|
1
|
+
import{toDate as _}from"./format.js";import{maxOf as nt,minOf as rt}from"../extent.js";export class FormulaError extends Error{}export function tokenize(t){const n=[];let e=0;for(;e<t.length;){const r=t[e];if(/\s/.test(r)){e++;continue}if(r==="{"){const c=t.indexOf("}",e);if(c<0)throw new FormulaError(`Unclosed "{" at ${e+1}`);n.push({k:"ref",v:t.slice(e+1,c).trim(),at:e}),e=c+1;continue}if(r==='"'||r==="'"){let c=e+1,i="";for(;c<t.length&&t[c]!==r;){if(t[c]==="\\"&&c+1<t.length){i+=t[c+1],c+=2;continue}i+=t[c++]}if(c>=t.length)throw new FormulaError(`Unclosed text at ${e+1}`);n.push({k:"str",v:i,at:e}),e=c+1;continue}const l=/^\d+(\.\d+)?|^\.\d+/.exec(t.slice(e));if(l){n.push({k:"num",v:l[0],at:e}),e+=l[0].length;continue}const s=/^[A-Za-z_][A-Za-z0-9_]*/.exec(t.slice(e));if(s){n.push({k:"id",v:s[0],at:e}),e+=s[0].length;continue}const f=/^(!=|<=|>=|<>|[-+*/&=<>])/.exec(t.slice(e));if(f){n.push({k:"op",v:f[0]==="<>"?"!=":f[0],at:e}),e+=f[0].length;continue}if(r==="("||r===")"||r===","){n.push({k:r,v:r,at:e}),e++;continue}throw new FormulaError(`Unexpected "${r}" at ${e+1}`)}return n}const S=t=>t==null||t===""||Array.isArray(t)&&t.length===0,o=t=>{if(typeof t=="number")return t;if(typeof t=="boolean")return t?1:0;if(t instanceof Date)return t.getTime();if(t==null||t==="")return 0;if(Array.isArray(t))return t.reduce((e,r)=>e+o(r),0);const n=Number(t);return Number.isFinite(n)?n:NaN},u=t=>t==null?"":t instanceof Date?t.toISOString():Array.isArray(t)?t.map(u).join(", "):String(t),w=t=>!S(t)&&t!==!1&&t!==0,lt=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;export function isoDate(t){const n=t.trim();return lt.test(n)?_(n):null}const h=t=>{if(t instanceof Date)return Number.isNaN(t.getTime())?null:t;if(t==null||t===""||typeof t=="boolean")return null;if(typeof t=="number")return _(t);const n=u(t).trim();return isoDate(n)??(/\d{4}/.test(n)&&/[/\s,.-]/.test(n)?_(n):null)},d=t=>t.flatMap(n=>Array.isArray(n)?n:[n]),k=t=>{const n=u(Array.isArray(t)?t.find(s=>!S(s))??null:t).replace(/%2C/gi,","),e=/(?<![\d.])(-?\d{1,2}(?:\.\d+)?)\s*,\s*(-?\d{1,3}(?:\.\d+)?)/.exec(n);if(!e)return null;const r=Number(e[1]),l=Number(e[2]);return Math.abs(r)<=90&&Math.abs(l)<=180?{lat:r,lng:l}:null},st=(t,n)=>{const e=l=>l*Math.PI/180,r=Math.sin(e(n.lat-t.lat)/2)**2+Math.cos(e(t.lat))*Math.cos(e(n.lat))*Math.sin(e(n.lng-t.lng)/2)**2;return Math.round(2*6371e3*Math.asin(Math.min(1,Math.sqrt(r))))},M=t=>String(t).padStart(2,"0"),R=t=>Number(t.toPrecision(12)),ut={milliseconds:"ms",millisecond:"ms",ms:"ms",seconds:"s",second:"s",s:"s",minutes:"m",minute:"m",m:"m",hours:"h",hour:"h",h:"h",days:"d",day:"d",d:"d",weeks:"w",week:"w",w:"w",months:"mo",month:"mo",quarters:"q",quarter:"q",q:"q",years:"y",year:"y",y:"y"},x={ms:1,s:1e3,m:6e4,h:36e5},I=t=>ut[u(t).trim().toLowerCase()]??null;function W(t,n){const e=new Date(t),r=e.getDate();return e.setDate(1),e.setMonth(e.getMonth()+n),e.setDate(Math.min(r,new Date(e.getFullYear(),e.getMonth()+1,0).getDate())),e}function ot(t,n,e){if(x[e])return new Date(t.getTime()+n*x[e]);if(e==="mo"||e==="q"||e==="y")return W(t,Math.trunc(n)*(e==="y"?12:e==="q"?3:1));const r=n*(e==="w"?7:1),l=new Date(t);return l.setDate(l.getDate()+Math.trunc(r)),new Date(l.getTime()+(r-Math.trunc(r))*864e5)}const L=t=>t.getTime()-t.getTimezoneOffset()*6e4;function b(t,n,e){if(x[e])return Math.trunc((t.getTime()-n.getTime())/x[e]);if(e==="d"||e==="w")return Math.trunc((L(t)-L(n))/(e==="w"?6048e5:864e5));let r=(t.getFullYear()-n.getFullYear())*12+t.getMonth()-n.getMonth();const l=W(n,r).getTime();return r>0&&l>t.getTime()?r-=1:r<0&&l<t.getTime()&&(r+=1),e==="y"?Math.trunc(r/12):e==="q"?Math.trunc(r/3):r}function O(t,n){if(n==="ms")return t.getTime();const e=new Date(t);return n==="s"?e.setMilliseconds(0):n==="m"?e.setSeconds(0,0):n==="h"?e.setMinutes(0,0,0):(e.setHours(0,0,0,0),n==="w"&&e.setDate(e.getDate()-e.getDay()),(n==="mo"||n==="q"||n==="y")&&e.setDate(1),n==="q"&&e.setMonth(e.getMonth()-e.getMonth()%3),n==="y"&&e.setMonth(0),e.getTime())}const N=t=>`${t.getFullYear()}-${M(t.getMonth()+1)}-${M(t.getDate())}`;function z(t){const n=d([t??null]).flatMap(e=>typeof e=="string"?e.split(","):[e]);return new Set(n.map(e=>h(typeof e=="string"?e.trim():e)).filter(e=>!!e).map(N))}const X=(t,n)=>t.getDay()!==0&&t.getDay()!==6&&!n.has(N(t)),q=1e5;class it extends Date{}function j(t,n){const e=new it(t.getTime()),r=t;return e.locale=n.locale??r.locale,e.zone=n.zone??r.zone,e}const v=new Map;function G(t){let n=v.get(t);return n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hourCycle:"h23",weekday:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),v.set(t,n)),n}const ct=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function at(t){const n=t.zone,e=t.getMilliseconds();if(!n)return{y:t.getFullYear(),mo:t.getMonth(),d:t.getDate(),h:t.getHours(),mi:t.getMinutes(),s:t.getSeconds(),ms:e,wd:t.getDay(),offset:-t.getTimezoneOffset()};const r={};for(const s of G(n).formatToParts(t))r[s.type]=s.value;const l={y:+r.year,mo:+r.month-1,d:+r.day,h:+r.hour%24,mi:+r.minute,s:+r.second,ms:e,wd:ct.indexOf(r.weekday),offset:0};return l.offset=Math.round((Date.UTC(l.y,l.mo,l.d,l.h,l.mi,l.s,e)-t.getTime())/6e4),l}const K=new Map;function F(t,n,e,r){const l=`${t??"en"}|${n}|${e}`;let s=K.get(l);return s||K.set(l,s=new Intl.DateTimeFormat(t??"en",{[n]:e,timeZone:"UTC"})),s.format(n==="month"?Date.UTC(2023,r,1):Date.UTC(2023,0,1+r))}const ft=t=>{const n=t%100;return`${t}${n>=11&&n<=13?"th":["th","st","nd","rd"][t%10]??"th"}`},B=(t,n)=>{const e=Math.abs(t);return`${t<0?"-":"+"}${M(Math.floor(e/60))}${n?":":""}${M(e%60)}`},ht={LTS:"h:mm:ss A",LT:"h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A",LLL:"MMMM D, YYYY h:mm A",LL:"MMMM D, YYYY",L:"MM/DD/YYYY"},mt=/\[([^\]]*)]|YYYY|YY|Q|MMMM|MMM|MM|M|DDDD|DDD|Do|DD|D|dddd|ddd|d|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a|ZZ|Z|X|x/g;function dt(t,n){const e=at(t),r=t.locale,l=n.replace(/\[[^\]]*]|LTS|LT|LLLL|LLL|LL|L/g,c=>ht[c]??c),s=e.h%12||12,f=Math.round((Date.UTC(e.y,e.mo,e.d)-Date.UTC(e.y,0,1))/864e5)+1;return l.replace(mt,(c,i)=>{if(i!==void 0)return i;switch(c){case"YYYY":return String(e.y).padStart(4,"0");case"YY":return M(e.y%100);case"Q":return String(Math.floor(e.mo/3)+1);case"MMMM":return F(r,"month","long",e.mo);case"MMM":return F(r,"month","short",e.mo);case"MM":return M(e.mo+1);case"M":return String(e.mo+1);case"DDDD":return String(f).padStart(3,"0");case"DDD":return String(f);case"Do":return ft(e.d);case"DD":return M(e.d);case"D":return String(e.d);case"dddd":return F(r,"weekday","long",e.wd);case"ddd":return F(r,"weekday","short",e.wd);case"d":return String(e.wd);case"HH":return M(e.h);case"H":return String(e.h);case"hh":return M(s);case"h":return String(s);case"mm":return M(e.mi);case"m":return String(e.mi);case"ss":return M(e.s);case"s":return String(e.s);case"SSS":return String(e.ms).padStart(3,"0");case"SS":return M(Math.floor(e.ms/10));case"S":return String(Math.floor(e.ms/100));case"A":return e.h<12?"AM":"PM";case"a":return e.h<12?"am":"pm";case"ZZ":return B(e.offset,!1);case"Z":return B(e.offset,!0);case"X":return String(Math.floor(t.getTime()/1e3));default:return String(t.getTime())}})}const Mt=["january","february","march","april","may","june","july","august","september","october","november","december"],gt=/\[([^\]]*)]|YYYY|YY|MMMM|MMM|MM|M|Do|DD|D|dddd|ddd|HH|H|hh|h|mm|m|ss|s|SSS|A|a|ZZ|Z|X|x/g;function Dt(t,n){const e=[];let r="^\\s*",l=0;const s=D=>D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+");for(const D of n.matchAll(gt)){if(r+=s(n.slice(l,D.index)),l=D.index+D[0].length,D[1]!==void 0){r+=s(D[1]);continue}const a=D[0];e.push(a),r+=a==="YYYY"?"(\\d{4})":a==="MMMM"||a==="MMM"||a==="dddd"||a==="ddd"?"([A-Za-z]+)\\.?":a==="Do"?"(\\d{1,2})(?:st|nd|rd|th)":a==="SSS"?"(\\d{1,3})":a==="A"||a==="a"?"([AaPp][Mm])":a==="Z"||a==="ZZ"?"(Z|[+-]\\d{2}:?\\d{2})":a==="X"||a==="x"?"(-?\\d+)":"(\\d{1,2})"}r+=`${s(n.slice(l))}\\s*$`;const f=new RegExp(r,"i").exec(t);if(!f)return null;let c=new Date().getFullYear(),i=0,m=1,g=0,y=0,E=0,A=0,$=null,Y=null;for(let D=0;D<e.length;D++){const a=e[D],T=f[D+1],p=Number(T);if(a==="X"||a==="x")return new Date(a==="X"?p*1e3:p);if(a==="YYYY")c=p;else if(a==="YY")c=p+(p<69?2e3:1900);else if(a==="MMMM"||a==="MMM"){const P=Mt.findIndex(et=>et.startsWith(T.toLowerCase().slice(0,3)));if(P<0)return null;i=P}else a==="MM"||a==="M"?i=p-1:a==="DD"||a==="D"||a==="Do"?m=p:a==="HH"||a==="H"||a==="hh"||a==="h"?g=p:a==="mm"||a==="m"?y=p:a==="ss"||a==="s"?E=p:a==="SSS"?A=Number(T.padEnd(3,"0")):a==="A"||a==="a"?$=T.toLowerCase()==="pm":(a==="Z"||a==="ZZ")&&(Y=T.toUpperCase()==="Z"?0:(T[0]==="-"?-1:1)*(Number(T.slice(1,3))*60+Number(T.slice(-2))))}if($!=null&&(g=g%12+($?12:0)),i<0||i>11||m<1||m>31||g>23||y>59||E>59)return null;const U=Y==null?new Date(c,i,m,g,y,E,A):new Date(Date.UTC(c,i,m,g,y,E,A)-Y*6e4);return Y==null&&U.getDate()!==m||Number.isNaN(U.getTime())?null:U}const C=new Map;function H(t,n=!1){const e=`${n?"g":""}|${t}`;let r=C.get(e);if(!r){const l=/^\(\?([ims]+)\)/.exec(t);r=new RegExp(l?t.slice(l[0].length):t,`${l?.[1]??""}${n?"g":""}`),C.size>200&&C.clear(),C.set(e,r)}return r.lastIndex=0,r}const Z="#ERROR",V=t=>`${t instanceof Date?"d":typeof t}:${u(t)}`;function pt(t,n,e){const r=n<0?t.length+n:Math.max(0,n-1),l=e==null?t.length:e<0?t.length+e+1:e;return t.slice(r,l)}function Q(t,n){const e=t<0?-1:1;let r=Math.ceil(Math.abs(t));return r%2===1!==n&&(r+=1),e*r}const J={IF:t=>w(t[0]??null)?t[1]??null:t[2]??null,AND:t=>d(t).every(w),OR:t=>d(t).some(w),NOT:t=>!w(t[0]??null),XOR:t=>d(t).filter(w).length%2===1,TRUE:()=>!0,FALSE:()=>!1,BLANK:()=>null,ERROR:()=>{throw new FormulaError("ERROR()")},ISERROR:t=>t[0]===Z,RECORD_ID:()=>null,CREATED_TIME:()=>null,LAST_MODIFIED_TIME:()=>null,SWITCH:t=>{for(let n=1;n+1<t.length;n+=2)if(u(t[0]??null)===u(t[n]??null))return t[n+1]??null;return t.length%2===0?t[t.length-1]??null:null},CONCATENATE:t=>t.map(u).join(""),LEN:t=>u(t[0]??null).length,UPPER:t=>u(t[0]??null).toUpperCase(),LOWER:t=>u(t[0]??null).toLowerCase(),TRIM:t=>u(t[0]??null).trim(),LEFT:t=>u(t[0]??null).slice(0,o(t[1]??1)),RIGHT:t=>{const n=u(t[0]??null),e=o(t[1]??1);return e<=0?"":n.slice(-e)},MID:t=>{const n=u(t[0]??null),e=Math.max(0,o(t[1]??1)-1);return t.length>2?n.slice(e,e+Math.max(0,o(t[2]??0))):n.slice(e)},FIND:t=>u(t[1]??null).indexOf(u(t[0]??null),Math.max(0,o(t[2]??1)-1))+1,SEARCH:t=>{const n=u(t[1]??null).indexOf(u(t[0]??null),Math.max(0,o(t[2]??1)-1));return n<0?null:n+1},SUBSTITUTE:t=>{const n=u(t[0]??null).split(u(t[1]??null));if(t.length<4)return n.join(u(t[2]??null));const e=o(t[3]??null);return n.reduce((r,l,s)=>s===0?l:r+u(s===e?t[2]??null:t[1]??null)+l,"")},REPLACE:t=>{const n=u(t[0]??null),e=Math.max(0,o(t[1]??1)-1);return n.slice(0,e)+u(t[3]??null)+n.slice(e+Math.max(0,o(t[2]??0)))},ENCODE_URL_COMPONENT:t=>encodeURIComponent(u(t[0]??null)),REGEX_MATCH:t=>H(u(t[1]??null)).test(u(t[0]??null)),REGEX_EXTRACT:t=>H(u(t[1]??null)).exec(u(t[0]??null))?.[0]??null,REGEX_REPLACE:t=>u(t[0]??null).replace(H(u(t[1]??null),!0),u(t[2]??null)),REPT:t=>u(t[0]??null).repeat(Math.max(0,Math.min(1e3,o(t[1]??0)))),T:t=>typeof t[0]=="string"?t[0]:"",VALUE:t=>{const n=u(t[0]??null).replace(/[^0-9.eE+-]/g,""),e=/\d/.test(n)?Number(n):NaN;return Number.isFinite(e)?e:null},ARRAYJOIN:t=>d([t[0]??null]).map(u).filter(Boolean).join(t.length>1?u(t[1]??null):", "),ARRAYCOMPACT:t=>d([t[0]??null]).filter(n=>n!=null&&n!==""),ARRAYFLATTEN:t=>t.flat(1/0),ARRAYUNIQUE:t=>{const n=new Set;return d([t[0]??null]).filter(e=>!n.has(V(e))&&!!n.add(V(e)))},ARRAYSLICE:t=>pt(d([t[0]??null]),o(t[1]??1),t.length>2?o(t[2]??null):void 0),SUM:t=>d(t).reduce((n,e)=>n+o(e),0),AVERAGE:t=>{const n=d(t).filter(e=>!S(e));return n.length?n.reduce((e,r)=>e+o(r),0)/n.length:null},MAX:t=>{const n=d(t).filter(e=>!S(e)).map(o);return n.length?nt(n):null},MIN:t=>{const n=d(t).filter(e=>!S(e)).map(o);return n.length?rt(n):null},COUNT:t=>d(t).filter(n=>typeof n=="number").length,COUNTA:t=>d(t).filter(n=>!S(n)).length,COUNTALL:t=>d(t).length,ROUND:t=>{const n=10**o(t[1]??0);return Math.round(o(t[0]??null)*n)/n},ROUNDUP:t=>{const n=10**o(t[1]??0),e=o(t[0]??null);return Math.sign(e)*Math.ceil(R(Math.abs(e)*n))/n},ROUNDDOWN:t=>{const n=10**o(t[1]??0),e=o(t[0]??null);return Math.sign(e)*Math.floor(R(Math.abs(e)*n))/n},INT:t=>Math.floor(o(t[0]??null)),ABS:t=>Math.abs(o(t[0]??null)),MOD:t=>o(t[0]??null)%o(t[1]??1),POWER:t=>o(t[0]??null)**o(t[1]??1),SQRT:t=>Math.sqrt(o(t[0]??null)),EXP:t=>Math.exp(o(t[0]??null)),LOG:t=>Math.log(o(t[0]??null))/Math.log(t.length>1?o(t[1]??null):10),EVEN:t=>Q(o(t[0]??null),!1),ODD:t=>Q(o(t[0]??null),!0),CEILING:t=>{const n=o(t[1]??1);return n===0?0:R(Math.ceil(R(o(t[0]??null)/n))*n)},FLOOR:t=>{const n=o(t[1]??1);return n===0?0:R(Math.floor(R(o(t[0]??null)/n))*n)},DISTANCE:t=>{const n=t.length>=4?k(`${u(t[0]??null)}, ${u(t[1]??null)}`):k(t[0]??null),e=t.length>=4?k(`${u(t[2]??null)}, ${u(t[3]??null)}`):k(t[1]??null);return n&&e?st(n,e):null},TODAY:()=>{const t=new Date;return t.setHours(0,0,0,0),t},NOW:()=>new Date,YEAR:t=>h(t[0]??null)?.getFullYear()??null,MONTH:t=>{const n=h(t[0]??null);return n?n.getMonth()+1:null},DAY:t=>h(t[0]??null)?.getDate()??null,HOUR:t=>h(t[0]??null)?.getHours()??null,MINUTE:t=>h(t[0]??null)?.getMinutes()??null,SECOND:t=>h(t[0]??null)?.getSeconds()??null,WEEKDAY:t=>{const n=h(t[0]??null);return n?/^mon/i.test(u(t[1]??null))?(n.getDay()+6)%7:n.getDay():null},WEEKNUM:t=>{const n=h(t[0]??null);if(!n)return null;const e=/^mon/i.test(u(t[1]??null))?1:0,r=new Date(n.getFullYear(),0,1),l=Math.round((L(new Date(n.getFullYear(),n.getMonth(),n.getDate()))-L(r))/864e5);return Math.floor((l+(r.getDay()-e+7)%7)/7)+1},DATEADD:t=>{const n=h(t[0]??null),e=t.length>2?I(t[2]??null):"d";return n&&e?ot(n,o(t[1]??0),e):null},DATETIME_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?I(t[2]??null):"s";return n&&e&&r?b(n,e,r):null},IS_BEFORE:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n<e},IS_AFTER:t=>{const n=h(t[0]??null),e=h(t[1]??null);return!!n&&!!e&&n>e},IS_SAME:t=>{const n=h(t[0]??null),e=h(t[1]??null),r=t.length>2?I(t[2]??null):"ms";return!!n&&!!e&&!!r&&O(n,r)===O(e,r)},DATESTR:t=>{const n=h(t[0]??null);return n?N(n):null},TIMESTR:t=>{const n=h(t[0]??null);return n?`${M(n.getHours())}:${M(n.getMinutes())}:${M(n.getSeconds())}`:null},DATETIME_FORMAT:t=>{const n=h(t[0]??null);return n?dt(n,t.length>1&&!S(t[1]??null)?u(t[1]??null):"YYYY-MM-DDTHH:mm:ss.SSSZ"):null},DATETIME_PARSE:t=>t.length>1&&!S(t[1]??null)?Dt(u(t[0]??null),u(t[1]??null)):h(t[0]??null),SET_LOCALE:t=>{const n=h(t[0]??null),e=u(t[1]??null).trim();return!n||!e?n:j(n,{locale:Intl.DateTimeFormat.supportedLocalesOf(e)[0]??e})},SET_TIMEZONE:t=>{const n=h(t[0]??null),e=u(t[1]??null).trim();return!n||!e?n:(G(e),j(n,{zone:e}))},TONOW:t=>{const n=h(t[0]??null);return n?b(new Date(O(new Date,"d")),new Date(O(n,"d")),"d"):null},FROMNOW:t=>{const n=h(t[0]??null);return n?b(new Date(O(n,"d")),new Date(O(new Date,"d")),"d"):null},WORKDAY:t=>{const n=h(t[0]??null);if(!n)return null;const e=Math.trunc(o(t[1]??0)),r=e<0?-1:1,l=z(t[2]),s=new Date(n);for(let f=Math.abs(e),c=0;f>0;){if(++c>q)return null;s.setDate(s.getDate()+r),X(s,l)&&(f-=1)}return s},WORKDAY_DIFF:t=>{const n=h(t[0]??null),e=h(t[1]??null);if(!n||!e)return null;const r=z(t[2]),l=n>e?-1:1,s=new Date(l>0?n:e),f=N(l>0?e:n);let c=0;for(let i=0;N(s)<=f;i++){if(i>q)return null;X(s,r)&&(c+=1),s.setDate(s.getDate()+1)}return l*c}};function tt(t,n,e){switch(t){case"=":return n===e;case"!=":return n!==e;case"<":return n<e;case">":return n>e;case"<=":return n<=e;default:return n>=e}}const Tt=new Set(["DATEADD","DATETIME_DIFF","IS_SAME"]);export const FORMULA_FUNCTIONS=Object.keys(J).sort(),selfReferenceError=t=>new FormulaError(`A formula cannot read its own field {${t.trim()}}`);export function columnResolver(t,n=[]){const e=new Set(n.filter(r=>r!=null&&String(r).trim()!=="").map(r=>String(r).trim().toLowerCase()));return r=>{const l=r.trim().toLowerCase();if(e.has(l))throw selfReferenceError(r);const s=t.find(f=>String(f.header??"").trim().toLowerCase()===l||String(f.field??"").toLowerCase()===l);return s?String(s.field??s.id):null}}class St{constructor(n,e,r){this.toks=n,this.resolve=e,this.refs=r,this.i=0}peek(){return this.toks[this.i]}next(){return this.toks[this.i++]}expect(n,e){const r=this.next();if(!r||r.k!==n||e&&r.v!==e)throw new FormulaError(`Expected "${e??n}"${r?` at ${r.at+1}`:" at the end"}`);return r}parse(){const n=this.compare();if(this.peek())throw new FormulaError(`Unexpected "${this.peek().v}" at ${this.peek().at+1}`);return n}compare(){let n=this.concat();for(let e=this.peek();e&&e.k==="op"&&["=","!=","<",">","<=",">="].includes(e.v);e=this.peek()){this.next();const r=e.v,l=n,s=this.concat();n=f=>{const c=l(f),i=s(f);if(c instanceof Date||i instanceof Date){const E=h(c),A=h(i);return!E||!A?r==="!=":tt(r,E.getTime(),A.getTime())}const m=typeof c=="number"||typeof i=="number",g=m?o(c):u(c),y=m?o(i):u(i);return tt(r,g,y)}}return n}concat(){let n=this.add();for(;this.peek()?.k==="op"&&this.peek().v==="&";){this.next();const e=n,r=this.add();n=l=>u(e(l))+u(r(l))}return n}add(){let n=this.mul();for(let e=this.peek();e&&e.k==="op"&&(e.v==="+"||e.v==="-");e=this.peek()){this.next();const r=n,l=this.mul(),s=e.v==="+";n=f=>s?o(r(f))+o(l(f)):o(r(f))-o(l(f))}return n}mul(){let n=this.unary();for(let e=this.peek();e&&e.k==="op"&&(e.v==="*"||e.v==="/");e=this.peek()){this.next();const r=n,l=this.unary(),s=e.v==="*";n=f=>{if(s)return o(r(f))*o(l(f));const c=o(l(f));return c===0?null:o(r(f))/c}}return n}unary(){const n=this.peek();if(n?.k==="op"&&n.v==="-"){this.next();const e=this.unary();return r=>-o(e(r))}return this.primary()}primary(){const n=this.next();if(!n)throw new FormulaError("The formula ends too early");if(n.k==="num"){const e=Number(n.v);return()=>e}if(n.k==="str"){const e=n.v;return()=>e}if(n.k==="ref"){const e=this.resolve(n.v);if(e==null)throw new FormulaError(`No field named "${n.v}"`);return this.refs.add(e),r=>r?.[e]??null}if(n.k==="("){const e=this.compare();return this.expect(")"),e}if(n.k==="id"){const e=n.v.toUpperCase();if(e==="TRUE"&&this.peek()?.k!=="(")return()=>!0;if(e==="FALSE"&&this.peek()?.k!=="(")return()=>!1;const r=J[e];if(!r)throw new FormulaError(`Unknown function ${n.v}`);this.expect("(");const l=[],s=[],f=()=>{const i=this.i;l.push(this.compare());const m=this.i===i+1?this.toks[i]:void 0;s.push(m?.k==="str"?m.v:void 0)};if(this.peek()?.k!==")")for(f();this.peek()?.k===",";)this.next(),f();this.expect(")");const c=s[2];if(Tt.has(e)&&c!==void 0&&!I(c))throw new FormulaError(`Unknown unit "${c}" in ${e}: use ms, seconds, minutes, hours, days, weeks, months, quarters or years`);return e==="RECORD_ID"?i=>i?.id==null?null:String(i.id):e==="CREATED_TIME"?i=>h(i?.created_at??i?.createdTime??null):e==="LAST_MODIFIED_TIME"?i=>h(i?.updated_at??i?.lastModifiedTime??i?.created_at??i?.createdTime??null):e==="ISERROR"?i=>{try{const m=l[0]?.(i)??null;return m===Z||typeof m=="number"&&!Number.isFinite(m)}catch{return!0}}:e==="IF"?i=>w(l[0]?.(i)??null)?l[1]?.(i)??null:l[2]?.(i)??null:e==="SWITCH"?i=>{if(!l.length)return null;const m=u(l[0](i));for(let g=1;g+1<l.length;g+=2)if(m===u(l[g](i)))return l[g+1](i);return l.length%2===0?l[l.length-1](i):null}:i=>r(l.map(m=>m(i)))}throw new FormulaError(`Unexpected "${n.v}" at ${n.at+1}`)}}export function compileFormula(t,n){if(!t.trim())throw new FormulaError("The formula is empty");const e=new Set,r=new St(tokenize(t),n,e).parse();return{fn:l=>{try{const s=r(l);return typeof s=="number"&&!Number.isFinite(s)?null:s}catch(s){return s instanceof FormulaError?Z:null}},refs:[...e]}}export function renameFormulaRefs(t,n){let e;try{e=tokenize(t)}catch{return t}let r="",l=0;for(const s of e){if(s.k!=="ref")continue;const f=n(s.v);if(f==null)continue;const c=t.indexOf("}",s.at);r+=`${t.slice(l,s.at)}{${f}}`,l=c+1}return l?r+t.slice(l):t}export function formulaRefs(t,n){let e;try{e=tokenize(t)}catch{return[]}const r=new Set;for(const l of e)if(l.k==="ref")try{const s=n(l.v);s!=null&&r.add(s)}catch{}return[...r]}export function formulaReaders(t,n){const e=new Set([n.field,n.id].filter(l=>l!=null&&l!=="").map(String));if(!e.size)return[];const r=columnResolver(t);return t.filter(l=>l.fieldType!=="formula"||e.has(String(l.field??l.id??""))?!1:formulaRefs(String(l.fieldProps?.formula??""),r).some(s=>e.has(s)))}export function formulaError(t,n){try{return compileFormula(t,n),null}catch(e){return e instanceof FormulaError?e.message:"The formula is not valid"}}
|
|
@@ -180,6 +180,24 @@ export declare const EXTRAS_MESSAGES: {
|
|
|
180
180
|
readonly 'extras.delete': "Delete";
|
|
181
181
|
readonly 'extras.keep': "Keep";
|
|
182
182
|
readonly 'extras.deleteAutomation': "Delete automation";
|
|
183
|
+
readonly 'extras.triggerEntersView': "A record enters a view";
|
|
184
|
+
readonly 'extras.view': "View";
|
|
185
|
+
readonly 'extras.pickView': "Pick a view";
|
|
186
|
+
readonly 'extras.aView': "a view";
|
|
187
|
+
readonly 'extras.entersViewHint': "Runs once when a record starts to show in this view, through its filter, as the view has it then. It runs again only after the record has left the view.";
|
|
188
|
+
readonly 'extras.addViewFilterFirst': "First give a view of this table a filter: this trigger runs when a record starts to show in it.";
|
|
189
|
+
readonly 'extras.whenEntersView': "When a record enters {view}";
|
|
190
|
+
readonly 'extras.whenEntersViewWhere': "When a record enters {view}, where {condition}";
|
|
191
|
+
readonly 'extras.doDeleteRecord': "Delete the record";
|
|
192
|
+
readonly 'extras.actionDeleteRecord': "Delete record";
|
|
193
|
+
readonly 'extras.deleteRecordHint': "Deletes the record that started the automation (inside Find records, each record found). It goes to the trash, where it can be restored for 30 days.";
|
|
194
|
+
readonly 'extras.noRecordToDelete': "No record to delete";
|
|
195
|
+
readonly 'extras.deletedRecord': "Deleted {name}";
|
|
196
|
+
readonly 'extras.cannotDeleteHere': "This table cannot delete records from an automation.";
|
|
197
|
+
readonly 'extras.summaryDelete': "Deletes the record";
|
|
198
|
+
readonly 'extras.duplicateAutomation': "Duplicate";
|
|
199
|
+
readonly 'extras.copyOf': "{name} copy";
|
|
200
|
+
readonly 'extras.duplicated': "Copied. The copy is off until you turn it on.";
|
|
183
201
|
readonly 'extras.runsOnServer': "Runs on your server when its trigger happens.";
|
|
184
202
|
readonly 'extras.tryRecord': "Record to try it on";
|
|
185
203
|
readonly 'extras.noRecord': "No record";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const EXTRAS_MESSAGES={"extras.whenCreated":"When a record is created","extras.whenCreatedWhere":"When a record is created, where {condition}","extras.whenRecordChanges":"When a record changes","extras.whenRecordChangesWhere":"When a record changes, where {condition}","extras.whenFieldsChange":"When {fields} changes","extras.whenFieldsChangeWhere":"When {fields} changes, where {condition}","extras.fieldsOr":" or ","extras.whenMatches":"When a record matches: {condition}","extras.noConditionYet":"no condition yet","extras.whenForm":"When a form is sent","extras.whenFormWhere":"When a form is sent, where {condition}","extras.whenPressed":"When {field} is pressed","extras.onSchedule":"{cron}","extras.onScheduleWhere":"{cron}, for records where {condition}","extras.cronOther":"On a schedule ({cron})","extras.cronEveryMinute":"Every minute","extras.cronEveryMinutes":"Every {n} minutes","extras.cronHourly":"Every hour, on the hour","extras.cronHourlyAt":"Every hour at {minute} past","extras.cronDaily":"Every day at {time}","extras.cronWeekdays":"Every weekday at {time}","extras.cronWeekly0":"Every Sunday at {time}","extras.cronWeekly1":"Every Monday at {time}","extras.cronWeekly2":"Every Tuesday at {time}","extras.cronWeekly3":"Every Wednesday at {time}","extras.cronWeekly4":"Every Thursday at {time}","extras.cronWeekly5":"Every Friday at {time}","extras.cronWeekly6":"Every Saturday at {time}","extras.cronDays":"Every {days} at {time}","extras.cronDay0":"Sunday","extras.cronDay1":"Monday","extras.cronDay2":"Tuesday","extras.cronDay3":"Wednesday","extras.cronDay4":"Thursday","extras.cronDay5":"Friday","extras.cronDay6":"Saturday","extras.cronMonthly":"Day {day} of every month at {time}","extras.actionUpdateRecord":"Update record","extras.actionCreateRecord":"Create record","extras.actionNotify":"Show a notice","extras.actionHighlight":"Color the record","extras.actionWebhook":"Call a webhook","extras.actionEmail":"Send an email","extras.stepStopped":"Stopped","extras.stepLoop":"Automations set each other off {max} times in a row; this one did not run, so they cannot loop.","extras.stepNotice":"Notice","extras.stepWebhook":"Webhook","extras.stepEmail":"Email","extras.stepNotRun":"Not run","extras.stepNoMatch":"The record does not match the condition","extras.stepDone":"Done","extras.noRecordToUpdate":"No record to update","extras.alreadySet":"Already set","extras.noTable":'No table "{table}"',"extras.noAction":'No action "{action}" is registered',"extras.aRecord":"a record","extras.createdIn":"{name} in {table}","extras.saidValue":"{field}: {value}","extras.saidChecked":"{field}: checked","extras.saidUnchecked":"{field}: unchecked","extras.saidEmpty":"empty","extras.title":"Automations in {table}","extras.listLabel":"Automations","extras.untitled":"Untitled","extras.switchOn":"{name} on","extras.noAutomations":"No automations yet. An automation does something when a record is added, changes or matches a condition.","extras.addAutomation":"+ New automation","extras.describeLabel":"Describe what should happen","extras.describePlaceholder":"For example: every Monday at 8:00, e-mail me the tasks that are not done","extras.describeButton":"Draft it","extras.describing":"Drafting...","extras.describeAgain":"Say a little more about what should happen, then try again.","extras.drafted":"Drafted from your words and switched off. Check each part, then switch it on.","extras.newAutomation":"New automation","extras.newRecordMessage":"New record: {{field}}","extras.nameFallback":"Name","extras.runs":"Runs","extras.clearRuns":"Clear this page's runs","extras.serverRunsFailed":"The server's runs did not load: {message}","extras.statusDone":"Done","extras.statusFailed":"Failed","extras.statusStopped":"Stopped","extras.runOn":"on {record}","extras.runIn":"in {table}","extras.serverTag":"Server","extras.noRuns":"Nothing has run yet. Runs show here with what each action did.","extras.name":"Name","extras.runsIn":"Runs in","extras.runsInBrowser":"This browser","extras.runsInServer":"The server","extras.serverHint":"Your server runs it (createAutomationServer): it hears changes from the database, whoever made them, reads secrets and sends email.","extras.browserHint":"It runs in the browser of the person who makes the change, right away.","extras.when":"When","extras.trigger":"Trigger","extras.triggerCreated":"A record is created","extras.triggerUpdated":"A record changes","extras.triggerMatches":"A record matches a condition","extras.triggerForm":"A form is sent","extras.triggerButton":"A button is pressed","extras.triggerScheduled":"At a scheduled time","extras.watchSome":"Only when one of these fields changes:","extras.watchAny":"Any field. Pick fields to watch only those:","extras.form":"Form","extras.anyForm":"Any form of this table","extras.buttonField":"Button field","extras.addButtonFirst":"Add a Button field to the table first.","extras.schedule":"Schedule","extras.customSchedule":"Custom","extras.cronExpression":"Cron expression","extras.scheduleHint":"Runs while the base is open in a browser. With a condition, it runs once for each record that matches at that time.","extras.condition":"Condition","extras.onlyWhere":"Only for records where","extras.startsToMatch":"Runs when a record starts to match","extras.addMatchCondition":"Add the condition a record has to start matching.","extras.everyRecord":"Every record. Add a condition to narrow it.","extras.do":"Do","extras.action":"Action","extras.doUpdateRecord":"Update the record","extras.doCreateRecord":"Create a record","extras.doHighlight":"Color the record while it matches","extras.moveUp":"Move up","extras.moveDown":"Move down","extras.moveStepUp":"Move step {step} up","extras.moveStepDown":"Move step {step} down","extras.removeStep":"Remove step {step}","extras.stepMoved":"Step {from} is now step {to}.","extras.removeAction":"Remove action","extras.message":"Message","extras.notifyPlaceholder":"{{field}} needs a look","extras.kind":"Kind","extras.severityInfo":"Info","extras.severitySuccess":"Success","extras.severityWarning":"Warning","extras.severityError":"Error","extras.notifyHint":"Name a field in braces for its value: {fields}.","extras.notifyTo":"Also send it to the notifications of:","extras.notifyToField":"The people in {field}","extras.highlightNeedsCondition":"Colors records while they match the condition above; add one.","extras.fill":"Fill","extras.text":"Text","extras.sample":"Sample","extras.wholeRow":"Whole row","extras.in":"In","extras.table":"Table","extras.linkBack":"Link it back","extras.linkField":"Link field","extras.noLink":"No link","extras.through":"through {field}","extras.valueOf":"{field} value","extras.valuePlaceholder":"a value, or {Field}","extras.numberPlaceholder":"0, or 100% for a percent","extras.linkPlaceholder":"a record name, or {record}","extras.userPlaceholder":"a name","extras.doNotSet":"Do not set {field}","extras.remove":"Remove","extras.setField":"Set a field","extras.addSetField":"+ Set a field","extras.runsApp":"Runs {action}, an action the app registered.","extras.method":"Method","extras.url":"URL","extras.headers":"Headers","extras.body":"Body","extras.webhookHintServer":"Empty body: the record as JSON. {secret} is read on the server only.","extras.webhookHintBrowser":"Empty body: the record as JSON. {secret} is read on the server only; set Runs in to The server to use one.","extras.emailNeedsServer":"Email is sent by the server: set Runs in to The server.","extras.to":"To","extras.toPlaceholder":"team@example.com, {Owner email}","extras.subject":"Subject","extras.emailText":"Email text","extras.addAction":"Add an action","extras.addActionOption":"+ Add an action","extras.deleteIt":"Delete it?","extras.delete":"Delete","extras.keep":"Keep","extras.deleteAutomation":"Delete automation","extras.runsOnServer":"Runs on your server when its trigger happens.","extras.tryRecord":"Record to try it on","extras.noRecord":"No record","extras.runNow":"Run now","extras.pickAutomation":"Pick an automation, or add one.","extras.noName":"(no name)","extras.noRecordValue":"(no record)","extras.pageLabel":"Automations of the base","extras.createAutomation":"+ Create automation","extras.runHistory":"Run history","extras.pageEmpty":"No automations yet. An automation does something on its own: when a record is added or changes, a form is sent, a button is pressed or at a time you set.","extras.pickOne":"Pick an automation on the left, or create one.","extras.triggerCard":"Trigger","extras.whenIn":"{when}, in {table}","extras.conditionCard":"Only for records where","extras.conditionEvery":"Every record","extras.conditionCount.one":"{count} condition","extras.conditionCount.other":"{count} conditions","extras.addCondition":"+ Add a condition","extras.actionCard":"Action {n}","extras.insertAction":"Add an action here","extras.addActionPage":"+ Add an action","extras.flowLabel":"What {name} does","extras.summarySet":"Set {fields}","extras.summaryNothing":"No fields set yet","extras.summaryCreate":"A new record in {table}","extras.summaryEmail":"To {to}","extras.summaryNoTo":"No address yet","extras.summaryColor":"While it matches","extras.tableOfTrigger":"Table","extras.tableMoveHint":"Its trigger, condition and fields are for this table: a new table starts them again.","extras.settingsOf":"Settings","extras.testOn":"Test on","extras.test":"Test","extras.testRuns":"Its runs show in the run history.","extras.allRunsOf":"Runs of {name}","extras.allRuns":"All runs","extras.showAllRuns":"Show every automation's runs","extras.whenWebhook":"When a webhook is received","extras.triggerWebhook":"A webhook is received","extras.webhookAddress":"Webhook address","extras.webhookNoUrl":"This automation listens for the token {token}: give it to your server runner (webhookReceived).","extras.webhookHint":"Send a POST with a JSON body to this address. Its values are {webhook.name} in the steps ({webhook.order.id} inside objects). Anyone with the address can start the automation: keep it secret.","extras.newAddress":"Make a new address","extras.copy":"Copy","extras.copied":"Copied","extras.actionChat":"Send a message","extras.actionRepeat":"Find records","extras.actionIf":"If","extras.actionAi":"Ask AI","extras.actionScript":"Run a script","extras.doChat":"Send a Slack, Teams or Google Chat message","extras.doRepeat":"Find records and, for each, do","extras.doIf":"If a condition holds, do","extras.doAi":"Ask AI","extras.doScript":"Run a script","extras.stepChat":"Message","extras.stepIf":"If","extras.stepIfThen":"It matched: the Then steps ran","extras.stepIfElse":"It did not match: the Otherwise steps ran","extras.stepFound":"Find records","extras.foundIn":"{count} in {table}","extras.stepAi":"AI","extras.stepScript":"Script","extras.noAi":"No AI model is set up here.","extras.aiNoPrompt":"The prompt is empty.","extras.scriptFailed":"The script failed.","extras.noField":"No field named {field}.","extras.noRecordId":"No record {id}.","extras.stepKind":"{list}, step {n}","extras.addStep":"+ Add a step","extras.addStepTo":"Add a step to {list}","extras.chatApp":"Chat app","extras.chatUrl":"Webhook address","extras.chatHintSlack":"In Slack: Apps, Incoming Webhooks, Add to a channel; paste the address it gives here.","extras.chatHintTeams":`In Teams: the channel's Workflows, "Post to a channel when a webhook request is received"; paste the address it gives here.`,"extras.chatHintGoogle":"In Google Chat: the space's Apps and integrations, Webhooks, Add webhook; paste the address it gives here.","extras.actionText":"Send a text message","extras.doText":"Send a text message (SMS or Viber)","extras.stepText":"Text message","extras.textNeedsServer":"Text messages are sent by the server: set Runs in to The server.","extras.textBy":"Send by","extras.textSms":"SMS","extras.textViber":"Viber (SMS if not on Viber)","extras.textTo":"To","extras.textToPlaceholder":"+359 88 123 4567, {Phone}","extras.textMessage":"Message","extras.textHint":"Phone numbers with their country code, or a phone field in braces; several apart with commas. The text names fields in braces.","extras.summarySms":"SMS to {to}","extras.summaryViber":"Viber to {to}","extras.summaryNoPhone":"No phone yet","extras.ifHint":"When the record matches this condition the Then steps run, otherwise the Otherwise steps.","extras.ifAlways":"No condition: Then always runs","extras.then":"Then","extras.otherwise":"Otherwise","extras.findIn":"Find in","extras.whichRecords":"Records where","extras.atMost":"At most","extras.forEach":"For each record found","extras.repeatHint":"In these steps {Field} is the found record's field, {trigger.Field} the field of the record that set the automation off, and {found} how many were found.","extras.aiPrompt":"Prompt","extras.aiPlaceholder":"Write a two-line summary of {{field}} for a weekly report.","extras.aiInto":"Put the answer in","extras.aiNowhere":"No field (use {ai} in the next steps)","extras.aiHint":"Name fields in braces. The answer is {ai} in the next steps.","extras.scriptCode":"Script","extras.scriptNeedsBrowser":"A script runs in the browser: set Runs in to The browser.","extras.scriptHint":"JavaScript, as in Airtable: input.config() has the record's fields by name; base.getTable('Name') reads and changes a table (selectRecordsAsync, updateRecordAsync, createRecordAsync, deleteRecordAsync); output.set('name', value) is {script.name} in the next steps; fetch() calls https addresses that allow it. It runs in a sandbox for up to 30 seconds.","extras.scriptInPageHint":"It runs in the page of the person who made the change, with what they may do. A run with no one's page behind it (a schedule, a webhook, a change through the API) stops at this step and says so.","extras.summaryNoText":"Nothing written yet","extras.stepCount.one":"{count} step","extras.stepCount.other":"{count} steps","extras.summaryRepeat":"{steps} for each record in {table}","extras.summaryIf":"Then {then}; otherwise {otherwise}","extras.summaryScript":"{lines} lines"};
|
|
1
|
+
export const EXTRAS_MESSAGES={"extras.whenCreated":"When a record is created","extras.whenCreatedWhere":"When a record is created, where {condition}","extras.whenRecordChanges":"When a record changes","extras.whenRecordChangesWhere":"When a record changes, where {condition}","extras.whenFieldsChange":"When {fields} changes","extras.whenFieldsChangeWhere":"When {fields} changes, where {condition}","extras.fieldsOr":" or ","extras.whenMatches":"When a record matches: {condition}","extras.noConditionYet":"no condition yet","extras.whenForm":"When a form is sent","extras.whenFormWhere":"When a form is sent, where {condition}","extras.whenPressed":"When {field} is pressed","extras.onSchedule":"{cron}","extras.onScheduleWhere":"{cron}, for records where {condition}","extras.cronOther":"On a schedule ({cron})","extras.cronEveryMinute":"Every minute","extras.cronEveryMinutes":"Every {n} minutes","extras.cronHourly":"Every hour, on the hour","extras.cronHourlyAt":"Every hour at {minute} past","extras.cronDaily":"Every day at {time}","extras.cronWeekdays":"Every weekday at {time}","extras.cronWeekly0":"Every Sunday at {time}","extras.cronWeekly1":"Every Monday at {time}","extras.cronWeekly2":"Every Tuesday at {time}","extras.cronWeekly3":"Every Wednesday at {time}","extras.cronWeekly4":"Every Thursday at {time}","extras.cronWeekly5":"Every Friday at {time}","extras.cronWeekly6":"Every Saturday at {time}","extras.cronDays":"Every {days} at {time}","extras.cronDay0":"Sunday","extras.cronDay1":"Monday","extras.cronDay2":"Tuesday","extras.cronDay3":"Wednesday","extras.cronDay4":"Thursday","extras.cronDay5":"Friday","extras.cronDay6":"Saturday","extras.cronMonthly":"Day {day} of every month at {time}","extras.actionUpdateRecord":"Update record","extras.actionCreateRecord":"Create record","extras.actionNotify":"Show a notice","extras.actionHighlight":"Color the record","extras.actionWebhook":"Call a webhook","extras.actionEmail":"Send an email","extras.stepStopped":"Stopped","extras.stepLoop":"Automations set each other off {max} times in a row; this one did not run, so they cannot loop.","extras.stepNotice":"Notice","extras.stepWebhook":"Webhook","extras.stepEmail":"Email","extras.stepNotRun":"Not run","extras.stepNoMatch":"The record does not match the condition","extras.stepDone":"Done","extras.noRecordToUpdate":"No record to update","extras.alreadySet":"Already set","extras.noTable":'No table "{table}"',"extras.noAction":'No action "{action}" is registered',"extras.aRecord":"a record","extras.createdIn":"{name} in {table}","extras.saidValue":"{field}: {value}","extras.saidChecked":"{field}: checked","extras.saidUnchecked":"{field}: unchecked","extras.saidEmpty":"empty","extras.title":"Automations in {table}","extras.listLabel":"Automations","extras.untitled":"Untitled","extras.switchOn":"{name} on","extras.noAutomations":"No automations yet. An automation does something when a record is added, changes or matches a condition.","extras.addAutomation":"+ New automation","extras.describeLabel":"Describe what should happen","extras.describePlaceholder":"For example: every Monday at 8:00, e-mail me the tasks that are not done","extras.describeButton":"Draft it","extras.describing":"Drafting...","extras.describeAgain":"Say a little more about what should happen, then try again.","extras.drafted":"Drafted from your words and switched off. Check each part, then switch it on.","extras.newAutomation":"New automation","extras.newRecordMessage":"New record: {{field}}","extras.nameFallback":"Name","extras.runs":"Runs","extras.clearRuns":"Clear this page's runs","extras.serverRunsFailed":"The server's runs did not load: {message}","extras.statusDone":"Done","extras.statusFailed":"Failed","extras.statusStopped":"Stopped","extras.runOn":"on {record}","extras.runIn":"in {table}","extras.serverTag":"Server","extras.noRuns":"Nothing has run yet. Runs show here with what each action did.","extras.name":"Name","extras.runsIn":"Runs in","extras.runsInBrowser":"This browser","extras.runsInServer":"The server","extras.serverHint":"Your server runs it (createAutomationServer): it hears changes from the database, whoever made them, reads secrets and sends email.","extras.browserHint":"It runs in the browser of the person who makes the change, right away.","extras.when":"When","extras.trigger":"Trigger","extras.triggerCreated":"A record is created","extras.triggerUpdated":"A record changes","extras.triggerMatches":"A record matches a condition","extras.triggerForm":"A form is sent","extras.triggerButton":"A button is pressed","extras.triggerScheduled":"At a scheduled time","extras.watchSome":"Only when one of these fields changes:","extras.watchAny":"Any field. Pick fields to watch only those:","extras.form":"Form","extras.anyForm":"Any form of this table","extras.buttonField":"Button field","extras.addButtonFirst":"Add a Button field to the table first.","extras.schedule":"Schedule","extras.customSchedule":"Custom","extras.cronExpression":"Cron expression","extras.scheduleHint":"Runs while the base is open in a browser. With a condition, it runs once for each record that matches at that time.","extras.condition":"Condition","extras.onlyWhere":"Only for records where","extras.startsToMatch":"Runs when a record starts to match","extras.addMatchCondition":"Add the condition a record has to start matching.","extras.everyRecord":"Every record. Add a condition to narrow it.","extras.do":"Do","extras.action":"Action","extras.doUpdateRecord":"Update the record","extras.doCreateRecord":"Create a record","extras.doHighlight":"Color the record while it matches","extras.moveUp":"Move up","extras.moveDown":"Move down","extras.moveStepUp":"Move step {step} up","extras.moveStepDown":"Move step {step} down","extras.removeStep":"Remove step {step}","extras.stepMoved":"Step {from} is now step {to}.","extras.removeAction":"Remove action","extras.message":"Message","extras.notifyPlaceholder":"{{field}} needs a look","extras.kind":"Kind","extras.severityInfo":"Info","extras.severitySuccess":"Success","extras.severityWarning":"Warning","extras.severityError":"Error","extras.notifyHint":"Name a field in braces for its value: {fields}.","extras.notifyTo":"Also send it to the notifications of:","extras.notifyToField":"The people in {field}","extras.highlightNeedsCondition":"Colors records while they match the condition above; add one.","extras.fill":"Fill","extras.text":"Text","extras.sample":"Sample","extras.wholeRow":"Whole row","extras.in":"In","extras.table":"Table","extras.linkBack":"Link it back","extras.linkField":"Link field","extras.noLink":"No link","extras.through":"through {field}","extras.valueOf":"{field} value","extras.valuePlaceholder":"a value, or {Field}","extras.numberPlaceholder":"0, or 100% for a percent","extras.linkPlaceholder":"a record name, or {record}","extras.userPlaceholder":"a name","extras.doNotSet":"Do not set {field}","extras.remove":"Remove","extras.setField":"Set a field","extras.addSetField":"+ Set a field","extras.runsApp":"Runs {action}, an action the app registered.","extras.method":"Method","extras.url":"URL","extras.headers":"Headers","extras.body":"Body","extras.webhookHintServer":"Empty body: the record as JSON. {secret} is read on the server only.","extras.webhookHintBrowser":"Empty body: the record as JSON. {secret} is read on the server only; set Runs in to The server to use one.","extras.emailNeedsServer":"Email is sent by the server: set Runs in to The server.","extras.to":"To","extras.toPlaceholder":"team@example.com, {Owner email}","extras.subject":"Subject","extras.emailText":"Email text","extras.addAction":"Add an action","extras.addActionOption":"+ Add an action","extras.deleteIt":"Delete it?","extras.delete":"Delete","extras.keep":"Keep","extras.deleteAutomation":"Delete automation","extras.triggerEntersView":"A record enters a view","extras.view":"View","extras.pickView":"Pick a view","extras.aView":"a view","extras.entersViewHint":"Runs once when a record starts to show in this view, through its filter, as the view has it then. It runs again only after the record has left the view.","extras.addViewFilterFirst":"First give a view of this table a filter: this trigger runs when a record starts to show in it.","extras.whenEntersView":"When a record enters {view}","extras.whenEntersViewWhere":"When a record enters {view}, where {condition}","extras.doDeleteRecord":"Delete the record","extras.actionDeleteRecord":"Delete record","extras.deleteRecordHint":"Deletes the record that started the automation (inside Find records, each record found). It goes to the trash, where it can be restored for 30 days.","extras.noRecordToDelete":"No record to delete","extras.deletedRecord":"Deleted {name}","extras.cannotDeleteHere":"This table cannot delete records from an automation.","extras.summaryDelete":"Deletes the record","extras.duplicateAutomation":"Duplicate","extras.copyOf":"{name} copy","extras.duplicated":"Copied. The copy is off until you turn it on.","extras.runsOnServer":"Runs on your server when its trigger happens.","extras.tryRecord":"Record to try it on","extras.noRecord":"No record","extras.runNow":"Run now","extras.pickAutomation":"Pick an automation, or add one.","extras.noName":"(no name)","extras.noRecordValue":"(no record)","extras.pageLabel":"Automations of the base","extras.createAutomation":"+ Create automation","extras.runHistory":"Run history","extras.pageEmpty":"No automations yet. An automation does something on its own: when a record is added or changes, a form is sent, a button is pressed or at a time you set.","extras.pickOne":"Pick an automation on the left, or create one.","extras.triggerCard":"Trigger","extras.whenIn":"{when}, in {table}","extras.conditionCard":"Only for records where","extras.conditionEvery":"Every record","extras.conditionCount.one":"{count} condition","extras.conditionCount.other":"{count} conditions","extras.addCondition":"+ Add a condition","extras.actionCard":"Action {n}","extras.insertAction":"Add an action here","extras.addActionPage":"+ Add an action","extras.flowLabel":"What {name} does","extras.summarySet":"Set {fields}","extras.summaryNothing":"No fields set yet","extras.summaryCreate":"A new record in {table}","extras.summaryEmail":"To {to}","extras.summaryNoTo":"No address yet","extras.summaryColor":"While it matches","extras.tableOfTrigger":"Table","extras.tableMoveHint":"Its trigger, condition and fields are for this table: a new table starts them again.","extras.settingsOf":"Settings","extras.testOn":"Test on","extras.test":"Test","extras.testRuns":"Its runs show in the run history.","extras.allRunsOf":"Runs of {name}","extras.allRuns":"All runs","extras.showAllRuns":"Show every automation's runs","extras.whenWebhook":"When a webhook is received","extras.triggerWebhook":"A webhook is received","extras.webhookAddress":"Webhook address","extras.webhookNoUrl":"This automation listens for the token {token}: give it to your server runner (webhookReceived).","extras.webhookHint":"Send a POST with a JSON body to this address. Its values are {webhook.name} in the steps ({webhook.order.id} inside objects). Anyone with the address can start the automation: keep it secret.","extras.newAddress":"Make a new address","extras.copy":"Copy","extras.copied":"Copied","extras.actionChat":"Send a message","extras.actionRepeat":"Find records","extras.actionIf":"If","extras.actionAi":"Ask AI","extras.actionScript":"Run a script","extras.doChat":"Send a Slack, Teams or Google Chat message","extras.doRepeat":"Find records and, for each, do","extras.doIf":"If a condition holds, do","extras.doAi":"Ask AI","extras.doScript":"Run a script","extras.stepChat":"Message","extras.stepIf":"If","extras.stepIfThen":"It matched: the Then steps ran","extras.stepIfElse":"It did not match: the Otherwise steps ran","extras.stepFound":"Find records","extras.foundIn":"{count} in {table}","extras.stepAi":"AI","extras.stepScript":"Script","extras.noAi":"No AI model is set up here.","extras.aiNoPrompt":"The prompt is empty.","extras.scriptFailed":"The script failed.","extras.noField":"No field named {field}.","extras.noRecordId":"No record {id}.","extras.stepKind":"{list}, step {n}","extras.addStep":"+ Add a step","extras.addStepTo":"Add a step to {list}","extras.chatApp":"Chat app","extras.chatUrl":"Webhook address","extras.chatHintSlack":"In Slack: Apps, Incoming Webhooks, Add to a channel; paste the address it gives here.","extras.chatHintTeams":`In Teams: the channel's Workflows, "Post to a channel when a webhook request is received"; paste the address it gives here.`,"extras.chatHintGoogle":"In Google Chat: the space's Apps and integrations, Webhooks, Add webhook; paste the address it gives here.","extras.actionText":"Send a text message","extras.doText":"Send a text message (SMS or Viber)","extras.stepText":"Text message","extras.textNeedsServer":"Text messages are sent by the server: set Runs in to The server.","extras.textBy":"Send by","extras.textSms":"SMS","extras.textViber":"Viber (SMS if not on Viber)","extras.textTo":"To","extras.textToPlaceholder":"+359 88 123 4567, {Phone}","extras.textMessage":"Message","extras.textHint":"Phone numbers with their country code, or a phone field in braces; several apart with commas. The text names fields in braces.","extras.summarySms":"SMS to {to}","extras.summaryViber":"Viber to {to}","extras.summaryNoPhone":"No phone yet","extras.ifHint":"When the record matches this condition the Then steps run, otherwise the Otherwise steps.","extras.ifAlways":"No condition: Then always runs","extras.then":"Then","extras.otherwise":"Otherwise","extras.findIn":"Find in","extras.whichRecords":"Records where","extras.atMost":"At most","extras.forEach":"For each record found","extras.repeatHint":"In these steps {Field} is the found record's field, {trigger.Field} the field of the record that set the automation off, and {found} how many were found.","extras.aiPrompt":"Prompt","extras.aiPlaceholder":"Write a two-line summary of {{field}} for a weekly report.","extras.aiInto":"Put the answer in","extras.aiNowhere":"No field (use {ai} in the next steps)","extras.aiHint":"Name fields in braces. The answer is {ai} in the next steps.","extras.scriptCode":"Script","extras.scriptNeedsBrowser":"A script runs in the browser: set Runs in to The browser.","extras.scriptHint":"JavaScript, as in Airtable: input.config() has the record's fields by name; base.getTable('Name') reads and changes a table (selectRecordsAsync, updateRecordAsync, createRecordAsync, deleteRecordAsync); output.set('name', value) is {script.name} in the next steps; fetch() calls https addresses that allow it. It runs in a sandbox for up to 30 seconds.","extras.scriptInPageHint":"It runs in the page of the person who made the change, with what they may do. A run with no one's page behind it (a schedule, a webhook, a change through the API) stops at this step and says so.","extras.summaryNoText":"Nothing written yet","extras.stepCount.one":"{count} step","extras.stepCount.other":"{count} steps","extras.summaryRepeat":"{steps} for each record in {table}","extras.summaryIf":"Then {then}; otherwise {otherwise}","extras.summaryScript":"{lines} lines"};
|
|
@@ -422,6 +422,7 @@ export declare const SHELL_MESSAGES: {
|
|
|
422
422
|
readonly 'shell.usesDates': "places its records by it, and shows as a plain grid without it";
|
|
423
423
|
readonly 'shell.usesBars': "draws its bars with it";
|
|
424
424
|
readonly 'shell.usesCover': "shows it as the card cover";
|
|
425
|
+
readonly 'shell.usesBoard': "shows it on its cards";
|
|
425
426
|
readonly 'shell.usesChart': "charts it";
|
|
426
427
|
readonly 'shell.usesFilter': "filters by it";
|
|
427
428
|
readonly 'shell.usesSort': "sorts by it";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SHELL_MESSAGES={"shell.records.one":"{count} record","shell.records.other":"{count} records","shell.tables.one":"{count} table","shell.tables.other":"{count} tables","shell.items.one":"{count} item","shell.items.other":"{count} items","shell.loadingRecords":"Loading records…","shell.deleteTableOnServer":"It leaves this base. Its records stay in the database.","shell.converting":"Converting {done} of {total} records…","shell.writingOptions":"Updating {done} records…","shell.convertTitle":"Convert the stored values?","shell.convertBody":"{name} holds {count} records in the database. Convert their values to the new type, or change the field only and leave them as they are?","shell.convertValues":"Convert the values","shell.convertKeep":"Change the field only","shell.exporting":"Exporting {done} of {total} records…","shell.copying":"Copying {done} of {total} records…","shell.reading":"Reading {done} of {total} records…","shell.saving":"Saving…","shell.allSaved":"All changes saved","shell.notSaved":"Not saved: {message}","shell.savingSlow":"Still saving: the server has not answered yet","shell.tryAgain":"Try again","shell.dismissStatus":"Dismiss","shell.failSave":"Could not save {field} of {record}. {reason}","shell.failSaveTyped":"Could not save {field} of {record}. {reason} You entered: {value}","shell.failSaveRecord":"Could not save {record}. {reason}","shell.failAdd":"Could not add {record}. {reason}","shell.failAddMany":"Could not add {records}. {reason}","shell.failDelete":"Could not delete {record}. {reason} It is still in the table.","shell.failDeleteMany":"Could not delete {records}. {reason} They are still in the table.","shell.failPurge":"Could not delete {record} forever. {reason} It is still in the trash.","shell.failPurgeMany":"Could not delete {records} forever. {reason} They are still in the trash.","shell.undoLeftAway":"{records} left out: someone deleted them. If they are restored, they keep the edit.","shell.failLinkGone":"The record {record} linked to was deleted forever, so this link cannot come back.","shell.linkToTrash":"The record you linked to is in the trash. The link stays empty until someone restores it.","shell.failPurgeHalf":"Could not delete {record} forever. {reason} It stopped half way, so its links may be gone and it cannot be restored. Press Delete forever again to finish.","shell.failPurgeHalfMany":"Could not delete {records} forever. {reason} It stopped half way, so their links may be gone and they cannot be restored. Press Delete forever again to finish.","shell.purgeUnderWay":"{record} cannot be restored: someone has started to delete it forever. If it stays in the trash, that delete did not finish, and Delete forever will finish it.","shell.purgeUnderWayMany":"{records} cannot be restored: someone has started to delete them forever. If they stay in the trash, that delete did not finish, and Delete forever will finish it.","shell.cannotRestorePurging":"A delete forever of this record did not finish. Its links may be gone, so it cannot be restored. Delete it forever to finish.","shell.purgeCameBack":"{record} was not deleted: someone restored it first.","shell.purgeCameBackMany":"{records} were not deleted: someone restored them first.","shell.undoPurged":"{record} was deleted forever, so it cannot come back.","shell.undoPurgedMany":"{records} were deleted forever, so they cannot come back.","shell.failRestore":"Could not put {record} back. {reason} It is still in the trash.","shell.failRestoreMany":"Could not put {records} back. {reason} They are still in the trash.","shell.failMany":"{count} changes could not be saved. {reason}","shell.why.offline":"The server could not be reached.","shell.why.noAnswer":"The server did not answer, so it may not have been stored.","shell.why.required":"This field needs a value.","shell.why.duplicate":"Another record already has this value.","shell.why.notAccepted":"The database does not accept this value.","shell.why.idTooLong":"Record ids need {need} characters; this table's id column holds {holds}. Ask whoever runs the database to make it wider.","shell.why.linked":"Other records depend on it.","shell.why.linkedCircle":"These records link to each other in a circle, and this database checks each link as it deletes, so they were not deleted. Empty the link of one of them first.","shell.why.linkRefused":"The linked record is not there, or you may not link to it. Pick another.","shell.why.noPermission":"You do not have permission to do this.","shell.why.gone":"This record no longer exists.","shell.why.notDeleted":"The database kept it, so you may not have permission.","shell.why.noRead":"The server did not answer.","shell.why.readError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.linkMissing":"The record it points to is not there.","shell.why.linkMissingField":"The record {field} points to is not there.","shell.why.linkMissingFields":"The record that {fields} point to is not there.","shell.why.serverError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.unknown":"No reason came with the error that this page may show. Whoever runs the database can see it in its log.","shell.why.said":"The server said: {said}","shell.why.readSaid":"The server answered with an error: {said}","shell.couldNotLoad":"Could not load {table}: {message}","shell.loadFailedTitle":"Could not load {table}","shell.loadTryAgain":"Try again","shell.loadTrying":"Trying again…","shell.couldNotSave":"Could not save {table}: {message}","shell.trashSaveFailed":"Could not save the trash: {message}","shell.trashReadFailed":"Could not read the trash: {message}","shell.deleted":"Deleted {what}","shell.restored":"Restored {what}","shell.theField":"the field {name}","shell.theTable":"the table {name}","shell.theView":"the view {name}","shell.stepDeleteView":"delete view {name}","shell.aField":"a field","shell.importedNewTable":"Imported {records} into a new table, {name}","shell.importedInto":"Imported {records} into {table}","shell.importedIntoFallback":"the table","shell.stepCellEdit":"cell edit","shell.stepCells.one":"{count} cell","shell.stepCells.other":"{count} cells","shell.stepResize":"resize","shell.stepMoveField":"move field","shell.stepAddRecord":"add record","shell.stepMoveRecord":"move record","shell.undoRecordStays":"Someone has changed this record since, so it stays. Delete it if it should go.","shell.undoCellStays.one":"Someone has changed this cell since, so it keeps their value.","shell.undoCellStays.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoCellsKept.one":"Someone has changed 1 of these cells since, so it keeps their value.","shell.undoCellsKept.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoRecordsKept.one":"Someone has changed 1 of these records since, so it keeps their value.","shell.undoRecordsKept.other":"Someone has changed {count} of these records since, so they keep their values.","shell.undoCannotCheck":"The database could not be reached to check this cell, so nothing was changed. Try again in a moment.","shell.undoStillSaving":"This record is still saving, so nothing was changed. Try again once it has saved.","shell.undoRunning":"Undo is still running.","shell.redoRunning":"Redo is still running.","shell.undoStopped":"Undo stopped: {done} of {total} records were put back. Undo again to put back the rest.","shell.redoStopped":"Redo stopped: {done} of {total} records were changed again. Redo again to do the rest.","shell.undoCellsStopped":"Undo stopped: {done} of {total} cells were put back. Undo again to put back the rest.","shell.redoCellsStopped":"Redo stopped: {done} of {total} cells were changed again. Redo again to do the rest.","shell.undoAddStopped":"Undo stopped: {done} of {total} new records were taken out. Undo again to take out the rest.","shell.redoAddStopped":"Redo stopped: {done} of {total} records were added again. Redo again to add the rest.","shell.redoDeleteStopped":"Redo stopped: {done} of {total} records were deleted again. The rest stay, and Undo brings back those it deleted.","shell.undoRecordGone":"This record has been deleted, so nothing was changed.","shell.retryChanged.one":"This cell has changed since, so it keeps its new value.","shell.retryChanged.other":"{count} cells have changed since, so they keep their new values.","shell.retryGone.one":"The record has been deleted, so this was not saved.","shell.retryGone.other":"{count} records have been deleted, so these were not saved.","shell.retryGoneTyped":'The record has been deleted, so "{value}" was not saved.',"shell.retryUnread":"The record could not be read to check it, so nothing was saved.","shell.deleteCannotRead":"The database could not be read, so these records were not deleted. Try again in a moment.","shell.pasteLeftOut.one":'"{text}" does not fit {field}, so that cell keeps its value.',"shell.pasteLeftOut.other":"{count} values do not fit their fields, so those cells keep their values.","shell.pasteLoading":"The view is still loading, so nothing was pasted. Paste again when the rows are shown.","shell.formulaInField":"In a base, a formula is a field of its own: it works out a value for every record at once.","shell.formulaMakeField":"Make a formula field","shell.formulaIsSummary":"The summary bar under the table works this out for {field}, and keeps it up to date as records change.","shell.formulaShowSummary":"Show it for {field}","shell.sumShown":"The sum of {field} is in the summary bar under the table. It keeps up as records change.","shell.sumNotNumbers":"{field} does not hold numbers, so there is nothing to add up. Select a number field and press Alt+= again.","shell.sumNoBar":"A base adds up a field in the summary bar under the table, and this view does not show one.","shell.totalRecord":"No total record needed: the summary bar under the table adds up each number field, and keeps up as records change.","shell.totalShowSums":"Show the sums","shell.formatInBase":"A base keeps no bold or colors typed into cells, so every screen reads the same data. Color rows or cells by what they hold with Color in the toolbar.","shell.formatOpenColor":"Open Color","shell.pasteNoField.one":"One column of the paste had no field to go in, so it was left out.","shell.pasteNoField.other":"{count} columns of the paste had no field to go in, so they were left out.","shell.pasteNamesLeftOut":"The first line holds the names of the fields, so it is not pasted as a record.","shell.pasteFieldsTitle.one":"Add a field for this paste?","shell.pasteFieldsTitle.other":"Add {count} fields for this paste?","shell.pasteFieldsBody.one":"The paste has one more column than the table has from here. Add a field for it:","shell.pasteFieldsBody.other":"The paste has {count} more columns than the table has from here. Add a field for each:","shell.pasteFirstLineNames":"The first line holds the names of the fields","shell.pasteWithout":"Paste without them","shell.pasteAddFields.one":"Add the field and paste","shell.pasteAddFields.other":"Add {count} fields and paste","shell.pasteNewTitle":"New records","shell.pasteNewAsk":"This paste runs past the last record. Add {records}?","shell.pasteNewConfirm":"Add records","shell.pasteNewPart":"{done} of {total} new records were added.","shell.rangeLoading":"The view is still loading, so nothing was changed. Try again when the rows are shown.","shell.rangeMovedPaste":'Records moved while this was read. Nothing was changed. Try again pastes from "{name}" down over the rows as they are now.',"shell.rangeMovedValue":'Records moved while this was read. Nothing was changed. Try again puts the value in from "{name}" down over the rows as they are now.',"shell.rangeMovedClear":'Records moved while this was read. Nothing was changed. Try again clears from "{name}" down over the rows as they are now.',"shell.rangeMovedFill":'Records moved while this was read. Nothing was changed. Try again fills from "{name}" down over the rows as they are now.',"shell.rangeMovedSelect":"Records moved while this was read. Nothing was changed. Select the cells again.","shell.rangeAnchorGone":'"{name}" is no longer among the rows shown, so nothing was changed. Select the cells again.',"shell.rangeAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.rangeAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.copyAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.copyAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.rangeAgainCovers":'From "{name}" down over {count} rows, selected in the view.',"shell.rangeElsewhere":"That view is no longer open, so nothing was changed.","shell.rangeViewChanged":"The view has changed since, so nothing was changed.","shell.copyElsewhere":"That view is no longer open, so nothing was copied.","shell.copyViewChanged":"The view has changed since, so nothing was copied.","shell.rangeDraftsLeft.one":"1 new record is not stored yet, so it was left out. Change it on its own row.","shell.rangeDraftsLeft.other":"{count} new records are not stored yet, so they were left out. Change them on their own rows.","shell.rangeMoveRefused":"A move can only use rows that are on screen, and {records} of this one are not loaded, so nothing moved. Copy and paste reach them.","shell.copyTitle":"Copy","shell.copyReading":"Reading the selection: {done} rows so far","shell.copyTooBig":"This selection is {cells} cells, more than the {limit} a copy can hold, so nothing was copied. Download this view instead: it holds every record.","shell.copyMovedFrom":'Records moved while this was read. Nothing was copied. Try again copies from "{name}" down over the rows as they are now.',"shell.copyMovedSelect":"Records moved while this was read. Nothing was copied. Select the cells again.","shell.copyAnchorGone":'"{name}" is no longer among the rows shown, so nothing was copied. Select the cells again.',"shell.copyFailed":"Could not read the selection, so nothing was copied: {message}","shell.copyDone":"Copied {count} rows","shell.copyReady":"{count} rows are ready. The browser needs one more click to put them on the clipboard.","shell.copyButton":"Copy","shell.copyRefused":"The browser would not put this much on the clipboard. Download this view instead.","shell.cutRefused":"The browser would not put the cells on the clipboard, so nothing was cut.","shell.cutMoved":"The selection changed before the cells reached the clipboard, so nothing was cleared.","shell.stepPasteRecords":"paste {records}","shell.stepBulkEdit":"edit {records}","shell.bulkReading":"Reading the selection: {done} records so far","shell.bulkFailed":"Could not read the selection, so nothing was changed: {message}","shell.bulkTitle":"Edit records","shell.bulkAsk":"Change {count}?","shell.bulkRuns":"Also run automations: up to {count} runs","shell.bulkRunsTime":"They run one at a time in this tab after the save: about {time} at {rate} a second. Runs left when the tab closes do not happen.","shell.bulkRunsTab":"They run one at a time in this tab after the save. Runs left when the tab closes do not happen.","shell.runsLine":"Running automations: {done} of {total}","shell.runsLineLeft":"Running automations: {done} of {total}, about {time} left","shell.runsStop":"Stop","shell.runsDone":"Automations ran on {total} changes.","shell.runsStopped":"Stopped: {done} of {total} automation runs are done. The other {left} will not run.","shell.timeSeconds":"less than a minute","shell.timeMinutes.one":"1 minute","shell.timeMinutes.other":"{count} minutes","shell.timeHours.one":"1 hour","shell.timeHours.other":"{count} hours","shell.bulkAskNoUndo":"That is too many to undo: once changed, they cannot be changed back from here.","shell.bulkConfirm":"Change records","shell.bulkWriting":"Saving {done} of {total} records...","shell.cellsWriting":"Saving {done} of {total} cells...","shell.bulkDone":"Changed {done} of {total} records","shell.bulkStopped":"Stopped: {done} of {total} records were changed.","shell.bulkFailedPart":"{done} of {total} records were changed, then the save stopped. {reason}","shell.bulkFailedUnsure":"At least {done} of {total} records were changed, then the save stopped and the database could not be read to check the last block. {reason}","shell.bulkUndoLeft":"Undo takes these back.","shell.bulkNoUndoLeft":"That is too many to undo.","shell.failSaveMany":"Could not save {records}. {reason}","shell.stepDeleteRecords":"delete {records}","shell.addColumnFailed":"The column for {field} was not added: {error}","shell.addColumnYourself":"{field} needs a column in {table} before it can store values. Add it to the database: {sql}","shell.duplicateNeedsColumn":"A copy of {field} needs a column of its own in {table}, and the base cannot add one there, so nothing was copied. Add the column to the database first: {sql}","shell.deleting":"Deleting {done} of {total} records...","shell.deleteNoTrash":"That is too many for the trash: they cannot be restored.","shell.scanDrift":"Records changed while this view was being read, so its count may be out by a few.","shell.noSqlSort":"This database cannot work out {fields}, so the view does not sort or total on it.","shell.noSqlView":"This database cannot work out {fields}, so the view cannot filter or group on it. Take it out of the filter or the grouping.","shell.deleteGroupShort":"The group {key} read back {read} records of {size}, so what was left out of the selection cannot be told apart. Nothing was deleted.","shell.deleteGroupUnknown":"How many records the group {key} holds is not known here, so what was left out of the selection cannot be told apart. Nothing was deleted. Tick what should go instead.","shell.deleteTitle":"Delete records","shell.deleteReading":"Finding the records to delete: {done} read...","shell.deleteAsk":"Delete {count}?","shell.deleteAskTrash":"They go to the trash, and undo brings them back.","shell.deleteNothing":"None of the selected records are there any more.","shell.deleteStop":"Stop","shell.deleteCancel":"Cancel","shell.deleteConfirm":"Delete","shell.deleteDone":"Deleted {done} of {total} records","shell.deleteFailed":"Could not read the selection, so nothing was deleted: {message}","shell.columnExists":"The column {column} already exists in {table}, so {field} was stored as {name}.","shell.stepAddField":"add field {name}","shell.stepChangeField":"change field {name}","shell.stepDeleteField":"delete field {name}","shell.stepAddTable":"add table {name}","shell.stepRenameTable":"rename table to {name}","shell.stepDuplicateTable":"duplicate table {name}","shell.stepDeleteTable":"delete table {name}","shell.stepRestore":"restore from the trash","shell.stepImportTable":"import {name}","shell.stepImportRecords":"import {records}","shell.tablesLabel":"Tables","shell.tableName":"Table name","shell.tableActions":"Table actions","shell.tableOptions":"{name} table options","shell.renameTable":"Rename table","shell.duplicateTable":"Duplicate table","shell.importRecordsFromFile":"Import records from a file","shell.keepOneTable":"A base keeps at least one table","shell.deleteTable":"Delete table","shell.allTables":"All tables","shell.importAsTable":"Import a file as a table","shell.importAsTableTitle":"A CSV, TSV, Excel or JSON file as a new table, with a field type for each column","shell.downloadCsv":"Download this view as CSV","shell.downloadExcel":"Download this view as Excel","shell.downloadViewTitle":"The records and fields this view shows, as they read on screen","shell.exportNothing":"This view has no records to download.","shell.excelNeedsZip":"This app cannot write Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip.","shell.exportFailed":"Could not make the file. Try again.","shell.downloadSql":"Download as SQL","shell.downloadFiles":"Download the files (ZIP)","shell.downloadFilesTitle":"Every file this view shows, in a folder for each group, or for each record","shell.exportNoFiles":"This view shows no files.","shell.downloadSqlTitle":"The tables, links, records, views and automations, ready for Postgres or Supabase","shell.addTable":"Add table","shell.addTableWays":"More ways to add a table","shell.blankTable":"Blank table","shell.viewOnly":"View only","shell.viewOnlyTitle":"You can look at these tables but not change them","shell.undo":"Undo","shell.undoStep":"Undo {step}","shell.undoStepTitle":"Undo {step} (Ctrl+Z)","shell.nothingToUndo":"Nothing to undo","shell.redo":"Redo","shell.redoStep":"Redo {step}","shell.redoStepTitle":"Redo {step} (Ctrl+Shift+Z)","shell.nothingToRedo":"Nothing to redo","shell.trashButton":"Trash, {items}","shell.trashTitle":"Deleted records, fields and tables","shell.deleteNamed":"Delete {name}?","shell.deleteTableRecords.one":"Its {count} record goes with it, and so do its views.","shell.deleteTableRecords.other":"Its {count} records go with it, and so do its views.","shell.deleteTableLinks":"These fields of other tables link to it, or read a link to it, and are deleted too:","shell.readsLink":"{table}: {field} (reads {link})","shell.cancel":"Cancel","shell.searchAllTables":"Search all tables","shell.searchResults":"Search results","shell.searchRecords":"Records","shell.searchMore":"{count} more in {table}","shell.searchNone":"No records match.","shell.searchFoot":"{records} in {tables}","shell.trash":"Trash","shell.trashShow":"Show","shell.trashAll":"All","shell.trashRecords":"Records","shell.trashFields":"Fields","shell.trashTables":"Tables","shell.trashViews":"Views","shell.findInTrash":"Find in trash","shell.trashEmpty":"The trash is empty. Deleted records, fields and tables come here.","shell.trashEmptyDays":"The trash is empty. Deleted records, fields and tables come here and stay {days} days.","shell.trashNoMatch":"Nothing in the trash matches.","shell.trashItems":"Deleted items","shell.kindRecord":"Record","shell.kindView":"View","shell.kindField":"Field","shell.kindTable":"Table","shell.trashIn":"{kind} in {table}","shell.trashTableRecords.one":"{kind}, {count} record","shell.trashTableRecords.other":"{kind}, {count} records","shell.trashDeletedTable":"{name} (deleted)","shell.trashADeletedTable":"a deleted table","shell.trashBy":"by","shell.agoNow":"just now","shell.agoMinutes":"{n} min ago","shell.agoHours":"{n} h ago","shell.agoYesterday":"yesterday","shell.agoDays":"{n} days ago","shell.restore":"Restore","shell.restoreItem":"Restore {name}","shell.restoreAll":"Restore all","shell.restoreThese":"Restore these","shell.deleteForever":"Delete forever","shell.deleteItemForever":"Delete {name} forever","shell.deleteCountForever":"Delete {count} forever","shell.keepThem":"Keep them","shell.keepIt":"Keep it","shell.deleteAskForever":"Delete this forever? It cannot be undone.","shell.emptyTrash":"Empty trash","shell.trashNoteDays":"Items are deleted for good after {days} days.","shell.trashNoteKeep":"Items stay until the trash is emptied.","shell.trashNotePage":"Items stay until this page is closed or reloaded.","shell.trashNoteMarked":"Records stay in their table until they are deleted forever. Fields, views and tables stay until this page is closed or reloaded.","shell.trashClosed":"Deleted records are listed for people who may delete. Ask whoever runs this base if you need one back.","shell.trashEmptyMarked":"The trash is empty. Deleted records stay in their table and come here. Deleted fields, views and tables stay until this page is closed or reloaded.","shell.trashMore":"Showing the latest {shown} of {total} deleted records.","shell.trashEmptyPage":"The trash is empty. Deleted records, fields and tables come here and stay until this page is closed or reloaded.","shell.unnamedRecord":"Untitled record","shell.fieldFallback":"Field","shell.cannotRestoreTable":"A table with its id is in the base","shell.cannotRestoreNoTable":"Its table was deleted: restore the table first","shell.cannotRestoreRecord":"The record is in its table","shell.cannotRestoreField":"A field with its id is in the table","shell.importNewTitle":"Import a file as a new table","shell.importIntoTitle":"Import records into {table}","shell.thisTable":"this table","shell.importChoose":"Choose a CSV or Excel file","shell.importReading":"Reading the file…","shell.importDrop":"Drop a file here, or click to choose one","shell.importFormats":"CSV, TSV, Excel (.xlsx) or JSON. The first row names the columns.","shell.importNoRecords":"The file has a header row and no records.","shell.importBinary":"This file is not text. Choose a CSV, TSV, Excel (.xlsx) or JSON file.","shell.importNeedsZip":"This app cannot read Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip, or import the file as CSV.","shell.importBadExcel":"This file could not be read as an Excel workbook. Open it in Excel and save it again as .xlsx.","shell.importBadJson":'This file could not be read as JSON. It needs to be a list of records: [{ "name": "Ana" }, ...].',"shell.importSeparator":"Separator","shell.importEncoding":"Encoding","shell.importComma":"Comma","shell.importSemicolon":"Semicolon","shell.importTab":"Tab","shell.importPipe":"Pipe","shell.importWarnEncoding":"This file is not UTF-8, so it was read as {encoding}. If letters look wrong, choose another encoding above.","shell.importWarnUnclosed.one":"A quote on line {line} is never closed. It was kept as text, and the rows after it were read as usual. Check that row after the import.","shell.importWarnUnclosed.other":"{count} quotes are never closed, the first on line {line}. They were kept as text, and the rows after them were read as usual. Check those rows after the import.","shell.importWarnStray.one":"A quote on line {line} is in an unusual place and was kept as text. Check that row after the import.","shell.importWarnStray.other":"{count} lines have a quote in an unusual place, the first on line {line}. They were kept as text. Check those rows after the import.","shell.importWarnLong.one":"The row on line {line} has more cells than the header row. The extra cells are in columns of their own below.","shell.importWarnLong.other":"{count} rows have more cells than the header row, the first on line {line}. The extra cells are in columns of their own below.","shell.importWarnShort.one":"The row on line {line} has fewer cells than the header row. Its missing cells stay empty.","shell.importWarnShort.other":"{count} rows have fewer cells than the header row, the first on line {line}. Their missing cells stay empty.","shell.importWarnLost.one":"1 value does not fit the field it goes to and would be left empty. Change that field type or skip the column to keep it.","shell.importWarnLost.other":"{count} values do not fit the fields they go to and would be left empty. Change those field types or skip the columns to keep them.","shell.importWarnUnmatched.one":"1 cell names a person or a record that was not found, so that name is not imported.","shell.importWarnUnmatched.other":"{count} cells name a person or a record that was not found, so those names are not imported.","shell.importWarnRepeated.one":"1 record has the same name as a record already in this table. Importing adds it as a second record.","shell.importWarnRepeated.other":"{count} records have the same name as records already in this table. Importing adds them as second records.","shell.importSummary.one":"{file}: {count} record, {columns} columns","shell.importSummary.other":"{file}: {count} records, {columns} columns","shell.importAnother":"Choose another file","shell.importInto":"Import into","shell.importModeNew":"A new table","shell.importModeAppend":"Add records to {table}","shell.theShownTable":"the shown table","shell.importColumn":"Column","shell.importFieldType":"Field type","shell.importFirstValues":"First values","shell.importFileColumn":"Column in the file","shell.importGoesTo":"Goes to field","shell.importNamesRecords":"names the records","shell.importFieldTypeOf":"Field type of {name}","shell.importFieldFor":"Field for {name}","shell.importSkip":"Skip this column","shell.importNoMapping":"No column goes to a field yet.","shell.importButton.one":"Import {count} record","shell.importButton.other":"Import {count} records","shell.importFieldName":"Field {n}","shell.importedName":"Imported","shell.importedRecordName":"Imported {n}","shell.deleteRecordTitle":"Delete record?","shell.deleteRecordNamed":"{name} is deleted, and its links from other records go with it.","shell.deleteRecordUnnamed":"This record is deleted, and its links from other records go with it.","shell.deleteRecord":"Delete record","shell.fieldLinksTo":"{name} links to {table}.","shell.anotherTable":"another table","shell.fieldLinkBack":"The field there that links back, {name}, is deleted with it.","shell.fieldLinksGo":"The links between the records go too.","shell.fieldReaders":"These fields read it and are deleted too: {fields}.","shell.fieldDeleted":"{name} and its values are deleted.","shell.fieldFormulas":"These formulas read it and will show #ERROR: {fields}.","shell.deleteField":"Delete field","shell.fieldUses":"Used by:","shell.usesView":"{name}: {uses}","shell.usesAutomation":"Automation {name}: it no longer reads or writes this field","shell.usesStack":"stacks its cards by it, and shows as a plain grid without it","shell.usesDates":"places its records by it, and shows as a plain grid without it","shell.usesBars":"draws its bars with it","shell.usesCover":"shows it as the card cover","shell.usesChart":"charts it","shell.usesFilter":"filters by it","shell.usesSort":"sorts by it","shell.usesGroup":"groups by it","shell.usesColor":"colors records by it","shell.usesForm":"asks for it","shell.usesList":"lists it","shell.usesTile":"a tile reads it","shell.cellChanged":"{field} changed to {value}","shell.cellCleared":"{field} cleared","shell.cellsChanged.one":"{count} cell changed","shell.cellsChanged.other":"{count} cells changed","shell.undoneStep":"Undone: {step}","shell.redoneStep":"Redone: {step}","shell.summarize":"Summarize","shell.summarizeField":"Summarize {field}","shell.summaryChange":"{summary} {value}, change summary","shell.summaryCount.one":"{count} record, summarize {field}","shell.summaryCount.other":"{count} records, summarize {field}","shell.recordsWord.one":"record","shell.recordsWord.other":"records","shell.summaryMenu":"Summary","shell.summary.none":"None","shell.summary.empty":"Empty","shell.summary.filled":"Filled","shell.summary.unique":"Unique","shell.summary.percentEmpty":"Percent empty","shell.summary.percentFilled":"Percent filled","shell.summary.sum":"Sum","shell.summary.avg":"Average","shell.summary.median":"Median","shell.summary.min":"Min","shell.summary.max":"Max","shell.summary.range":"Range","shell.summary.checked":"Checked","shell.summary.unchecked":"Unchecked","shell.summary.percentChecked":"Percent checked","shell.summary.earliest":"Earliest date","shell.summary.latest":"Latest date","shell.summary.dateRange":"Date range (days)","shell.searchKey":"Ctrl K","shell.tabHint":"Tab moves between cells. Press Esc, then Tab, to leave the grid.","shell.menuExpand":"Expand record","shell.menuSelect":"Select record","shell.menuDeselect":"Deselect record","shell.recordActions":"Actions for row {row}","shell.menuComment":"Comment","shell.menuInsertAbove":"Insert record above","shell.menuInsertBelow":"Insert record below","shell.menuAddSubtask":"Add subtask","shell.subtasks":"Subtasks","shell.treeNoLoop":"A record cannot go under itself or one of its own subtasks.","shell.treeMovedUnder":"{name} is now under {parent}","shell.treeMovedTop":"{name} is now at the top level","shell.menuDuplicate":"Duplicate record","shell.addField":"Add a field","shell.addRow":"Add row","shell.addRecord":"Add record","shell.groupEmpty":"Empty","shell.groupAdd":"Add a record to this group","shell.groupAddTo":"Add a record to {field} {value}","shell.groupColumn":"Group","shell.someoneElse":"Someone else","shell.unseenAdded":"{who} added this record {ago}","shell.unseenChanged":"{who} changed this record {ago}","shell.selectRow":"Select row {row}","shell.selectAllRows":"Select all rows","shell.expandRow":"Expand row","shell.expandRowN":"Expand row {row}","shell.comments.one":"{count} comment","shell.comments.other":"{count} comments","shell.commentsOnRow.one":"{count} comment on row {row}","shell.commentsOnRow.other":"{count} comments on row {row}","shell.changedBy":"{count} changed by {who}","shell.changedBySomeone":"someone else","shell.changedByOthers":"others","shell.dashboardRecords":"Records"};
|
|
1
|
+
export const SHELL_MESSAGES={"shell.records.one":"{count} record","shell.records.other":"{count} records","shell.tables.one":"{count} table","shell.tables.other":"{count} tables","shell.items.one":"{count} item","shell.items.other":"{count} items","shell.loadingRecords":"Loading records…","shell.deleteTableOnServer":"It leaves this base. Its records stay in the database.","shell.converting":"Converting {done} of {total} records…","shell.writingOptions":"Updating {done} records…","shell.convertTitle":"Convert the stored values?","shell.convertBody":"{name} holds {count} records in the database. Convert their values to the new type, or change the field only and leave them as they are?","shell.convertValues":"Convert the values","shell.convertKeep":"Change the field only","shell.exporting":"Exporting {done} of {total} records…","shell.copying":"Copying {done} of {total} records…","shell.reading":"Reading {done} of {total} records…","shell.saving":"Saving…","shell.allSaved":"All changes saved","shell.notSaved":"Not saved: {message}","shell.savingSlow":"Still saving: the server has not answered yet","shell.tryAgain":"Try again","shell.dismissStatus":"Dismiss","shell.failSave":"Could not save {field} of {record}. {reason}","shell.failSaveTyped":"Could not save {field} of {record}. {reason} You entered: {value}","shell.failSaveRecord":"Could not save {record}. {reason}","shell.failAdd":"Could not add {record}. {reason}","shell.failAddMany":"Could not add {records}. {reason}","shell.failDelete":"Could not delete {record}. {reason} It is still in the table.","shell.failDeleteMany":"Could not delete {records}. {reason} They are still in the table.","shell.failPurge":"Could not delete {record} forever. {reason} It is still in the trash.","shell.failPurgeMany":"Could not delete {records} forever. {reason} They are still in the trash.","shell.undoLeftAway":"{records} left out: someone deleted them. If they are restored, they keep the edit.","shell.failLinkGone":"The record {record} linked to was deleted forever, so this link cannot come back.","shell.linkToTrash":"The record you linked to is in the trash. The link stays empty until someone restores it.","shell.failPurgeHalf":"Could not delete {record} forever. {reason} It stopped half way, so its links may be gone and it cannot be restored. Press Delete forever again to finish.","shell.failPurgeHalfMany":"Could not delete {records} forever. {reason} It stopped half way, so their links may be gone and they cannot be restored. Press Delete forever again to finish.","shell.purgeUnderWay":"{record} cannot be restored: someone has started to delete it forever. If it stays in the trash, that delete did not finish, and Delete forever will finish it.","shell.purgeUnderWayMany":"{records} cannot be restored: someone has started to delete them forever. If they stay in the trash, that delete did not finish, and Delete forever will finish it.","shell.cannotRestorePurging":"A delete forever of this record did not finish. Its links may be gone, so it cannot be restored. Delete it forever to finish.","shell.purgeCameBack":"{record} was not deleted: someone restored it first.","shell.purgeCameBackMany":"{records} were not deleted: someone restored them first.","shell.undoPurged":"{record} was deleted forever, so it cannot come back.","shell.undoPurgedMany":"{records} were deleted forever, so they cannot come back.","shell.failRestore":"Could not put {record} back. {reason} It is still in the trash.","shell.failRestoreMany":"Could not put {records} back. {reason} They are still in the trash.","shell.failMany":"{count} changes could not be saved. {reason}","shell.why.offline":"The server could not be reached.","shell.why.noAnswer":"The server did not answer, so it may not have been stored.","shell.why.required":"This field needs a value.","shell.why.duplicate":"Another record already has this value.","shell.why.notAccepted":"The database does not accept this value.","shell.why.idTooLong":"Record ids need {need} characters; this table's id column holds {holds}. Ask whoever runs the database to make it wider.","shell.why.linked":"Other records depend on it.","shell.why.linkedCircle":"These records link to each other in a circle, and this database checks each link as it deletes, so they were not deleted. Empty the link of one of them first.","shell.why.linkRefused":"The linked record is not there, or you may not link to it. Pick another.","shell.why.noPermission":"You do not have permission to do this.","shell.why.gone":"This record no longer exists.","shell.why.notDeleted":"The database kept it, so you may not have permission.","shell.why.noRead":"The server did not answer.","shell.why.readError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.linkMissing":"The record it points to is not there.","shell.why.linkMissingField":"The record {field} points to is not there.","shell.why.linkMissingFields":"The record that {fields} point to is not there.","shell.why.serverError":"The server answered with an error. Whoever runs it can see why in its log.","shell.why.unknown":"No reason came with the error that this page may show. Whoever runs the database can see it in its log.","shell.why.said":"The server said: {said}","shell.why.readSaid":"The server answered with an error: {said}","shell.couldNotLoad":"Could not load {table}: {message}","shell.loadFailedTitle":"Could not load {table}","shell.loadTryAgain":"Try again","shell.loadTrying":"Trying again…","shell.couldNotSave":"Could not save {table}: {message}","shell.trashSaveFailed":"Could not save the trash: {message}","shell.trashReadFailed":"Could not read the trash: {message}","shell.deleted":"Deleted {what}","shell.restored":"Restored {what}","shell.theField":"the field {name}","shell.theTable":"the table {name}","shell.theView":"the view {name}","shell.stepDeleteView":"delete view {name}","shell.aField":"a field","shell.importedNewTable":"Imported {records} into a new table, {name}","shell.importedInto":"Imported {records} into {table}","shell.importedIntoFallback":"the table","shell.stepCellEdit":"cell edit","shell.stepCells.one":"{count} cell","shell.stepCells.other":"{count} cells","shell.stepResize":"resize","shell.stepMoveField":"move field","shell.stepAddRecord":"add record","shell.stepMoveRecord":"move record","shell.undoRecordStays":"Someone has changed this record since, so it stays. Delete it if it should go.","shell.undoCellStays.one":"Someone has changed this cell since, so it keeps their value.","shell.undoCellStays.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoCellsKept.one":"Someone has changed 1 of these cells since, so it keeps their value.","shell.undoCellsKept.other":"Someone has changed {count} of these cells since, so they keep their values.","shell.undoRecordsKept.one":"Someone has changed 1 of these records since, so it keeps their value.","shell.undoRecordsKept.other":"Someone has changed {count} of these records since, so they keep their values.","shell.undoCannotCheck":"The database could not be reached to check this cell, so nothing was changed. Try again in a moment.","shell.undoStillSaving":"This record is still saving, so nothing was changed. Try again once it has saved.","shell.undoRunning":"Undo is still running.","shell.redoRunning":"Redo is still running.","shell.undoStopped":"Undo stopped: {done} of {total} records were put back. Undo again to put back the rest.","shell.redoStopped":"Redo stopped: {done} of {total} records were changed again. Redo again to do the rest.","shell.undoCellsStopped":"Undo stopped: {done} of {total} cells were put back. Undo again to put back the rest.","shell.redoCellsStopped":"Redo stopped: {done} of {total} cells were changed again. Redo again to do the rest.","shell.undoAddStopped":"Undo stopped: {done} of {total} new records were taken out. Undo again to take out the rest.","shell.redoAddStopped":"Redo stopped: {done} of {total} records were added again. Redo again to add the rest.","shell.redoDeleteStopped":"Redo stopped: {done} of {total} records were deleted again. The rest stay, and Undo brings back those it deleted.","shell.undoRecordGone":"This record has been deleted, so nothing was changed.","shell.retryChanged.one":"This cell has changed since, so it keeps its new value.","shell.retryChanged.other":"{count} cells have changed since, so they keep their new values.","shell.retryGone.one":"The record has been deleted, so this was not saved.","shell.retryGone.other":"{count} records have been deleted, so these were not saved.","shell.retryGoneTyped":'The record has been deleted, so "{value}" was not saved.',"shell.retryUnread":"The record could not be read to check it, so nothing was saved.","shell.deleteCannotRead":"The database could not be read, so these records were not deleted. Try again in a moment.","shell.pasteLeftOut.one":'"{text}" does not fit {field}, so that cell keeps its value.',"shell.pasteLeftOut.other":"{count} values do not fit their fields, so those cells keep their values.","shell.pasteLoading":"The view is still loading, so nothing was pasted. Paste again when the rows are shown.","shell.formulaInField":"In a base, a formula is a field of its own: it works out a value for every record at once.","shell.formulaMakeField":"Make a formula field","shell.formulaIsSummary":"The summary bar under the table works this out for {field}, and keeps it up to date as records change.","shell.formulaShowSummary":"Show it for {field}","shell.sumShown":"The sum of {field} is in the summary bar under the table. It keeps up as records change.","shell.sumNotNumbers":"{field} does not hold numbers, so there is nothing to add up. Select a number field and press Alt+= again.","shell.sumNoBar":"A base adds up a field in the summary bar under the table, and this view does not show one.","shell.totalRecord":"No total record needed: the summary bar under the table adds up each number field, and keeps up as records change.","shell.totalShowSums":"Show the sums","shell.formatInBase":"A base keeps no bold or colors typed into cells, so every screen reads the same data. Color rows or cells by what they hold with Color in the toolbar.","shell.formatOpenColor":"Open Color","shell.pasteNoField.one":"One column of the paste had no field to go in, so it was left out.","shell.pasteNoField.other":"{count} columns of the paste had no field to go in, so they were left out.","shell.pasteNamesLeftOut":"The first line holds the names of the fields, so it is not pasted as a record.","shell.pasteFieldsTitle.one":"Add a field for this paste?","shell.pasteFieldsTitle.other":"Add {count} fields for this paste?","shell.pasteFieldsBody.one":"The paste has one more column than the table has from here. Add a field for it:","shell.pasteFieldsBody.other":"The paste has {count} more columns than the table has from here. Add a field for each:","shell.pasteFirstLineNames":"The first line holds the names of the fields","shell.pasteWithout":"Paste without them","shell.pasteAddFields.one":"Add the field and paste","shell.pasteAddFields.other":"Add {count} fields and paste","shell.pasteNewTitle":"New records","shell.pasteNewAsk":"This paste runs past the last record. Add {records}?","shell.pasteNewConfirm":"Add records","shell.pasteNewPart":"{done} of {total} new records were added.","shell.rangeLoading":"The view is still loading, so nothing was changed. Try again when the rows are shown.","shell.rangeMovedPaste":'Records moved while this was read. Nothing was changed. Try again pastes from "{name}" down over the rows as they are now.',"shell.rangeMovedValue":'Records moved while this was read. Nothing was changed. Try again puts the value in from "{name}" down over the rows as they are now.',"shell.rangeMovedClear":'Records moved while this was read. Nothing was changed. Try again clears from "{name}" down over the rows as they are now.',"shell.rangeMovedFill":'Records moved while this was read. Nothing was changed. Try again fills from "{name}" down over the rows as they are now.',"shell.rangeMovedSelect":"Records moved while this was read. Nothing was changed. Select the cells again.","shell.rangeAnchorGone":'"{name}" is no longer among the rows shown, so nothing was changed. Select the cells again.',"shell.rangeAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.rangeAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was changed. Select the cells again.',"shell.copyAgainShort.one":'Only {count} row is below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.copyAgainShort.other":'Only {count} rows are below "{name}" now, fewer rows than the first try covered ({covered}), so nothing was copied. Select the cells again.',"shell.rangeAgainCovers":'From "{name}" down over {count} rows, selected in the view.',"shell.rangeElsewhere":"That view is no longer open, so nothing was changed.","shell.rangeViewChanged":"The view has changed since, so nothing was changed.","shell.copyElsewhere":"That view is no longer open, so nothing was copied.","shell.copyViewChanged":"The view has changed since, so nothing was copied.","shell.rangeDraftsLeft.one":"1 new record is not stored yet, so it was left out. Change it on its own row.","shell.rangeDraftsLeft.other":"{count} new records are not stored yet, so they were left out. Change them on their own rows.","shell.rangeMoveRefused":"A move can only use rows that are on screen, and {records} of this one are not loaded, so nothing moved. Copy and paste reach them.","shell.copyTitle":"Copy","shell.copyReading":"Reading the selection: {done} rows so far","shell.copyTooBig":"This selection is {cells} cells, more than the {limit} a copy can hold, so nothing was copied. Download this view instead: it holds every record.","shell.copyMovedFrom":'Records moved while this was read. Nothing was copied. Try again copies from "{name}" down over the rows as they are now.',"shell.copyMovedSelect":"Records moved while this was read. Nothing was copied. Select the cells again.","shell.copyAnchorGone":'"{name}" is no longer among the rows shown, so nothing was copied. Select the cells again.',"shell.copyFailed":"Could not read the selection, so nothing was copied: {message}","shell.copyDone":"Copied {count} rows","shell.copyReady":"{count} rows are ready. The browser needs one more click to put them on the clipboard.","shell.copyButton":"Copy","shell.copyRefused":"The browser would not put this much on the clipboard. Download this view instead.","shell.cutRefused":"The browser would not put the cells on the clipboard, so nothing was cut.","shell.cutMoved":"The selection changed before the cells reached the clipboard, so nothing was cleared.","shell.stepPasteRecords":"paste {records}","shell.stepBulkEdit":"edit {records}","shell.bulkReading":"Reading the selection: {done} records so far","shell.bulkFailed":"Could not read the selection, so nothing was changed: {message}","shell.bulkTitle":"Edit records","shell.bulkAsk":"Change {count}?","shell.bulkRuns":"Also run automations: up to {count} runs","shell.bulkRunsTime":"They run one at a time in this tab after the save: about {time} at {rate} a second. Runs left when the tab closes do not happen.","shell.bulkRunsTab":"They run one at a time in this tab after the save. Runs left when the tab closes do not happen.","shell.runsLine":"Running automations: {done} of {total}","shell.runsLineLeft":"Running automations: {done} of {total}, about {time} left","shell.runsStop":"Stop","shell.runsDone":"Automations ran on {total} changes.","shell.runsStopped":"Stopped: {done} of {total} automation runs are done. The other {left} will not run.","shell.timeSeconds":"less than a minute","shell.timeMinutes.one":"1 minute","shell.timeMinutes.other":"{count} minutes","shell.timeHours.one":"1 hour","shell.timeHours.other":"{count} hours","shell.bulkAskNoUndo":"That is too many to undo: once changed, they cannot be changed back from here.","shell.bulkConfirm":"Change records","shell.bulkWriting":"Saving {done} of {total} records...","shell.cellsWriting":"Saving {done} of {total} cells...","shell.bulkDone":"Changed {done} of {total} records","shell.bulkStopped":"Stopped: {done} of {total} records were changed.","shell.bulkFailedPart":"{done} of {total} records were changed, then the save stopped. {reason}","shell.bulkFailedUnsure":"At least {done} of {total} records were changed, then the save stopped and the database could not be read to check the last block. {reason}","shell.bulkUndoLeft":"Undo takes these back.","shell.bulkNoUndoLeft":"That is too many to undo.","shell.failSaveMany":"Could not save {records}. {reason}","shell.stepDeleteRecords":"delete {records}","shell.addColumnFailed":"The column for {field} was not added: {error}","shell.addColumnYourself":"{field} needs a column in {table} before it can store values. Add it to the database: {sql}","shell.duplicateNeedsColumn":"A copy of {field} needs a column of its own in {table}, and the base cannot add one there, so nothing was copied. Add the column to the database first: {sql}","shell.deleting":"Deleting {done} of {total} records...","shell.deleteNoTrash":"That is too many for the trash: they cannot be restored.","shell.scanDrift":"Records changed while this view was being read, so its count may be out by a few.","shell.noSqlSort":"This database cannot work out {fields}, so the view does not sort or total on it.","shell.noSqlView":"This database cannot work out {fields}, so the view cannot filter or group on it. Take it out of the filter or the grouping.","shell.deleteGroupShort":"The group {key} read back {read} records of {size}, so what was left out of the selection cannot be told apart. Nothing was deleted.","shell.deleteGroupUnknown":"How many records the group {key} holds is not known here, so what was left out of the selection cannot be told apart. Nothing was deleted. Tick what should go instead.","shell.deleteTitle":"Delete records","shell.deleteReading":"Finding the records to delete: {done} read...","shell.deleteAsk":"Delete {count}?","shell.deleteAskTrash":"They go to the trash, and undo brings them back.","shell.deleteNothing":"None of the selected records are there any more.","shell.deleteStop":"Stop","shell.deleteCancel":"Cancel","shell.deleteConfirm":"Delete","shell.deleteDone":"Deleted {done} of {total} records","shell.deleteFailed":"Could not read the selection, so nothing was deleted: {message}","shell.columnExists":"The column {column} already exists in {table}, so {field} was stored as {name}.","shell.stepAddField":"add field {name}","shell.stepChangeField":"change field {name}","shell.stepDeleteField":"delete field {name}","shell.stepAddTable":"add table {name}","shell.stepRenameTable":"rename table to {name}","shell.stepDuplicateTable":"duplicate table {name}","shell.stepDeleteTable":"delete table {name}","shell.stepRestore":"restore from the trash","shell.stepImportTable":"import {name}","shell.stepImportRecords":"import {records}","shell.tablesLabel":"Tables","shell.tableName":"Table name","shell.tableActions":"Table actions","shell.tableOptions":"{name} table options","shell.renameTable":"Rename table","shell.duplicateTable":"Duplicate table","shell.importRecordsFromFile":"Import records from a file","shell.keepOneTable":"A base keeps at least one table","shell.deleteTable":"Delete table","shell.allTables":"All tables","shell.importAsTable":"Import a file as a table","shell.importAsTableTitle":"A CSV, TSV, Excel or JSON file as a new table, with a field type for each column","shell.downloadCsv":"Download this view as CSV","shell.downloadExcel":"Download this view as Excel","shell.downloadViewTitle":"The records and fields this view shows, as they read on screen","shell.exportNothing":"This view has no records to download.","shell.excelNeedsZip":"This app cannot write Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip.","shell.exportFailed":"Could not make the file. Try again.","shell.downloadSql":"Download as SQL","shell.downloadFiles":"Download the files (ZIP)","shell.downloadFilesTitle":"Every file this view shows, in a folder for each group, or for each record","shell.exportNoFiles":"This view shows no files.","shell.downloadSqlTitle":"The tables, links, records, views and automations, ready for Postgres or Supabase","shell.addTable":"Add table","shell.addTableWays":"More ways to add a table","shell.blankTable":"Blank table","shell.viewOnly":"View only","shell.viewOnlyTitle":"You can look at these tables but not change them","shell.undo":"Undo","shell.undoStep":"Undo {step}","shell.undoStepTitle":"Undo {step} (Ctrl+Z)","shell.nothingToUndo":"Nothing to undo","shell.redo":"Redo","shell.redoStep":"Redo {step}","shell.redoStepTitle":"Redo {step} (Ctrl+Shift+Z)","shell.nothingToRedo":"Nothing to redo","shell.trashButton":"Trash, {items}","shell.trashTitle":"Deleted records, fields and tables","shell.deleteNamed":"Delete {name}?","shell.deleteTableRecords.one":"Its {count} record goes with it, and so do its views.","shell.deleteTableRecords.other":"Its {count} records go with it, and so do its views.","shell.deleteTableLinks":"These fields of other tables link to it, or read a link to it, and are deleted too:","shell.readsLink":"{table}: {field} (reads {link})","shell.cancel":"Cancel","shell.searchAllTables":"Search all tables","shell.searchResults":"Search results","shell.searchRecords":"Records","shell.searchMore":"{count} more in {table}","shell.searchNone":"No records match.","shell.searchFoot":"{records} in {tables}","shell.trash":"Trash","shell.trashShow":"Show","shell.trashAll":"All","shell.trashRecords":"Records","shell.trashFields":"Fields","shell.trashTables":"Tables","shell.trashViews":"Views","shell.findInTrash":"Find in trash","shell.trashEmpty":"The trash is empty. Deleted records, fields and tables come here.","shell.trashEmptyDays":"The trash is empty. Deleted records, fields and tables come here and stay {days} days.","shell.trashNoMatch":"Nothing in the trash matches.","shell.trashItems":"Deleted items","shell.kindRecord":"Record","shell.kindView":"View","shell.kindField":"Field","shell.kindTable":"Table","shell.trashIn":"{kind} in {table}","shell.trashTableRecords.one":"{kind}, {count} record","shell.trashTableRecords.other":"{kind}, {count} records","shell.trashDeletedTable":"{name} (deleted)","shell.trashADeletedTable":"a deleted table","shell.trashBy":"by","shell.agoNow":"just now","shell.agoMinutes":"{n} min ago","shell.agoHours":"{n} h ago","shell.agoYesterday":"yesterday","shell.agoDays":"{n} days ago","shell.restore":"Restore","shell.restoreItem":"Restore {name}","shell.restoreAll":"Restore all","shell.restoreThese":"Restore these","shell.deleteForever":"Delete forever","shell.deleteItemForever":"Delete {name} forever","shell.deleteCountForever":"Delete {count} forever","shell.keepThem":"Keep them","shell.keepIt":"Keep it","shell.deleteAskForever":"Delete this forever? It cannot be undone.","shell.emptyTrash":"Empty trash","shell.trashNoteDays":"Items are deleted for good after {days} days.","shell.trashNoteKeep":"Items stay until the trash is emptied.","shell.trashNotePage":"Items stay until this page is closed or reloaded.","shell.trashNoteMarked":"Records stay in their table until they are deleted forever. Fields, views and tables stay until this page is closed or reloaded.","shell.trashClosed":"Deleted records are listed for people who may delete. Ask whoever runs this base if you need one back.","shell.trashEmptyMarked":"The trash is empty. Deleted records stay in their table and come here. Deleted fields, views and tables stay until this page is closed or reloaded.","shell.trashMore":"Showing the latest {shown} of {total} deleted records.","shell.trashEmptyPage":"The trash is empty. Deleted records, fields and tables come here and stay until this page is closed or reloaded.","shell.unnamedRecord":"Untitled record","shell.fieldFallback":"Field","shell.cannotRestoreTable":"A table with its id is in the base","shell.cannotRestoreNoTable":"Its table was deleted: restore the table first","shell.cannotRestoreRecord":"The record is in its table","shell.cannotRestoreField":"A field with its id is in the table","shell.importNewTitle":"Import a file as a new table","shell.importIntoTitle":"Import records into {table}","shell.thisTable":"this table","shell.importChoose":"Choose a CSV or Excel file","shell.importReading":"Reading the file…","shell.importDrop":"Drop a file here, or click to choose one","shell.importFormats":"CSV, TSV, Excel (.xlsx) or JSON. The first row names the columns.","shell.importNoRecords":"The file has a header row and no records.","shell.importBinary":"This file is not text. Choose a CSV, TSV, Excel (.xlsx) or JSON file.","shell.importNeedsZip":"This app cannot read Excel files yet: it needs the jszip package. Ask whoever runs it to install jszip, or import the file as CSV.","shell.importBadExcel":"This file could not be read as an Excel workbook. Open it in Excel and save it again as .xlsx.","shell.importBadJson":'This file could not be read as JSON. It needs to be a list of records: [{ "name": "Ana" }, ...].',"shell.importSeparator":"Separator","shell.importEncoding":"Encoding","shell.importComma":"Comma","shell.importSemicolon":"Semicolon","shell.importTab":"Tab","shell.importPipe":"Pipe","shell.importWarnEncoding":"This file is not UTF-8, so it was read as {encoding}. If letters look wrong, choose another encoding above.","shell.importWarnUnclosed.one":"A quote on line {line} is never closed. It was kept as text, and the rows after it were read as usual. Check that row after the import.","shell.importWarnUnclosed.other":"{count} quotes are never closed, the first on line {line}. They were kept as text, and the rows after them were read as usual. Check those rows after the import.","shell.importWarnStray.one":"A quote on line {line} is in an unusual place and was kept as text. Check that row after the import.","shell.importWarnStray.other":"{count} lines have a quote in an unusual place, the first on line {line}. They were kept as text. Check those rows after the import.","shell.importWarnLong.one":"The row on line {line} has more cells than the header row. The extra cells are in columns of their own below.","shell.importWarnLong.other":"{count} rows have more cells than the header row, the first on line {line}. The extra cells are in columns of their own below.","shell.importWarnShort.one":"The row on line {line} has fewer cells than the header row. Its missing cells stay empty.","shell.importWarnShort.other":"{count} rows have fewer cells than the header row, the first on line {line}. Their missing cells stay empty.","shell.importWarnLost.one":"1 value does not fit the field it goes to and would be left empty. Change that field type or skip the column to keep it.","shell.importWarnLost.other":"{count} values do not fit the fields they go to and would be left empty. Change those field types or skip the columns to keep them.","shell.importWarnUnmatched.one":"1 cell names a person or a record that was not found, so that name is not imported.","shell.importWarnUnmatched.other":"{count} cells name a person or a record that was not found, so those names are not imported.","shell.importWarnRepeated.one":"1 record has the same name as a record already in this table. Importing adds it as a second record.","shell.importWarnRepeated.other":"{count} records have the same name as records already in this table. Importing adds them as second records.","shell.importSummary.one":"{file}: {count} record, {columns} columns","shell.importSummary.other":"{file}: {count} records, {columns} columns","shell.importAnother":"Choose another file","shell.importInto":"Import into","shell.importModeNew":"A new table","shell.importModeAppend":"Add records to {table}","shell.theShownTable":"the shown table","shell.importColumn":"Column","shell.importFieldType":"Field type","shell.importFirstValues":"First values","shell.importFileColumn":"Column in the file","shell.importGoesTo":"Goes to field","shell.importNamesRecords":"names the records","shell.importFieldTypeOf":"Field type of {name}","shell.importFieldFor":"Field for {name}","shell.importSkip":"Skip this column","shell.importNoMapping":"No column goes to a field yet.","shell.importButton.one":"Import {count} record","shell.importButton.other":"Import {count} records","shell.importFieldName":"Field {n}","shell.importedName":"Imported","shell.importedRecordName":"Imported {n}","shell.deleteRecordTitle":"Delete record?","shell.deleteRecordNamed":"{name} is deleted, and its links from other records go with it.","shell.deleteRecordUnnamed":"This record is deleted, and its links from other records go with it.","shell.deleteRecord":"Delete record","shell.fieldLinksTo":"{name} links to {table}.","shell.anotherTable":"another table","shell.fieldLinkBack":"The field there that links back, {name}, is deleted with it.","shell.fieldLinksGo":"The links between the records go too.","shell.fieldReaders":"These fields read it and are deleted too: {fields}.","shell.fieldDeleted":"{name} and its values are deleted.","shell.fieldFormulas":"These formulas read it and will show #ERROR: {fields}.","shell.deleteField":"Delete field","shell.fieldUses":"Used by:","shell.usesView":"{name}: {uses}","shell.usesAutomation":"Automation {name}: it no longer reads or writes this field","shell.usesStack":"stacks its cards by it, and shows as a plain grid without it","shell.usesDates":"places its records by it, and shows as a plain grid without it","shell.usesBars":"draws its bars with it","shell.usesCover":"shows it as the card cover","shell.usesBoard":"shows it on its cards","shell.usesChart":"charts it","shell.usesFilter":"filters by it","shell.usesSort":"sorts by it","shell.usesGroup":"groups by it","shell.usesColor":"colors records by it","shell.usesForm":"asks for it","shell.usesList":"lists it","shell.usesTile":"a tile reads it","shell.cellChanged":"{field} changed to {value}","shell.cellCleared":"{field} cleared","shell.cellsChanged.one":"{count} cell changed","shell.cellsChanged.other":"{count} cells changed","shell.undoneStep":"Undone: {step}","shell.redoneStep":"Redone: {step}","shell.summarize":"Summarize","shell.summarizeField":"Summarize {field}","shell.summaryChange":"{summary} {value}, change summary","shell.summaryCount.one":"{count} record, summarize {field}","shell.summaryCount.other":"{count} records, summarize {field}","shell.recordsWord.one":"record","shell.recordsWord.other":"records","shell.summaryMenu":"Summary","shell.summary.none":"None","shell.summary.empty":"Empty","shell.summary.filled":"Filled","shell.summary.unique":"Unique","shell.summary.percentEmpty":"Percent empty","shell.summary.percentFilled":"Percent filled","shell.summary.sum":"Sum","shell.summary.avg":"Average","shell.summary.median":"Median","shell.summary.min":"Min","shell.summary.max":"Max","shell.summary.range":"Range","shell.summary.checked":"Checked","shell.summary.unchecked":"Unchecked","shell.summary.percentChecked":"Percent checked","shell.summary.earliest":"Earliest date","shell.summary.latest":"Latest date","shell.summary.dateRange":"Date range (days)","shell.searchKey":"Ctrl K","shell.tabHint":"Tab moves between cells. Press Esc, then Tab, to leave the grid.","shell.menuExpand":"Expand record","shell.menuSelect":"Select record","shell.menuDeselect":"Deselect record","shell.recordActions":"Actions for row {row}","shell.menuComment":"Comment","shell.menuInsertAbove":"Insert record above","shell.menuInsertBelow":"Insert record below","shell.menuAddSubtask":"Add subtask","shell.subtasks":"Subtasks","shell.treeNoLoop":"A record cannot go under itself or one of its own subtasks.","shell.treeMovedUnder":"{name} is now under {parent}","shell.treeMovedTop":"{name} is now at the top level","shell.menuDuplicate":"Duplicate record","shell.addField":"Add a field","shell.addRow":"Add row","shell.addRecord":"Add record","shell.groupEmpty":"Empty","shell.groupAdd":"Add a record to this group","shell.groupAddTo":"Add a record to {field} {value}","shell.groupColumn":"Group","shell.someoneElse":"Someone else","shell.unseenAdded":"{who} added this record {ago}","shell.unseenChanged":"{who} changed this record {ago}","shell.selectRow":"Select row {row}","shell.selectAllRows":"Select all rows","shell.expandRow":"Expand row","shell.expandRowN":"Expand row {row}","shell.comments.one":"{count} comment","shell.comments.other":"{count} comments","shell.commentsOnRow.one":"{count} comment on row {row}","shell.commentsOnRow.other":"{count} comments on row {row}","shell.changedBy":"{count} changed by {who}","shell.changedBySomeone":"someone else","shell.changedByOthers":"others","shell.dashboardRecords":"Records"};
|
|
@@ -34,6 +34,10 @@ export declare const VIEWBAR_MESSAGES: {
|
|
|
34
34
|
readonly 'viewbar.board.cardBlocked': "{card} is blocked and can't be moved.";
|
|
35
35
|
readonly 'viewbar.board.selected': "Selected {card}. {count} selected.";
|
|
36
36
|
readonly 'viewbar.board.deselected': "Deselected {card}. {count} selected.";
|
|
37
|
+
readonly 'viewbar.board.expand': "Expand {lane}";
|
|
38
|
+
readonly 'viewbar.board.collapse': "Collapse {lane}";
|
|
39
|
+
readonly 'viewbar.board.wipTitle': "At most {limit} cards";
|
|
40
|
+
readonly 'viewbar.board.none': "(none)";
|
|
37
41
|
readonly 'viewbar.moveField': "Move {name}";
|
|
38
42
|
readonly 'viewbar.moveFieldHint': "Drag, or press the up and down arrows";
|
|
39
43
|
readonly 'viewbar.fieldMoved': "{name} moved to place {place} of {count}";
|
|
@@ -165,6 +169,18 @@ export declare const VIEWBAR_MESSAGES: {
|
|
|
165
169
|
readonly 'viewbar.customizeGantt': "Customize Gantt";
|
|
166
170
|
readonly 'viewbar.customizeList': "Customize list";
|
|
167
171
|
readonly 'viewbar.customizeInbox': "Customize inbox";
|
|
172
|
+
readonly 'viewbar.customizeBoard': "Customize board";
|
|
173
|
+
readonly 'viewbar.criticalPath': "Show the critical path";
|
|
174
|
+
readonly 'viewbar.criticalPathHint': "The tasks that set the finish date get a red outline: if one of them is late, so is the end. Point at any other task to see how many days it can slip.";
|
|
175
|
+
readonly 'viewbar.boardRowsBy': "Rows by";
|
|
176
|
+
readonly 'viewbar.boardDue': "Due date";
|
|
177
|
+
readonly 'viewbar.boardFade': "Fade cards by";
|
|
178
|
+
readonly 'viewbar.boardFadeHint': "Cards fade a little more each week after this date. Pick a Last modified time field to fade the ones nobody has changed.";
|
|
179
|
+
readonly 'viewbar.boardBlocked': "Blocked when";
|
|
180
|
+
readonly 'viewbar.boardOnCards': "On the cards (up to {count})";
|
|
181
|
+
readonly 'viewbar.boardQuickFilters': "Quick filters above the board";
|
|
182
|
+
readonly 'viewbar.boardLimits': "Most cards in a column";
|
|
183
|
+
readonly 'viewbar.boardNoLimit': "No limit";
|
|
168
184
|
readonly 'viewbar.rowHeight': "Row height";
|
|
169
185
|
readonly 'viewbar.markAllSeen': "Mark all as seen";
|
|
170
186
|
readonly 'viewbar.automations': "Automations";
|