@ids-group-ltd/ids-design-system 0.15.3 → 1.0.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 +58 -4
- package/design-system.md +24 -0
- package/eslint/deprecated-api.json +14 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +3 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +217 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +17 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +13 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/migrations/0.15.1.json +4 -2
- package/migrations/0.15.3.json +14 -4
- package/migrations/1.0.0.json +41 -0
- package/migrations/1.0.1.json +36 -0
- package/package.json +1 -1
- package/schematics/check-overrides/surface.json +1 -1
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +23 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +2 -1
package/migrations/0.15.1.json
CHANGED
|
@@ -513,9 +513,11 @@
|
|
|
513
513
|
"button:disabled",
|
|
514
514
|
"button[disabled]",
|
|
515
515
|
"(click)=",
|
|
516
|
-
"[loading]=\"true\""
|
|
516
|
+
"[loading]=\"true\"",
|
|
517
|
+
"[disabled]=\"!can",
|
|
518
|
+
"[disabled]=\"!is"
|
|
517
519
|
],
|
|
518
|
-
"action": "Where a ds-button binds [disabled] to the same flag as [loading], remove that [disabled]. Where its [disabled] ORs that flag with other conditions (`[disabled]=\"busy() || invalid()\"` beside `[loading]=\"busy()\"`), remove the flag from the expression and keep the rest, provided the rest is false while the button loads. Where its [disabled] ANDs that flag with validity (`[disabled]=\"busy() && invalid()\"`), put the component's submit-attempt flag in place of the loading flag and keep the validity expression: `[disabled]=\"submitted() && invalid()\"`, with `submitted`, `submitAttempted`, `showValidation` or `showErrors` being a signal or field the submit handler sets. Where the component has no such flag, add one in its own state idiom (`submitted = signal(false)`), set it to true at the start of the submit or (pressed) handler, bind `[disabled]=\"submitted() && invalid()\"`, and when a submit fails validation move focus to the first invalid field. The loading flag never goes back into [disabled]. A ds-button that is loading for good (`[loading]=\"true\"`, a placeholder that never acts) keeps its [disabled], or gets one. Where a (click) bound on a loading ds-button starts work, guard the handler on the app's own busy flag, or move it to (pressed). Where a test or a stylesheet reads the native disabled state of a loading ds-button, read aria-disabled=\"true\" instead.",
|
|
520
|
+
"action": "Read a [disabled] bound to a computed signal or a method through to its body first: a loading flag inside it counts as the flag itself, and the cases that follow apply to the expression it expands to. Where a ds-button binds [disabled] to the same flag as [loading], remove that [disabled]. Where its [disabled] ORs that flag with other conditions (`[disabled]=\"busy() || invalid()\"` beside `[loading]=\"busy()\"`), remove the flag from the expression and keep the rest, provided the rest is false while the button loads. Where its [disabled] ANDs that flag with validity (`[disabled]=\"busy() && invalid()\"`), put the component's submit-attempt flag in place of the loading flag and keep the validity expression: `[disabled]=\"submitted() && invalid()\"`, with `submitted`, `submitAttempted`, `showValidation` or `showErrors` being a signal or field the submit handler sets. Where the component has no such flag, add one in its own state idiom (`submitted = signal(false)`), set it to true at the start of the submit or (pressed) handler, bind `[disabled]=\"submitted() && invalid()\"`, and when a submit fails validation move focus to the first invalid field. The loading flag never goes back into [disabled]. A ds-button that is loading for good (`[loading]=\"true\"`, a placeholder that never acts) keeps its [disabled], or gets one. Where a (click) bound on a loading ds-button starts work, guard the handler on the app's own busy flag, or move it to (pressed). Where a test or a stylesheet reads the native disabled state of a loading ds-button, read aria-disabled=\"true\" instead.",
|
|
519
521
|
"appliesWhen": "Every ds-button with loading set. A ds-button rendering a link ignores loading and is not affected, and a ds-button with disabled set keeps the native attribute unless it also has a disabledReason.",
|
|
520
522
|
"pitfall": "A [disabled] bound to the same flag as [loading], or to an expression that can be true while it is, still disables the button natively, so focus still falls to the page the moment the work starts. A `submitted() && invalid()` [disabled] disables the button natively the moment a submit fails validation, while the button holds focus, so focus falls to the page unless the handler moves it to the first invalid field. A ds-button with loading and no disabled is focusable and reached by Tab, so one that loads for good is a control that never acts. A focused loading ds-button turns Enter and Space into a click: the component calls preventDefault and withholds (pressed), but the click still bubbles to a (click) bound on the ds-button element and runs that handler again mid-work, where the native disabled of the previous release kept the button out of keyboard reach.",
|
|
521
523
|
"restore": null,
|
package/migrations/0.15.3.json
CHANGED
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"layout: 'auto'",
|
|
116
116
|
"<ds-table"
|
|
117
117
|
],
|
|
118
|
-
"action": "None, unless the app's tables must keep the 0.15.1 widths: set `provideDsConfig({ table: { layout: 'fixed' } })`, or `layout=\"fixed\"` on one `ds-table`.
|
|
119
|
-
"appliesWhen": "Every `ds-table` without its own `layout`, in an app whose `DsConfig.table.layout` is unset. Under `'auto'` each column follows its cell content as on 0.15.0: `kind` has no effect, and a numeric `width`, `width: 'content'`, `minWidth` and `truncate` size the column as on 0.15.0. A table with `virtualScroll` keeps `table-layout: fixed`. An app that already set `'auto'` sees no change.",
|
|
118
|
+
"action": "None, unless the app's tables must keep the 0.15.1 widths: set `provideDsConfig({ table: { layout: 'fixed' } })`, or `layout=\"fixed\"` on one `ds-table`.",
|
|
119
|
+
"appliesWhen": "Every `ds-table` without its own `layout`, in an app whose `DsConfig.table.layout` is unset, coming from 0.15.1 or 0.15.2; an app coming from 0.15.0 or earlier keeps the widths it had. Under `'auto'` each column follows its cell content as on 0.15.0: `kind` has no effect, and a numeric `width`, `width: 'content'`, `minWidth` and `truncate` size the column as on 0.15.0. A table with `virtualScroll` keeps `table-layout: fixed`. An app that already set `'auto'` sees no change.",
|
|
120
120
|
"pitfall": "A `kind` or `minWidth` added for 0.15.1 does nothing under `'auto'`, so a table tuned for `'fixed'` changes width without a build error; check it with the app's real rows. `'auto'` is still deprecated, and a development build warns once per page while a binding or config key sets it.",
|
|
121
121
|
"restore": "provideDsConfig({ table: { layout: 'fixed' } })",
|
|
122
122
|
"verify": "Without a `layout` anywhere, each `ds-table` shows the column widths it had on 0.15.0, and the console shows no `layout=\"auto\"` deprecation warning.",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"verify": "Open a ds-time-picker, scroll the hour column past its last hour and confirm the first hour follows, then reopen it and confirm the selected hour sits in the middle of the column."
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
|
-
"text": "`styles/ds` rings a focusable element the library does not render without giving it `--focus-ring-radius`: the ring follows the element's own `border-radius`, so an element of the app that declares none is no longer rounded while focused.
|
|
156
|
+
"text": "`styles/ds` rings a focusable element the library does not render without giving it `--focus-ring-radius`: the ring follows the element's own `border-radius`, so an element of the app that declares none is no longer rounded while focused.",
|
|
157
157
|
"verify": "Tab to a square element of the app that sets no border-radius and confirm it keeps square corners while focused, then tab to a ds-button and confirm its ring is still rounded."
|
|
158
158
|
},
|
|
159
159
|
{
|
|
@@ -169,7 +169,17 @@
|
|
|
169
169
|
"text": "A printed `ds-pagination` shows only its range label: its page buttons, ellipsis and page-size select are left out of the printout, inside a `ds-table` and on their own.",
|
|
170
170
|
"verify": "Open the browser's print preview of a page holding a ds-pagination and confirm only its range label is printed."
|
|
171
171
|
},
|
|
172
|
-
"A printed `ds-table` keeps its column names on every page, keeps each row on one page and leaves its own controls out of the printout: the pager buttons and page-size select, the column filter, resize and expand buttons and the controls it adds to its toolbar. The pager's range label still prints. Nothing to change in consumer code; `printAllRows` opts a client-paged table into printing every row."
|
|
172
|
+
"A printed `ds-table` keeps its column names on every page, keeps each row on one page and leaves its own controls out of the printout: the pager buttons and page-size select, the column filter, resize and expand buttons and the controls it adds to its toolbar. The pager's range label still prints. Nothing to change in consumer code; `printAllRows` opts a client-paged table into printing every row.",
|
|
173
|
+
{
|
|
174
|
+
"text": "`ds-table` takes `printHeading` and `printHeadingNote`: in print the table opens its header with a row holding the heading and the line under it, repeated with the header on every page. Both are hidden on screen; unset, the table prints as before.",
|
|
175
|
+
"verify": "Set printHeading and printHeadingNote on a ds-table of two printed pages, open the print preview and confirm both lines print above the column names on each page and do not show on screen."
|
|
176
|
+
},
|
|
177
|
+
"Every chart takes `highlightActive`, and `DsConfig.chart.highlightActive` sets it app-wide: `false` keeps the hovered or focused column, bar or heatmap cell at its own colour; unset falls back to the config, then `true`, which brightens it as before. An input on the element wins over the config.",
|
|
178
|
+
{
|
|
179
|
+
"text": "A column, bar or heatmap cell held by a click keeps its pin at its own colour once the pointer moves off it, and the mark under the pointer brightens instead; with nothing held, the hovered or focused mark brightens as before.",
|
|
180
|
+
"verify": "Click a bar of a ds-bar-chart to hold it, move the pointer to another bar and confirm the held bar is at its own colour and the hovered one brightens."
|
|
181
|
+
},
|
|
182
|
+
"Showing and hiding a tooltip, a chart tooltip, a modal, a confirm, a toast, a spinner, a skeleton or a loading overlay inserts and removes no stylesheet: the first instance keeps its sheet in the document for the life of the app."
|
|
173
183
|
],
|
|
174
184
|
"deleteList": []
|
|
175
185
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"items": [
|
|
4
|
+
{
|
|
5
|
+
"id": "time-picker-value-changes-while-scrolling",
|
|
6
|
+
"kind": "behavior",
|
|
7
|
+
"old": "ds-time-picker[valueChange]",
|
|
8
|
+
"new": null,
|
|
9
|
+
"surface": [
|
|
10
|
+
"template"
|
|
11
|
+
],
|
|
12
|
+
"searchHints": [
|
|
13
|
+
"(valueChange)",
|
|
14
|
+
"[(value)]",
|
|
15
|
+
"valueChanges"
|
|
16
|
+
],
|
|
17
|
+
"detect": [
|
|
18
|
+
"(valueChange)=",
|
|
19
|
+
"[(value)]="
|
|
20
|
+
],
|
|
21
|
+
"action": "Treat a `valueChange` of a `ds-time-picker` as provisional while its panel is open: a wheel, touch or scrollbar scroll over a column emits one for every cell that passes the centre. A handler that saves, requests or navigates on each emission moves that work to the form's submit or debounces it; the same holds for a subscription to the changes of a form control bound to the picker.",
|
|
22
|
+
"appliesWhen": "A `ds-time-picker` whose `valueChange`, `[(value)]` or bound form control drives a side effect: a save, a request, a navigation, an analytics event. A binding that only stores the value needs nothing.",
|
|
23
|
+
"pitfall": "A handler that saved on every emission now saves every hour the user scrolls past, not only the one the scroll stops on.",
|
|
24
|
+
"restore": null,
|
|
25
|
+
"verify": "Open the time picker, scroll the hour column across several hours with the wheel and confirm the side effect runs for the value kept, not once per hour passed.",
|
|
26
|
+
"note": "A scroll pick leaves the panel open and counts toward neither the hour nor the minute a single-mode panel waits for before it closes; a click or a key still does."
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"informational": [
|
|
30
|
+
{
|
|
31
|
+
"text": "Angular signal forms focusBoundControl() focuses a DS form control, `ds-search` included: `focus()` on the host element is routed to the control's own input or trigger. A workaround that queried `[aria-invalid=\"true\"]` and focused it by hand can go; it never reached `ds-radio-group` or `ds-segmented`, whose `aria-invalid` sits on the host.",
|
|
32
|
+
"verify": "Submit an invalid signal form with onInvalid: (field) => field().errorSummary()[0]?.fieldTree().focusBoundControl() and confirm document.activeElement is the first invalid field's input."
|
|
33
|
+
},
|
|
34
|
+
"`dsTooltipWhenClipped` writes the `tabindex` of a host clipped or unclipped by a resize in the next animation frame, so Firefox no longer reports \"ResizeObserver loop completed with undelivered notifications\" for hosts under `content-visibility: auto`. A global error handler that filtered that message out for this reason can go.",
|
|
35
|
+
{
|
|
36
|
+
"text": "Looping hour and minute columns of `ds-time-picker` render more copies of their cells, so a test that counts the `.opt` cells of a looping column inside its internal `ds-time-columns` element finds more of them.",
|
|
37
|
+
"verify": "Count the `.opt` cells of a looping hour column of an open time picker: nine sets of its hours."
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"deleteList": []
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.1",
|
|
3
|
+
"items": [
|
|
4
|
+
{
|
|
5
|
+
"id": "submitted-directive-removed",
|
|
6
|
+
"kind": "removed-api",
|
|
7
|
+
"old": "SubmittedDirective",
|
|
8
|
+
"new": null,
|
|
9
|
+
"surface": [
|
|
10
|
+
"template",
|
|
11
|
+
"typescript"
|
|
12
|
+
],
|
|
13
|
+
"searchHints": [
|
|
14
|
+
"dsSubmitted",
|
|
15
|
+
"SubmittedDirective",
|
|
16
|
+
"DS_SUBMITTED"
|
|
17
|
+
],
|
|
18
|
+
"detect": [
|
|
19
|
+
"[dsSubmitted]",
|
|
20
|
+
"SubmittedDirective",
|
|
21
|
+
"DS_SUBMITTED"
|
|
22
|
+
],
|
|
23
|
+
"action": "Delete every `[dsSubmitted]` binding, remove `SubmittedDirective` from component `imports`, and remove any `DS_SUBMITTED` provider. Validation errors show once a field is touched, with no flag.",
|
|
24
|
+
"appliesWhen": "Code written against 1.0.0 that uses `[dsSubmitted]`, `SubmittedDirective` or `DS_SUBMITTED`. Code upgrading from 0.15 has none of them.",
|
|
25
|
+
"restore": null,
|
|
26
|
+
"verify": "No `dsSubmitted`, `SubmittedDirective` or `DS_SUBMITTED` remains, and an invalid field shows its error after it is left."
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"informational": [
|
|
30
|
+
{
|
|
31
|
+
"text": "Validation errors of a DS field bound to a form model - `ds-input` and every other DS field - show once the field is touched, and the unparseable-date error of `ds-date-picker` shows on blur. `[touched]` is an input of every DS field.",
|
|
32
|
+
"verify": "Open a form with a required `ds-input` bound to a form control, leave it empty and blur it: the validation message shows under it and the input has aria-invalid=\"true\"; before the blur it shows none."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"deleteList": []
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -63,6 +63,13 @@ declare class TimeColumnsComponent {
|
|
|
63
63
|
private readonly minuteColumn;
|
|
64
64
|
private readonly hoursOverflow;
|
|
65
65
|
private readonly minutesOverflow;
|
|
66
|
+
protected readonly loopCopiesEachSide: number[];
|
|
67
|
+
private userPicked;
|
|
68
|
+
private pickingByScroll;
|
|
69
|
+
private readonly userScrolledColumns;
|
|
70
|
+
private readonly wheelSpeed;
|
|
71
|
+
private readonly wheelScrolls;
|
|
72
|
+
private readonly smoothScrolls;
|
|
66
73
|
protected readonly hoursLoop: _angular_core.Signal<boolean>;
|
|
67
74
|
protected readonly minutesLoop: _angular_core.Signal<boolean>;
|
|
68
75
|
protected readonly pickHour: (cell: Cell<number>) => void;
|
|
@@ -73,8 +80,20 @@ declare class TimeColumnsComponent {
|
|
|
73
80
|
protected readonly periodEntry: _angular_core.Signal<number>;
|
|
74
81
|
private loops;
|
|
75
82
|
private overflows;
|
|
83
|
+
protected onScroll(event: Event, column: TimeColumnId, count: number): void;
|
|
76
84
|
/** Keeps a looping column inside its middle set, so a copy is always beyond either edge. */
|
|
77
|
-
|
|
85
|
+
private wrapScroll;
|
|
86
|
+
protected onUserScroll(event: Event): void;
|
|
87
|
+
protected onWheel(event: WheelEvent): void;
|
|
88
|
+
private scrollToWheelTarget;
|
|
89
|
+
protected onScrollbarGrab(event: PointerEvent): void;
|
|
90
|
+
protected onScrollEnd(event: Event, column: TimeColumnId, count: number): void;
|
|
91
|
+
private selectCentred;
|
|
92
|
+
private nearestEnabled;
|
|
93
|
+
private isSelected;
|
|
94
|
+
private wrapColumn;
|
|
95
|
+
private setHeight;
|
|
96
|
+
private releaseSmoothScroll;
|
|
78
97
|
protected selectHour(cell: Cell<number>): void;
|
|
79
98
|
protected selectMinute(cell: Cell<number>): void;
|
|
80
99
|
protected selectPeriod(cell: Cell<'AM' | 'PM'>): void;
|
|
@@ -94,7 +113,10 @@ declare class TimeColumnsComponent {
|
|
|
94
113
|
private selectAt;
|
|
95
114
|
private siblingColumn;
|
|
96
115
|
private focusColumn;
|
|
116
|
+
private markUserPick;
|
|
97
117
|
private scrollColumn;
|
|
118
|
+
private scrollSmoothly;
|
|
119
|
+
private prefersReducedMotion;
|
|
98
120
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimeColumnsComponent, never>;
|
|
99
121
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TimeColumnsComponent, "ds-time-columns", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "disabledTime": { "alias": "disabledTime"; "required": false; "isSignal": true; }; "loop": { "alias": "loop"; "required": false; "isSignal": true; }; }, { "timeChange": "timeChange"; "partPicked": "partPicked"; }, never, never, true, never>;
|
|
100
122
|
}
|
|
@@ -542,7 +542,8 @@ declare abstract class DsControlValueAccessor<T> extends DsFormControlBase imple
|
|
|
542
542
|
/** Hides the control. Inline `display`: the `hidden` attribute loses to each control's `:host` display. */
|
|
543
543
|
readonly hidden: i0.InputSignalWithTransform<boolean, unknown>;
|
|
544
544
|
private readonly hostElement;
|
|
545
|
-
|
|
545
|
+
constructor();
|
|
546
|
+
/** Focuses the control's own input or trigger; `focusBoundControl()` reaches it through the host. */
|
|
546
547
|
focus(options?: FocusOptions): void;
|
|
547
548
|
/** Drops focus from anywhere inside this control; a portaled panel is left alone. */
|
|
548
549
|
blur(): void;
|