@norwegian/core-components 6.27.0 → 6.28.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.
@@ -5,53 +5,62 @@
5
5
  import { ElementRef, EventEmitter } from '@angular/core';
6
6
  import { NasComponentBase } from '../../core';
7
7
  import { ClassModel } from '../../core/models/class.model';
8
+ import { AlertModel } from './models/alert.model';
8
9
  import * as i0 from "@angular/core";
9
10
  /**
10
11
  * @description
11
12
  * Norwegian alert Component | Dialogs and Modals
12
13
  */
13
14
  export declare class AlertComponent extends NasComponentBase {
15
+ private alertModel;
14
16
  showChange: EventEmitter<boolean>;
15
17
  alertContainer: ElementRef;
18
+ timestamp: Date;
16
19
  showValue: boolean;
17
20
  /**
18
- * @text
19
- * Used to determine that you want to show an error
20
- *
21
- * @example
22
- * <nas-alert error>Try again, we werent able to fetch...</nas-alert>
23
- *
24
- */
21
+ * @text
22
+ * Used to determine that you want to show an error
23
+ *
24
+ * @example
25
+ * <nas-alert error>Try again, we werent able to fetch...</nas-alert>
26
+ *
27
+ */
25
28
  /**
26
- * @property Input
27
- * @description
28
- * Boolean to give the alert info.
29
- */
29
+ * @property Input
30
+ * @description
31
+ * Boolean to give the alert info.
32
+ */
30
33
  title: string;
31
34
  /**
32
- * @property Input
33
- * @description
34
- * Boolean to give the alert info.
35
- */
35
+ * @property Input
36
+ * @description
37
+ * Boolean to give the alert info.
38
+ */
36
39
  info: boolean;
37
40
  /**
38
- * @property Input
39
- * @description
40
- * Boolean to give the alert a warning.
41
- */
41
+ * @property Input
42
+ * @description
43
+ * Boolean to give the alert a warning.
44
+ */
42
45
  warning: boolean;
43
46
  /**
44
- * @property Input
45
- * @description
46
- * Boolean to give the alert an error.
47
- */
47
+ * @property Input
48
+ * @description
49
+ * Boolean to give the alert an error.
50
+ */
48
51
  error: boolean;
49
52
  /**
50
- * @property Input
51
- * @description
52
- * Boolean to give the alert a success.
53
- */
53
+ * @property Input
54
+ * @description
55
+ * Boolean to give the alert a success.
56
+ */
54
57
  success: boolean;
58
+ /**
59
+ * @property Input
60
+ * @description
61
+ * Boolean to give the alert a success.
62
+ */
63
+ neutral: boolean;
55
64
  /**
56
65
  * @property Input
57
66
  * @description
@@ -71,6 +80,12 @@ export declare class AlertComponent extends NasComponentBase {
71
80
  * Boolean to give opportunity to close the alert box
72
81
  */
73
82
  removable: boolean;
83
+ /**
84
+ * @property Input
85
+ * @description
86
+ * Boolean to give opportunity to remove the icon
87
+ */
88
+ removeIcon?: boolean;
74
89
  /**
75
90
  * @property Input
76
91
  * @description
@@ -83,15 +98,32 @@ export declare class AlertComponent extends NasComponentBase {
83
98
  * Flag for allowing autoscroll to top when showing. Default false.
84
99
  */
85
100
  allowAutoScroll: boolean;
101
+ /**
102
+ * @property Input
103
+ * @description
104
+ * Sets the server string value
105
+ */
106
+ server: string;
107
+ /**
108
+ * @property Input
109
+ * @description
110
+ * Sets the correlation string value
111
+ */
112
+ correlation: string;
113
+ /**
114
+ * @property Input
115
+ * @description
116
+ * Flag for showing/hiding element. Defaults to true.
117
+ */
118
+ get alert(): AlertModel;
119
+ set alert(alert: AlertModel);
86
120
  constructor();
87
121
  getClasses(element?: string, modifiers?: Array<string>): Array<ClassModel>;
88
- getModifiers(): Array<string>;
89
- getAlertClass(): string;
90
- private getValueFromModifiers;
91
- getIconSrc(): string;
92
- getIconAlt(): string;
122
+ get modifiers(): Array<string>;
123
+ getIcon(): string;
93
124
  removeAlertBox(): void;
94
125
  private scrollToAlert;
126
+ private setAlertValues;
95
127
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
96
- static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "nas-alert", never, { "title": { "alias": "title"; "required": false; }; "info": { "alias": "info"; "required": false; }; "warning": { "alias": "warning"; "required": false; }; "error": { "alias": "error"; "required": false; }; "success": { "alias": "success"; "required": false; }; "text": { "alias": "text"; "required": false; }; "show": { "alias": "show"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "trustTextHtml": { "alias": "trustTextHtml"; "required": false; }; "allowAutoScroll": { "alias": "allowAutoScroll"; "required": false; }; }, { "showChange": "showChange"; }, never, ["*"], false, never>;
128
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "nas-alert", never, { "timestamp": { "alias": "timestamp"; "required": false; }; "title": { "alias": "title"; "required": false; }; "info": { "alias": "info"; "required": false; }; "warning": { "alias": "warning"; "required": false; }; "error": { "alias": "error"; "required": false; }; "success": { "alias": "success"; "required": false; }; "neutral": { "alias": "neutral"; "required": false; }; "text": { "alias": "text"; "required": false; }; "show": { "alias": "show"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "removeIcon": { "alias": "removeIcon"; "required": false; }; "trustTextHtml": { "alias": "trustTextHtml"; "required": false; }; "allowAutoScroll": { "alias": "allowAutoScroll"; "required": false; }; "server": { "alias": "server"; "required": false; }; "correlation": { "alias": "correlation"; "required": false; }; "alert": { "alias": "alert"; "required": false; }; }, { "showChange": "showChange"; }, never, ["*"], false, never>;
97
129
  }
@@ -0,0 +1,8 @@
1
+ export interface AlertModel {
2
+ title?: string;
3
+ text?: string;
4
+ timestamp?: Date;
5
+ server?: string;
6
+ correlation?: string;
7
+ removeIcon?: boolean;
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@norwegian/core-components",
3
- "version": "6.27.0",
3
+ "version": "6.28.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=16.0.0 < 19.0.0",
6
6
  "@angular/core": ">=16.0.0 < 19.0.0"
File without changes