@bootkit/ng0 0.0.0-alpha.29 → 0.0.0-alpha.30
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.
|
@@ -11,7 +11,7 @@ declare class FormFieldComponent implements AfterContentInit {
|
|
|
11
11
|
protected _ngControl?: NgControl;
|
|
12
12
|
protected _status: _angular_core.WritableSignal<string | null>;
|
|
13
13
|
protected _hasRequiredControl: _angular_core.WritableSignal<boolean>;
|
|
14
|
-
protected _errorText: _angular_core.
|
|
14
|
+
protected _errorText: _angular_core.WritableSignal<string | undefined>;
|
|
15
15
|
/**
|
|
16
16
|
* The label text for the form field.
|
|
17
17
|
*/
|
|
@@ -39,8 +39,8 @@ declare class FormFieldComponent implements AfterContentInit {
|
|
|
39
39
|
*/
|
|
40
40
|
readonly inputGroup: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
41
41
|
ngAfterContentInit(): void;
|
|
42
|
+
private _checkValidation;
|
|
42
43
|
private _isControlRequired;
|
|
43
|
-
private _updateControlStyles;
|
|
44
44
|
private _onFocusOut;
|
|
45
45
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormFieldComponent, never>;
|
|
46
46
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldComponent, "ng0-form-field, ng0-field", ["ng0FormField"], { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "showErrors": { "alias": "showErrors"; "required": false; "isSignal": true; }; "showRequired": { "alias": "showRequired"; "required": false; "isSignal": true; }; "showSubscripts": { "alias": "showSubscripts"; "required": false; "isSignal": true; }; "inputGroup": { "alias": "inputGroup"; "required": false; "isSignal": true; }; }, {}, ["_ngControlElement", "_ngControl"], ["*"], true, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject, DestroyRef, Renderer2, signal,
|
|
4
|
+
import { inject, DestroyRef, Renderer2, signal, input, booleanAttribute, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { FormControl, NgControl } from '@angular/forms';
|
|
7
7
|
import { LocalizationService } from '@bootkit/ng0/localization';
|
|
@@ -15,9 +15,7 @@ class FormFieldComponent {
|
|
|
15
15
|
_ngControl;
|
|
16
16
|
_status = signal('', ...(ngDevMode ? [{ debugName: "_status" }] : []));
|
|
17
17
|
_hasRequiredControl = signal(false, ...(ngDevMode ? [{ debugName: "_hasRequiredControl" }] : []));
|
|
18
|
-
_errorText =
|
|
19
|
-
this._localizationService.get()?.translateFirstError(this._ngControl.errors, 'Invalid')?.text :
|
|
20
|
-
undefined, ...(ngDevMode ? [{ debugName: "_errorText" }] : []));
|
|
18
|
+
_errorText = signal(undefined, ...(ngDevMode ? [{ debugName: "_errorText" }] : []));
|
|
21
19
|
/**
|
|
22
20
|
* The label text for the form field.
|
|
23
21
|
*/
|
|
@@ -48,36 +46,46 @@ class FormFieldComponent {
|
|
|
48
46
|
this._hasRequiredControl.set(this._isControlRequired());
|
|
49
47
|
if (this._ngControl) {
|
|
50
48
|
this._status.set(this._ngControl.status);
|
|
51
|
-
this._ngControl
|
|
49
|
+
this._ngControl.statusChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(change => {
|
|
52
50
|
this._status.set(change);
|
|
53
|
-
this.
|
|
51
|
+
this._checkValidation();
|
|
54
52
|
});
|
|
53
|
+
this._ngControl.valueChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(value => {
|
|
54
|
+
if (this._status() === 'INVALID' && this._ngControl.errors) {
|
|
55
|
+
this._checkValidation(); // Recheck validation errors
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
_checkValidation() {
|
|
61
|
+
if (!this._ngControl || !this._ngControl.touched) {
|
|
62
|
+
return;
|
|
55
63
|
}
|
|
64
|
+
let elm = this._ngControlElement.nativeElement;
|
|
65
|
+
let invalid = this._status() === 'INVALID';
|
|
66
|
+
let errorText = invalid ?
|
|
67
|
+
this._localizationService.get()?.translateFirstError(this._ngControl.errors, 'Invalid')?.text :
|
|
68
|
+
undefined;
|
|
69
|
+
this._errorText.set(errorText);
|
|
70
|
+
this._renderer.addClass(elm, invalid ? 'is-invalid' : 'is-valid');
|
|
71
|
+
this._renderer.removeClass(elm, invalid ? 'is-valid' : 'is-invalid');
|
|
56
72
|
}
|
|
57
73
|
_isControlRequired() {
|
|
58
74
|
const validator = this._ngControl?.validator || this._ngControl?.control?.validator;
|
|
59
75
|
const errors = validator && validator(new FormControl(null));
|
|
60
76
|
return errors != null && errors['required'] === true;
|
|
61
77
|
}
|
|
62
|
-
_updateControlStyles() {
|
|
63
|
-
if (this._ngControl?.touched) {
|
|
64
|
-
let invalid = this._status() === 'INVALID';
|
|
65
|
-
let elm = this._ngControlElement.nativeElement;
|
|
66
|
-
this._renderer.addClass(elm, invalid ? 'is-invalid' : 'is-valid');
|
|
67
|
-
this._renderer.removeClass(elm, invalid ? 'is-valid' : 'is-invalid');
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
78
|
_onFocusOut() {
|
|
71
|
-
this.
|
|
79
|
+
this._checkValidation();
|
|
72
80
|
}
|
|
73
81
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
74
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: FormFieldComponent, isStandalone: true, selector: "ng0-form-field, ng0-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, showErrors: { classPropertyName: "showErrors", publicName: "showErrors", isSignal: true, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "showRequired", isSignal: true, isRequired: false, transformFunction: null }, showSubscripts: { classPropertyName: "showSubscripts", publicName: "showSubscripts", isSignal: true, isRequired: false, transformFunction: null }, inputGroup: { classPropertyName: "inputGroup", publicName: "inputGroup", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusout": "_onFocusOut()" }, properties: { "class.ng0-form-field-required": "_hasRequiredControl()" } }, queries: [{ propertyName: "_ngControlElement", first: true, predicate: NgControl, descendants: true, read: ElementRef, static: true }, { propertyName: "_ngControl", first: true, predicate: NgControl, descendants: true }], exportAs: ["ng0FormField"], ngImport: i0, template: "@let errorText = _errorText();\r\n@let showRequiredIndicator = showRequired();\r\n\r\n@if(label()) {\r\n<label class=\"ng0-form-field-label\">\r\n {{label()}}\r\n @if((showRequiredIndicator === true || (showRequiredIndicator == undefined && _hasRequiredControl()))) {\r\n <span class=\"ng0-form-field-required-indicator\">*</span>\r\n }\r\n</label>\r\n}\r\n\r\n@if(inputGroup()) {\r\n<div class=\"input-group\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</div>\r\n}@else {\r\n<ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n}\r\n\r\n<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if(showSubscripts()) {\r\n<div class=\"ng0-form-field-subscript\">\r\n @if(showErrors() && errorText && _ngControl?.touched) {\r\n <small class=\"ng0-form-field-error text-danger\" animate.enter=\"ng0-form-field-fadein\">\r\n {{errorText}}\r\n </small>\r\n }@else if(hint()) {\r\n <small class=\"ng0-form-field-hint\">\r\n {{hint()}}\r\n </small>\r\n }\r\n</div>\r\n}", styles: [":host{display:block}.ng0-form-field-subscript{min-height:1.5em;line-height:1.5em;text-align:justify;position:relative}.ng0-form-field-subscript .ng0-form-field-error{position:absolute;will-change:transform}.ng0-form-field-subscript .ng0-form-field-hint{position:absolute}.ng0-form-field-fadein{animation:fadeIn .3s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
82
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: FormFieldComponent, isStandalone: true, selector: "ng0-form-field, ng0-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, showErrors: { classPropertyName: "showErrors", publicName: "showErrors", isSignal: true, isRequired: false, transformFunction: null }, showRequired: { classPropertyName: "showRequired", publicName: "showRequired", isSignal: true, isRequired: false, transformFunction: null }, showSubscripts: { classPropertyName: "showSubscripts", publicName: "showSubscripts", isSignal: true, isRequired: false, transformFunction: null }, inputGroup: { classPropertyName: "inputGroup", publicName: "inputGroup", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusout": "_onFocusOut()" }, properties: { "class.ng0-form-field-required": "_hasRequiredControl()" } }, queries: [{ propertyName: "_ngControlElement", first: true, predicate: NgControl, descendants: true, read: ElementRef, static: true }, { propertyName: "_ngControl", first: true, predicate: NgControl, descendants: true }], exportAs: ["ng0FormField"], ngImport: i0, template: "@let errorText = _errorText();\r\n@let showRequiredIndicator = showRequired();\r\n\r\n@if(label()) {\r\n<label class=\"ng0-form-field-label\">\r\n {{label()}}\r\n @if((showRequiredIndicator === true || (showRequiredIndicator == undefined && _hasRequiredControl()))) {\r\n <span class=\"ng0-form-field-required-indicator\">*</span>\r\n }\r\n</label>\r\n}\r\n\r\n@if(inputGroup()) {\r\n<div class=\"input-group\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</div>\r\n}@else {\r\n<ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n}\r\n\r\n<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if(showSubscripts()) {\r\n<div class=\"ng0-form-field-subscript\">\r\n @if(showErrors() && errorText && _ngControl?.touched) {\r\n <small class=\"ng0-form-field-error text-danger\" animate.enter=\"ng0-form-field-fadein\">\r\n {{errorText}}\r\n </small>\r\n }@else if(hint()) {\r\n <small class=\"ng0-form-field-hint\">\r\n {{hint()}}\r\n </small>\r\n }\r\n</div>\r\n}", styles: [":host{display:block}.ng0-form-field-subscript{min-height:1.5em;line-height:1.5em;text-align:justify;position:relative;overflow:clip}.ng0-form-field-subscript .ng0-form-field-error{position:absolute;will-change:transform}.ng0-form-field-subscript .ng0-form-field-hint{position:absolute}.ng0-form-field-fadein{animation:fadeIn .3s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
75
83
|
}
|
|
76
84
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
77
85
|
type: Component,
|
|
78
86
|
args: [{ selector: 'ng0-form-field, ng0-field', exportAs: 'ng0FormField', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], host: {
|
|
79
87
|
'[class.ng0-form-field-required]': '_hasRequiredControl()',
|
|
80
|
-
}, template: "@let errorText = _errorText();\r\n@let showRequiredIndicator = showRequired();\r\n\r\n@if(label()) {\r\n<label class=\"ng0-form-field-label\">\r\n {{label()}}\r\n @if((showRequiredIndicator === true || (showRequiredIndicator == undefined && _hasRequiredControl()))) {\r\n <span class=\"ng0-form-field-required-indicator\">*</span>\r\n }\r\n</label>\r\n}\r\n\r\n@if(inputGroup()) {\r\n<div class=\"input-group\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</div>\r\n}@else {\r\n<ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n}\r\n\r\n<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if(showSubscripts()) {\r\n<div class=\"ng0-form-field-subscript\">\r\n @if(showErrors() && errorText && _ngControl?.touched) {\r\n <small class=\"ng0-form-field-error text-danger\" animate.enter=\"ng0-form-field-fadein\">\r\n {{errorText}}\r\n </small>\r\n }@else if(hint()) {\r\n <small class=\"ng0-form-field-hint\">\r\n {{hint()}}\r\n </small>\r\n }\r\n</div>\r\n}", styles: [":host{display:block}.ng0-form-field-subscript{min-height:1.5em;line-height:1.5em;text-align:justify;position:relative}.ng0-form-field-subscript .ng0-form-field-error{position:absolute;will-change:transform}.ng0-form-field-subscript .ng0-form-field-hint{position:absolute}.ng0-form-field-fadein{animation:fadeIn .3s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
88
|
+
}, template: "@let errorText = _errorText();\r\n@let showRequiredIndicator = showRequired();\r\n\r\n@if(label()) {\r\n<label class=\"ng0-form-field-label\">\r\n {{label()}}\r\n @if((showRequiredIndicator === true || (showRequiredIndicator == undefined && _hasRequiredControl()))) {\r\n <span class=\"ng0-form-field-required-indicator\">*</span>\r\n }\r\n</label>\r\n}\r\n\r\n@if(inputGroup()) {\r\n<div class=\"input-group\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</div>\r\n}@else {\r\n<ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n}\r\n\r\n<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if(showSubscripts()) {\r\n<div class=\"ng0-form-field-subscript\">\r\n @if(showErrors() && errorText && _ngControl?.touched) {\r\n <small class=\"ng0-form-field-error text-danger\" animate.enter=\"ng0-form-field-fadein\">\r\n {{errorText}}\r\n </small>\r\n }@else if(hint()) {\r\n <small class=\"ng0-form-field-hint\">\r\n {{hint()}}\r\n </small>\r\n }\r\n</div>\r\n}", styles: [":host{display:block}.ng0-form-field-subscript{min-height:1.5em;line-height:1.5em;text-align:justify;position:relative;overflow:clip}.ng0-form-field-subscript .ng0-form-field-error{position:absolute;will-change:transform}.ng0-form-field-subscript .ng0-form-field-hint{position:absolute}.ng0-form-field-fadein{animation:fadeIn .3s ease-out}@keyframes fadeIn{0%{opacity:0;transform:translateY(-100%)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
81
89
|
}], propDecorators: { _ngControlElement: [{
|
|
82
90
|
type: ContentChild,
|
|
83
91
|
args: [NgControl, { static: true, read: ElementRef }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-form-field.mjs","sources":["../../../projects/ng0/components/form-field/form-field.component.ts","../../../projects/ng0/components/form-field/form-field.component.html","../../../projects/ng0/components/form-field/form-field.module.ts","../../../projects/ng0/components/form-field/bootkit-ng0-components-form-field.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { booleanAttribute, ChangeDetectionStrategy, computed, DestroyRef, ElementRef, HostListener, inject, input, Renderer2, signal, ViewEncapsulation } from '@angular/core';\r\nimport { Component, ContentChild, AfterContentInit } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormControl, NgControl, NgForm } from '@angular/forms';\r\nimport { LocalizationService } from '@bootkit/ng0/localization';\r\n\r\n@Component({\r\n selector: 'ng0-form-field, ng0-field',\r\n exportAs: 'ng0FormField',\r\n templateUrl: './form-field.component.html',\r\n styleUrls: ['./form-field.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [CommonModule],\r\n host: {\r\n '[class.ng0-form-field-required]': '_hasRequiredControl()',\r\n }\r\n})\r\nexport class FormFieldComponent implements AfterContentInit {\r\n @ContentChild(NgControl, { static: true, read: ElementRef }) private _ngControlElement?: ElementRef;\r\n private _destroyRef = inject(DestroyRef);\r\n private _renderer = inject(Renderer2);\r\n private _localizationService = inject(LocalizationService);\r\n // private _form = inject(NgForm, { optional: true });\r\n @ContentChild(NgControl) protected _ngControl?: NgControl;\r\n protected _status = signal<string | null>('');\r\n protected _hasRequiredControl = signal(false);\r\n protected _errorText = computed<string | undefined>(() =>\r\n this._status() === 'INVALID' ?\r\n this._localizationService.get()?.translateFirstError(this._ngControl!.errors, 'Invalid')?.text :\r\n undefined\r\n );\r\n\r\n /**\r\n * The label text for the form field.\r\n */\r\n public readonly label = input<string>();\r\n\r\n /**\r\n * The hint text to display below the form field.\r\n */\r\n public readonly hint = input<string>();\r\n\r\n /**\r\n * If true, the form-field will show validation errors.\r\n */\r\n public readonly showErrors = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If undefined, the indicator will be shown based on the control's required state.\r\n * If true, the form-field will show a required indicator (*) next to the label (regardless of the control's required state).\r\n * If false, the required indicator will not be shown (regardless of the control's required state).\r\n */\r\n public readonly showRequired = input<boolean | undefined>(undefined);\r\n\r\n /**\r\n * If true, the form-field will show subscripts (e.g. hints, errors) for the field label.\r\n */\r\n public readonly showSubscripts = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the form-field will be rendered inside a \".input-group\" element.\r\n */\r\n public readonly inputGroup = input(true, { transform: booleanAttribute });\r\n\r\n ngAfterContentInit(): void {\r\n this._hasRequiredControl.set(this._isControlRequired());\r\n\r\n if (this._ngControl) {\r\n this._status.set(this._ngControl.status); \r\n this._ngControl?.statusChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(change => {\r\n this._status.set(change);\r\n this._updateControlStyles();\r\n });\r\n }\r\n }\r\n\r\n private _isControlRequired(): boolean {\r\n const validator = this._ngControl?.validator || this._ngControl?.control?.validator;\r\n const errors = validator && validator(new FormControl(null));\r\n return errors != null && errors['required'] === true;\r\n }\r\n\r\n private _updateControlStyles() {\r\n if (this._ngControl?.touched) {\r\n let invalid = this._status() === 'INVALID';\r\n let elm = this._ngControlElement!.nativeElement;\r\n this._renderer.addClass(elm, invalid ? 'is-invalid' : 'is-valid');\r\n this._renderer.removeClass(elm, invalid ? 'is-valid' : 'is-invalid');\r\n }\r\n }\r\n\r\n @HostListener('focusout')\r\n private _onFocusOut() {\r\n this._updateControlStyles();\r\n }\r\n}\r\n","@let errorText = _errorText();\r\n@let showRequiredIndicator = showRequired();\r\n\r\n@if(label()) {\r\n<label class=\"ng0-form-field-label\">\r\n {{label()}}\r\n @if((showRequiredIndicator === true || (showRequiredIndicator == undefined && _hasRequiredControl()))) {\r\n <span class=\"ng0-form-field-required-indicator\">*</span>\r\n }\r\n</label>\r\n}\r\n\r\n@if(inputGroup()) {\r\n<div class=\"input-group\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</div>\r\n}@else {\r\n<ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n}\r\n\r\n<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if(showSubscripts()) {\r\n<div class=\"ng0-form-field-subscript\">\r\n @if(showErrors() && errorText && _ngControl?.touched) {\r\n <small class=\"ng0-form-field-error text-danger\" animate.enter=\"ng0-form-field-fadein\">\r\n {{errorText}}\r\n </small>\r\n }@else if(hint()) {\r\n <small class=\"ng0-form-field-hint\">\r\n {{hint()}}\r\n </small>\r\n }\r\n</div>\r\n}","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormFieldComponent } from './form-field.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormFieldComponent,\r\n ],\r\n exports: [\r\n FormFieldComponent,\r\n ]\r\n})\r\nexport class FormFieldModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAoBa,kBAAkB,CAAA;AACwC,IAAA,iBAAiB;AAC9E,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,oBAAoB,GAAG,MAAM,CAAC,mBAAmB,CAAC;;AAEvB,IAAA,UAAU;AACnC,IAAA,OAAO,GAAG,MAAM,CAAgB,EAAE,mDAAC;AACnC,IAAA,mBAAmB,GAAG,MAAM,CAAC,KAAK,+DAAC;AACnC,IAAA,UAAU,GAAG,QAAQ,CAAqB,MAClD,IAAI,CAAC,OAAO,EAAE,KAAK,SAAS;AAC1B,QAAA,IAAI,CAAC,oBAAoB,CAAC,GAAG,EAAE,EAAE,mBAAmB,CAAC,IAAI,CAAC,UAAW,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI;AAC9F,QAAA,SAAS,sDACZ;AAED;;AAEG;IACa,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEvC;;AAEG;IACa,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEtC;;AAEG;AACa,IAAA,UAAU,GAAG,KAAK,CAAC,IAAI,8CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AAEzE;;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,EAAA,OAAA,EACP,CAAC,YAAY,CAAC,EAAA,IAAA,EACjB;AACJ,wBAAA,iCAAiC,EAAE,uBAAuB;AAC3D,qBAAA,EAAA,QAAA,EAAA,wiCAAA,EAAA,MAAA,EAAA,CAAA,yaAAA,CAAA,EAAA;;sBAGA,YAAY;uBAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE;;sBAK1D,YAAY;uBAAC,SAAS;;sBAoEtB,YAAY;uBAAC,UAAU;;;MEjFb,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPxB,YAAY;AACZ,YAAA,kBAAkB,aAGlB,kBAAkB,CAAA,EAAA,CAAA;AAGT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPxB,YAAY;YACZ,kBAAkB,CAAA,EAAA,CAAA;;2FAMT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;AACnB;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-form-field.mjs","sources":["../../../projects/ng0/components/form-field/form-field.component.ts","../../../projects/ng0/components/form-field/form-field.component.html","../../../projects/ng0/components/form-field/form-field.module.ts","../../../projects/ng0/components/form-field/bootkit-ng0-components-form-field.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { booleanAttribute, ChangeDetectionStrategy, DestroyRef, ElementRef, HostListener, inject, input, Renderer2, signal, ViewEncapsulation } from '@angular/core';\r\nimport { Component, ContentChild, AfterContentInit } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormControl, NgControl } from '@angular/forms';\r\nimport { LocalizationService } from '@bootkit/ng0/localization';\r\n\r\n@Component({\r\n selector: 'ng0-form-field, ng0-field',\r\n exportAs: 'ng0FormField',\r\n templateUrl: './form-field.component.html',\r\n styleUrls: ['./form-field.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [CommonModule],\r\n host: {\r\n '[class.ng0-form-field-required]': '_hasRequiredControl()',\r\n }\r\n})\r\nexport class FormFieldComponent implements AfterContentInit {\r\n @ContentChild(NgControl, { static: true, read: ElementRef }) private _ngControlElement?: ElementRef;\r\n private _destroyRef = inject(DestroyRef);\r\n private _renderer = inject(Renderer2);\r\n private _localizationService = inject(LocalizationService);\r\n // private _form = inject(NgForm, { optional: true });\r\n @ContentChild(NgControl) protected _ngControl?: NgControl;\r\n protected _status = signal<string | null>('');\r\n protected _hasRequiredControl = signal(false);\r\n protected _errorText = signal<string | undefined>(undefined);\r\n\r\n /**\r\n * The label text for the form field.\r\n */\r\n public readonly label = input<string>();\r\n\r\n /**\r\n * The hint text to display below the form field.\r\n */\r\n public readonly hint = input<string>();\r\n\r\n /**\r\n * If true, the form-field will show validation errors.\r\n */\r\n public readonly showErrors = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If undefined, the indicator will be shown based on the control's required state.\r\n * If true, the form-field will show a required indicator (*) next to the label (regardless of the control's required state).\r\n * If false, the required indicator will not be shown (regardless of the control's required state).\r\n */\r\n public readonly showRequired = input<boolean | undefined>(undefined);\r\n\r\n /**\r\n * If true, the form-field will show subscripts (e.g. hints, errors) for the field label.\r\n */\r\n public readonly showSubscripts = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the form-field will be rendered inside a \".input-group\" element.\r\n */\r\n public readonly inputGroup = input(true, { transform: booleanAttribute });\r\n\r\n ngAfterContentInit(): void {\r\n this._hasRequiredControl.set(this._isControlRequired());\r\n\r\n if (this._ngControl) {\r\n this._status.set(this._ngControl.status);\r\n\r\n this._ngControl.statusChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(change => {\r\n this._status.set(change);\r\n this._checkValidation();\r\n });\r\n\r\n this._ngControl.valueChanges?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(value => {\r\n if (this._status() === 'INVALID' && this._ngControl!.errors) {\r\n this._checkValidation(); // Recheck validation errors\r\n }\r\n });\r\n }\r\n }\r\n\r\n private _checkValidation() {\r\n if (!this._ngControl || !this._ngControl.touched) {\r\n return;\r\n }\r\n\r\n let elm = this._ngControlElement!.nativeElement;\r\n let invalid = this._status() === 'INVALID';\r\n let errorText = invalid ?\r\n this._localizationService.get()?.translateFirstError(this._ngControl!.errors, 'Invalid')?.text :\r\n undefined;\r\n\r\n this._errorText.set(errorText);\r\n this._renderer.addClass(elm, invalid ? 'is-invalid' : 'is-valid');\r\n this._renderer.removeClass(elm, invalid ? 'is-valid' : 'is-invalid');\r\n }\r\n\r\n private _isControlRequired(): boolean {\r\n const validator = this._ngControl?.validator || this._ngControl?.control?.validator;\r\n const errors = validator && validator(new FormControl(null));\r\n return errors != null && errors['required'] === true;\r\n }\r\n\r\n @HostListener('focusout')\r\n private _onFocusOut() {\r\n this._checkValidation();\r\n }\r\n}\r\n","@let errorText = _errorText();\r\n@let showRequiredIndicator = showRequired();\r\n\r\n@if(label()) {\r\n<label class=\"ng0-form-field-label\">\r\n {{label()}}\r\n @if((showRequiredIndicator === true || (showRequiredIndicator == undefined && _hasRequiredControl()))) {\r\n <span class=\"ng0-form-field-required-indicator\">*</span>\r\n }\r\n</label>\r\n}\r\n\r\n@if(inputGroup()) {\r\n<div class=\"input-group\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</div>\r\n}@else {\r\n<ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n}\r\n\r\n<ng-template #contentTemplate>\r\n <ng-content></ng-content>\r\n</ng-template>\r\n\r\n@if(showSubscripts()) {\r\n<div class=\"ng0-form-field-subscript\">\r\n @if(showErrors() && errorText && _ngControl?.touched) {\r\n <small class=\"ng0-form-field-error text-danger\" animate.enter=\"ng0-form-field-fadein\">\r\n {{errorText}}\r\n </small>\r\n }@else if(hint()) {\r\n <small class=\"ng0-form-field-hint\">\r\n {{hint()}}\r\n </small>\r\n }\r\n</div>\r\n}","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormFieldComponent } from './form-field.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormFieldComponent,\r\n ],\r\n exports: [\r\n FormFieldComponent,\r\n ]\r\n})\r\nexport class FormFieldModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAoBa,kBAAkB,CAAA;AACwC,IAAA,iBAAiB;AAC9E,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,oBAAoB,GAAG,MAAM,CAAC,mBAAmB,CAAC;;AAEvB,IAAA,UAAU;AACnC,IAAA,OAAO,GAAG,MAAM,CAAgB,EAAE,mDAAC;AACnC,IAAA,mBAAmB,GAAG,MAAM,CAAC,KAAK,+DAAC;AACnC,IAAA,UAAU,GAAG,MAAM,CAAqB,SAAS,sDAAC;AAE5D;;AAEG;IACa,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,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b,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPxB,YAAY;AACZ,YAAA,kBAAkB,aAGlB,kBAAkB,CAAA,EAAA,CAAA;AAGT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAPxB,YAAY;YACZ,kBAAkB,CAAA,EAAA,CAAA;;2FAMT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;AACnB;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootkit/ng0",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.30",
|
|
4
4
|
"description": "Angular+Bootstrap Component Library",
|
|
5
5
|
"homepage": "https://bootkitlib.github.io/",
|
|
6
6
|
"author": "BootKit",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"types": "./common/index.d.ts",
|
|
40
40
|
"default": "./fesm2022/bootkit-ng0-common.mjs"
|
|
41
41
|
},
|
|
42
|
-
"./date": {
|
|
43
|
-
"types": "./date/index.d.ts",
|
|
44
|
-
"default": "./fesm2022/bootkit-ng0-date.mjs"
|
|
45
|
-
},
|
|
46
42
|
"./data": {
|
|
47
43
|
"types": "./data/index.d.ts",
|
|
48
44
|
"default": "./fesm2022/bootkit-ng0-data.mjs"
|
|
49
45
|
},
|
|
46
|
+
"./date": {
|
|
47
|
+
"types": "./date/index.d.ts",
|
|
48
|
+
"default": "./fesm2022/bootkit-ng0-date.mjs"
|
|
49
|
+
},
|
|
50
50
|
"./file": {
|
|
51
51
|
"types": "./file/index.d.ts",
|
|
52
52
|
"default": "./fesm2022/bootkit-ng0-file.mjs"
|
|
@@ -79,22 +79,22 @@
|
|
|
79
79
|
"types": "./components/accordion/index.d.ts",
|
|
80
80
|
"default": "./fesm2022/bootkit-ng0-components-accordion.mjs"
|
|
81
81
|
},
|
|
82
|
-
"./components/backdrop": {
|
|
83
|
-
"types": "./components/backdrop/index.d.ts",
|
|
84
|
-
"default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
|
|
85
|
-
},
|
|
86
82
|
"./components/button": {
|
|
87
83
|
"types": "./components/button/index.d.ts",
|
|
88
84
|
"default": "./fesm2022/bootkit-ng0-components-button.mjs"
|
|
89
85
|
},
|
|
90
|
-
"./components/
|
|
91
|
-
"types": "./components/
|
|
92
|
-
"default": "./fesm2022/bootkit-ng0-components-
|
|
86
|
+
"./components/backdrop": {
|
|
87
|
+
"types": "./components/backdrop/index.d.ts",
|
|
88
|
+
"default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
|
|
93
89
|
},
|
|
94
90
|
"./components/card": {
|
|
95
91
|
"types": "./components/card/index.d.ts",
|
|
96
92
|
"default": "./fesm2022/bootkit-ng0-components-card.mjs"
|
|
97
93
|
},
|
|
94
|
+
"./components/code": {
|
|
95
|
+
"types": "./components/code/index.d.ts",
|
|
96
|
+
"default": "./fesm2022/bootkit-ng0-components-code.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./components/collapse": {
|
|
99
99
|
"types": "./components/collapse/index.d.ts",
|
|
100
100
|
"default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
|
|
@@ -139,14 +139,14 @@
|
|
|
139
139
|
"types": "./components/popover/index.d.ts",
|
|
140
140
|
"default": "./fesm2022/bootkit-ng0-components-popover.mjs"
|
|
141
141
|
},
|
|
142
|
-
"./components/sidenav": {
|
|
143
|
-
"types": "./components/sidenav/index.d.ts",
|
|
144
|
-
"default": "./fesm2022/bootkit-ng0-components-sidenav.mjs"
|
|
145
|
-
},
|
|
146
142
|
"./components/select": {
|
|
147
143
|
"types": "./components/select/index.d.ts",
|
|
148
144
|
"default": "./fesm2022/bootkit-ng0-components-select.mjs"
|
|
149
145
|
},
|
|
146
|
+
"./components/sidenav": {
|
|
147
|
+
"types": "./components/sidenav/index.d.ts",
|
|
148
|
+
"default": "./fesm2022/bootkit-ng0-components-sidenav.mjs"
|
|
149
|
+
},
|
|
150
150
|
"./components/stepper": {
|
|
151
151
|
"types": "./components/stepper/index.d.ts",
|
|
152
152
|
"default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
|