@i-cell/ids-angular 0.1.0 → 0.1.2
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/fesm2022/i-cell-ids-angular-forms.mjs +106 -26
- package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-table.mjs +4 -4
- package/fesm2022/i-cell-ids-angular-table.mjs.map +1 -1
- package/forms/components/input/input.directive.d.ts +1 -1
- package/forms/components/message/error-message/error-definition.directive.d.ts +49 -0
- package/forms/components/message/error-message/error-message.component.d.ts +11 -6
- package/forms/components/message/types/error-message-mapping.d.ts +9 -0
- package/forms/public-api.d.ts +2 -0
- package/package.json +11 -9
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { IdsMessageSuffixDirective } from '../../../directives/message-suffix.directive';
|
|
2
|
-
import {
|
|
2
|
+
import { IdsErrorMessageMapping } from '../types/error-message-mapping';
|
|
3
3
|
import { ComponentBase } from '@i-cell/ids-angular/core';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import * as i1 from "../../../directives/message.directive";
|
|
6
|
-
export declare class IdsErrorMessageComponent extends ComponentBase
|
|
6
|
+
export declare class IdsErrorMessageComponent extends ComponentBase {
|
|
7
7
|
protected get _hostName(): string;
|
|
8
|
-
private
|
|
9
|
-
private
|
|
8
|
+
private _parent;
|
|
9
|
+
private _control;
|
|
10
|
+
private _errorDefDirs;
|
|
11
|
+
private _errorDefs;
|
|
12
|
+
protected _validationError: import("@angular/core").WritableSignal<IdsErrorMessageMapping | null>;
|
|
10
13
|
protected _hostClasses: import("@angular/core").Signal<string>;
|
|
11
14
|
suffixes: import("@angular/core").Signal<readonly IdsMessageSuffixDirective[]>;
|
|
12
|
-
|
|
15
|
+
constructor();
|
|
16
|
+
private _selectMostImportantValidationError;
|
|
17
|
+
protected _getValidationErrorMessage(messageOrFn: IdsErrorMessageMapping['message']): string;
|
|
13
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<IdsErrorMessageComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IdsErrorMessageComponent, "ids-error-message", never, {}, {}, ["suffixes"], ["[idsMessagePrefix]", "
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IdsErrorMessageComponent, "ids-error-message", never, {}, {}, ["_errorDefDirs", "suffixes"], ["[idsMessagePrefix]", "[idsMessageSuffix]"], true, [{ directive: typeof i1.IdsMessageDirective; inputs: {}; outputs: {}; }]>;
|
|
15
20
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A validation error's representation that maps an error message (or a function returning a message) to an error code.
|
|
3
|
+
*/
|
|
4
|
+
export interface IdsErrorMessageMapping {
|
|
5
|
+
/** The code of the error (usually the error key returned by a {@link ValidatorFn}) */
|
|
6
|
+
code: string;
|
|
7
|
+
/** The error's message (either a string literal or a function that returns a literal) */
|
|
8
|
+
message: string | (() => string);
|
|
9
|
+
}
|
package/forms/public-api.d.ts
CHANGED
|
@@ -11,9 +11,11 @@ export * from './components/form-field/form-field-defaults';
|
|
|
11
11
|
export * from './components/form-field/form-field.component';
|
|
12
12
|
export * from './components/input/input-defaults';
|
|
13
13
|
export * from './components/input/input.directive';
|
|
14
|
+
export * from './components/message/error-message/error-definition.directive';
|
|
14
15
|
export * from './components/message/error-message/error-message.component';
|
|
15
16
|
export * from './components/message/hint-message/hint-message.component';
|
|
16
17
|
export * from './components/message/success-message/success-message.component';
|
|
18
|
+
export * from './components/message/types/error-message-mapping';
|
|
17
19
|
export * from './components/message/types/message-variant.type';
|
|
18
20
|
export * from './components/message/types/message.type';
|
|
19
21
|
export * from './components/message/message-defaults';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@i-cell/ids-angular",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "i-Cell Design System UI Kit components for Angular",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"Barsi Balázs",
|
|
16
16
|
"Bátori László",
|
|
17
17
|
"Nagy Gábor",
|
|
18
|
+
"Onofer Dávid",
|
|
18
19
|
"Soós Árpád"
|
|
19
20
|
],
|
|
20
21
|
"license": "MIT",
|
|
@@ -29,7 +30,8 @@
|
|
|
29
30
|
"@angular/core": "^19.1.2",
|
|
30
31
|
"@angular/forms": "^19.1.2",
|
|
31
32
|
"@angular/platform-browser": "^19.1.2",
|
|
32
|
-
"@angular/router": "^19.1.2"
|
|
33
|
+
"@angular/router": "^19.1.2",
|
|
34
|
+
"@i-cell/ids-styles": "0.0.32"
|
|
33
35
|
},
|
|
34
36
|
"dependencies": {
|
|
35
37
|
"tslib": "^2.3.0"
|
|
@@ -49,13 +51,17 @@
|
|
|
49
51
|
"types": "./accordion/index.d.ts",
|
|
50
52
|
"default": "./fesm2022/i-cell-ids-angular-accordion.mjs"
|
|
51
53
|
},
|
|
54
|
+
"./avatar": {
|
|
55
|
+
"types": "./avatar/index.d.ts",
|
|
56
|
+
"default": "./fesm2022/i-cell-ids-angular-avatar.mjs"
|
|
57
|
+
},
|
|
52
58
|
"./card": {
|
|
53
59
|
"types": "./card/index.d.ts",
|
|
54
60
|
"default": "./fesm2022/i-cell-ids-angular-card.mjs"
|
|
55
61
|
},
|
|
56
|
-
"./
|
|
57
|
-
"types": "./
|
|
58
|
-
"default": "./fesm2022/i-cell-ids-angular-
|
|
62
|
+
"./checkbox": {
|
|
63
|
+
"types": "./checkbox/index.d.ts",
|
|
64
|
+
"default": "./fesm2022/i-cell-ids-angular-checkbox.mjs"
|
|
59
65
|
},
|
|
60
66
|
"./button": {
|
|
61
67
|
"types": "./button/index.d.ts",
|
|
@@ -69,10 +75,6 @@
|
|
|
69
75
|
"types": "./core/index.d.ts",
|
|
70
76
|
"default": "./fesm2022/i-cell-ids-angular-core.mjs"
|
|
71
77
|
},
|
|
72
|
-
"./checkbox": {
|
|
73
|
-
"types": "./checkbox/index.d.ts",
|
|
74
|
-
"default": "./fesm2022/i-cell-ids-angular-checkbox.mjs"
|
|
75
|
-
},
|
|
76
78
|
"./dialog": {
|
|
77
79
|
"types": "./dialog/index.d.ts",
|
|
78
80
|
"default": "./fesm2022/i-cell-ids-angular-dialog.mjs"
|