@fieldia/core 0.22.0 → 0.24.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 +135 -3
- package/package.json +1 -1
- package/schema/page.schema.json +159 -4
- package/src/index.d.mts +6 -2
- package/src/index.d.ts +6 -2
- package/src/index.js +18 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +8 -2
- package/src/index.mjs.map +1 -1
- package/src/lib/format/autofill-group.d.mts +12 -0
- package/src/lib/format/autofill-group.d.ts +12 -0
- package/src/lib/format/autofill-group.js +23 -0
- package/src/lib/format/autofill-group.js.map +1 -0
- package/src/lib/format/autofill-group.mjs +19 -0
- package/src/lib/format/autofill-group.mjs.map +1 -0
- package/src/lib/format/autofill.d.mts +14 -0
- package/src/lib/format/autofill.d.ts +14 -0
- package/src/lib/format/autofill.js +54 -0
- package/src/lib/format/autofill.js.map +1 -0
- package/src/lib/format/autofill.mjs +48 -0
- package/src/lib/format/autofill.mjs.map +1 -0
- package/src/lib/format/bulk-edit.d.mts +18 -0
- package/src/lib/format/bulk-edit.d.ts +18 -0
- package/src/lib/format/bulk-edit.js +26 -0
- package/src/lib/format/bulk-edit.js.map +1 -0
- package/src/lib/format/bulk-edit.mjs +21 -0
- package/src/lib/format/bulk-edit.mjs.map +1 -0
- package/src/lib/format/field.d.mts +55 -34
- package/src/lib/format/field.d.ts +55 -34
- package/src/lib/format/field.js +16 -2
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +15 -1
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +365 -66
- package/src/lib/format/layout.d.ts +365 -66
- package/src/lib/format/layout.js +22 -4
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +20 -3
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/page.d.mts +169 -29
- package/src/lib/format/page.d.ts +169 -29
- package/src/lib/format/page.js +11 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +12 -1
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/phone.d.mts +27 -0
- package/src/lib/format/phone.d.ts +27 -0
- package/src/lib/format/phone.js +43 -0
- package/src/lib/format/phone.js.map +1 -0
- package/src/lib/format/phone.mjs +39 -0
- package/src/lib/format/phone.mjs.map +1 -0
- package/src/lib/format/references.d.mts +10 -0
- package/src/lib/format/references.d.ts +10 -0
- package/src/lib/format/references.js +96 -1
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +96 -1
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/format/slots-options.d.mts +26 -0
- package/src/lib/format/slots-options.d.ts +26 -0
- package/src/lib/format/slots-options.js +35 -0
- package/src/lib/format/slots-options.js.map +1 -0
- package/src/lib/format/slots-options.mjs +31 -0
- package/src/lib/format/slots-options.mjs.map +1 -0
- package/src/lib/format/upgrade.d.mts +4 -1
- package/src/lib/format/upgrade.d.ts +4 -1
- package/src/lib/format/upgrade.js +4 -1
- package/src/lib/format/upgrade.js.map +1 -1
- package/src/lib/format/upgrade.mjs +4 -1
- 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/format/zoned.d.mts +8 -0
- package/src/lib/format/zoned.d.ts +8 -0
- package/src/lib/format/zoned.js +36 -0
- package/src/lib/format/zoned.js.map +1 -0
- package/src/lib/format/zoned.mjs +33 -0
- package/src/lib/format/zoned.mjs.map +1 -0
- package/src/lib/record/check.d.mts +6 -1
- package/src/lib/record/check.d.ts +6 -1
- package/src/lib/record/check.js +12 -4
- package/src/lib/record/check.js.map +1 -1
- package/src/lib/record/check.mjs +12 -4
- package/src/lib/record/check.mjs.map +1 -1
- package/src/lib/record/data-source.d.mts +188 -3
- package/src/lib/record/data-source.d.ts +188 -3
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/form.d.mts +72 -25
- package/src/lib/record/form.d.ts +72 -25
- package/src/lib/record/form.js +404 -78
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +404 -78
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/input-rules.d.mts +51 -9
- package/src/lib/record/input-rules.d.ts +51 -9
- package/src/lib/record/input-rules.js +119 -20
- package/src/lib/record/input-rules.js.map +1 -1
- package/src/lib/record/input-rules.mjs +118 -19
- package/src/lib/record/input-rules.mjs.map +1 -1
- package/src/lib/record/inputs.js +4 -2
- package/src/lib/record/inputs.js.map +1 -1
- package/src/lib/record/inputs.mjs +4 -2
- package/src/lib/record/inputs.mjs.map +1 -1
- package/src/lib/record/limits.d.mts +1 -1
- package/src/lib/record/limits.d.ts +1 -1
- package/src/lib/record/limits.js +4 -2
- package/src/lib/record/limits.js.map +1 -1
- package/src/lib/record/limits.mjs +4 -2
- package/src/lib/record/limits.mjs.map +1 -1
- package/src/lib/record/locales/ar.js +3 -2
- package/src/lib/record/locales/ar.js.map +1 -1
- package/src/lib/record/locales/ar.mjs +3 -2
- package/src/lib/record/locales/ar.mjs.map +1 -1
- package/src/lib/record/locales/de.js +3 -2
- package/src/lib/record/locales/de.js.map +1 -1
- package/src/lib/record/locales/de.mjs +3 -2
- package/src/lib/record/locales/de.mjs.map +1 -1
- package/src/lib/record/locales/fr.js +3 -2
- package/src/lib/record/locales/fr.js.map +1 -1
- package/src/lib/record/locales/fr.mjs +3 -2
- package/src/lib/record/locales/fr.mjs.map +1 -1
- package/src/lib/record/memory-data-source.d.mts +13 -2
- package/src/lib/record/memory-data-source.d.ts +13 -2
- package/src/lib/record/memory-data-source.js +92 -35
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +93 -36
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/memory-schedules.d.mts +45 -0
- package/src/lib/record/memory-schedules.d.ts +45 -0
- package/src/lib/record/memory-schedules.js +81 -0
- package/src/lib/record/memory-schedules.js.map +1 -0
- package/src/lib/record/memory-schedules.mjs +78 -0
- package/src/lib/record/memory-schedules.mjs.map +1 -0
- package/src/lib/record/messages.d.mts +3 -1
- package/src/lib/record/messages.d.ts +3 -1
- package/src/lib/record/messages.js +3 -2
- package/src/lib/record/messages.js.map +1 -1
- package/src/lib/record/messages.mjs +3 -2
- package/src/lib/record/messages.mjs.map +1 -1
- package/src/lib/record/periods.d.mts +47 -0
- package/src/lib/record/periods.d.ts +47 -0
- package/src/lib/record/periods.js +86 -0
- package/src/lib/record/periods.js.map +1 -0
- package/src/lib/record/periods.mjs +79 -0
- package/src/lib/record/periods.mjs.map +1 -0
- package/src/lib/record/rules.js +5 -6
- package/src/lib/record/rules.js.map +1 -1
- package/src/lib/record/rules.mjs +5 -6
- package/src/lib/record/rules.mjs.map +1 -1
- package/src/lib/record/run.d.mts +44 -8
- package/src/lib/record/run.d.ts +44 -8
- package/src/lib/record/run.js +155 -26
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +156 -27
- package/src/lib/record/run.mjs.map +1 -1
- package/src/lib/record/search.d.mts +13 -3
- package/src/lib/record/search.d.ts +13 -3
- package/src/lib/record/search.js +11 -4
- package/src/lib/record/search.js.map +1 -1
- package/src/lib/record/search.mjs +11 -4
- package/src/lib/record/search.mjs.map +1 -1
- package/src/lib/record/zones.d.mts +57 -0
- package/src/lib/record/zones.d.ts +57 -0
- package/src/lib/record/zones.js +147 -0
- package/src/lib/record/zones.js.map +1 -0
- package/src/lib/record/zones.mjs +132 -0
- package/src/lib/record/zones.mjs.map +1 -0
- package/src/runtime.d.mts +12 -5
- package/src/runtime.d.ts +12 -5
- package/src/runtime.js +32 -2
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +7 -1
- package/src/runtime.mjs.map +1 -1
|
@@ -58,8 +58,12 @@ export function suggestions(typed, page, list, words = { searchFor: 'Search {fie
|
|
|
58
58
|
};
|
|
59
59
|
return found.map((s, i) => ({ s, i })).sort((a, b) => rank(a.s) - rank(b.s) || a.i - b.i).map(({ s }) => s);
|
|
60
60
|
}
|
|
61
|
-
/**
|
|
62
|
-
|
|
61
|
+
/**
|
|
62
|
+
* The filter a list's facets make: the values of one field any of them, named filters any of them, the facets all
|
|
63
|
+
* together. A period — a named filter's, a custom filter's — is counted by `periods`, as the list counts days (its
|
|
64
|
+
* clock, its week, its time zone); a custom filter without it keeps what it was counted as.
|
|
65
|
+
*/
|
|
66
|
+
export function facetsToFilter(facets, list, periods) {
|
|
63
67
|
const filter = [];
|
|
64
68
|
for (const facet of facets) {
|
|
65
69
|
if (facet.kind === 'field') {
|
|
@@ -68,14 +72,17 @@ export function facetsToFilter(facets, list) {
|
|
|
68
72
|
}
|
|
69
73
|
else if (facet.kind === 'filters') {
|
|
70
74
|
// A list's own filters have no valueFrom: their conditions are already values.
|
|
71
|
-
const chosen = facet.ids
|
|
75
|
+
const chosen = facet.ids
|
|
76
|
+
.map((id) => list.filters?.find((f) => f.id === id))
|
|
77
|
+
.map((named) => [...(named?.filter ?? []), ...(named?.period && periods ? periods(named.period) : [])])
|
|
78
|
+
.filter((items) => items.length);
|
|
72
79
|
if (chosen.length === 1)
|
|
73
80
|
filter.push(...chosen[0]);
|
|
74
81
|
else if (chosen.length > 1)
|
|
75
82
|
filter.push({ any: chosen.map((items) => (items.length === 1 ? items[0] : { all: items })) });
|
|
76
83
|
}
|
|
77
84
|
else if (facet.kind === 'custom') {
|
|
78
|
-
filter.push(...facet.filter);
|
|
85
|
+
filter.push(...(facet.period && periods ? periods(facet.period) : facet.filter));
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
return filter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/search.ts"],"names":[],"mappings":"AAIA,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,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;iBAC5H,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACnC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;gBAAE,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC9C,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;gBAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5H,CAAC;aAAM,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACnC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;QACnF,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,aAAa,CAAC,MAAwB;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAA4C,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;AAC1G,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time zones, by their IANA names ("Africa/Cairo", "Europe/Berlin"): a page's
|
|
3
|
+
* `timeZone`, or a date and time field's own. A date and time is kept as an
|
|
4
|
+
* instant (written in UTC, 2026-10-15T12:30:00.000Z, as Fieldia always kept
|
|
5
|
+
* one; an instant written with its offset is read the same) and shown, typed
|
|
6
|
+
* and counted by its day in its zone — the browser's own where none is named.
|
|
7
|
+
* Made from Intl alone, so no zone's rules are carried in the code.
|
|
8
|
+
*
|
|
9
|
+
* On a day the clocks change, a time on the clock may not exist (the hour they
|
|
10
|
+
* skip) or exist twice (the hour they repeat): `instantsAt` gives none, or
|
|
11
|
+
* both, and what reads a typed time says so — it is never moved in silence.
|
|
12
|
+
*/
|
|
13
|
+
/** A day and a time on the clock in some zone, to the minute. */
|
|
14
|
+
export interface WallTime {
|
|
15
|
+
year: number;
|
|
16
|
+
/** 1 to 12. */
|
|
17
|
+
month: number;
|
|
18
|
+
day: number;
|
|
19
|
+
hour: number;
|
|
20
|
+
minute: number;
|
|
21
|
+
}
|
|
22
|
+
/** Whether a name is a time zone the browser knows, by its IANA name: "Africa/Cairo", "UTC". Never an offset. */
|
|
23
|
+
export declare function isTimeZone(name: unknown): name is string;
|
|
24
|
+
/** The browser's own time zone, by its IANA name. */
|
|
25
|
+
export declare function ownZone(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether a zone keeps the browser's own clock: the same time through the year, in winter and summer — the browser's
|
|
28
|
+
* zone by any of its names ("Asia/Calcutta", "Asia/Kolkata"), or a neighbour on the same clock. Asked once a zone.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isOwnZone(zone: string): boolean;
|
|
31
|
+
/** The clock in `zone` at an instant (in ms), to the minute: the browser's own clock without one. */
|
|
32
|
+
export declare function wallTime(at: number, zone?: string): WallTime;
|
|
33
|
+
/** A day as a date field keeps it: 2026-10-15. */
|
|
34
|
+
export declare const wallDay: (wall: WallTime) => string;
|
|
35
|
+
/** A clock's time: 14:30. */
|
|
36
|
+
export declare const wallClock: (wall: WallTime) => string;
|
|
37
|
+
/** A wall time as the date readers write one: 2026-10-15T14:30. */
|
|
38
|
+
export declare const wallText: (wall: WallTime) => string;
|
|
39
|
+
/** A wall time read back from yyyy-mm-dd and, after a T, HH:MM (midnight without). */
|
|
40
|
+
export declare function wallOf(text: string): WallTime | null;
|
|
41
|
+
/** Minutes the zone's clock is ahead of UTC at an instant: 180 in Cairo's summer, -240 in New York's. */
|
|
42
|
+
export declare function zoneOffset(at: number, zone?: string): number;
|
|
43
|
+
/**
|
|
44
|
+
* The instants a time on the clock is in a zone, earliest first: one; none in the hour the clocks skip as they go
|
|
45
|
+
* forward; two in the hour they repeat as they go back. The browser's own zone without one.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instantsAt(wall: WallTime, zone?: string): number[];
|
|
48
|
+
/** The day an instant falls on in a zone, 2026-10-15: the browser's own without one. */
|
|
49
|
+
export declare function dayIn(at: number | Date, zone?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* The clocks' change that skips a time on the clock, which `instantsAt` found none of: the time they went forward
|
|
52
|
+
* from and the time they went to (02:00 → 03:00), or null where nothing was skipped.
|
|
53
|
+
*/
|
|
54
|
+
export declare function clocksSkip(wall: WallTime, zone?: string): {
|
|
55
|
+
from: WallTime;
|
|
56
|
+
to: WallTime;
|
|
57
|
+
} | null;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time zones, by their IANA names ("Africa/Cairo", "Europe/Berlin"): a page's
|
|
3
|
+
* `timeZone`, or a date and time field's own. A date and time is kept as an
|
|
4
|
+
* instant (written in UTC, 2026-10-15T12:30:00.000Z, as Fieldia always kept
|
|
5
|
+
* one; an instant written with its offset is read the same) and shown, typed
|
|
6
|
+
* and counted by its day in its zone — the browser's own where none is named.
|
|
7
|
+
* Made from Intl alone, so no zone's rules are carried in the code.
|
|
8
|
+
*
|
|
9
|
+
* On a day the clocks change, a time on the clock may not exist (the hour they
|
|
10
|
+
* skip) or exist twice (the hour they repeat): `instantsAt` gives none, or
|
|
11
|
+
* both, and what reads a typed time says so — it is never moved in silence.
|
|
12
|
+
*/
|
|
13
|
+
/** A day and a time on the clock in some zone, to the minute. */
|
|
14
|
+
export interface WallTime {
|
|
15
|
+
year: number;
|
|
16
|
+
/** 1 to 12. */
|
|
17
|
+
month: number;
|
|
18
|
+
day: number;
|
|
19
|
+
hour: number;
|
|
20
|
+
minute: number;
|
|
21
|
+
}
|
|
22
|
+
/** Whether a name is a time zone the browser knows, by its IANA name: "Africa/Cairo", "UTC". Never an offset. */
|
|
23
|
+
export declare function isTimeZone(name: unknown): name is string;
|
|
24
|
+
/** The browser's own time zone, by its IANA name. */
|
|
25
|
+
export declare function ownZone(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether a zone keeps the browser's own clock: the same time through the year, in winter and summer — the browser's
|
|
28
|
+
* zone by any of its names ("Asia/Calcutta", "Asia/Kolkata"), or a neighbour on the same clock. Asked once a zone.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isOwnZone(zone: string): boolean;
|
|
31
|
+
/** The clock in `zone` at an instant (in ms), to the minute: the browser's own clock without one. */
|
|
32
|
+
export declare function wallTime(at: number, zone?: string): WallTime;
|
|
33
|
+
/** A day as a date field keeps it: 2026-10-15. */
|
|
34
|
+
export declare const wallDay: (wall: WallTime) => string;
|
|
35
|
+
/** A clock's time: 14:30. */
|
|
36
|
+
export declare const wallClock: (wall: WallTime) => string;
|
|
37
|
+
/** A wall time as the date readers write one: 2026-10-15T14:30. */
|
|
38
|
+
export declare const wallText: (wall: WallTime) => string;
|
|
39
|
+
/** A wall time read back from yyyy-mm-dd and, after a T, HH:MM (midnight without). */
|
|
40
|
+
export declare function wallOf(text: string): WallTime | null;
|
|
41
|
+
/** Minutes the zone's clock is ahead of UTC at an instant: 180 in Cairo's summer, -240 in New York's. */
|
|
42
|
+
export declare function zoneOffset(at: number, zone?: string): number;
|
|
43
|
+
/**
|
|
44
|
+
* The instants a time on the clock is in a zone, earliest first: one; none in the hour the clocks skip as they go
|
|
45
|
+
* forward; two in the hour they repeat as they go back. The browser's own zone without one.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instantsAt(wall: WallTime, zone?: string): number[];
|
|
48
|
+
/** The day an instant falls on in a zone, 2026-10-15: the browser's own without one. */
|
|
49
|
+
export declare function dayIn(at: number | Date, zone?: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* The clocks' change that skips a time on the clock, which `instantsAt` found none of: the time they went forward
|
|
52
|
+
* from and the time they went to (02:00 → 03:00), or null where nothing was skipped.
|
|
53
|
+
*/
|
|
54
|
+
export declare function clocksSkip(wall: WallTime, zone?: string): {
|
|
55
|
+
from: WallTime;
|
|
56
|
+
to: WallTime;
|
|
57
|
+
} | null;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Time zones, by their IANA names ("Africa/Cairo", "Europe/Berlin"): a page's
|
|
4
|
+
* `timeZone`, or a date and time field's own. A date and time is kept as an
|
|
5
|
+
* instant (written in UTC, 2026-10-15T12:30:00.000Z, as Fieldia always kept
|
|
6
|
+
* one; an instant written with its offset is read the same) and shown, typed
|
|
7
|
+
* and counted by its day in its zone — the browser's own where none is named.
|
|
8
|
+
* Made from Intl alone, so no zone's rules are carried in the code.
|
|
9
|
+
*
|
|
10
|
+
* On a day the clocks change, a time on the clock may not exist (the hour they
|
|
11
|
+
* skip) or exist twice (the hour they repeat): `instantsAt` gives none, or
|
|
12
|
+
* both, and what reads a typed time says so — it is never moved in silence.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.wallText = exports.wallClock = exports.wallDay = void 0;
|
|
16
|
+
exports.isTimeZone = isTimeZone;
|
|
17
|
+
exports.ownZone = ownZone;
|
|
18
|
+
exports.isOwnZone = isOwnZone;
|
|
19
|
+
exports.wallTime = wallTime;
|
|
20
|
+
exports.wallOf = wallOf;
|
|
21
|
+
exports.zoneOffset = zoneOffset;
|
|
22
|
+
exports.instantsAt = instantsAt;
|
|
23
|
+
exports.dayIn = dayIn;
|
|
24
|
+
exports.clocksSkip = clocksSkip;
|
|
25
|
+
const MINUTE = 60000;
|
|
26
|
+
const clocks = new Map();
|
|
27
|
+
/** The clock of a zone, read in parts: Intl's, the Gregorian calendar, 24 hours, Latin digits. */
|
|
28
|
+
function clockOf(zone) {
|
|
29
|
+
let clock = clocks.get(zone);
|
|
30
|
+
if (!clock) {
|
|
31
|
+
clock = new Intl.DateTimeFormat('en-US', { timeZone: zone, calendar: 'gregory', numberingSystem: 'latn', hourCycle: 'h23', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' });
|
|
32
|
+
clocks.set(zone, clock);
|
|
33
|
+
}
|
|
34
|
+
return clock;
|
|
35
|
+
}
|
|
36
|
+
/** Whether a name is a time zone the browser knows, by its IANA name: "Africa/Cairo", "UTC". Never an offset. */
|
|
37
|
+
function isTimeZone(name) {
|
|
38
|
+
if (typeof name !== 'string' || !/^[A-Za-z][\w+-]*(\/[\w+-]+)*$/.test(name))
|
|
39
|
+
return false;
|
|
40
|
+
try {
|
|
41
|
+
clockOf(name);
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** The browser's own time zone, by its IANA name. */
|
|
49
|
+
function ownZone() {
|
|
50
|
+
return new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
51
|
+
}
|
|
52
|
+
const own = new Map();
|
|
53
|
+
/**
|
|
54
|
+
* Whether a zone keeps the browser's own clock: the same time through the year, in winter and summer — the browser's
|
|
55
|
+
* zone by any of its names ("Asia/Calcutta", "Asia/Kolkata"), or a neighbour on the same clock. Asked once a zone.
|
|
56
|
+
*/
|
|
57
|
+
function isOwnZone(zone) {
|
|
58
|
+
let same = own.get(zone);
|
|
59
|
+
if (same === undefined) {
|
|
60
|
+
const year = new Date().getFullYear();
|
|
61
|
+
same = [0, 3, 6, 9].every((month) => zoneOffset(Date.UTC(year, month, 15), zone) === zoneOffset(Date.UTC(year, month, 15)));
|
|
62
|
+
own.set(zone, same);
|
|
63
|
+
}
|
|
64
|
+
return same;
|
|
65
|
+
}
|
|
66
|
+
/** The clock in `zone` at an instant (in ms), to the minute: the browser's own clock without one. */
|
|
67
|
+
function wallTime(at, zone) {
|
|
68
|
+
if (!zone) {
|
|
69
|
+
const d = new Date(at);
|
|
70
|
+
return { year: d.getFullYear(), month: d.getMonth() + 1, day: d.getDate(), hour: d.getHours(), minute: d.getMinutes() };
|
|
71
|
+
}
|
|
72
|
+
const read = {};
|
|
73
|
+
for (const part of clockOf(zone).formatToParts(at))
|
|
74
|
+
read[part.type] = Number(part.value);
|
|
75
|
+
return { year: read['year'], month: read['month'], day: read['day'], hour: read['hour'] % 24, minute: read['minute'] };
|
|
76
|
+
}
|
|
77
|
+
const pad = (n, width = 2) => String(n).padStart(width, '0');
|
|
78
|
+
/** A day as a date field keeps it: 2026-10-15. */
|
|
79
|
+
const wallDay = (wall) => `${pad(wall.year, 4)}-${pad(wall.month)}-${pad(wall.day)}`;
|
|
80
|
+
exports.wallDay = wallDay;
|
|
81
|
+
/** A clock's time: 14:30. */
|
|
82
|
+
const wallClock = (wall) => `${pad(wall.hour)}:${pad(wall.minute)}`;
|
|
83
|
+
exports.wallClock = wallClock;
|
|
84
|
+
/** A wall time as the date readers write one: 2026-10-15T14:30. */
|
|
85
|
+
const wallText = (wall) => `${(0, exports.wallDay)(wall)}T${(0, exports.wallClock)(wall)}`;
|
|
86
|
+
exports.wallText = wallText;
|
|
87
|
+
/** A wall time read back from yyyy-mm-dd and, after a T, HH:MM (midnight without). */
|
|
88
|
+
function wallOf(text) {
|
|
89
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?/.exec(text);
|
|
90
|
+
return m ? { year: Number(m[1]), month: Number(m[2]), day: Number(m[3]), hour: Number(m[4] ?? 0), minute: Number(m[5] ?? 0) } : null;
|
|
91
|
+
}
|
|
92
|
+
/** A wall time as if it were UTC, in ms: what the zone's offset is added to. */
|
|
93
|
+
const asUtc = (wall) => Date.UTC(wall.year, wall.month - 1, wall.day, wall.hour, wall.minute);
|
|
94
|
+
/** The minute an instant falls in. */
|
|
95
|
+
const floorMinute = (at) => Math.floor(at / MINUTE) * MINUTE;
|
|
96
|
+
/** Minutes the zone's clock is ahead of UTC at an instant: 180 in Cairo's summer, -240 in New York's. */
|
|
97
|
+
function zoneOffset(at, zone) {
|
|
98
|
+
return Math.round((asUtc(wallTime(at, zone)) - floorMinute(at)) / MINUTE);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The instants a time on the clock is in a zone, earliest first: one; none in the hour the clocks skip as they go
|
|
102
|
+
* forward; two in the hour they repeat as they go back. The browser's own zone without one.
|
|
103
|
+
*/
|
|
104
|
+
function instantsAt(wall, zone) {
|
|
105
|
+
const local = asUtc(wall);
|
|
106
|
+
const found = new Set();
|
|
107
|
+
// The zone's offsets a day either side: what the clock is ahead by before a change near it and after.
|
|
108
|
+
for (const probe of [local - 86400000, local, local + 86400000]) {
|
|
109
|
+
const at = local - zoneOffset(probe, zone) * MINUTE;
|
|
110
|
+
if (asUtc(wallTime(at, zone)) === local)
|
|
111
|
+
found.add(at);
|
|
112
|
+
}
|
|
113
|
+
return [...found].sort((a, b) => a - b);
|
|
114
|
+
}
|
|
115
|
+
/** The day an instant falls on in a zone, 2026-10-15: the browser's own without one. */
|
|
116
|
+
function dayIn(at, zone) {
|
|
117
|
+
return (0, exports.wallDay)(wallTime(typeof at === 'number' ? at : at.getTime(), zone));
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The clocks' change that skips a time on the clock, which `instantsAt` found none of: the time they went forward
|
|
121
|
+
* from and the time they went to (02:00 → 03:00), or null where nothing was skipped.
|
|
122
|
+
*/
|
|
123
|
+
function clocksSkip(wall, zone) {
|
|
124
|
+
const local = asUtc(wall);
|
|
125
|
+
const before = zoneOffset(local - 86400000, zone);
|
|
126
|
+
const after = zoneOffset(local + 86400000, zone);
|
|
127
|
+
if (after <= before || instantsAt(wall, zone).length)
|
|
128
|
+
return null;
|
|
129
|
+
// The change is between the instant the time would be at the later offset and at the earlier: its first minute.
|
|
130
|
+
let low = local - after * MINUTE;
|
|
131
|
+
let high = local - before * MINUTE;
|
|
132
|
+
while (high - low > MINUTE) {
|
|
133
|
+
const middle = floorMinute((low + high) / 2);
|
|
134
|
+
if (zoneOffset(middle, zone) === after)
|
|
135
|
+
high = middle;
|
|
136
|
+
else
|
|
137
|
+
low = middle;
|
|
138
|
+
}
|
|
139
|
+
// Its first minute at the later offset: the clock read it at the earlier one just before, and reads it at the later.
|
|
140
|
+
return { from: utcWall(high + before * MINUTE), to: utcWall(high + after * MINUTE) };
|
|
141
|
+
}
|
|
142
|
+
/** A number of ms read as a UTC clock's parts: the inverse of asUtc. */
|
|
143
|
+
function utcWall(ms) {
|
|
144
|
+
const d = new Date(ms);
|
|
145
|
+
return { year: d.getUTCFullYear(), month: d.getUTCMonth() + 1, day: d.getUTCDate(), hour: d.getUTCHours(), minute: d.getUTCMinutes() };
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=zones.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zones.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/zones.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAyBH,gCAQC;AAGD,0BAEC;AAOD,8BAQC;AAGD,4BAQC;AAUD,wBAGC;AAQD,gCAEC;AAMD,gCASC;AAGD,sBAEC;AAMD,gCAeC;AApHD,MAAM,MAAM,GAAG,KAAK,CAAC;AACrB,MAAM,MAAM,GAAG,IAAI,GAAG,EAA+B,CAAC;AACtD,kGAAkG;AAClG,SAAS,OAAO,CAAC,IAAY;IAC3B,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ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IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC;AACzI,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time zones, by their IANA names ("Africa/Cairo", "Europe/Berlin"): a page's
|
|
3
|
+
* `timeZone`, or a date and time field's own. A date and time is kept as an
|
|
4
|
+
* instant (written in UTC, 2026-10-15T12:30:00.000Z, as Fieldia always kept
|
|
5
|
+
* one; an instant written with its offset is read the same) and shown, typed
|
|
6
|
+
* and counted by its day in its zone — the browser's own where none is named.
|
|
7
|
+
* Made from Intl alone, so no zone's rules are carried in the code.
|
|
8
|
+
*
|
|
9
|
+
* On a day the clocks change, a time on the clock may not exist (the hour they
|
|
10
|
+
* skip) or exist twice (the hour they repeat): `instantsAt` gives none, or
|
|
11
|
+
* both, and what reads a typed time says so — it is never moved in silence.
|
|
12
|
+
*/
|
|
13
|
+
const MINUTE = 60000;
|
|
14
|
+
const clocks = new Map();
|
|
15
|
+
/** The clock of a zone, read in parts: Intl's, the Gregorian calendar, 24 hours, Latin digits. */
|
|
16
|
+
function clockOf(zone) {
|
|
17
|
+
let clock = clocks.get(zone);
|
|
18
|
+
if (!clock) {
|
|
19
|
+
clock = new Intl.DateTimeFormat('en-US', { timeZone: zone, calendar: 'gregory', numberingSystem: 'latn', hourCycle: 'h23', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' });
|
|
20
|
+
clocks.set(zone, clock);
|
|
21
|
+
}
|
|
22
|
+
return clock;
|
|
23
|
+
}
|
|
24
|
+
/** Whether a name is a time zone the browser knows, by its IANA name: "Africa/Cairo", "UTC". Never an offset. */
|
|
25
|
+
export function isTimeZone(name) {
|
|
26
|
+
if (typeof name !== 'string' || !/^[A-Za-z][\w+-]*(\/[\w+-]+)*$/.test(name))
|
|
27
|
+
return false;
|
|
28
|
+
try {
|
|
29
|
+
clockOf(name);
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** The browser's own time zone, by its IANA name. */
|
|
37
|
+
export function ownZone() {
|
|
38
|
+
return new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
39
|
+
}
|
|
40
|
+
const own = new Map();
|
|
41
|
+
/**
|
|
42
|
+
* Whether a zone keeps the browser's own clock: the same time through the year, in winter and summer — the browser's
|
|
43
|
+
* zone by any of its names ("Asia/Calcutta", "Asia/Kolkata"), or a neighbour on the same clock. Asked once a zone.
|
|
44
|
+
*/
|
|
45
|
+
export function isOwnZone(zone) {
|
|
46
|
+
let same = own.get(zone);
|
|
47
|
+
if (same === undefined) {
|
|
48
|
+
const year = new Date().getFullYear();
|
|
49
|
+
same = [0, 3, 6, 9].every((month) => zoneOffset(Date.UTC(year, month, 15), zone) === zoneOffset(Date.UTC(year, month, 15)));
|
|
50
|
+
own.set(zone, same);
|
|
51
|
+
}
|
|
52
|
+
return same;
|
|
53
|
+
}
|
|
54
|
+
/** The clock in `zone` at an instant (in ms), to the minute: the browser's own clock without one. */
|
|
55
|
+
export function wallTime(at, zone) {
|
|
56
|
+
if (!zone) {
|
|
57
|
+
const d = new Date(at);
|
|
58
|
+
return { year: d.getFullYear(), month: d.getMonth() + 1, day: d.getDate(), hour: d.getHours(), minute: d.getMinutes() };
|
|
59
|
+
}
|
|
60
|
+
const read = {};
|
|
61
|
+
for (const part of clockOf(zone).formatToParts(at))
|
|
62
|
+
read[part.type] = Number(part.value);
|
|
63
|
+
return { year: read['year'], month: read['month'], day: read['day'], hour: read['hour'] % 24, minute: read['minute'] };
|
|
64
|
+
}
|
|
65
|
+
const pad = (n, width = 2) => String(n).padStart(width, '0');
|
|
66
|
+
/** A day as a date field keeps it: 2026-10-15. */
|
|
67
|
+
export const wallDay = (wall) => `${pad(wall.year, 4)}-${pad(wall.month)}-${pad(wall.day)}`;
|
|
68
|
+
/** A clock's time: 14:30. */
|
|
69
|
+
export const wallClock = (wall) => `${pad(wall.hour)}:${pad(wall.minute)}`;
|
|
70
|
+
/** A wall time as the date readers write one: 2026-10-15T14:30. */
|
|
71
|
+
export const wallText = (wall) => `${wallDay(wall)}T${wallClock(wall)}`;
|
|
72
|
+
/** A wall time read back from yyyy-mm-dd and, after a T, HH:MM (midnight without). */
|
|
73
|
+
export function wallOf(text) {
|
|
74
|
+
const m = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?/.exec(text);
|
|
75
|
+
return m ? { year: Number(m[1]), month: Number(m[2]), day: Number(m[3]), hour: Number(m[4] ?? 0), minute: Number(m[5] ?? 0) } : null;
|
|
76
|
+
}
|
|
77
|
+
/** A wall time as if it were UTC, in ms: what the zone's offset is added to. */
|
|
78
|
+
const asUtc = (wall) => Date.UTC(wall.year, wall.month - 1, wall.day, wall.hour, wall.minute);
|
|
79
|
+
/** The minute an instant falls in. */
|
|
80
|
+
const floorMinute = (at) => Math.floor(at / MINUTE) * MINUTE;
|
|
81
|
+
/** Minutes the zone's clock is ahead of UTC at an instant: 180 in Cairo's summer, -240 in New York's. */
|
|
82
|
+
export function zoneOffset(at, zone) {
|
|
83
|
+
return Math.round((asUtc(wallTime(at, zone)) - floorMinute(at)) / MINUTE);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The instants a time on the clock is in a zone, earliest first: one; none in the hour the clocks skip as they go
|
|
87
|
+
* forward; two in the hour they repeat as they go back. The browser's own zone without one.
|
|
88
|
+
*/
|
|
89
|
+
export function instantsAt(wall, zone) {
|
|
90
|
+
const local = asUtc(wall);
|
|
91
|
+
const found = new Set();
|
|
92
|
+
// The zone's offsets a day either side: what the clock is ahead by before a change near it and after.
|
|
93
|
+
for (const probe of [local - 86400000, local, local + 86400000]) {
|
|
94
|
+
const at = local - zoneOffset(probe, zone) * MINUTE;
|
|
95
|
+
if (asUtc(wallTime(at, zone)) === local)
|
|
96
|
+
found.add(at);
|
|
97
|
+
}
|
|
98
|
+
return [...found].sort((a, b) => a - b);
|
|
99
|
+
}
|
|
100
|
+
/** The day an instant falls on in a zone, 2026-10-15: the browser's own without one. */
|
|
101
|
+
export function dayIn(at, zone) {
|
|
102
|
+
return wallDay(wallTime(typeof at === 'number' ? at : at.getTime(), zone));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The clocks' change that skips a time on the clock, which `instantsAt` found none of: the time they went forward
|
|
106
|
+
* from and the time they went to (02:00 → 03:00), or null where nothing was skipped.
|
|
107
|
+
*/
|
|
108
|
+
export function clocksSkip(wall, zone) {
|
|
109
|
+
const local = asUtc(wall);
|
|
110
|
+
const before = zoneOffset(local - 86400000, zone);
|
|
111
|
+
const after = zoneOffset(local + 86400000, zone);
|
|
112
|
+
if (after <= before || instantsAt(wall, zone).length)
|
|
113
|
+
return null;
|
|
114
|
+
// The change is between the instant the time would be at the later offset and at the earlier: its first minute.
|
|
115
|
+
let low = local - after * MINUTE;
|
|
116
|
+
let high = local - before * MINUTE;
|
|
117
|
+
while (high - low > MINUTE) {
|
|
118
|
+
const middle = floorMinute((low + high) / 2);
|
|
119
|
+
if (zoneOffset(middle, zone) === after)
|
|
120
|
+
high = middle;
|
|
121
|
+
else
|
|
122
|
+
low = middle;
|
|
123
|
+
}
|
|
124
|
+
// Its first minute at the later offset: the clock read it at the earlier one just before, and reads it at the later.
|
|
125
|
+
return { from: utcWall(high + before * MINUTE), to: utcWall(high + after * MINUTE) };
|
|
126
|
+
}
|
|
127
|
+
/** A number of ms read as a UTC clock's parts: the inverse of asUtc. */
|
|
128
|
+
function utcWall(ms) {
|
|
129
|
+
const d = new Date(ms);
|
|
130
|
+
return { year: d.getUTCFullYear(), month: d.getUTCMonth() + 1, day: d.getUTCDate(), hour: d.getUTCHours(), minute: d.getUTCMinutes() };
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=zones.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zones.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/zones.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,MAAM,MAAM,GAAG,KAAK,CAAC;AACrB,MAAM,MAAM,GAAG,IAAI,GAAG,EAA+B,CAAC;AACtD,kGAAkG;AAClG,SAAS,OAAO,CAAC,IAAY;IAC3B,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QACpN,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,UAAU,CAAC,IAAa;IACtC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1F,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,qD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AAM,GAAG,MAAM,CAAC;IACnC,OAAO,IAAI,GAAG,GAAG,GAAG,MAAM,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7C,IAAI,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,KAAK;YAAE,IAAI,GAAG,MAAM,CAAC;;YACjD,GAAG,GAAG,MAAM,CAAC;IACpB,CAAC;IACD,qHAAqH;IACrH,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC;AACvF,CAAC;AAED,wEAAwE;AACxE,SAAS,OAAO,CAAC,EAAU;IACzB,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,aAAa,EAAE,EAAE,CAAC;AACzI,CAAC"}
|
package/src/runtime.d.mts
CHANGED
|
@@ -7,15 +7,19 @@ export type { JsonValue } from './lib/format/json.mjs';
|
|
|
7
7
|
export { FIELD_NAME, FIELD_TYPES, type FieldType } from './lib/format/names.mjs';
|
|
8
8
|
export type { Field, Fields, LineField, 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, 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, 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';
|
|
11
11
|
export type { AddressSearchOptions } from './lib/format/address-search.mjs';
|
|
12
12
|
export type { PathPickerOptions, StateDotOptions } from './lib/format/picker-options.mjs';
|
|
13
|
+
export type { PagePhone, PhoneOptions } from './lib/format/phone.mjs';
|
|
14
|
+
export type { SlotsOptions } from './lib/format/slots-options.mjs';
|
|
13
15
|
export { wideColumns } from './lib/format/columns.mjs';
|
|
16
|
+
export { BULK_KINDS, bulkEditFields, bulkSettable } from './lib/format/bulk-edit.mjs';
|
|
14
17
|
export { cardLines, cardLineFields, cardPart, type CardLinePart } from './lib/format/card-lines.mjs';
|
|
15
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';
|
|
16
19
|
export { FORMAT_VERSION, FORMAT_VERSIONS, compareFormats, formatProblem, type FormatVersion } from './lib/format/version.mjs';
|
|
17
20
|
export { upgradePage, PAGE_UPGRADES, type FormatHistory, type PageJson, type PageUpgrade } from './lib/format/upgrade.mjs';
|
|
18
|
-
export type { Page, PageData, PageLook } from './lib/format/page.mjs';
|
|
21
|
+
export type { Page, PageData, PageLook, BotCheck } from './lib/format/page.mjs';
|
|
22
|
+
export { INPUT_MODES, type InputMode } from './lib/format/autofill-group.mjs';
|
|
19
23
|
export { THEMES, type Theme } from './lib/format/themes.mjs';
|
|
20
24
|
export { SKINS, type Skin } from './lib/format/themes.mjs';
|
|
21
25
|
export { PART_LOOKS, type PartLook, type PartLookKind, type PartsLook } from './lib/format/part-look.mjs';
|
|
@@ -31,18 +35,21 @@ export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModi
|
|
|
31
35
|
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';
|
|
32
36
|
export { checkValue, checkProperties, decimalsWords, formatBytes, fileProblem, describeTypes } from './lib/record/check.mjs';
|
|
33
37
|
export { scoreOf, type Score } from './lib/record/score.mjs';
|
|
34
|
-
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, } from './lib/record/data-source.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';
|
|
35
39
|
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf } from './lib/record/data-source.mjs';
|
|
36
40
|
export { matchesFilter } from './lib/record/filter.mjs';
|
|
41
|
+
export { DATE_PERIODS, DATE_INTERVALS, addDays, dayStarts, spanStart, type DatePeriod, type DateInterval, type DayCount } from './lib/record/periods.mjs';
|
|
37
42
|
export { suggestions, facetsToFilter, groupByFields, type Facet, type Suggestion } from './lib/record/search.mjs';
|
|
38
43
|
export { createMemoryDataSource, type MemoryDataSource, type MemoryDataSourceOptions } from './lib/record/memory-data-source.mjs';
|
|
44
|
+
export { clocksSkip, dayIn, instantsAt, isOwnZone, isTimeZone, ownZone, wallClock, wallDay, wallOf, wallText, wallTime, zoneOffset, type WallTime } from './lib/record/zones.mjs';
|
|
45
|
+
export { zonedPage } from './lib/format/zoned.mjs';
|
|
39
46
|
export { uploadGoing, UPLOADS_AT_ONCE, type FileUpload, type UploadHow } from './lib/record/uploads.mjs';
|
|
40
47
|
export { uploadTo, type UploadAnswer, type UploadTarget, type UploadToOptions } from './lib/record/upload-to.mjs';
|
|
41
48
|
export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler.mjs';
|
|
42
|
-
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, } from './lib/record/form.mjs';
|
|
49
|
+
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';
|
|
43
50
|
export type { ActionHost, ActionResult, AskHow, ChosenLines, OnAction, OpenRequest, OpenResult, PostedMessage, RunContext, RunResult, RunStop } from './lib/record/run.mjs';
|
|
44
51
|
export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages.mjs';
|
|
45
|
-
export { stripMarks, foldDigits, oneLine, charCount, foldForSearch, numberMarks, readNumber, couldBeNumber, numberMisfit, cleanPastedNumber, readDuration, readDate, 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';
|
|
52
|
+
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';
|
|
46
53
|
export { dayOf } from './lib/record/limits.mjs';
|
|
47
54
|
export { ADDRESS_PARTS, postcodeFits, settledPostcode } from './lib/record/structures.mjs';
|
|
48
55
|
export { webAddress, settledText, hasPattern, EMAIL_LOCAL_STRAYS } from './lib/record/inputs.mjs';
|
package/src/runtime.d.ts
CHANGED
|
@@ -7,15 +7,19 @@ export type { JsonValue } from './lib/format/json';
|
|
|
7
7
|
export { FIELD_NAME, FIELD_TYPES, type FieldType } from './lib/format/names';
|
|
8
8
|
export type { Field, Fields, LineField, 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, 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, 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';
|
|
11
11
|
export type { AddressSearchOptions } from './lib/format/address-search';
|
|
12
12
|
export type { PathPickerOptions, StateDotOptions } from './lib/format/picker-options';
|
|
13
|
+
export type { PagePhone, PhoneOptions } from './lib/format/phone';
|
|
14
|
+
export type { SlotsOptions } from './lib/format/slots-options';
|
|
13
15
|
export { wideColumns } from './lib/format/columns';
|
|
16
|
+
export { BULK_KINDS, bulkEditFields, bulkSettable } from './lib/format/bulk-edit';
|
|
14
17
|
export { cardLines, cardLineFields, cardPart, type CardLinePart } from './lib/format/card-lines';
|
|
15
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';
|
|
16
19
|
export { FORMAT_VERSION, FORMAT_VERSIONS, compareFormats, formatProblem, type FormatVersion } from './lib/format/version';
|
|
17
20
|
export { upgradePage, PAGE_UPGRADES, type FormatHistory, type PageJson, type PageUpgrade } from './lib/format/upgrade';
|
|
18
|
-
export type { Page, PageData, PageLook } from './lib/format/page';
|
|
21
|
+
export type { Page, PageData, PageLook, BotCheck } from './lib/format/page';
|
|
22
|
+
export { INPUT_MODES, type InputMode } from './lib/format/autofill-group';
|
|
19
23
|
export { THEMES, type Theme } from './lib/format/themes';
|
|
20
24
|
export { SKINS, type Skin } from './lib/format/themes';
|
|
21
25
|
export { PART_LOOKS, type PartLook, type PartLookKind, type PartsLook } from './lib/format/part-look';
|
|
@@ -31,18 +35,21 @@ export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModi
|
|
|
31
35
|
export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, type RecordId, type RelatedRecord, type ReferenceValue, type FileValue, type Line, type Value, type Values, } from './lib/record/values';
|
|
32
36
|
export { checkValue, checkProperties, decimalsWords, formatBytes, fileProblem, describeTypes } from './lib/record/check';
|
|
33
37
|
export { scoreOf, type Score } from './lib/record/score';
|
|
34
|
-
export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, ResolvedFilterCondition, ResolvedFilter, RecordChanges, LineOp, LinkOp, SaveProblem, SortOrder, ListRequest, ListResult, GroupRequest, Group, OptionsRequest, RecordRequest, ArchiveRequest, ListedRecord, LoadedRecord, RecordVersion, RecordPermissions, SaveConflict, TotalKind, TotalsRequest, TotalsResult, TotalsGroup, Totals, UploadFile, UploadSignal, UploadRequest, UploadedFile, } from './lib/record/data-source';
|
|
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';
|
|
35
39
|
export { saveRefused, saveProblemOf, ConflictError, loadedRecord, loadedRecordOf } from './lib/record/data-source';
|
|
36
40
|
export { matchesFilter } from './lib/record/filter';
|
|
41
|
+
export { DATE_PERIODS, DATE_INTERVALS, addDays, dayStarts, spanStart, type DatePeriod, type DateInterval, type DayCount } from './lib/record/periods';
|
|
37
42
|
export { suggestions, facetsToFilter, groupByFields, type Facet, type Suggestion } from './lib/record/search';
|
|
38
43
|
export { createMemoryDataSource, type MemoryDataSource, type MemoryDataSourceOptions } from './lib/record/memory-data-source';
|
|
44
|
+
export { clocksSkip, dayIn, instantsAt, isOwnZone, isTimeZone, ownZone, wallClock, wallDay, wallOf, wallText, wallTime, zoneOffset, type WallTime } from './lib/record/zones';
|
|
45
|
+
export { zonedPage } from './lib/format/zoned';
|
|
39
46
|
export { uploadGoing, UPLOADS_AT_ONCE, type FileUpload, type UploadHow } from './lib/record/uploads';
|
|
40
47
|
export { uploadTo, type UploadAnswer, type UploadTarget, type UploadToOptions } from './lib/record/upload-to';
|
|
41
48
|
export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler';
|
|
42
|
-
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, } from './lib/record/form';
|
|
49
|
+
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';
|
|
43
50
|
export type { ActionHost, ActionResult, AskHow, ChosenLines, OnAction, OpenRequest, OpenResult, PostedMessage, RunContext, RunResult, RunStop } from './lib/record/run';
|
|
44
51
|
export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages';
|
|
45
|
-
export { stripMarks, foldDigits, oneLine, charCount, foldForSearch, numberMarks, readNumber, couldBeNumber, numberMisfit, cleanPastedNumber, readDuration, readDate, 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';
|
|
52
|
+
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';
|
|
46
53
|
export { dayOf } from './lib/record/limits';
|
|
47
54
|
export { ADDRESS_PARTS, postcodeFits, settledPostcode } from './lib/record/structures';
|
|
48
55
|
export { webAddress, settledText, hasPattern, EMAIL_LOCAL_STRAYS } from './lib/record/inputs';
|