@leanix/components 0.3.112 → 0.3.114
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/forms-ui/components/currency/currency-input.component.mjs +8 -4
- package/esm2020/lib/forms-ui/models/base-select.directive.mjs +2 -2
- package/fesm2015/leanix-components.mjs +38 -35
- package/fesm2015/leanix-components.mjs.map +1 -1
- package/fesm2020/leanix-components.mjs +38 -35
- package/fesm2020/leanix-components.mjs.map +1 -1
- package/lib/forms-ui/components/currency/currency-input.component.d.ts +3 -3
- package/package.json +1 -1
|
@@ -2880,6 +2880,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
2880
2880
|
type: Input
|
|
2881
2881
|
}], code$: [] } });
|
|
2882
2882
|
|
|
2883
|
+
class MarkInvalidDirective {
|
|
2884
|
+
constructor(element, renderer) {
|
|
2885
|
+
this.element = element;
|
|
2886
|
+
this.renderer = renderer;
|
|
2887
|
+
this.lxMarkInvalid = false;
|
|
2888
|
+
this.destroyed$ = new Subject();
|
|
2889
|
+
}
|
|
2890
|
+
ngOnInit() {
|
|
2891
|
+
this.lxMarkInvalid$.pipe(takeUntil(this.destroyed$)).subscribe((invalid) => {
|
|
2892
|
+
const border = invalid ? `1px solid ${getCssVariable('--lx-color-danger')}` : '';
|
|
2893
|
+
this.renderer.setStyle(this.element.nativeElement, 'border', border);
|
|
2894
|
+
});
|
|
2895
|
+
}
|
|
2896
|
+
ngOnDestroy() {
|
|
2897
|
+
this.destroyed$.next();
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
MarkInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MarkInvalidDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2901
|
+
MarkInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.1", type: MarkInvalidDirective, selector: "[lxMarkInvalid]", inputs: { lxMarkInvalid: "lxMarkInvalid" }, ngImport: i0 });
|
|
2902
|
+
__decorate([
|
|
2903
|
+
Observe('lxMarkInvalid')
|
|
2904
|
+
], MarkInvalidDirective.prototype, "lxMarkInvalid$", void 0);
|
|
2905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MarkInvalidDirective, decorators: [{
|
|
2906
|
+
type: Directive,
|
|
2907
|
+
args: [{
|
|
2908
|
+
selector: '[lxMarkInvalid]'
|
|
2909
|
+
}]
|
|
2910
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { lxMarkInvalid: [{
|
|
2911
|
+
type: Input
|
|
2912
|
+
}], lxMarkInvalid$: [] } });
|
|
2913
|
+
|
|
2883
2914
|
class CurrencyInputComponent {
|
|
2884
2915
|
constructor(changeDetector) {
|
|
2885
2916
|
this.changeDetector = changeDetector;
|
|
@@ -2889,6 +2920,7 @@ class CurrencyInputComponent {
|
|
|
2889
2920
|
this.mode = 'edit';
|
|
2890
2921
|
this.iconPosition = 'first';
|
|
2891
2922
|
this.format = '1.2-2';
|
|
2923
|
+
this.markInvalid = false;
|
|
2892
2924
|
this.onFocusLost = new EventEmitter();
|
|
2893
2925
|
this.onChange = new EventEmitter();
|
|
2894
2926
|
this.showCurrencyInput = false;
|
|
@@ -2965,13 +2997,13 @@ class CurrencyInputComponent {
|
|
|
2965
2997
|
}
|
|
2966
2998
|
}
|
|
2967
2999
|
CurrencyInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: CurrencyInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2968
|
-
CurrencyInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: CurrencyInputComponent, selector: "lx-currency-input", inputs: { code: "code", decimalSeparator: "decimalSeparator", placeholder: "placeholder", data: "data", disabled: "disabled", mode: "mode", fieldDefinitionType: "fieldDefinitionType", iconPosition: "iconPosition", format: "format" }, outputs: { onFocusLost: "onFocusLost", onChange: "onChange" }, providers: [
|
|
3000
|
+
CurrencyInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: CurrencyInputComponent, selector: "lx-currency-input", inputs: { code: "code", decimalSeparator: "decimalSeparator", placeholder: "placeholder", data: "data", disabled: "disabled", mode: "mode", fieldDefinitionType: "fieldDefinitionType", iconPosition: "iconPosition", format: "format", markInvalid: "markInvalid" }, outputs: { onFocusLost: "onFocusLost", onChange: "onChange" }, providers: [
|
|
2969
3001
|
{
|
|
2970
3002
|
provide: NG_VALUE_ACCESSOR,
|
|
2971
3003
|
useExisting: forwardRef(() => CurrencyInputComponent),
|
|
2972
3004
|
multi: true
|
|
2973
3005
|
}
|
|
2974
|
-
], viewQueries: [{ propertyName: "currencyInput", first: true, predicate: ["currencyInput"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"mode === 'edit'\" class=\"container input-group\">\n <div *ngIf=\"iconPosition === 'first'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n <input\n [attr.disabled]=\"disabled ? true : null\"\n *ngIf=\"!showCurrencyInput\"\n type=\"text\"\n class=\"form-control currencyDisplayValue\"\n placeholder=\"{{ placeholder }}\"\n [value]=\"dataValue$ | async | number : format\"\n (focus)=\"focusCurrencyInput()\"\n />\n <input\n [attr.disabled]=\"disabled ? true : null\"\n [class.hideInput]=\"!showCurrencyInput\"\n type=\"text\"\n inputmode=\"numeric\"\n class=\"form-control currencyInput\"\n name=\"inputAmount\"\n #currencyInput\n placeholder=\"{{ placeholder }}\"\n [ngModel]=\"dataValue$ | async\"\n (blur)=\"onBlur()\"\n (ngModelChange)=\"valueChanged($event)\"\n />\n <div *ngIf=\"iconPosition === 'end'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n</div>\n<span *ngIf=\"mode === 'view'\" [class.placeholder]=\"(dataValue$ | async) === null && placeholder\">\n <!-- Not using Angular 2 currency pipe since a lot of currency symbols are missing: https://github.com/angular/angular/issues/6724 -->\n <lx-currency-symbol *ngIf=\"iconPosition === 'first'\" [code]=\"code\"></lx-currency-symbol>\n {{ (dataValue$ | async | number : format) || placeholder }}\n <lx-currency-symbol *ngIf=\"iconPosition === 'end'\" [code]=\"code\"></lx-currency-symbol>\n</span>\n", styles: [".container{width:100%!important;padding:0}.labelContainer{width:5%!important;min-width:40px}input{width:100%}.hideInput{display:none}.placeholder{color:#99a5bb}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CurrencySymbolComponent, selector: "lx-currency-symbol", inputs: ["code"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3006
|
+
], viewQueries: [{ propertyName: "currencyInput", first: true, predicate: ["currencyInput"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"mode === 'edit'\" class=\"container input-group\">\n <div *ngIf=\"iconPosition === 'first'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n <input\n [attr.disabled]=\"disabled ? true : null\"\n *ngIf=\"!showCurrencyInput\"\n type=\"text\"\n class=\"form-control currencyDisplayValue\"\n placeholder=\"{{ placeholder }}\"\n [lxMarkInvalid]=\"markInvalid\"\n [value]=\"dataValue$ | async | number : format\"\n (focus)=\"focusCurrencyInput()\"\n />\n <input\n autocomplete=\"off\"\n [attr.disabled]=\"disabled ? true : null\"\n [class.hideInput]=\"!showCurrencyInput\"\n type=\"text\"\n inputmode=\"numeric\"\n class=\"form-control currencyInput\"\n name=\"inputAmount\"\n #currencyInput\n placeholder=\"{{ placeholder }}\"\n [ngModel]=\"dataValue$ | async\"\n (blur)=\"onBlur()\"\n (ngModelChange)=\"valueChanged($event)\"\n />\n <div *ngIf=\"iconPosition === 'end'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n</div>\n<span *ngIf=\"mode === 'view'\" [class.placeholder]=\"(dataValue$ | async) === null && placeholder\">\n <!-- Not using Angular 2 currency pipe since a lot of currency symbols are missing: https://github.com/angular/angular/issues/6724 -->\n <lx-currency-symbol *ngIf=\"iconPosition === 'first'\" [code]=\"code\"></lx-currency-symbol>\n {{ (dataValue$ | async | number : format) || placeholder }}\n <lx-currency-symbol *ngIf=\"iconPosition === 'end'\" [code]=\"code\"></lx-currency-symbol>\n</span>\n", styles: [".container{width:100%!important;padding:0}.labelContainer{width:5%!important;min-width:40px}input{width:100%}.hideInput{display:none}.placeholder{color:#99a5bb}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CurrencySymbolComponent, selector: "lx-currency-symbol", inputs: ["code"] }, { kind: "directive", type: MarkInvalidDirective, selector: "[lxMarkInvalid]", inputs: ["lxMarkInvalid"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2975
3007
|
__decorate([
|
|
2976
3008
|
Observe('data')
|
|
2977
3009
|
], CurrencyInputComponent.prototype, "data$", void 0);
|
|
@@ -2983,7 +3015,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
2983
3015
|
useExisting: forwardRef(() => CurrencyInputComponent),
|
|
2984
3016
|
multi: true
|
|
2985
3017
|
}
|
|
2986
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"mode === 'edit'\" class=\"container input-group\">\n <div *ngIf=\"iconPosition === 'first'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n <input\n [attr.disabled]=\"disabled ? true : null\"\n *ngIf=\"!showCurrencyInput\"\n type=\"text\"\n class=\"form-control currencyDisplayValue\"\n placeholder=\"{{ placeholder }}\"\n [value]=\"dataValue$ | async | number : format\"\n (focus)=\"focusCurrencyInput()\"\n />\n <input\n [attr.disabled]=\"disabled ? true : null\"\n [class.hideInput]=\"!showCurrencyInput\"\n type=\"text\"\n inputmode=\"numeric\"\n class=\"form-control currencyInput\"\n name=\"inputAmount\"\n #currencyInput\n placeholder=\"{{ placeholder }}\"\n [ngModel]=\"dataValue$ | async\"\n (blur)=\"onBlur()\"\n (ngModelChange)=\"valueChanged($event)\"\n />\n <div *ngIf=\"iconPosition === 'end'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n</div>\n<span *ngIf=\"mode === 'view'\" [class.placeholder]=\"(dataValue$ | async) === null && placeholder\">\n <!-- Not using Angular 2 currency pipe since a lot of currency symbols are missing: https://github.com/angular/angular/issues/6724 -->\n <lx-currency-symbol *ngIf=\"iconPosition === 'first'\" [code]=\"code\"></lx-currency-symbol>\n {{ (dataValue$ | async | number : format) || placeholder }}\n <lx-currency-symbol *ngIf=\"iconPosition === 'end'\" [code]=\"code\"></lx-currency-symbol>\n</span>\n", styles: [".container{width:100%!important;padding:0}.labelContainer{width:5%!important;min-width:40px}input{width:100%}.hideInput{display:none}.placeholder{color:#99a5bb}\n"] }]
|
|
3018
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"mode === 'edit'\" class=\"container input-group\">\n <div *ngIf=\"iconPosition === 'first'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n <input\n [attr.disabled]=\"disabled ? true : null\"\n *ngIf=\"!showCurrencyInput\"\n type=\"text\"\n class=\"form-control currencyDisplayValue\"\n placeholder=\"{{ placeholder }}\"\n [lxMarkInvalid]=\"markInvalid\"\n [value]=\"dataValue$ | async | number : format\"\n (focus)=\"focusCurrencyInput()\"\n />\n <input\n autocomplete=\"off\"\n [attr.disabled]=\"disabled ? true : null\"\n [class.hideInput]=\"!showCurrencyInput\"\n type=\"text\"\n inputmode=\"numeric\"\n class=\"form-control currencyInput\"\n name=\"inputAmount\"\n #currencyInput\n placeholder=\"{{ placeholder }}\"\n [ngModel]=\"dataValue$ | async\"\n (blur)=\"onBlur()\"\n (ngModelChange)=\"valueChanged($event)\"\n />\n <div *ngIf=\"iconPosition === 'end'\" class=\"labelContainer input-group-addon\">\n <lx-currency-symbol [code]=\"code\"></lx-currency-symbol>\n </div>\n</div>\n<span *ngIf=\"mode === 'view'\" [class.placeholder]=\"(dataValue$ | async) === null && placeholder\">\n <!-- Not using Angular 2 currency pipe since a lot of currency symbols are missing: https://github.com/angular/angular/issues/6724 -->\n <lx-currency-symbol *ngIf=\"iconPosition === 'first'\" [code]=\"code\"></lx-currency-symbol>\n {{ (dataValue$ | async | number : format) || placeholder }}\n <lx-currency-symbol *ngIf=\"iconPosition === 'end'\" [code]=\"code\"></lx-currency-symbol>\n</span>\n", styles: [".container{width:100%!important;padding:0}.labelContainer{width:5%!important;min-width:40px}input{width:100%}.hideInput{display:none}.placeholder{color:#99a5bb}\n"] }]
|
|
2987
3019
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { code: [{
|
|
2988
3020
|
type: Input
|
|
2989
3021
|
}], decimalSeparator: [{
|
|
@@ -3002,6 +3034,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
3002
3034
|
type: Input
|
|
3003
3035
|
}], format: [{
|
|
3004
3036
|
type: Input
|
|
3037
|
+
}], markInvalid: [{
|
|
3038
|
+
type: Input
|
|
3005
3039
|
}], onFocusLost: [{
|
|
3006
3040
|
type: Output
|
|
3007
3041
|
}], onChange: [{
|
|
@@ -3813,7 +3847,7 @@ class BaseSelectDirective {
|
|
|
3813
3847
|
this.optionsKeyboardSelectAction$ = new Subject();
|
|
3814
3848
|
this.virtualCursorPosition = 0;
|
|
3815
3849
|
this.inputWasFocused = false;
|
|
3816
|
-
this.queryControl = new UntypedFormControl();
|
|
3850
|
+
this.queryControl = new UntypedFormControl('');
|
|
3817
3851
|
this.isInputFocused = false;
|
|
3818
3852
|
this.destroyed$ = new Subject();
|
|
3819
3853
|
}
|
|
@@ -4034,37 +4068,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
4034
4068
|
args: ['inputWidth', { static: true }]
|
|
4035
4069
|
}] } });
|
|
4036
4070
|
|
|
4037
|
-
class MarkInvalidDirective {
|
|
4038
|
-
constructor(element, renderer) {
|
|
4039
|
-
this.element = element;
|
|
4040
|
-
this.renderer = renderer;
|
|
4041
|
-
this.lxMarkInvalid = false;
|
|
4042
|
-
this.destroyed$ = new Subject();
|
|
4043
|
-
}
|
|
4044
|
-
ngOnInit() {
|
|
4045
|
-
this.lxMarkInvalid$.pipe(takeUntil(this.destroyed$)).subscribe((invalid) => {
|
|
4046
|
-
const border = invalid ? `1px solid ${getCssVariable('--lx-color-danger')}` : '';
|
|
4047
|
-
this.renderer.setStyle(this.element.nativeElement, 'border', border);
|
|
4048
|
-
});
|
|
4049
|
-
}
|
|
4050
|
-
ngOnDestroy() {
|
|
4051
|
-
this.destroyed$.next();
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
MarkInvalidDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MarkInvalidDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4055
|
-
MarkInvalidDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.1", type: MarkInvalidDirective, selector: "[lxMarkInvalid]", inputs: { lxMarkInvalid: "lxMarkInvalid" }, ngImport: i0 });
|
|
4056
|
-
__decorate([
|
|
4057
|
-
Observe('lxMarkInvalid')
|
|
4058
|
-
], MarkInvalidDirective.prototype, "lxMarkInvalid$", void 0);
|
|
4059
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MarkInvalidDirective, decorators: [{
|
|
4060
|
-
type: Directive,
|
|
4061
|
-
args: [{
|
|
4062
|
-
selector: '[lxMarkInvalid]'
|
|
4063
|
-
}]
|
|
4064
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { lxMarkInvalid: [{
|
|
4065
|
-
type: Input
|
|
4066
|
-
}], lxMarkInvalid$: [] } });
|
|
4067
|
-
|
|
4068
4071
|
class MultiSelectComponent extends BaseSelectDirective {
|
|
4069
4072
|
constructor(cd) {
|
|
4070
4073
|
super();
|