@porscheinformatik/material-addons 16.0.2 → 16.0.4
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/esm2022/lib/readonly/readonly-form-field/readonly-form-field.component.mjs +34 -8
- package/esm2022/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.mjs +29 -8
- package/esm2022/lib/readonly/readonly-form-field.module.mjs +5 -4
- package/fesm2022/porscheinformatik-material-addons.mjs +68 -22
- package/fesm2022/porscheinformatik-material-addons.mjs.map +1 -1
- package/lib/readonly/readonly-form-field/readonly-form-field.component.d.ts +19 -2
- package/lib/readonly/readonly-form-field/readonly-form-field.component.d.ts.map +1 -1
- package/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.d.ts +19 -2
- package/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.d.ts.map +1 -1
- package/lib/readonly/readonly-form-field.module.d.ts +2 -1
- package/lib/readonly/readonly-form-field.module.d.ts.map +1 -1
- package/package.json +1 -1
- package/themes/common/styles.scss +15 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewChecked, ChangeDetectorRef, ElementRef, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ErrorStateMatcher } from '@angular/material/core';
|
|
3
3
|
import { NumberFormatService } from '../../numeric-field/number-format.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -11,6 +11,7 @@ export declare class ReadOnlyFormFieldComponent implements OnChanges, AfterViewC
|
|
|
11
11
|
private changeDetector;
|
|
12
12
|
private renderer;
|
|
13
13
|
private numberFormatService;
|
|
14
|
+
originalContent: ElementRef;
|
|
14
15
|
value: any;
|
|
15
16
|
label: string;
|
|
16
17
|
textAlign: 'right' | 'left';
|
|
@@ -25,6 +26,20 @@ export declare class ReadOnlyFormFieldComponent implements OnChanges, AfterViewC
|
|
|
25
26
|
rows: number;
|
|
26
27
|
id: string;
|
|
27
28
|
shrinkIfEmpty: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* suffix iocon
|
|
31
|
+
*/
|
|
32
|
+
suffix: string;
|
|
33
|
+
/**
|
|
34
|
+
* prefix iocon
|
|
35
|
+
*/
|
|
36
|
+
prefix: string;
|
|
37
|
+
/**
|
|
38
|
+
* if cdkTextareaAutosize is active for textareas
|
|
39
|
+
*/
|
|
40
|
+
multilineAutoSize: boolean;
|
|
41
|
+
suffixClickedEmitter: EventEmitter<any>;
|
|
42
|
+
prefixClickedEmitter: EventEmitter<any>;
|
|
28
43
|
inputEl: ElementRef;
|
|
29
44
|
errorMatcher: ErrorStateMatcher;
|
|
30
45
|
private unitSpan;
|
|
@@ -32,8 +47,10 @@ export declare class ReadOnlyFormFieldComponent implements OnChanges, AfterViewC
|
|
|
32
47
|
constructor(changeDetector: ChangeDetectorRef, renderer: Renderer2, numberFormatService: NumberFormatService);
|
|
33
48
|
ngOnChanges(_: SimpleChanges): void;
|
|
34
49
|
ngAfterViewChecked(): void;
|
|
50
|
+
suffixClicked(): void;
|
|
51
|
+
prefixClicked(): void;
|
|
35
52
|
private injectUnitSymbol;
|
|
36
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReadOnlyFormFieldComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ReadOnlyFormFieldComponent, "mad-readonly-form-field", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "formatNumber": { "alias": "formatNumber"; "required": false; }; "decimalPlaces": { "alias": "decimalPlaces"; "required": false; }; "roundValue": { "alias": "roundDisplayValue"; "required": false; }; "autofillDecimals": { "alias": "autofillDecimals"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "unitPosition": { "alias": "unitPosition"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "id": { "alias": "id"; "required": false; }; "shrinkIfEmpty": { "alias": "shrinkIfEmpty"; "required": false; }; }, {}, never, never, false, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReadOnlyFormFieldComponent, "mad-readonly-form-field", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "formatNumber": { "alias": "formatNumber"; "required": false; }; "decimalPlaces": { "alias": "decimalPlaces"; "required": false; }; "roundValue": { "alias": "roundDisplayValue"; "required": false; }; "autofillDecimals": { "alias": "autofillDecimals"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "unitPosition": { "alias": "unitPosition"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "id": { "alias": "id"; "required": false; }; "shrinkIfEmpty": { "alias": "shrinkIfEmpty"; "required": false; }; "suffix": { "alias": "suffix"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "multilineAutoSize": { "alias": "multilineAutoSize"; "required": false; }; }, { "suffixClickedEmitter": "suffixClickedEmitter"; "prefixClickedEmitter": "prefixClickedEmitter"; }, never, never, false, never>;
|
|
38
55
|
}
|
|
39
56
|
//# sourceMappingURL=readonly-form-field.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readonly-form-field.component.d.ts","sourceRoot":"","sources":["../../../../../projects/material-addons/src/lib/readonly/readonly-form-field/readonly-form-field.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EAEjB,UAAU,
|
|
1
|
+
{"version":3,"file":"readonly-form-field.component.d.ts","sourceRoot":"","sources":["../../../../../projects/material-addons/src/lib/readonly/readonly-form-field/readonly-form-field.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL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IAAI,IAAI;IAI1B,aAAa;IAIb,aAAa;IAIb,OAAO,CAAC,gBAAgB;yCA7Eb,0BAA0B;2CAA1B,0BAA0B;CA+HtC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* Wraps a mat-form-field to replace it by a readOnly representation if necessary
|
|
@@ -45,6 +45,21 @@ export declare class ReadOnlyFormFieldWrapperComponent implements OnInit, AfterV
|
|
|
45
45
|
* Otherwise, the defined rows-value will be used
|
|
46
46
|
*/
|
|
47
47
|
shrinkIfEmpty: boolean;
|
|
48
|
+
hideIconInReadOnlyMode: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* suffix iocon
|
|
51
|
+
*/
|
|
52
|
+
suffix: string;
|
|
53
|
+
/**
|
|
54
|
+
* prefix iocon
|
|
55
|
+
*/
|
|
56
|
+
prefix: string;
|
|
57
|
+
/**
|
|
58
|
+
* if cdkTextareaAutosize is active for textareas
|
|
59
|
+
*/
|
|
60
|
+
multilineAutoSize: boolean;
|
|
61
|
+
suffixClickedEmitter: EventEmitter<any>;
|
|
62
|
+
prefixClickedEmitter: EventEmitter<any>;
|
|
48
63
|
/**
|
|
49
64
|
* Automatically taken from the contained <mat-label>
|
|
50
65
|
*/
|
|
@@ -57,6 +72,8 @@ export declare class ReadOnlyFormFieldWrapperComponent implements OnInit, AfterV
|
|
|
57
72
|
ngAfterViewChecked(): void;
|
|
58
73
|
ngOnChanges(_: SimpleChanges): void;
|
|
59
74
|
getLabel(): string;
|
|
75
|
+
suffixClicked(): void;
|
|
76
|
+
prefixClicked(): void;
|
|
60
77
|
private doRendering;
|
|
61
78
|
private extractLabel;
|
|
62
79
|
private correctWidth;
|
|
@@ -67,6 +84,6 @@ export declare class ReadOnlyFormFieldWrapperComponent implements OnInit, AfterV
|
|
|
67
84
|
private isTextOverflown;
|
|
68
85
|
private calculateToolTipText;
|
|
69
86
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReadOnlyFormFieldWrapperComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ReadOnlyFormFieldWrapperComponent, "mad-readonly-form-field-wrapper", never, { "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "formatNumber": { "alias": "formatNumber"; "required": false; }; "decimalPlaces": { "alias": "decimalPlaces"; "required": false; }; "roundValue": { "alias": "roundDisplayValue"; "required": false; }; "autofillDecimals": { "alias": "autofillDecimals"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "unitPosition": { "alias": "unitPosition"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "id": { "alias": "id"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "shrinkIfEmpty": { "alias": "shrinkIfEmpty"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
87
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReadOnlyFormFieldWrapperComponent, "mad-readonly-form-field-wrapper", never, { "readonly": { "alias": "readonly"; "required": false; }; "value": { "alias": "value"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "formatNumber": { "alias": "formatNumber"; "required": false; }; "decimalPlaces": { "alias": "decimalPlaces"; "required": false; }; "roundValue": { "alias": "roundDisplayValue"; "required": false; }; "autofillDecimals": { "alias": "autofillDecimals"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "unitPosition": { "alias": "unitPosition"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "id": { "alias": "id"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "shrinkIfEmpty": { "alias": "shrinkIfEmpty"; "required": false; }; "hideIconInReadOnlyMode": { "alias": "hideIconInReadOnlyMode"; "required": false; }; "suffix": { "alias": "suffix"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "multilineAutoSize": { "alias": "multilineAutoSize"; "required": false; }; }, { "suffixClickedEmitter": "suffixClickedEmitter"; "prefixClickedEmitter": "prefixClickedEmitter"; }, never, ["*"], false, never>;
|
|
71
88
|
}
|
|
72
89
|
//# sourceMappingURL=readonly-form-field-wrapper.component.d.ts.map
|
package/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readonly-form-field-wrapper.component.d.ts","sourceRoot":"","sources":["../../../../../projects/material-addons/src/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAEjB,UAAU,
|
|
1
|
+
{"version":3,"file":"readonly-form-field-wrapper.component.d.ts","sourceRoot":"","sources":["../../../../../projects/material-addons/src/lib/readonly/readonly-form-field-wrapper/readonly-form-field-wrapper.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAEjB,UAAU,EAAE,YAAY,EAExB,SAAS,EACT,MAAM,EACN,aAAa,EAEd,MAAM,eAAe,CAAC;;AAEvB;;;;GAIG;AACH,qBAKa,iCAAkC,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB;IAqE9F,OAAO,CAAC,cAAc;IAAqB,OAAO,CAAC,UAAU;IAnEzE,eAAe,EAAE,UAAU,CAAC;IAE5B,sBAAsB,EAAE,UAAU,CAAC;IAEnC;;;OAGG;IACM,QAAQ,UAAQ;IAEzB;;;OAGG;IACa,KAAK,EAAE,GAAG,CAAC;IAEP,SAAS,EAAE,OAAO,GAAG,MAAM,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|
import * as i7 from "@angular/forms";
|
|
9
9
|
import * as i8 from "@angular/material/tooltip";
|
|
10
|
+
import * as i9 from "@angular/material/icon";
|
|
10
11
|
export declare class ReadOnlyFormFieldModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReadOnlyFormFieldModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ReadOnlyFormFieldModule, [typeof i1.ReadOnlyFormFieldComponent, typeof i2.ReadOnlyFormFieldWrapperComponent], [typeof i3.CommonModule, typeof i4.RouterModule, typeof i5.MatFormFieldModule, typeof i6.MatInputModule, typeof i7.FormsModule, typeof i8.MatTooltipModule], [typeof i1.ReadOnlyFormFieldComponent, typeof i2.ReadOnlyFormFieldWrapperComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ReadOnlyFormFieldModule, [typeof i1.ReadOnlyFormFieldComponent, typeof i2.ReadOnlyFormFieldWrapperComponent], [typeof i3.CommonModule, typeof i4.RouterModule, typeof i5.MatFormFieldModule, typeof i6.MatInputModule, typeof i7.FormsModule, typeof i8.MatTooltipModule, typeof i9.MatIconModule], [typeof i1.ReadOnlyFormFieldComponent, typeof i2.ReadOnlyFormFieldWrapperComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<ReadOnlyFormFieldModule>;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=readonly-form-field.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readonly-form-field.module.d.ts","sourceRoot":"","sources":["../../../../projects/material-addons/src/lib/readonly/readonly-form-field.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readonly-form-field.module.d.ts","sourceRoot":"","sources":["../../../../projects/material-addons/src/lib/readonly/readonly-form-field.module.ts"],"names":[],"mappings":";;;;;;;;;;AAWA,qBAKa,uBAAuB;yCAAvB,uBAAuB;0CAAvB,uBAAuB;0CAAvB,uBAAuB;CAAG"}
|
package/package.json
CHANGED
|
@@ -336,3 +336,18 @@ mad-link-button {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
// needed for the padding fix when subscriptSizing: 'dynamic'
|
|
340
|
+
mat-form-field .mat-mdc-form-field {
|
|
341
|
+
&-subscript-wrapper {
|
|
342
|
+
margin-bottom: 1.25em;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// the label of the outline input is set into the padding of the form-field-component
|
|
347
|
+
.mat-form-field-appearance-outline {
|
|
348
|
+
margin-top: 8px;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.pointer {
|
|
352
|
+
cursor: pointer;
|
|
353
|
+
}
|