frontile 0.18.1 → 0.18.3
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/declarations/-private/get-config.d.ts.map +1 -1
- package/declarations/-private/timer.d.ts +3 -3
- package/declarations/-private/timer.d.ts.map +1 -1
- package/declarations/components/buttons/close-button.d.ts +2 -2
- package/declarations/components/buttons/close-button.d.ts.map +1 -1
- package/declarations/components/collections/calendar/calendar.d.ts +7 -1
- package/declarations/components/collections/calendar/calendar.d.ts.map +1 -1
- package/declarations/components/collections/calendar/header.d.ts +2 -0
- package/declarations/components/collections/calendar/header.d.ts.map +1 -1
- package/declarations/components/collections/calendar/types.d.ts +15 -0
- package/declarations/components/collections/calendar/types.d.ts.map +1 -1
- package/declarations/components/collections/calendar/year-grid.d.ts +2 -0
- package/declarations/components/collections/calendar/year-grid.d.ts.map +1 -1
- package/declarations/components/collections/listbox/item.d.ts +2 -2
- package/declarations/components/collections/listbox/item.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/column.d.ts +6 -0
- package/declarations/components/collections/simple-table/column.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/footer.d.ts +2 -1
- package/declarations/components/collections/simple-table/footer.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/header.d.ts +2 -1
- package/declarations/components/collections/simple-table/header.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/index.d.ts +1 -1
- package/declarations/components/collections/simple-table/index.d.ts.map +1 -1
- package/declarations/components/collections/table/checkbox.d.ts +1 -1
- package/declarations/components/collections/table/checkbox.d.ts.map +1 -1
- package/declarations/components/collections/table/column-visibility.d.ts +2 -2
- package/declarations/components/collections/table/column-visibility.d.ts.map +1 -1
- package/declarations/components/collections/table/table.d.ts +9 -7
- package/declarations/components/collections/table/table.d.ts.map +1 -1
- package/declarations/components/forms/checkbox.d.ts +2 -2
- package/declarations/components/forms/checkbox.d.ts.map +1 -1
- package/declarations/components/forms/date-input/clipboard.d.ts.map +1 -1
- package/declarations/components/forms/date-input/date-input.d.ts +5 -2
- package/declarations/components/forms/date-input/date-input.d.ts.map +1 -1
- package/declarations/components/forms/date-input/segment-group.d.ts +2 -0
- package/declarations/components/forms/date-input/segment-group.d.ts.map +1 -1
- package/declarations/components/forms/date-input/segments.d.ts +30 -4
- package/declarations/components/forms/date-input/segments.d.ts.map +1 -1
- package/declarations/components/forms/date-input/types.d.ts +60 -5
- package/declarations/components/forms/date-input/types.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/date-picker.d.ts +19 -2
- package/declarations/components/forms/date-picker/date-picker.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/end-content.d.ts +3 -1
- package/declarations/components/forms/date-picker/end-content.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/types.d.ts +42 -4
- package/declarations/components/forms/date-picker/types.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/value.d.ts +21 -5
- package/declarations/components/forms/date-picker/value.d.ts.map +1 -1
- package/declarations/components/forms/field.d.ts +4 -5
- package/declarations/components/forms/field.d.ts.map +1 -1
- package/declarations/components/forms/form.d.ts +5 -5
- package/declarations/components/forms/form.d.ts.map +1 -1
- package/declarations/components/forms/input-otp.d.ts +5 -5
- package/declarations/components/forms/input-otp.d.ts.map +1 -1
- package/declarations/components/forms/input.d.ts +4 -4
- package/declarations/components/forms/input.d.ts.map +1 -1
- package/declarations/components/forms/native-select.d.ts +2 -2
- package/declarations/components/forms/native-select.d.ts.map +1 -1
- package/declarations/components/forms/radio.d.ts +2 -2
- package/declarations/components/forms/radio.d.ts.map +1 -1
- package/declarations/components/forms/textarea.d.ts +3 -3
- package/declarations/components/forms/textarea.d.ts.map +1 -1
- package/declarations/components/navigation/pagination/pagination.d.ts +32 -1
- package/declarations/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/declarations/components/overlays/overlay.d.ts +4 -4
- package/declarations/components/overlays/overlay.d.ts.map +1 -1
- package/declarations/components/utilities/avatar.d.ts +1 -1
- package/declarations/components/utilities/avatar.d.ts.map +1 -1
- package/declarations/components/utilities/collapsible.d.ts +16 -0
- package/declarations/components/utilities/collapsible.d.ts.map +1 -1
- package/declarations/utils/forms-utils-index.d.ts +1 -1
- package/declarations/utils/forms-utils-index.d.ts.map +1 -1
- package/declarations/utils/nested-data.d.ts +17 -0
- package/declarations/utils/nested-data.d.ts.map +1 -1
- package/dist/components/buttons/close-button.js +5 -12
- package/dist/components/buttons/close-button.js.map +1 -1
- package/dist/components/collections/calendar/calendar.js +13 -1
- package/dist/components/collections/calendar/calendar.js.map +1 -1
- package/dist/components/collections/calendar/header.js +1 -1
- package/dist/components/collections/calendar/header.js.map +1 -1
- package/dist/components/collections/calendar/year-grid.js +1 -1
- package/dist/components/collections/calendar/year-grid.js.map +1 -1
- package/dist/components/collections/listbox/item.js +4 -11
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/simple-table/column.js +2 -2
- package/dist/components/collections/simple-table/column.js.map +1 -1
- package/dist/components/collections/simple-table/footer.js +1 -1
- package/dist/components/collections/simple-table/footer.js.map +1 -1
- package/dist/components/collections/simple-table/header.js +1 -1
- package/dist/components/collections/simple-table/header.js.map +1 -1
- package/dist/components/collections/simple-table/index.js +1 -1
- package/dist/components/collections/simple-table/index.js.map +1 -1
- package/dist/components/collections/table/checkbox.js +2 -7
- package/dist/components/collections/table/checkbox.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +2 -7
- package/dist/components/collections/table/column-visibility.js.map +1 -1
- package/dist/components/forms/checkbox.js +4 -12
- package/dist/components/forms/checkbox.js.map +1 -1
- package/dist/components/forms/date-input/clipboard.js +74 -5
- package/dist/components/forms/date-input/clipboard.js.map +1 -1
- package/dist/components/forms/date-input/date-input.js +24 -5
- package/dist/components/forms/date-input/date-input.js.map +1 -1
- package/dist/components/forms/date-input/segment-group.js +26 -5
- package/dist/components/forms/date-input/segment-group.js.map +1 -1
- package/dist/components/forms/date-input/segments.js +203 -20
- package/dist/components/forms/date-input/segments.js.map +1 -1
- package/dist/components/forms/date-input.js +1 -1
- package/dist/components/forms/date-picker/date-picker.js +76 -11
- package/dist/components/forms/date-picker/date-picker.js.map +1 -1
- package/dist/components/forms/date-picker/end-content.js +1 -3
- package/dist/components/forms/date-picker/end-content.js.map +1 -1
- package/dist/components/forms/date-picker/value.js +44 -6
- package/dist/components/forms/date-picker/value.js.map +1 -1
- package/dist/components/forms/field.js +8 -19
- package/dist/components/forms/field.js.map +1 -1
- package/dist/components/forms/form.js +11 -27
- package/dist/components/forms/form.js.map +1 -1
- package/dist/components/forms/index.js +3 -3
- package/dist/components/forms/input-otp.js +10 -26
- package/dist/components/forms/input-otp.js.map +1 -1
- package/dist/components/forms/input.js +9 -22
- package/dist/components/forms/input.js.map +1 -1
- package/dist/components/forms/native-select.js +5 -12
- package/dist/components/forms/native-select.js.map +1 -1
- package/dist/components/forms/radio.js +4 -12
- package/dist/components/forms/radio.js.map +1 -1
- package/dist/components/forms/textarea.js +6 -17
- package/dist/components/forms/textarea.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +18 -2
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/notifications/index.js +1 -1
- package/dist/components/overlays/overlay.js +8 -21
- package/dist/components/overlays/overlay.js.map +1 -1
- package/dist/components/utilities/avatar.js +3 -7
- package/dist/components/utilities/avatar.js.map +1 -1
- package/dist/components/utilities/collapsible.js +47 -3
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/forms.js +3 -3
- package/dist/index.js +4 -4
- package/dist/{manager-jDaRVZ5o.js → manager-Dge4r8Vn.js} +9 -19
- package/dist/manager-Dge4r8Vn.js.map +1 -0
- package/dist/notifications.js +1 -1
- package/dist/services/notifications.js +1 -1
- package/dist/test-support.js +400 -365
- package/dist/test-support.js.map +1 -1
- package/dist/utils/forms-utils-index.js +1 -1
- package/dist/utils/forms-utils-index.js.map +1 -1
- package/dist/utils/nested-data.js +28 -1
- package/dist/utils/nested-data.js.map +1 -1
- package/package.json +10 -10
- package/dist/manager-jDaRVZ5o.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Part, Segment, SegmentType } from './types';
|
|
1
|
+
import type { HourCycle, Part, Segment, SegmentType, TimeOptions } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* The format an editable field uses when the consumer supplies none.
|
|
4
4
|
* Deliberately not `{ dateStyle: 'medium' }` -- DatePicker's button default --
|
|
@@ -12,7 +12,12 @@ declare const BOUNDS: Record<SegmentType, {
|
|
|
12
12
|
placeholder: string;
|
|
13
13
|
}>;
|
|
14
14
|
declare function isSegment(part: Part): part is Segment;
|
|
15
|
-
declare function emptySegment(type: SegmentType): Segment;
|
|
15
|
+
declare function emptySegment(type: SegmentType, overrides?: Partial<Segment>): Segment;
|
|
16
|
+
/**
|
|
17
|
+
* The format the segments are built from: the date format, plus the time
|
|
18
|
+
* fields a granularity asks for. Seconds are out of scope.
|
|
19
|
+
*/
|
|
20
|
+
declare function withTime(format: Intl.DateTimeFormatOptions, { granularity, hourCycle }: TimeOptions): Intl.DateTimeFormatOptions;
|
|
16
21
|
/**
|
|
17
22
|
* Derives the segments and their separators from the locale, so `mm/dd/yyyy`,
|
|
18
23
|
* `dd/mm/yyyy` and `yyyy年mm月dd日` all fall out of `Intl` rather than being
|
|
@@ -22,7 +27,7 @@ declare function emptySegment(type: SegmentType): Segment;
|
|
|
22
27
|
* representation, so that part becomes a numeric month segment anyway. The
|
|
23
28
|
* component warns; this function stays pure.
|
|
24
29
|
*/
|
|
25
|
-
declare function buildParts(locale: string, formatOptions?: Intl.DateTimeFormatOptions): Part[];
|
|
30
|
+
declare function buildParts(locale: string, formatOptions?: Intl.DateTimeFormatOptions, time?: TimeOptions): Part[];
|
|
26
31
|
/**
|
|
27
32
|
* A bare `yy` resolves into the hundred years running from 80 back to 19
|
|
28
33
|
* forward -- so a birth date reaches the past while a card expiry reaches the
|
|
@@ -59,10 +64,23 @@ declare function commitSegment(segment: Segment): Segment;
|
|
|
59
64
|
* here rather than restating the padding and risking the two drifting.
|
|
60
65
|
*/
|
|
61
66
|
declare function withValue(segment: Segment, value: number): Segment;
|
|
67
|
+
/**
|
|
68
|
+
* Types into a textual segment: a letter picks the first label starting with
|
|
69
|
+
* it, so `a` and `p` set AM and PM in English. A letter that starts no label
|
|
70
|
+
* is ignored, and the segment is finished either way it is set.
|
|
71
|
+
*/
|
|
72
|
+
declare function applyLetter(segment: Segment, key: string): {
|
|
73
|
+
segment: Segment;
|
|
74
|
+
isFull: boolean;
|
|
75
|
+
};
|
|
62
76
|
/** Clears both the value and the digits behind it. */
|
|
63
77
|
declare function clearSegment(segment: Segment): Segment;
|
|
64
78
|
/** Drops the last digit typed, for Backspace. */
|
|
65
79
|
declare function deleteDigit(segment: Segment): Segment;
|
|
80
|
+
/** A 0-23 hour as the given cycle counts it. */
|
|
81
|
+
declare function hourOnCycle(hours: number, cycle: HourCycle): number;
|
|
82
|
+
/** The 0-23 hour an hour segment and an AM/PM (0 or 1) stand for. */
|
|
83
|
+
declare function hourOfDay(hour: number, cycle: HourCycle, dayPeriod: number): number;
|
|
66
84
|
/**
|
|
67
85
|
* Arrow and page keys. An empty segment does not step from zero -- it adopts
|
|
68
86
|
* `placeholderValue`, so ArrowUp on a blank year offers this year rather than
|
|
@@ -84,6 +102,14 @@ declare function displaySegment(segment: Segment): string;
|
|
|
84
102
|
declare function findSegment(parts: Part[], type: SegmentType): Segment | undefined;
|
|
85
103
|
/** Days in a month, via the zeroth day of the next one. */
|
|
86
104
|
declare function daysInMonth(year: number, month: number): number;
|
|
105
|
+
/**
|
|
106
|
+
* The time the time segments hold, as a 0-23 hour and a minute; midnight when
|
|
107
|
+
* there are none, and `null` while any of them is empty or still being typed.
|
|
108
|
+
*/
|
|
109
|
+
declare function timeOf(parts: Part[]): {
|
|
110
|
+
hours: number;
|
|
111
|
+
minutes: number;
|
|
112
|
+
} | null;
|
|
87
113
|
/**
|
|
88
114
|
* The composed value, or `null` while any segment is still empty or still
|
|
89
115
|
* being typed. The day is clamped to the chosen month's real length: a 31 left
|
|
@@ -133,5 +159,5 @@ declare function resolveSegmentFormat(given: Intl.DateTimeFormatOptions | undefi
|
|
|
133
159
|
declare function hasDateChanged(before: Date | null, after: Date | null): boolean;
|
|
134
160
|
/** Writes a value across the segments, leaving literals untouched. */
|
|
135
161
|
declare function fromDate(parts: Part[], date: Date | null): Part[];
|
|
136
|
-
export { buildParts, isSegment, emptySegment, DEFAULT_FORMAT, BOUNDS, applyDigit, commitSegment, clearSegment, deleteDigit, step, toDate, fromDate, findSegment, resolveTwoDigitYear, daysInMonth, displaySegment, withValue, carryOver, hasTextualMonth, toNumericFormat, resolveSegmentFormat, hasDateChanged };
|
|
162
|
+
export { buildParts, withTime, applyLetter, timeOf, hourOnCycle, hourOfDay, isSegment, emptySegment, DEFAULT_FORMAT, BOUNDS, applyDigit, commitSegment, clearSegment, deleteDigit, step, toDate, fromDate, findSegment, resolveTwoDigitYear, daysInMonth, displaySegment, withValue, carryOver, hasTextualMonth, toNumericFormat, resolveSegmentFormat, hasDateChanged };
|
|
137
163
|
//# sourceMappingURL=segments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/segments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,IAAI,EACJ,OAAO,EACP,WAAW,EACX,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,IAAI,CAAC,qBAI1B,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAAM,CAClB,WAAW,EACX;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAA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AAC,qBAAqB,CAG5B;AAED;;;;;;;GAOG;AACH,iBAAS,oBAAoB,CAC3B,KAAK,EAAE,IAAI,CAAC,qBAAqB,GAAG,SAAS,EAC7C,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GACvC,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAMxC;AAED,uEAAuE;AACvE,iBAAS,cAAc,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAGxE;AAED,sEAAsE;AACtE,iBAAS,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,CAO1D;AAED,OAAO,EACL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,MAAM,EACN,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,MAAM,EACN,UAAU,EACV,aAAa,EACb,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,SAAS,EACT,SAAS,EACT,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,cAAc,EACf,CAAC"}
|
|
@@ -22,8 +22,25 @@ interface SegmentGroupClasses {
|
|
|
22
22
|
}
|
|
23
23
|
/** The consumer overrides for those same three slots. */
|
|
24
24
|
type SegmentGroupUserClasses = SlotsToClasses<'group' | 'segment' | 'literal'>;
|
|
25
|
-
/**
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The editable units. The time ones appear only under an `hour` or `minute`
|
|
27
|
+
* {@link Granularity}; `dayPeriod` (AM/PM) only on a 12-hour cycle.
|
|
28
|
+
*/
|
|
29
|
+
type SegmentType = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'dayPeriod';
|
|
30
|
+
/** The smallest unit a field edits. `day` has no time segments at all. */
|
|
31
|
+
type Granularity = 'day' | 'hour' | 'minute';
|
|
32
|
+
/**
|
|
33
|
+
* How the hour segment counts, as `Intl` resolves it: `h11` runs 0-11 and
|
|
34
|
+
* `h12` 1-12 (both with AM/PM), `h23` runs 0-23 and `h24` 1-24.
|
|
35
|
+
*/
|
|
36
|
+
type HourCycle = 'h11' | 'h12' | 'h23' | 'h24';
|
|
37
|
+
/** What {@link buildParts} adds to the date segments. */
|
|
38
|
+
interface TimeOptions {
|
|
39
|
+
/** @defaultValue 'day' */
|
|
40
|
+
granularity?: Granularity;
|
|
41
|
+
/** Forces a 12- or 24-hour clock. @defaultValue the locale's */
|
|
42
|
+
hourCycle?: 12 | 24;
|
|
43
|
+
}
|
|
27
44
|
interface Segment {
|
|
28
45
|
kind: 'segment';
|
|
29
46
|
type: SegmentType;
|
|
@@ -49,16 +66,36 @@ interface Segment {
|
|
|
49
66
|
width: number;
|
|
50
67
|
/** Rendered when `value` is null: 'mm', 'dd', 'yyyy'. */
|
|
51
68
|
placeholder: string;
|
|
69
|
+
/**
|
|
70
|
+
* A textual segment's names, indexed by `value`: the locale's AM and PM for
|
|
71
|
+
* `dayPeriod`. A segment with labels is typed by letter, not by digit, and
|
|
72
|
+
* shows its label rather than its number.
|
|
73
|
+
*/
|
|
74
|
+
labels?: string[];
|
|
75
|
+
/** The hour segment's cycle, which its bounds and its value depend on. */
|
|
76
|
+
hourCycle?: HourCycle;
|
|
52
77
|
}
|
|
53
78
|
interface LiteralPart {
|
|
54
79
|
kind: 'literal';
|
|
55
80
|
text: string;
|
|
56
81
|
}
|
|
57
82
|
type Part = Segment | LiteralPart;
|
|
83
|
+
/**
|
|
84
|
+
* Every text the field renders itself. Override any of them with `@labels`,
|
|
85
|
+
* e.g. to translate them; the rest keep these English defaults. The
|
|
86
|
+
* segments' names are `@segmentLabels`.
|
|
87
|
+
*/
|
|
88
|
+
interface DateInputLabels {
|
|
89
|
+
/** Accessible name of the clear button (`@isClearable`). */
|
|
90
|
+
clear: string;
|
|
91
|
+
}
|
|
58
92
|
interface DateInputArgs extends FormControlSharedArgs {
|
|
59
93
|
/** The unique identifier for the control. */
|
|
60
94
|
id?: string;
|
|
61
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* The value submits under this name as `yyyy-MM-dd`, or as the local
|
|
97
|
+
* `yyyy-MM-ddTHH:mm` under an `hour` or `minute` granularity.
|
|
98
|
+
*/
|
|
62
99
|
name?: string;
|
|
63
100
|
/**
|
|
64
101
|
* A `Date`, or the same `yyyy-MM-dd` string this component writes to its
|
|
@@ -71,6 +108,19 @@ interface DateInputArgs extends FormControlSharedArgs {
|
|
|
71
108
|
* before form data exists.
|
|
72
109
|
*/
|
|
73
110
|
value?: Date | string | null;
|
|
111
|
+
/**
|
|
112
|
+
* The smallest unit the field edits. `hour` and `minute` add time segments
|
|
113
|
+
* after the date ones, in the locale's order.
|
|
114
|
+
*
|
|
115
|
+
* @defaultValue 'day'
|
|
116
|
+
*/
|
|
117
|
+
granularity?: Granularity;
|
|
118
|
+
/**
|
|
119
|
+
* Forces a 12- or 24-hour clock. A 12-hour one adds an AM/PM segment.
|
|
120
|
+
*
|
|
121
|
+
* @defaultValue the locale's
|
|
122
|
+
*/
|
|
123
|
+
hourCycle?: 12 | 24;
|
|
74
124
|
/** Seeds the value before any `@value` is supplied. */
|
|
75
125
|
defaultValue?: Date | string | null;
|
|
76
126
|
/**
|
|
@@ -124,11 +174,16 @@ interface DateInputArgs extends FormControlSharedArgs {
|
|
|
124
174
|
/**
|
|
125
175
|
* The accessible names of the segments, for localizing them.
|
|
126
176
|
*
|
|
127
|
-
* @defaultValue { year: 'year', month: 'month', day: 'day' }
|
|
177
|
+
* @defaultValue { year: 'year', month: 'month', day: 'day', hour: 'hour', minute: 'minute', dayPeriod: 'AM/PM' }
|
|
128
178
|
*/
|
|
129
179
|
segmentLabels?: Partial<Record<SegmentType, string>>;
|
|
180
|
+
/**
|
|
181
|
+
* Replaces any of the texts the field renders, e.g. to translate them.
|
|
182
|
+
* Anything left out keeps its English default; see `DateInputLabels`.
|
|
183
|
+
*/
|
|
184
|
+
labels?: Partial<DateInputLabels>;
|
|
130
185
|
/** Per-slot class overrides. */
|
|
131
186
|
classes?: SlotsToClasses<DateInputSlots>;
|
|
132
187
|
}
|
|
133
|
-
export type { SegmentType, SegmentSlotFn, SegmentGroupClasses, SegmentGroupUserClasses, Segment, LiteralPart, Part, DateInputArgs, DateInputClasses };
|
|
188
|
+
export type { DateInputLabels, SegmentType, Granularity, HourCycle, TimeOptions, SegmentSlotFn, SegmentGroupClasses, SegmentGroupUserClasses, Segment, LiteralPart, Part, DateInputArgs, DateInputClasses };
|
|
134
189
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,wEAAwE;AACxE,KAAK,gBAAgB,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAE9E,iFAAiF;AACjF,KAAK,aAAa,GAAG,CAAC,KAAK,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,KAAK,MAAM,CAAC;AAEhE;;;;;;;;GAQG;AACH,UAAU,mBAAmB;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,yDAAyD;AACzD,KAAK,uBAAuB,GAAG,cAAc,CAAC,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/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AoE;IACpE,gBAAgB,CAAC,EAAE,IAAI,CAAC;IAExB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IAE5C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAE/B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAErD;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAElC,gCAAgC;IAChC,OAAO,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC1C;AAED,YAAY,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACX,SAAS,EACT,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EACvB,OAAO,EACP,WAAW,EACX,IAAI,EACJ,aAAa,EACb,gBAAgB,EACjB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { ControlBlurTracker } from '../../../-private/control-blur';
|
|
3
3
|
import type { CalendarMode, CalendarValue } from '../../collections/calendar/types';
|
|
4
|
-
import type { Part } from '../date-input/types';
|
|
4
|
+
import type { Part, TimeOptions } from '../date-input/types';
|
|
5
5
|
import type { DatePickerArgs, DatePickerValueBlockArg, DatePickerCalendarArgs, DatePickerFooterArg } from './types';
|
|
6
6
|
interface DatePickerSignature<M extends CalendarMode = 'single'> {
|
|
7
7
|
Args: DatePickerArgs<M>;
|
|
@@ -71,7 +71,12 @@ declare class DatePicker<M extends CalendarMode = 'single'> extends Component<Da
|
|
|
71
71
|
*/
|
|
72
72
|
get segmentFormat(): Intl.DateTimeFormatOptions | undefined;
|
|
73
73
|
get placeholderValue(): Date;
|
|
74
|
+
/** The time segments the field adds to the date, if any. */
|
|
75
|
+
get timeOptions(): TimeOptions;
|
|
76
|
+
get hasTime(): boolean;
|
|
74
77
|
get mode(): M;
|
|
78
|
+
get clearLabel(): string;
|
|
79
|
+
get calendarButtonLabel(): string;
|
|
75
80
|
get locale(): string;
|
|
76
81
|
/**
|
|
77
82
|
* The rendered value is always internal state, never a read-through to
|
|
@@ -106,7 +111,7 @@ declare class DatePicker<M extends CalendarMode = 'single'> extends Component<Da
|
|
|
106
111
|
*/
|
|
107
112
|
syncSegmentFormat: import("ember-modifier").FunctionBasedModifier<{
|
|
108
113
|
Args: {
|
|
109
|
-
Positional: [string, Intl.DateTimeFormatOptions | undefined];
|
|
114
|
+
Positional: [string, Intl.DateTimeFormatOptions | undefined, TimeOptions];
|
|
110
115
|
Named: import("ember-modifier/-private/signature").EmptyObject;
|
|
111
116
|
};
|
|
112
117
|
Element: HTMLDivElement;
|
|
@@ -178,6 +183,18 @@ declare class DatePicker<M extends CalendarMode = 'single'> extends Component<Da
|
|
|
178
183
|
*/
|
|
179
184
|
private commitValue;
|
|
180
185
|
handleChange: (value: CalendarValue<M>) => void;
|
|
186
|
+
/**
|
|
187
|
+
* A day picked in the calendar. The calendar knows days only, so under an
|
|
188
|
+
* `hour` or `minute` granularity the pick takes the time the field already
|
|
189
|
+
* shows -- each end of a range its own -- or midnight when there is none.
|
|
190
|
+
*/
|
|
191
|
+
handleCalendarChange: (value: CalendarValue<M>) => void;
|
|
192
|
+
/**
|
|
193
|
+
* The time one end of the field holds: what its segments show -- typed in
|
|
194
|
+
* even before any day was -- or, on the button trigger, which has no
|
|
195
|
+
* segments, the current value's. Midnight when there is none.
|
|
196
|
+
*/
|
|
197
|
+
private timeAt;
|
|
181
198
|
/**
|
|
182
199
|
* Whether an incoming value differs from what the segments already compose.
|
|
183
200
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/date-picker.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/date-picker.gts"],"names":[],"mappings":"AA4/BA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAsB3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAWpE,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EAEd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EACV,cAAc,EAEd,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAWjB,UAAU,mBAAmB,CAAC,CAAC,SAAS,YAAY,GAAG,QAAQ;IAC7D,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE;QACN,KAAK,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,QAAQ,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;KAClC,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,cAAM,UAAU,CAAC,CAAC,SAAS,YAAY,GAAG,QAAQ,CAAE,SAAQ,SAAS,CACnE,mBAAmB,CAAC,CAAC,CAAC,CACvB;;IACC,UAAU,mDAA4B;IACtC,YAAY,6CAAsB;IAElC;;;;;;OAMG;IACM,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAQ;IAE9C,MAAM,UAAS;IAExB;;;;;;OAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOV;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;OAIG;IACH,IAAI,uBAAuB,IAAI,MAAM,GAAG,MAAM,CAI7C;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,cAAc,IAAI,MAAM,CAK3B;IAED,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED,IACI,gBAAgB,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAiBhD;IAED,IACI,cAAc,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAU3C;CAsSF;AAED,OAAO,EAAE,UAAU,EAAE,KAAK,mBAAmB,EAAE,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -24,7 +24,9 @@ interface DatePickerEndContentSignature {
|
|
|
24
24
|
Element: HTMLElement;
|
|
25
25
|
}>;
|
|
26
26
|
/** Names the calendar button, which has no text of its own. */
|
|
27
|
-
|
|
27
|
+
calendarButtonLabel: string;
|
|
28
|
+
/** Names the clear button. */
|
|
29
|
+
clearLabel: string;
|
|
28
30
|
isDisabled?: boolean;
|
|
29
31
|
/**
|
|
30
32
|
* Defaults to `none` so clicks fall through to the trigger; content that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"end-content.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/end-content.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"end-content.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/end-content.gts"],"names":[],"mappings":"AAqHA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAIjD,UAAU,6BAA6B;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,iBAAiB,CAAC;QAC3B,WAAW,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;QAC9C,WAAW,EAAE,OAAO,CAAC;QACrB,OAAO,EAAE,MAAM,IAAI,CAAC;QAEpB;;;;;WAKG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;;;WAIG;QACH,OAAO,EAAE,YAAY,CAAC;YAAE,OAAO,EAAE,WAAW,CAAA;SAAE,CAAC,CAAC;QAEhD,+DAA+D;QAC/D,mBAAmB,EAAE,MAAM,CAAC;QAC5B,8BAA8B;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;;;;;;;WAQG;QACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC3C,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,oBAAoB,EAAE,GAAG,CAAC,6BAA6B,CA0E3D,CAAC;AAEH,OAAO,EAAE,oBAAoB,EAAE,KAAK,6BAA6B,EAAE,CAAC"}
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import type { DatePickerSlots, DatePickerVariants, SlotsToClasses, useStyles } from '@frontile/theme';
|
|
2
2
|
import type { PopoverSignature, ContentSignature } from '../../overlays/popover';
|
|
3
3
|
import type { CalendarArgs } from '../../collections/calendar/calendar';
|
|
4
|
-
import type { CalendarMode, CalendarValue, DateRange, WeekDay } from '../../collections/calendar/types';
|
|
4
|
+
import type { CalendarLabels, CalendarMode, CalendarValue, DateRange, WeekDay } from '../../collections/calendar/types';
|
|
5
5
|
import type { FormControlSharedArgs } from '../form-control';
|
|
6
6
|
import type { DatePickerInput, DatePickerRangeInput } from './value';
|
|
7
|
-
import type { SegmentType } from '../date-input/types';
|
|
7
|
+
import type { Granularity, SegmentType } from '../date-input/types';
|
|
8
|
+
/**
|
|
9
|
+
* Every text the picker renders itself, its calendar's included. Override any
|
|
10
|
+
* of them with `@labels`, e.g. to translate them; the rest keep their English
|
|
11
|
+
* defaults. The segments' names are `@segmentLabels`.
|
|
12
|
+
*/
|
|
13
|
+
interface DatePickerLabels extends CalendarLabels {
|
|
14
|
+
/** Accessible name of the clear button (`@isClearable`). */
|
|
15
|
+
clear: string;
|
|
16
|
+
/**
|
|
17
|
+
* Accessible name of the calendar button on a segmented field, given the
|
|
18
|
+
* field's `@label` when it has one. A function, because some languages put
|
|
19
|
+
* the label elsewhere in the sentence.
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue (label) => label ? `Choose date, ${label}` : 'Choose date'
|
|
22
|
+
*/
|
|
23
|
+
chooseDate: (label: string | undefined) => string;
|
|
24
|
+
}
|
|
8
25
|
interface BaseDatePickerArgs extends Pick<CalendarArgs, 'color' | 'minValue' | 'maxValue' | 'isDateUnavailable' | 'locale' | 'weekStartsOn' | 'visibleMonths' | 'captionLayout' | 'fixedWeeks' | 'showOutsideDays' | 'isReadOnly'>, Pick<PopoverSignature['Args'], 'placement' | 'flipOptions' | 'shiftOptions' | 'offsetOptions' | 'strategy' | 'didClose'>, Pick<ContentSignature['Args'], 'renderInPlace' | 'target' | 'closeOnOutsideClick' | 'closeOnEscapeKey' | 'transitionDuration' | 'disableTransitions'>, FormControlSharedArgs {
|
|
9
26
|
/** The unique identifier for the control. */
|
|
10
27
|
id?: string;
|
|
@@ -45,9 +62,23 @@ interface BaseDatePickerArgs extends Pick<CalendarArgs, 'color' | 'minValue' | '
|
|
|
45
62
|
/**
|
|
46
63
|
* How the value is rendered in the trigger. Localized with `@locale`.
|
|
47
64
|
*
|
|
48
|
-
* @defaultValue { dateStyle: 'medium' }
|
|
65
|
+
* @defaultValue { dateStyle: 'medium' }, plus `timeStyle: 'short'` under an `hour` or `minute` granularity
|
|
49
66
|
*/
|
|
50
67
|
formatOptions?: Intl.DateTimeFormatOptions;
|
|
68
|
+
/**
|
|
69
|
+
* The smallest unit the field edits. `hour` and `minute` add time segments
|
|
70
|
+
* after the date ones; picking a day in the calendar keeps the time already
|
|
71
|
+
* entered, or starts at midnight.
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue 'day'
|
|
74
|
+
*/
|
|
75
|
+
granularity?: Granularity;
|
|
76
|
+
/**
|
|
77
|
+
* Forces a 12- or 24-hour clock. A 12-hour one adds an AM/PM segment.
|
|
78
|
+
*
|
|
79
|
+
* @defaultValue the locale's
|
|
80
|
+
*/
|
|
81
|
+
hourCycle?: 12 | 24;
|
|
51
82
|
/** The size of the field. Matches Select's `@inputSize`. */
|
|
52
83
|
inputSize?: DatePickerVariants['size'];
|
|
53
84
|
/**
|
|
@@ -83,6 +114,12 @@ interface BaseDatePickerArgs extends Pick<CalendarArgs, 'color' | 'minValue' | '
|
|
|
83
114
|
endContentPointerEvents?: 'none' | 'auto';
|
|
84
115
|
/** Fires when focus leaves the trigger *and* the popover. */
|
|
85
116
|
onBlur?: () => void;
|
|
117
|
+
/**
|
|
118
|
+
* Replaces any of the texts the picker and its calendar render, e.g. to
|
|
119
|
+
* translate them. Anything left out keeps its English default; see
|
|
120
|
+
* `DatePickerLabels`.
|
|
121
|
+
*/
|
|
122
|
+
labels?: Partial<DatePickerLabels>;
|
|
86
123
|
classes?: SlotsToClasses<DatePickerSlots>;
|
|
87
124
|
}
|
|
88
125
|
interface SingleDatePickerArgs extends BaseDatePickerArgs {
|
|
@@ -163,6 +200,7 @@ interface DatePickerCalendarArgs<M extends CalendarMode = 'single'> {
|
|
|
163
200
|
isDateUnavailable?: (date: Date) => boolean;
|
|
164
201
|
visibleMonths?: number;
|
|
165
202
|
captionLayout?: 'label' | 'dropdown';
|
|
203
|
+
labels?: Partial<CalendarLabels>;
|
|
166
204
|
labelledBy?: string;
|
|
167
205
|
autofocus: boolean;
|
|
168
206
|
}
|
|
@@ -175,5 +213,5 @@ interface DatePickerFooterArg<M extends CalendarMode = 'single'> {
|
|
|
175
213
|
value: CalendarValue<M> | null;
|
|
176
214
|
isOpen: boolean;
|
|
177
215
|
}
|
|
178
|
-
export type { DatePickerArgs, SingleDatePickerArgs, RangeDatePickerArgs, DatePickerValueBlockArg, DatePickerCalendarArgs, DatePickerFooterArg, DatePickerClasses };
|
|
216
|
+
export type { DatePickerArgs, DatePickerLabels, SingleDatePickerArgs, RangeDatePickerArgs, DatePickerValueBlockArg, DatePickerCalendarArgs, DatePickerFooterArg, DatePickerClasses };
|
|
179
217
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,OAAO,EACR,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EAC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IACvB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,uEAAuE;AACvE,UAAU,mBAAmB,CAAC,CAAC,SAAS,YAAY,GAAG,QAAQ;IAC7D,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC5C,2DAA2D;IAC3D,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,YAAY,EACV,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EAClB,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Granularity } from '../date-input/types';
|
|
1
2
|
import type { CalendarMode, CalendarValue, DateRange } from '../../collections/calendar/types';
|
|
2
3
|
/**
|
|
3
|
-
* A date as accepted from a consumer: a `Date`, or the same `yyyy-MM-dd`
|
|
4
|
-
* string this component writes to its
|
|
4
|
+
* A date as accepted from a consumer: a `Date`, or the same `yyyy-MM-dd` (or,
|
|
5
|
+
* with a time, local `yyyy-MM-ddTHH:mm`) string this component writes to its
|
|
6
|
+
* hidden inputs.
|
|
5
7
|
*
|
|
6
8
|
* Strings are accepted because `Field` feeds form data — which is always
|
|
7
9
|
* strings — straight back into `@value`. It also means a value hydrated from
|
|
@@ -28,8 +30,22 @@ declare function parseDate(value: DatePickerInput | null | undefined): Date | nu
|
|
|
28
30
|
* and the trigger must still show the anchor.
|
|
29
31
|
*/
|
|
30
32
|
declare function parseRange(value: DatePickerRangeInput | null | undefined): DateRange | null;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The value as it is submitted: `yyyy-MM-dd` from local calendar fields, and
|
|
35
|
+
* under an `hour` or `minute` granularity the local `yyyy-MM-ddTHH:mm` that
|
|
36
|
+
* `datetime-local` uses too.
|
|
37
|
+
*/
|
|
38
|
+
declare function toWire(date: Date | null | undefined, granularity?: Granularity): string;
|
|
39
|
+
/**
|
|
40
|
+
* Copies the wall-clock time of `from` onto the day of `day`. Picking a day in
|
|
41
|
+
* the calendar keeps the time the field already holds.
|
|
42
|
+
*/
|
|
43
|
+
declare function withTimeOf(day: Date, from: {
|
|
44
|
+
hours: number;
|
|
45
|
+
minutes: number;
|
|
46
|
+
}): Date;
|
|
47
|
+
/** The button trigger's default once the value carries a time. */
|
|
48
|
+
declare const DEFAULT_TIME_FORMAT: Intl.DateTimeFormatOptions;
|
|
33
49
|
/**
|
|
34
50
|
* The trigger's text for a value in either mode. An en dash (not a hyphen)
|
|
35
51
|
* joins a range, matching how date ranges are set in running text.
|
|
@@ -40,5 +56,5 @@ declare function formatValue<M extends CalendarMode>(value: CalendarValue<M> | n
|
|
|
40
56
|
* empty — its start is already chosen and must be visible.
|
|
41
57
|
*/
|
|
42
58
|
declare function isEmptyValue(value: unknown): boolean;
|
|
43
|
-
export { parseDate, parseRange, toWire, formatValue, isEmptyValue, type DatePickerInput, type DatePickerRangeInput };
|
|
59
|
+
export { parseDate, parseRange, toWire, withTimeOf, DEFAULT_TIME_FORMAT, formatValue, isEmptyValue, type DatePickerInput, type DatePickerRangeInput };
|
|
44
60
|
//# sourceMappingURL=value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACV,MAAM,kCAAkC,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/date-picker/value.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACV,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;GASG;AACH,KAAK,eAAe,GAAG,IAAI,GAAG,MAAM,CAAC;AAErC,UAAU,oBAAoB;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,GAAG,EAAE,eAAe,GAAG,IAAI,CAAC;CAC7B;AAcD;;;;;;;GAOG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAqBzE;AAED;;;;GAIG;AACH,iBAAS,UAAU,CACjB,KAAK,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,GAC7C,SAAS,GAAG,IAAI,CASlB;AAED;;;;GAIG;AACH,iBAAS,MAAM,CACb,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EAC7B,WAAW,GAAE,WAAmB,GAC/B,MAAM,CAKR;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI7E;AAID,kEAAkE;AAClE,QAAA,MAAM,mBAAmB,EAAE,IAAI,CAAC,qBAG/B,CAAC;AAqBF;;;GAGG;AACH,iBAAS,WAAW,CAAC,CAAC,SAAS,YAAY,EACzC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,EAC1C,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,GACnC,MAAM,CAcR;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAK7C;AAED,OAAO,EACL,SAAS,EACT,UAAU,EACV,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,CAAC"}
|
|
@@ -70,9 +70,8 @@ declare class Field<T extends Record<string, unknown> = FormDataCompiled> extend
|
|
|
70
70
|
/**
|
|
71
71
|
* Returns the current value for the field from formData.
|
|
72
72
|
* Supports both flat and dotted field names (e.g., 'email' or 'profile.email').
|
|
73
|
-
* Uses Ember's get() which handles both flat keys and dotted paths.
|
|
74
73
|
*/
|
|
75
|
-
get fieldValue():
|
|
74
|
+
get fieldValue(): unknown;
|
|
76
75
|
/**
|
|
77
76
|
* Validates the field by calling the validateField function passed in args.
|
|
78
77
|
*/
|
|
@@ -80,16 +79,16 @@ declare class Field<T extends Record<string, unknown> = FormDataCompiled> extend
|
|
|
80
79
|
/**
|
|
81
80
|
* Validates the field on change if change validation is enabled.
|
|
82
81
|
*/
|
|
83
|
-
handleChange()
|
|
82
|
+
handleChange: () => void;
|
|
84
83
|
/**
|
|
85
84
|
* Validates the field on input if input validation is enabled.
|
|
86
85
|
* Debounces validation to avoid excessive validation calls on every keystroke.
|
|
87
86
|
*/
|
|
88
|
-
handleInput()
|
|
87
|
+
handleInput: () => void;
|
|
89
88
|
/**
|
|
90
89
|
* Validates the field on blur if blur validation is enabled.
|
|
91
90
|
*/
|
|
92
|
-
handleBlur()
|
|
91
|
+
handleBlur: () => void;
|
|
93
92
|
}
|
|
94
93
|
export { Field, type FieldSignature };
|
|
95
94
|
export default Field;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/forms/field.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ACH,aAAa;IAIb;;OAEG;IACH,YAAY,aAIV;IAEF;;;OAGG;IACH,WAAW,aAIT;IAEF;;OAEG;IACH,UAAU,aAIR;CAsBH;AAED,OAAO,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,CAAC;AACtC,eAAe,KAAK,CAAC"}
|
|
@@ -196,7 +196,7 @@ declare class Form<T = FormDataCompiled> extends Component<FormSignature<T>> {
|
|
|
196
196
|
* @param name - The name of the field to validate.
|
|
197
197
|
* @returns A promise that resolves to errors for the field, if any.
|
|
198
198
|
*/
|
|
199
|
-
validateField(data: T, name: string)
|
|
199
|
+
validateField: (data: T, name: string) => Promise<FormErrors | undefined>;
|
|
200
200
|
/**
|
|
201
201
|
* Computes which fields have changed from their initial values.
|
|
202
202
|
* Uses deep comparison for consistency across flat and nested structures.
|
|
@@ -219,27 +219,27 @@ declare class Form<T = FormDataCompiled> extends Component<FormSignature<T>> {
|
|
|
219
219
|
* Calls the `onChange` callback with the current form data if provided.
|
|
220
220
|
* Automatically unflattens dotted field names to nested structure.
|
|
221
221
|
*/
|
|
222
|
-
handleInput(event: Event)
|
|
222
|
+
handleInput: (event: Event) => void;
|
|
223
223
|
/**
|
|
224
224
|
* Handles the `submit` event on the form element.
|
|
225
225
|
* Prevents the default form submission and calls the `onSubmit` callback
|
|
226
226
|
* with the current form data. Manages the `isLoading` state during the
|
|
227
227
|
* submission process. Automatically unflattens dotted field names to nested structure.
|
|
228
228
|
*/
|
|
229
|
-
handleSubmit(event: SubmitEvent)
|
|
229
|
+
handleSubmit: (event: SubmitEvent) => Promise<void>;
|
|
230
230
|
/**
|
|
231
231
|
* Handles the `reset` event on the form element.
|
|
232
232
|
* Clears validation errors and dirty tracking.
|
|
233
233
|
* Restores the form data to its initial state.
|
|
234
234
|
* Calls `onChange` if the form is controlled to let parent update state.
|
|
235
235
|
*/
|
|
236
|
-
handleReset(event: Event)
|
|
236
|
+
handleReset: (event: Event) => void;
|
|
237
237
|
/**
|
|
238
238
|
* Resets the form to its initial state.
|
|
239
239
|
* This method calls the native form reset() to clear all form controls,
|
|
240
240
|
* triggering a `reset` event that is handled in `handleReset`.
|
|
241
241
|
*/
|
|
242
|
-
reset()
|
|
242
|
+
reset: () => void;
|
|
243
243
|
}
|
|
244
244
|
export { Form, type FormContext, type FormSignature, type FormDataCompiled, type FormResultData, type FormErrors };
|
|
245
245
|
export default Form;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/forms/form.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/forms/form.gts"],"names":[],"mappings":"AA4gBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAM3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAU,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,wCAAwC;AACxC,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AACpD,+DAA+D;AAC/D,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAEhE;;;GAGG;AACH,KAAK,cAAc,CAAC,CAAC,GAAG,gBAAgB,IAAI;IAC1C,wCAAwC;IACxC,IAAI,EAAE,CAAC,CAAC;IACR,iEAAiE;IACjE,OAAO,EAAE,OAAO,CAAC;IACjB,gEAAgE;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,MAAM,EAAE,UAAU,CAAC;IACnB;;;;OAIG;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AM,CAAC,EAAE,CAErD;IAED,yFAAyF;IACzF,IAAI,WAAW,IAAI,CAAC,GAAG,SAAS,CAK/B;IAED;;;;;;OAMG;IACG,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAcxD;;;;;;;;;OASG;IACH,aAAa,GACX,MAAM,CAAC,EACP,MAAM,MAAM,KACX,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAqBhC;IAEF;;;;;;;OAOG;IACH,kBAAkB,CAAC,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC;IA2BxC;;;;;;OAMG;IACH,mBAAmB,CAAC,IAAI,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IAa/C;;;;OAIG;IACH,WAAW,GAAI,OAAO,KAAK,UAUzB;IAEF;;;;;OAKG;IACH,YAAY,GAAU,OAAO,WAAW,mBA6BtC;IAEF;;;;;OAKG;IACH,WAAW,GAAI,OAAO,KAAK,UAiBzB;IAEF;;;;OAIG;IACH,KAAK,aAEH;CA2BH;AAuCD,OAAO,EACL,IAAI,EACJ,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
@@ -302,17 +302,17 @@ declare class InputOtp extends Component<InputOtpSignature> {
|
|
|
302
302
|
* it, and the parent never disagree about the value.
|
|
303
303
|
*/
|
|
304
304
|
syncValue(event: Event, notify: 'input' | 'change'): void;
|
|
305
|
-
handleOnInput(event: Event)
|
|
306
|
-
handleOnChange(event: Event)
|
|
305
|
+
handleOnInput: (event: Event) => void;
|
|
306
|
+
handleOnChange: (event: Event) => void;
|
|
307
307
|
/**
|
|
308
308
|
* Maps the input's text caret onto discrete cells. A collapsed caret sits
|
|
309
309
|
* between characters and so belongs to no cell; widening it to a
|
|
310
310
|
* one-character range makes exactly one cell active and makes typing
|
|
311
311
|
* overwrite rather than insert.
|
|
312
312
|
*/
|
|
313
|
-
onSelectionChange()
|
|
314
|
-
handleFocus()
|
|
315
|
-
handleOnBlur()
|
|
313
|
+
onSelectionChange: () => void;
|
|
314
|
+
handleFocus: () => void;
|
|
315
|
+
handleOnBlur: () => void;
|
|
316
316
|
}
|
|
317
317
|
export { InputOtp, type InputOtpSignature };
|
|
318
318
|
export default InputOtp;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/components/forms/input-otp.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/components/forms/input-otp.gts"],"names":[],"mappings":"AAkpBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAGzE;;;;GAIG;AACH,QAAA,MAAM,YAAY;;;;CAIR,CAAC;AAEX,KAAK,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;AAiB9C,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,IAAK,SAAQ,qBAAqB;IAC1C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,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