@fieldia/core 0.24.0 → 0.26.0
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/README.md +133 -1
- package/package.json +1 -1
- package/schema/page.schema.json +983 -329
- package/src/index.d.mts +6 -2
- package/src/index.d.ts +6 -2
- package/src/index.js +16 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +7 -2
- package/src/index.mjs.map +1 -1
- package/src/lib/format/actions.d.mts +31 -1
- package/src/lib/format/actions.d.ts +31 -1
- package/src/lib/format/actions.js +1 -0
- package/src/lib/format/actions.js.map +1 -1
- package/src/lib/format/actions.mjs +1 -0
- package/src/lib/format/actions.mjs.map +1 -1
- package/src/lib/format/duplicate-kinds.d.mts +10 -0
- package/src/lib/format/duplicate-kinds.d.ts +10 -0
- package/src/lib/format/duplicate-kinds.js +14 -0
- package/src/lib/format/duplicate-kinds.js.map +1 -0
- package/src/lib/format/duplicate-kinds.mjs +10 -0
- package/src/lib/format/duplicate-kinds.mjs.map +1 -0
- package/src/lib/format/duplicates.d.mts +22 -0
- package/src/lib/format/duplicates.d.ts +22 -0
- package/src/lib/format/duplicates.js +24 -0
- package/src/lib/format/duplicates.js.map +1 -0
- package/src/lib/format/duplicates.mjs +21 -0
- package/src/lib/format/duplicates.mjs.map +1 -0
- package/src/lib/format/field.d.mts +236 -0
- package/src/lib/format/field.d.ts +236 -0
- package/src/lib/format/field.js +4 -3
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +2 -1
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/head-checks.d.mts +3 -1
- package/src/lib/format/head-checks.d.ts +3 -1
- package/src/lib/format/head-checks.js +25 -4
- package/src/lib/format/head-checks.js.map +1 -1
- package/src/lib/format/head-checks.mjs +24 -4
- package/src/lib/format/head-checks.mjs.map +1 -1
- package/src/lib/format/import-fields.d.mts +18 -0
- package/src/lib/format/import-fields.d.ts +18 -0
- package/src/lib/format/import-fields.js +26 -0
- package/src/lib/format/import-fields.js.map +1 -0
- package/src/lib/format/import-fields.mjs +21 -0
- package/src/lib/format/import-fields.mjs.map +1 -0
- package/src/lib/format/layout.d.mts +7391 -3264
- package/src/lib/format/layout.d.ts +7391 -3264
- package/src/lib/format/layout.js +100 -37
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +99 -36
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/layout.types.d.mts +5 -2
- package/src/lib/format/layout.types.d.ts +5 -2
- package/src/lib/format/page.d.mts +1018 -118
- package/src/lib/format/page.d.ts +1018 -118
- package/src/lib/format/page.js +17 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +17 -0
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/records.d.mts +23 -0
- package/src/lib/format/records.d.ts +23 -0
- package/src/lib/format/records.js +28 -0
- package/src/lib/format/records.js.map +1 -0
- package/src/lib/format/records.mjs +25 -0
- package/src/lib/format/records.mjs.map +1 -0
- package/src/lib/format/references.d.mts +31 -0
- package/src/lib/format/references.d.ts +31 -0
- package/src/lib/format/references.js +185 -24
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +185 -24
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/translate.js +12 -6
- package/src/lib/format/translate.js.map +1 -1
- package/src/lib/format/translate.mjs +12 -6
- package/src/lib/format/translate.mjs.map +1 -1
- package/src/lib/format/upgrade.d.mts +8 -3
- package/src/lib/format/upgrade.d.ts +8 -3
- package/src/lib/format/upgrade.js +8 -3
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +8 -3
- package/src/lib/format/upgrade.mjs.map +1 -1
- package/src/lib/format/version.d.mts +2 -2
- package/src/lib/format/version.d.ts +2 -2
- package/src/lib/format/version.js +2 -2
- package/src/lib/format/version.js.map +1 -1
- package/src/lib/format/version.mjs +2 -2
- package/src/lib/format/version.mjs.map +1 -1
- package/src/lib/record/check.js +2 -2
- package/src/lib/record/check.js.map +1 -1
- package/src/lib/record/check.mjs +3 -3
- package/src/lib/record/check.mjs.map +1 -1
- package/src/lib/record/data-source.d.mts +121 -0
- package/src/lib/record/data-source.d.ts +121 -0
- package/src/lib/record/data-source.js +16 -0
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs +15 -0
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/form.d.mts +51 -3
- package/src/lib/record/form.d.ts +51 -3
- package/src/lib/record/form.js +78 -17
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +79 -18
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/inputs.js +8 -8
- package/src/lib/record/inputs.js.map +1 -1
- package/src/lib/record/inputs.mjs +9 -9
- package/src/lib/record/inputs.mjs.map +1 -1
- package/src/lib/record/limits.js +1 -1
- package/src/lib/record/limits.js.map +1 -1
- package/src/lib/record/limits.mjs +2 -2
- package/src/lib/record/limits.mjs.map +1 -1
- package/src/lib/record/locales/de.js +2 -0
- package/src/lib/record/locales/de.js.map +1 -1
- package/src/lib/record/locales/de.mjs +2 -0
- package/src/lib/record/locales/de.mjs.map +1 -1
- package/src/lib/record/memory-data-source.d.mts +12 -5
- package/src/lib/record/memory-data-source.d.ts +12 -5
- package/src/lib/record/memory-data-source.js +85 -1
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +86 -2
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/memory-duplicates.d.mts +19 -0
- package/src/lib/record/memory-duplicates.d.ts +19 -0
- package/src/lib/record/memory-duplicates.js +78 -0
- package/src/lib/record/memory-duplicates.js.map +1 -0
- package/src/lib/record/memory-duplicates.mjs +74 -0
- package/src/lib/record/memory-duplicates.mjs.map +1 -0
- package/src/lib/record/messages.d.mts +24 -0
- package/src/lib/record/messages.d.ts +24 -0
- package/src/lib/record/messages.js +25 -0
- package/src/lib/record/messages.js.map +1 -1
- package/src/lib/record/messages.mjs +24 -0
- package/src/lib/record/messages.mjs.map +1 -1
- package/src/lib/record/record-words.d.mts +19 -0
- package/src/lib/record/record-words.d.ts +19 -0
- package/src/lib/record/record-words.js +60 -0
- package/src/lib/record/record-words.js.map +1 -0
- package/src/lib/record/record-words.mjs +56 -0
- package/src/lib/record/record-words.mjs.map +1 -0
- package/src/lib/record/rules.js +1 -1
- package/src/lib/record/rules.js.map +1 -1
- package/src/lib/record/rules.mjs +2 -2
- package/src/lib/record/rules.mjs.map +1 -1
- package/src/lib/record/run.d.mts +39 -1
- package/src/lib/record/run.d.ts +39 -1
- package/src/lib/record/run.js +15 -1
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +15 -1
- package/src/lib/record/run.mjs.map +1 -1
- package/src/lib/record/search.js +2 -1
- package/src/lib/record/search.js.map +1 -1
- package/src/lib/record/search.mjs +2 -1
- package/src/lib/record/search.mjs.map +1 -1
- package/src/lib/record/structures.js +3 -3
- package/src/lib/record/structures.js.map +1 -1
- package/src/lib/record/structures.mjs +4 -4
- package/src/lib/record/structures.mjs.map +1 -1
- package/src/lib/record/waits.d.mts +32 -0
- package/src/lib/record/waits.d.ts +32 -0
- package/src/lib/record/waits.js +89 -0
- package/src/lib/record/waits.js.map +1 -0
- package/src/lib/record/waits.mjs +85 -0
- package/src/lib/record/waits.mjs.map +1 -0
- package/src/runtime.d.mts +13 -7
- package/src/runtime.d.ts +13 -7
- package/src/runtime.js +13 -3
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +4 -1
- package/src/runtime.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structures.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/structures.ts"],"names":[],"mappings":";;;AAqCA,oCAKC;AAWD,wCAkBC;AArED,+CAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"structures.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/structures.ts"],"names":[],"m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,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,KAAK;QAAE,OAAO,SAAS,CAAC;IAClF,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IACjC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;IACpF,OAAO,IAAA,sBAAW,EAAC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACxI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { foldDigits, stripMarks } from './input-rules.mjs';
|
|
2
|
-
import { fill } from './messages.mjs';
|
|
2
|
+
import { fill, fillMessage } from './messages.mjs';
|
|
3
3
|
/**
|
|
4
4
|
* What a structure's widget asks of its answer beyond Required: an address
|
|
5
5
|
* (`json.address`) its parts in `options.requiredParts` filled — the first
|
|
@@ -48,9 +48,9 @@ export function checkStructure(field, node, value, messages) {
|
|
|
48
48
|
const label = node.label ?? field.label;
|
|
49
49
|
if (field.type === 'one2many' && Array.isArray(value) && value.length) {
|
|
50
50
|
if (typeof options['min'] === 'number' && value.length < options['min'])
|
|
51
|
-
return
|
|
51
|
+
return fillMessage(messages, messages.minLines, { label, min: options['min'] });
|
|
52
52
|
if (typeof options['max'] === 'number' && value.length > options['max'])
|
|
53
|
-
return
|
|
53
|
+
return fillMessage(messages, messages.maxLines, { label, max: options['max'] });
|
|
54
54
|
}
|
|
55
55
|
const needed = Array.isArray(options['requiredParts']) ? options['requiredParts'] : [];
|
|
56
56
|
if (node.widget !== 'address' || !value || typeof value !== 'object' || Array.isArray(value))
|
|
@@ -65,6 +65,6 @@ export function checkStructure(field, node, value, messages) {
|
|
|
65
65
|
const country = String(parts['country']).toUpperCase();
|
|
66
66
|
const shape = POSTCODES[country];
|
|
67
67
|
const n = shape.least === shape.most ? shape.least : `${shape.least}–${shape.most}`;
|
|
68
|
-
return
|
|
68
|
+
return fillMessage(messages, messages.postcode, { label, country: countryName(country, messages.locale), n, example: shape.example });
|
|
69
69
|
}
|
|
70
70
|
//# sourceMappingURL=structures.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structures.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/structures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,IAAI,EAAiB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"structures.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/structures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AAG9D;;;;;;;GAOG;AAEH,6EAA6E;AAC7E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAU,CAAC;AAEnG;;;;;GAKG;AACH,MAAM,SAAS,GAAqE;IAClF,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE;IAC3C,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE;I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,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACxI,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Page } from '../format/page.mjs';
|
|
2
|
+
import type { UnreadText } from './form.mjs';
|
|
3
|
+
import { type Values } from './values.mjs';
|
|
4
|
+
/**
|
|
5
|
+
* What a value worked out from others waits for, while one of them holds text that does not read: the field, and on
|
|
6
|
+
* a table of lines the line — numbered as people count lines, sections and notes not counted — and its cell.
|
|
7
|
+
*/
|
|
8
|
+
export interface WaitsFor {
|
|
9
|
+
/** The field holding the text, or the table whose line holds it. */
|
|
10
|
+
readonly field: string;
|
|
11
|
+
/** The line, from 1: items only. Left out for a field of the record's own. */
|
|
12
|
+
readonly line?: number;
|
|
13
|
+
/** The line's cell holding the text. */
|
|
14
|
+
readonly column?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Which fields of a page each of its values worked out from others is worked out from — what it waits for while one
|
|
18
|
+
* of them holds text that does not read, as a number worked out on a line waits for its line's cells and the table's
|
|
19
|
+
* total for its lines (0.24). The page's own `compute`: the fields it reads, and what each of those it reads that is
|
|
20
|
+
* worked out reads in turn — a sum over a table's lines waits for those lines. The app's (`appWorksOut`, a source
|
|
21
|
+
* with an onchange): an amount no one types in (read-only), which the app works out as the lines change, from any
|
|
22
|
+
* table of lines the page has — a sales order's Untaxed, Taxes and Total, its tax totals. A line's own form (`asLine`:
|
|
23
|
+
* a line opened in its dialog) is the line the table's rule reads: a number on it no one types in waits for any of
|
|
24
|
+
* its fields a person types in, as its cell in the table does. Fields worked out from nothing that can hold such text
|
|
25
|
+
* are left out.
|
|
26
|
+
*/
|
|
27
|
+
export declare function workedOutFrom(page: Page, appWorksOut: boolean, asLine?: boolean): Map<string, readonly string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* The first of `from` holding text that does not read, in the page's order: a field's own, or a table's line's cell
|
|
30
|
+
* (the first line holding one, as people count lines). Null when none does.
|
|
31
|
+
*/
|
|
32
|
+
export declare function waitingOn(page: Page, from: readonly string[], values: Readonly<Values>, unread: Readonly<Record<string, UnreadText>>): WaitsFor | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Page } from '../format/page';
|
|
2
|
+
import type { UnreadText } from './form';
|
|
3
|
+
import { type Values } from './values';
|
|
4
|
+
/**
|
|
5
|
+
* What a value worked out from others waits for, while one of them holds text that does not read: the field, and on
|
|
6
|
+
* a table of lines the line — numbered as people count lines, sections and notes not counted — and its cell.
|
|
7
|
+
*/
|
|
8
|
+
export interface WaitsFor {
|
|
9
|
+
/** The field holding the text, or the table whose line holds it. */
|
|
10
|
+
readonly field: string;
|
|
11
|
+
/** The line, from 1: items only. Left out for a field of the record's own. */
|
|
12
|
+
readonly line?: number;
|
|
13
|
+
/** The line's cell holding the text. */
|
|
14
|
+
readonly column?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Which fields of a page each of its values worked out from others is worked out from — what it waits for while one
|
|
18
|
+
* of them holds text that does not read, as a number worked out on a line waits for its line's cells and the table's
|
|
19
|
+
* total for its lines (0.24). The page's own `compute`: the fields it reads, and what each of those it reads that is
|
|
20
|
+
* worked out reads in turn — a sum over a table's lines waits for those lines. The app's (`appWorksOut`, a source
|
|
21
|
+
* with an onchange): an amount no one types in (read-only), which the app works out as the lines change, from any
|
|
22
|
+
* table of lines the page has — a sales order's Untaxed, Taxes and Total, its tax totals. A line's own form (`asLine`:
|
|
23
|
+
* a line opened in its dialog) is the line the table's rule reads: a number on it no one types in waits for any of
|
|
24
|
+
* its fields a person types in, as its cell in the table does. Fields worked out from nothing that can hold such text
|
|
25
|
+
* are left out.
|
|
26
|
+
*/
|
|
27
|
+
export declare function workedOutFrom(page: Page, appWorksOut: boolean, asLine?: boolean): Map<string, readonly string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* The first of `from` holding text that does not read, in the page's order: a field's own, or a table's line's cell
|
|
30
|
+
* (the first line holding one, as people count lines). Null when none does.
|
|
31
|
+
*/
|
|
32
|
+
export declare function waitingOn(page: Page, from: readonly string[], values: Readonly<Values>, unread: Readonly<Record<string, UnreadText>>): WaitsFor | null;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workedOutFrom = workedOutFrom;
|
|
4
|
+
exports.waitingOn = waitingOn;
|
|
5
|
+
const expression_1 = require("../expression/expression");
|
|
6
|
+
const values_1 = require("./values");
|
|
7
|
+
/** Kinds of value an app works out from a record's lines: amounts, and totals kept whole (Flectra's tax_totals). */
|
|
8
|
+
const WORKED_OUT = new Set(['integer', 'float', 'monetary', 'json']);
|
|
9
|
+
/** The numbers a line works out, which wait for its cells (0.24's rule for a table's cells). */
|
|
10
|
+
const NUMBERS = new Set(['integer', 'float', 'monetary']);
|
|
11
|
+
/**
|
|
12
|
+
* Which fields of a page each of its values worked out from others is worked out from — what it waits for while one
|
|
13
|
+
* of them holds text that does not read, as a number worked out on a line waits for its line's cells and the table's
|
|
14
|
+
* total for its lines (0.24). The page's own `compute`: the fields it reads, and what each of those it reads that is
|
|
15
|
+
* worked out reads in turn — a sum over a table's lines waits for those lines. The app's (`appWorksOut`, a source
|
|
16
|
+
* with an onchange): an amount no one types in (read-only), which the app works out as the lines change, from any
|
|
17
|
+
* table of lines the page has — a sales order's Untaxed, Taxes and Total, its tax totals. A line's own form (`asLine`:
|
|
18
|
+
* a line opened in its dialog) is the line the table's rule reads: a number on it no one types in waits for any of
|
|
19
|
+
* its fields a person types in, as its cell in the table does. Fields worked out from nothing that can hold such text
|
|
20
|
+
* are left out.
|
|
21
|
+
*/
|
|
22
|
+
function workedOutFrom(page, appWorksOut, asLine = false) {
|
|
23
|
+
const tables = Object.keys(page.fields).filter((name) => page.fields[name].type === 'one2many');
|
|
24
|
+
const typed = Object.keys(page.fields).filter((name) => page.fields[name].readonly !== true && page.fields[name].compute === undefined);
|
|
25
|
+
const reads = new Map();
|
|
26
|
+
for (const [name, def] of Object.entries(page.fields)) {
|
|
27
|
+
if (def.type === 'one2many')
|
|
28
|
+
continue;
|
|
29
|
+
if (asLine && NUMBERS.has(def.type) && (def.readonly === true || def.compute !== undefined))
|
|
30
|
+
reads.set(name, typed);
|
|
31
|
+
else if (def.compute !== undefined) {
|
|
32
|
+
try {
|
|
33
|
+
reads.set(name, (0, expression_1.compileExpression)(def.compute).fields.filter((one) => one !== name && one in page.fields));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// An expression that does not read is refused by the page's checks; it works nothing out here.
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else if (appWorksOut && def.readonly === true && WORKED_OUT.has(def.type) && tables.length)
|
|
40
|
+
reads.set(name, tables);
|
|
41
|
+
}
|
|
42
|
+
const found = new Map();
|
|
43
|
+
/** What a value is worked out from, read through the values worked out it reads. */
|
|
44
|
+
const sources = (name, seen) => {
|
|
45
|
+
seen.add(name);
|
|
46
|
+
const all = (reads.get(name) ?? []).flatMap((one) => (seen.has(one) ? [] : [one, ...(reads.has(one) ? sources(one, seen) : [])]));
|
|
47
|
+
return [...new Set(all)];
|
|
48
|
+
};
|
|
49
|
+
// What holds text a person typed: a field they type in, or a table's lines — never a value worked out.
|
|
50
|
+
for (const name of reads.keys()) {
|
|
51
|
+
const from = sources(name, new Set()).filter((one) => !reads.has(one));
|
|
52
|
+
if (from.length)
|
|
53
|
+
found.set(name, from);
|
|
54
|
+
}
|
|
55
|
+
return found;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The first of `from` holding text that does not read, in the page's order: a field's own, or a table's line's cell
|
|
59
|
+
* (the first line holding one, as people count lines). Null when none does.
|
|
60
|
+
*/
|
|
61
|
+
function waitingOn(page, from, values, unread) {
|
|
62
|
+
const paths = Object.keys(unread);
|
|
63
|
+
if (!paths.length)
|
|
64
|
+
return null;
|
|
65
|
+
for (const field of from) {
|
|
66
|
+
const def = page.fields[field];
|
|
67
|
+
if (!def)
|
|
68
|
+
continue;
|
|
69
|
+
if (def.type !== 'one2many') {
|
|
70
|
+
if (unread[field])
|
|
71
|
+
return { field };
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const held = paths.filter((path) => path.startsWith(`${field}.`));
|
|
75
|
+
if (!held.length)
|
|
76
|
+
continue;
|
|
77
|
+
let n = 0;
|
|
78
|
+
for (const line of values[field] ?? []) {
|
|
79
|
+
if ((0, values_1.lineKind)(def, line.values) !== null)
|
|
80
|
+
continue;
|
|
81
|
+
n++;
|
|
82
|
+
const cell = held.find((path) => path.startsWith(`${field}.${line.key}.`));
|
|
83
|
+
if (cell)
|
|
84
|
+
return { field, line: n, column: cell.slice(field.length + line.key.length + 2).split('.')[0] };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=waits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waits.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/waits.ts"],"names":[],"mappings":";;AAmCA,sCA4BC;AAMD,8BAqBC;AAxFD,yDAA6D;AAE7D,qCAA4D;AAe5D,oHAAoH;AACpH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AACpF,gGAAgG;AAChG,MAAM,OAAO,GAAG,IAAI,GAAG,CAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,SAAgB,aAAa,CAAC,IAAU,EAAE,WAAoB,EAAE,MAAM,GAAG,KAAK;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,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G,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5G,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { compileExpression } from '../expression/expression.mjs';
|
|
2
|
+
import { lineKind } from './values.mjs';
|
|
3
|
+
/** Kinds of value an app works out from a record's lines: amounts, and totals kept whole (Flectra's tax_totals). */
|
|
4
|
+
const WORKED_OUT = new Set(['integer', 'float', 'monetary', 'json']);
|
|
5
|
+
/** The numbers a line works out, which wait for its cells (0.24's rule for a table's cells). */
|
|
6
|
+
const NUMBERS = new Set(['integer', 'float', 'monetary']);
|
|
7
|
+
/**
|
|
8
|
+
* Which fields of a page each of its values worked out from others is worked out from — what it waits for while one
|
|
9
|
+
* of them holds text that does not read, as a number worked out on a line waits for its line's cells and the table's
|
|
10
|
+
* total for its lines (0.24). The page's own `compute`: the fields it reads, and what each of those it reads that is
|
|
11
|
+
* worked out reads in turn — a sum over a table's lines waits for those lines. The app's (`appWorksOut`, a source
|
|
12
|
+
* with an onchange): an amount no one types in (read-only), which the app works out as the lines change, from any
|
|
13
|
+
* table of lines the page has — a sales order's Untaxed, Taxes and Total, its tax totals. A line's own form (`asLine`:
|
|
14
|
+
* a line opened in its dialog) is the line the table's rule reads: a number on it no one types in waits for any of
|
|
15
|
+
* its fields a person types in, as its cell in the table does. Fields worked out from nothing that can hold such text
|
|
16
|
+
* are left out.
|
|
17
|
+
*/
|
|
18
|
+
export function workedOutFrom(page, appWorksOut, asLine = false) {
|
|
19
|
+
const tables = Object.keys(page.fields).filter((name) => page.fields[name].type === 'one2many');
|
|
20
|
+
const typed = Object.keys(page.fields).filter((name) => page.fields[name].readonly !== true && page.fields[name].compute === undefined);
|
|
21
|
+
const reads = new Map();
|
|
22
|
+
for (const [name, def] of Object.entries(page.fields)) {
|
|
23
|
+
if (def.type === 'one2many')
|
|
24
|
+
continue;
|
|
25
|
+
if (asLine && NUMBERS.has(def.type) && (def.readonly === true || def.compute !== undefined))
|
|
26
|
+
reads.set(name, typed);
|
|
27
|
+
else if (def.compute !== undefined) {
|
|
28
|
+
try {
|
|
29
|
+
reads.set(name, compileExpression(def.compute).fields.filter((one) => one !== name && one in page.fields));
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
// An expression that does not read is refused by the page's checks; it works nothing out here.
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (appWorksOut && def.readonly === true && WORKED_OUT.has(def.type) && tables.length)
|
|
36
|
+
reads.set(name, tables);
|
|
37
|
+
}
|
|
38
|
+
const found = new Map();
|
|
39
|
+
/** What a value is worked out from, read through the values worked out it reads. */
|
|
40
|
+
const sources = (name, seen) => {
|
|
41
|
+
seen.add(name);
|
|
42
|
+
const all = (reads.get(name) ?? []).flatMap((one) => (seen.has(one) ? [] : [one, ...(reads.has(one) ? sources(one, seen) : [])]));
|
|
43
|
+
return [...new Set(all)];
|
|
44
|
+
};
|
|
45
|
+
// What holds text a person typed: a field they type in, or a table's lines — never a value worked out.
|
|
46
|
+
for (const name of reads.keys()) {
|
|
47
|
+
const from = sources(name, new Set()).filter((one) => !reads.has(one));
|
|
48
|
+
if (from.length)
|
|
49
|
+
found.set(name, from);
|
|
50
|
+
}
|
|
51
|
+
return found;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The first of `from` holding text that does not read, in the page's order: a field's own, or a table's line's cell
|
|
55
|
+
* (the first line holding one, as people count lines). Null when none does.
|
|
56
|
+
*/
|
|
57
|
+
export function waitingOn(page, from, values, unread) {
|
|
58
|
+
const paths = Object.keys(unread);
|
|
59
|
+
if (!paths.length)
|
|
60
|
+
return null;
|
|
61
|
+
for (const field of from) {
|
|
62
|
+
const def = page.fields[field];
|
|
63
|
+
if (!def)
|
|
64
|
+
continue;
|
|
65
|
+
if (def.type !== 'one2many') {
|
|
66
|
+
if (unread[field])
|
|
67
|
+
return { field };
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
const held = paths.filter((path) => path.startsWith(`${field}.`));
|
|
71
|
+
if (!held.length)
|
|
72
|
+
continue;
|
|
73
|
+
let n = 0;
|
|
74
|
+
for (const line of values[field] ?? []) {
|
|
75
|
+
if (lineKind(def, line.values) !== null)
|
|
76
|
+
continue;
|
|
77
|
+
n++;
|
|
78
|
+
const cell = held.find((path) => path.startsWith(`${field}.${line.key}.`));
|
|
79
|
+
if (cell)
|
|
80
|
+
return { field, line: n, column: cell.slice(field.length + line.key.length + 2).split('.')[0] };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=waits.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waits.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/waits.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAA0B,MAAM,UAAU,CAAC;AAe5D,oHAAoH;AACpH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AACpF,gGAAgG;AAChG,MAAM,OAAO,GAAG,IAAI,GAAG,CAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAAC,IAAU,EAAE,WAAoB,EAAE,MAAM,GAAG,KAAK;IAC5E,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAChG,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM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
6
|
export type { JsonValue } from './lib/format/json.mjs';
|
|
7
7
|
export { FIELD_NAME, FIELD_TYPES, type FieldType } from './lib/format/names.mjs';
|
|
8
|
-
export type { Field, Fields, LineField, LineKinds, Option, OptionsFrom, DefinitionsFrom, PropertyDefinition, FilterCondition, FilterItem, SetWhen, MoneyLook, Period } from './lib/format/field.mjs';
|
|
8
|
+
export type { Field, Fields, LineField, LinkedField, LineKinds, Option, OptionsFrom, DefinitionsFrom, PropertyDefinition, FilterCondition, FilterItem, SetWhen, MoneyLook, Period } from './lib/format/field.mjs';
|
|
9
9
|
export type { Shrink } from './lib/format/field.mjs';
|
|
10
|
-
export type { Modifier, Roles, CellRules, LineOrder, LineForm, PlaceholderWhen, HelpShown, ToneWhen, Tone, FieldNode, ButtonNode, TextNode, SlotNode, SectionNode, TabNode, TabsNode, StepNode, WizardNode, SectionsNode, SheetNode, SheetTitle, SheetHead, SheetKind, HeadLink, HeadBand, Statusbar, StatButton, Ribbon, Alert, Badge, MenuItem, RecordToolbar, AttachmentPreview, ColumnCount, ColumnsByWidth, LayoutNode, RootLayout, ListNode, ListMap, ListCalendar, CalendarView, ListCell, MapCard, CardLine, CardPart, PluralWords, MapLayer, MapNode, MapRoute, MapFence, MapReach, MapRegions, MapTool, Pin, ListFilter, FilterPeriod, LabelPlace, ScreenWidth, AnswerRule, DividerNode, SpacerNode, ImageNode, FormNode, WidgetOptions, } from './lib/format/layout.mjs';
|
|
10
|
+
export type { Modifier, Roles, CellRules, LineOrder, LineForm, PlaceholderWhen, HelpShown, ToneWhen, Tone, FieldNode, ButtonNode, TextNode, SlotNode, SectionNode, TabNode, TabCount, TabsNode, StepNode, WizardNode, SectionsNode, SheetNode, SheetTitle, SheetHead, SheetKind, HeadLink, HeadBand, Statusbar, StatButton, Ribbon, Alert, Badge, MenuItem, RecordToolbar, AttachmentPreview, ColumnCount, ColumnsByWidth, LayoutNode, RootLayout, ListNode, ListMap, ListCalendar, CalendarView, ListCell, ListCard, ListGallery, MapCard, CardLine, CardPart, PluralWords, MapLayer, MapNode, RelatedNode, MapRoute, MapFence, MapReach, MapRegions, MapTool, Pin, ListFilter, FilterPeriod, LabelPlace, ScreenWidth, AnswerRule, DividerNode, SpacerNode, ImageNode, FormNode, WidgetOptions, } from './lib/format/layout.mjs';
|
|
11
11
|
export type { AddressSearchOptions } from './lib/format/address-search.mjs';
|
|
12
12
|
export type { PathPickerOptions, StateDotOptions } from './lib/format/picker-options.mjs';
|
|
13
13
|
export type { PagePhone, PhoneOptions } from './lib/format/phone.mjs';
|
|
14
14
|
export type { SlotsOptions } from './lib/format/slots-options.mjs';
|
|
15
|
+
export type { PageDuplicates } from './lib/format/duplicates.mjs';
|
|
16
|
+
export type { PageRecords } from './lib/format/records.mjs';
|
|
17
|
+
export { labelAt, recordSentence } from './lib/record/record-words.mjs';
|
|
15
18
|
export { wideColumns } from './lib/format/columns.mjs';
|
|
19
|
+
export { relatedInTab } from './lib/format/head-checks.mjs';
|
|
16
20
|
export { BULK_KINDS, bulkEditFields, bulkSettable } from './lib/format/bulk-edit.mjs';
|
|
21
|
+
export { IMPORT_KINDS, importFields, importable } from './lib/format/import-fields.mjs';
|
|
17
22
|
export { cardLines, cardLineFields, cardPart, type CardLinePart } from './lib/format/card-lines.mjs';
|
|
18
|
-
export type { ActionStep, PageEvents, ValueMap, OpenStep, PanelSide, SetStep, ClearStep, AddLineStep, CheckStep, SaveStep, ResetStep, GoToStep, SayStep, AskStep, CallStep, CloseStep, OpenUrlStep, ReloadStep, ArchiveStep, UnarchiveStep, DuplicateStep, DeleteStep, PostStep, } from './lib/format/actions.mjs';
|
|
23
|
+
export type { ActionStep, PageEvents, ValueMap, OpenStep, PanelSide, SetStep, ClearStep, AddLineStep, CheckStep, SaveStep, ResetStep, GoToStep, SayStep, AskStep, CallStep, CloseStep, OpenUrlStep, ReloadStep, ArchiveStep, UnarchiveStep, DuplicateStep, DeleteStep, PostStep, PrintStep, } from './lib/format/actions.mjs';
|
|
19
24
|
export { FORMAT_VERSION, FORMAT_VERSIONS, compareFormats, formatProblem, type FormatVersion } from './lib/format/version.mjs';
|
|
20
25
|
export { upgradePage, PAGE_UPGRADES, type FormatHistory, type PageJson, type PageUpgrade } from './lib/format/upgrade.mjs';
|
|
21
|
-
export type { Page, PageData, PageLook, BotCheck } from './lib/format/page.mjs';
|
|
26
|
+
export type { Page, PageData, PageLook, BotCheck, PagePrint } from './lib/format/page.mjs';
|
|
22
27
|
export { INPUT_MODES, type InputMode } from './lib/format/autofill-group.mjs';
|
|
23
28
|
export { THEMES, type Theme } from './lib/format/themes.mjs';
|
|
24
29
|
export { SKINS, type Skin } from './lib/format/themes.mjs';
|
|
@@ -35,8 +40,8 @@ export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModi
|
|
|
35
40
|
export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, type RecordId, type RelatedRecord, type ReferenceValue, type FileValue, type Line, type Value, type Values, } from './lib/record/values.mjs';
|
|
36
41
|
export { checkValue, checkProperties, decimalsWords, formatBytes, fileProblem, describeTypes } from './lib/record/check.mjs';
|
|
37
42
|
export { scoreOf, type Score } from './lib/record/score.mjs';
|
|
38
|
-
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, BotReport, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, GroupInterval, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, WriteManyRequest, WriteManyResult, ExportRequest, ExportedFile, ExportBytes, SlotsRequest, SlotsResult, SlotDay, SlotDayState, } from './lib/record/data-source.mjs';
|
|
39
|
-
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf } from './lib/record/data-source.mjs';
|
|
43
|
+
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, BotReport, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, GroupInterval, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, WriteManyRequest, WriteManyResult, ExportRequest, ExportedFile, ExportBytes, CreateManyRequest, CreateManyResult, ImportRequest, SlotsRequest, SlotsResult, SlotDay, SlotDayState, DuplicatesRequest, DuplicatesResult, DuplicateMatch, MergeRequest, MergeResult, } from './lib/record/data-source.mjs';
|
|
44
|
+
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf, newRecordSave } from './lib/record/data-source.mjs';
|
|
40
45
|
export { matchesFilter } from './lib/record/filter.mjs';
|
|
41
46
|
export { DATE_PERIODS, DATE_INTERVALS, addDays, dayStarts, spanStart, type DatePeriod, type DateInterval, type DayCount } from './lib/record/periods.mjs';
|
|
42
47
|
export { suggestions, facetsToFilter, groupByFields, type Facet, type Suggestion } from './lib/record/search.mjs';
|
|
@@ -47,7 +52,8 @@ export { uploadGoing, UPLOADS_AT_ONCE, type FileUpload, type UploadHow } from '.
|
|
|
47
52
|
export { uploadTo, type UploadAnswer, type UploadTarget, type UploadToOptions } from './lib/record/upload-to.mjs';
|
|
48
53
|
export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler.mjs';
|
|
49
54
|
export { createForm, unsavedWork, workAtRisk, type LeaveHow, type Form, type FormOptions, type FormUser, type FormState, type FormStatus, type NodeState, type Choices, type Definitions, type DraftStore, type ActionRequest, type ChangeBy, type FormEvents, type FormConflict, type SearchOptions, } from './lib/record/form.mjs';
|
|
50
|
-
export type {
|
|
55
|
+
export type { WaitsFor } from './lib/record/waits.mjs';
|
|
56
|
+
export type { ActionFile, ActionHost, ActionResult, AskHow, ChosenLines, OnAction, OpenRequest, OpenResult, PostedMessage, RunContext, RunResult, RunStop } from './lib/record/run.mjs';
|
|
51
57
|
export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages.mjs';
|
|
52
58
|
export { stripMarks, foldDigits, oneLine, charCount, foldForSearch, numberMarks, readNumber, couldBeNumber, numberMisfit, cleanPastedNumber, readDuration, readDate, foldTyped, couldBeMonth, readTime, placesOfCurrency, placesOf, MOST_DIGITS, type NumberMarks, type NumberProblem, type NumberReading, type NumberRead, type NumberReadOptions, type NumberLimits, type NumberRefusal, type PastedNumber, type DurationProblem, type DurationRead, type DateOrder, type DateProblem, type DateRead, type TimeRead, } from './lib/record/input-rules.mjs';
|
|
53
59
|
export { dayOf } from './lib/record/limits.mjs';
|
package/src/runtime.d.ts
CHANGED
|
@@ -5,20 +5,25 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type { JsonValue } from './lib/format/json';
|
|
7
7
|
export { FIELD_NAME, FIELD_TYPES, type FieldType } from './lib/format/names';
|
|
8
|
-
export type { Field, Fields, LineField, LineKinds, Option, OptionsFrom, DefinitionsFrom, PropertyDefinition, FilterCondition, FilterItem, SetWhen, MoneyLook, Period } from './lib/format/field';
|
|
8
|
+
export type { Field, Fields, LineField, LinkedField, LineKinds, Option, OptionsFrom, DefinitionsFrom, PropertyDefinition, FilterCondition, FilterItem, SetWhen, MoneyLook, Period } from './lib/format/field';
|
|
9
9
|
export type { Shrink } from './lib/format/field';
|
|
10
|
-
export type { Modifier, Roles, CellRules, LineOrder, LineForm, PlaceholderWhen, HelpShown, ToneWhen, Tone, FieldNode, ButtonNode, TextNode, SlotNode, SectionNode, TabNode, TabsNode, StepNode, WizardNode, SectionsNode, SheetNode, SheetTitle, SheetHead, SheetKind, HeadLink, HeadBand, Statusbar, StatButton, Ribbon, Alert, Badge, MenuItem, RecordToolbar, AttachmentPreview, ColumnCount, ColumnsByWidth, LayoutNode, RootLayout, ListNode, ListMap, ListCalendar, CalendarView, ListCell, MapCard, CardLine, CardPart, PluralWords, MapLayer, MapNode, MapRoute, MapFence, MapReach, MapRegions, MapTool, Pin, ListFilter, FilterPeriod, LabelPlace, ScreenWidth, AnswerRule, DividerNode, SpacerNode, ImageNode, FormNode, WidgetOptions, } from './lib/format/layout';
|
|
10
|
+
export type { Modifier, Roles, CellRules, LineOrder, LineForm, PlaceholderWhen, HelpShown, ToneWhen, Tone, FieldNode, ButtonNode, TextNode, SlotNode, SectionNode, TabNode, TabCount, TabsNode, StepNode, WizardNode, SectionsNode, SheetNode, SheetTitle, SheetHead, SheetKind, HeadLink, HeadBand, Statusbar, StatButton, Ribbon, Alert, Badge, MenuItem, RecordToolbar, AttachmentPreview, ColumnCount, ColumnsByWidth, LayoutNode, RootLayout, ListNode, ListMap, ListCalendar, CalendarView, ListCell, ListCard, ListGallery, MapCard, CardLine, CardPart, PluralWords, MapLayer, MapNode, RelatedNode, MapRoute, MapFence, MapReach, MapRegions, MapTool, Pin, ListFilter, FilterPeriod, LabelPlace, ScreenWidth, AnswerRule, DividerNode, SpacerNode, ImageNode, FormNode, WidgetOptions, } from './lib/format/layout';
|
|
11
11
|
export type { AddressSearchOptions } from './lib/format/address-search';
|
|
12
12
|
export type { PathPickerOptions, StateDotOptions } from './lib/format/picker-options';
|
|
13
13
|
export type { PagePhone, PhoneOptions } from './lib/format/phone';
|
|
14
14
|
export type { SlotsOptions } from './lib/format/slots-options';
|
|
15
|
+
export type { PageDuplicates } from './lib/format/duplicates';
|
|
16
|
+
export type { PageRecords } from './lib/format/records';
|
|
17
|
+
export { labelAt, recordSentence } from './lib/record/record-words';
|
|
15
18
|
export { wideColumns } from './lib/format/columns';
|
|
19
|
+
export { relatedInTab } from './lib/format/head-checks';
|
|
16
20
|
export { BULK_KINDS, bulkEditFields, bulkSettable } from './lib/format/bulk-edit';
|
|
21
|
+
export { IMPORT_KINDS, importFields, importable } from './lib/format/import-fields';
|
|
17
22
|
export { cardLines, cardLineFields, cardPart, type CardLinePart } from './lib/format/card-lines';
|
|
18
|
-
export type { ActionStep, PageEvents, ValueMap, OpenStep, PanelSide, SetStep, ClearStep, AddLineStep, CheckStep, SaveStep, ResetStep, GoToStep, SayStep, AskStep, CallStep, CloseStep, OpenUrlStep, ReloadStep, ArchiveStep, UnarchiveStep, DuplicateStep, DeleteStep, PostStep, } from './lib/format/actions';
|
|
23
|
+
export type { ActionStep, PageEvents, ValueMap, OpenStep, PanelSide, SetStep, ClearStep, AddLineStep, CheckStep, SaveStep, ResetStep, GoToStep, SayStep, AskStep, CallStep, CloseStep, OpenUrlStep, ReloadStep, ArchiveStep, UnarchiveStep, DuplicateStep, DeleteStep, PostStep, PrintStep, } from './lib/format/actions';
|
|
19
24
|
export { FORMAT_VERSION, FORMAT_VERSIONS, compareFormats, formatProblem, type FormatVersion } from './lib/format/version';
|
|
20
25
|
export { upgradePage, PAGE_UPGRADES, type FormatHistory, type PageJson, type PageUpgrade } from './lib/format/upgrade';
|
|
21
|
-
export type { Page, PageData, PageLook, BotCheck } from './lib/format/page';
|
|
26
|
+
export type { Page, PageData, PageLook, BotCheck, PagePrint } from './lib/format/page';
|
|
22
27
|
export { INPUT_MODES, type InputMode } from './lib/format/autofill-group';
|
|
23
28
|
export { THEMES, type Theme } from './lib/format/themes';
|
|
24
29
|
export { SKINS, type Skin } from './lib/format/themes';
|
|
@@ -35,8 +40,8 @@ export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModi
|
|
|
35
40
|
export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, type RecordId, type RelatedRecord, type ReferenceValue, type FileValue, type Line, type Value, type Values, } from './lib/record/values';
|
|
36
41
|
export { checkValue, checkProperties, decimalsWords, formatBytes, fileProblem, describeTypes } from './lib/record/check';
|
|
37
42
|
export { scoreOf, type Score } from './lib/record/score';
|
|
38
|
-
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, BotReport, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, GroupInterval, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, WriteManyRequest, WriteManyResult, ExportRequest, ExportedFile, ExportBytes, SlotsRequest, SlotsResult, SlotDay, SlotDayState, } from './lib/record/data-source';
|
|
39
|
-
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf } from './lib/record/data-source';
|
|
43
|
+
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, BotReport, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, GroupInterval, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, WriteManyRequest, WriteManyResult, ExportRequest, ExportedFile, ExportBytes, CreateManyRequest, CreateManyResult, ImportRequest, SlotsRequest, SlotsResult, SlotDay, SlotDayState, DuplicatesRequest, DuplicatesResult, DuplicateMatch, MergeRequest, MergeResult, } from './lib/record/data-source';
|
|
44
|
+
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf, newRecordSave } from './lib/record/data-source';
|
|
40
45
|
export { matchesFilter } from './lib/record/filter';
|
|
41
46
|
export { DATE_PERIODS, DATE_INTERVALS, addDays, dayStarts, spanStart, type DatePeriod, type DateInterval, type DayCount } from './lib/record/periods';
|
|
42
47
|
export { suggestions, facetsToFilter, groupByFields, type Facet, type Suggestion } from './lib/record/search';
|
|
@@ -47,7 +52,8 @@ export { uploadGoing, UPLOADS_AT_ONCE, type FileUpload, type UploadHow } from '.
|
|
|
47
52
|
export { uploadTo, type UploadAnswer, type UploadTarget, type UploadToOptions } from './lib/record/upload-to';
|
|
48
53
|
export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler';
|
|
49
54
|
export { createForm, unsavedWork, workAtRisk, type LeaveHow, type Form, type FormOptions, type FormUser, type FormState, type FormStatus, type NodeState, type Choices, type Definitions, type DraftStore, type ActionRequest, type ChangeBy, type FormEvents, type FormConflict, type SearchOptions, } from './lib/record/form';
|
|
50
|
-
export type {
|
|
55
|
+
export type { WaitsFor } from './lib/record/waits';
|
|
56
|
+
export type { ActionFile, ActionHost, ActionResult, AskHow, ChosenLines, OnAction, OpenRequest, OpenResult, PostedMessage, RunContext, RunResult, RunStop } from './lib/record/run';
|
|
51
57
|
export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages';
|
|
52
58
|
export { stripMarks, foldDigits, oneLine, charCount, foldForSearch, numberMarks, readNumber, couldBeNumber, numberMisfit, cleanPastedNumber, readDuration, readDate, foldTyped, couldBeMonth, readTime, placesOfCurrency, placesOf, MOST_DIGITS, type NumberMarks, type NumberProblem, type NumberReading, type NumberRead, type NumberReadOptions, type NumberLimits, type NumberRefusal, type PastedNumber, type DurationProblem, type DurationRead, type DateOrder, type DateProblem, type DateRead, type TimeRead, } from './lib/record/input-rules';
|
|
53
59
|
export { dayOf } from './lib/record/limits';
|
package/src/runtime.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.fieldPattern = exports.EMAIL_LOCAL_STRAYS = exports.hasPattern = exports.settledText = exports.webAddress = exports.settledPostcode = exports.postcodeFits = exports.ADDRESS_PARTS = exports.dayOf = exports.MOST_DIGITS = exports.placesOf = void 0;
|
|
3
|
+
exports.fileProblem = exports.formatBytes = exports.decimalsWords = exports.checkProperties = exports.checkValue = exports.lineKind = exports.expressionContext = exports.isEmpty = exports.initialValues = exports.emptyValue = exports.isModifierValid = exports.evaluateModifier = exports.rolesAllow = exports.compileModifier = exports.isRightToLeft = exports.pageWords = exports.localizePage = exports.translatePage = exports.hotkeyWords = exports.HOTKEY = exports.BROWSER_HOTKEYS = exports.valuesIn = exports.splitValues = exports.fillValues = exports.checkPage = exports.PART_LOOKS = exports.SKINS = exports.THEMES = exports.INPUT_MODES = exports.PAGE_UPGRADES = exports.upgradePage = exports.formatProblem = exports.compareFormats = exports.FORMAT_VERSIONS = exports.FORMAT_VERSION = exports.cardPart = exports.cardLineFields = exports.cardLines = exports.importable = exports.importFields = exports.IMPORT_KINDS = exports.bulkSettable = exports.bulkEditFields = exports.BULK_KINDS = exports.relatedInTab = exports.wideColumns = exports.recordSentence = exports.labelAt = exports.FIELD_TYPES = exports.FIELD_NAME = void 0;
|
|
4
|
+
exports.numberMisfit = exports.couldBeNumber = exports.readNumber = exports.numberMarks = exports.foldForSearch = exports.charCount = exports.oneLine = exports.foldDigits = exports.stripMarks = exports.fill = exports.MESSAGES = exports.workAtRisk = exports.unsavedWork = exports.createForm = exports.wait = exports.hostScheduler = exports.uploadTo = exports.UPLOADS_AT_ONCE = exports.uploadGoing = exports.zonedPage = exports.zoneOffset = exports.wallTime = exports.wallText = exports.wallOf = exports.wallDay = exports.wallClock = exports.ownZone = exports.isTimeZone = exports.isOwnZone = exports.instantsAt = exports.dayIn = exports.clocksSkip = exports.createMemoryDataSource = exports.groupByFields = exports.facetsToFilter = exports.suggestions = exports.spanStart = exports.dayStarts = exports.addDays = exports.DATE_INTERVALS = exports.DATE_PERIODS = exports.matchesFilter = exports.newRecordSave = exports.loadedRecordOf = exports.loadedRecord = exports.ConflictError = exports.saveProblemOf = exports.saveRefused = exports.scoreOf = exports.describeTypes = void 0;
|
|
5
|
+
exports.fieldPattern = exports.EMAIL_LOCAL_STRAYS = exports.hasPattern = exports.settledText = exports.webAddress = exports.settledPostcode = exports.postcodeFits = exports.ADDRESS_PARTS = exports.dayOf = exports.MOST_DIGITS = exports.placesOf = exports.placesOfCurrency = exports.readTime = exports.couldBeMonth = exports.foldTyped = exports.readDate = exports.readDuration = exports.cleanPastedNumber = void 0;
|
|
6
6
|
var names_1 = require("./lib/format/names");
|
|
7
7
|
Object.defineProperty(exports, "FIELD_NAME", { enumerable: true, get: function () { return names_1.FIELD_NAME; } });
|
|
8
8
|
Object.defineProperty(exports, "FIELD_TYPES", { enumerable: true, get: function () { return names_1.FIELD_TYPES; } });
|
|
9
|
+
var record_words_1 = require("./lib/record/record-words");
|
|
10
|
+
Object.defineProperty(exports, "labelAt", { enumerable: true, get: function () { return record_words_1.labelAt; } });
|
|
11
|
+
Object.defineProperty(exports, "recordSentence", { enumerable: true, get: function () { return record_words_1.recordSentence; } });
|
|
9
12
|
var columns_1 = require("./lib/format/columns");
|
|
10
13
|
Object.defineProperty(exports, "wideColumns", { enumerable: true, get: function () { return columns_1.wideColumns; } });
|
|
14
|
+
var head_checks_1 = require("./lib/format/head-checks");
|
|
15
|
+
Object.defineProperty(exports, "relatedInTab", { enumerable: true, get: function () { return head_checks_1.relatedInTab; } });
|
|
11
16
|
var bulk_edit_1 = require("./lib/format/bulk-edit");
|
|
12
17
|
Object.defineProperty(exports, "BULK_KINDS", { enumerable: true, get: function () { return bulk_edit_1.BULK_KINDS; } });
|
|
13
18
|
Object.defineProperty(exports, "bulkEditFields", { enumerable: true, get: function () { return bulk_edit_1.bulkEditFields; } });
|
|
14
19
|
Object.defineProperty(exports, "bulkSettable", { enumerable: true, get: function () { return bulk_edit_1.bulkSettable; } });
|
|
20
|
+
var import_fields_1 = require("./lib/format/import-fields");
|
|
21
|
+
Object.defineProperty(exports, "IMPORT_KINDS", { enumerable: true, get: function () { return import_fields_1.IMPORT_KINDS; } });
|
|
22
|
+
Object.defineProperty(exports, "importFields", { enumerable: true, get: function () { return import_fields_1.importFields; } });
|
|
23
|
+
Object.defineProperty(exports, "importable", { enumerable: true, get: function () { return import_fields_1.importable; } });
|
|
15
24
|
var card_lines_1 = require("./lib/format/card-lines");
|
|
16
25
|
Object.defineProperty(exports, "cardLines", { enumerable: true, get: function () { return card_lines_1.cardLines; } });
|
|
17
26
|
Object.defineProperty(exports, "cardLineFields", { enumerable: true, get: function () { return card_lines_1.cardLineFields; } });
|
|
@@ -75,6 +84,7 @@ Object.defineProperty(exports, "saveProblemOf", { enumerable: true, get: functio
|
|
|
75
84
|
Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return data_source_1.ConflictError; } });
|
|
76
85
|
Object.defineProperty(exports, "loadedRecord", { enumerable: true, get: function () { return data_source_1.loadedRecord; } });
|
|
77
86
|
Object.defineProperty(exports, "loadedRecordOf", { enumerable: true, get: function () { return data_source_1.loadedRecordOf; } });
|
|
87
|
+
Object.defineProperty(exports, "newRecordSave", { enumerable: true, get: function () { return data_source_1.newRecordSave; } });
|
|
78
88
|
var filter_1 = require("./lib/record/filter");
|
|
79
89
|
Object.defineProperty(exports, "matchesFilter", { enumerable: true, get: function () { return filter_1.matchesFilter; } });
|
|
80
90
|
var periods_1 = require("./lib/record/periods");
|
package/src/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../../libs/core/src/runtime.ts"],"names":[],"mappings":";;;;;AAMA,4CAA6E;AAApE,mGAAA,UAAU,OAAA;AAAE,oGAAA,WAAW,OAAA;
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../../libs/core/src/runtime.ts"],"names":[],"mappings":";;;;;AAMA,4CAA6E;AAApE,mGAAA,UAAU,OAAA;AAAE,oGAAA,WAAW,OAAA;AA+EhC,0DAAoE;AAA3D,uGAAA,OAAO,OAAA;AAAE,8GAAA,cAAc,OAAA;AAChC,gDAAmD;AAA1C,sGAAA,WAAW,OAAA;AACpB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AA8G;AAArG,qGAAA,QAAQ,OAAA;AACjB,oDAA6E;AAApE,0GAAA,aAAa,OAAA;AAAE,iGAAA,IAAI,OAAA;AAC5B,0CAmB2B;AAlBzB,kGAAA,UAAU,OAAA;AACV,mGAAA,WAAW,OAAA;AACX,kGAAA,UAAU,OAAA;AAmBZ,kDAAmF;AAA1E,oGAAA,QAAQ,OAAA;AAAE,gGAAA,IAAI,OAAA;AACvB,wDAiCkC;AAhChC,yGAAA,UAAU,OAAA;AACV,yGAAA,UAAU,OAAA;AACV,sGAAA,OAAO,OAAA;AACP,wGAAA,SAAS,OAAA;AACT,4GAAA,aAAa,OAAA;AACb,0GAAA,WAAW,OAAA;AACX,yGAAA,UAAU,OAAA;AACV,4GAAA,aAAa,OAAA;AACb,2GAAA,YAAY,OAAA;AACZ,gHAAA,iBAAiB,OAAA;AACjB,2GAAA,YAAY,OAAA;AACZ,uGAAA,QAAQ,OAAA;AACR,wGAAA,SAAS,OAAA;AACT,2GAAA,YAAY,OAAA;AACZ,uGAAA,QAAQ,OAAA;AACR,+GAAA,gBAAgB,OAAA;AAChB,uGAAA,QAAQ,OAAA;AACR,0GAAA,WAAW,OAAA;AAgBb,8CAA4C;AAAnC,+FAAA,KAAK,OAAA;AACd,sDAAuF;AAA9E,2GAAA,aAAa,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,6GAAA,eAAe,OAAA;AACrD,8CAA8F;AAArF,oGAAA,UAAU,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,4GAAA,kBAAkB,OAAA;AAChE,gDAAoD;AAA3C,uGAAA,YAAY,OAAA"}
|
package/src/runtime.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { FIELD_NAME, FIELD_TYPES } from './lib/format/names.mjs';
|
|
2
|
+
export { labelAt, recordSentence } from './lib/record/record-words.mjs';
|
|
2
3
|
export { wideColumns } from './lib/format/columns.mjs';
|
|
4
|
+
export { relatedInTab } from './lib/format/head-checks.mjs';
|
|
3
5
|
export { BULK_KINDS, bulkEditFields, bulkSettable } from './lib/format/bulk-edit.mjs';
|
|
6
|
+
export { IMPORT_KINDS, importFields, importable } from './lib/format/import-fields.mjs';
|
|
4
7
|
export { cardLines, cardLineFields, cardPart } from './lib/format/card-lines.mjs';
|
|
5
8
|
export { FORMAT_VERSION, FORMAT_VERSIONS, compareFormats, formatProblem } from './lib/format/version.mjs';
|
|
6
9
|
export { upgradePage, PAGE_UPGRADES } from './lib/format/upgrade.mjs';
|
|
@@ -18,7 +21,7 @@ export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModi
|
|
|
18
21
|
export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, } from './lib/record/values.mjs';
|
|
19
22
|
export { checkValue, checkProperties, decimalsWords, formatBytes, fileProblem, describeTypes } from './lib/record/check.mjs';
|
|
20
23
|
export { scoreOf } from './lib/record/score.mjs';
|
|
21
|
-
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf } from './lib/record/data-source.mjs';
|
|
24
|
+
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf, newRecordSave } from './lib/record/data-source.mjs';
|
|
22
25
|
export { matchesFilter } from './lib/record/filter.mjs';
|
|
23
26
|
export { DATE_PERIODS, DATE_INTERVALS, addDays, dayStarts, spanStart } from './lib/record/periods.mjs';
|
|
24
27
|
export { suggestions, facetsToFilter, groupByFields } from './lib/record/search.mjs';
|
package/src/runtime.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.mjs","sourceRoot":"","sources":["../../../../libs/core/src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.mjs","sourceRoot":"","sources":["../../../../libs/core/src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAkB,M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