@danske/sapphire-angular 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/button/src/button-group.component.mjs +2 -2
- package/esm2020/lib/button/src/button.component.mjs +2 -2
- package/esm2020/lib/button/src/toggle-button.component.mjs +2 -2
- package/esm2020/lib/field/public_api.mjs +2 -1
- package/esm2020/lib/field/src/field-error.directive.mjs +1 -1
- package/esm2020/lib/field/src/field.component.mjs +78 -18
- package/esm2020/lib/field/src/field.module.mjs +7 -5
- package/esm2020/lib/menu/src/menu-trigger.directive.mjs +16 -11
- package/esm2020/lib/modal/src/dialog/dialog-trigger.directive.mjs +4 -7
- package/esm2020/lib/modal/src/modal-trigger.directive.mjs +19 -4
- package/esm2020/lib/modal/src/panel/panel-trigger.directive.mjs +4 -7
- package/esm2020/lib/select/src/select/select.component.mjs +5 -4
- package/esm2020/lib/select/src/select-button/select-button.component.mjs +2 -2
- package/esm2020/lib/text-field/src/text-field.component.mjs +2 -2
- package/esm2020/lib/theme/src/theme-base.directive.mjs +1 -2
- package/esm2020/lib/theme/src/themes.mjs +4 -4
- package/fesm2015/danske-sapphire-angular.mjs +169 -88
- package/fesm2015/danske-sapphire-angular.mjs.map +1 -1
- package/fesm2020/danske-sapphire-angular.mjs +167 -89
- package/fesm2020/danske-sapphire-angular.mjs.map +1 -1
- package/lib/field/public_api.d.ts +1 -0
- package/lib/field/src/field-error.directive.d.ts +9 -1
- package/lib/field/src/field.component.d.ts +10 -2
- package/lib/field/src/field.module.d.ts +1 -1
- package/lib/menu/src/menu-trigger.directive.d.ts +1 -0
- package/lib/modal/src/modal-trigger.directive.d.ts +5 -2
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { SapphireFieldModule } from './src/field.module';
|
|
2
2
|
export { FieldComponent } from './src/field.component';
|
|
3
|
+
export { FieldsetComponent } from './src/field.component';
|
|
3
4
|
export { FieldNoteDirective } from './src/field-note.directive';
|
|
4
5
|
export { FieldErrorDirective } from './src/field-error.directive';
|
|
5
6
|
export { FieldLabelDirective } from './src/field-label.directive';
|
|
@@ -9,7 +9,15 @@ export declare class FieldErrorDirective {
|
|
|
9
9
|
* If none is supplied, it will be auto-generated.
|
|
10
10
|
*/
|
|
11
11
|
id: string;
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Target for the error. Can be either a specific control or a nested field.
|
|
14
|
+
* When set, only the targeted control/field will show the error state.
|
|
15
|
+
*/
|
|
16
|
+
target?: FieldControl | {
|
|
17
|
+
controls?: {
|
|
18
|
+
toArray(): FieldControl[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
13
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrorDirective, never>;
|
|
14
22
|
static ɵdir: i0.ɵɵDirectiveDeclaration<FieldErrorDirective, "sp-field-error", never, { "id": "id"; "target": "target"; }, {}, never, never, true, never>;
|
|
15
23
|
}
|
|
@@ -35,6 +35,7 @@ import * as i1 from "../../common/sapphire-view-encapsulation";
|
|
|
35
35
|
*/
|
|
36
36
|
export declare class FieldComponent implements AfterContentInit, AfterViewChecked, IconSizeProvider {
|
|
37
37
|
private changeDetectorRef;
|
|
38
|
+
private fieldset?;
|
|
38
39
|
/**
|
|
39
40
|
* Whether the necessity indicator should be visible.
|
|
40
41
|
*/
|
|
@@ -77,14 +78,17 @@ export declare class FieldComponent implements AfterContentInit, AfterViewChecke
|
|
|
77
78
|
*/
|
|
78
79
|
_noteSuffixPortal: DomPortal<HTMLElement> | null;
|
|
79
80
|
private changed;
|
|
80
|
-
constructor(changeDetectorRef: ChangeDetectorRef, iconRegistry: IconRegistry);
|
|
81
|
+
constructor(changeDetectorRef: ChangeDetectorRef, iconRegistry: IconRegistry, fieldset?: FieldsetComponent | undefined);
|
|
81
82
|
ngAfterContentInit(): void;
|
|
82
83
|
ngAfterViewInit(): void;
|
|
83
84
|
ngAfterViewChecked(): void;
|
|
84
85
|
/**
|
|
85
86
|
* Whether the field contains an error message (sp-field-error).
|
|
87
|
+
* Also checks if a parent fieldset has an error.
|
|
86
88
|
*/
|
|
87
89
|
hasError(targetField?: FieldControl): boolean;
|
|
90
|
+
private _hasOwnError;
|
|
91
|
+
private _isFieldControl;
|
|
88
92
|
/**
|
|
89
93
|
* If there are multiple controls, the field is only disabled when all of them are disabled
|
|
90
94
|
*/
|
|
@@ -104,6 +108,10 @@ export declare class FieldComponent implements AfterContentInit, AfterViewChecke
|
|
|
104
108
|
hasRadioGroupChild(): boolean;
|
|
105
109
|
get labelNecessityIndicator(): LabelComponent['necessityIndicator'];
|
|
106
110
|
_setSuffixPortal(portal: DomPortal<HTMLElement> | null): void;
|
|
107
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent,
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldComponent, [null, null, { optional: true; skipSelf: true; }]>;
|
|
108
112
|
static ɵcmp: i0.ɵɵComponentDeclaration<FieldComponent, "sp-field", never, { "necessityIndicator": "necessityIndicator"; "labelPlacement": "labelPlacement"; "noDefaultWidth": "noDefaultWidth"; "allowNoteAndError": "allowNoteAndError"; "size": "size"; }, {}, ["note", "error", "_fieldLabel", "radioGroup", "ngControl", "requiredValidator", "controls"], ["sp-field-label", "sp-help-button", "*", "sp-field-error", "sp-field-note"], false, [{ directive: typeof i1.UseComponentStylesOnHost; inputs: {}; outputs: {}; }]>;
|
|
109
113
|
}
|
|
114
|
+
export declare class FieldsetComponent extends FieldComponent {
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetComponent, never>;
|
|
116
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "sp-fieldset", never, {}, {}, never, ["sp-field-label", "sp-help-button", "*", "sp-field-error", "sp-field-note"], false, [{ directive: typeof i1.UseComponentStylesOnHost; inputs: {}; outputs: {}; }]>;
|
|
117
|
+
}
|
|
@@ -10,6 +10,6 @@ import * as i8 from "../../label/src/label.component";
|
|
|
10
10
|
import * as i9 from "../../icon/src/icon.module";
|
|
11
11
|
export declare class SapphireFieldModule {
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<SapphireFieldModule, never>;
|
|
13
|
-
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 i9.SapphireIconModule], [typeof i3.FieldLabelDirective, typeof i4.FieldNoteDirective, typeof i5.FieldNoteSuffixDirective, typeof i6.FieldErrorDirective, typeof i1.FieldComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SapphireFieldModule, [typeof i1.FieldComponent, typeof i1.FieldsetComponent], [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 i9.SapphireIconModule], [typeof i3.FieldLabelDirective, typeof i4.FieldNoteDirective, typeof i5.FieldNoteSuffixDirective, typeof i6.FieldErrorDirective, typeof i1.FieldComponent, typeof i1.FieldsetComponent]>;
|
|
14
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<SapphireFieldModule>;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
1
|
+
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
2
|
import { DialogRef } from '@angular/cdk/dialog';
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
4
|
import { ModalOptions, ModalService } from './modal.service';
|
|
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
/**
|
|
8
8
|
* Makes a clickable element a trigger for a modal
|
|
9
9
|
*/
|
|
10
|
-
export declare abstract class ModalTriggerDirective implements ModalOptions {
|
|
10
|
+
export declare abstract class ModalTriggerDirective implements ModalOptions, OnInit {
|
|
11
11
|
protected templateRef: TemplateRef<unknown> | null;
|
|
12
12
|
protected dialogRef?: DialogRef;
|
|
13
13
|
get dismissable(): boolean;
|
|
@@ -16,10 +16,13 @@ export declare abstract class ModalTriggerDirective implements ModalOptions {
|
|
|
16
16
|
get keyboardDismissDisabled(): boolean;
|
|
17
17
|
set keyboardDismissDisabled(value: BooleanInput);
|
|
18
18
|
private _keyboardDismissDisabled;
|
|
19
|
+
private readonly menuItem;
|
|
19
20
|
protected modalService: ModalService;
|
|
20
21
|
readonly theme: ThemeBaseDirective;
|
|
21
22
|
abstract open(): void;
|
|
22
23
|
close(): void;
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
_onClick(): void;
|
|
23
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalTriggerDirective, never>;
|
|
24
27
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ModalTriggerDirective, never, never, {}, {}, never, never, true, never>;
|
|
25
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-angular",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
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,12 +16,12 @@
|
|
|
16
16
|
"@danske/sapphire-icons": "^3.1.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@danske/sapphire-css": "^
|
|
19
|
+
"@danske/sapphire-css": "^50.0.0",
|
|
20
20
|
"@internationalized/message": "^3.1.5",
|
|
21
21
|
"dompurify": "^3.2.6",
|
|
22
22
|
"tslib": "^2.3.0"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "16211b81aadc435461763b838c77f4951e9dad50",
|
|
25
25
|
"es2020": "fesm2020/danske-sapphire-angular.mjs",
|
|
26
26
|
"esm2020": "esm2020/danske-sapphire-angular.mjs",
|
|
27
27
|
"fesm2020": "fesm2020/danske-sapphire-angular.mjs",
|