@gettrx/core-components-angular 1.1.22 → 1.1.24
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.
|
@@ -7578,6 +7578,7 @@ class GtrInputColorComponent {
|
|
|
7578
7578
|
this.inputControl = new FormControl('', validColorValidator());
|
|
7579
7579
|
this.colorControl = new FormControl('');
|
|
7580
7580
|
this.hasBorder = false;
|
|
7581
|
+
this.inputInvalid = false;
|
|
7581
7582
|
this.inputLabel = 'Color';
|
|
7582
7583
|
this.invalid = false;
|
|
7583
7584
|
this.colorPickerControls = 'no-alpha';
|
|
@@ -7593,11 +7594,11 @@ class GtrInputColorComponent {
|
|
|
7593
7594
|
}
|
|
7594
7595
|
ngOnInit() {
|
|
7595
7596
|
this.inputControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((color) => {
|
|
7597
|
+
this.inputInvalid = this.inputControl?.invalid;
|
|
7596
7598
|
if (this.inputControl.valid) {
|
|
7597
7599
|
this.colorControl.setValue(color, { emitEvent: false });
|
|
7598
7600
|
this.handleValue(color);
|
|
7599
7601
|
}
|
|
7600
|
-
this.invalid = this.invalid || this.inputControl.invalid;
|
|
7601
7602
|
});
|
|
7602
7603
|
this.colorControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((color) => {
|
|
7603
7604
|
this.inputControl.setValue(color);
|
|
@@ -7642,7 +7643,7 @@ class GtrInputColorComponent {
|
|
|
7642
7643
|
useExisting: forwardRef((() => GtrInputColorComponent)),
|
|
7643
7644
|
multi: true,
|
|
7644
7645
|
},
|
|
7645
|
-
], ngImport: i0, template: "<div class=\"input-color-container\">\n <div class=\"gtr-custom-label\">{{ inputLabel }}</div>\n\n <div\n class=\"d-flex flex-row align-items-center input-color\"\n [class.has-border]=\"hasBorder\"\n [class.invalid]=\"!disabled && invalid\"\n >\n <gtr-input\n type=\"text\"\n [isValid]=\"inputControl.valid\"\n [placeholder]=\"placeholder || ''\"\n [dataTransactionName]=\"dataTransactionName + '-color'\"\n [name]=\"name\"\n [formControl]=\"inputControl\">\n </gtr-input>\n\n <ngx-colors\n ngx-colors-trigger\n [hideColorPicker]=\"hideColorPicker\"\n [colorPickerControls]=\"colorPickerControls\"\n [hideTextInput]=\"hidePickerTextInput\"\n [formControl]=\"colorControl\"\n acceptLabel=\"Accept\"\n cancelLabel=\"Cancel\"\n ></ngx-colors>\n\n </div>\n @if (!disabled && invalid && inputControl
|
|
7646
|
+
], ngImport: i0, template: "<div class=\"input-color-container\">\n <div class=\"gtr-custom-label\">{{ inputLabel }}</div>\n\n <div\n class=\"d-flex flex-row align-items-center input-color\"\n [class.has-border]=\"hasBorder\"\n [class.invalid]=\"!disabled && (invalid || inputInvalid)\"\n >\n <gtr-input\n type=\"text\"\n [isValid]=\"inputControl.valid\"\n [placeholder]=\"placeholder || ''\"\n [dataTransactionName]=\"dataTransactionName + '-color'\"\n [name]=\"name\"\n [formControl]=\"inputControl\">\n </gtr-input>\n\n <ngx-colors\n ngx-colors-trigger\n [hideColorPicker]=\"hideColorPicker\"\n [colorPickerControls]=\"colorPickerControls\"\n [hideTextInput]=\"hidePickerTextInput\"\n [formControl]=\"colorControl\"\n acceptLabel=\"Accept\"\n cancelLabel=\"Cancel\"\n ></ngx-colors>\n\n </div>\n @if (!disabled && (invalid || inputInvalid) && inputControl.errors && !hideErrorMessage) {\n @if (inputControl.invalid && (inputControl.dirty || inputControl.touched)) {\n <div class=\"custom-error\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n @if (inputControl.errors['invalidColor']) {\n <span>The color is invalid.</span>\n }\n </div>\n }\n }\n</div>\n", styles: [".input-color-container .gtr-custom-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-color-container ::ng-deep ngx-colors{display:inline-block;margin-left:5px}.input-color-container ::ng-deep ngx-colors .preview{border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.input-color-container ::ng-deep ngx-colors .preview-background{border-radius:6px!important}.input-color-container ::ng-deep ngx-colors .circle{border:1px solid transparent!important;border-radius:6px!important;width:42px!important;height:100%!important;min-height:38px!important}.input-color-container .input-color.has-border ::ng-deep ngx-colors .circle{border-color:var(--gtr-color-base-black-10)!important}::ng-deep ngx-colors-panel .opened button{letter-spacing:.43px!important;padding:8px 12px 8px 10px!important;line-height:18px!important;font-size:15px!important;font-weight:400!important;border:1px solid transparent!important;border-radius:6px!important}\n"], dependencies: [{ kind: "component", type: GtrInputComponent, selector: "gtr-input", inputs: ["inputWrapperId", "loading", "type", "name", "dataTransactionName", "value", "placeholder", "inputIcon", "iconSize", "iconColor", "iconPosition", "iconFontWeight", "inputLabel", "disabled", "validateLabel", "isNumber", "readonly", "isOnlyView", "defaultValidation", "required", "isValid", "crop", "inputId", "setFocus"], outputs: ["inputChanged", "handleError"] }, { kind: "ngmodule", type: NgxColorsModule }, { kind: "component", type: i1$2.NgxColorsComponent, selector: "ngx-colors" }, { kind: "directive", type: i1$2.NgxColorsTriggerDirective, selector: "[ngx-colors-trigger]", inputs: ["colorsAnimation", "palette", "format", "formats", "position", "hideTextInput", "hideColorPicker", "attachTo", "overlayClassName", "colorPickerControls", "acceptLabel", "cancelLabel"], outputs: ["change", "input", "slider", "close", "open"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["dataTransactionName", "name", "weight", "color", "size", "iconId"] }] }); }
|
|
7646
7647
|
}
|
|
7647
7648
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: GtrInputColorComponent, decorators: [{
|
|
7648
7649
|
type: Component,
|
|
@@ -7652,7 +7653,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
7652
7653
|
useExisting: forwardRef((() => GtrInputColorComponent)),
|
|
7653
7654
|
multi: true,
|
|
7654
7655
|
},
|
|
7655
|
-
], imports: [GtrInputComponent, NgxColorsModule, ReactiveFormsModule, GtrIconComponent], template: "<div class=\"input-color-container\">\n <div class=\"gtr-custom-label\">{{ inputLabel }}</div>\n\n <div\n class=\"d-flex flex-row align-items-center input-color\"\n [class.has-border]=\"hasBorder\"\n [class.invalid]=\"!disabled && invalid\"\n >\n <gtr-input\n type=\"text\"\n [isValid]=\"inputControl.valid\"\n [placeholder]=\"placeholder || ''\"\n [dataTransactionName]=\"dataTransactionName + '-color'\"\n [name]=\"name\"\n [formControl]=\"inputControl\">\n </gtr-input>\n\n <ngx-colors\n ngx-colors-trigger\n [hideColorPicker]=\"hideColorPicker\"\n [colorPickerControls]=\"colorPickerControls\"\n [hideTextInput]=\"hidePickerTextInput\"\n [formControl]=\"colorControl\"\n acceptLabel=\"Accept\"\n cancelLabel=\"Cancel\"\n ></ngx-colors>\n\n </div>\n @if (!disabled && invalid && inputControl
|
|
7656
|
+
], imports: [GtrInputComponent, NgxColorsModule, ReactiveFormsModule, GtrIconComponent], template: "<div class=\"input-color-container\">\n <div class=\"gtr-custom-label\">{{ inputLabel }}</div>\n\n <div\n class=\"d-flex flex-row align-items-center input-color\"\n [class.has-border]=\"hasBorder\"\n [class.invalid]=\"!disabled && (invalid || inputInvalid)\"\n >\n <gtr-input\n type=\"text\"\n [isValid]=\"inputControl.valid\"\n [placeholder]=\"placeholder || ''\"\n [dataTransactionName]=\"dataTransactionName + '-color'\"\n [name]=\"name\"\n [formControl]=\"inputControl\">\n </gtr-input>\n\n <ngx-colors\n ngx-colors-trigger\n [hideColorPicker]=\"hideColorPicker\"\n [colorPickerControls]=\"colorPickerControls\"\n [hideTextInput]=\"hidePickerTextInput\"\n [formControl]=\"colorControl\"\n acceptLabel=\"Accept\"\n cancelLabel=\"Cancel\"\n ></ngx-colors>\n\n </div>\n @if (!disabled && (invalid || inputInvalid) && inputControl.errors && !hideErrorMessage) {\n @if (inputControl.invalid && (inputControl.dirty || inputControl.touched)) {\n <div class=\"custom-error\">\n <gtr-icon name=\"info-circle-filled\" [size]=\"12\"></gtr-icon>\n @if (inputControl.errors['invalidColor']) {\n <span>The color is invalid.</span>\n }\n </div>\n }\n }\n</div>\n", styles: [".input-color-container .gtr-custom-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.input-color-container ::ng-deep ngx-colors{display:inline-block;margin-left:5px}.input-color-container ::ng-deep ngx-colors .preview{border-radius:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.input-color-container ::ng-deep ngx-colors .preview-background{border-radius:6px!important}.input-color-container ::ng-deep ngx-colors .circle{border:1px solid transparent!important;border-radius:6px!important;width:42px!important;height:100%!important;min-height:38px!important}.input-color-container .input-color.has-border ::ng-deep ngx-colors .circle{border-color:var(--gtr-color-base-black-10)!important}::ng-deep ngx-colors-panel .opened button{letter-spacing:.43px!important;padding:8px 12px 8px 10px!important;line-height:18px!important;font-size:15px!important;font-weight:400!important;border:1px solid transparent!important;border-radius:6px!important}\n"] }]
|
|
7656
7657
|
}], ctorParameters: () => [], propDecorators: { inputLabel: [{
|
|
7657
7658
|
type: Input
|
|
7658
7659
|
}], invalid: [{
|