@fieldia/core 0.23.0 → 0.25.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 +211 -3
- package/package.json +1 -1
- package/schema/page.schema.json +1051 -325
- package/src/index.d.mts +9 -2
- package/src/index.d.ts +9 -2
- package/src/index.js +31 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +12 -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/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/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 +291 -34
- package/src/lib/format/field.d.ts +291 -34
- package/src/lib/format/field.js +19 -4
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +17 -2
- package/src/lib/format/field.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 +7357 -3127
- package/src/lib/format/layout.d.ts +7357 -3127
- package/src/lib/format/layout.js +108 -32
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +107 -32
- 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 +1080 -106
- package/src/lib/format/page.d.ts +1080 -106
- package/src/lib/format/page.js +25 -0
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +26 -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 +39 -0
- package/src/lib/format/references.d.ts +39 -0
- package/src/lib/format/references.js +263 -20
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +263 -20
- 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/translate.js +8 -4
- package/src/lib/format/translate.js.map +1 -1
- package/src/lib/format/translate.mjs +8 -4
- 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/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 +309 -3
- package/src/lib/record/data-source.d.ts +309 -3
- 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 +116 -25
- package/src/lib/record/form.d.ts +116 -25
- package/src/lib/record/form.js +457 -78
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +457 -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 +20 -2
- package/src/lib/record/memory-data-source.d.ts +20 -2
- package/src/lib/record/memory-data-source.js +153 -35
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +154 -36
- 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/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 +75 -9
- package/src/lib/record/run.d.ts +75 -9
- package/src/lib/record/run.js +169 -26
- package/src/lib/record/run.js.map +1 -1
- package/src/lib/record/run.mjs +170 -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/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/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 +19 -9
- package/src/runtime.d.ts +19 -9
- package/src/runtime.js +37 -2
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +9 -2
- package/src/runtime.mjs.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-duplicates.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/memory-duplicates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAK9C;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,MAA0C,EAAE;IACvE,OAAO,CAAC,OAA0B,EAAE,OAAyD,EAAoB,EAAE;QACjH,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC;QACnD,MAAM,OAAO,GAAqB,EAAE,CAAC;QACrC,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YACzE,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,GAAG;gBAAE,SAAS;YAC5E,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM;iBACzB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAU,CAAC;iBAChK,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,QAAQ,IAAI,SAAS,CAAC,CAAC;YAC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E,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACpB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/B,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9B,IAAI,EAAE,IAAI,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAChC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC,MAAM,CAAC;IACV,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { MemoryDataSourceOptions } from './memory-data-source.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* A booking schedule, as `scheduleSlots` answers from it: the hours it opens each day of the week on its zone's clock —
|
|
4
|
+
* the days named as its zone names them, which a page in another zone places by their times — the minutes a booking
|
|
5
|
+
* lasts and those kept free after one, its holidays, and the records its bookings are kept as: a time one of them
|
|
6
|
+
* holds is not free, but to the record itself.
|
|
7
|
+
*/
|
|
8
|
+
export interface MemorySchedule {
|
|
9
|
+
/** The zone its hours are on the clock of, by its IANA name: "Europe/Berlin". */
|
|
10
|
+
timeZone: string;
|
|
11
|
+
/** Its hours by the day of the week, ISO-numbered (1 Monday … 7 Sunday): each a from and a to, ["09:00", "13:00"]. A day not named is closed. */
|
|
12
|
+
hours: {
|
|
13
|
+
[day: number]: [string, string][];
|
|
14
|
+
};
|
|
15
|
+
/** The minutes a booking lasts: the page's (`options.length`), else 30. */
|
|
16
|
+
length?: number;
|
|
17
|
+
/** The minutes kept free after each booking: the page's (`options.between`), else none. */
|
|
18
|
+
between?: number;
|
|
19
|
+
/** The days it is closed for, by date, with their names: { "2026-12-25": "Christmas Day" }. */
|
|
20
|
+
holidays?: Record<string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* Its bookings: records of `model`, starting at `field` (the field booked unless said) and ending at `endField`
|
|
23
|
+
* (else lasting `length`); with `same`, only those holding the form's value in each of these fields — a doctor's.
|
|
24
|
+
*/
|
|
25
|
+
bookings?: {
|
|
26
|
+
model: string;
|
|
27
|
+
field?: string;
|
|
28
|
+
endField?: string;
|
|
29
|
+
same?: string[];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The memory data source's `slots`, answered from booking schedules by name (`options.schedule`, else the field's
|
|
34
|
+
* name): each day asked, its times from its hours a booking's length apart (and the minutes kept free after one), on
|
|
35
|
+
* the schedule's clock — a time the clocks skip that day left out, one they repeat taken the first time — less those
|
|
36
|
+
* a booking holds and those gone by (by `now`, the computer's clock unless given). Open with times left; full with
|
|
37
|
+
* none left; closed where it has no hours, or every time has gone by; a holiday by its name.
|
|
38
|
+
*
|
|
39
|
+
* createMemoryDataSource({ records, slots: scheduleSlots({ showroom: { timeZone: 'Europe/Berlin', hours: … } }) })
|
|
40
|
+
*
|
|
41
|
+
* For demos and tests, beside the memory source: the one-tag script carries neither.
|
|
42
|
+
*/
|
|
43
|
+
export declare function scheduleSlots(schedules: Record<string, MemorySchedule>, options?: {
|
|
44
|
+
now?: () => Date;
|
|
45
|
+
}): NonNullable<MemoryDataSourceOptions['slots']>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { MemoryDataSourceOptions } from './memory-data-source';
|
|
2
|
+
/**
|
|
3
|
+
* A booking schedule, as `scheduleSlots` answers from it: the hours it opens each day of the week on its zone's clock —
|
|
4
|
+
* the days named as its zone names them, which a page in another zone places by their times — the minutes a booking
|
|
5
|
+
* lasts and those kept free after one, its holidays, and the records its bookings are kept as: a time one of them
|
|
6
|
+
* holds is not free, but to the record itself.
|
|
7
|
+
*/
|
|
8
|
+
export interface MemorySchedule {
|
|
9
|
+
/** The zone its hours are on the clock of, by its IANA name: "Europe/Berlin". */
|
|
10
|
+
timeZone: string;
|
|
11
|
+
/** Its hours by the day of the week, ISO-numbered (1 Monday … 7 Sunday): each a from and a to, ["09:00", "13:00"]. A day not named is closed. */
|
|
12
|
+
hours: {
|
|
13
|
+
[day: number]: [string, string][];
|
|
14
|
+
};
|
|
15
|
+
/** The minutes a booking lasts: the page's (`options.length`), else 30. */
|
|
16
|
+
length?: number;
|
|
17
|
+
/** The minutes kept free after each booking: the page's (`options.between`), else none. */
|
|
18
|
+
between?: number;
|
|
19
|
+
/** The days it is closed for, by date, with their names: { "2026-12-25": "Christmas Day" }. */
|
|
20
|
+
holidays?: Record<string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* Its bookings: records of `model`, starting at `field` (the field booked unless said) and ending at `endField`
|
|
23
|
+
* (else lasting `length`); with `same`, only those holding the form's value in each of these fields — a doctor's.
|
|
24
|
+
*/
|
|
25
|
+
bookings?: {
|
|
26
|
+
model: string;
|
|
27
|
+
field?: string;
|
|
28
|
+
endField?: string;
|
|
29
|
+
same?: string[];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The memory data source's `slots`, answered from booking schedules by name (`options.schedule`, else the field's
|
|
34
|
+
* name): each day asked, its times from its hours a booking's length apart (and the minutes kept free after one), on
|
|
35
|
+
* the schedule's clock — a time the clocks skip that day left out, one they repeat taken the first time — less those
|
|
36
|
+
* a booking holds and those gone by (by `now`, the computer's clock unless given). Open with times left; full with
|
|
37
|
+
* none left; closed where it has no hours, or every time has gone by; a holiday by its name.
|
|
38
|
+
*
|
|
39
|
+
* createMemoryDataSource({ records, slots: scheduleSlots({ showroom: { timeZone: 'Europe/Berlin', hours: … } }) })
|
|
40
|
+
*
|
|
41
|
+
* For demos and tests, beside the memory source: the one-tag script carries neither.
|
|
42
|
+
*/
|
|
43
|
+
export declare function scheduleSlots(schedules: Record<string, MemorySchedule>, options?: {
|
|
44
|
+
now?: () => Date;
|
|
45
|
+
}): NonNullable<MemoryDataSourceOptions['slots']>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scheduleSlots = scheduleSlots;
|
|
4
|
+
const zones_1 = require("./zones");
|
|
5
|
+
const MINUTE = 60000;
|
|
6
|
+
/** "09:30" as minutes into its day. */
|
|
7
|
+
const minutesOf = (time) => Number(time.slice(0, 2)) * 60 + Number(time.slice(3, 5));
|
|
8
|
+
/** A value as bookings are matched by it: a link by its id. */
|
|
9
|
+
const keyed = (value) => JSON.stringify(value && typeof value === 'object' && 'id' in value ? value.id : (value ?? null));
|
|
10
|
+
/** The spans a schedule's bookings hold, as instants from and to: the record booked aside, and only those of the same doctor where it says. */
|
|
11
|
+
function bookedIn(schedule, request, stored) {
|
|
12
|
+
const { field = request.field, endField, same = [] } = schedule.bookings ?? { model: '' };
|
|
13
|
+
const length = (request.length ?? schedule.length ?? 30) * MINUTE;
|
|
14
|
+
const spans = [];
|
|
15
|
+
for (const [key, values] of Object.entries(stored)) {
|
|
16
|
+
if (request.recordId !== null && String(request.recordId) === key)
|
|
17
|
+
continue;
|
|
18
|
+
if (!same.every((name) => keyed(values[name]) === keyed(request.values[name])))
|
|
19
|
+
continue;
|
|
20
|
+
const start = Date.parse(String(values[field] ?? ''));
|
|
21
|
+
if (Number.isNaN(start))
|
|
22
|
+
continue;
|
|
23
|
+
const end = endField ? Date.parse(String(values[endField] ?? '')) : NaN;
|
|
24
|
+
spans.push([start, Number.isNaN(end) ? start + length : end]);
|
|
25
|
+
}
|
|
26
|
+
return spans;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The memory data source's `slots`, answered from booking schedules by name (`options.schedule`, else the field's
|
|
30
|
+
* name): each day asked, its times from its hours a booking's length apart (and the minutes kept free after one), on
|
|
31
|
+
* the schedule's clock — a time the clocks skip that day left out, one they repeat taken the first time — less those
|
|
32
|
+
* a booking holds and those gone by (by `now`, the computer's clock unless given). Open with times left; full with
|
|
33
|
+
* none left; closed where it has no hours, or every time has gone by; a holiday by its name.
|
|
34
|
+
*
|
|
35
|
+
* createMemoryDataSource({ records, slots: scheduleSlots({ showroom: { timeZone: 'Europe/Berlin', hours: … } }) })
|
|
36
|
+
*
|
|
37
|
+
* For demos and tests, beside the memory source: the one-tag script carries neither.
|
|
38
|
+
*/
|
|
39
|
+
function scheduleSlots(schedules, options = {}) {
|
|
40
|
+
return (request, records) => {
|
|
41
|
+
const schedule = schedules[request.schedule];
|
|
42
|
+
if (!schedule)
|
|
43
|
+
throw new Error(`No schedule "${request.schedule}"`);
|
|
44
|
+
const booked = schedule.bookings ? bookedIn(schedule, request, records[schedule.bookings.model] ?? {}) : [];
|
|
45
|
+
const now = (options.now?.() ?? new Date()).getTime();
|
|
46
|
+
const length = request.length ?? schedule.length ?? 30;
|
|
47
|
+
const between = request.between ?? schedule.between ?? 0;
|
|
48
|
+
const days = {};
|
|
49
|
+
const first = (0, zones_1.wallOf)(request.from);
|
|
50
|
+
const last = (0, zones_1.wallOf)(request.to);
|
|
51
|
+
if (!first || !last)
|
|
52
|
+
return { days, length };
|
|
53
|
+
for (let at = Date.UTC(first.year, first.month - 1, first.day); at <= Date.UTC(last.year, last.month - 1, last.day); at += 86400000) {
|
|
54
|
+
const date = new Date(at);
|
|
55
|
+
const day = date.toISOString().slice(0, 10);
|
|
56
|
+
const holiday = schedule.holidays?.[day];
|
|
57
|
+
if (holiday) {
|
|
58
|
+
days[day] = { state: 'holiday', note: holiday };
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const free = [];
|
|
62
|
+
let any = false;
|
|
63
|
+
for (const [from, to] of schedule.hours[date.getUTCDay() || 7] ?? []) {
|
|
64
|
+
for (let minutes = minutesOf(from); minutes + length <= minutesOf(to); minutes += length + between) {
|
|
65
|
+
const start = (0, zones_1.instantsAt)({ year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, day: date.getUTCDate(), hour: Math.floor(minutes / 60), minute: minutes % 60 }, schedule.timeZone)[0];
|
|
66
|
+
if (start === undefined || start <= now)
|
|
67
|
+
continue;
|
|
68
|
+
any = true;
|
|
69
|
+
const end = start + length * MINUTE;
|
|
70
|
+
// Taken where a booking, and the minutes kept free after it, meet this time and those kept free after it.
|
|
71
|
+
if (booked.some(([from, until]) => start < until + between * MINUTE && from < end + between * MINUTE))
|
|
72
|
+
continue;
|
|
73
|
+
free.push(new Date(start).toISOString());
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
days[day] = free.length ? { state: 'open', free } : { state: any ? 'full' : 'closed' };
|
|
77
|
+
}
|
|
78
|
+
return { days, length };
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=memory-schedules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-schedules.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/memory-schedules.ts"],"names":[],"mappings":";;AA8DA,sCAqCC;AAhGD,mCAA6C;AA0B7C,MAAM,MAAM,GAAG,KAAK,CAAC;AACrB,uCAAuC;AACvC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7F,+DAA+D;AAC/D,MAAM,KAAK,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC,CAAE,KAAuB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI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AC,OAAO,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7L,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,IAAI,GAAG;wBAAE,SAAS;oBAClD,GAAG,GAAG,IAAI,CAAC;oBACX,MAAM,GAAG,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;oBACpC,0GAA0G;oBAC1G,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,IAAI,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,MAAM,CAAC;wBAAE,SAAS;oBAChH,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC3C,CAAC;YACH,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QACzF,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { instantsAt, wallOf } from './zones.mjs';
|
|
2
|
+
const MINUTE = 60000;
|
|
3
|
+
/** "09:30" as minutes into its day. */
|
|
4
|
+
const minutesOf = (time) => Number(time.slice(0, 2)) * 60 + Number(time.slice(3, 5));
|
|
5
|
+
/** A value as bookings are matched by it: a link by its id. */
|
|
6
|
+
const keyed = (value) => JSON.stringify(value && typeof value === 'object' && 'id' in value ? value.id : (value ?? null));
|
|
7
|
+
/** The spans a schedule's bookings hold, as instants from and to: the record booked aside, and only those of the same doctor where it says. */
|
|
8
|
+
function bookedIn(schedule, request, stored) {
|
|
9
|
+
const { field = request.field, endField, same = [] } = schedule.bookings ?? { model: '' };
|
|
10
|
+
const length = (request.length ?? schedule.length ?? 30) * MINUTE;
|
|
11
|
+
const spans = [];
|
|
12
|
+
for (const [key, values] of Object.entries(stored)) {
|
|
13
|
+
if (request.recordId !== null && String(request.recordId) === key)
|
|
14
|
+
continue;
|
|
15
|
+
if (!same.every((name) => keyed(values[name]) === keyed(request.values[name])))
|
|
16
|
+
continue;
|
|
17
|
+
const start = Date.parse(String(values[field] ?? ''));
|
|
18
|
+
if (Number.isNaN(start))
|
|
19
|
+
continue;
|
|
20
|
+
const end = endField ? Date.parse(String(values[endField] ?? '')) : NaN;
|
|
21
|
+
spans.push([start, Number.isNaN(end) ? start + length : end]);
|
|
22
|
+
}
|
|
23
|
+
return spans;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The memory data source's `slots`, answered from booking schedules by name (`options.schedule`, else the field's
|
|
27
|
+
* name): each day asked, its times from its hours a booking's length apart (and the minutes kept free after one), on
|
|
28
|
+
* the schedule's clock — a time the clocks skip that day left out, one they repeat taken the first time — less those
|
|
29
|
+
* a booking holds and those gone by (by `now`, the computer's clock unless given). Open with times left; full with
|
|
30
|
+
* none left; closed where it has no hours, or every time has gone by; a holiday by its name.
|
|
31
|
+
*
|
|
32
|
+
* createMemoryDataSource({ records, slots: scheduleSlots({ showroom: { timeZone: 'Europe/Berlin', hours: … } }) })
|
|
33
|
+
*
|
|
34
|
+
* For demos and tests, beside the memory source: the one-tag script carries neither.
|
|
35
|
+
*/
|
|
36
|
+
export function scheduleSlots(schedules, options = {}) {
|
|
37
|
+
return (request, records) => {
|
|
38
|
+
const schedule = schedules[request.schedule];
|
|
39
|
+
if (!schedule)
|
|
40
|
+
throw new Error(`No schedule "${request.schedule}"`);
|
|
41
|
+
const booked = schedule.bookings ? bookedIn(schedule, request, records[schedule.bookings.model] ?? {}) : [];
|
|
42
|
+
const now = (options.now?.() ?? new Date()).getTime();
|
|
43
|
+
const length = request.length ?? schedule.length ?? 30;
|
|
44
|
+
const between = request.between ?? schedule.between ?? 0;
|
|
45
|
+
const days = {};
|
|
46
|
+
const first = wallOf(request.from);
|
|
47
|
+
const last = wallOf(request.to);
|
|
48
|
+
if (!first || !last)
|
|
49
|
+
return { days, length };
|
|
50
|
+
for (let at = Date.UTC(first.year, first.month - 1, first.day); at <= Date.UTC(last.year, last.month - 1, last.day); at += 86400000) {
|
|
51
|
+
const date = new Date(at);
|
|
52
|
+
const day = date.toISOString().slice(0, 10);
|
|
53
|
+
const holiday = schedule.holidays?.[day];
|
|
54
|
+
if (holiday) {
|
|
55
|
+
days[day] = { state: 'holiday', note: holiday };
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const free = [];
|
|
59
|
+
let any = false;
|
|
60
|
+
for (const [from, to] of schedule.hours[date.getUTCDay() || 7] ?? []) {
|
|
61
|
+
for (let minutes = minutesOf(from); minutes + length <= minutesOf(to); minutes += length + between) {
|
|
62
|
+
const start = instantsAt({ year: date.getUTCFullYear(), month: date.getUTCMonth() + 1, day: date.getUTCDate(), hour: Math.floor(minutes / 60), minute: minutes % 60 }, schedule.timeZone)[0];
|
|
63
|
+
if (start === undefined || start <= now)
|
|
64
|
+
continue;
|
|
65
|
+
any = true;
|
|
66
|
+
const end = start + length * MINUTE;
|
|
67
|
+
// Taken where a booking, and the minutes kept free after it, meet this time and those kept free after it.
|
|
68
|
+
if (booked.some(([from, until]) => start < until + between * MINUTE && from < end + between * MINUTE))
|
|
69
|
+
continue;
|
|
70
|
+
free.push(new Date(start).toISOString());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
days[day] = free.length ? { state: 'open', free } : { state: any ? 'full' : 'closed' };
|
|
74
|
+
}
|
|
75
|
+
return { days, length };
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=memory-schedules.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-schedules.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/memory-schedules.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AA0B7C,MAAM,MAAM,GAAG,KAAK,CAAC;AACrB,uCAAuC;AACvC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7F,+DAA+D;AAC/D,MAAM,KAAK,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC,CAAE,KAAuB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;AAEtJ,+IAA+I;AAC/I,SAAS,QAAQ,CAAC,QAAwB,EAAE,OAAqB,EAAE,MAA8B;IAC/F,MAAM,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,QAAQ,CAAC,QAAQ,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAC1F,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,MAAM,CAAC;IAClE,MAAM,KAAK,GAAuB,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD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AI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC3C,CAAC;YACH,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QACzF,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -22,6 +22,8 @@ export interface Messages {
|
|
|
22
22
|
decimalsMany: string;
|
|
23
23
|
/** More digits than a field keeps, or than a number keeps exactly (15): `{n}`. */
|
|
24
24
|
digits: string;
|
|
25
|
+
/** More digits before the decimal mark than a field keeps there: `{n}`, its precision less its scale. */
|
|
26
|
+
wholeDigits: string;
|
|
25
27
|
boolean: string;
|
|
26
28
|
dateFormat: string;
|
|
27
29
|
dateInvalid: string;
|
|
@@ -101,7 +103,7 @@ export interface Messages {
|
|
|
101
103
|
discardChanges: string;
|
|
102
104
|
/** Why a run of steps stopped: the record it ran on was replaced by another while it went on, and its steps are not for that one. */
|
|
103
105
|
recordReplaced: string;
|
|
104
|
-
/** A text longer than its most, pasted whole: `{over}` characters
|
|
106
|
+
/** A text longer than its most, pasted whole: `{over}` characters too long for its `{max}`; one over (`overByOne`). The one message: its count stays a count. */
|
|
105
107
|
overBy: string;
|
|
106
108
|
overByOne: string;
|
|
107
109
|
/** A postcode not of its country's shape: `{country}`, its `{n}` digits, and `{example}`. */
|
|
@@ -22,6 +22,8 @@ export interface Messages {
|
|
|
22
22
|
decimalsMany: string;
|
|
23
23
|
/** More digits than a field keeps, or than a number keeps exactly (15): `{n}`. */
|
|
24
24
|
digits: string;
|
|
25
|
+
/** More digits before the decimal mark than a field keeps there: `{n}`, its precision less its scale. */
|
|
26
|
+
wholeDigits: string;
|
|
25
27
|
boolean: string;
|
|
26
28
|
dateFormat: string;
|
|
27
29
|
dateInvalid: string;
|
|
@@ -101,7 +103,7 @@ export interface Messages {
|
|
|
101
103
|
discardChanges: string;
|
|
102
104
|
/** Why a run of steps stopped: the record it ran on was replaced by another while it went on, and its steps are not for that one. */
|
|
103
105
|
recordReplaced: string;
|
|
104
|
-
/** A text longer than its most, pasted whole: `{over}` characters
|
|
106
|
+
/** A text longer than its most, pasted whole: `{over}` characters too long for its `{max}`; one over (`overByOne`). The one message: its count stays a count. */
|
|
105
107
|
overBy: string;
|
|
106
108
|
overByOne: string;
|
|
107
109
|
/** A postcode not of its country's shape: `{country}`, its `{n}` digits, and `{example}`. */
|
|
@@ -18,6 +18,7 @@ const en = {
|
|
|
18
18
|
decimalsTwo: '{label} takes at most {digits} decimal places',
|
|
19
19
|
decimalsMany: '{label} takes at most {digits} decimal places',
|
|
20
20
|
digits: '{label} takes at most {n} digits',
|
|
21
|
+
wholeDigits: '{label} takes at most {n} digits before the decimal point',
|
|
21
22
|
boolean: '{label} must be yes or no',
|
|
22
23
|
dateFormat: 'Invalid date format (expected YYYY-MM-DD)',
|
|
23
24
|
dateInvalid: 'Invalid date (check month/day values)',
|
|
@@ -69,8 +70,8 @@ const en = {
|
|
|
69
70
|
theirsUnread: 'Their version could not be read, so yours was not saved over it. Try Keep mine again, or Reload.',
|
|
70
71
|
discardChanges: 'Discard your changes?',
|
|
71
72
|
recordReplaced: 'Another record is shown now: the rest of these steps did not run.',
|
|
72
|
-
overBy: '{label} is {over} characters
|
|
73
|
-
overByOne: '{label} is 1 character
|
|
73
|
+
overBy: '{label} is {over} characters too long: shorten it to {max}',
|
|
74
|
+
overByOne: '{label} is 1 character too long: shorten it to {max}',
|
|
74
75
|
postcode: '{label}: a postcode in {country} has {n} digits, like {example}',
|
|
75
76
|
urlScheme: 'Only a web address (http or https) can go here',
|
|
76
77
|
endBeforeStart: '{end} can’t be before {start}',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":";;;AAoNA,oBAEC;AAtND,uCAA0C;AA8H1C,iEAAiE;AACjE,MAAM,EAAE,GAAa;IACnB,QAAQ,EAAE,qBAAqB;IAC/B,SAAS,EAAE,wCAAwC;IACnD,OAAO,EAAE,uCAAuC;IAChD,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,0BAA0B;IAClC,OAAO,EAAE,gCAAgC;IACzC,GAAG,EAAE,gCAAgC;IACrC,GAAG,EAAE,+BAA+B;IACpC,QAAQ,EAAE,+CAA+C;IACzD,WAAW,EAAE,uCAAuC;IACpD,WAAW,EAAE,+CAA+C;IAC5D,YAAY,EAAE,+CAA+C;IAC7D,MAAM,EAAE,kCAAkC;IAC1C,WAAW,EAAE,2DAA2D;IACxE,OAAO,EAAE,2BAA2B;IACpC,UAAU,EAAE,2CAA2C;IACvD,WAAW,EAAE,uCAAuC;IACpD,cAAc,EAAE,6DAA6D;IAC7E,eAAe,EAAE,0CAA0C;IAC3D,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE,oDAAoD;IACnE,MAAM,EAAE,sCAAsC;IAC9C,SAAS,EAAE,kBAAkB;IAC7B,UAAU,EAAE,6BAA6B;IACzC,OAAO,EAAE,mCAAmC;IAC5C,MAAM,EAAE,0BAA0B;IAClC,OAAO,EAAE,mCAAmC;IAC5C,SAAS,EAAE,iCAAiC;IAC5C,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,+BAA+B;IACzC,QAAQ,EAAE,+BAA+B;IACzC,QAAQ,EAAE,qCAAqC;IAC/C,QAAQ,EAAE,2CAA2C;IACrD,WAAW,EAAE,kDAAkD;IAC/D,eAAe,EAAE,wDAAwD;IACzE,WA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AK,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAClH,CAAC"}
|
|
@@ -14,6 +14,7 @@ const en = {
|
|
|
14
14
|
decimalsTwo: '{label} takes at most {digits} decimal places',
|
|
15
15
|
decimalsMany: '{label} takes at most {digits} decimal places',
|
|
16
16
|
digits: '{label} takes at most {n} digits',
|
|
17
|
+
wholeDigits: '{label} takes at most {n} digits before the decimal point',
|
|
17
18
|
boolean: '{label} must be yes or no',
|
|
18
19
|
dateFormat: 'Invalid date format (expected YYYY-MM-DD)',
|
|
19
20
|
dateInvalid: 'Invalid date (check month/day values)',
|
|
@@ -65,8 +66,8 @@ const en = {
|
|
|
65
66
|
theirsUnread: 'Their version could not be read, so yours was not saved over it. Try Keep mine again, or Reload.',
|
|
66
67
|
discardChanges: 'Discard your changes?',
|
|
67
68
|
recordReplaced: 'Another record is shown now: the rest of these steps did not run.',
|
|
68
|
-
overBy: '{label} is {over} characters
|
|
69
|
-
overByOne: '{label} is 1 character
|
|
69
|
+
overBy: '{label} is {over} characters too long: shorten it to {max}',
|
|
70
|
+
overByOne: '{label} is 1 character too long: shorten it to {max}',
|
|
70
71
|
postcode: '{label}: a postcode in {country} has {n} digits, like {example}',
|
|
71
72
|
urlScheme: 'Only a web address (http or https) can go here',
|
|
72
73
|
endBeforeStart: '{end} can’t be before {start}',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM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|
|
1
|
+
/**
|
|
2
|
+
* Days counted as a list counts them: the days of a period its filter names
|
|
3
|
+
* ("This week", "Last 30 days", "Overdue"), and the span a date falls in when
|
|
4
|
+
* the list is grouped by it (its week, month, quarter or year). A date
|
|
5
|
+
* field's value is its day ("2026-10-14"); a date and time's is an instant
|
|
6
|
+
* ("2026-10-14T07:40:00.000Z"), which falls on the day it is where the page
|
|
7
|
+
* is: in the time zone given, or the computer's own. Days are counted by the
|
|
8
|
+
* calendar, never by adding hours, so a change of the clocks moves no day.
|
|
9
|
+
*
|
|
10
|
+
* Here, what both a list and a data source count: a day where a time zone
|
|
11
|
+
* says, a day's first moment there, and the span a value falls in — the
|
|
12
|
+
* memory data source groups by it, as a backend groups by its own. The list
|
|
13
|
+
* part counts a period's days and asks for them (list-days.ts in
|
|
14
|
+
* @fieldia/viewer).
|
|
15
|
+
*/
|
|
16
|
+
/** The periods a list's filter can name, counted from the day the list is looked at. */
|
|
17
|
+
export declare const DATE_PERIODS: readonly ["today", "yesterday", "thisWeek", "lastWeek", "thisMonth", "lastMonth", "thisYear", "last7Days", "last30Days", "overdue"];
|
|
18
|
+
export type DatePeriod = (typeof DATE_PERIODS)[number];
|
|
19
|
+
/** The spans a date's records can be grouped in. */
|
|
20
|
+
export declare const DATE_INTERVALS: readonly ["day", "week", "month", "quarter", "year"];
|
|
21
|
+
export type DateInterval = (typeof DATE_INTERVALS)[number];
|
|
22
|
+
/**
|
|
23
|
+
* How days are counted: the day a week starts on, 0 Sunday to 6 Saturday
|
|
24
|
+
* (Monday unless said), and the time zone a date and time's day is told in
|
|
25
|
+
* (IANA: "Africa/Cairo"; the computer's own unless said).
|
|
26
|
+
*/
|
|
27
|
+
export interface DayCount {
|
|
28
|
+
weekStart?: number;
|
|
29
|
+
timeZone?: string;
|
|
30
|
+
}
|
|
31
|
+
/** A day `n` days on from another (back, for less than 0). */
|
|
32
|
+
export declare const addDays: (day: string, n: number) => string;
|
|
33
|
+
/** The day an instant falls on, where the time zone says (zones.ts `dayIn`, the computer's own for a zone it does not know). */
|
|
34
|
+
export declare const dayIn: (at: Date | number, timeZone?: string) => string;
|
|
35
|
+
/**
|
|
36
|
+
* A day's first moment where the time zone says, as an instant written as a
|
|
37
|
+
* date and time field keeps one ("2026-10-13T21:00:00.000Z" for 14 October in
|
|
38
|
+
* Cairo): its midnight, the first of two where the clocks go back across it,
|
|
39
|
+
* or the moment they go forward on a day they skip midnight.
|
|
40
|
+
*/
|
|
41
|
+
export declare function dayStarts(day: string, timeZone?: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* The first day of the span a date or a date and time falls in — its day,
|
|
44
|
+
* week, month, quarter or year — where `count` says: "2026-03-01" for any
|
|
45
|
+
* day of March 2026. Null for a value that is no date.
|
|
46
|
+
*/
|
|
47
|
+
export declare function spanStart(value: unknown, interval: DateInterval, count?: DayCount): string | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Days counted as a list counts them: the days of a period its filter names
|
|
3
|
+
* ("This week", "Last 30 days", "Overdue"), and the span a date falls in when
|
|
4
|
+
* the list is grouped by it (its week, month, quarter or year). A date
|
|
5
|
+
* field's value is its day ("2026-10-14"); a date and time's is an instant
|
|
6
|
+
* ("2026-10-14T07:40:00.000Z"), which falls on the day it is where the page
|
|
7
|
+
* is: in the time zone given, or the computer's own. Days are counted by the
|
|
8
|
+
* calendar, never by adding hours, so a change of the clocks moves no day.
|
|
9
|
+
*
|
|
10
|
+
* Here, what both a list and a data source count: a day where a time zone
|
|
11
|
+
* says, a day's first moment there, and the span a value falls in — the
|
|
12
|
+
* memory data source groups by it, as a backend groups by its own. The list
|
|
13
|
+
* part counts a period's days and asks for them (list-days.ts in
|
|
14
|
+
* @fieldia/viewer).
|
|
15
|
+
*/
|
|
16
|
+
/** The periods a list's filter can name, counted from the day the list is looked at. */
|
|
17
|
+
export declare const DATE_PERIODS: readonly ["today", "yesterday", "thisWeek", "lastWeek", "thisMonth", "lastMonth", "thisYear", "last7Days", "last30Days", "overdue"];
|
|
18
|
+
export type DatePeriod = (typeof DATE_PERIODS)[number];
|
|
19
|
+
/** The spans a date's records can be grouped in. */
|
|
20
|
+
export declare const DATE_INTERVALS: readonly ["day", "week", "month", "quarter", "year"];
|
|
21
|
+
export type DateInterval = (typeof DATE_INTERVALS)[number];
|
|
22
|
+
/**
|
|
23
|
+
* How days are counted: the day a week starts on, 0 Sunday to 6 Saturday
|
|
24
|
+
* (Monday unless said), and the time zone a date and time's day is told in
|
|
25
|
+
* (IANA: "Africa/Cairo"; the computer's own unless said).
|
|
26
|
+
*/
|
|
27
|
+
export interface DayCount {
|
|
28
|
+
weekStart?: number;
|
|
29
|
+
timeZone?: string;
|
|
30
|
+
}
|
|
31
|
+
/** A day `n` days on from another (back, for less than 0). */
|
|
32
|
+
export declare const addDays: (day: string, n: number) => string;
|
|
33
|
+
/** The day an instant falls on, where the time zone says (zones.ts `dayIn`, the computer's own for a zone it does not know). */
|
|
34
|
+
export declare const dayIn: (at: Date | number, timeZone?: string) => string;
|
|
35
|
+
/**
|
|
36
|
+
* A day's first moment where the time zone says, as an instant written as a
|
|
37
|
+
* date and time field keeps one ("2026-10-13T21:00:00.000Z" for 14 October in
|
|
38
|
+
* Cairo): its midnight, the first of two where the clocks go back across it,
|
|
39
|
+
* or the moment they go forward on a day they skip midnight.
|
|
40
|
+
*/
|
|
41
|
+
export declare function dayStarts(day: string, timeZone?: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* The first day of the span a date or a date and time falls in — its day,
|
|
44
|
+
* week, month, quarter or year — where `count` says: "2026-03-01" for any
|
|
45
|
+
* day of March 2026. Null for a value that is no date.
|
|
46
|
+
*/
|
|
47
|
+
export declare function spanStart(value: unknown, interval: DateInterval, count?: DayCount): string | null;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Days counted as a list counts them: the days of a period its filter names
|
|
4
|
+
* ("This week", "Last 30 days", "Overdue"), and the span a date falls in when
|
|
5
|
+
* the list is grouped by it (its week, month, quarter or year). A date
|
|
6
|
+
* field's value is its day ("2026-10-14"); a date and time's is an instant
|
|
7
|
+
* ("2026-10-14T07:40:00.000Z"), which falls on the day it is where the page
|
|
8
|
+
* is: in the time zone given, or the computer's own. Days are counted by the
|
|
9
|
+
* calendar, never by adding hours, so a change of the clocks moves no day.
|
|
10
|
+
*
|
|
11
|
+
* Here, what both a list and a data source count: a day where a time zone
|
|
12
|
+
* says, a day's first moment there, and the span a value falls in — the
|
|
13
|
+
* memory data source groups by it, as a backend groups by its own. The list
|
|
14
|
+
* part counts a period's days and asks for them (list-days.ts in
|
|
15
|
+
* @fieldia/viewer).
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.dayIn = exports.addDays = exports.DATE_INTERVALS = exports.DATE_PERIODS = void 0;
|
|
19
|
+
exports.dayStarts = dayStarts;
|
|
20
|
+
exports.spanStart = spanStart;
|
|
21
|
+
const zones_1 = require("./zones");
|
|
22
|
+
/** The periods a list's filter can name, counted from the day the list is looked at. */
|
|
23
|
+
exports.DATE_PERIODS = ['today', 'yesterday', 'thisWeek', 'lastWeek', 'thisMonth', 'lastMonth', 'thisYear', 'last7Days', 'last30Days', 'overdue'];
|
|
24
|
+
/** The spans a date's records can be grouped in. */
|
|
25
|
+
exports.DATE_INTERVALS = ['day', 'week', 'month', 'quarter', 'year'];
|
|
26
|
+
/** A day by its numbers, the month from 1, rolled over as the calendar rolls: month 13 is next January, day 0 the last of the month before. */
|
|
27
|
+
const dayAt = (y, m, d) => new Date(Date.UTC(y, m - 1, d)).toISOString().slice(0, 10);
|
|
28
|
+
const numbersOf = (day) => day.split('-').map(Number);
|
|
29
|
+
/** A day `n` days on from another (back, for less than 0). */
|
|
30
|
+
const addDays = (day, n) => {
|
|
31
|
+
const [y, m, d] = numbersOf(day);
|
|
32
|
+
return dayAt(y, m, d + n);
|
|
33
|
+
};
|
|
34
|
+
exports.addDays = addDays;
|
|
35
|
+
/** A zone this browser knows, else none — the computer's own: a source's request may name any. */
|
|
36
|
+
const known = (timeZone) => (timeZone && (0, zones_1.isTimeZone)(timeZone) ? timeZone : undefined);
|
|
37
|
+
/** The day an instant falls on, where the time zone says (zones.ts `dayIn`, the computer's own for a zone it does not know). */
|
|
38
|
+
const dayIn = (at, timeZone) => (0, zones_1.dayIn)(at, known(timeZone));
|
|
39
|
+
exports.dayIn = dayIn;
|
|
40
|
+
/**
|
|
41
|
+
* A day's first moment where the time zone says, as an instant written as a
|
|
42
|
+
* date and time field keeps one ("2026-10-13T21:00:00.000Z" for 14 October in
|
|
43
|
+
* Cairo): its midnight, the first of two where the clocks go back across it,
|
|
44
|
+
* or the moment they go forward on a day they skip midnight.
|
|
45
|
+
*/
|
|
46
|
+
function dayStarts(day, timeZone) {
|
|
47
|
+
const zone = known(timeZone);
|
|
48
|
+
const midnight = (0, zones_1.wallOf)(day);
|
|
49
|
+
const [first] = (0, zones_1.instantsAt)(midnight, zone);
|
|
50
|
+
if (first !== undefined)
|
|
51
|
+
return new Date(first).toISOString();
|
|
52
|
+
const skip = (0, zones_1.clocksSkip)(midnight, zone);
|
|
53
|
+
return new Date(skip ? (0, zones_1.instantsAt)(skip.to, zone)[0] : Date.UTC(midnight.year, midnight.month - 1, midnight.day) - (0, zones_1.zoneOffset)(Date.UTC(midnight.year, midnight.month - 1, midnight.day), zone) * 60000).toISOString();
|
|
54
|
+
}
|
|
55
|
+
/** Its day of the week, 0 Sunday to 6 Saturday. */
|
|
56
|
+
const weekday = (day) => new Date(`${day}T00:00:00Z`).getUTCDay();
|
|
57
|
+
/**
|
|
58
|
+
* The first day of the span a date or a date and time falls in — its day,
|
|
59
|
+
* week, month, quarter or year — where `count` says: "2026-03-01" for any
|
|
60
|
+
* day of March 2026. Null for a value that is no date.
|
|
61
|
+
*/
|
|
62
|
+
function spanStart(value, interval, count = {}) {
|
|
63
|
+
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}([T ]|$)/.test(value))
|
|
64
|
+
return null;
|
|
65
|
+
let day = value;
|
|
66
|
+
if (value.length > 10) {
|
|
67
|
+
const at = Date.parse(value.replace(' ', 'T'));
|
|
68
|
+
if (Number.isNaN(at))
|
|
69
|
+
return null;
|
|
70
|
+
day = (0, exports.dayIn)(at, count.timeZone);
|
|
71
|
+
}
|
|
72
|
+
const [y, m] = numbersOf(day);
|
|
73
|
+
switch (interval) {
|
|
74
|
+
case 'day':
|
|
75
|
+
return day;
|
|
76
|
+
case 'week':
|
|
77
|
+
return (0, exports.addDays)(day, -((weekday(day) - (count.weekStart ?? 1) + 7) % 7));
|
|
78
|
+
case 'month':
|
|
79
|
+
return dayAt(y, m, 1);
|
|
80
|
+
case 'quarter':
|
|
81
|
+
return dayAt(y, m - ((m - 1) % 3), 1);
|
|
82
|
+
case 'year':
|
|
83
|
+
return dayAt(y, 1, 1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=periods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"periods.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/record/periods.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AA4CH,8BAOC;AAUD,8BAqBC;AAhFD,mCAAkH;AAElH,wFAAwF;AAC3E,QAAA,YAAY,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,CAAU,CAAC;AAGhK,oDAAoD;AACvC,QAAA,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAanF,+IAA+I;AAC/I,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC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