@danske/sapphire-angular 1.26.0 → 1.27.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/esm2020/lib/field/src/field-error.directive.mjs +4 -2
- package/esm2020/lib/field/src/field.component.mjs +30 -11
- package/esm2020/lib/field/src/field.module.mjs +7 -4
- package/esm2020/lib/select/src/select/select.component.mjs +5 -5
- package/esm2020/lib/text-field/src/text-field-input.directive.mjs +3 -3
- package/esm2020/lib/text-field/src/text-field.component.mjs +3 -3
- package/fesm2015/danske-sapphire-angular.mjs +108 -82
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +106 -82
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
- package/lib/field/src/field-error.directive.d.ts +3 -1
- package/lib/field/src/field.component.d.ts +13 -4
- package/lib/field/src/field.module.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FieldControl } from './field-control';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
/**
|
|
3
4
|
* Used inside sp-field to provide an error message for the field.
|
|
@@ -8,6 +9,7 @@ export declare class FieldErrorDirective {
|
|
|
8
9
|
* If none is supplied, it will be auto-generated.
|
|
9
10
|
*/
|
|
10
11
|
id: string;
|
|
12
|
+
target?: FieldControl;
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDirective, never>;
|
|
12
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldErrorDirective, "sp-field-error", never, { "id": "id"; }, {}, never, never, true, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldErrorDirective, "sp-field-error", never, { "id": "id"; "target": "target"; }, {}, never, never, true, never>;
|
|
13
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterContentInit, AfterViewChecked, ChangeDetectorRef } from '@angular/core';
|
|
1
|
+
import { AfterContentInit, AfterViewChecked, ChangeDetectorRef, QueryList } from '@angular/core';
|
|
2
2
|
import { FieldNoteDirective } from './field-note.directive';
|
|
3
3
|
import { FieldErrorDirective } from './field-error.directive';
|
|
4
4
|
import { LabelComponent } from '../../label/src/label.component';
|
|
@@ -56,7 +56,7 @@ export declare class FieldComponent implements AfterContentInit, AfterViewChecke
|
|
|
56
56
|
* Focusable, labelable control. Components like Select, RadioGroup or TextField,
|
|
57
57
|
* that are meant to rendered inside sp-field, provide FieldControl.
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
controls?: QueryList<FieldControl>;
|
|
60
60
|
private requiredValidator?;
|
|
61
61
|
/**
|
|
62
62
|
* Is set via field-note-affix directive. ContentChild query can't be used since we need
|
|
@@ -71,7 +71,16 @@ export declare class FieldComponent implements AfterContentInit, AfterViewChecke
|
|
|
71
71
|
/**
|
|
72
72
|
* Whether the field contains an error message (sp-field-error).
|
|
73
73
|
*/
|
|
74
|
-
hasError(): boolean;
|
|
74
|
+
hasError(targetField?: FieldControl): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* If there are multiple controls, the field is only disabled when all of them are disabled
|
|
77
|
+
*/
|
|
78
|
+
isDisabled(): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Only support features like `for` or `labelClick` if the field has one control.
|
|
81
|
+
*/
|
|
82
|
+
get control(): FieldControl | undefined;
|
|
83
|
+
get isGroup(): boolean;
|
|
75
84
|
/**
|
|
76
85
|
* Whether the field control is radio group (sp-radio-group).
|
|
77
86
|
*/
|
|
@@ -79,5 +88,5 @@ export declare class FieldComponent implements AfterContentInit, AfterViewChecke
|
|
|
79
88
|
get labelNecessityIndicator(): LabelComponent['necessityIndicator'];
|
|
80
89
|
_setSuffixPortal(portal: DomPortal<HTMLElement> | null): void;
|
|
81
90
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent, never>;
|
|
82
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "sp-field", never, { "necessityIndicator": "necessityIndicator"; "labelPlacement": "labelPlacement"; "size": "size"; }, {}, ["note", "error", "radioGroup", "_fieldLabel", "
|
|
91
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "sp-field", never, { "necessityIndicator": "necessityIndicator"; "labelPlacement": "labelPlacement"; "size": "size"; }, {}, ["note", "error", "radioGroup", "_fieldLabel", "requiredValidator", "controls"], ["sp-field-label", "sp-contextual-help", "*", "sp-field-error", "sp-field-note"], false, [{ directive: typeof i1.UseComponentStylesOnHost; inputs: {}; outputs: {}; }]>;
|
|
83
92
|
}
|
|
@@ -9,6 +9,6 @@ import * as i7 from "@angular/cdk/portal";
|
|
|
9
9
|
import * as i8 from "../../label/src/label.component";
|
|
10
10
|
export declare class SapphireFieldModule {
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SapphireFieldModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireFieldModule, [typeof i1.FieldComponent], [typeof i2.NgIf, typeof i3.FieldLabelDirective, typeof i4.FieldNoteDirective, typeof i5.FieldNoteSuffixDirective, typeof i6.FieldErrorDirective, typeof i7.PortalModule, typeof i8.LabelComponent], [typeof i3.FieldLabelDirective, typeof i4.FieldNoteDirective, typeof i5.FieldNoteSuffixDirective, typeof i6.FieldErrorDirective, typeof i1.FieldComponent]>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireFieldModule, [typeof i1.FieldComponent], [typeof i2.NgIf, typeof i3.FieldLabelDirective, typeof i4.FieldNoteDirective, typeof i5.FieldNoteSuffixDirective, typeof i6.FieldErrorDirective, typeof i7.PortalModule, typeof i8.LabelComponent, typeof i2.CommonModule], [typeof i3.FieldLabelDirective, typeof i4.FieldNoteDirective, typeof i5.FieldNoteSuffixDirective, typeof i6.FieldErrorDirective, typeof i1.FieldComponent]>;
|
|
13
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<SapphireFieldModule>;
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "The Angular implementation of the Sapphire Design System from Danske Bank A/S",
|
|
6
6
|
"module": "fesm2015/danske-sapphire-angular.mjs",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"@danske/sapphire-icons": "^1.0.2"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@danske/sapphire-css": "^31.2.
|
|
19
|
+
"@danske/sapphire-css": "^31.2.2",
|
|
20
20
|
"tslib": "^2.3.0"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "e25b4232146128fc907e0602d8a9d4a6fbe5f402",
|
|
23
23
|
"es2020": "fesm2020/danske-sapphire-angular.mjs",
|
|
24
24
|
"esm2020": "esm2020/danske-sapphire-angular.mjs",
|
|
25
25
|
"fesm2020": "fesm2020/danske-sapphire-angular.mjs",
|