fold-ng 0.7.0 → 0.8.1
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/CHANGELOG.md +344 -1
- package/README.md +50 -0
- package/fesm2022/fold-ng.mjs +2828 -6
- package/fesm2022/fold-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/types/fold-ng.d.ts +1922 -2
- package/types/fold-ng.d.ts.map +1 -1
package/types/fold-ng.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { InjectionToken, Provider, TemplateRef, ElementRef, Signal, Type, Injector, InputSignal, WritableSignal } from '@angular/core';
|
|
3
|
+
import * as fold_ng from 'fold-ng';
|
|
3
4
|
import { FormValueControl, ValidationError, FormCheckboxControl } from '@angular/forms/signals';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -2103,6 +2104,1530 @@ declare class FoldStickyColumnDirective {
|
|
|
2103
2104
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldStickyColumnDirective, "[foldStickyColumn]", never, { "sticky": { "alias": "sticky"; "required": false; "isSignal": true; }; "stickyOffset": { "alias": "stickyOffset"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2104
2105
|
}
|
|
2105
2106
|
|
|
2107
|
+
/**
|
|
2108
|
+
* Plain-date arithmetic for the calendar family — `YYYY-MM-DD` in, `YYYY-MM-DD`
|
|
2109
|
+
* out. Framework-free and side-effect-free, so every rule here is unit-testable
|
|
2110
|
+
* without a TestBed.
|
|
2111
|
+
*
|
|
2112
|
+
* ## Why a string and not a `Date`
|
|
2113
|
+
* A calendar of all-day spans deals in **plain dates** — "the 18th of May",
|
|
2114
|
+
* with no instant and no zone. A `Date` is a timestamp, so the moment one
|
|
2115
|
+
* crosses a zone or a DST boundary the same span lands on a different cell:
|
|
2116
|
+
* `new Date("2026-05-18")` is UTC midnight, which is the *17th* anywhere west
|
|
2117
|
+
* of Greenwich. Modelling the domain as `YYYY-MM-DD` removes that entire bug
|
|
2118
|
+
* class by construction, and buys three things for free: values compare
|
|
2119
|
+
* **lexicographically** (`a <= b` *is* "on or before"), they are `===`-equal
|
|
2120
|
+
* when they mean the same day (a `Date` never is), and they are already the
|
|
2121
|
+
* wire format every backend sends.
|
|
2122
|
+
*
|
|
2123
|
+
* {@link FoldTimelineNode} keeps a native `Date` on purpose — it plots dated
|
|
2124
|
+
* *instants* on a rail, which is the other domain.
|
|
2125
|
+
*
|
|
2126
|
+
* Arithmetic runs through `Date.UTC`, never local time: UTC has no DST, so a
|
|
2127
|
+
* day is always exactly 86 400 000 ms and "add 1 day" can never silently
|
|
2128
|
+
* return the same date twice (or skip one) around a clock change.
|
|
2129
|
+
*
|
|
2130
|
+
* ## Supported range
|
|
2131
|
+
* `0001-01-01` to `9999-12-31`. The four-digit year is what makes the
|
|
2132
|
+
* lexicographic guarantee hold, so it is enforced rather than assumed: years
|
|
2133
|
+
* below 1000 are zero-padded (`0099-12-31`, which still sorts correctly), and
|
|
2134
|
+
* arithmetic that walks past `9999-12-31` returns a five-digit string that
|
|
2135
|
+
* {@link foldIsCalendarDate} rejects — a value that fails the type's own
|
|
2136
|
+
* predicate rather than one that silently sorts before every other date.
|
|
2137
|
+
*/
|
|
2138
|
+
/**
|
|
2139
|
+
* A plain calendar date — an ISO-8601 **date**, `YYYY-MM-DD`, with no time and
|
|
2140
|
+
* no zone. Inclusive wherever it bounds a range.
|
|
2141
|
+
*
|
|
2142
|
+
* A plain `string` alias, deliberately: it is the wire format, so a value read
|
|
2143
|
+
* from an API or a `<input type="date">` has to flow in without a cast.
|
|
2144
|
+
* {@link foldIsCalendarDate} is the runtime guard, and every component that
|
|
2145
|
+
* takes one runs it in dev mode.
|
|
2146
|
+
*/
|
|
2147
|
+
type FoldCalendarDate = string;
|
|
2148
|
+
/** A day of the week, as the anchor a calendar's weeks start on. */
|
|
2149
|
+
type FoldWeekday = "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun";
|
|
2150
|
+
/**
|
|
2151
|
+
* The days a calendar shades as the weekend by default. A separate fact from
|
|
2152
|
+
* the week's anchor day: a Sunday-first calendar still rests on Sat/Sun, and a
|
|
2153
|
+
* Saturday-first one (much of the Middle East) rests on Fri/Sat while starting
|
|
2154
|
+
* on Saturday — which is why the two are different inputs, not one derived
|
|
2155
|
+
* from the other.
|
|
2156
|
+
*/
|
|
2157
|
+
declare const FOLD_DEFAULT_WEEKEND_DAYS: readonly ["sat", "sun"];
|
|
2158
|
+
/**
|
|
2159
|
+
* Whether `value` is a well-formed **and real** plain date. Catches both a
|
|
2160
|
+
* malformed shape (`"2026-5-1"`) and an impossible day (`"2026-02-30"`), the
|
|
2161
|
+
* latter by round-tripping through UTC and checking the parts survived.
|
|
2162
|
+
*/
|
|
2163
|
+
declare function foldIsCalendarDate(value: string): boolean;
|
|
2164
|
+
/**
|
|
2165
|
+
* Today, read from the **local** clock — the day the user believes it is,
|
|
2166
|
+
* which is what a calendar highlights. Pass `now` to pin it (tests, a
|
|
2167
|
+
* workspace clock).
|
|
2168
|
+
*/
|
|
2169
|
+
declare function foldToday(now?: Date): FoldCalendarDate;
|
|
2170
|
+
/**
|
|
2171
|
+
* A native `Date` read as the plain date it shows on a **local** clock — the
|
|
2172
|
+
* inbound bridge, and the one conversion every consumer would otherwise write
|
|
2173
|
+
* by hand as `date.toISOString().slice(0, 10)`, which is UTC and therefore off
|
|
2174
|
+
* by a day for anyone west of Greenwich after 6pm. That is the exact bug this
|
|
2175
|
+
* whole module exists to remove, so the correct form ships with it.
|
|
2176
|
+
*
|
|
2177
|
+
* Pair with {@link foldToNativeDate} for the way out.
|
|
2178
|
+
*/
|
|
2179
|
+
declare function foldFromNativeDate(date: Date): FoldCalendarDate;
|
|
2180
|
+
/** `date` shifted by `days` (negative moves back). */
|
|
2181
|
+
declare function foldAddDays(date: FoldCalendarDate, days: number): FoldCalendarDate;
|
|
2182
|
+
/**
|
|
2183
|
+
* Whole days from `from` to `to` — signed, and **exclusive** (same day → `0`),
|
|
2184
|
+
* so a span's length is `foldDaysBetween(start, end) + 1`.
|
|
2185
|
+
*/
|
|
2186
|
+
declare function foldDaysBetween(from: FoldCalendarDate, to: FoldCalendarDate): number;
|
|
2187
|
+
/**
|
|
2188
|
+
* `date` shifted by `months`, clamping the day to the target month's length so
|
|
2189
|
+
* the result is always a real date (31 Jan + 1 month → 28/29 Feb, never 3 Mar).
|
|
2190
|
+
*/
|
|
2191
|
+
declare function foldAddMonths(date: FoldCalendarDate, months: number): FoldCalendarDate;
|
|
2192
|
+
/** The first day of `date`'s month. */
|
|
2193
|
+
declare function foldStartOfMonth(date: FoldCalendarDate): FoldCalendarDate;
|
|
2194
|
+
/** The last day of `date`'s month (28–31, leap years included). */
|
|
2195
|
+
declare function foldEndOfMonth(date: FoldCalendarDate): FoldCalendarDate;
|
|
2196
|
+
/**
|
|
2197
|
+
* The start of the week `date` falls in, for a calendar anchored on
|
|
2198
|
+
* `weekStartsOn`. Anchor-agnostic: a Monday-first and a Sunday-first calendar
|
|
2199
|
+
* ask the same question and get their own answer.
|
|
2200
|
+
*/
|
|
2201
|
+
declare function foldStartOfWeek(date: FoldCalendarDate, weekStartsOn?: FoldWeekday): FoldCalendarDate;
|
|
2202
|
+
/**
|
|
2203
|
+
* `date`'s position in its week, `0` on the anchor day — the column a day
|
|
2204
|
+
* occupies in a 7-wide grid.
|
|
2205
|
+
*/
|
|
2206
|
+
declare function foldWeekdayIndex(date: FoldCalendarDate, weekStartsOn?: FoldWeekday): number;
|
|
2207
|
+
/**
|
|
2208
|
+
* The ISO-8601 week number `date` falls in, `1`–`53`.
|
|
2209
|
+
*
|
|
2210
|
+
* ISO weeks always start on Monday and belong to the year holding their
|
|
2211
|
+
* **Thursday**, which is why 1 January is sometimes week 52 of the year before
|
|
2212
|
+
* — the rule European B2B reporting runs on, and the reason this cannot be
|
|
2213
|
+
* derived from the calendar's own `weekStartsOn`.
|
|
2214
|
+
*/
|
|
2215
|
+
declare function foldIsoWeek(date: FoldCalendarDate): number;
|
|
2216
|
+
/** The ISO week-numbering year of `date` — not always its calendar year. */
|
|
2217
|
+
declare function foldIsoWeekYear(date: FoldCalendarDate): number;
|
|
2218
|
+
/** Which day of the week `date` falls on, anchor-independent. */
|
|
2219
|
+
declare function foldWeekdayOf(date: FoldCalendarDate): FoldWeekday;
|
|
2220
|
+
/**
|
|
2221
|
+
* Whether `date` is one of the days a calendar shades as the weekend.
|
|
2222
|
+
*
|
|
2223
|
+
* Takes the weekend **as data**, because it is not derivable from the week's
|
|
2224
|
+
* anchor: the two are independent locale facts. Deriving it — "the last two
|
|
2225
|
+
* columns" — shades Friday and Saturday on a Sunday-first calendar and calls
|
|
2226
|
+
* Sunday a working day, which is wrong everywhere it is used.
|
|
2227
|
+
*
|
|
2228
|
+
* @default FOLD_DEFAULT_WEEKEND_DAYS (`['sat', 'sun']`)
|
|
2229
|
+
*/
|
|
2230
|
+
declare function foldIsWeekend(date: FoldCalendarDate, weekendDays?: readonly FoldWeekday[]): boolean;
|
|
2231
|
+
/**
|
|
2232
|
+
* Anything whose `toString()` opens with an ISO date — `Temporal.PlainDate`,
|
|
2233
|
+
* `PlainDateTime` and `ZonedDateTime` all do, and so does a plain string.
|
|
2234
|
+
*
|
|
2235
|
+
* Typed structurally on purpose: the package takes no dependency on `Temporal`
|
|
2236
|
+
* and works whether or not the runtime has it.
|
|
2237
|
+
*/
|
|
2238
|
+
interface FoldIsoDateLike {
|
|
2239
|
+
toString(): string;
|
|
2240
|
+
}
|
|
2241
|
+
/**
|
|
2242
|
+
* A `Temporal` value read as the plain date it starts with.
|
|
2243
|
+
*
|
|
2244
|
+
* `Temporal.PlainDate.toString()` **is** `YYYY-MM-DD` — the primitive this
|
|
2245
|
+
* module chose for correctness turns out to be exactly Temporal-shaped, which
|
|
2246
|
+
* no `Date`-based calendar can say. Going the other way needs no helper at all:
|
|
2247
|
+
* `Temporal.PlainDate.from(foldDate)` already accepts one of ours.
|
|
2248
|
+
*
|
|
2249
|
+
* A `PlainDateTime` or a `ZonedDateTime` drops its time here, which is the
|
|
2250
|
+
* point — this family plots whole days, and the day you mean is the one in the
|
|
2251
|
+
* value's own calendar and zone, not the one UTC would have given you.
|
|
2252
|
+
*
|
|
2253
|
+
* Returns `""` for anything that is not an ISO date, so a bad value fails
|
|
2254
|
+
* {@link foldIsCalendarDate} rather than silently rendering the wrong month.
|
|
2255
|
+
*/
|
|
2256
|
+
declare function foldFromTemporal(value: FoldIsoDateLike): FoldCalendarDate;
|
|
2257
|
+
/**
|
|
2258
|
+
* A `Date` at **UTC midnight** of `date` — the bridge to `Intl.DateTimeFormat`
|
|
2259
|
+
* for month and weekday names. Format it with `timeZone: "UTC"`, or the local
|
|
2260
|
+
* zone will shift the label back a day west of Greenwich.
|
|
2261
|
+
*/
|
|
2262
|
+
declare function foldToNativeDate(date: FoldCalendarDate): Date;
|
|
2263
|
+
|
|
2264
|
+
/**
|
|
2265
|
+
* Wall-clock time for the time grid — `HH:mm`, 24-hour, **no zone**.
|
|
2266
|
+
*
|
|
2267
|
+
* ## Why not an instant
|
|
2268
|
+
* The same decision as the date, for the same reason. A meeting at 09:00 is at
|
|
2269
|
+
* 09:00 on the wall the person is looking at; storing it as an instant means
|
|
2270
|
+
* every render re-derives that wall time from a zone, and the moment the zone
|
|
2271
|
+
* is wrong — a server default, a user travelling, a DST edge — the grid draws
|
|
2272
|
+
* the wrong hour. `"09:00"` cannot be wrong about which hour it means.
|
|
2273
|
+
*
|
|
2274
|
+
* The zone is the **app's** boundary, exactly like the date: convert once on
|
|
2275
|
+
* the way in ({@link foldFromTemporal} takes a `ZonedDateTime` and drops it to
|
|
2276
|
+
* the day and, here, the caller reads its `.hour`/`.minute`), and the calendar
|
|
2277
|
+
* never has to know.
|
|
2278
|
+
*
|
|
2279
|
+
* Times compare **lexicographically** like the dates do — `"09:00" < "14:30"` —
|
|
2280
|
+
* which is what makes overlap detection a string comparison rather than a
|
|
2281
|
+
* parse. `24:00` is legal and means the end of the day, so a span that runs to
|
|
2282
|
+
* midnight has an end greater than its start.
|
|
2283
|
+
*/
|
|
2284
|
+
/** A wall-clock time, `HH:mm`, `00:00`–`24:00`. */
|
|
2285
|
+
type FoldCalendarTime = string;
|
|
2286
|
+
/** Minutes in a day — the grid's own unit. */
|
|
2287
|
+
declare const FOLD_MINUTES_PER_DAY = 1440;
|
|
2288
|
+
/**
|
|
2289
|
+
* Whether `value` is a well-formed **and real** wall-clock time.
|
|
2290
|
+
*
|
|
2291
|
+
* The shape check is not enough on its own: `"10:75"` and `"23:60"` both match
|
|
2292
|
+
* `HH:mm` and both sit under 1440 minutes, so a range check on the total would
|
|
2293
|
+
* wave them through. The fields are validated separately — minutes `00`–`59`,
|
|
2294
|
+
* hours `00`–`23`, plus the single `24:00` that means the end of the day — the
|
|
2295
|
+
* same rigour {@link foldIsCalendarDate} applies to `2026-02-30`.
|
|
2296
|
+
*/
|
|
2297
|
+
declare function foldIsCalendarTime(value: string): boolean;
|
|
2298
|
+
/** Minutes since midnight — the number the grid positions on. */
|
|
2299
|
+
declare function foldToMinutes(time: FoldCalendarTime): number;
|
|
2300
|
+
/** Minutes since midnight back to `HH:mm`, clamped to the day. */
|
|
2301
|
+
declare function foldFromMinutes(minutes: number): FoldCalendarTime;
|
|
2302
|
+
/** `time` shifted by `minutes`, clamped to the day rather than wrapping. */
|
|
2303
|
+
declare function foldAddMinutes(time: FoldCalendarTime, minutes: number): FoldCalendarTime;
|
|
2304
|
+
|
|
2305
|
+
/**
|
|
2306
|
+
* Every date format the calendar family renders, in one table.
|
|
2307
|
+
*
|
|
2308
|
+
* They used to be five components' worth of inline `Intl.DateTimeFormat`
|
|
2309
|
+
* option bags — which is how the day view ended up asking for
|
|
2310
|
+
* `{ weekday: 'long', month: 'long' }` and printing "Saturday May", a phrase in
|
|
2311
|
+
* no locale. Side by side they can be read against each other, and a consumer
|
|
2312
|
+
* can see what a locale is actually asked for.
|
|
2313
|
+
*
|
|
2314
|
+
* `timeZone: 'UTC'` is not optional: a plain date is bridged to `Date` at UTC
|
|
2315
|
+
* midnight, so formatting it in the local zone would print the day before for
|
|
2316
|
+
* anyone west of Greenwich.
|
|
2317
|
+
*
|
|
2318
|
+
* `calendar: 'gregory'` is pinned for the same reason `timeZone` is: the grid
|
|
2319
|
+
* counts days and groups months in the Gregorian calendar (that is what a
|
|
2320
|
+
* `YYYY-MM-DD` string *is*), so the names beside those numbers must be Gregorian
|
|
2321
|
+
* too. Left to the locale's own default, `ar-SA` would print Hijri month names
|
|
2322
|
+
* over Gregorian day numbers on rows that break on Gregorian months — a
|
|
2323
|
+
* calendar contradicting itself. The family is Gregorian, localised into the
|
|
2324
|
+
* language of the locale, not into its calendar system; a non-Gregorian layout
|
|
2325
|
+
* is a separate widget this one does not pretend to be.
|
|
2326
|
+
*/
|
|
2327
|
+
declare const FOLD_CALENDAR_FORMATS: {
|
|
2328
|
+
/** Whole date, spelled out — accessible names. */
|
|
2329
|
+
readonly dateFull: {
|
|
2330
|
+
readonly dateStyle: "long";
|
|
2331
|
+
};
|
|
2332
|
+
/** Whole date **with its weekday** — a period title, where it is the heading. */
|
|
2333
|
+
readonly dateFullWeekday: {
|
|
2334
|
+
readonly dateStyle: "full";
|
|
2335
|
+
};
|
|
2336
|
+
/** `18 May 2026` — the ends of a week, which `formatRange` then joins. */
|
|
2337
|
+
readonly dayMonthYear: {
|
|
2338
|
+
readonly day: "numeric";
|
|
2339
|
+
readonly month: "long";
|
|
2340
|
+
readonly year: "numeric";
|
|
2341
|
+
};
|
|
2342
|
+
/** `Mon` — grid column headers. */
|
|
2343
|
+
readonly weekdayShort: {
|
|
2344
|
+
readonly weekday: "short";
|
|
2345
|
+
};
|
|
2346
|
+
/** `Monday` — a day heading, where there is room. */
|
|
2347
|
+
readonly weekdayLong: {
|
|
2348
|
+
readonly weekday: "long";
|
|
2349
|
+
};
|
|
2350
|
+
/** `May` — beside a day number, never on its own with a weekday. */
|
|
2351
|
+
readonly monthLong: {
|
|
2352
|
+
readonly month: "long";
|
|
2353
|
+
};
|
|
2354
|
+
/** `May` (abbreviated) — the agenda rail, where width is scarce. */
|
|
2355
|
+
readonly monthShort: {
|
|
2356
|
+
readonly month: "short";
|
|
2357
|
+
};
|
|
2358
|
+
/** `May 2026` — a period title. */
|
|
2359
|
+
readonly monthYear: {
|
|
2360
|
+
readonly month: "long";
|
|
2361
|
+
readonly year: "numeric";
|
|
2362
|
+
};
|
|
2363
|
+
/** `18 May` — a span's ends, which `formatRange` then joins. */
|
|
2364
|
+
readonly dayMonthShort: {
|
|
2365
|
+
readonly day: "numeric";
|
|
2366
|
+
readonly month: "short";
|
|
2367
|
+
};
|
|
2368
|
+
/** `09:00` in France, `9:00 AM` in the US — an hour down the grid's gutter. */
|
|
2369
|
+
readonly hourMark: {
|
|
2370
|
+
readonly hour: "numeric";
|
|
2371
|
+
readonly minute: "2-digit";
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
/** A key of {@link FOLD_CALENDAR_FORMATS}. */
|
|
2375
|
+
type FoldCalendarFormat = keyof typeof FOLD_CALENDAR_FORMATS;
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* Every string the calendar renders that does not come from the caller's data.
|
|
2379
|
+
*
|
|
2380
|
+
* Month and weekday names are deliberately **absent**: they come from
|
|
2381
|
+
* `Intl.DateTimeFormat` driven by the `locale` input, so a consumer gets all
|
|
2382
|
+
* ~200 locales for free instead of hand-translating twelve month names. What
|
|
2383
|
+
* remains here is the chrome — the words `Intl` cannot supply.
|
|
2384
|
+
*/
|
|
2385
|
+
interface FoldCalendarLabels {
|
|
2386
|
+
/** Accessible name of the grid itself. */
|
|
2387
|
+
readonly grid: string;
|
|
2388
|
+
/** Word marking the cell that is today, appended to its accessible name. */
|
|
2389
|
+
readonly today: string;
|
|
2390
|
+
/** The chip standing for events a week had no lane for. */
|
|
2391
|
+
readonly moreEvents: (count: number) => string;
|
|
2392
|
+
/**
|
|
2393
|
+
* A count of events — announced on a day cell, and on a chip that collapses
|
|
2394
|
+
* a group into one.
|
|
2395
|
+
*/
|
|
2396
|
+
readonly eventCount: (count: number) => string;
|
|
2397
|
+
/**
|
|
2398
|
+
* Announced on a day cell that is showing fewer events than it holds — the
|
|
2399
|
+
* lane budget is a visual limit, and a screen reader is told about it rather
|
|
2400
|
+
* than silently given a smaller number.
|
|
2401
|
+
*/
|
|
2402
|
+
readonly hiddenCount: (count: number) => string;
|
|
2403
|
+
/** Label of the time grid's all-day strip. */
|
|
2404
|
+
readonly allDay: string;
|
|
2405
|
+
/** Accessible name of the time grid's scrollable hour area. */
|
|
2406
|
+
readonly hours: string;
|
|
2407
|
+
/** Header of the ISO week-number column — a symbol, not a sentence. */
|
|
2408
|
+
readonly weekNumberShort: string;
|
|
2409
|
+
/** Accessible reading of a week number, since the column header is a glyph. */
|
|
2410
|
+
readonly weekNumber: (week: number) => string;
|
|
2411
|
+
/** Shown by the day view when nothing sits on the day. */
|
|
2412
|
+
readonly emptyDay: string;
|
|
2413
|
+
/** Shown by the list view when the range holds nothing. */
|
|
2414
|
+
readonly emptyRange: string;
|
|
2415
|
+
/** The toolbar's jump-to-today button. */
|
|
2416
|
+
readonly todayAction: string;
|
|
2417
|
+
/** Accessible name of the toolbar's back control. */
|
|
2418
|
+
readonly previousPeriod: string;
|
|
2419
|
+
/** Accessible name of the toolbar's forward control. */
|
|
2420
|
+
readonly nextPeriod: string;
|
|
2421
|
+
/** Accessible name of the view switch. */
|
|
2422
|
+
readonly viewSwitch: string;
|
|
2423
|
+
/** The four view names, in the switch. */
|
|
2424
|
+
readonly viewMonth: string;
|
|
2425
|
+
readonly viewWeek: string;
|
|
2426
|
+
readonly viewDay: string;
|
|
2427
|
+
readonly viewList: string;
|
|
2428
|
+
/** Accessible name of the agenda rail. */
|
|
2429
|
+
readonly agenda: string;
|
|
2430
|
+
/** Accessible name of the rail's slice switch — distinct from the rail itself. */
|
|
2431
|
+
readonly agendaModes: string;
|
|
2432
|
+
/** The agenda's two slices, in its own switch. */
|
|
2433
|
+
readonly agendaTodo: string;
|
|
2434
|
+
readonly agendaUpcoming: string;
|
|
2435
|
+
/** Shown when the agenda's current slice is clear. */
|
|
2436
|
+
readonly agendaEmptyTodo: string;
|
|
2437
|
+
readonly agendaEmptyUpcoming: string;
|
|
2438
|
+
/** Shown when `limit` stopped the rail short of what is actually ahead. */
|
|
2439
|
+
readonly agendaMore: (days: number) => string;
|
|
2440
|
+
/** Relative day names the agenda prefers over a date. */
|
|
2441
|
+
readonly relativeToday: string;
|
|
2442
|
+
readonly relativeTomorrow: string;
|
|
2443
|
+
/** Accessible names of the rail's collapse control, in each state. */
|
|
2444
|
+
readonly collapse: string;
|
|
2445
|
+
readonly expand: string;
|
|
2446
|
+
/** Accessible name of the source filter. */
|
|
2447
|
+
readonly sourceFilter: string;
|
|
2448
|
+
/** Reading of a source's state, e.g. `("Absences", true) => "Absences, shown"`. */
|
|
2449
|
+
readonly sourceState: (label: string, shown: boolean) => string;
|
|
2450
|
+
}
|
|
2451
|
+
/** The English defaults — the base every override merges onto. */
|
|
2452
|
+
declare const FOLD_CALENDAR_DEFAULT_LABELS: FoldCalendarLabels;
|
|
2453
|
+
/** App-wide calendar labels; defaults to English. */
|
|
2454
|
+
declare const FOLD_CALENDAR_LABELS: InjectionToken<FoldCalendarLabels>;
|
|
2455
|
+
/** Provide calendar labels for the whole app, merged over the English defaults. */
|
|
2456
|
+
declare function provideFoldCalendarLabels(labels: Partial<FoldCalendarLabels>): Provider;
|
|
2457
|
+
|
|
2458
|
+
/**
|
|
2459
|
+
* The three things every calendar view needs and none of them is about: its
|
|
2460
|
+
* labels, its locale, and the chip template a consumer may have projected.
|
|
2461
|
+
*
|
|
2462
|
+
* Applied through `hostDirectives`, so `locale` and `labels` are still ordinary
|
|
2463
|
+
* inputs on `<fold-calendar-month>`, `<fold-calendar-week>` and the rest — the
|
|
2464
|
+
* consumer sees no difference, and the five views stop carrying five identical
|
|
2465
|
+
* copies of the same eight lines.
|
|
2466
|
+
*
|
|
2467
|
+
* Internal — a view exposes it, it is never applied by hand.
|
|
2468
|
+
*
|
|
2469
|
+
* @example
|
|
2470
|
+
* ```ts
|
|
2471
|
+
* @Component({
|
|
2472
|
+
* hostDirectives: [
|
|
2473
|
+
* { directive: FoldCalendarChromeDirective, inputs: ['locale', 'labels'] },
|
|
2474
|
+
* ],
|
|
2475
|
+
* })
|
|
2476
|
+
* export class FoldCalendarWeekComponent<T = unknown> {
|
|
2477
|
+
* protected readonly chrome = inject(FoldCalendarChromeDirective);
|
|
2478
|
+
* }
|
|
2479
|
+
* ```
|
|
2480
|
+
*/
|
|
2481
|
+
declare class FoldCalendarChromeDirective {
|
|
2482
|
+
/** BCP-47 tag driving every `Intl` name; omitted, the runtime default. */
|
|
2483
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
2484
|
+
/** Per-instance label overrides, merged over the app-wide (or English) set. */
|
|
2485
|
+
readonly labels: _angular_core.InputSignal<Partial<FoldCalendarLabels> | undefined>;
|
|
2486
|
+
/**
|
|
2487
|
+
* Per-instance `Intl` option overrides, merged over
|
|
2488
|
+
* {@link FOLD_CALENDAR_FORMATS}. Labels let a locale translate; this lets it
|
|
2489
|
+
* **reformat** — a numeric weekday header, a four-digit year, a narrow month.
|
|
2490
|
+
*/
|
|
2491
|
+
readonly formats: _angular_core.InputSignal<Partial<Record<"dateFull" | "dateFullWeekday" | "dayMonthYear" | "weekdayShort" | "weekdayLong" | "monthLong" | "monthShort" | "monthYear" | "dayMonthShort" | "hourMark", Intl.DateTimeFormatOptions>> | undefined>;
|
|
2492
|
+
private readonly injectedLabels;
|
|
2493
|
+
private readonly projectedEvent;
|
|
2494
|
+
/** Effective labels — the app-wide (or English) set, with `labels` on top. */
|
|
2495
|
+
readonly l: _angular_core.Signal<FoldCalendarLabels>;
|
|
2496
|
+
/** The custom chip template, when one is projected. */
|
|
2497
|
+
readonly eventContent: _angular_core.Signal<_angular_core.TemplateRef<fold_ng.FoldCalendarEventContext<any>> | null>;
|
|
2498
|
+
/**
|
|
2499
|
+
* What this locale says its week looks like — the default behind
|
|
2500
|
+
* `weekStartsOn` and `weekendDays`, so a calendar is right in Cairo and
|
|
2501
|
+
* Chicago without the caller having to know either.
|
|
2502
|
+
*/
|
|
2503
|
+
readonly weekInfo: _angular_core.Signal<fold_ng.FoldWeekInfo>;
|
|
2504
|
+
/** The anchor a view should use: the caller's, else the locale's. */
|
|
2505
|
+
anchor(explicit: FoldWeekday | undefined): FoldWeekday;
|
|
2506
|
+
/** The weekend a view should shade: the caller's, else the locale's. */
|
|
2507
|
+
weekend(explicit: readonly FoldWeekday[] | undefined): readonly FoldWeekday[];
|
|
2508
|
+
/** One date, in this view's locale and its format overrides. */
|
|
2509
|
+
format(date: FoldCalendarDate, format: FoldCalendarFormat): string;
|
|
2510
|
+
/** A wall-clock time, in this view's locale (24-hour, or AM/PM). */
|
|
2511
|
+
formatTime(time: string): string;
|
|
2512
|
+
/** A span, in this view's locale and its format overrides. */
|
|
2513
|
+
formatRange(from: FoldCalendarDate, to: FoldCalendarDate, format: FoldCalendarFormat): string;
|
|
2514
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarChromeDirective, never>;
|
|
2515
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldCalendarChromeDirective, never, never, { "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "formats": { "alias": "formats"; "required": false; "isSignal": true; }; }, {}, ["projectedEvent"], never, true, never>;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
/**
|
|
2519
|
+
* Public data model for the calendar family. The calendar knows nothing of the
|
|
2520
|
+
* domain it plots — an app maps its own records onto {@link FoldCalendarEvent}
|
|
2521
|
+
* and gets them back, still typed, on every output.
|
|
2522
|
+
*
|
|
2523
|
+
* That ignorance is the design, not a stage it will grow out of. The family
|
|
2524
|
+
* **displays**; it never originates a record, because the validation and the
|
|
2525
|
+
* write path both belong to the consumer. Which is also why `tone` is an input
|
|
2526
|
+
* rather than something derived here: a band that turns amber and then red as
|
|
2527
|
+
* an account sits unactivated, and a band that is amber because a leave request
|
|
2528
|
+
* is pending, are the same component being told two different things.
|
|
2529
|
+
*/
|
|
2530
|
+
/**
|
|
2531
|
+
* Semantic weight of an event, mapped to the shared tone roles. `muted` reads
|
|
2532
|
+
* as struck-through and dimmed — the "it no longer counts" state (cancelled,
|
|
2533
|
+
* withdrawn, superseded) rather than a quieter `neutral`.
|
|
2534
|
+
*/
|
|
2535
|
+
type FoldCalendarTone = "neutral" | "success" | "warning" | "alert" | "muted";
|
|
2536
|
+
/** Which half of a day an event's edge falls on. */
|
|
2537
|
+
type FoldCalendarHalfDay = "morning" | "afternoon";
|
|
2538
|
+
/**
|
|
2539
|
+
* An entry on the calendar, spanning one or more whole days.
|
|
2540
|
+
*
|
|
2541
|
+
* Generic over `T` so `data` carries the app's own record through layout and
|
|
2542
|
+
* back out of `eventClick` without a cast. Both bounds are **inclusive**: a
|
|
2543
|
+
* single-day event has `start === end`.
|
|
2544
|
+
*/
|
|
2545
|
+
interface FoldCalendarEvent<T = unknown> {
|
|
2546
|
+
/** Stable identity — also the layout key, so it must be unique per render. */
|
|
2547
|
+
readonly id: string;
|
|
2548
|
+
/** First day, inclusive. */
|
|
2549
|
+
readonly start: FoldCalendarDate;
|
|
2550
|
+
/** Last day, inclusive. Equal to {@link start} for a single-day event. */
|
|
2551
|
+
readonly end: FoldCalendarDate;
|
|
2552
|
+
/** Primary text on the chip. */
|
|
2553
|
+
readonly label: string;
|
|
2554
|
+
/** Secondary line — status, duration, venue. Rendered verbatim. */
|
|
2555
|
+
readonly subline?: string;
|
|
2556
|
+
/** Semantic weight. @default 'neutral' */
|
|
2557
|
+
readonly tone?: FoldCalendarTone;
|
|
2558
|
+
/** Leading glyph, drawn with `fold-icon`. */
|
|
2559
|
+
readonly icon?: FoldIconName;
|
|
2560
|
+
/**
|
|
2561
|
+
* Wall-clock start, `HH:mm`. An event carrying **both** times is placed on
|
|
2562
|
+
* the time grid's clock; anything else — neither, or only one — is an all-day
|
|
2563
|
+
* span, which is what the month, week, day and list views plot. Half a time
|
|
2564
|
+
* is a data bug, and reading it as all-day loses the least.
|
|
2565
|
+
*
|
|
2566
|
+
* No zone, by the same decision as the date: 09:00 is the hour on the wall,
|
|
2567
|
+
* and the app converts once at its own boundary.
|
|
2568
|
+
*/
|
|
2569
|
+
readonly startTime?: FoldCalendarTime;
|
|
2570
|
+
/** Wall-clock end, `HH:mm`. `24:00` is midnight at the end of {@link end}. */
|
|
2571
|
+
readonly endTime?: FoldCalendarTime;
|
|
2572
|
+
/** Which half of {@link start} the event opens on. */
|
|
2573
|
+
readonly startHalfDay?: FoldCalendarHalfDay;
|
|
2574
|
+
/** Which half of {@link end} the event closes on. */
|
|
2575
|
+
readonly endHalfDay?: FoldCalendarHalfDay;
|
|
2576
|
+
/**
|
|
2577
|
+
* Collapses events sharing this key into a single chip carrying a count —
|
|
2578
|
+
* for a bulk action that would otherwise flood the grid (a whole team off on
|
|
2579
|
+
* the same days).
|
|
2580
|
+
*
|
|
2581
|
+
* The chip covers the **union** of the members' ranges, and is open-ended if
|
|
2582
|
+
* **any** member is. Everything else it renders (tone, icon, label, subline,
|
|
2583
|
+
* `sourceKey`) comes from one real member: the most severe by tone
|
|
2584
|
+
* (`alert` → `warning` → `success` → `neutral` → `muted`), ties going to
|
|
2585
|
+
* document order. Picking one event rather than merging fields keeps the chip
|
|
2586
|
+
* something that actually exists in the feed, and stops a first cancelled
|
|
2587
|
+
* member from quietly greying out a group that contains an alert.
|
|
2588
|
+
*/
|
|
2589
|
+
readonly groupId?: string;
|
|
2590
|
+
/** Label for the collapsed chip; falls back to the representative's `label`. */
|
|
2591
|
+
readonly groupLabel?: string;
|
|
2592
|
+
/**
|
|
2593
|
+
* The real range extends past {@link start} beyond what was loaded — the
|
|
2594
|
+
* caller clamped it to the queried window. Renders the same open edge as a
|
|
2595
|
+
* span continuing from an earlier week.
|
|
2596
|
+
*/
|
|
2597
|
+
readonly openStart?: boolean;
|
|
2598
|
+
/** As {@link openStart}, for an end with no known bound (an open contract). */
|
|
2599
|
+
readonly openEnd?: boolean;
|
|
2600
|
+
/**
|
|
2601
|
+
* Which feed this came from — the key a {@link FoldCalendarSource} declares.
|
|
2602
|
+
* A calendar usually merges several (a programme, staff leave, contracts),
|
|
2603
|
+
* and this is what lets one be counted and switched off without the calendar
|
|
2604
|
+
* knowing what any of them mean.
|
|
2605
|
+
*/
|
|
2606
|
+
readonly sourceKey?: string;
|
|
2607
|
+
/** The app's own record, handed back untouched on every output. */
|
|
2608
|
+
readonly data?: T;
|
|
2609
|
+
}
|
|
2610
|
+
/** One feed of events, as the source filter lists it. */
|
|
2611
|
+
interface FoldCalendarSource {
|
|
2612
|
+
/** Matches {@link FoldCalendarEvent.sourceKey}. */
|
|
2613
|
+
readonly key: string;
|
|
2614
|
+
/** Shown on the chip. */
|
|
2615
|
+
readonly label: string;
|
|
2616
|
+
/** Dot colour — the tone the feed reads as. @default 'neutral' */
|
|
2617
|
+
readonly tone?: FoldCalendarTone;
|
|
2618
|
+
}
|
|
2619
|
+
/**
|
|
2620
|
+
* One day cell of a grid — the calendar's answer to "what is this square",
|
|
2621
|
+
* with every flag a view needs to style it already resolved.
|
|
2622
|
+
*/
|
|
2623
|
+
interface FoldCalendarDay {
|
|
2624
|
+
/** The day this cell stands for. */
|
|
2625
|
+
readonly date: FoldCalendarDate;
|
|
2626
|
+
/** Day of the month, `1`–`31`, for the cell's number. */
|
|
2627
|
+
readonly dayOfMonth: number;
|
|
2628
|
+
/** Inside the month being displayed — `false` for the leading/trailing pad. */
|
|
2629
|
+
readonly inMonth: boolean;
|
|
2630
|
+
/** Matches the calendar's "today". */
|
|
2631
|
+
readonly isToday: boolean;
|
|
2632
|
+
/** Falls on one of the configured weekend days. */
|
|
2633
|
+
readonly isWeekend: boolean;
|
|
2634
|
+
/** How many events cover this day — already counted, so a view never refilters. */
|
|
2635
|
+
readonly eventCount: number;
|
|
2636
|
+
/**
|
|
2637
|
+
* How many of them no lane could take, so this cell is showing fewer events
|
|
2638
|
+
* than it has. Always `0` in the column views, which never drop anything.
|
|
2639
|
+
*/
|
|
2640
|
+
readonly hiddenCount: number;
|
|
2641
|
+
}
|
|
2642
|
+
/**
|
|
2643
|
+
* Extra class names for one day cell — the hook for anything the calendar
|
|
2644
|
+
* cannot know: a public holiday, a closure, a blackout, "fully staffed". Each
|
|
2645
|
+
* name is emitted as `data-fold-day-<name>` on the cell, so an app styles it
|
|
2646
|
+
* from its own sheet without reaching for an internal class.
|
|
2647
|
+
*
|
|
2648
|
+
* @example
|
|
2649
|
+
* ```ts
|
|
2650
|
+
* readonly holidays = (day: FoldCalendarDay) =>
|
|
2651
|
+
* HOLIDAYS.has(day.date) ? ['holiday'] : [];
|
|
2652
|
+
* ```
|
|
2653
|
+
*/
|
|
2654
|
+
type FoldCalendarDayModifiers = (day: FoldCalendarDay) => readonly string[];
|
|
2655
|
+
/**
|
|
2656
|
+
* A laid-out slice of one event inside one week row: which columns it covers,
|
|
2657
|
+
* which lane it sits in, and whether its edges are real or a continuation.
|
|
2658
|
+
*
|
|
2659
|
+
* An event spanning a week boundary produces one band per week — same event,
|
|
2660
|
+
* different segment — which is why {@link key} exists alongside the event id.
|
|
2661
|
+
*/
|
|
2662
|
+
interface FoldCalendarBand<T = unknown> {
|
|
2663
|
+
/** Unique per segment (`<eventId>@<weekStart>`) — the `@for` track key. */
|
|
2664
|
+
readonly key: string;
|
|
2665
|
+
/** The event this segment belongs to (the representative, when grouped). */
|
|
2666
|
+
readonly event: FoldCalendarEvent<T>;
|
|
2667
|
+
/** First column covered, `0`–`6`. */
|
|
2668
|
+
readonly startColumn: number;
|
|
2669
|
+
/** Last column covered, `0`–`6`, inclusive. */
|
|
2670
|
+
readonly endColumn: number;
|
|
2671
|
+
/** Row within the week's stack, `0`-based. */
|
|
2672
|
+
readonly lane: number;
|
|
2673
|
+
/** The span started before this week (or is open-ended) — draw an open edge. */
|
|
2674
|
+
readonly continuesBefore: boolean;
|
|
2675
|
+
/** The span continues after this week (or is open-ended). */
|
|
2676
|
+
readonly continuesAfter: boolean;
|
|
2677
|
+
/** Events collapsed into this band; `1` when it stands for itself. */
|
|
2678
|
+
readonly groupSize: number;
|
|
2679
|
+
/** Half-day edge, only when this segment carries the event's real start. */
|
|
2680
|
+
readonly startHalfDay?: FoldCalendarHalfDay;
|
|
2681
|
+
/** Half-day edge, only when this segment carries the event's real end. */
|
|
2682
|
+
readonly endHalfDay?: FoldCalendarHalfDay;
|
|
2683
|
+
}
|
|
2684
|
+
/**
|
|
2685
|
+
* A day with the events sitting on it — the render model of the column views
|
|
2686
|
+
* (week, day), where chips stack in a list and need no lane packing.
|
|
2687
|
+
*/
|
|
2688
|
+
interface FoldCalendarDayEvents<T = unknown> {
|
|
2689
|
+
readonly day: FoldCalendarDay;
|
|
2690
|
+
/** Events covering {@link day}, in the caller's order. */
|
|
2691
|
+
readonly events: readonly FoldCalendarEvent<T>[];
|
|
2692
|
+
}
|
|
2693
|
+
/** One row of a month grid: its seven days, the bands over them, and what did not fit. */
|
|
2694
|
+
interface FoldCalendarWeek<T = unknown> {
|
|
2695
|
+
/** The week's anchor day — also the segment keys' discriminator. */
|
|
2696
|
+
readonly start: FoldCalendarDate;
|
|
2697
|
+
/** Seven cells, in column order. */
|
|
2698
|
+
readonly days: readonly FoldCalendarDay[];
|
|
2699
|
+
/** Placed bands, ordered by lane then column. */
|
|
2700
|
+
readonly bands: readonly FoldCalendarBand<T>[];
|
|
2701
|
+
/**
|
|
2702
|
+
* Spans overlapping this week that no lane could take. What each *day* lost
|
|
2703
|
+
* is on the day itself ({@link FoldCalendarDay.hiddenCount}) — a row-wide
|
|
2704
|
+
* total says a week is crowded without saying which day to open.
|
|
2705
|
+
*/
|
|
2706
|
+
readonly hiddenCount: number;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
/**
|
|
2710
|
+
* `<fold-calendar-month>` — a month grid where events span the days they cover.
|
|
2711
|
+
*
|
|
2712
|
+
* The grid is a **date axis**: seven columns of whole days, and over them a
|
|
2713
|
+
* layer of bands, each stretching from the column its event starts on to the
|
|
2714
|
+
* column it ends on. An event crossing a week boundary is drawn once per week
|
|
2715
|
+
* with an open edge on the side that continues, so a three-week holiday reads
|
|
2716
|
+
* as one thing rather than twenty-one chips.
|
|
2717
|
+
*
|
|
2718
|
+
* Dates are plain `YYYY-MM-DD` strings — see `calendar-date.ts` for why that,
|
|
2719
|
+
* and not `Date`.
|
|
2720
|
+
*
|
|
2721
|
+
* ## Inputs
|
|
2722
|
+
* | Input | Type | Default | Meaning |
|
|
2723
|
+
* |----------------|-------------------------------|---------------|---------|
|
|
2724
|
+
* | `month` | `FoldCalendarDate` | — | **Two-way.** Any date in the month on display; keyboard paging writes back. |
|
|
2725
|
+
* | `events` | `FoldCalendarEvent<T>[]` | `[]` | What to plot. Anything outside the grid is ignored. |
|
|
2726
|
+
* | `today` | `FoldCalendarDate` | — | The day to mark. Omitted, nothing is marked — pass `foldToday()`. |
|
|
2727
|
+
* | `weekStartsOn` | `FoldWeekday` | the locale's | Which day opens the row — `Intl.Locale` knows, so it is only an override. |
|
|
2728
|
+
* | `weekendDays` | `FoldWeekday[]` | the locale's | Which days are shaded — a separate fact from the anchor, and also in the locale. |
|
|
2729
|
+
* | `showWeekNumbers` | `boolean` | `false` | An ISO week number in a leading column. |
|
|
2730
|
+
* | `maxLanes` | `number` | `3` | Bands a week stacks before the rest collapse into overflow chips. |
|
|
2731
|
+
* | `fixedWeeks` | `boolean` | `false` | Always six rows, so the grid keeps one height across months. |
|
|
2732
|
+
* | `dayModifiers` | `(day) => string[]` | — | Extra names per cell, emitted as `data-fold-day-modifiers`. |
|
|
2733
|
+
* | `locale` | `string` | runtime | Drives month/weekday names through `Intl`. |
|
|
2734
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance overrides of the chrome strings. |
|
|
2735
|
+
*
|
|
2736
|
+
* ## Outputs
|
|
2737
|
+
* | Output | Payload | Fires on |
|
|
2738
|
+
* |-----------------|------------------------|----------|
|
|
2739
|
+
* | `dayClick` | `FoldCalendarDate` | A day cell activated by click, `Enter` or `Space`. |
|
|
2740
|
+
* | `eventClick` | `FoldCalendarEvent<T>` | A band clicked. Grouped bands emit their representative. |
|
|
2741
|
+
* | `overflowClick` | `FoldCalendarDate` | A `+N` chip — the **day** whose events overflowed, so the caller knows which one to open. |
|
|
2742
|
+
*
|
|
2743
|
+
* ## Templates
|
|
2744
|
+
* | Directive | Replaces |
|
|
2745
|
+
* |------------------------|----------|
|
|
2746
|
+
* | `foldCalendarEvent` | The inside of a band — icon + label + count. |
|
|
2747
|
+
* | `foldCalendarDay` | The inside of a day cell — the day number. |
|
|
2748
|
+
* | `foldCalendarOverflow` | The `+N` chip. |
|
|
2749
|
+
*
|
|
2750
|
+
* ## Theming
|
|
2751
|
+
* | CSS variable | Default | Sets |
|
|
2752
|
+
* |---------------------------------------|---------|------|
|
|
2753
|
+
* | `--fold-calendar-month-header-row` | `30px` | Height of the day-number row. |
|
|
2754
|
+
* | `--fold-calendar-month-lane` | `22px` | Height of one band lane. |
|
|
2755
|
+
* | `--fold-calendar-month-row-min-height`| `112px` | Minimum height of a week row. |
|
|
2756
|
+
* | `--fold-calendar-month-daynum-size` | `22px` | The day number's round box. |
|
|
2757
|
+
* | `--fold-calendar-month-cell-padding` | `--fold-space-sm` | Padding inside a day cell. |
|
|
2758
|
+
* | `--fold-calendar-month-week-number-width` | `34px` | The ISO week column, when shown. |
|
|
2759
|
+
* | `--fold-calendar-bar-width` | `3px` | The tone bar down a band's leading edge. |
|
|
2760
|
+
* | `--fold-calendar-band-radius` | `--fold-radius-sm` | Band and chip corners. |
|
|
2761
|
+
* | `--fold-calendar-band-gutter` | `--fold-space-xs` | Gap between a band and its cell edge. |
|
|
2762
|
+
*
|
|
2763
|
+
* ## Accessibility
|
|
2764
|
+
* The **date grid** is the ARIA structure: `role="grid"` over rows of
|
|
2765
|
+
* `gridcell` days, with one roving tab stop (the focused day, else today, else
|
|
2766
|
+
* the 1st) and the grid pattern on the arrow keys — horizontal steps a day,
|
|
2767
|
+
* vertical steps a week, `Home`/`End` snap to the week, and `PageUp`/`PageDown`
|
|
2768
|
+
* page the month, writing back through `month`.
|
|
2769
|
+
*
|
|
2770
|
+
* Bands cannot be `gridcell`s — they span columns, which is the whole point —
|
|
2771
|
+
* so they are **`aria-hidden` mouse affordances**, and each day cell instead
|
|
2772
|
+
* announces its date, the today marker, its **event count** and, when the lane
|
|
2773
|
+
* budget hid some, **how many it is not showing**.
|
|
2774
|
+
*
|
|
2775
|
+
* That makes `dayClick` **load-bearing, not optional**: it is the accessible
|
|
2776
|
+
* path into an individual event. A month that handles only `eventClick` is a
|
|
2777
|
+
* view whose events no keyboard can reach — wire `dayClick` to a day or list
|
|
2778
|
+
* view, as the gallery does.
|
|
2779
|
+
*
|
|
2780
|
+
* @selector `fold-calendar-month`
|
|
2781
|
+
*
|
|
2782
|
+
* @example
|
|
2783
|
+
* ```html
|
|
2784
|
+
* <fold-calendar-month
|
|
2785
|
+
* [(month)]="month"
|
|
2786
|
+
* [events]="events()"
|
|
2787
|
+
* [today]="today"
|
|
2788
|
+
* (dayClick)="openDay($event)"
|
|
2789
|
+
* (eventClick)="openEvent($event)"
|
|
2790
|
+
* />
|
|
2791
|
+
* ```
|
|
2792
|
+
*/
|
|
2793
|
+
declare class FoldCalendarMonthComponent<T = unknown> {
|
|
2794
|
+
/** Any date inside the month on display. Two-way: keyboard paging writes back. */
|
|
2795
|
+
readonly month: _angular_core.ModelSignal<string>;
|
|
2796
|
+
/** Events to plot; those missing the grid entirely are ignored. */
|
|
2797
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<T>[]>;
|
|
2798
|
+
/** The day to mark as today. Omit and none is marked (an SSR-stable default). */
|
|
2799
|
+
readonly today: _angular_core.InputSignal<string | undefined>;
|
|
2800
|
+
/** Day the weeks start on. @default the locale's own first day */
|
|
2801
|
+
readonly weekStartsOn: _angular_core.InputSignal<FoldWeekday | undefined>;
|
|
2802
|
+
/** Days shaded as the weekend. @default the locale's own weekend */
|
|
2803
|
+
readonly weekendDays: _angular_core.InputSignal<readonly FoldWeekday[] | undefined>;
|
|
2804
|
+
/** Show the ISO week number in a leading column. */
|
|
2805
|
+
readonly showWeekNumbers: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2806
|
+
/** Bands a week stacks before the rest collapse into overflow chips. @default 3 */
|
|
2807
|
+
readonly maxLanes: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
2808
|
+
/** Always emit six rows, so the grid keeps one height across months. */
|
|
2809
|
+
readonly fixedWeeks: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2810
|
+
/** Extra names for a cell, emitted as `data-fold-day-modifiers`. */
|
|
2811
|
+
readonly dayModifiers: _angular_core.InputSignal<FoldCalendarDayModifiers | undefined>;
|
|
2812
|
+
/** A day cell was activated. */
|
|
2813
|
+
readonly dayClick: _angular_core.OutputEmitterRef<string>;
|
|
2814
|
+
/** A band was clicked; a grouped band emits its representative event. */
|
|
2815
|
+
readonly eventClick: _angular_core.OutputEmitterRef<FoldCalendarEvent<T>>;
|
|
2816
|
+
/** A `+N` chip was clicked, with the day whose events overflowed. */
|
|
2817
|
+
readonly overflowClick: _angular_core.OutputEmitterRef<string>;
|
|
2818
|
+
/** Labels, locale and the projected chip template — see the directive. */
|
|
2819
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
2820
|
+
private readonly host;
|
|
2821
|
+
private readonly projectedDay;
|
|
2822
|
+
private readonly projectedOverflow;
|
|
2823
|
+
/** The custom day-cell template, when one is projected. */
|
|
2824
|
+
protected readonly dayContent: _angular_core.Signal<_angular_core.TemplateRef<fold_ng.FoldCalendarDayContext> | null>;
|
|
2825
|
+
/** The custom overflow-chip template, when one is projected. */
|
|
2826
|
+
protected readonly overflowContent: _angular_core.Signal<_angular_core.TemplateRef<fold_ng.FoldCalendarOverflowContext> | null>;
|
|
2827
|
+
/**
|
|
2828
|
+
* Lanes this grid stacks — clamped once, by the layout, and read back here so
|
|
2829
|
+
* the geometry and the CSS row template can never disagree.
|
|
2830
|
+
*/
|
|
2831
|
+
private readonly lanes;
|
|
2832
|
+
/** The laid-out grid: week rows, their days, and their packed bands. */
|
|
2833
|
+
/** The anchor in force: the caller's, else the one the locale declares. */
|
|
2834
|
+
protected readonly anchor: _angular_core.Signal<FoldWeekday>;
|
|
2835
|
+
protected readonly weeks: _angular_core.Signal<readonly FoldCalendarWeek<T>[]>;
|
|
2836
|
+
/** Column headers, walked out of `Intl` so every locale comes for free. */
|
|
2837
|
+
protected readonly weekdayNames: _angular_core.Signal<readonly string[]>;
|
|
2838
|
+
/**
|
|
2839
|
+
* Columns before the first day. The week-number column is a real grid column,
|
|
2840
|
+
* so everything placed by index — cells, bands, overflow chips — shifts with
|
|
2841
|
+
* it, and nothing has to know why.
|
|
2842
|
+
*/
|
|
2843
|
+
protected readonly columnOffset: _angular_core.Signal<0 | 1>;
|
|
2844
|
+
/** The ISO week each row belongs to — always Monday-based, whatever the anchor. */
|
|
2845
|
+
protected weekNumber(week: FoldCalendarWeek<T>): number;
|
|
2846
|
+
/**
|
|
2847
|
+
* Row track sizes: the day-number row, one row per lane, then the overflow
|
|
2848
|
+
* row. Both heights are themeable knobs, which is why they are `var()`s.
|
|
2849
|
+
*/
|
|
2850
|
+
protected readonly rowTemplate: _angular_core.Signal<string>;
|
|
2851
|
+
/** The overflow chips' row — always the one after the last lane. */
|
|
2852
|
+
protected readonly overflowRow: _angular_core.Signal<number>;
|
|
2853
|
+
/** Every date the grid currently shows — the bound focus may not leave. */
|
|
2854
|
+
private readonly gridDates;
|
|
2855
|
+
/** Where the tab stop sits before the user moves it: today, else the 1st. */
|
|
2856
|
+
private readonly defaultStop;
|
|
2857
|
+
/** The grid's single tab stop and the arrow keys that move it. */
|
|
2858
|
+
private readonly focus;
|
|
2859
|
+
protected dayTabIndex(date: FoldCalendarDate): 0 | -1;
|
|
2860
|
+
/** A cell's caller-supplied names, as one `~=`-matchable attribute. */
|
|
2861
|
+
protected dayModifierAttr(day: FoldCalendarDay): string | null;
|
|
2862
|
+
/**
|
|
2863
|
+
* A day's accessible name: its date, the today marker, what sits on it, and
|
|
2864
|
+
* what the lane budget is keeping from it.
|
|
2865
|
+
*/
|
|
2866
|
+
protected dayLabel(day: FoldCalendarDay): string;
|
|
2867
|
+
/** A band's text: the group's label when it stands for several events. */
|
|
2868
|
+
protected bandLabel(band: FoldCalendarBand<T>): string;
|
|
2869
|
+
/** The leading glyph — suppressed on a continuation, which has no real start. */
|
|
2870
|
+
protected bandIcon(band: FoldCalendarBand<T>): FoldIconName | null;
|
|
2871
|
+
protected onDayFocus(date: FoldCalendarDate): void;
|
|
2872
|
+
/** A cell is not a `<button>`, so activation is wired by hand. */
|
|
2873
|
+
protected onDayKeydown(event: KeyboardEvent, date: FoldCalendarDate): void;
|
|
2874
|
+
private rootElement;
|
|
2875
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarMonthComponent<any>, never>;
|
|
2876
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarMonthComponent<any>, "fold-calendar-month", never, { "month": { "alias": "month"; "required": true; "isSignal": true; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "weekendDays": { "alias": "weekendDays"; "required": false; "isSignal": true; }; "showWeekNumbers": { "alias": "showWeekNumbers"; "required": false; "isSignal": true; }; "maxLanes": { "alias": "maxLanes"; "required": false; "isSignal": true; }; "fixedWeeks": { "alias": "fixedWeeks"; "required": false; "isSignal": true; }; "dayModifiers": { "alias": "dayModifiers"; "required": false; "isSignal": true; }; }, { "month": "monthChange"; "dayClick": "dayClick"; "eventClick": "eventClick"; "overflowClick": "overflowClick"; }, ["projectedDay", "projectedOverflow"], never, true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
/**
|
|
2880
|
+
* `<fold-calendar-week>` — one week as seven day columns of stacked chips.
|
|
2881
|
+
*
|
|
2882
|
+
* Where the month view packs spans into lanes, a week simply lists what covers
|
|
2883
|
+
* each day: a three-day event appears under all three, which is the reading a
|
|
2884
|
+
* week is for. Nothing spans, so nothing is clipped and there is no overflow.
|
|
2885
|
+
*
|
|
2886
|
+
* ## Inputs
|
|
2887
|
+
* | Input | Type | Default | Meaning |
|
|
2888
|
+
* |----------------|--------------------------|---------|---------|
|
|
2889
|
+
* | `date` | `FoldCalendarDate` | — | Any date in the week on display. |
|
|
2890
|
+
* | `events` | `FoldCalendarEvent<T>[]` | `[]` | What to list. |
|
|
2891
|
+
* | `today` | `FoldCalendarDate` | — | The day to mark. |
|
|
2892
|
+
* | `weekStartsOn` | `FoldWeekday` | the locale's | Which day opens the week — `Intl.Locale` knows. |
|
|
2893
|
+
* | `weekendDays` | `FoldWeekday[]` | the locale's | Which days are shaded. |
|
|
2894
|
+
* | `locale` | `string` | runtime | Drives the column headers through `Intl`. |
|
|
2895
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |
|
|
2896
|
+
*
|
|
2897
|
+
* `date` is a plain input, not a `model`: this view never pages itself, so
|
|
2898
|
+
* writing back would be a promise it does not keep. Pair it with
|
|
2899
|
+
* `<fold-calendar-toolbar>`, which does own the paging.
|
|
2900
|
+
*
|
|
2901
|
+
* ## Theming
|
|
2902
|
+
* | CSS variable | Default | Sets |
|
|
2903
|
+
* |---------------------------------------|---------|------|
|
|
2904
|
+
* | `--fold-calendar-week-column-height` | `320px` | Height of the day columns. |
|
|
2905
|
+
* | `--fold-calendar-bar-width` | `3px` | The tone bar down a chip's leading edge. |
|
|
2906
|
+
* | `--fold-calendar-band-radius` | `--fold-radius-sm` | Chip corners. |
|
|
2907
|
+
*
|
|
2908
|
+
* ## Outputs
|
|
2909
|
+
* | Output | Payload | Fires on |
|
|
2910
|
+
* |--------------|------------------------|----------|
|
|
2911
|
+
* | `dayClick` | `FoldCalendarDate` | A column header activated. |
|
|
2912
|
+
* | `eventClick` | `FoldCalendarEvent<T>` | A chip activated. |
|
|
2913
|
+
*
|
|
2914
|
+
* ## Accessibility
|
|
2915
|
+
* Each column is a `<section>` named by its full date, holding a header button
|
|
2916
|
+
* and a list of chips. Because a chip sits **inside** the day it belongs to —
|
|
2917
|
+
* no spanning, no overlay — every control is a real child in the natural tab
|
|
2918
|
+
* order, so this view needs none of the month grid's roving-tabindex machinery
|
|
2919
|
+
* and every event is reachable by keyboard.
|
|
2920
|
+
*
|
|
2921
|
+
* @selector `fold-calendar-week`
|
|
2922
|
+
*
|
|
2923
|
+
* @example
|
|
2924
|
+
* ```html
|
|
2925
|
+
* <fold-calendar-week
|
|
2926
|
+
* [(date)]="date"
|
|
2927
|
+
* [events]="events()"
|
|
2928
|
+
* [today]="today"
|
|
2929
|
+
* (eventClick)="open($event)"
|
|
2930
|
+
* />
|
|
2931
|
+
* ```
|
|
2932
|
+
*/
|
|
2933
|
+
declare class FoldCalendarWeekComponent<T = unknown> {
|
|
2934
|
+
/** Any date inside the week on display. */
|
|
2935
|
+
readonly date: _angular_core.InputSignal<string>;
|
|
2936
|
+
/** Events to list under the days they cover. */
|
|
2937
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<T>[]>;
|
|
2938
|
+
/** The day to mark as today. */
|
|
2939
|
+
readonly today: _angular_core.InputSignal<string | undefined>;
|
|
2940
|
+
/** Day the week starts on. @default the locale's own first day */
|
|
2941
|
+
readonly weekStartsOn: _angular_core.InputSignal<FoldWeekday | undefined>;
|
|
2942
|
+
/** Days shaded as the weekend. @default ['sat', 'sun'] */
|
|
2943
|
+
readonly weekendDays: _angular_core.InputSignal<readonly FoldWeekday[] | undefined>;
|
|
2944
|
+
/** A column header was activated. */
|
|
2945
|
+
readonly dayClick: _angular_core.OutputEmitterRef<string>;
|
|
2946
|
+
/** A chip was activated. */
|
|
2947
|
+
readonly eventClick: _angular_core.OutputEmitterRef<FoldCalendarEvent<T>>;
|
|
2948
|
+
/** Labels, locale and the projected chip template — see the directive. */
|
|
2949
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
2950
|
+
protected readonly columns: _angular_core.Signal<readonly FoldCalendarDayEvents<T>[]>;
|
|
2951
|
+
protected weekdayName(column: FoldCalendarDayEvents<T>): string;
|
|
2952
|
+
/** A column's accessible name: its date, the today marker, and what sits on it. */
|
|
2953
|
+
protected columnLabel(column: FoldCalendarDayEvents<T>): string;
|
|
2954
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarWeekComponent<any>, never>;
|
|
2955
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarWeekComponent<any>, "fold-calendar-week", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "weekendDays": { "alias": "weekendDays"; "required": false; "isSignal": true; }; }, { "dayClick": "dayClick"; "eventClick": "eventClick"; }, never, never, true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* `<fold-calendar-day>` — one day, its events listed in full.
|
|
2960
|
+
*
|
|
2961
|
+
* The end of the drill-down: where the month view has room only for a label,
|
|
2962
|
+
* this one has room for the subline too, so it is the view a `dayClick`
|
|
2963
|
+
* naturally lands on.
|
|
2964
|
+
*
|
|
2965
|
+
* ## Inputs
|
|
2966
|
+
* | Input | Type | Default | Meaning |
|
|
2967
|
+
* |----------|--------------------------|---------|---------|
|
|
2968
|
+
* | `date` | `FoldCalendarDate` | — | The day on display. |
|
|
2969
|
+
* | `events` | `FoldCalendarEvent<T>[]` | `[]` | Filtered to those covering `date`. |
|
|
2970
|
+
* | `today` | `FoldCalendarDate` | — | Marks the header when it matches. |
|
|
2971
|
+
* | `locale` | `string` | runtime | Drives the header through `Intl`. |
|
|
2972
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |
|
|
2973
|
+
*
|
|
2974
|
+
* ## Outputs
|
|
2975
|
+
* | Output | Payload | Fires on |
|
|
2976
|
+
* |--------------|------------------------|----------|
|
|
2977
|
+
* | `eventClick` | `FoldCalendarEvent<T>` | A chip activated. |
|
|
2978
|
+
*
|
|
2979
|
+
* ## Slots
|
|
2980
|
+
* | Selector | Region |
|
|
2981
|
+
* |--------------------------------|--------|
|
|
2982
|
+
* | `button[empty]`, `a[empty]`, `div[empty]` | Under the empty message — the place for a "new request" action. |
|
|
2983
|
+
* | *(default)* | After the list. |
|
|
2984
|
+
*
|
|
2985
|
+
* The `empty` slot is **tag-qualified** (rule 4.8): `empty` is also an input on
|
|
2986
|
+
* `fold-field` and `fold-data-table`, and a bare `[empty]` selector would
|
|
2987
|
+
* capture either of them whole.
|
|
2988
|
+
*
|
|
2989
|
+
* ## Theming
|
|
2990
|
+
* | CSS variable | Default | Sets |
|
|
2991
|
+
* |------------------------------------|---------|------|
|
|
2992
|
+
* | `--fold-calendar-day-number-size` | `--fold-text-3xl` | The big day number. |
|
|
2993
|
+
* | `--fold-calendar-bar-width` | `3px` | The tone bar down a chip's leading edge. |
|
|
2994
|
+
* | `--fold-calendar-band-radius` | `--fold-radius-sm` | Chip corners. |
|
|
2995
|
+
*
|
|
2996
|
+
* @selector `fold-calendar-day`
|
|
2997
|
+
*
|
|
2998
|
+
* @example
|
|
2999
|
+
* ```html
|
|
3000
|
+
* <fold-calendar-day [date]="date()" [events]="events()" [today]="today">
|
|
3001
|
+
* <button empty foldButton (click)="request()">New request</button>
|
|
3002
|
+
* </fold-calendar-day>
|
|
3003
|
+
* ```
|
|
3004
|
+
*/
|
|
3005
|
+
declare class FoldCalendarDayComponent<T = unknown> {
|
|
3006
|
+
/** The day on display. */
|
|
3007
|
+
readonly date: _angular_core.InputSignal<string>;
|
|
3008
|
+
/** Events to filter down to this day. */
|
|
3009
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<T>[]>;
|
|
3010
|
+
/** The day to mark as today. */
|
|
3011
|
+
readonly today: _angular_core.InputSignal<string | undefined>;
|
|
3012
|
+
/** A chip was activated. */
|
|
3013
|
+
readonly eventClick: _angular_core.OutputEmitterRef<FoldCalendarEvent<T>>;
|
|
3014
|
+
/** Labels, locale and the projected chip template — see the directive. */
|
|
3015
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
3016
|
+
protected readonly dayEvents: _angular_core.Signal<readonly FoldCalendarEvent<T>[]>;
|
|
3017
|
+
protected readonly isToday: _angular_core.Signal<boolean>;
|
|
3018
|
+
/** `Saturday` — the weekday alone; the month sits beside the number. */
|
|
3019
|
+
protected readonly weekdayName: _angular_core.Signal<string>;
|
|
3020
|
+
/** `May` — read with the day number, which is why it is not in the line above. */
|
|
3021
|
+
protected readonly monthName: _angular_core.Signal<string>;
|
|
3022
|
+
protected readonly dayOfMonth: _angular_core.Signal<number>;
|
|
3023
|
+
/** The header's accessible name: the full date, plus the today marker. */
|
|
3024
|
+
protected readonly headerLabel: _angular_core.Signal<string>;
|
|
3025
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarDayComponent<any>, never>;
|
|
3026
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarDayComponent<any>, "fold-calendar-day", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; }, { "eventClick": "eventClick"; }, never, ["button[empty], a[empty], div[empty]", "*"], true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* `<fold-calendar-list>` — everything in a range, in date order.
|
|
3031
|
+
*
|
|
3032
|
+
* The flat reading of the same data: no grid, no packing, so nothing is ever
|
|
3033
|
+
* hidden behind a lane budget. Each row leads with the span it covers, which
|
|
3034
|
+
* is what the grid views can only imply.
|
|
3035
|
+
*
|
|
3036
|
+
* For a sortable, column-configurable table instead, feed
|
|
3037
|
+
* `foldEventsInRange()` straight into {@link FoldDataTableComponent} — this
|
|
3038
|
+
* view stays deliberately small.
|
|
3039
|
+
*
|
|
3040
|
+
* ## Inputs
|
|
3041
|
+
* | Input | Type | Default | Meaning |
|
|
3042
|
+
* |----------|--------------------------|---------|---------|
|
|
3043
|
+
* | `events` | `FoldCalendarEvent<T>[]` | `[]` | Source events. |
|
|
3044
|
+
* | `from` | `FoldCalendarDate` | — | Range start; omit to list everything. |
|
|
3045
|
+
* | `to` | `FoldCalendarDate` | — | Range end; omit to list everything. |
|
|
3046
|
+
* | `locale` | `string` | runtime | Drives the span labels through `Intl`. |
|
|
3047
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |
|
|
3048
|
+
*
|
|
3049
|
+
* ## Outputs
|
|
3050
|
+
* | Output | Payload | Fires on |
|
|
3051
|
+
* |--------------|------------------------|----------|
|
|
3052
|
+
* | `eventClick` | `FoldCalendarEvent<T>` | A row activated. |
|
|
3053
|
+
*
|
|
3054
|
+
* ## Theming
|
|
3055
|
+
* | CSS variable | Default | Sets |
|
|
3056
|
+
* |------------------------------------|---------|------|
|
|
3057
|
+
* | `--fold-calendar-list-date-width` | `7rem` | The leading date column — widen it for verbose locales. |
|
|
3058
|
+
* | `--fold-calendar-bar-width` | `3px` | The tone bar down a row's leading edge. |
|
|
3059
|
+
*
|
|
3060
|
+
* A projected `foldCalendarEvent` template replaces a row's **whole** inside,
|
|
3061
|
+
* as in every other view: the built-in bar and date belong to the default
|
|
3062
|
+
* rendering, not to the frame around it.
|
|
3063
|
+
*
|
|
3064
|
+
* @selector `fold-calendar-list`
|
|
3065
|
+
*
|
|
3066
|
+
* @example
|
|
3067
|
+
* ```html
|
|
3068
|
+
* <fold-calendar-list
|
|
3069
|
+
* [events]="events()"
|
|
3070
|
+
* [from]="range().from"
|
|
3071
|
+
* [to]="range().to"
|
|
3072
|
+
* (eventClick)="open($event)"
|
|
3073
|
+
* />
|
|
3074
|
+
* ```
|
|
3075
|
+
*/
|
|
3076
|
+
declare class FoldCalendarListComponent<T = unknown> {
|
|
3077
|
+
/** Source events. */
|
|
3078
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<T>[]>;
|
|
3079
|
+
/** Range start, inclusive. Omit (with `to`) to list every event given. */
|
|
3080
|
+
readonly from: _angular_core.InputSignal<string | undefined>;
|
|
3081
|
+
/** Range end, inclusive. */
|
|
3082
|
+
readonly to: _angular_core.InputSignal<string | undefined>;
|
|
3083
|
+
/** A row was activated. */
|
|
3084
|
+
readonly eventClick: _angular_core.OutputEmitterRef<FoldCalendarEvent<T>>;
|
|
3085
|
+
/** Labels, locale and the projected chip template — see the directive. */
|
|
3086
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
3087
|
+
/** In range (when one is given), earliest first. */
|
|
3088
|
+
protected readonly rows: _angular_core.Signal<readonly FoldCalendarEvent<T>[]>;
|
|
3089
|
+
/**
|
|
3090
|
+
* The span, collapsed to one date when it covers a single day — `Intl`'s
|
|
3091
|
+
* own range formatter does that, and picks the locale's separator and its
|
|
3092
|
+
* order, which is why this is not a translatable label.
|
|
3093
|
+
*/
|
|
3094
|
+
protected rangeLabel(event: FoldCalendarEvent<T>): string;
|
|
3095
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarListComponent<any>, never>;
|
|
3096
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarListComponent<any>, "fold-calendar-list", never, { "events": { "alias": "events"; "required": false; "isSignal": true; }; "from": { "alias": "from"; "required": false; "isSignal": true; }; "to": { "alias": "to"; "required": false; "isSignal": true; }; }, { "eventClick": "eventClick"; }, never, never, true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* The time grid's geometry: hour columns with events placed **inside** a day,
|
|
3101
|
+
* and an all-day strip above them.
|
|
3102
|
+
*
|
|
3103
|
+
* The two halves are two different problems and stay two: a timed event is an
|
|
3104
|
+
* interval in minutes laid out across a column's width
|
|
3105
|
+
* ({@link foldLayOutOverlaps}), an all-day event is a span across days laid out
|
|
3106
|
+
* in lanes ({@link foldPackRow}) — the same packer the month grid uses, so a
|
|
3107
|
+
* three-day absence reads identically in both.
|
|
3108
|
+
*
|
|
3109
|
+
* Everything here is a **fraction of the visible window**, not a pixel: the
|
|
3110
|
+
* window is a caller's choice (`dayStart`/`dayEnd`), the height is CSS's, and a
|
|
3111
|
+
* layout that computed pixels would have to be told about both.
|
|
3112
|
+
*/
|
|
3113
|
+
/** How to build a time grid. */
|
|
3114
|
+
interface FoldTimeGridOptions {
|
|
3115
|
+
/** Any date inside the range to display. */
|
|
3116
|
+
readonly date: FoldCalendarDate;
|
|
3117
|
+
/** Days to show: `1` is a day view, `7` a week. @default 7 */
|
|
3118
|
+
readonly dayCount?: number;
|
|
3119
|
+
/** Snap the range to the week — ignored unless `dayCount` is 7. @default true */
|
|
3120
|
+
readonly snapToWeek?: boolean;
|
|
3121
|
+
/** Day the week starts on. @default 'mon' */
|
|
3122
|
+
readonly weekStartsOn?: FoldWeekday;
|
|
3123
|
+
/** Days shaded as the weekend. @default ['sat', 'sun'] */
|
|
3124
|
+
readonly weekendDays?: readonly FoldWeekday[] | undefined;
|
|
3125
|
+
/** The day to flag as today; omit to flag none. */
|
|
3126
|
+
readonly today?: FoldCalendarDate | undefined;
|
|
3127
|
+
/** First hour on screen. @default '00:00' */
|
|
3128
|
+
readonly dayStart?: FoldCalendarTime;
|
|
3129
|
+
/** Last hour on screen; `24:00` is midnight. @default '24:00' */
|
|
3130
|
+
readonly dayEnd?: FoldCalendarTime;
|
|
3131
|
+
/** Lanes the all-day strip stacks before events overflow. @default 2 */
|
|
3132
|
+
readonly maxAllDayLanes?: number;
|
|
3133
|
+
}
|
|
3134
|
+
/** One timed event's slice of one day. */
|
|
3135
|
+
interface FoldCalendarBlock<T = unknown> {
|
|
3136
|
+
/** Unique per slice (`<eventId>@<date>`) — the `@for` track key. */
|
|
3137
|
+
readonly key: string;
|
|
3138
|
+
readonly event: FoldCalendarEvent<T>;
|
|
3139
|
+
/** Where it starts, as a fraction `0`–`1` of the visible window. */
|
|
3140
|
+
readonly top: number;
|
|
3141
|
+
/** How tall it is, as a fraction of the visible window. */
|
|
3142
|
+
readonly height: number;
|
|
3143
|
+
/** Its column inside its overlap cluster, `0`-based. */
|
|
3144
|
+
readonly column: number;
|
|
3145
|
+
/** How many columns the cluster needed — the denominator of the width. */
|
|
3146
|
+
readonly columns: number;
|
|
3147
|
+
/** It began before this day, or before the visible window. */
|
|
3148
|
+
readonly continuesBefore: boolean;
|
|
3149
|
+
/** It runs past this day, or past the visible window. */
|
|
3150
|
+
readonly continuesAfter: boolean;
|
|
3151
|
+
}
|
|
3152
|
+
/** One day column: the cell it stands for, and the events inside it. */
|
|
3153
|
+
interface FoldTimeGridColumn<T = unknown> {
|
|
3154
|
+
readonly day: FoldCalendarDay;
|
|
3155
|
+
/** Timed events, in the caller's order. */
|
|
3156
|
+
readonly blocks: readonly FoldCalendarBlock<T>[];
|
|
3157
|
+
}
|
|
3158
|
+
/** A laid-out time grid. */
|
|
3159
|
+
interface FoldTimeGrid<T = unknown> {
|
|
3160
|
+
/** The day columns, earliest first. */
|
|
3161
|
+
readonly columns: readonly FoldTimeGridColumn<T>[];
|
|
3162
|
+
/** All-day spans across the strip on top, packed into lanes. */
|
|
3163
|
+
readonly allDay: readonly FoldCalendarBand<T>[];
|
|
3164
|
+
/** All-day spans no lane could take. */
|
|
3165
|
+
readonly allDayHiddenCount: number;
|
|
3166
|
+
/** The hour labels down the gutter, as `HH:mm`. */
|
|
3167
|
+
readonly hours: readonly FoldCalendarTime[];
|
|
3168
|
+
/** First minute on screen. */
|
|
3169
|
+
readonly startMinute: number;
|
|
3170
|
+
/** Last minute on screen. */
|
|
3171
|
+
readonly endMinute: number;
|
|
3172
|
+
}
|
|
3173
|
+
/**
|
|
3174
|
+
* Whether an event is placed on the clock or on the strip.
|
|
3175
|
+
*
|
|
3176
|
+
* **Both** ends are needed: an event with only a start has no height, and one
|
|
3177
|
+
* with only an end has no origin. Half a time is a data bug, and treating it as
|
|
3178
|
+
* all-day is the reading that loses the least.
|
|
3179
|
+
*/
|
|
3180
|
+
declare function foldIsTimed<T>(event: FoldCalendarEvent<T>): boolean;
|
|
3181
|
+
/**
|
|
3182
|
+
* Lays out `dayCount` days as hour columns plus an all-day strip.
|
|
3183
|
+
*
|
|
3184
|
+
* Timed events are placed on the clock; everything else — no times, or only one
|
|
3185
|
+
* of them — goes on the strip, where it spans days exactly as it does in the
|
|
3186
|
+
* month grid.
|
|
3187
|
+
*/
|
|
3188
|
+
declare function foldBuildTimeGrid<T>(events: readonly FoldCalendarEvent<T>[], options: FoldTimeGridOptions): FoldTimeGrid<T>;
|
|
3189
|
+
|
|
3190
|
+
/**
|
|
3191
|
+
* `<fold-calendar-timegrid>` — days as hour columns, with an all-day strip.
|
|
3192
|
+
*
|
|
3193
|
+
* The reading the other four cannot give: **when inside a day**. A meeting is a
|
|
3194
|
+
* block whose height is its duration and whose width is shared with whatever it
|
|
3195
|
+
* collides with; an absence is a band across the strip on top, spanning days
|
|
3196
|
+
* exactly as it does in the month view — the same packer draws both, so a
|
|
3197
|
+
* three-day leave request reads identically wherever it appears.
|
|
3198
|
+
*
|
|
3199
|
+
* Times are wall-clock `HH:mm`, never instants — the same decision as the date,
|
|
3200
|
+
* for the same reason. 09:00 is the hour on the wall; the app converts once at
|
|
3201
|
+
* its own boundary, and no zone can move a meeting after that.
|
|
3202
|
+
*
|
|
3203
|
+
* ## Inputs
|
|
3204
|
+
* | Input | Type | Default | Meaning |
|
|
3205
|
+
* |-------------------|--------------------------|-----------|---------|
|
|
3206
|
+
* | `date` | `FoldCalendarDate` | — | Any date in the range. |
|
|
3207
|
+
* | `events` | `FoldCalendarEvent<T>[]` | `[]` | Timed events go on the clock, the rest on the strip. |
|
|
3208
|
+
* | `dayCount` | `number` | `7` | `1` is a day view, `7` a week. |
|
|
3209
|
+
* | `today` | `FoldCalendarDate` | — | The column to mark. |
|
|
3210
|
+
* | `now` | `FoldCalendarTime` | — | Draws the current-time line on `today`'s column. Passed in, never read from a clock — the package has none, and an SSR render must not invent one. |
|
|
3211
|
+
* | `dayStart`/`dayEnd` | `FoldCalendarTime` | `00:00`/`24:00` | The visible window; `08:00`–`20:00` is a working day. |
|
|
3212
|
+
* | `weekStartsOn` | `FoldWeekday` | the locale's | Which day opens the week. |
|
|
3213
|
+
* | `weekendDays` | `FoldWeekday[]` | the locale's | Which columns are shaded. |
|
|
3214
|
+
* | `maxAllDayLanes` | `number` | `2` | Lanes the strip stacks before overflowing. |
|
|
3215
|
+
* | `locale`/`labels`/`formats` | — | — | See the other views. |
|
|
3216
|
+
*
|
|
3217
|
+
* ## Outputs
|
|
3218
|
+
* | Output | Payload | Fires on |
|
|
3219
|
+
* |--------------|------------------------|----------|
|
|
3220
|
+
* | `dayClick` | `FoldCalendarDate` | A column header activated. |
|
|
3221
|
+
* | `eventClick` | `FoldCalendarEvent<T>` | A block or an all-day band activated. |
|
|
3222
|
+
*
|
|
3223
|
+
* ## Theming
|
|
3224
|
+
* | CSS variable | Default | Sets |
|
|
3225
|
+
* |---------------------------------------|---------|------|
|
|
3226
|
+
* | `--fold-calendar-timegrid-height` | `640px` | Height of the hour area. |
|
|
3227
|
+
* | `--fold-calendar-timegrid-gutter` | `56px` | Width of the hour labels. |
|
|
3228
|
+
* | `--fold-calendar-timegrid-lane` | `20px` | Height of one all-day lane. |
|
|
3229
|
+
* | `--fold-calendar-bar-width` | `3px` | The tone bar down a block's leading edge. |
|
|
3230
|
+
*
|
|
3231
|
+
* ## Accessibility
|
|
3232
|
+
* Every block and every band is a real `<button>` inside the column it belongs
|
|
3233
|
+
* to, so the tab order follows the day and this view needs none of the month
|
|
3234
|
+
* grid's roving-tabindex machinery. A block's accessible name carries its
|
|
3235
|
+
* **times**, which its position on the clock conveys only visually.
|
|
3236
|
+
*
|
|
3237
|
+
* @selector `fold-calendar-timegrid`
|
|
3238
|
+
*
|
|
3239
|
+
* @example
|
|
3240
|
+
* ```html
|
|
3241
|
+
* <fold-calendar-timegrid
|
|
3242
|
+
* [date]="date()"
|
|
3243
|
+
* [events]="events()"
|
|
3244
|
+
* [today]="today"
|
|
3245
|
+
* [now]="now()"
|
|
3246
|
+
* dayStart="08:00"
|
|
3247
|
+
* dayEnd="20:00"
|
|
3248
|
+
* (eventClick)="open($event)"
|
|
3249
|
+
* />
|
|
3250
|
+
* ```
|
|
3251
|
+
*/
|
|
3252
|
+
declare class FoldCalendarTimegridComponent<T = unknown> {
|
|
3253
|
+
/** Any date inside the range on display. */
|
|
3254
|
+
readonly date: _angular_core.InputSignal<string>;
|
|
3255
|
+
/** Events to plot; timed ones on the clock, the rest on the strip. */
|
|
3256
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<T>[]>;
|
|
3257
|
+
/** Days to show: `1` is a day view, `7` a week. @default 7 */
|
|
3258
|
+
readonly dayCount: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
3259
|
+
/** The day to mark as today. */
|
|
3260
|
+
readonly today: _angular_core.InputSignal<string | undefined>;
|
|
3261
|
+
/**
|
|
3262
|
+
* The current wall-clock time, for the "now" line. Passed in rather than
|
|
3263
|
+
* read: this package owns no clock (`today` works the same way), and a
|
|
3264
|
+
* server render that invented one would hydrate to a different position.
|
|
3265
|
+
*/
|
|
3266
|
+
readonly now: _angular_core.InputSignal<string | undefined>;
|
|
3267
|
+
/** First hour on screen. @default '00:00' */
|
|
3268
|
+
readonly dayStart: _angular_core.InputSignal<string>;
|
|
3269
|
+
/** Last hour on screen. @default '24:00' */
|
|
3270
|
+
readonly dayEnd: _angular_core.InputSignal<string>;
|
|
3271
|
+
/** Day the week starts on. @default the locale's own first day */
|
|
3272
|
+
readonly weekStartsOn: _angular_core.InputSignal<FoldWeekday | undefined>;
|
|
3273
|
+
/** Days shaded as the weekend. @default the locale's own weekend */
|
|
3274
|
+
readonly weekendDays: _angular_core.InputSignal<readonly FoldWeekday[] | undefined>;
|
|
3275
|
+
/** Lanes the all-day strip stacks before events overflow. @default 2 */
|
|
3276
|
+
readonly maxAllDayLanes: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
3277
|
+
/** A column header was activated. */
|
|
3278
|
+
readonly dayClick: _angular_core.OutputEmitterRef<string>;
|
|
3279
|
+
/** A block or an all-day band was activated. */
|
|
3280
|
+
readonly eventClick: _angular_core.OutputEmitterRef<FoldCalendarEvent<T>>;
|
|
3281
|
+
/** Labels, locale and the projected chip template — see the directive. */
|
|
3282
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
3283
|
+
protected readonly grid: _angular_core.Signal<fold_ng.FoldTimeGrid<T>>;
|
|
3284
|
+
/** Lane rows for the all-day strip, or none when nothing spans. */
|
|
3285
|
+
protected readonly stripRows: _angular_core.Signal<string>;
|
|
3286
|
+
/** Where the "now" line sits, as a fraction of the window, or `null`. */
|
|
3287
|
+
protected readonly nowOffset: _angular_core.Signal<number | null>;
|
|
3288
|
+
protected weekdayName(column: FoldTimeGridColumn<T>): string;
|
|
3289
|
+
protected hourLabel(hour: FoldCalendarTime): string;
|
|
3290
|
+
/** A column's accessible name: its date, the today marker, and its load. */
|
|
3291
|
+
protected columnLabel(column: FoldTimeGridColumn<T>): string;
|
|
3292
|
+
/**
|
|
3293
|
+
* A block's accessible name — its times first, because where it sits on the
|
|
3294
|
+
* clock is information a screen reader has no other way to get.
|
|
3295
|
+
*/
|
|
3296
|
+
protected blockLabel(block: FoldCalendarBlock<T>): string;
|
|
3297
|
+
/** A band's text: the group's label when it stands for several events. */
|
|
3298
|
+
protected bandLabel(band: FoldCalendarBand<T>): string;
|
|
3299
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarTimegridComponent<any>, never>;
|
|
3300
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarTimegridComponent<any>, "fold-calendar-timegrid", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "dayCount": { "alias": "dayCount"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "now": { "alias": "now"; "required": false; "isSignal": true; }; "dayStart": { "alias": "dayStart"; "required": false; "isSignal": true; }; "dayEnd": { "alias": "dayEnd"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; "weekendDays": { "alias": "weekendDays"; "required": false; "isSignal": true; }; "maxAllDayLanes": { "alias": "maxAllDayLanes"; "required": false; "isSignal": true; }; }, { "dayClick": "dayClick"; "eventClick": "eventClick"; }, never, never, true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
3301
|
+
}
|
|
3302
|
+
|
|
3303
|
+
/** What an event template is handed. */
|
|
3304
|
+
interface FoldCalendarEventContext<T> {
|
|
3305
|
+
/** The event to render — `let-event`. */
|
|
3306
|
+
readonly $implicit: FoldCalendarEvent<T>;
|
|
3307
|
+
/**
|
|
3308
|
+
* The laid-out segment in the month view, `null` in the column views — so a
|
|
3309
|
+
* template can react to a continuation edge where there is one, and does not
|
|
3310
|
+
* have to pretend there is one where there is not.
|
|
3311
|
+
*/
|
|
3312
|
+
readonly band: FoldCalendarBand<T> | null;
|
|
3313
|
+
}
|
|
3314
|
+
/**
|
|
3315
|
+
* Marks an `<ng-template>` as the renderer for every event chip inside a
|
|
3316
|
+
* calendar view, replacing the built-in icon + label + count row:
|
|
3317
|
+
*
|
|
3318
|
+
* ```html
|
|
3319
|
+
* <fold-calendar-month [(month)]="month" [events]="events()">
|
|
3320
|
+
* <ng-template foldCalendarEvent let-event let-band="band">
|
|
3321
|
+
* <fold-avatar [name]="event.data.owner" size="xs" />
|
|
3322
|
+
* <span>{{ event.label }}</span>
|
|
3323
|
+
* </ng-template>
|
|
3324
|
+
* </fold-calendar-month>
|
|
3325
|
+
* ```
|
|
3326
|
+
*
|
|
3327
|
+
* `let-event` and `let-band` are **fully typed** under `strictTemplates`: the
|
|
3328
|
+
* directive is generic over the same `T` as the events it renders, and its
|
|
3329
|
+
* context guard carries that through, so `event.data` is the app's own record
|
|
3330
|
+
* with no cast.
|
|
3331
|
+
*
|
|
3332
|
+
* @selector `ng-template[foldCalendarEvent]`
|
|
3333
|
+
*/
|
|
3334
|
+
declare class FoldCalendarEventDirective<T = unknown> {
|
|
3335
|
+
readonly template: TemplateRef<FoldCalendarEventContext<T>>;
|
|
3336
|
+
/** Teaches the template checker what `let-event` and `let-band` are. */
|
|
3337
|
+
static ngTemplateContextGuard<T>(_directive: FoldCalendarEventDirective<T>, context: unknown): context is FoldCalendarEventContext<T>;
|
|
3338
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarEventDirective<any>, never>;
|
|
3339
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldCalendarEventDirective<any>, "ng-template[foldCalendarEvent]", never, {}, {}, never, never, true, never>;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
/**
|
|
3343
|
+
* The containers a calendar draws around its events, opened up as templates.
|
|
3344
|
+
*
|
|
3345
|
+
* The chip has always been replaceable ({@link FoldCalendarEventDirective});
|
|
3346
|
+
* these are the four places an app reaches for next — the cell behind the
|
|
3347
|
+
* chips, the heading above them, the period title, and the chip standing for
|
|
3348
|
+
* what did not fit. Each is a plain `<ng-template>` with a typed context, so
|
|
3349
|
+
* replacing one costs nothing and leaves the rest of the view alone.
|
|
3350
|
+
*/
|
|
3351
|
+
/** What a day-cell template is handed. */
|
|
3352
|
+
interface FoldCalendarDayContext {
|
|
3353
|
+
/** The cell to render — `let-day`. Carries its own counts and flags. */
|
|
3354
|
+
readonly $implicit: FoldCalendarDay;
|
|
3355
|
+
}
|
|
3356
|
+
/**
|
|
3357
|
+
* Replaces the **inside of a month day cell** — by default just the day number.
|
|
3358
|
+
*
|
|
3359
|
+
* This is the hook for everything the calendar cannot know: a holiday marker, a
|
|
3360
|
+
* closure, "3/8 staffed", a price. The cell itself (the button, its focus
|
|
3361
|
+
* behaviour, its accessible name) stays the calendar's job.
|
|
3362
|
+
*
|
|
3363
|
+
* ```html
|
|
3364
|
+
* <ng-template foldCalendarDay let-day>
|
|
3365
|
+
* <span>{{ day.dayOfMonth }}</span>
|
|
3366
|
+
* @if (closed(day.date)) { <fold-icon name="lock" size="xs" /> }
|
|
3367
|
+
* </ng-template>
|
|
3368
|
+
* ```
|
|
3369
|
+
*
|
|
3370
|
+
* @selector `ng-template[foldCalendarDay]`
|
|
3371
|
+
*/
|
|
3372
|
+
declare class FoldCalendarDayDirective {
|
|
3373
|
+
readonly template: TemplateRef<FoldCalendarDayContext>;
|
|
3374
|
+
static ngTemplateContextGuard(_directive: FoldCalendarDayDirective, context: unknown): context is FoldCalendarDayContext;
|
|
3375
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarDayDirective, never>;
|
|
3376
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldCalendarDayDirective, "ng-template[foldCalendarDay]", never, {}, {}, never, never, true, never>;
|
|
3377
|
+
}
|
|
3378
|
+
/** What a day-heading template is handed. */
|
|
3379
|
+
interface FoldCalendarHeadingContext<T> {
|
|
3380
|
+
/** The day being headed — `let-date`. */
|
|
3381
|
+
readonly $implicit: FoldCalendarDate;
|
|
3382
|
+
/** The events filed under it, so a heading can count or summarise them. */
|
|
3383
|
+
readonly events: readonly FoldCalendarEvent<T>[];
|
|
3384
|
+
}
|
|
3385
|
+
/**
|
|
3386
|
+
* Replaces the **day heading** of the agenda rail — by default a big day number
|
|
3387
|
+
* with a relative name beside it. Where an app puts a per-day count, a total,
|
|
3388
|
+
* or a quick action.
|
|
3389
|
+
*
|
|
3390
|
+
* @selector `ng-template[foldCalendarHeading]`
|
|
3391
|
+
*/
|
|
3392
|
+
declare class FoldCalendarHeadingDirective<T = unknown> {
|
|
3393
|
+
readonly template: TemplateRef<FoldCalendarHeadingContext<T>>;
|
|
3394
|
+
static ngTemplateContextGuard<T>(_directive: FoldCalendarHeadingDirective<T>, context: unknown): context is FoldCalendarHeadingContext<T>;
|
|
3395
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarHeadingDirective<any>, never>;
|
|
3396
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldCalendarHeadingDirective<any>, "ng-template[foldCalendarHeading]", never, {}, {}, never, never, true, never>;
|
|
3397
|
+
}
|
|
3398
|
+
/** What a toolbar-title template is handed. */
|
|
3399
|
+
interface FoldCalendarTitleContext {
|
|
3400
|
+
/** The period name the toolbar would have rendered — `let-title`. */
|
|
3401
|
+
readonly $implicit: string;
|
|
3402
|
+
/** First day of the period on display. */
|
|
3403
|
+
readonly from: FoldCalendarDate;
|
|
3404
|
+
/** Last day of the period on display. */
|
|
3405
|
+
readonly to: FoldCalendarDate;
|
|
3406
|
+
/** The view the period belongs to. */
|
|
3407
|
+
readonly view: string;
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* Replaces the toolbar's **period title** — by default an `<h2>` holding
|
|
3411
|
+
* `foldViewTitle()`. Project one to change the wording, or to give the title a
|
|
3412
|
+
* heading level that fits the page's outline.
|
|
3413
|
+
*
|
|
3414
|
+
* @selector `ng-template[foldCalendarTitle]`
|
|
3415
|
+
*/
|
|
3416
|
+
declare class FoldCalendarTitleDirective {
|
|
3417
|
+
readonly template: TemplateRef<FoldCalendarTitleContext>;
|
|
3418
|
+
static ngTemplateContextGuard(_directive: FoldCalendarTitleDirective, context: unknown): context is FoldCalendarTitleContext;
|
|
3419
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarTitleDirective, never>;
|
|
3420
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldCalendarTitleDirective, "ng-template[foldCalendarTitle]", never, {}, {}, never, never, true, never>;
|
|
3421
|
+
}
|
|
3422
|
+
/** What an overflow-chip template is handed. */
|
|
3423
|
+
interface FoldCalendarOverflowContext {
|
|
3424
|
+
/** How many events this day could not show — `let-count`. */
|
|
3425
|
+
readonly $implicit: number;
|
|
3426
|
+
/** The day they belong to. */
|
|
3427
|
+
readonly date: FoldCalendarDate;
|
|
3428
|
+
}
|
|
3429
|
+
/**
|
|
3430
|
+
* Replaces the month view's **`+N` chip** — by default a small text button.
|
|
3431
|
+
* Where an app puts an avatar stack, or the trigger of a "see all" popover.
|
|
3432
|
+
*
|
|
3433
|
+
* @selector `ng-template[foldCalendarOverflow]`
|
|
3434
|
+
*/
|
|
3435
|
+
declare class FoldCalendarOverflowDirective {
|
|
3436
|
+
readonly template: TemplateRef<FoldCalendarOverflowContext>;
|
|
3437
|
+
static ngTemplateContextGuard(_directive: FoldCalendarOverflowDirective, context: unknown): context is FoldCalendarOverflowContext;
|
|
3438
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarOverflowDirective, never>;
|
|
3439
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FoldCalendarOverflowDirective, "ng-template[foldCalendarOverflow]", never, {}, {}, never, never, true, never>;
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
/**
|
|
3443
|
+
* What a locale says about its own week.
|
|
3444
|
+
*
|
|
3445
|
+
* `Intl` hands us every month and weekday name, and then most calendars stop
|
|
3446
|
+
* there and hard-code Monday — which is right in France and wrong in the United
|
|
3447
|
+
* States, Egypt and the Maldives. `Intl.Locale` also knows **which day the week
|
|
3448
|
+
* starts on and which days are the weekend**; asking is one call, and it turns
|
|
3449
|
+
* two inputs from "the caller guesses" into "the caller overrides".
|
|
3450
|
+
*
|
|
3451
|
+
* Support is uneven (`getWeekInfo()` in Chrome and Safari, the `weekInfo`
|
|
3452
|
+
* getter in older Firefox), so both shapes are probed and neither is assumed.
|
|
3453
|
+
* A runtime with neither falls back to Monday + Sat/Sun, which is the most
|
|
3454
|
+
* common answer and the previous behaviour.
|
|
3455
|
+
*/
|
|
3456
|
+
/** A locale's week conventions. */
|
|
3457
|
+
interface FoldWeekInfo {
|
|
3458
|
+
/** The day its calendars open on. */
|
|
3459
|
+
readonly weekStartsOn: FoldWeekday;
|
|
3460
|
+
/** The days it shades as the weekend. */
|
|
3461
|
+
readonly weekendDays: readonly FoldWeekday[];
|
|
3462
|
+
}
|
|
3463
|
+
/** What a runtime that cannot answer gets: the most common week in the world. */
|
|
3464
|
+
declare const FOLD_FALLBACK_WEEK_INFO: FoldWeekInfo;
|
|
3465
|
+
/**
|
|
3466
|
+
* The week conventions of `locale` — its first day and its weekend.
|
|
3467
|
+
*
|
|
3468
|
+
* `undefined` asks the runtime for its own locale, which is what a calendar
|
|
3469
|
+
* with no `locale` input is already formatting in.
|
|
3470
|
+
*/
|
|
3471
|
+
declare function foldLocaleWeekInfo(locale?: string): FoldWeekInfo;
|
|
3472
|
+
|
|
3473
|
+
/**
|
|
3474
|
+
* Where a key press moves the focused day. Split out of the component because
|
|
3475
|
+
* "what does ArrowDown mean on a calendar" is a pure question about dates, and
|
|
3476
|
+
* answering it here means it can be tested without a grid, a DOM or a TestBed.
|
|
3477
|
+
*
|
|
3478
|
+
* {@link foldCalendarNextFocus} is public: it is the other half of the geometry
|
|
3479
|
+
* tier, and a hand-rolled date grid owes its users the same arrow keys as the
|
|
3480
|
+
* built-in one. {@link foldFocusDayCell} stays internal — it reads a
|
|
3481
|
+
* `data-fold-day` attribute this package writes, and exporting it would freeze
|
|
3482
|
+
* that attribute into the public contract.
|
|
3483
|
+
*/
|
|
3484
|
+
/**
|
|
3485
|
+
* The day `key` moves focus to from `from`, or `null` when the key is not a
|
|
3486
|
+
* grid-navigation key and the component should leave the event alone.
|
|
3487
|
+
*
|
|
3488
|
+
* The mapping is the ARIA grid pattern applied to a date axis: horizontal keys
|
|
3489
|
+
* step a day, vertical keys step a **week** (the column stays put, which is the
|
|
3490
|
+
* whole point of a 7-wide grid), `Home`/`End` snap to the week's bounds, and
|
|
3491
|
+
* `PageUp`/`PageDown` page by month.
|
|
3492
|
+
*/
|
|
3493
|
+
declare function foldCalendarNextFocus(key: string, from: FoldCalendarDate, weekStartsOn?: FoldWeekday): FoldCalendarDate | null;
|
|
3494
|
+
|
|
3495
|
+
/**
|
|
3496
|
+
* Month geometry — where every chip lands, and what did not fit.
|
|
3497
|
+
*
|
|
3498
|
+
* Packing spans into lanes is the one genuinely algorithmic part of a calendar,
|
|
3499
|
+
* so it lives on its own, framework-free apart from a dev-mode warning, and is
|
|
3500
|
+
* tested exhaustively without rendering anything.
|
|
3501
|
+
*
|
|
3502
|
+
* **Public on purpose.** `fold-calendar-month` is one consumer of this, not its
|
|
3503
|
+
* owner: an app that needs a month laid out but drawn its own way calls
|
|
3504
|
+
* `foldBuildMonthGrid` and renders the rows itself, and gets the packing, the
|
|
3505
|
+
* week-boundary clipping and the open edges for free. Pair it with
|
|
3506
|
+
* `foldCalendarNextFocus` for the keyboard, and with `FoldCalendarLabels` for
|
|
3507
|
+
* the strings.
|
|
3508
|
+
*/
|
|
3509
|
+
/** How to build a month grid. */
|
|
3510
|
+
interface FoldMonthGridOptions {
|
|
3511
|
+
/** Any date inside the month to display. */
|
|
3512
|
+
readonly month: FoldCalendarDate;
|
|
3513
|
+
/** Day the weeks start on. @default 'mon' */
|
|
3514
|
+
readonly weekStartsOn?: FoldWeekday;
|
|
3515
|
+
/** Days shaded as the weekend. @default ['sat', 'sun'] */
|
|
3516
|
+
readonly weekendDays?: readonly FoldWeekday[] | undefined;
|
|
3517
|
+
/** The day to flag as today; omit to flag none (an SSR-stable default). */
|
|
3518
|
+
readonly today?: FoldCalendarDate | undefined;
|
|
3519
|
+
/** Lanes a week row can stack before events spill into the overflow count. @default 3 */
|
|
3520
|
+
readonly maxLanes?: number;
|
|
3521
|
+
/**
|
|
3522
|
+
* Always emit six week rows, so the grid keeps one height across months
|
|
3523
|
+
* instead of reflowing between 4, 5 and 6 rows. @default false
|
|
3524
|
+
*/
|
|
3525
|
+
readonly fixedWeeks?: boolean;
|
|
3526
|
+
}
|
|
3527
|
+
/**
|
|
3528
|
+
* Lays a month out as week rows with their events already packed into lanes.
|
|
3529
|
+
*
|
|
3530
|
+
* The grid runs from the week containing the 1st to the week containing the
|
|
3531
|
+
* last day, so it always starts and ends on whole weeks; `fixedWeeks` pads it
|
|
3532
|
+
* to six rows. Events outside that window are dropped, and an event crossing a
|
|
3533
|
+
* week boundary yields one band per week it touches.
|
|
3534
|
+
*
|
|
3535
|
+
* An unparseable `month` yields **no rows** rather than a grid of `Invalid
|
|
3536
|
+
* Date` cells, with a dev-mode warning naming the value.
|
|
3537
|
+
*/
|
|
3538
|
+
declare function foldBuildMonthGrid<T>(events: readonly FoldCalendarEvent<T>[], options: FoldMonthGridOptions): readonly FoldCalendarWeek<T>[];
|
|
3539
|
+
|
|
3540
|
+
/**
|
|
3541
|
+
* Render models for the column views (week, day).
|
|
3542
|
+
*
|
|
3543
|
+
* Nothing is packed here: chips stack in a column, so a multi-day event simply
|
|
3544
|
+
* appears under every day it covers, and no event is ever dropped — which is
|
|
3545
|
+
* why these cells always report `hiddenCount: 0`.
|
|
3546
|
+
*/
|
|
3547
|
+
/** How to build a column view. */
|
|
3548
|
+
interface FoldDayColumnsOptions {
|
|
3549
|
+
/** Any date inside the range to display. */
|
|
3550
|
+
readonly date: FoldCalendarDate;
|
|
3551
|
+
/** Day the week starts on — ignored when building a single day. @default 'mon' */
|
|
3552
|
+
readonly weekStartsOn?: FoldWeekday;
|
|
3553
|
+
/** Days shaded as the weekend. @default ['sat', 'sun'] */
|
|
3554
|
+
readonly weekendDays?: readonly FoldWeekday[] | undefined;
|
|
3555
|
+
/** The day to flag as today; omit to flag none. */
|
|
3556
|
+
readonly today?: FoldCalendarDate | undefined;
|
|
3557
|
+
}
|
|
3558
|
+
/**
|
|
3559
|
+
* The seven days of `date`'s week, each with the events covering it — the
|
|
3560
|
+
* render model of the week view.
|
|
3561
|
+
*/
|
|
3562
|
+
declare function foldBuildWeek<T>(events: readonly FoldCalendarEvent<T>[], options: FoldDayColumnsOptions): readonly FoldCalendarDayEvents<T>[];
|
|
3563
|
+
/** A single day with its events — the render model of the day view. */
|
|
3564
|
+
declare function foldBuildDay<T>(events: readonly FoldCalendarEvent<T>[], options: FoldDayColumnsOptions): FoldCalendarDayEvents<T>;
|
|
3565
|
+
|
|
3566
|
+
/**
|
|
3567
|
+
* The three selections every view and every consumer makes over a feed.
|
|
3568
|
+
*
|
|
3569
|
+
* Deliberately the smallest, least coupled part of the family: an app that
|
|
3570
|
+
* wants the calendar's semantics — "covers this day", "overlaps this window",
|
|
3571
|
+
* "belongs to a live feed" — without any of its rendering imports only this.
|
|
3572
|
+
*/
|
|
3573
|
+
/**
|
|
3574
|
+
* Events covering `date`, in the caller's order — the selection the week, day
|
|
3575
|
+
* and list views render, where chips stack in a column and need no packing.
|
|
3576
|
+
*/
|
|
3577
|
+
declare function foldEventsOnDay<T>(events: readonly FoldCalendarEvent<T>[], date: FoldCalendarDate): readonly FoldCalendarEvent<T>[];
|
|
3578
|
+
/** Events overlapping `[from, to]` at all, in the caller's order. */
|
|
3579
|
+
declare function foldEventsInRange<T>(events: readonly FoldCalendarEvent<T>[], from: FoldCalendarDate, to: FoldCalendarDate): readonly FoldCalendarEvent<T>[];
|
|
3580
|
+
/**
|
|
3581
|
+
* Events from the feeds in `active`, in the caller's order — the other half of
|
|
3582
|
+
* `fold-calendar-source-filter`, which owns only the selection.
|
|
3583
|
+
*
|
|
3584
|
+
* `null` means nothing has been switched off yet and everything passes; it is
|
|
3585
|
+
* the filter chips' own initial value, so the one function built to consume
|
|
3586
|
+
* that model accepts it rather than making every caller write the ternary.
|
|
3587
|
+
* An empty `Set` is the opposite — every feed switched off — which is why the
|
|
3588
|
+
* two are not collapsed.
|
|
3589
|
+
*
|
|
3590
|
+
* An event with no `sourceKey` belongs to no feed, so no chip can hide it and
|
|
3591
|
+
* it always passes.
|
|
3592
|
+
*/
|
|
3593
|
+
declare function foldFilterBySource<T>(events: readonly FoldCalendarEvent<T>[], active: ReadonlySet<string> | null): readonly FoldCalendarEvent<T>[];
|
|
3594
|
+
|
|
3595
|
+
/**
|
|
3596
|
+
* Where overlapping timed events sit side by side — the time grid's only
|
|
3597
|
+
* genuinely algorithmic part, and the same shape as the month's lane packing
|
|
3598
|
+
* turned ninety degrees: intervals over **minutes** instead of days, laid out
|
|
3599
|
+
* across the column's width instead of down its height.
|
|
3600
|
+
*
|
|
3601
|
+
* Pure, so the rule can be exercised exhaustively without a grid.
|
|
3602
|
+
*/
|
|
3603
|
+
/** An interval to place, in minutes since midnight. */
|
|
3604
|
+
interface FoldOverlapInput {
|
|
3605
|
+
readonly startMinute: number;
|
|
3606
|
+
/** Exclusive: an event ending at 10:00 does not overlap one starting there. */
|
|
3607
|
+
readonly endMinute: number;
|
|
3608
|
+
}
|
|
3609
|
+
/** Where one interval landed across the width. */
|
|
3610
|
+
interface FoldOverlapSlot {
|
|
3611
|
+
/** Its column index inside the cluster, `0`-based. */
|
|
3612
|
+
readonly column: number;
|
|
3613
|
+
/** How many columns its cluster needed — the denominator of its width. */
|
|
3614
|
+
readonly columns: number;
|
|
3615
|
+
}
|
|
3616
|
+
/**
|
|
3617
|
+
* Lays intervals out across the width, one slot per input, in input order.
|
|
3618
|
+
*
|
|
3619
|
+
* Two events that merely touch — one ends at 10:00, the next starts at 10:00 —
|
|
3620
|
+
* do **not** overlap and each keep the full width. That is the difference
|
|
3621
|
+
* between the month grid (inclusive days: touching means colliding) and a time
|
|
3622
|
+
* grid (exclusive minutes: touching means back-to-back), and getting it wrong
|
|
3623
|
+
* halves the width of every event in a packed morning.
|
|
3624
|
+
*
|
|
3625
|
+
* Events are grouped into **clusters** — runs connected by overlap — and each
|
|
3626
|
+
* cluster is widened only as far as it needs, so one triple-booked hour does
|
|
3627
|
+
* not narrow the rest of the day.
|
|
3628
|
+
*/
|
|
3629
|
+
declare function foldLayOutOverlaps(intervals: readonly FoldOverlapInput[]): readonly FoldOverlapSlot[];
|
|
3630
|
+
|
|
2106
3631
|
type FoldChoiceOption = {
|
|
2107
3632
|
key: string;
|
|
2108
3633
|
label: string;
|
|
@@ -4640,6 +6165,12 @@ declare class FoldViewNavComponent {
|
|
|
4640
6165
|
readonly background: _angular_core.InputSignal<"transparent" | "surface">;
|
|
4641
6166
|
/** The nearest layout, if any — lets `direction="auto"` follow it. */
|
|
4642
6167
|
private readonly layout;
|
|
6168
|
+
/**
|
|
6169
|
+
* No wrapping `fold-nav-layout`. Standalone, the bar owns its gap to the
|
|
6170
|
+
* following content; inside a layout, the layout owns it (avoiding a double
|
|
6171
|
+
* gap).
|
|
6172
|
+
*/
|
|
6173
|
+
protected readonly isStandalone: _angular_core.Signal<boolean>;
|
|
4643
6174
|
/** `direction` with `auto` resolved against the wrapping layout. */
|
|
4644
6175
|
protected readonly resolvedDirection: _angular_core.Signal<"vertical" | "horizontal">;
|
|
4645
6176
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldViewNavComponent, never>;
|
|
@@ -5639,6 +7170,395 @@ declare class FoldPaletteRegistry {
|
|
|
5639
7170
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FoldPaletteRegistry>;
|
|
5640
7171
|
}
|
|
5641
7172
|
|
|
5642
|
-
|
|
5643
|
-
|
|
7173
|
+
/**
|
|
7174
|
+
* What "next" means, and what the period on display is called — the two
|
|
7175
|
+
* questions a calendar toolbar asks. Both depend on the view, so they live
|
|
7176
|
+
* here as pure functions rather than as a switch inside a component.
|
|
7177
|
+
*/
|
|
7178
|
+
/** The four readings the family ships. */
|
|
7179
|
+
type FoldCalendarBuiltInView = "month" | "week" | "day" | "list";
|
|
7180
|
+
/**
|
|
7181
|
+
* Which reading is on screen.
|
|
7182
|
+
*
|
|
7183
|
+
* The four built-ins **autocomplete**, but the type is open: an app can put its
|
|
7184
|
+
* own reading (a resource grid, a timeline) in the same switch without the
|
|
7185
|
+
* library having to know about it. Paging and titling an unknown view falls
|
|
7186
|
+
* back to month semantics — see {@link foldShiftDate}.
|
|
7187
|
+
*/
|
|
7188
|
+
type FoldCalendarView = FoldCalendarBuiltInView | (string & Record<never, never>);
|
|
7189
|
+
/** A view the toolbar offers, when its name is the app's own. */
|
|
7190
|
+
interface FoldCalendarViewOption {
|
|
7191
|
+
/** What `view` is set to when this one is picked. */
|
|
7192
|
+
readonly value: string;
|
|
7193
|
+
/** What the switch shows. */
|
|
7194
|
+
readonly label: string;
|
|
7195
|
+
}
|
|
7196
|
+
/** An inclusive span of days. */
|
|
7197
|
+
interface FoldCalendarRange {
|
|
7198
|
+
readonly from: FoldCalendarDate;
|
|
7199
|
+
readonly to: FoldCalendarDate;
|
|
7200
|
+
}
|
|
7201
|
+
/**
|
|
7202
|
+
* `date` moved by `delta` periods **in the units the view reads in** — a month
|
|
7203
|
+
* at a time in the month view, a week in the week view, a day in the day view.
|
|
7204
|
+
* The list view follows the month, since that is the window it lists.
|
|
7205
|
+
*
|
|
7206
|
+
* An unrecognised view pages by month, the safest of the four to be wrong
|
|
7207
|
+
* about: it always lands on a real date the other views can also show.
|
|
7208
|
+
*/
|
|
7209
|
+
declare function foldShiftDate(view: FoldCalendarView, date: FoldCalendarDate, delta: number, weekStartsOn?: FoldWeekday): FoldCalendarDate;
|
|
7210
|
+
/**
|
|
7211
|
+
* The days `view` covers around `date` — what a caller passes to its data
|
|
7212
|
+
* source, and what the list view scopes itself to.
|
|
7213
|
+
*
|
|
7214
|
+
* The **month** view's range is wider than its month: the grid paints the days
|
|
7215
|
+
* either side of it, and they carry their events too. The **list** view's is
|
|
7216
|
+
* not, because a list has no padding days — an April row in a May list is an
|
|
7217
|
+
* event the reader did not ask for.
|
|
7218
|
+
*/
|
|
7219
|
+
declare function foldRangeForView(view: FoldCalendarView, date: FoldCalendarDate, weekStartsOn?: FoldWeekday): FoldCalendarRange;
|
|
7220
|
+
/**
|
|
7221
|
+
* The heading for the period on display, localised through `Intl` — "May 2026",
|
|
7222
|
+
* "18–24 May 2026", "Monday 18 May 2026". A week spanning two months or two
|
|
7223
|
+
* years names both ends, which `Intl`'s range formatter handles per locale.
|
|
7224
|
+
*/
|
|
7225
|
+
declare function foldViewTitle(view: FoldCalendarView, date: FoldCalendarDate, locale?: string, weekStartsOn?: FoldWeekday): string;
|
|
7226
|
+
|
|
7227
|
+
/**
|
|
7228
|
+
* `<fold-calendar-toolbar>` — the chrome above a calendar: jump to today, page
|
|
7229
|
+
* back and forward, the period's name, and the view switch.
|
|
7230
|
+
*
|
|
7231
|
+
* It owns no data. Both pieces of state it touches are two-way `model`s, so
|
|
7232
|
+
* the page binds the same `date` and `view` it hands to whichever view is on
|
|
7233
|
+
* screen, and paging keeps working without a single output handler.
|
|
7234
|
+
*
|
|
7235
|
+
* The step matches the reading: a month at a time under the month view, a week
|
|
7236
|
+
* under the week view, a day under the day view — see `foldShiftDate`.
|
|
7237
|
+
*
|
|
7238
|
+
* ## Inputs
|
|
7239
|
+
* | Input | Type | Default | Meaning |
|
|
7240
|
+
* |----------------|--------------------------|---------|---------|
|
|
7241
|
+
* | `date` | `FoldCalendarDate` | — | **Two-way.** The period on display. |
|
|
7242
|
+
* | `view` | `FoldCalendarView` | `'month'` | **Two-way.** Which reading is on screen. |
|
|
7243
|
+
* | `views` | `(FoldCalendarView \| FoldCalendarViewOption)[]` | all four | Which switches to offer; pass fewer to drop one, or `{ value, label }` to add your own. |
|
|
7244
|
+
* | `today` | `FoldCalendarDate` | local clock | Where the "today" button jumps to. |
|
|
7245
|
+
* | `weekStartsOn` | `FoldWeekday` | the locale's | How the week view snaps and names itself. |
|
|
7246
|
+
* | `locale` | `string` | runtime | Drives the title through `Intl`. |
|
|
7247
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |
|
|
7248
|
+
*
|
|
7249
|
+
* ## Slots & templates
|
|
7250
|
+
* | Selector | Region |
|
|
7251
|
+
* |------------------------|--------|
|
|
7252
|
+
* | `[actions]` | Trailing edge — the page's own buttons ("New event", filters). |
|
|
7253
|
+
* | `ng-template[foldCalendarTitle]` | Replaces the `<h2>` title — reword it, or give it the heading level the page's outline needs. |
|
|
7254
|
+
*
|
|
7255
|
+
* ## Theming
|
|
7256
|
+
* | CSS variable | Default | Sets |
|
|
7257
|
+
* |------------------------------------|---------|------|
|
|
7258
|
+
* | `--fold-calendar-toolbar-step-size`| `28px` | The back/forward buttons. |
|
|
7259
|
+
*
|
|
7260
|
+
* ## Extending
|
|
7261
|
+
* `views` accepts an app's own reading — `[views]="['month', {value: 'rooms', label: 'Rooms'}]"`.
|
|
7262
|
+
* Paging and titling an unrecognised view fall back to month semantics, so a
|
|
7263
|
+
* custom view still lands on real dates.
|
|
7264
|
+
*
|
|
7265
|
+
* ## Accessibility
|
|
7266
|
+
* The title is the toolbar's live heading: it carries `aria-live="polite"`, so
|
|
7267
|
+
* paging announces the period a keyboard user just moved to instead of leaving
|
|
7268
|
+
* the change silent.
|
|
7269
|
+
*
|
|
7270
|
+
* @selector `fold-calendar-toolbar`
|
|
7271
|
+
*
|
|
7272
|
+
* @example
|
|
7273
|
+
* ```html
|
|
7274
|
+
* <fold-calendar-toolbar [(date)]="date" [(view)]="view" [today]="today">
|
|
7275
|
+
* <button actions foldButton (click)="create()">New event</button>
|
|
7276
|
+
* </fold-calendar-toolbar>
|
|
7277
|
+
* ```
|
|
7278
|
+
*/
|
|
7279
|
+
declare class FoldCalendarToolbarComponent {
|
|
7280
|
+
/** The period on display. */
|
|
7281
|
+
readonly date: _angular_core.ModelSignal<string>;
|
|
7282
|
+
/** Which reading is on screen. @default 'month' */
|
|
7283
|
+
readonly view: _angular_core.ModelSignal<FoldCalendarView>;
|
|
7284
|
+
/**
|
|
7285
|
+
* Which switches to offer — a built-in name, or `{ value, label }` for a view
|
|
7286
|
+
* the app owns. @default every built-in view
|
|
7287
|
+
*/
|
|
7288
|
+
readonly views: _angular_core.InputSignal<readonly (FoldCalendarView | FoldCalendarViewOption)[]>;
|
|
7289
|
+
/** The day the "today" button jumps to; defaults to the local clock. */
|
|
7290
|
+
readonly today: _angular_core.InputSignal<string | undefined>;
|
|
7291
|
+
/** Day the week starts on. @default the locale's own first day */
|
|
7292
|
+
readonly weekStartsOn: _angular_core.InputSignal<FoldWeekday | undefined>;
|
|
7293
|
+
/** Labels and locale — see the directive. */
|
|
7294
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
7295
|
+
/** The anchor in force: the caller's, else the one the locale declares. */
|
|
7296
|
+
private readonly anchor;
|
|
7297
|
+
private readonly projectedTitle;
|
|
7298
|
+
/** The custom title template, when one is projected. */
|
|
7299
|
+
protected readonly titleContent: _angular_core.Signal<_angular_core.TemplateRef<fold_ng.FoldCalendarTitleContext> | null>;
|
|
7300
|
+
/** The period's name — "May 2026", "18–24 May 2026", "Wednesday 20 May 2026". */
|
|
7301
|
+
protected readonly title: _angular_core.Signal<string>;
|
|
7302
|
+
/** The period the title stands for — handed to a projected title template. */
|
|
7303
|
+
protected readonly range: _angular_core.Signal<fold_ng.FoldCalendarRange>;
|
|
7304
|
+
protected readonly options: _angular_core.Signal<readonly FoldViewToggleOption[]>;
|
|
7305
|
+
/** Pages by one period in the units the current view reads in. */
|
|
7306
|
+
protected shift(delta: number): void;
|
|
7307
|
+
protected goToday(): void;
|
|
7308
|
+
/** The switch emits a bare `string`; only a view it actually offers is kept. */
|
|
7309
|
+
protected onViewChange(value: string): void;
|
|
7310
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarToolbarComponent, never>;
|
|
7311
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarToolbarComponent, "fold-calendar-toolbar", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "views": { "alias": "views"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; "isSignal": true; }; }, { "date": "dateChange"; "view": "viewChange"; }, ["projectedTitle"], ["[actions]"], true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
7312
|
+
}
|
|
7313
|
+
|
|
7314
|
+
/**
|
|
7315
|
+
* The "what's next" reading: everything still ahead, grouped by the day it
|
|
7316
|
+
* lands on. Pure, so the rule for *what counts as ahead* — and what counts as
|
|
7317
|
+
* needing attention — can be tested without rendering a rail.
|
|
7318
|
+
*/
|
|
7319
|
+
/** Which slice of what is ahead the agenda shows. */
|
|
7320
|
+
type FoldCalendarAgendaMode = "todo" | "all";
|
|
7321
|
+
/** Whether an event is asking for something — the `todo` slice's test. */
|
|
7322
|
+
type FoldCalendarActionable<T = unknown> = (event: FoldCalendarEvent<T>) => boolean;
|
|
7323
|
+
/** One day of the agenda, with what falls on it. */
|
|
7324
|
+
interface FoldCalendarAgendaGroup<T = unknown> {
|
|
7325
|
+
readonly date: FoldCalendarDate;
|
|
7326
|
+
/** Events opening on {@link date}, earliest first. */
|
|
7327
|
+
readonly events: readonly FoldCalendarEvent<T>[];
|
|
7328
|
+
}
|
|
7329
|
+
/** How to build the agenda. */
|
|
7330
|
+
interface FoldAgendaOptions<T = unknown> {
|
|
7331
|
+
/** The day "ahead" starts from — anything ending before it is past. */
|
|
7332
|
+
readonly from: FoldCalendarDate;
|
|
7333
|
+
/** `todo` keeps only what asks for attention. @default 'all' */
|
|
7334
|
+
readonly mode?: FoldCalendarAgendaMode;
|
|
7335
|
+
/** Days to return at most, so a long horizon cannot flood a rail. @default 8 */
|
|
7336
|
+
readonly limit?: number;
|
|
7337
|
+
/** What counts as asking for attention. @default foldIsActionable */
|
|
7338
|
+
readonly isActionable?: FoldCalendarActionable<T>;
|
|
7339
|
+
}
|
|
7340
|
+
/** What the agenda produced, and whether it had to stop short. */
|
|
7341
|
+
interface FoldCalendarAgenda<T = unknown> {
|
|
7342
|
+
/** The days shown, earliest first. */
|
|
7343
|
+
readonly groups: readonly FoldCalendarAgendaGroup<T>[];
|
|
7344
|
+
/**
|
|
7345
|
+
* Days that exist beyond `limit`. Non-zero means "there is more", which is a
|
|
7346
|
+
* different thing to say than "there is nothing" — and the two used to render
|
|
7347
|
+
* identically.
|
|
7348
|
+
*/
|
|
7349
|
+
readonly truncated: number;
|
|
7350
|
+
}
|
|
7351
|
+
/**
|
|
7352
|
+
* Whether an event is asking for something.
|
|
7353
|
+
*
|
|
7354
|
+
* `warning` and `alert` are the two tones that mean "attention" in this
|
|
7355
|
+
* system, so they are what `todo` keeps — the agenda reads the same semantic
|
|
7356
|
+
* scale the chips paint with, rather than inventing a second one. Pass
|
|
7357
|
+
* `isActionable` to define it otherwise.
|
|
7358
|
+
*/
|
|
7359
|
+
declare function foldIsActionable<T>(event: FoldCalendarEvent<T>): boolean;
|
|
7360
|
+
/**
|
|
7361
|
+
* Events still ahead of `from`, grouped by day and capped to `limit` days.
|
|
7362
|
+
*
|
|
7363
|
+
* An event already running is grouped under `from` rather than its real start:
|
|
7364
|
+
* a three-week absence that began last Monday belongs at the top of "what's
|
|
7365
|
+
* next", not buried in a past day the rail never shows.
|
|
7366
|
+
*/
|
|
7367
|
+
declare function foldBuildAgenda<T>(events: readonly FoldCalendarEvent<T>[], options: FoldAgendaOptions<T>): FoldCalendarAgenda<T>;
|
|
7368
|
+
/**
|
|
7369
|
+
* How many events are asking for attention from `from` on — the rail's badge.
|
|
7370
|
+
*
|
|
7371
|
+
* Takes the same `isActionable` the agenda does, so a badge can never disagree
|
|
7372
|
+
* with the list under it.
|
|
7373
|
+
*/
|
|
7374
|
+
declare function foldCountActionable<T>(events: readonly FoldCalendarEvent<T>[], from: FoldCalendarDate, isActionable?: FoldCalendarActionable<T>): number;
|
|
7375
|
+
|
|
7376
|
+
/**
|
|
7377
|
+
* `<fold-calendar-agenda>` — a rail of what is still ahead, grouped by day.
|
|
7378
|
+
*
|
|
7379
|
+
* The counterpart to the grids: they answer "what does this month look like",
|
|
7380
|
+
* this answers "what do I do next". It carries a **`todo` slice** that keeps
|
|
7381
|
+
* only the events asking for attention (the `warning` and `alert` tones — the
|
|
7382
|
+
* same scale the chips paint with), so the rail doubles as a work queue with a
|
|
7383
|
+
* count.
|
|
7384
|
+
*
|
|
7385
|
+
* ## Inputs
|
|
7386
|
+
* | Input | Type | Default | Meaning |
|
|
7387
|
+
* |-------------|--------------------------|---------|---------|
|
|
7388
|
+
* | `from` | `FoldCalendarDate` | — | Where "ahead" starts; anything ending before it is past. |
|
|
7389
|
+
* | `events` | `FoldCalendarEvent<T>[]` | `[]` | Source events. |
|
|
7390
|
+
* | `mode` | `'todo' \| 'all'` | `'todo'` | **Two-way.** Which slice is shown. |
|
|
7391
|
+
* | `collapsed` | `boolean` | `false` | **Two-way.** Collapsed to a spine — persist it if you want it to stick. |
|
|
7392
|
+
* | `limit` | `number` | `8` | Days to show at most; what it cuts off is announced, not swallowed. |
|
|
7393
|
+
* | `isActionable` | `(event) => boolean` | tones | What the `todo` slice and the badge both count. |
|
|
7394
|
+
* | `locale` | `string` | runtime | Drives the day names through `Intl`. |
|
|
7395
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |
|
|
7396
|
+
*
|
|
7397
|
+
* ## Outputs
|
|
7398
|
+
* | Output | Payload | Fires on |
|
|
7399
|
+
* |--------------|------------------------|----------|
|
|
7400
|
+
* | `dayClick` | `FoldCalendarDate` | A day heading activated. |
|
|
7401
|
+
* | `eventClick` | `FoldCalendarEvent<T>` | A row activated. |
|
|
7402
|
+
*
|
|
7403
|
+
* ## Templates
|
|
7404
|
+
* | Directive | Replaces |
|
|
7405
|
+
* |-----------------------|----------|
|
|
7406
|
+
* | `foldCalendarEvent` | The inside of a row. |
|
|
7407
|
+
* | `foldCalendarHeading` | The day heading — where a per-day count or action goes. |
|
|
7408
|
+
*
|
|
7409
|
+
* ## Theming
|
|
7410
|
+
* | CSS variable | Default | Sets |
|
|
7411
|
+
* |-----------------------------------------|---------|------|
|
|
7412
|
+
* | `--fold-calendar-agenda-width` | `320px` | Width of the expanded rail. |
|
|
7413
|
+
* | `--fold-calendar-agenda-height` | `100%` | Height — match a grid beside it, or pin it. |
|
|
7414
|
+
* | `--fold-calendar-agenda-spine-width` | `44px` | Width once collapsed. |
|
|
7415
|
+
* | `--fold-calendar-agenda-badge-size` | `20px` | The count badge. |
|
|
7416
|
+
* | `--fold-calendar-agenda-control-size` | `26px` | The collapse control. |
|
|
7417
|
+
*
|
|
7418
|
+
* A day within the next week is named relatively — "Today", "Tomorrow", then
|
|
7419
|
+
* its weekday — because that reads faster than a date at this distance.
|
|
7420
|
+
*
|
|
7421
|
+
* @selector `fold-calendar-agenda`
|
|
7422
|
+
*
|
|
7423
|
+
* @example
|
|
7424
|
+
* ```html
|
|
7425
|
+
* <fold-calendar-agenda
|
|
7426
|
+
* [from]="today"
|
|
7427
|
+
* [events]="events()"
|
|
7428
|
+
* [(mode)]="agendaMode"
|
|
7429
|
+
* [(collapsed)]="agendaCollapsed"
|
|
7430
|
+
* (eventClick)="open($event)"
|
|
7431
|
+
* />
|
|
7432
|
+
* ```
|
|
7433
|
+
*/
|
|
7434
|
+
declare class FoldCalendarAgendaComponent<T = unknown> {
|
|
7435
|
+
/** The day "ahead" starts from. */
|
|
7436
|
+
readonly from: _angular_core.InputSignal<string>;
|
|
7437
|
+
/** Source events. */
|
|
7438
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<T>[]>;
|
|
7439
|
+
/** Which slice is shown. @default 'todo' */
|
|
7440
|
+
readonly mode: _angular_core.ModelSignal<FoldCalendarAgendaMode>;
|
|
7441
|
+
/** Collapsed to a spine. @default false */
|
|
7442
|
+
readonly collapsed: _angular_core.ModelSignal<boolean>;
|
|
7443
|
+
/** Days to show at most. @default 8 */
|
|
7444
|
+
readonly limit: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
7445
|
+
/**
|
|
7446
|
+
* What counts as asking for attention — the `todo` slice **and** the badge,
|
|
7447
|
+
* from one definition, so the two can never disagree.
|
|
7448
|
+
* @default the `warning` and `alert` tones
|
|
7449
|
+
*/
|
|
7450
|
+
readonly isActionable: _angular_core.InputSignal<FoldCalendarActionable<T>>;
|
|
7451
|
+
/** A day heading was activated. */
|
|
7452
|
+
readonly dayClick: _angular_core.OutputEmitterRef<string>;
|
|
7453
|
+
/** A row was activated. */
|
|
7454
|
+
readonly eventClick: _angular_core.OutputEmitterRef<FoldCalendarEvent<T>>;
|
|
7455
|
+
/** Labels, locale and the projected chip template — see the directive. */
|
|
7456
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
7457
|
+
private readonly projectedHeading;
|
|
7458
|
+
/** The custom day-heading template, when one is projected. */
|
|
7459
|
+
protected readonly headingContent: _angular_core.Signal<_angular_core.TemplateRef<fold_ng.FoldCalendarHeadingContext<any>> | null>;
|
|
7460
|
+
private readonly agenda;
|
|
7461
|
+
protected readonly groups: _angular_core.Signal<readonly FoldCalendarAgendaGroup<T>[]>;
|
|
7462
|
+
/** Days `limit` cut off — "there is more" is not the same as "there is none". */
|
|
7463
|
+
protected readonly truncated: _angular_core.Signal<number>;
|
|
7464
|
+
/** How much is asking for attention — the rail's badge, in either mode. */
|
|
7465
|
+
protected readonly todoCount: _angular_core.Signal<number>;
|
|
7466
|
+
/** The rail's own name, and the one the collapsed spine repeats. */
|
|
7467
|
+
protected readonly title: _angular_core.Signal<string>;
|
|
7468
|
+
protected readonly emptyMessage: _angular_core.Signal<string>;
|
|
7469
|
+
/** Day of the month, for the rail's number. */
|
|
7470
|
+
protected dayNumber(group: FoldCalendarAgendaGroup<T>): string;
|
|
7471
|
+
/**
|
|
7472
|
+
* "Today", "Tomorrow", then the weekday for the rest of the week — a name
|
|
7473
|
+
* beats a date while the day is still near.
|
|
7474
|
+
*/
|
|
7475
|
+
protected relativeName(group: FoldCalendarAgendaGroup<T>): string;
|
|
7476
|
+
/** The month, shown only once the weekday alone stops being enough. */
|
|
7477
|
+
protected monthName(group: FoldCalendarAgendaGroup<T>): string;
|
|
7478
|
+
protected toggleMode(mode: FoldCalendarAgendaMode): void;
|
|
7479
|
+
protected toggleCollapsed(): void;
|
|
7480
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarAgendaComponent<any>, never>;
|
|
7481
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarAgendaComponent<any>, "fold-calendar-agenda", never, { "from": { "alias": "from"; "required": true; "isSignal": true; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "isActionable": { "alias": "isActionable"; "required": false; "isSignal": true; }; }, { "mode": "modeChange"; "collapsed": "collapsedChange"; "dayClick": "dayClick"; "eventClick": "eventClick"; }, ["projectedHeading"], never, true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
7482
|
+
}
|
|
7483
|
+
|
|
7484
|
+
/** A source, with what it currently contributes and whether it is showing. */
|
|
7485
|
+
interface SourceChip {
|
|
7486
|
+
readonly source: FoldCalendarSource;
|
|
7487
|
+
readonly count: number;
|
|
7488
|
+
readonly shown: boolean;
|
|
7489
|
+
}
|
|
7490
|
+
/**
|
|
7491
|
+
* `<fold-calendar-source-filter>` — the chips that switch each feed of a
|
|
7492
|
+
* merged calendar on and off.
|
|
7493
|
+
*
|
|
7494
|
+
* A calendar usually shows several feeds at once (a programme, staff leave,
|
|
7495
|
+
* contracts). This owns the **selection** only: it counts what each feed
|
|
7496
|
+
* contributes and toggles it, and the caller runs `foldFilterBySource()` over
|
|
7497
|
+
* its own events. Keeping the two apart means the chips never need to know how
|
|
7498
|
+
* the events are fetched, and the filtering stays a pure function.
|
|
7499
|
+
*
|
|
7500
|
+
* ## Inputs
|
|
7501
|
+
* | Input | Type | Default | Meaning |
|
|
7502
|
+
* |-----------|--------------------------|---------|---------|
|
|
7503
|
+
* | `sources` | `FoldCalendarSource[]` | `[]` | The feeds to offer. |
|
|
7504
|
+
* | `events` | `FoldCalendarEvent[]` | `[]` | Counted per feed — pass the window on screen for live counts. |
|
|
7505
|
+
* | `active` | `ReadonlySet<string> \| null` | `null` | **Two-way.** The keys currently shown; `null` means "all". |
|
|
7506
|
+
* | `labels` | `Partial<FoldCalendarLabels>` | — | Per-instance label overrides. |
|
|
7507
|
+
*
|
|
7508
|
+
* ## Outputs
|
|
7509
|
+
* | Output | Payload | Fires on |
|
|
7510
|
+
* |-------------------|-----------------------|----------|
|
|
7511
|
+
* | `selectionChange` | `ReadonlySet<string>` | A chip toggled — never `null`. |
|
|
7512
|
+
*
|
|
7513
|
+
* `null` and an empty `Set` mean opposite things — "nothing switched off yet"
|
|
7514
|
+
* versus "every feed switched off" — which is why they are not collapsed.
|
|
7515
|
+
* `foldFilterBySource()` takes either.
|
|
7516
|
+
*
|
|
7517
|
+
* ## Accessibility
|
|
7518
|
+
* Each chip is a **toggle**, so it carries `aria-pressed` in both states, and
|
|
7519
|
+
* its accessible name says which feed and whether it is showing — the tick and
|
|
7520
|
+
* the dot are colour, which cannot be the only carrier.
|
|
7521
|
+
*
|
|
7522
|
+
* @selector `fold-calendar-source-filter`
|
|
7523
|
+
*
|
|
7524
|
+
* @example
|
|
7525
|
+
* ```html
|
|
7526
|
+
* <fold-calendar-source-filter
|
|
7527
|
+
* [sources]="sources"
|
|
7528
|
+
* [events]="events()"
|
|
7529
|
+
* [(active)]="activeSources"
|
|
7530
|
+
* />
|
|
7531
|
+
* <fold-calendar-month [events]="visibleEvents()" [(month)]="month" />
|
|
7532
|
+
* ```
|
|
7533
|
+
*/
|
|
7534
|
+
declare class FoldCalendarSourceFilterComponent {
|
|
7535
|
+
/** The feeds to offer. */
|
|
7536
|
+
readonly sources: _angular_core.InputSignal<readonly FoldCalendarSource[]>;
|
|
7537
|
+
/** Events to count per feed; pass the window on screen for live counts. */
|
|
7538
|
+
readonly events: _angular_core.InputSignal<readonly FoldCalendarEvent<unknown>[]>;
|
|
7539
|
+
/**
|
|
7540
|
+
* The keys currently shown. Left unset every feed shows, so the filter is
|
|
7541
|
+
* useful before the caller has any selection state of its own.
|
|
7542
|
+
*/
|
|
7543
|
+
readonly active: _angular_core.ModelSignal<ReadonlySet<string> | null>;
|
|
7544
|
+
/**
|
|
7545
|
+
* The selection after a chip was toggled — **never `null`**, unlike `active`,
|
|
7546
|
+
* whose unset state exists only as a starting value. Handle this one and you
|
|
7547
|
+
* never have to eliminate a case that cannot happen.
|
|
7548
|
+
*/
|
|
7549
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<ReadonlySet<string>>;
|
|
7550
|
+
/** Labels and locale — see the directive. */
|
|
7551
|
+
protected readonly chrome: FoldCalendarChromeDirective;
|
|
7552
|
+
/** The effective selection — every key while `active` is unset. */
|
|
7553
|
+
private readonly shownKeys;
|
|
7554
|
+
protected readonly chips: _angular_core.Signal<readonly SourceChip[]>;
|
|
7555
|
+
protected chipLabel(chip: SourceChip): string;
|
|
7556
|
+
/** Writes the next selection rather than mutating the set in place. */
|
|
7557
|
+
protected toggle(chip: SourceChip): void;
|
|
7558
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FoldCalendarSourceFilterComponent, never>;
|
|
7559
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FoldCalendarSourceFilterComponent, "fold-calendar-source-filter", never, { "sources": { "alias": "sources"; "required": false; "isSignal": true; }; "events": { "alias": "events"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; "selectionChange": "selectionChange"; }, never, never, true, [{ directive: typeof FoldCalendarChromeDirective; inputs: { "locale": "locale"; "labels": "labels"; "formats": "formats"; }; outputs: {}; }]>;
|
|
7560
|
+
}
|
|
7561
|
+
|
|
7562
|
+
export { FOLD_AUTO_PALETTES, FOLD_BLUR_TOKENS, FOLD_BUILTIN_ICONS, FOLD_CALENDAR_DEFAULT_LABELS, FOLD_CALENDAR_FORMATS, FOLD_CALENDAR_LABELS, FOLD_DATA_TABLE_DEFAULT_LABELS, FOLD_DATA_TABLE_LABELS, FOLD_DEFAULT_WEEKEND_DAYS, FOLD_FALLBACK_WEEK_INFO, FOLD_INLINE_CONFIRM_DEFAULT_LABELS, FOLD_INLINE_CONFIRM_LABELS, FOLD_MINUTES_PER_DAY, FOLD_MOTION_TOKENS, FOLD_PAGINATOR_DEFAULT_LABELS, FOLD_PAGINATOR_LABELS, FOLD_PALETTE_DEFAULT, FOLD_PANEL_CLOSE_LABEL, FOLD_PANEL_DEFAULTS, FOLD_RADIUS_TOKENS, FOLD_SEMANTIC_COLOR_TOKENS, FOLD_SHADOW_TOKENS, FOLD_SPACE_TOKENS, FOLD_TEXT_TOKENS, FOLD_TOAST_CONFIG, FoldAppShellComponent, FoldAsideLayoutComponent, FoldAvatarComponent, FoldAvatarDetailComponent, FoldAvatarListComponent, FoldBadgeComponent, FoldButtonComponent, FoldButtonIconComponent, FoldCalendarAgendaComponent, FoldCalendarChromeDirective, FoldCalendarDayComponent, FoldCalendarDayDirective, FoldCalendarEventDirective, FoldCalendarHeadingDirective, FoldCalendarListComponent, FoldCalendarMonthComponent, FoldCalendarOverflowDirective, FoldCalendarSourceFilterComponent, FoldCalendarTimegridComponent, FoldCalendarTitleDirective, FoldCalendarToolbarComponent, FoldCalendarWeekComponent, FoldCalloutComponent, FoldCardComponent, FoldCheckboxComponent, FoldChoiceRowComponent, FoldContextCardComponent, FoldDataTableCellDirective, FoldDataTableComponent, FoldDataTableRowCardDirective, FoldDisclosureComponent, FoldDropdownComponent, FoldDropdownItemComponent, FoldElementTitleComponent, FoldElevatedDirective, FoldEmptyStateComponent, FoldFieldComponent, FoldFieldIdDirective, FoldFieldListComponent, FoldFileDropzoneComponent, FoldHeroCardComponent, FoldHeroSectionComponent, FoldIconComponent, FoldIconRegistry, FoldIdService, FoldInlineConfirmComponent, FoldInputComponent, FoldLinkComponent, FoldListboxComponent, FoldLoadingStateComponent, FoldMenuComponent, FoldMenuItemComponent, FoldMenuSectionComponent, FoldMenuSeparatorComponent, FoldMultiselectComponent, FoldNavLauncherComponent, FoldNavLayoutComponent, FoldNavTileComponent, FoldNumberInputComponent, FoldOptionComponent, FoldPageLayoutComponent, FoldPageSectionComponent, FoldPageTitleDirective, FoldPaginatorComponent, FoldPaletteRegistry, FoldPanelComponentOutletDirective, FoldPanelHeaderComponent, FoldPanelHostComponent, FoldPanelHostService, FoldPanelRef, FoldPanelToggle, FoldPasswordFieldComponent, FoldPopoverComponent, FoldPopoverTriggerDirective, FoldRangeSliderComponent, FoldRepeatPressDirective, FoldSearchComponent, FoldSelectComponent, FoldSliderComponent, FoldSpinnerComponent, FoldStatusBadgeComponent, FoldStickyColumnDirective, FoldSurfaceDirective, FoldTabPanelComponent, FoldTabsComponent, FoldTimelineComponent, FoldToastComponent, FoldToastContainerComponent, FoldToastService, FoldToggleIconComponent, FoldViewNavComponent, FoldViewToggleComponent, autoUpdate, computePlacement, foldAddDays, foldAddMinutes, foldAddMonths, foldBlurVar, foldBuildAgenda, foldBuildDay, foldBuildMonthGrid, foldBuildTimeGrid, foldBuildWeek, foldCalendarNextFocus, foldCardBandChrome, foldColorProperty, foldColorVar, foldCountActionable, foldDaysBetween, foldDefaultPasswordRules, foldEndOfMonth, foldEventsInRange, foldEventsOnDay, foldFilterBySource, foldFromMinutes, foldFromNativeDate, foldFromTemporal, foldHashSeed, foldIsActionable, foldIsCalendarDate, foldIsCalendarTime, foldIsTimed, foldIsWeekend, foldIsoWeek, foldIsoWeekYear, foldLayOutOverlaps, foldLocaleWeekInfo, foldMotionVar, foldRadiusVar, foldRangeForView, foldRegexRule, foldResolvePalette, foldShadowVar, foldShiftDate, foldSpaceVar, foldStartOfMonth, foldStartOfWeek, foldTextVar, foldToMinutes, foldToNativeDate, foldToday, foldViewTitle, foldWeekdayIndex, foldWeekdayOf, observeElementWidth, provideFoldCalendarLabels, provideFoldDataTableLabels, provideFoldIcons, provideFoldInlineConfirmLabels, provideFoldPaginatorLabels, provideFoldPalette, provideFoldPanelDefaults, provideFoldPanelLabels, provideFoldToasts };
|
|
7563
|
+
export type { FoldAgendaOptions, FoldAutoPaletteName, FoldAvatarListItem, FoldAvatarRing, FoldAvatarRingStyle, FoldAvatarVariant, FoldBadgeVariant, FoldBlurToken, FoldBuiltinIconName, FoldButtonEmphasis, FoldButtonIconShape, FoldButtonIconSize, FoldButtonIconTone, FoldButtonIntent, FoldButtonShape, FoldButtonSize, FoldCalendarActionable, FoldCalendarAgenda, FoldCalendarAgendaGroup, FoldCalendarAgendaMode, FoldCalendarBand, FoldCalendarBlock, FoldCalendarBuiltInView, FoldCalendarDate, FoldCalendarDay, FoldCalendarDayContext, FoldCalendarDayEvents, FoldCalendarDayModifiers, FoldCalendarEvent, FoldCalendarEventContext, FoldCalendarFormat, FoldCalendarHalfDay, FoldCalendarHeadingContext, FoldCalendarLabels, FoldCalendarOverflowContext, FoldCalendarRange, FoldCalendarSource, FoldCalendarTime, FoldCalendarTitleContext, FoldCalendarTone, FoldCalendarView, FoldCalendarViewOption, FoldCalendarWeek, FoldCalloutAppearance, FoldCalloutVariant, FoldCardBandChrome, FoldCardBandChromeInput, FoldChoiceOption, FoldComponentPanelDescriptor, FoldDataTableLabels, FoldDayColumnsOptions, FoldIconName, FoldIconSet, FoldIconSize, FoldIconTone, FoldInlineConfirmLabels, FoldIsoDateLike, FoldMenuItemBadgeTone, FoldMenuLevel, FoldMenuTint, FoldMenuTogglePlacement, FoldMonthGridOptions, FoldMotionToken, FoldNumberControls, FoldNumberSpinner, FoldOverlapInput, FoldOverlapSlot, FoldPageItem, FoldPaginatorLabels, FoldPaletteInput, FoldPanelConfig, FoldPanelContent, FoldPanelDefaults, FoldPanelDefaultsProvider, FoldPanelDescriptor, FoldPanelHandle, FoldPanelLabels, FoldPanelSide, FoldPanelSize, FoldPanelSurface, FoldPasswordRule, FoldPlacementInput, FoldPlacementResult, FoldPopoverAlign, FoldPopoverPlacement, FoldPopoverSide, FoldRadiusToken, FoldRangeValue, FoldRect, FoldSelectOption, FoldSemanticColorToken, FoldShadowToken, FoldSpaceToken, FoldSpinnerSize, FoldStickyColumnAnchor, FoldSurfaceName, FoldTabItem, FoldTableColumn, FoldTableEmpty, FoldTableSort, FoldTableSortDir, FoldTableTone, FoldTabsContext, FoldTemplatePanelDescriptor, FoldTextToken, FoldTimeGrid, FoldTimeGridColumn, FoldTimeGridOptions, FoldTimelineDatePlacement, FoldTimelineNode, FoldToast, FoldToastConfig, FoldToastVariant, FoldViewNavItem, FoldViewToggleOption, FoldWeekInfo, FoldWeekday };
|
|
5644
7564
|
//# sourceMappingURL=fold-ng.d.ts.map
|